diff --git a/README.md b/README.md index ff620681f..6746a4f86 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ npm install -D knip Knip supports LTS versions of Node.js, and currently requires at least Node.js v16.17 or v18.6. +Since v2.33.0, the Bun runtime is also supported. + ### Default Configuration Knip has good defaults and aims for no or little configuration. The (simplified) default config: diff --git a/fixtures/include-entry-reexports/package-lock.json b/fixtures/include-entry-reexports/package-lock.json deleted file mode 100644 index bf7fd04f8..000000000 --- a/fixtures/include-entry-reexports/package-lock.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@fixtures/include-entry-reexports", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@fixtures/include-entry-reexports", - "version": "1.0.0", - "workspaces": [ - "packages/*" - ] - }, - "node_modules/@kp/app": { - "resolved": "packages/app", - "link": true - }, - "node_modules/@kp/shared": { - "resolved": "packages/shared", - "link": true - }, - "packages/app": { - "name": "@kp/app", - "version": "0.0.0", - "dependencies": { - "@kp/shared": "*" - } - }, - "packages/shared": { - "name": "@kp/shared", - "version": "0.0.0" - } - } -} diff --git a/fixtures/plugins/nx/apps/b/project.json b/fixtures/plugins/nx/apps/b/project.json new file mode 100644 index 000000000..0e1aeb493 --- /dev/null +++ b/fixtures/plugins/nx/apps/b/project.json @@ -0,0 +1,18 @@ +{ + "sourceRoot": "apps/b", + "projectType": "application", + "targets": { + "build": { + "executor": "@nx/next:build" + }, + "serve": { + "executor": "@nx/next:server" + }, + "lint": { + "executor": "@nx/linter:eslint" + }, + "test": { + "executor": "@js/cypress:cypress" + } + } +} diff --git a/fixtures/plugins/nx/package.json b/fixtures/plugins/nx/package.json index 0e7ab5422..77884c9a0 100644 --- a/fixtures/plugins/nx/package.json +++ b/fixtures/plugins/nx/package.json @@ -4,6 +4,9 @@ "nx": "nx" }, "devDependencies": { + "@nx/next": "*", + "@nx/linter": "*", + "@nx/cypress": "*", "@nrwl/cypress": "*", "@nrwl/devkit": "*", "@nrwl/jest": "*", diff --git a/fixtures/plugins/vitest3/package-lock.json b/fixtures/plugins/vitest3/package-lock.json deleted file mode 100644 index d0bff984b..000000000 --- a/fixtures/plugins/vitest3/package-lock.json +++ /dev/null @@ -1,3210 +0,0 @@ -{ - "name": "@fixtures/vitest3", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@fixtures/vitest3", - "devDependencies": { - "@swc/plugin-styled-components": "*", - "@vitejs/plugin-react-swc": "*", - "vite": "*", - "vite-plugin-checker": "*", - "vite-plugin-svgr": "*", - "vitest": "^0.34.6" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", - "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", - "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.23.0", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.0", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", - "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", - "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, - "node_modules/@svgr/babel-plugin-add-jsx-attribute": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", - "integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz", - "integrity": "sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz", - "integrity": "sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz", - "integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-dynamic-title": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz", - "integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-svg-em-dimensions": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz", - "integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-react-native-svg": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz", - "integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-plugin-transform-svg-component": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz", - "integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/babel-preset": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz", - "integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==", - "dev": true, - "dependencies": { - "@svgr/babel-plugin-add-jsx-attribute": "8.0.0", - "@svgr/babel-plugin-remove-jsx-attribute": "8.0.0", - "@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0", - "@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0", - "@svgr/babel-plugin-svg-dynamic-title": "8.0.0", - "@svgr/babel-plugin-svg-em-dimensions": "8.0.0", - "@svgr/babel-plugin-transform-react-native-svg": "8.1.0", - "@svgr/babel-plugin-transform-svg-component": "8.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@svgr/core": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", - "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "8.1.0", - "camelcase": "^6.2.0", - "cosmiconfig": "^8.1.3", - "snake-case": "^3.0.4" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/hast-util-to-babel-ast": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz", - "integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.21.3", - "entities": "^4.4.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, - "node_modules/@svgr/plugin-jsx": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz", - "integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.21.3", - "@svgr/babel-preset": "8.1.0", - "@svgr/hast-util-to-babel-ast": "8.0.0", - "svg-parser": "^2.0.4" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - }, - "peerDependencies": { - "@svgr/core": "*" - } - }, - "node_modules/@swc/core": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.92.tgz", - "integrity": "sha512-vx0vUrf4YTEw59njOJ46Ha5i0cZTMYdRHQ7KXU29efN1MxcmJH2RajWLPlvQarOP1ab9iv9cApD7SMchDyx2vA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@swc/counter": "^0.1.1", - "@swc/types": "^0.1.5" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.92", - "@swc/core-darwin-x64": "1.3.92", - "@swc/core-linux-arm-gnueabihf": "1.3.92", - "@swc/core-linux-arm64-gnu": "1.3.92", - "@swc/core-linux-arm64-musl": "1.3.92", - "@swc/core-linux-x64-gnu": "1.3.92", - "@swc/core-linux-x64-musl": "1.3.92", - "@swc/core-win32-arm64-msvc": "1.3.92", - "@swc/core-win32-ia32-msvc": "1.3.92", - "@swc/core-win32-x64-msvc": "1.3.92" - }, - "peerDependencies": { - "@swc/helpers": "^0.5.0" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.92.tgz", - "integrity": "sha512-v7PqZUBtIF6Q5Cp48gqUiG8zQQnEICpnfNdoiY3xjQAglCGIQCjJIDjreZBoeZQZspB27lQN4eZ43CX18+2SnA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.92.tgz", - "integrity": "sha512-Q3XIgQfXyxxxms3bPN+xGgvwk0TtG9l89IomApu+yTKzaIIlf051mS+lGngjnh9L0aUiCp6ICyjDLtutWP54fw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.92.tgz", - "integrity": "sha512-tnOCoCpNVXC+0FCfG84PBZJyLlz0Vfj9MQhyhCvlJz9hQmvpf8nTdKH7RHrOn8VfxtUBLdVi80dXgIFgbvl7qA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.92.tgz", - "integrity": "sha512-lFfGhX32w8h1j74Iyz0Wv7JByXIwX11OE9UxG+oT7lG0RyXkF4zKyxP8EoxfLrDXse4Oop434p95e3UNC3IfCw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.92.tgz", - "integrity": "sha512-rOZtRcLj57MSAbiecMsqjzBcZDuaCZ8F6l6JDwGkQ7u1NYR57cqF0QDyU7RKS1Jq27Z/Vg21z5cwqoH5fLN+Sg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.92.tgz", - "integrity": "sha512-qptoMGnBL6v89x/Qpn+l1TH1Y0ed+v0qhNfAEVzZvCvzEMTFXphhlhYbDdpxbzRmCjH6GOGq7Y+xrWt9T1/ARg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.92.tgz", - "integrity": "sha512-g2KrJ43bZkCZHH4zsIV5ErojuV1OIpUHaEyW1gf7JWKaFBpWYVyubzFPvPkjcxHGLbMsEzO7w/NVfxtGMlFH/Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.92.tgz", - "integrity": "sha512-3MCRGPAYDoQ8Yyd3WsCMc8eFSyKXY5kQLyg/R5zEqA0uthomo0m0F5/fxAJMZGaSdYkU1DgF73ctOWOf+Z/EzQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.92.tgz", - "integrity": "sha512-zqTBKQhgfWm73SVGS8FKhFYDovyRl1f5dTX1IwSKynO0qHkRCqJwauFJv/yevkpJWsI2pFh03xsRs9HncTQKSA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.92.tgz", - "integrity": "sha512-41bE66ddr9o/Fi1FBh0sHdaKdENPTuDpv1IFHxSg0dJyM/jX8LbkjnpdInYXHBxhcLVAPraVRrNsC4SaoPw2Pg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", - "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", - "dev": true - }, - "node_modules/@swc/plugin-styled-components": { - "version": "1.5.87", - "resolved": "https://registry.npmjs.org/@swc/plugin-styled-components/-/plugin-styled-components-1.5.87.tgz", - "integrity": "sha512-S+5xqgqLq35uUBR7HcSN07skfexPVWis8fMsHmQRLzzTwxB6uBo183ts6OA/HhbITb0P7vRCLe/mq+SAkQHWsQ==", - "dev": true - }, - "node_modules/@swc/types": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", - "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", - "dev": true - }, - "node_modules/@types/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-/k+vesl92vMvMygmQrFe9Aimxi6oQXFUX9mA5HanTrKUSAMoLauSi6PNFOdRw0oeqilaW600GNx2vSaT2f8aIQ==", - "dev": true - }, - "node_modules/@types/chai-subset": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.3.tgz", - "integrity": "sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==", - "dev": true, - "dependencies": { - "@types/chai": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", - "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.8.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz", - "integrity": "sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==", - "dev": true, - "dependencies": { - "undici-types": "~5.25.1" - } - }, - "node_modules/@vitejs/plugin-react-swc": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.4.0.tgz", - "integrity": "sha512-m7UaA4Uvz82N/0EOVpZL4XsFIakRqrFKeSNxa1FBLSXGvWrWRBwmZb4qxk+ZIVAZcW3c3dn5YosomDgx62XWcQ==", - "dev": true, - "dependencies": { - "@swc/core": "^1.3.85" - }, - "peerDependencies": { - "vite": "^4" - } - }, - "node_modules/@vitest/expect": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.34.6.tgz", - "integrity": "sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==", - "dev": true, - "dependencies": { - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", - "chai": "^4.3.10" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.34.6.tgz", - "integrity": "sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==", - "dev": true, - "dependencies": { - "@vitest/utils": "0.34.6", - "p-limit": "^4.0.0", - "pathe": "^1.1.1" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.34.6.tgz", - "integrity": "sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==", - "dev": true, - "dependencies": { - "magic-string": "^0.30.1", - "pathe": "^1.1.1", - "pretty-format": "^29.5.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.34.6.tgz", - "integrity": "sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==", - "dev": true, - "dependencies": { - "tinyspy": "^2.1.1" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.34.6.tgz", - "integrity": "sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==", - "dev": true, - "dependencies": { - "diff-sequences": "^29.4.3", - "loupe": "^2.3.6", - "pretty-format": "^29.5.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", - "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001541", - "electron-to-chromium": "^1.4.535", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001547", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", - "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.0.8" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dev": true, - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.551", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.551.tgz", - "integrity": "sha512-/Ng/W/kFv7wdEHYzxdK7Cv0BHEGSkSB3M0Ssl8Ndr1eMiYeas/+Mv4cNaDqamqWx6nd2uQZfPz6g25z25M/sdw==", - "dev": true - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/local-pkg": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", - "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, - "node_modules/lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==", - "dev": true - }, - "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } - }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/magic-string": { - "version": "0.30.4", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz", - "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mlly": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", - "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", - "dev": true, - "dependencies": { - "acorn": "^8.10.0", - "pathe": "^1.1.1", - "pkg-types": "^1.0.3", - "ufo": "^1.3.0" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pathe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", - "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", - "dev": true - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", - "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", - "dev": true, - "dependencies": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.2.0", - "pathe": "^1.1.0" - } - }, - "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "3.29.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", - "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, - "node_modules/std-env": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz", - "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==", - "dev": true - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-literal": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", - "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", - "dev": true, - "dependencies": { - "acorn": "^8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/svg-parser": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", - "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==", - "dev": true - }, - "node_modules/tiny-invariant": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", - "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==", - "dev": true - }, - "node_modules/tinybench": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz", - "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", - "dev": true - }, - "node_modules/tinypool": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.7.0.tgz", - "integrity": "sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", - "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ufo": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", - "integrity": "sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==", - "dev": true - }, - "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", - "dev": true - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/vite": { - "version": "4.4.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", - "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", - "dev": true, - "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.27", - "rollup": "^3.27.1" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.34.6.tgz", - "integrity": "sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==", - "dev": true, - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.3.4", - "mlly": "^1.4.0", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": ">=v14.18.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vite-plugin-checker": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/vite-plugin-checker/-/vite-plugin-checker-0.6.2.tgz", - "integrity": "sha512-YvvvQ+IjY09BX7Ab+1pjxkELQsBd4rPhWNw8WLBeFVxu/E7O+n6VYAqNsKdK/a2luFlX/sMpoWdGFfg4HvwdJQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "ansi-escapes": "^4.3.0", - "chalk": "^4.1.1", - "chokidar": "^3.5.1", - "commander": "^8.0.0", - "fast-glob": "^3.2.7", - "fs-extra": "^11.1.0", - "lodash.debounce": "^4.0.8", - "lodash.pick": "^4.4.0", - "npm-run-path": "^4.0.1", - "semver": "^7.5.0", - "strip-ansi": "^6.0.0", - "tiny-invariant": "^1.1.0", - "vscode-languageclient": "^7.0.0", - "vscode-languageserver": "^7.0.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-uri": "^3.0.2" - }, - "engines": { - "node": ">=14.16" - }, - "peerDependencies": { - "eslint": ">=7", - "meow": "^9.0.0", - "optionator": "^0.9.1", - "stylelint": ">=13", - "typescript": "*", - "vite": ">=2.0.0", - "vls": "*", - "vti": "*", - "vue-tsc": ">=1.3.9" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - }, - "meow": { - "optional": true - }, - "optionator": { - "optional": true - }, - "stylelint": { - "optional": true - }, - "typescript": { - "optional": true - }, - "vls": { - "optional": true - }, - "vti": { - "optional": true - }, - "vue-tsc": { - "optional": true - } - } - }, - "node_modules/vite-plugin-svgr": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-4.1.0.tgz", - "integrity": "sha512-v7Qic+FWmCChgQNGSI4V8X63OEYsdUoLt66iqIcHozq9bfK/Dwmr0V+LBy1NE8CE98Y8HouEBJ+pto4AMfN5xw==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^5.0.4", - "@svgr/core": "^8.1.0", - "@svgr/plugin-jsx": "^8.1.0" - }, - "peerDependencies": { - "vite": "^2.6.0 || 3 || 4" - } - }, - "node_modules/vitest": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", - "integrity": "sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==", - "dev": true, - "dependencies": { - "@types/chai": "^4.3.5", - "@types/chai-subset": "^1.3.3", - "@types/node": "*", - "@vitest/expect": "0.34.6", - "@vitest/runner": "0.34.6", - "@vitest/snapshot": "0.34.6", - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", - "acorn": "^8.9.0", - "acorn-walk": "^8.2.0", - "cac": "^6.7.14", - "chai": "^4.3.10", - "debug": "^4.3.4", - "local-pkg": "^0.4.3", - "magic-string": "^0.30.1", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "std-env": "^3.3.3", - "strip-literal": "^1.0.1", - "tinybench": "^2.5.0", - "tinypool": "^0.7.0", - "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0", - "vite-node": "0.34.6", - "why-is-node-running": "^2.2.2" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": ">=v14.18.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@vitest/browser": "*", - "@vitest/ui": "*", - "happy-dom": "*", - "jsdom": "*", - "playwright": "*", - "safaridriver": "*", - "webdriverio": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - }, - "playwright": { - "optional": true - }, - "safaridriver": { - "optional": true - }, - "webdriverio": { - "optional": true - } - } - }, - "node_modules/vscode-jsonrpc": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz", - "integrity": "sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==", - "dev": true, - "engines": { - "node": ">=8.0.0 || >=10.0.0" - } - }, - "node_modules/vscode-languageclient": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz", - "integrity": "sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==", - "dev": true, - "dependencies": { - "minimatch": "^3.0.4", - "semver": "^7.3.4", - "vscode-languageserver-protocol": "3.16.0" - }, - "engines": { - "vscode": "^1.52.0" - } - }, - "node_modules/vscode-languageserver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz", - "integrity": "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==", - "dev": true, - "dependencies": { - "vscode-languageserver-protocol": "3.16.0" - }, - "bin": { - "installServerIntoExtension": "bin/installServerIntoExtension" - } - }, - "node_modules/vscode-languageserver-protocol": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz", - "integrity": "sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==", - "dev": true, - "dependencies": { - "vscode-jsonrpc": "6.0.0", - "vscode-languageserver-types": "3.16.0" - } - }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", - "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", - "dev": true - }, - "node_modules/vscode-languageserver-types": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", - "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==", - "dev": true - }, - "node_modules/vscode-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", - "dev": true - }, - "node_modules/why-is-node-running": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", - "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", - "dev": true, - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/fixtures/plugins/webpack/webpack.config.js b/fixtures/plugins/webpack/webpack.config.js index eec5b54fc..fa5b15582 100644 --- a/fixtures/plugins/webpack/webpack.config.js +++ b/fixtures/plugins/webpack/webpack.config.js @@ -1,4 +1,4 @@ const getDevelopmentConfig = require('./webpack.dev.js'); const getProductionConfig = require('./webpack.prod.js'); -module.exports = (env, argv) => (env.production ? getProductionConfig() : getDevelopmentConfig()); +module.exports = (env, argv) => (env.production ? getProductionConfig(env) : getDevelopmentConfig(env)); diff --git a/fixtures/plugins/webpack/webpack.dev.js b/fixtures/plugins/webpack/webpack.dev.js index 9db208b36..38a32b296 100644 --- a/fixtures/plugins/webpack/webpack.dev.js +++ b/fixtures/plugins/webpack/webpack.dev.js @@ -2,8 +2,9 @@ const EslintPlugin = require('eslint-webpack-plugin'); const merge = require('./merge.js'); const common = require('./webpack.common.js'); -module.exports = () => +module.exports = env => merge(common(), { + mode: env.production ? 'production' : 'development', entry: { main: './src/app.ts', vendor: './src/vendor.ts', diff --git a/fixtures/plugins/webpack/webpack.prod.js b/fixtures/plugins/webpack/webpack.prod.js index aa26392f0..10a8723ab 100644 --- a/fixtures/plugins/webpack/webpack.prod.js +++ b/fixtures/plugins/webpack/webpack.prod.js @@ -3,7 +3,7 @@ const TerserWebpackPlugin = require('terser-webpack-plugin'); const merge = require('./merge.js'); const common = require('./webpack.common.js'); -module.exports = () => +module.exports = env => merge(common(), { mode: 'production', entry: './src/entry.js', diff --git a/fixtures/workspaces-plugin-config/knip.json b/fixtures/workspaces-plugin-config/knip.json index 69931b6e7..0e666d91c 100644 --- a/fixtures/workspaces-plugin-config/knip.json +++ b/fixtures/workspaces-plugin-config/knip.json @@ -6,6 +6,12 @@ "jest": "jest.config.js", "babel": { "config": "rollup.config.ts" }, "workspaces": { - "packages/*": {} + "packages/*": {}, + "packages/package1": { + "storybook": { + "config": "components/storybook/main.ts", + "entry": ["components/storybook/{manager,preview}.ts"] + } + } } } diff --git a/fixtures/workspaces-plugin-config/node_modules/ava/index.js b/fixtures/workspaces-plugin-config/node_modules/ava/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/node_modules/ava/package.json b/fixtures/workspaces-plugin-config/node_modules/ava/package.json new file mode 100644 index 000000000..fe3ef521a --- /dev/null +++ b/fixtures/workspaces-plugin-config/node_modules/ava/package.json @@ -0,0 +1,4 @@ +{ + "name": "ava", + "bin": "index.js" +} diff --git a/fixtures/workspaces-plugin-config/node_modules/jest/index.js b/fixtures/workspaces-plugin-config/node_modules/jest/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/node_modules/jest/package.json b/fixtures/workspaces-plugin-config/node_modules/jest/package.json new file mode 100644 index 000000000..75e2f3720 --- /dev/null +++ b/fixtures/workspaces-plugin-config/node_modules/jest/package.json @@ -0,0 +1,4 @@ +{ + "name": "jest", + "bin": "index.js" +} diff --git a/fixtures/workspaces-plugin-config/node_modules/next/index.js b/fixtures/workspaces-plugin-config/node_modules/next/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/node_modules/next/package.json b/fixtures/workspaces-plugin-config/node_modules/next/package.json new file mode 100644 index 000000000..f3a87e774 --- /dev/null +++ b/fixtures/workspaces-plugin-config/node_modules/next/package.json @@ -0,0 +1,4 @@ +{ + "name": "next", + "bin": "index.js" +} diff --git a/fixtures/workspaces-plugin-config/package.json b/fixtures/workspaces-plugin-config/package.json index 15ceb9e3e..1e6573bcb 100644 --- a/fixtures/workspaces-plugin-config/package.json +++ b/fixtures/workspaces-plugin-config/package.json @@ -1,9 +1,13 @@ { "name": "@workspaces-plugin-config/root", + "scripts": { + "test": "jest" + }, "workspaces": [ "packages/*" ], "devDependencies": { + "jest": "*", "jest-result-processor": "*", "eslint-config-airbnb": "*" } diff --git a/fixtures/workspaces-plugin-config/packages/frontend/components/component.js b/fixtures/workspaces-plugin-config/packages/frontend/components/component.js new file mode 100644 index 000000000..ea9b101e1 --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/frontend/components/component.js @@ -0,0 +1 @@ +export default function () {} diff --git a/fixtures/workspaces-plugin-config/packages/frontend/components/component.test.js b/fixtures/workspaces-plugin-config/packages/frontend/components/component.test.js new file mode 100644 index 000000000..69c5a25e7 --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/frontend/components/component.test.js @@ -0,0 +1 @@ +import component from './component'; diff --git a/fixtures/workspaces-plugin-config/packages/frontend/package.json b/fixtures/workspaces-plugin-config/packages/frontend/package.json index 9de41fec4..e278613b8 100644 --- a/fixtures/workspaces-plugin-config/packages/frontend/package.json +++ b/fixtures/workspaces-plugin-config/packages/frontend/package.json @@ -1,9 +1,15 @@ { "name": "@workspaces-plugin-config/frontend", "scripts": { + "dev": "next dev", + "start": "next start", "test": "vitest" }, + "dependencies": { + "next": "*" + }, "devDependencies": { + "next": "*", "vitest": "*", "jsdom": "*", "@rollup/plugin-commonjs": "*" diff --git a/fixtures/workspaces-plugin-config/packages/package1/ava.config.js b/fixtures/workspaces-plugin-config/packages/package1/ava.config.js new file mode 100644 index 000000000..fcd33e349 --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/package1/ava.config.js @@ -0,0 +1,3 @@ +export default { + files: ['**/*.ava.js'], +}; diff --git a/fixtures/workspaces-plugin-config/packages/package1/components/component.ava.js b/fixtures/workspaces-plugin-config/packages/package1/components/component.ava.js new file mode 100644 index 000000000..69c5a25e7 --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/package1/components/component.ava.js @@ -0,0 +1 @@ +import component from './component'; diff --git a/fixtures/workspaces-plugin-config/packages/package1/components/component.js b/fixtures/workspaces-plugin-config/packages/package1/components/component.js new file mode 100644 index 000000000..ea9b101e1 --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/package1/components/component.js @@ -0,0 +1 @@ +export default function () {} diff --git a/fixtures/workspaces-plugin-config/packages/package1/components/component.tales.js b/fixtures/workspaces-plugin-config/packages/package1/components/component.tales.js new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/packages/package1/components/storybook/main.ts b/fixtures/workspaces-plugin-config/packages/package1/components/storybook/main.ts new file mode 100644 index 000000000..ea53116b4 --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/package1/components/storybook/main.ts @@ -0,0 +1,3 @@ +module.exports = { + stories: ['../*.tales.js'], +}; diff --git a/fixtures/workspaces-plugin-config/packages/package1/components/storybook/manager.ts b/fixtures/workspaces-plugin-config/packages/package1/components/storybook/manager.ts new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/packages/package1/components/storybook/preview.ts b/fixtures/workspaces-plugin-config/packages/package1/components/storybook/preview.ts new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/packages/package1/dev-entry.js b/fixtures/workspaces-plugin-config/packages/package1/dev-entry.js new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/packages/package1/package.json b/fixtures/workspaces-plugin-config/packages/package1/package.json new file mode 100644 index 000000000..15b004ce8 --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/package1/package.json @@ -0,0 +1,10 @@ +{ + "name": "@workspaces-plugin-config/package-using-ava", + "scripts": { + "test": "ava" + }, + "devDependencies": { + "ava": "*", + "webpack": "*" + } +} diff --git a/fixtures/workspaces-plugin-config/packages/package1/production-entry.js b/fixtures/workspaces-plugin-config/packages/package1/production-entry.js new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/workspaces-plugin-config/packages/package1/webpack.config.js b/fixtures/workspaces-plugin-config/packages/package1/webpack.config.js new file mode 100644 index 000000000..23b5f13de --- /dev/null +++ b/fixtures/workspaces-plugin-config/packages/package1/webpack.config.js @@ -0,0 +1,13 @@ +import 'webpack'; + +const config = [ + { + entry: './production-entry.js', + }, + { + mode: 'development', + entry: './dev-entry.js', + }, +]; + +module.exports = config; diff --git a/package-lock.json b/package-lock.json index 3d1e369cc..d4f6af400 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "knip", - "version": "2.33.3", + "version": "2.33.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "knip", - "version": "2.33.3", + "version": "2.33.4", "license": "ISC", "dependencies": { "@ericcornelissen/bash-parser": "^0.5.2", diff --git a/package.json b/package.json index ea60fba55..801bc27c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "knip", - "version": "2.33.3", + "version": "2.33.4", "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects", "homepage": "https://github.com/webpro/knip", "repository": "github:webpro/knip", diff --git a/src/WorkspaceWorker.ts b/src/WorkspaceWorker.ts index 7c70eea97..afdd5b41e 100644 --- a/src/WorkspaceWorker.ts +++ b/src/WorkspaceWorker.ts @@ -11,13 +11,7 @@ import { isEntryPattern, isProductionEntryPattern, } from './util/protocols.js'; -import type { - Configuration, - EnsuredPluginConfiguration, - PluginConfiguration, - PluginName, - WorkspaceConfiguration, -} from './types/config.js'; +import type { Configuration, EnsuredPluginConfiguration, PluginName, WorkspaceConfiguration } from './types/config.js'; import type { PackageJsonWithPlugins } from './types/plugins.js'; import type { InstalledBinaries, HostDependencies } from './types/workspace.js'; import type { Entries } from 'type-fest'; @@ -130,7 +124,7 @@ export class WorkspaceWorker { const enabledPluginNames = this.enabledPlugins.map(name => plugins[name].NAME); - debugLogObject(`Enabled plugins (${this.name})`, enabledPluginNames); + debugLogObject(this.name, `Enabled plugins (${this.name})`, enabledPluginNames); } private async initReferencedDependencies() { @@ -150,8 +144,9 @@ export class WorkspaceWorker { this.hasTypesIncluded = hasTypesIncluded; } - private getConfigForPlugin(pluginName: PluginName): PluginConfiguration { - return this.config[pluginName] !== true ? this.config[pluginName] ?? nullConfig : nullConfig; + private getConfigForPlugin(pluginName: PluginName): EnsuredPluginConfiguration { + const config = this.config[pluginName]; + return typeof config === 'undefined' || typeof config === 'boolean' ? nullConfig : config; } getEntryFilePatterns() { @@ -180,8 +175,8 @@ export class WorkspaceWorker { const patterns: string[] = []; for (const [pluginName, plugin] of Object.entries(plugins) as PluginNames) { const pluginConfig = this.getConfigForPlugin(pluginName); - if (this.enabled[pluginName] && pluginConfig) { - const { entry, project } = pluginConfig === true ? nullConfig : pluginConfig; + if (this.enabled[pluginName]) { + const { entry, project } = pluginConfig; patterns.push(...(project ?? entry ?? ('PROJECT_FILE_PATTERNS' in plugin ? plugin.PROJECT_FILE_PATTERNS : []))); } } @@ -193,7 +188,7 @@ export class WorkspaceWorker { for (const [pluginName, plugin] of Object.entries(plugins) as PluginNames) { const pluginConfig = this.getConfigForPlugin(pluginName); if (this.enabled[pluginName] && pluginConfig) { - const { config } = pluginConfig === true ? nullConfig : pluginConfig; + const { config } = pluginConfig; const defaultConfigFiles = 'CONFIG_FILE_PATTERNS' in plugin ? plugin.CONFIG_FILE_PATTERNS : []; patterns.push(...(config ?? defaultConfigFiles)); } @@ -234,7 +229,7 @@ export class WorkspaceWorker { const pluginConfig = this.getConfigForPlugin(pluginName); if (pluginConfig) { const defaultConfig = 'CONFIG_FILE_PATTERNS' in plugin ? plugin.CONFIG_FILE_PATTERNS : []; - return (pluginConfig === true ? null : pluginConfig.config) ?? defaultConfig; + return pluginConfig.config ?? defaultConfig; } return []; } @@ -244,6 +239,7 @@ export class WorkspaceWorker { } private async findDependenciesByPlugins() { + const name = this.name; const cwd = this.dir; const ignore = this.getIgnorePatterns(); @@ -264,19 +260,10 @@ export class WorkspaceWorker { get(this.manifest, 'PACKAGE_JSON_PATH' in plugin ? plugin.PACKAGE_JSON_PATH : pluginName) ); - debugLogArray(`Found ${plugin.NAME} config file paths`, configFilePaths); - - // Bail out, no config files found for this plugin - if (patterns.length > 0 && configFilePaths.length === 0) { - if (typeof pluginConfig !== 'boolean' && pluginConfig.entry !== null && pluginConfig.entry.length > 0) { - // ...but only if no entry files are set - } else { - continue; - } - } + debugLogArray([name, plugin.NAME], 'config file paths', configFilePaths); - // Plugin has no config files configured, call it once to still get the entry:/production: patterns - if (patterns.length === 0) configFilePaths.push(FAKE_PATH); + // Plugin has no config files configured, add one to still invoke it and get the entry:/production: patterns + if (configFilePaths.length === 0) configFilePaths.push(FAKE_PATH); const pluginDependencies: Set = new Set(); @@ -284,7 +271,7 @@ export class WorkspaceWorker { const dependencies = await plugin.findDependencies(configFilePath, { cwd, manifest: this.manifest, - config: pluginConfig === true ? nullConfig : pluginConfig, + config: pluginConfig, isProduction: this.isProduction, }); @@ -300,7 +287,7 @@ export class WorkspaceWorker { }); } - debugLogArray(`Dependencies referenced in ${plugin.NAME}`, pluginDependencies); + debugLogArray([name, plugin.NAME], 'dependencies', pluginDependencies); } } } diff --git a/src/binaries/bash-parser.ts b/src/binaries/bash-parser.ts index 55c420292..9bedcad3b 100644 --- a/src/binaries/bash-parser.ts +++ b/src/binaries/bash-parser.ts @@ -77,7 +77,7 @@ export const getBinariesFromScript = ( const parsed = parse(script); return parsed?.commands ? getBinariesFromNodes(parsed.commands) : []; } catch (error) { - debugLogObject('Bash parser error', error); + debugLogObject('*', 'Bash parser error', error); return []; } }; diff --git a/src/index.ts b/src/index.ts index 33c4b1c6a..bef08731f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,7 +47,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { isIncludeEntryExports, } = unresolvedConfiguration; - debugLogObject('Unresolved configuration (from CLI arguments)', unresolvedConfiguration); + debugLogObject('*', 'Unresolved configuration (from CLI arguments)', unresolvedConfiguration); const chief = new ConfigurationChief({ cwd, isProduction }); const deputy = new DependencyDeputy({ isStrict }); @@ -75,14 +75,9 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { // TODO Organize better deputy.addIgnored(chief.config.ignoreBinaries, chief.config.ignoreDependencies); - debugLogObject( - 'Included workspaces', - workspaces.map(w => w.pkgName) - ); - debugLogObject( - 'Included workspace configs', - workspaces.map(w => ({ name: w.name, pkgName: w.pkgName, config: w.config, ancestors: w.ancestors })) - ); + const o = () => workspaces.map(w => ({ pkgName: w.pkgName, name: w.name, config: w.config, ancestors: w.ancestors })); + debugLogObject('*', 'Included workspaces', () => workspaces.map(w => w.pkgName)); + debugLogObject('*', 'Included workspace configs', o); const handleReferencedDependency = ({ specifier, @@ -133,7 +128,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { const { name, dir, config, ancestors, pkgName, manifestPath, manifest } = workspace; const { paths, ignoreDependencies, ignoreBinaries } = config; - streamer.cast(`Analyzing workspace (${name})...`); + streamer.cast(`Analyzing workspace ${name}...`); deputy.addWorkspace({ name, dir, manifestPath, manifest, ignoreDependencies, ignoreBinaries }); @@ -157,12 +152,12 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { await worker.init(); principal.addEntryPaths(definitionPaths); - debugLogArray(`Found definition paths (${name})`, definitionPaths); + debugLogArray(name, `Definition paths`, definitionPaths); const sharedGlobOptions = { cwd, workingDir: dir, gitignore, ignore: worker.getIgnorePatterns() }; const entryPathsFromManifest = await getEntryPathFromManifest(cwd, dir, manifest); - debugLogArray(`Found entry paths in package.json (${name})`, entryPathsFromManifest); + debugLogArray(name, 'Entry paths in package.json', entryPathsFromManifest); principal.addEntryPaths(entryPathsFromManifest); // Get peerDependencies, installed binaries, entry files gathered through all plugins, and hand over @@ -193,55 +188,55 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { { const patterns = worker.getProductionEntryFilePatterns(negatedEntryPatterns); const workspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns }); - debugLogArray(`Found entry paths (${name})`, workspaceEntryPaths); + debugLogArray(name, `Entry paths`, workspaceEntryPaths); principal.addEntryPaths(workspaceEntryPaths); } { const pluginWorkspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns: productionEntryFilePatterns }); - debugLogArray(`Found production plugin entry paths (${name})`, pluginWorkspaceEntryPaths); + debugLogArray(name, `Production plugin entry paths`, pluginWorkspaceEntryPaths); principal.addEntryPaths(pluginWorkspaceEntryPaths, { skipExportsAnalysis: true }); } { const patterns = worker.getProductionProjectFilePatterns(negatedEntryPatterns); const workspaceProjectPaths = await _glob({ ...sharedGlobOptions, patterns }); - debugLogArray(`Found project paths (${name})`, workspaceProjectPaths); + debugLogArray(name, `Project paths`, workspaceProjectPaths); workspaceProjectPaths.forEach(projectPath => principal.addProjectPath(projectPath)); } } else { { const patterns = worker.getEntryFilePatterns(); const workspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns }); - debugLogArray(`Found entry paths (${name})`, workspaceEntryPaths); + debugLogArray(name, `Entry paths`, workspaceEntryPaths); principal.addEntryPaths(workspaceEntryPaths); } { const patterns = worker.getProjectFilePatterns([...productionEntryFilePatterns]); const workspaceProjectPaths = await _glob({ ...sharedGlobOptions, patterns }); - debugLogArray(`Found project paths (${name})`, workspaceProjectPaths); + debugLogArray(name, `Project paths`, workspaceProjectPaths); workspaceProjectPaths.forEach(projectPath => principal.addProjectPath(projectPath)); } { const patterns = [...entryFilePatterns, ...productionEntryFilePatterns]; const pluginWorkspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns }); - debugLogArray(`Found plugin entry paths (${name})`, pluginWorkspaceEntryPaths); + debugLogArray(name, `Plugin entry paths`, pluginWorkspaceEntryPaths); principal.addEntryPaths(pluginWorkspaceEntryPaths, { skipExportsAnalysis: true }); } { const patterns = worker.getPluginProjectFilePatterns(); const pluginWorkspaceProjectPaths = await _glob({ ...sharedGlobOptions, patterns }); - debugLogArray(`Found plugin project paths (${name})`, pluginWorkspaceProjectPaths); + debugLogArray(name, `Plugin project paths`, pluginWorkspaceProjectPaths); pluginWorkspaceProjectPaths.forEach(projectPath => principal.addProjectPath(projectPath)); } { const patterns = compact(worker.getPluginConfigPatterns()); const configurationEntryPaths = await _glob({ ...sharedGlobOptions, patterns }); - debugLogArray(`Found plugin configuration paths (${name})`, configurationEntryPaths); + debugLogArray(name, `Plugin configuration paths`, configurationEntryPaths); principal.addEntryPaths(configurationEntryPaths, { skipExportsAnalysis: true }); } } @@ -254,7 +249,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { const principals = factory.getPrincipals(); - debugLog(`Installed ${principals.length} principals for ${workspaces.length} workspaces`); + debugLog('*', `Installed ${principals.length} principals for ${workspaces.length} workspaces`); const analyzedFiles: Set = new Set(); const exportedSymbols: Exports = new Map(); @@ -342,7 +337,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { const resolvedFiles = principal.getUsedResolvedFiles(); const files = resolvedFiles.filter(filePath => !analyzedFiles.has(filePath)); - debugLogArray(`Analyzing used resolved files [P${principals.indexOf(principal) + 1}/${++round}]`, files); + debugLogArray('*', `Analyzing used resolved files [P${principals.indexOf(principal) + 1}/${++round}]`, files); files.forEach(filePath => { analyzeSourceFile(filePath); analyzedFiles.add(filePath); diff --git a/src/plugins/_template/index.ts b/src/plugins/_template/index.ts index 0fe5330dd..6cf60cba9 100644 --- a/src/plugins/_template/index.ts +++ b/src/plugins/_template/index.ts @@ -1,5 +1,6 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; +import { toEntryPattern, toProductionEntryPattern } from '../../util/protocols.js'; import type { PluginConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; @@ -22,9 +23,37 @@ export const PRODUCTION_ENTRY_FILE_PATTERNS = []; export const PROJECT_FILE_PATTERNS = []; -const findPluginDependencies: GenericPluginCallback = async (configFilePath, { manifest }) => { - const config: PluginConfig = configFilePath.endsWith('package.json') ? manifest.plugin : await load(configFilePath); - return config?.plugins ?? []; +const findPluginDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, config, isProduction } = options; + + // load configuration file from `configFilePath` (or grab `manifest` for package.json) + // load(FAKE_PATH) will return `undefined` + const localConfig: PluginConfig | undefined = configFilePath.endsWith('package.json') + ? manifest.plugin + : await load(configFilePath); + + if (!localConfig) return []; + + // if plugin handles entry files, order of precedence (use only the first one that's set): + // 1. config.entry + // 2. entry patterns from `cfg` + // 3. ENTRY_FILE_PATTERNS + const entryPatterns = (config?.entry ?? localConfig.entryPathsOrPatterns ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); + + // if PRODUCTION_ENTRY_FILE_PATTERNS is set, only return them if `config.entry` is not set + const productionPatterns = config.entry ? [] : PRODUCTION_ENTRY_FILE_PATTERNS.map(toProductionEntryPattern); + + // in production mode: + // - plugins that don't deal with (production) entry files can bail out at the start of the function + // - plugins that only deal with `devDependencies` can bail out here and return all entry patterns + // - local config may include production dependencies (e.g. entry paths) and devDependencies (e.g. build tooling), + // requiring more fine-grained logic based on `isProduction` + if (isProduction) return [...entryPatterns, ...productionPatterns]; + + // resolve dependencies/binaries from local config file + const dependencies = localConfig?.plugins ?? []; + + return [...dependencies, ...entryPatterns, ...productionPatterns]; }; export const findDependencies = timerify(findPluginDependencies); diff --git a/src/plugins/_template/types.ts b/src/plugins/_template/types.ts index 4b012afeb..e47aed62d 100644 --- a/src/plugins/_template/types.ts +++ b/src/plugins/_template/types.ts @@ -1,3 +1,4 @@ export type PluginConfig = { plugins?: string[]; + entryPathsOrPatterns?: string[]; }; diff --git a/src/plugins/angular/index.ts b/src/plugins/angular/index.ts index ff4ca8aae..d8e708783 100644 --- a/src/plugins/angular/index.ts +++ b/src/plugins/angular/index.ts @@ -5,7 +5,7 @@ import { findTypeScriptDependencies } from '../typescript/index.js'; import type { AngularCLIWorkspaceConfiguration } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; -// link to docs +// https://angular.io/guide/workspace-config export const NAME = 'Angular'; @@ -16,25 +16,27 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['angular.json']; -const findPluginDependencies: GenericPluginCallback = async (configFilePath, opts) => { - const { cwd } = opts; - const config: AngularCLIWorkspaceConfiguration = await load(configFilePath); - if (!config.projects) return []; +const findPluginDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd } = options; + + const localConfig: AngularCLIWorkspaceConfiguration | undefined = await load(configFilePath); + + if (!localConfig?.projects) return []; const dependencies = new Set(); - for (const project of Object.values(config.projects)) { + for (const project of Object.values(localConfig.projects)) { if (!project.architect) return []; for (const target of Object.values(project.architect)) { - const { options } = target; + const { options: opts } = target; const [packageName] = typeof target.builder === 'string' ? target.builder.split(':') : []; if (typeof packageName === 'string') dependencies.add(packageName); - if (options) { - if ('main' in options && typeof options?.main === 'string') { - dependencies.add(join(cwd, options.main)); + if (opts) { + if ('main' in opts && typeof opts.main === 'string') { + dependencies.add(join(cwd, opts.main)); } - if ('tsConfig' in options && typeof options.tsConfig === 'string') { - const tsConfigDependencies = await findTypeScriptDependencies(join(cwd, options.tsConfig), opts); + if ('tsConfig' in opts && typeof opts.tsConfig === 'string') { + const tsConfigDependencies = await findTypeScriptDependencies(join(cwd, opts.tsConfig), options); tsConfigDependencies.forEach(dependency => dependencies.add(dependency)); } } diff --git a/src/plugins/ava/index.ts b/src/plugins/ava/index.ts index 3357d3703..a0618d54f 100644 --- a/src/plugins/ava/index.ts +++ b/src/plugins/ava/index.ts @@ -30,22 +30,24 @@ export const ENTRY_FILE_PATTERNS = [ '!**/test?(s)/**/{helper,fixture}?(s)/**/*', ]; -const findAvaDependencies: GenericPluginCallback = async (configFilePath, { cwd, manifest, isProduction }) => { - let config: AvaConfig = configFilePath.endsWith('package.json') ? manifest.ava : await load(configFilePath); +const findAvaDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, manifest, isProduction, config } = options; - if (typeof config === 'function') config = config(); + let localConfig: AvaConfig | undefined = configFilePath.endsWith('package.json') + ? manifest.ava + : await load(configFilePath); - const entryPatterns = (config?.files ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); - if (isProduction) return entryPatterns; + if (typeof localConfig === 'function') localConfig = localConfig(); - if (!config) return []; + const entryPatterns = (config.entry ?? localConfig?.files ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); - const requireArgs = (config.require ?? []).map(require => `--require ${require}`); - const otherArgs = config.nodeArguments ?? []; + if (isProduction || !localConfig) return entryPatterns; - const cmd = `node ${otherArgs.join(' ')} ${requireArgs.join(' ')}`; + const nodeArgs = localConfig.nodeArguments ?? []; + const requireArgs = (localConfig.require ?? []).map(require => `--require ${require}`); + const fakeCommand = `node ${nodeArgs.join(' ')} ${requireArgs.join(' ')}`; - const dependencies = _getDependenciesFromScripts([cmd], { + const dependencies = _getDependenciesFromScripts([fakeCommand], { cwd, manifest, knownGlobalsOnly: true, diff --git a/src/plugins/babel/index.ts b/src/plugins/babel/index.ts index af4e59e2e..ef37fa808 100644 --- a/src/plugins/babel/index.ts +++ b/src/plugins/babel/index.ts @@ -35,11 +35,16 @@ export const getDependenciesFromConfig = (config: BabelConfigObj): string[] => { const findBabelDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { if (isProduction) return []; - let config: BabelConfig = configFilePath.endsWith('package.json') ? manifest.babel : await load(configFilePath); - if (typeof config === 'function') { - config = config(api); - } - return config ? getDependenciesFromConfig(config) : []; + + let localConfig: BabelConfig | undefined = configFilePath.endsWith('package.json') + ? manifest.babel + : await load(configFilePath); + + if (typeof localConfig === 'function') localConfig = localConfig(api); + + if (!localConfig) return []; + + return getDependenciesFromConfig(localConfig); }; export const findDependencies = timerify(findBabelDependencies); diff --git a/src/plugins/capacitor/index.ts b/src/plugins/capacitor/index.ts index 2d3d95972..b59b180c3 100644 --- a/src/plugins/capacitor/index.ts +++ b/src/plugins/capacitor/index.ts @@ -16,8 +16,12 @@ export const CONFIG_FILE_PATTERNS = ['capacitor.config.ts']; const findCapacitorDependencies: GenericPluginCallback = async (configFilePath, { isProduction }) => { if (isProduction) return []; - const config: CapacitorConfig = await load(configFilePath); - return config.includePlugins ?? []; + + const localConfig: CapacitorConfig | undefined = await load(configFilePath); + + if (!localConfig) return []; + + return localConfig.includePlugins ?? []; }; export const findDependencies = timerify(findCapacitorDependencies); diff --git a/src/plugins/changesets/index.ts b/src/plugins/changesets/index.ts index dfd542a8f..dd72c708c 100644 --- a/src/plugins/changesets/index.ts +++ b/src/plugins/changesets/index.ts @@ -19,11 +19,15 @@ export const CONFIG_FILE_PATTERNS = ['.changeset/config.json']; const findChangesetsDependencies: GenericPluginCallback = async (configFilePath, { isProduction }) => { if (isProduction) return []; - const config: ChangesetsConfig = await load(configFilePath); - return Array.isArray(config.changelog) - ? [config.changelog[0]] - : typeof config.changelog === 'string' - ? [config.changelog] + + const localConfig: ChangesetsConfig | undefined = await load(configFilePath); + + if (!localConfig) return []; + + return Array.isArray(localConfig.changelog) + ? [localConfig.changelog[0]] + : typeof localConfig.changelog === 'string' + ? [localConfig.changelog] : []; }; diff --git a/src/plugins/commitizen/index.ts b/src/plugins/commitizen/index.ts index 2847b8b14..ddc59d5c2 100644 --- a/src/plugins/commitizen/index.ts +++ b/src/plugins/commitizen/index.ts @@ -1,6 +1,6 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; -import type { PluginConfig } from './types.js'; +import type { CommitizenConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; // https://github.com/commitizen/cz-cli @@ -18,11 +18,14 @@ export const CONFIG_FILE_PATTERNS = ['.czrc', '.cz.json', 'package.json']; const findPluginDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { if (isProduction) return []; - const config: PluginConfig = configFilePath.endsWith('package.json') + + const localConfig: CommitizenConfig | undefined = configFilePath.endsWith('package.json') ? manifest.config?.commitizen : await load(configFilePath); - const path = config?.path; - return path === undefined ? [] : [path]; + + if (!localConfig) return []; + + return localConfig.path ? [localConfig.path] : []; }; export const findDependencies = timerify(findPluginDependencies); diff --git a/src/plugins/commitizen/types.ts b/src/plugins/commitizen/types.ts index 85edc2eaa..e17577534 100644 --- a/src/plugins/commitizen/types.ts +++ b/src/plugins/commitizen/types.ts @@ -1,3 +1,3 @@ -export type PluginConfig = { +export type CommitizenConfig = { path?: string; }; diff --git a/src/plugins/commitlint/index.ts b/src/plugins/commitlint/index.ts index 62f62d95d..cf36ce8be 100644 --- a/src/plugins/commitlint/index.ts +++ b/src/plugins/commitlint/index.ts @@ -25,10 +25,14 @@ export const CONFIG_FILE_PATTERNS = [ const findCommitLintDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { if (isProduction) return []; - const config: CommitLintConfig = configFilePath.endsWith('package.json') + + const localConfig: CommitLintConfig | undefined = configFilePath.endsWith('package.json') ? manifest.commitlint : await load(configFilePath); - return config?.extends ? [config.extends].flat() : []; + + if (!localConfig) return []; + + return localConfig.extends ? [localConfig.extends].flat() : []; }; export const findDependencies = timerify(findCommitLintDependencies); diff --git a/src/plugins/cspell/index.ts b/src/plugins/cspell/index.ts index 53d995f74..fbb9c99bb 100644 --- a/src/plugins/cspell/index.ts +++ b/src/plugins/cspell/index.ts @@ -1,6 +1,6 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; -import type { PluginConfig } from './types.js'; +import type { CSpellConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; // https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell#customization @@ -21,8 +21,12 @@ export const CONFIG_FILE_PATTERNS = [ const findCspellDependencies: GenericPluginCallback = async (configFilePath, { isProduction }) => { if (isProduction) return []; - const config: PluginConfig = await load(configFilePath); - const imports = config?.import ?? []; + + const localConfig: CSpellConfig | undefined = await load(configFilePath); + + if (!localConfig) return []; + + const imports = localConfig.import ?? []; return imports; }; diff --git a/src/plugins/cspell/types.ts b/src/plugins/cspell/types.ts index b15817e13..ef60b4778 100644 --- a/src/plugins/cspell/types.ts +++ b/src/plugins/cspell/types.ts @@ -1,3 +1,3 @@ -export type PluginConfig = { +export type CSpellConfig = { import?: string[]; }; diff --git a/src/plugins/cypress/index.ts b/src/plugins/cypress/index.ts index 761e25af0..1accd3e4d 100644 --- a/src/plugins/cypress/index.ts +++ b/src/plugins/cypress/index.ts @@ -23,10 +23,16 @@ const SUPPORT_FILE_PATTERNS = [ /** @public */ export const ENTRY_FILE_PATTERNS = [...TEST_FILE_PATTERNS, ...SUPPORT_FILE_PATTERNS]; -export const findDependencies: GenericPluginCallback = async configFilePath => { - const config = await load(configFilePath); - if (!config) return []; - const patterns = [config.e2e?.specPattern ?? [], config.component?.specPattern ?? []].flat(); +export const findDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { config } = options; + + const localConfig = await load(configFilePath); + + if (!localConfig) return []; + + if (config.entry) return config.entry.map(toEntryPattern); + + const patterns = [localConfig.e2e?.specPattern ?? [], localConfig.component?.specPattern ?? []].flat(); const entryPatterns = (patterns.length > 0 ? patterns : TEST_FILE_PATTERNS).map(toEntryPattern); return [...entryPatterns, ...SUPPORT_FILE_PATTERNS.map(toEntryPattern)]; }; diff --git a/src/plugins/drizzle/index.ts b/src/plugins/drizzle/index.ts index ec72e8a9e..446948398 100644 --- a/src/plugins/drizzle/index.ts +++ b/src/plugins/drizzle/index.ts @@ -1,6 +1,6 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; -import { toEntryPattern } from '../../util/protocols.js'; +import { toProductionEntryPattern } from '../../util/protocols.js'; import type { DrizzleConfig } from './types.js'; import type { GenericPluginCallback, IsPluginEnabledCallback } from '../../types/plugins.js'; @@ -16,9 +16,11 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['drizzle.config.{ts,js,json}']; const findDrizzleDependencies: GenericPluginCallback = async configFilePath => { - const config: DrizzleConfig = await load(configFilePath); - if (!config || !config.schema) return []; - return [config.schema].flat().map(toEntryPattern); + const localConfig: DrizzleConfig | undefined = await load(configFilePath); + + if (!localConfig?.schema) return []; + + return [localConfig.schema].flat().map(toProductionEntryPattern); }; export const findDependencies = timerify(findDrizzleDependencies); diff --git a/src/plugins/eslint/fallback.ts b/src/plugins/eslint/fallback.ts index df4367bee..270fccc7a 100644 --- a/src/plugins/eslint/fallback.ts +++ b/src/plugins/eslint/fallback.ts @@ -1,5 +1,6 @@ import createJITI from 'jiti'; import transform from 'jiti/dist/babel.js'; +import { FAKE_PATH } from '../../util/loader.js'; import { timerify } from '../../util/Performance.js'; import type { TransformOptions } from 'jiti/dist/types.js'; @@ -23,6 +24,9 @@ const jiti = createJITI(process.cwd(), { * require("@rushstack/eslint-patch/modern-module-resolution"); * ``` */ -const load = (configFilePath: string) => jiti(configFilePath); +const load = (configFilePath: string) => { + if (configFilePath === FAKE_PATH) return; + return jiti(configFilePath); +}; export const fallback = timerify(load); diff --git a/src/plugins/eslint/helpers.ts b/src/plugins/eslint/helpers.ts index e03b16510..82176f600 100644 --- a/src/plugins/eslint/helpers.ts +++ b/src/plugins/eslint/helpers.ts @@ -35,32 +35,32 @@ const getDependencies = (config: ESLintConfig | OverrideConfig) => { type GetDependenciesDeep = ( configFilePath: string, - dependencies: Set, - options: { cwd: string; manifest: Manifest } + options: { cwd: string; manifest: Manifest }, + dependencies?: Set ) => Promise>; -export const getDependenciesDeep: GetDependenciesDeep = async (configFilePath, dependencies = new Set(), options) => { +export const getDependenciesDeep: GetDependenciesDeep = async (configFilePath, options, dependencies = new Set()) => { const addAll = (deps: string[] | Set) => deps.forEach(dependency => dependencies.add(dependency)); - const config = configFilePath.endsWith('package.json') + const localConfig: ESLintConfig | undefined = configFilePath.endsWith('package.json') ? options.manifest[PACKAGE_JSON_PATH] : /(\.(jsonc?|ya?ml)|rc)$/.test(configFilePath) ? await load(configFilePath) : await fallback(configFilePath); - if (config) { - if (config.extends) { - for (const extend of [config.extends].flat()) { + if (localConfig) { + if (localConfig.extends) { + for (const extend of [localConfig.extends].flat()) { if (isInternal(extend)) { const filePath = toAbsolute(extend, dirname(configFilePath)); const extendConfigFilePath = _resolve(filePath); dependencies.add(extendConfigFilePath); - addAll(await getDependenciesDeep(extendConfigFilePath, dependencies, options)); + addAll(await getDependenciesDeep(extendConfigFilePath, options, dependencies)); } } } - addAll(getDependencies(config)); + addAll(getDependencies(localConfig)); } return dependencies; diff --git a/src/plugins/eslint/index.ts b/src/plugins/eslint/index.ts index 3b98ed59e..078a0cee9 100644 --- a/src/plugins/eslint/index.ts +++ b/src/plugins/eslint/index.ts @@ -3,6 +3,12 @@ import { hasDependency } from '../../util/plugin.js'; import { getDependenciesDeep } from './helpers.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; +// Old: https://eslint.org/docs/latest/use/configure/configuration-files +// New: https://eslint.org/docs/latest/use/configure/configuration-files-new + +// Note: shareable configs should use `peerDependencies` for plugins +// https://eslint.org/docs/latest/extend/shareable-configs#publishing-a-shareable-config + export const NAME = 'ESLint'; /** @public */ @@ -15,7 +21,6 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies, manifest, con 'eslint' in config || Boolean(manifest.name && /(^eslint-config|\/eslint-config)/.test(manifest.name)); -// Current: https://eslint.org/docs/latest/user-guide/configuring/configuration-files export const CONFIG_FILE_PATTERNS = [ 'eslint.config.js', '.eslintrc', @@ -24,21 +29,13 @@ export const CONFIG_FILE_PATTERNS = [ 'package.json', ]; -// New: https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new -// We can handle eslint.config.js just like other source code (as dependencies are imported) -/** @public */ -export const ENTRY_FILE_PATTERNS = []; - -// TODO Handle better. Make separate plugin? -// export const ENTRY_FILE_PATTERNS = ['eslint.config.js']; - -// Note: shareable configs should use `peerDependencies` for plugins -// https://eslint.org/docs/latest/developer-guide/shareable-configs#publishing-a-shareable-config - const findESLintDependencies: GenericPluginCallback = async (configFilePath, { cwd, manifest, isProduction }) => { - if (configFilePath.endsWith('eslint.config.js')) return []; if (isProduction) return []; - const dependencies = await getDependenciesDeep(configFilePath, new Set(), { cwd, manifest }); + + // The new configuration format does not need custom dependency resolving (it has only imports) + if (configFilePath.endsWith('eslint.config.js')) return []; + + const dependencies = await getDependenciesDeep(configFilePath, { cwd, manifest }); return Array.from(dependencies); }; diff --git a/src/plugins/gatsby/index.ts b/src/plugins/gatsby/index.ts index 2cf2bf6d5..ca7d7d5ca 100644 --- a/src/plugins/gatsby/index.ts +++ b/src/plugins/gatsby/index.ts @@ -14,10 +14,7 @@ export const ENABLERS = ['gatsby', 'gatsby-cli']; export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDependency(dependencies, ENABLERS); -export const CONFIG_FILE_PATTERNS = [ - 'gatsby-{config,node}.{js,jsx,ts,tsx}', - 'plugins/**/gatsby-node.{js,jsx,ts,tsx}', -]; +export const CONFIG_FILE_PATTERNS = ['gatsby-{config,node}.{js,jsx,ts,tsx}', 'plugins/**/gatsby-node.{js,jsx,ts,tsx}']; /** @public */ export const PRODUCTION_ENTRY_FILE_PATTERNS = [ @@ -30,19 +27,20 @@ export const PRODUCTION_ENTRY_FILE_PATTERNS = [ ]; const findGatsbyDependencies: GenericPluginCallback = async (configFilePath, { isProduction }) => { - const config: GatsbyConfig | GatsbyNode = await load(configFilePath); + const localConfig: GatsbyConfig | GatsbyNode | undefined = await load(configFilePath); const entryPatterns = PRODUCTION_ENTRY_FILE_PATTERNS.map(toProductionEntryPattern); - if (isProduction) return entryPatterns; + + if (isProduction || !localConfig) return entryPatterns; if (/gatsby-config/.test(configFilePath)) { - return (config as GatsbyConfig).plugins.map(plugin => (typeof plugin === 'string' ? plugin : plugin.resolve)); + return (localConfig as GatsbyConfig).plugins.map(plugin => (typeof plugin === 'string' ? plugin : plugin.resolve)); } if (/gatsby-node/.test(configFilePath)) { - const plugins: Set = new Set(); + const plugins = new Set(); const actions: GatsbyActions['actions'] = { setBabelPlugin: plugin => plugins.add(plugin.name) }; - const _config = config as GatsbyNode; + const _config = localConfig as GatsbyNode; if (typeof _config.onCreateBabelConfig === 'function') { _config.onCreateBabelConfig({ actions }); } diff --git a/src/plugins/github-actions/README.md b/src/plugins/github-actions/README.md index eafb186cd..8370e207e 100644 --- a/src/plugins/github-actions/README.md +++ b/src/plugins/github-actions/README.md @@ -2,14 +2,14 @@ ## Enabled -This plugin is enabled when a `.yml` file is found in the `.github/workflows` folder. +This plugin is enabled when a `.yml` or `.yaml` file is found in the `.github/workflows` folder. ## Default configuration ```json { "github-actions": { - "config": [".github/workflows/*.yml", ".github/**/action.{yml,yaml}"] + "config": [".github/workflows/*.{yml,yaml}", ".github/**/action.{yml,yaml}"] } } ``` diff --git a/src/plugins/github-actions/index.ts b/src/plugins/github-actions/index.ts index 74f68728f..9ffcd1625 100644 --- a/src/plugins/github-actions/index.ts +++ b/src/plugins/github-actions/index.ts @@ -10,17 +10,17 @@ import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types export const NAME = 'GitHub Actions'; /** @public */ -export const ENABLERS = 'This plugin is enabled when a `.yml` file is found in the `.github/workflows` folder.'; +export const ENABLERS = + 'This plugin is enabled when a `.yml` or `.yaml` file is found in the `.github/workflows` folder.'; export const isEnabled: IsPluginEnabledCallback = async ({ cwd }) => - Boolean(await _firstGlob({ cwd, patterns: ['.github/workflows/*.yml'] })); + Boolean(await _firstGlob({ cwd, patterns: ['.github/workflows/*.{yml,yaml}'] })); -export const CONFIG_FILE_PATTERNS = ['.github/workflows/*.yml', '.github/**/action.{yml,yaml}']; +export const CONFIG_FILE_PATTERNS = ['.github/workflows/*.{yml,yaml}', '.github/**/action.{yml,yaml}']; + +const findGithubActionsDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, manifest, isProduction } = options; -const findGithubActionsDependencies: GenericPluginCallback = async ( - configFilePath, - { cwd, manifest, isProduction } -) => { if (isProduction) return []; const config = await load(configFilePath); diff --git a/src/plugins/husky/index.ts b/src/plugins/husky/index.ts index c0e30cfc0..0d867bbf7 100644 --- a/src/plugins/husky/index.ts +++ b/src/plugins/husky/index.ts @@ -1,6 +1,7 @@ import { readFileSync } from 'fs'; import { _getDependenciesFromScripts } from '../../binaries/index.js'; import { getGitHookPaths } from '../../util/git.js'; +import { FAKE_PATH } from '../../util/loader.js'; import { timerify } from '../../util/Performance.js'; import { hasDependency } from '../../util/plugin.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; @@ -19,8 +20,10 @@ const gitHookPaths = getGitHookPaths('.husky'); export const CONFIG_FILE_PATTERNS = [...gitHookPaths]; -const findHuskyDependencies: GenericPluginCallback = async (configFilePath, { cwd, manifest, isProduction }) => { - if (isProduction) return []; +const findHuskyDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, manifest, isProduction } = options; + + if (isProduction || configFilePath === FAKE_PATH) return []; const script = readFileSync(configFilePath); diff --git a/src/plugins/jest/index.ts b/src/plugins/jest/index.ts index 871c5e7b1..d254fe051 100644 --- a/src/plugins/jest/index.ts +++ b/src/plugins/jest/index.ts @@ -2,12 +2,12 @@ import { join, isInternal, toAbsolute, dirname } from '../../util/path.js'; import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; import { toEntryPattern } from '../../util/protocols.js'; +import type { JestConfig, JestInitialOptions } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback, GenericPluginCallbackOptions, } from '../../types/plugins.js'; -import type { Config } from '@jest/types'; // https://jestjs.io/docs/configuration @@ -37,11 +37,11 @@ const resolveExtensibleConfig = async (configFilePath: string) => { return config; }; -type JestOptions = Config.InitialOptions | (() => Config.InitialOptions) | (() => Promise); - -const resolveDependencies = (config: Config.InitialOptions, options: GenericPluginCallbackOptions): string[] => { +const resolveDependencies = (config: JestInitialOptions, options: GenericPluginCallbackOptions): string[] => { const { isProduction } = options; - const entryPatterns = (config.testMatch ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); + + const entryPatterns = (options.config?.entry ?? config.testMatch ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); + if (isProduction) return entryPatterns; const presets = (config.preset ? [config.preset] : []).map(preset => @@ -92,19 +92,20 @@ const resolveDependencies = (config: Config.InitialOptions, options: GenericPlug const findJestDependencies: GenericPluginCallback = async (configFilePath, options) => { const { manifest, cwd } = options; - let config: JestOptions = configFilePath.endsWith('package.json') + let localConfig: JestConfig | undefined = configFilePath.endsWith('package.json') ? manifest.jest : await resolveExtensibleConfig(configFilePath); - if (typeof config === 'function') config = await config(); + if (typeof localConfig === 'function') localConfig = await localConfig(); - if (!config) return []; + // Normally we should bail out here, but to avoid duplication and keep it easy we carry on with fake local config + if (!localConfig) localConfig = {}; - const rootDir = config.rootDir ? join(dirname(configFilePath), config.rootDir) : dirname(configFilePath); + const rootDir = localConfig.rootDir ? join(dirname(configFilePath), localConfig.rootDir) : dirname(configFilePath); const replaceRootDir = (name: string) => (name.includes('') ? name.replace(//, rootDir) : name); - const dependencies = resolveDependencies(config, options); + const dependencies = resolveDependencies(localConfig, options); const matchCwd = new RegExp('^' + toEntryPattern(cwd) + '/'); return dependencies.map(replaceRootDir).map(dependency => dependency.replace(matchCwd, toEntryPattern(''))); diff --git a/src/plugins/jest/types.ts b/src/plugins/jest/types.ts new file mode 100644 index 000000000..2eb18fb75 --- /dev/null +++ b/src/plugins/jest/types.ts @@ -0,0 +1,5 @@ +import type { Config } from '@jest/types'; + +export type JestInitialOptions = Config.InitialOptions; + +export type JestConfig = JestInitialOptions | (() => JestInitialOptions) | (() => Promise); diff --git a/src/plugins/lefthook/index.ts b/src/plugins/lefthook/index.ts index a56b8b51e..5e45f6279 100644 --- a/src/plugins/lefthook/index.ts +++ b/src/plugins/lefthook/index.ts @@ -20,15 +20,17 @@ const gitHookPaths = getGitHookPaths(); export const CONFIG_FILE_PATTERNS = ['lefthook.yml', ...gitHookPaths]; -const findLefthookDependencies: GenericPluginCallback = async (configFilePath, { cwd, manifest, isProduction }) => { +const findLefthookDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, manifest, isProduction } = options; + if (isProduction) return []; const dependencies = manifest.devDependencies ? Object.keys(manifest.devDependencies) : []; if (configFilePath.endsWith('.yml')) { - const config = await load(configFilePath); - if (!config) return []; - const scripts = getValuesByKeyDeep(config, 'run').filter((value): value is string => typeof value === 'string'); + const localConfig = await load(configFilePath); + if (!localConfig) return []; + const scripts = getValuesByKeyDeep(localConfig, 'run').filter((run): run is string => typeof run === 'string'); const lefthook = process.env.CI ? ENABLERS.filter(dependency => dependencies.includes(dependency)) : []; return [...lefthook, ..._getDependenciesFromScripts(scripts, { cwd, manifest, knownGlobalsOnly: true })]; } diff --git a/src/plugins/lint-staged/index.ts b/src/plugins/lint-staged/index.ts index 96c9766c5..b4e603380 100644 --- a/src/plugins/lint-staged/index.ts +++ b/src/plugins/lint-staged/index.ts @@ -24,22 +24,22 @@ export const CONFIG_FILE_PATTERNS = [ 'package.json', ]; -const findLintStagedDependencies: GenericPluginCallback = async (configFilePath, { cwd, manifest, isProduction }) => { +const findLintStagedDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, manifest, isProduction } = options; + if (isProduction) return []; - let config: LintStagedConfig = configFilePath.endsWith('package.json') + let localConfig: LintStagedConfig | undefined = configFilePath.endsWith('package.json') ? manifest['lint-staged'] : await load(configFilePath); - if (!config) return []; + if (typeof localConfig === 'function') localConfig = localConfig(); - if (typeof config === 'function') { - config = config(); - } + if (!localConfig) return []; - const dependencies: Set = new Set(); + const dependencies = new Set(); - for (const entry of Object.values(config).flat()) { + for (const entry of Object.values(localConfig).flat()) { const scripts = [typeof entry === 'function' ? await entry([]) : entry].flat(); const options = { cwd, manifest }; _getDependenciesFromScripts(scripts, options).forEach(identifier => dependencies.add(identifier)); diff --git a/src/plugins/markdownlint/index.ts b/src/plugins/markdownlint/index.ts index 4317a5b5d..ee2d5074e 100644 --- a/src/plugins/markdownlint/index.ts +++ b/src/plugins/markdownlint/index.ts @@ -15,15 +15,15 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['.markdownlint.{json,jsonc}', '.markdownlint.{yml,yaml}']; -const findMarkdownlintConfigDependencies: GenericPluginCallback = async ( - configFilePath, - { manifest, isProduction } -) => { +const findMarkdownlintConfigDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction } = options; + if (isProduction) return []; - const config: MarkdownlintConfig = await load(configFilePath); - const extend = config?.extends ? [config.extends] : []; - const scripts = manifest.scripts + const localConfig: MarkdownlintConfig | undefined = await load(configFilePath); + + const extend = localConfig?.extends ? [localConfig.extends] : []; + const scripts = manifest?.scripts ? Object.values(manifest.scripts).filter((script): script is string => typeof script === 'string') : []; const uses = scripts diff --git a/src/plugins/mocha/index.ts b/src/plugins/mocha/index.ts index 1fc96fd98..8ba31521b 100644 --- a/src/plugins/mocha/index.ts +++ b/src/plugins/mocha/index.ts @@ -1,6 +1,7 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; import { toEntryPattern } from '../../util/protocols.js'; +import type { MochaConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; // https://mochajs.org/#configuring-mocha-nodejs @@ -17,15 +18,20 @@ export const CONFIG_FILE_PATTERNS = ['.mocharc.{js,cjs,json,jsonc,yml,yaml}', 'p /** @public */ export const ENTRY_FILE_PATTERNS = ['**/test/*.{js,cjs,mjs}']; -const findMochaDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { - const entryPatterns = ENTRY_FILE_PATTERNS.map(toEntryPattern); - if (isProduction) return entryPatterns; +const findMochaDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { config, manifest, isProduction } = options; - const config = configFilePath.endsWith('package.json') ? manifest.mocha : await load(configFilePath); + const localConfig: MochaConfig | undefined = configFilePath.endsWith('package.json') + ? manifest.mocha + : await load(configFilePath); - if (!config) return []; + const entryPatterns = (config.entry ?? (localConfig?.spec ? [localConfig.spec].flat() : ENTRY_FILE_PATTERNS)).map( + toEntryPattern + ); - const require = config.require ? [config.require].flat() : []; + if (isProduction || !localConfig) return entryPatterns; + + const require = localConfig.require ? [localConfig.require].flat() : []; return [...require, ...entryPatterns]; }; diff --git a/src/plugins/mocha/types.ts b/src/plugins/mocha/types.ts new file mode 100644 index 000000000..0739eccf2 --- /dev/null +++ b/src/plugins/mocha/types.ts @@ -0,0 +1,4 @@ +export interface MochaConfig { + require?: string | string[]; + spec?: string | string[]; +} diff --git a/src/plugins/npm-package-json-lint/index.ts b/src/plugins/npm-package-json-lint/index.ts index 701a88abb..a57521d1a 100644 --- a/src/plugins/npm-package-json-lint/index.ts +++ b/src/plugins/npm-package-json-lint/index.ts @@ -16,15 +16,16 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['.npmpackagejsonlintrc.json', 'npmpackagejsonlint.config.js', 'package.json']; -const findNpmPkgJsonLintConfigDependencies: GenericPluginCallback = async ( - configFilePath, - { manifest, isProduction } -) => { +const findNpmPkgJsonLintConfigDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction } = options; + if (isProduction) return []; - const config: NpmPkgJsonLintConfig = configFilePath.endsWith('package.json') + + const localConfig: NpmPkgJsonLintConfig | undefined = configFilePath.endsWith('package.json') ? manifest[PACKAGE_JSON_PATH] : await load(configFilePath); - return config?.extends ? [config.extends] : []; + + return localConfig?.extends ? [localConfig.extends] : []; }; export const findDependencies = timerify(findNpmPkgJsonLintConfigDependencies); diff --git a/src/plugins/nx/index.ts b/src/plugins/nx/index.ts index d15740b90..b1a147738 100644 --- a/src/plugins/nx/index.ts +++ b/src/plugins/nx/index.ts @@ -8,18 +8,22 @@ import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types export const NAME = 'Nx'; /** @public */ -export const ENABLERS = ['nx', /^@nrwl\//]; +export const ENABLERS = ['nx', /^@nrwl\//, /^@nx\//]; export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDependency(dependencies, ENABLERS); export const CONFIG_FILE_PATTERNS = ['project.json', '{apps,libs}/**/project.json']; -const findNxDependencies: GenericPluginCallback = async (configFilePath, { cwd, manifest, isProduction }) => { +const findNxDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, manifest, isProduction } = options; + if (isProduction) return []; - const config: NxProjectConfiguration = await load(configFilePath); - if (!config) return []; - const targets = config.targets ? Object.values(config.targets) : []; + const localConfig: NxProjectConfiguration | undefined = await load(configFilePath); + + if (!localConfig) return []; + + const targets = localConfig.targets ? Object.values(localConfig.targets) : []; const executors = compact( targets diff --git a/src/plugins/nyc/index.ts b/src/plugins/nyc/index.ts index 0f4cf8b24..c077bb003 100644 --- a/src/plugins/nyc/index.ts +++ b/src/plugins/nyc/index.ts @@ -1,13 +1,10 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; +import type { NycConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; // https://www.npmjs.com/package/nyc -type NycConfig = { - extends: string; -}; - export const NAME = 'nyc'; /** @public */ @@ -17,10 +14,14 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['.nycrc', '.nycrc.json', '.nycrc.{yml,yaml}', 'nyc.config.js']; -const findNycDependencies: GenericPluginCallback = async (configFilePath, { isProduction }) => { +const findNycDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { isProduction } = options; + if (isProduction) return []; - const config: NycConfig = await load(configFilePath); - return config.extends ? [config.extends].flat() : []; + + const localConfig: NycConfig | undefined = await load(configFilePath); + + return localConfig?.extends ? [localConfig.extends].flat() : []; }; export const findDependencies = timerify(findNycDependencies); diff --git a/src/plugins/nyc/types.ts b/src/plugins/nyc/types.ts new file mode 100644 index 000000000..c464c0a1a --- /dev/null +++ b/src/plugins/nyc/types.ts @@ -0,0 +1,3 @@ +export type NycConfig = { + extends?: string; +}; diff --git a/src/plugins/playwright-ct/index.ts b/src/plugins/playwright-ct/index.ts index 08b7f4181..68fd34f2e 100644 --- a/src/plugins/playwright-ct/index.ts +++ b/src/plugins/playwright-ct/index.ts @@ -1,7 +1,9 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; +import { toEntryPattern } from '../../util/protocols.js'; import { toEntryPatterns } from '../playwright/index.js'; import type { GenericPluginCallback, IsPluginEnabledCallback } from '../../types/plugins.js'; +import type { PlaywrightTestConfig } from 'playwright/test'; // https://playwright.dev/docs/test-components @@ -17,11 +19,18 @@ export const CONFIG_FILE_PATTERNS = ['playwright-ct.config.{js,ts}', 'playwright /** @public */ export const ENTRY_FILE_PATTERNS = ['**/*.@(spec|test).?(c|m)[jt]s?(x)']; -const findPlaywrightCTDependencies: GenericPluginCallback = async (configFilePath, { cwd }) => { - const config = await load(configFilePath); - const entryPatterns = toEntryPatterns(config.testMatch, cwd, configFilePath, config); - if (entryPatterns.length > 0) return entryPatterns; - return toEntryPatterns(ENTRY_FILE_PATTERNS, cwd, configFilePath, config); +const findPlaywrightCTDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, config } = options; + + const localConfig: PlaywrightTestConfig | undefined = await load(configFilePath); + + if (localConfig) { + const projects = localConfig.projects ? [localConfig, ...localConfig.projects] : [localConfig]; + const patterns = projects.flatMap(config => toEntryPatterns(config.testMatch, cwd, configFilePath, config)); + if (patterns.length > 0) return patterns; + } + + return (config?.entry ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); }; export const findDependencies = timerify(findPlaywrightCTDependencies); diff --git a/src/plugins/playwright/index.ts b/src/plugins/playwright/index.ts index 3de6c8ef9..c6f87f17f 100644 --- a/src/plugins/playwright/index.ts +++ b/src/plugins/playwright/index.ts @@ -14,11 +14,11 @@ export const ENABLERS = ['@playwright/test']; export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDependency(dependencies, ENABLERS); +export const CONFIG_FILE_PATTERNS = ['playwright.config.{js,ts}']; + /** @public */ export const ENTRY_FILE_PATTERNS = ['**/*.@(spec|test).?(c|m)[jt]s?(x)']; -export const CONFIG_FILE_PATTERNS = ['playwright.config.{js,ts}']; - export const toEntryPatterns = ( testMatch: string | RegExp | Array | undefined, cwd: string, @@ -31,14 +31,18 @@ export const toEntryPatterns = ( return patterns.map(pattern => toEntryPattern(join(dir, pattern))); }; -const findPlaywrightDependencies: GenericPluginCallback = async (configFilePath, { cwd, config }) => { - const cfg: PlaywrightTestConfig | undefined = await load(configFilePath); - if (cfg) { - const projects = cfg.projects ? [cfg, ...cfg.projects] : [cfg]; +const findPlaywrightDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, config } = options; + + const localConfig: PlaywrightTestConfig | undefined = await load(configFilePath); + + if (localConfig) { + const projects = localConfig.projects ? [localConfig, ...localConfig.projects] : [localConfig]; const patterns = projects.flatMap(config => toEntryPatterns(config.testMatch, cwd, configFilePath, config)); if (patterns.length > 0) return patterns; } - return toEntryPatterns(config?.entry ?? ENTRY_FILE_PATTERNS, cwd, configFilePath, cfg ?? {}); + + return (config?.entry ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); }; export const findDependencies = timerify(findPlaywrightDependencies); diff --git a/src/plugins/postcss/index.ts b/src/plugins/postcss/index.ts index de54e70f2..953d38242 100644 --- a/src/plugins/postcss/index.ts +++ b/src/plugins/postcss/index.ts @@ -12,17 +12,19 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['postcss.config.js', 'postcss.config.json', 'package.json']; -const findPostCSSDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { +const findPostCSSDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction } = options; + if (isProduction) return []; - const config: PostCSSConfig = configFilePath.endsWith('package.json') + const localConfig: PostCSSConfig | undefined = configFilePath.endsWith('package.json') ? manifest?.postcss : await load(configFilePath); - if (!config) return []; + if (!localConfig) return []; - return config.plugins - ? (Array.isArray(config.plugins) ? config.plugins : Object.keys(config.plugins)).flatMap(plugin => { + return localConfig.plugins + ? (Array.isArray(localConfig.plugins) ? localConfig.plugins : Object.keys(localConfig.plugins)).flatMap(plugin => { if (typeof plugin === 'string') return plugin; if (Array.isArray(plugin) && typeof plugin[0] === 'string') return plugin[0]; return []; diff --git a/src/plugins/prettier/index.ts b/src/plugins/prettier/index.ts index 5bc40930e..dbf6a5b62 100644 --- a/src/plugins/prettier/index.ts +++ b/src/plugins/prettier/index.ts @@ -1,21 +1,10 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; +import type { PrettierConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; // https://prettier.io/docs/en/configuration.html -type PrettierConfig = { - plugins?: ( - | string - | { - parsers?: Record; - printers?: Record; - languages?: unknown[]; - options?: Record; - } - )[]; -}; - export const NAME = 'Prettier'; /** @public */ @@ -34,12 +23,12 @@ export const CONFIG_FILE_PATTERNS = [ const findPrettierDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { if (isProduction) return []; - const config: PrettierConfig = configFilePath.endsWith('package.json') + const localConfig: PrettierConfig | undefined = configFilePath.endsWith('package.json') ? manifest.prettier : await load(configFilePath); - return config && Array.isArray(config.plugins) - ? config.plugins.filter((plugin): plugin is string => typeof plugin === 'string') + return localConfig && Array.isArray(localConfig.plugins) + ? localConfig.plugins.filter((plugin): plugin is string => typeof plugin === 'string') : []; }; diff --git a/src/plugins/prettier/types.ts b/src/plugins/prettier/types.ts new file mode 100644 index 000000000..3d6dba7e5 --- /dev/null +++ b/src/plugins/prettier/types.ts @@ -0,0 +1,11 @@ +export type PrettierConfig = { + plugins?: ( + | string + | { + parsers?: Record; + printers?: Record; + languages?: unknown[]; + options?: Record; + } + )[]; +}; diff --git a/src/plugins/release-it/index.ts b/src/plugins/release-it/index.ts index 86e8ce41c..713ea8ab1 100644 --- a/src/plugins/release-it/index.ts +++ b/src/plugins/release-it/index.ts @@ -22,22 +22,24 @@ export const CONFIG_FILE_PATTERNS = [ 'package.json', ]; -const findReleaseItDependencies: GenericPluginCallback = async (configFilePath, { cwd, manifest, isProduction }) => { +const findReleaseItDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { cwd, manifest, isProduction } = options; + if (isProduction) return []; - const config: ReleaseItConfig = configFilePath.endsWith('package.json') + const localConfig: ReleaseItConfig | undefined = configFilePath.endsWith('package.json') ? manifest[PACKAGE_JSON_PATH] : await load(configFilePath); - if (!config) return []; + if (!localConfig) return []; - const plugins = config.plugins ? Object.keys(config.plugins) : []; - const scripts = config.hooks ? Object.values(config.hooks).flat() : []; - if (typeof config.github?.releaseNotes === 'string') { - scripts.push(config.github.releaseNotes); + const plugins = localConfig.plugins ? Object.keys(localConfig.plugins) : []; + const scripts = localConfig.hooks ? Object.values(localConfig.hooks).flat() : []; + if (typeof localConfig.github?.releaseNotes === 'string') { + scripts.push(localConfig.github.releaseNotes); } - if (typeof config.gitlab?.releaseNotes === 'string') { - scripts.push(config.gitlab.releaseNotes); + if (typeof localConfig.gitlab?.releaseNotes === 'string') { + scripts.push(localConfig.gitlab.releaseNotes); } const dependencies = _getDependenciesFromScripts(scripts, { cwd, manifest }); diff --git a/src/plugins/remark/index.ts b/src/plugins/remark/index.ts index ae4e24f6d..f87af1eed 100644 --- a/src/plugins/remark/index.ts +++ b/src/plugins/remark/index.ts @@ -25,17 +25,19 @@ export const CONFIG_FILE_PATTERNS = [ '.remarkrc.{yml,yaml}', ]; -const findRemarkDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { +const findRemarkDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction } = options; + if (isProduction) return []; - const config: RemarkConfig = configFilePath.endsWith('package.json') + const localConfig: RemarkConfig | undefined = configFilePath.endsWith('package.json') ? manifest[PACKAGE_JSON_PATH] : await load(configFilePath); - if (!config) return []; + if (!localConfig) return []; - const plugins = config.plugins?.map(plugin => `remark-${plugin}`) ?? []; - return [...plugins]; + const plugins = localConfig.plugins?.map(plugin => `remark-${plugin}`) ?? []; + return plugins; }; export const findDependencies = timerify(findRemarkDependencies); diff --git a/src/plugins/remix/index.ts b/src/plugins/remix/index.ts index 9266150be..4b42449ab 100644 --- a/src/plugins/remix/index.ts +++ b/src/plugins/remix/index.ts @@ -24,11 +24,7 @@ export const PRODUCTION_ENTRY_FILE_PATTERNS = [ ]; const findRemixDependencies: GenericPluginCallback = async () => { - const entryPatterns = [ - ...ENTRY_FILE_PATTERNS.map(toEntryPattern), - ...PRODUCTION_ENTRY_FILE_PATTERNS.map(toProductionEntryPattern), - ]; - return entryPatterns; + return [...ENTRY_FILE_PATTERNS.map(toEntryPattern), ...PRODUCTION_ENTRY_FILE_PATTERNS.map(toProductionEntryPattern)]; }; export const findDependencies = timerify(findRemixDependencies); diff --git a/src/plugins/rollup/README.md b/src/plugins/rollup/README.md index a84f4b9a2..3a7eaba77 100644 --- a/src/plugins/rollup/README.md +++ b/src/plugins/rollup/README.md @@ -12,7 +12,7 @@ or `devDependencies`: ```json { "rollup": { - "entry": ["rollup.config.{js,mjs,ts}"] + "entry": ["rollup.config.{js,cjs,mjs,ts}"] } } ``` diff --git a/src/plugins/rollup/index.ts b/src/plugins/rollup/index.ts index 0201ee055..6a920fc4d 100644 --- a/src/plugins/rollup/index.ts +++ b/src/plugins/rollup/index.ts @@ -13,7 +13,7 @@ export const ENABLERS = ['rollup']; export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDependency(dependencies, ENABLERS); /** @public */ -export const ENTRY_FILE_PATTERNS = ['rollup.config.{js,mjs,ts}']; +export const ENTRY_FILE_PATTERNS = ['rollup.config.{js,cjs,mjs,ts}']; const findRollupDependencies: GenericPluginCallback = async () => { const entryPatterns = ENTRY_FILE_PATTERNS.map(toEntryPattern); diff --git a/src/plugins/semantic-release/index.ts b/src/plugins/semantic-release/index.ts index 72761e958..e861c5ab1 100644 --- a/src/plugins/semantic-release/index.ts +++ b/src/plugins/semantic-release/index.ts @@ -1,6 +1,6 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; -import type { PluginConfig } from './types.js'; +import type { SemanticReleaseConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; // https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration-file @@ -21,14 +21,17 @@ export const CONFIG_FILE_PATTERNS = [ 'package.json', ]; -const findSemanticReleaseDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { +const findSemanticReleaseDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction } = options; + if (isProduction) return []; - const config: PluginConfig = configFilePath.endsWith('package.json') + const localConfig: SemanticReleaseConfig | undefined = configFilePath.endsWith('package.json') ? manifest[PACKAGE_JSON_PATH] : await load(configFilePath); - const plugins = config?.plugins ?? []; - return plugins.map(plugin => (Array.isArray(plugin) ? plugin[0] : plugin)); + + const plugins = (localConfig?.plugins ?? []).map(plugin => (Array.isArray(plugin) ? plugin[0] : plugin)); + return plugins; }; export const findDependencies = timerify(findSemanticReleaseDependencies); diff --git a/src/plugins/semantic-release/types.ts b/src/plugins/semantic-release/types.ts index b8dc75c9a..1b20dabfc 100644 --- a/src/plugins/semantic-release/types.ts +++ b/src/plugins/semantic-release/types.ts @@ -1,3 +1,3 @@ -export type PluginConfig = { +export type SemanticReleaseConfig = { plugins?: (string | [string, Record])[]; }; diff --git a/src/plugins/storybook/index.ts b/src/plugins/storybook/index.ts index 712b73858..f31552e0c 100644 --- a/src/plugins/storybook/index.ts +++ b/src/plugins/storybook/index.ts @@ -24,24 +24,26 @@ export const ENTRY_FILE_PATTERNS = ['.storybook/{manager,preview}.{js,jsx,ts,tsx export const PROJECT_FILE_PATTERNS = ['.storybook/**/*.{js,jsx,ts,tsx}']; -const findStorybookDependencies: GenericPluginCallback = async (configFilePath, { isProduction, config }) => { - const cfg: StorybookConfig = await load(configFilePath); +const findStorybookDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { isProduction, cwd, config } = options; - const stories = (typeof cfg.stories === 'function' ? await cfg.stories(STORIES_FILE_PATTERNS) : cfg.stories)?.map( - pattern => relative(join(dirname(configFilePath), pattern)) - ); - const cfgPatterns = [...(config?.entry ?? []), ...(stories ?? [])]; - const entryPatterns = (cfgPatterns.length > 0 ? cfgPatterns : ENTRY_FILE_PATTERNS).map(toEntryPattern); + const localConfig: StorybookConfig | undefined = await load(configFilePath); - if (isProduction) return entryPatterns; + const stories = + typeof localConfig?.stories === 'function' + ? await localConfig.stories(STORIES_FILE_PATTERNS) + : localConfig?.stories; + const relativePatterns = stories?.map(pattern => relative(cwd, join(dirname(configFilePath), pattern))); + const patterns = [...(config?.entry ?? []), ...(relativePatterns ?? [])]; + const entryPatterns = (patterns.length > 0 ? patterns : ENTRY_FILE_PATTERNS).map(toEntryPattern); - if (!cfg) return []; + if (!localConfig || isProduction) return entryPatterns; - const addons = cfg.addons?.map(addon => (typeof addon === 'string' ? addon : addon.name)) ?? []; - const builder = cfg?.core?.builder; + const addons = localConfig.addons?.map(addon => (typeof addon === 'string' ? addon : addon.name)) ?? []; + const builder = localConfig?.core?.builder; const builderPackages = builder && /webpack/.test(builder) ? [`@storybook/builder-${builder}`, `@storybook/manager-${builder}`] : []; - const frameworks = cfg.framework?.name ? [cfg.framework.name] : []; + const frameworks = localConfig.framework?.name ? [localConfig.framework.name] : []; return [...entryPatterns, ...addons, ...builderPackages, ...frameworks]; }; diff --git a/src/plugins/stryker/index.ts b/src/plugins/stryker/index.ts index b23eec56e..e9d954efa 100644 --- a/src/plugins/stryker/index.ts +++ b/src/plugins/stryker/index.ts @@ -14,16 +14,21 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['?(.)stryker.{conf,config}.{js,mjs,cjs,json}']; -const findStrykerDependencies: GenericPluginCallback = async (configFilePath, { isProduction }) => { +const findStrykerDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { isProduction } = options; + if (isProduction) return []; - const config: StrykerConfig = await load(configFilePath); + const localConfig: StrykerConfig | undefined = await load(configFilePath); + + if (!localConfig) return []; - if (!config) return []; + const runners = localConfig.testRunner ? [`@stryker-mutator/${localConfig.testRunner}-runner`] : []; + const checkers = localConfig.checkers + ? localConfig.checkers.map(checker => `@stryker-mutator/${checker}-checker`) + : []; + const plugins = localConfig.plugins ?? []; - const runners = config.testRunner ? [`@stryker-mutator/${config.testRunner}-runner`] : []; - const checkers = config.checkers ? config.checkers.map(checker => `@stryker-mutator/${checker}-checker`) : []; - const plugins = config.plugins ?? []; return [...runners, ...checkers, ...plugins]; }; diff --git a/src/plugins/stylelint/index.ts b/src/plugins/stylelint/index.ts index f8e08bce8..5d2872849 100644 --- a/src/plugins/stylelint/index.ts +++ b/src/plugins/stylelint/index.ts @@ -19,17 +19,19 @@ export const CONFIG_FILE_PATTERNS = [ 'stylelint.config.{cjs,mjs,js}', ]; -const findPluginDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { +const findPluginDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction } = options; + if (isProduction) return []; - const config: PluginConfig = configFilePath.endsWith('package.json') + const localConfig: PluginConfig | undefined = configFilePath.endsWith('package.json') ? manifest.stylelint : await load(configFilePath); - if (!config) return []; + if (!localConfig) return []; - const extend = config.extends ? [config.extends].flat().filter(extend => !isInternal(extend)) : []; - const plugins = config.plugins ? [config.plugins].flat().filter(plugin => !isInternal(plugin)) : []; + const extend = localConfig.extends ? [localConfig.extends].flat().filter(extend => !isInternal(extend)) : []; + const plugins = localConfig.plugins ? [localConfig.plugins].flat().filter(plugin => !isInternal(plugin)) : []; return [...extend, ...plugins]; }; diff --git a/src/plugins/typedoc/index.ts b/src/plugins/typedoc/index.ts index c58b4a79a..e231937c3 100644 --- a/src/plugins/typedoc/index.ts +++ b/src/plugins/typedoc/index.ts @@ -1,6 +1,6 @@ import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; -import type { PluginConfig } from './types.js'; +import type { TypeDocConfig } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; // https://typedoc.org/guides/overview/ @@ -23,15 +23,18 @@ export const CONFIG_FILE_PATTERNS = [ 'tsconfig.json', ]; -const findTypeDocDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { +const findTypeDocDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction } = options; + if (isProduction) return []; - const config: PluginConfig = configFilePath.endsWith('package.json') + const localConfig: TypeDocConfig | undefined = configFilePath.endsWith('package.json') ? manifest[PACKAGE_JSON_PATH] : configFilePath.endsWith('tsconfig.json') ? (await load(configFilePath)).typedocOptions : await load(configFilePath); - return config?.plugin ?? []; + + return localConfig?.plugin ?? []; }; export const findDependencies = timerify(findTypeDocDependencies); diff --git a/src/plugins/typedoc/types.ts b/src/plugins/typedoc/types.ts index 3e5fd7af6..3f867278a 100644 --- a/src/plugins/typedoc/types.ts +++ b/src/plugins/typedoc/types.ts @@ -1,3 +1,3 @@ -export type PluginConfig = { +export type TypeDocConfig = { plugin?: string[]; }; diff --git a/src/plugins/typescript/index.ts b/src/plugins/typescript/index.ts index aef3b1cf2..9217c0828 100644 --- a/src/plugins/typescript/index.ts +++ b/src/plugins/typescript/index.ts @@ -18,35 +18,41 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['tsconfig.json', 'tsconfig.*.json']; const resolveExtensibleConfig = async (configFilePath: string) => { - const config: TsConfigJson = await load(configFilePath); - config.extends = config.extends ? [config.extends].flat() : []; - if (config?.extends) { - for (const extend of [config.extends].flat()) { + const localConfig: TsConfigJson | undefined = await load(configFilePath); + + if (!localConfig) return; + + localConfig.extends = localConfig.extends ? [localConfig.extends].flat() : []; + if (localConfig?.extends) { + for (const extend of [localConfig.extends].flat()) { if (isInternal(extend)) { const presetConfigPath = toAbsolute(extend, dirname(configFilePath)); const presetConfig = await resolveExtensibleConfig(presetConfigPath); - config.extends.push(...(presetConfig.extends ? [presetConfig.extends].flat() : [])); + localConfig.extends.push(...(presetConfig?.extends ? [presetConfig.extends].flat() : [])); } } } - return config; + return localConfig; }; -export const findTypeScriptDependencies: GenericPluginCallback = async (configFilePath, { isProduction }) => { +export const findTypeScriptDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { isProduction } = options; + if (isProduction) return []; const { compilerOptions } = await loadTSConfig(configFilePath); - const config: TsConfigJson = await resolveExtensibleConfig(configFilePath); // Dual loader to get external `extends` dependencies + const localConfig: TsConfigJson | undefined = await resolveExtensibleConfig(configFilePath); // Dual loader to get external `extends` dependencies - if (!compilerOptions || !config) return []; + if (!compilerOptions || !localConfig) return []; - const extend = config.extends ? [config.extends].flat().filter(extend => !isInternal(extend)) : []; + const extend = localConfig.extends ? [localConfig.extends].flat().filter(extend => !isInternal(extend)) : []; const types = compilerOptions.types ?? []; const plugins = Array.isArray(compilerOptions?.plugins) ? compilerOptions.plugins.map(plugin => (typeof plugin === 'object' && 'name' in plugin ? plugin.name : '')) : []; const importHelpers = compilerOptions?.importHelpers ? ['tslib'] : []; const jsx = compilerOptions?.jsxImportSource ? [compilerOptions.jsxImportSource] : []; + return compact([...extend, ...types, ...plugins, ...importHelpers, ...jsx]); }; diff --git a/src/plugins/vite/index.ts b/src/plugins/vite/index.ts index 56e11c2c6..4da2242c5 100644 --- a/src/plugins/vite/index.ts +++ b/src/plugins/vite/index.ts @@ -16,8 +16,11 @@ export const isEnabled: IsPluginEnabledCallback = ({ dependencies }) => hasDepen export const CONFIG_FILE_PATTERNS = ['vite.config.{js,ts}']; const findViteDependencies: GenericPluginCallback = async (configFilePath, options) => { - const config: ViteConfig = await load(configFilePath); - return findVitestDeps(config, options); + const localConfig: ViteConfig | undefined = await load(configFilePath); + + if (!localConfig) return []; + + return findVitestDeps(localConfig, options); }; export const findDependencies = timerify(findViteDependencies); diff --git a/src/plugins/vitest/index.ts b/src/plugins/vitest/index.ts index ad1b1f387..aa3c7e8f4 100644 --- a/src/plugins/vitest/index.ts +++ b/src/plugins/vitest/index.ts @@ -24,18 +24,17 @@ export const CONFIG_FILE_PATTERNS = ['vitest.config.ts', 'vitest.{workspace,proj /** @public */ export const ENTRY_FILE_PATTERNS = ['**/*.{test,spec}.?(c|m)[jt]s?(x)']; -export const findVitestDeps = (config: VitestConfigOrFn, options: GenericPluginCallbackOptions) => { +export const findVitestDeps = (localConfig: VitestConfigOrFn, options: GenericPluginCallbackOptions) => { const { isProduction } = options; - if (!config) return []; + localConfig = typeof localConfig === 'function' ? localConfig() : localConfig; - config = typeof config === 'function' ? config() : config; + if (!localConfig || !localConfig.test) return []; - if (!config.test) return []; - - const testConfig = config.test; + const testConfig = localConfig.test; const entryPatterns = (options.config?.entry ?? testConfig.include ?? ENTRY_FILE_PATTERNS).map(toEntryPattern); + if (isProduction) return entryPatterns; const environments = testConfig.environment ? [getEnvPackageName(testConfig.environment)] : []; @@ -47,8 +46,13 @@ export const findVitestDeps = (config: VitestConfigOrFn, options: GenericPluginC }; const findVitestDependencies: GenericPluginCallback = async (configFilePath, options) => { - const config: VitestConfigOrFn | VitestWorkspaceConfig = await load(configFilePath); - return compact([config].flat().flatMap(cfg => (!cfg || typeof cfg === 'string' ? [] : findVitestDeps(cfg, options)))); + const localConfig: VitestConfigOrFn | VitestWorkspaceConfig | undefined = await load(configFilePath); + + return compact( + [localConfig] + .flat() + .flatMap(config => (!config || typeof config === 'string' ? [] : findVitestDeps(config, options))) + ); }; export const findDependencies = timerify(findVitestDependencies); diff --git a/src/plugins/webpack/index.ts b/src/plugins/webpack/index.ts index 5754e0b4f..c7619fc44 100644 --- a/src/plugins/webpack/index.ts +++ b/src/plugins/webpack/index.ts @@ -1,7 +1,8 @@ import { compact } from '../../util/array.js'; -import { join } from '../../util/path.js'; +import { join, relative } from '../../util/path.js'; import { timerify } from '../../util/Performance.js'; import { hasDependency, load } from '../../util/plugin.js'; +import { toEntryPattern, toProductionEntryPattern } from '../../util/protocols.js'; import { getDependenciesFromConfig } from '../babel/index.js'; import type { WebpackConfig, Env, Argv } from './types.js'; import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js'; @@ -53,27 +54,31 @@ const resolveUseItem = (use: RuleSetUseItem) => { return []; }; -const findWebpackDependencies: GenericPluginCallback = async (configFilePath, { manifest, isProduction }) => { - if (isProduction) return []; +const findWebpackDependencies: GenericPluginCallback = async (configFilePath, options) => { + const { manifest, isProduction, cwd } = options; - const config: WebpackConfig = await load(configFilePath); + const localConfig: WebpackConfig | undefined = await load(configFilePath); - if (!config) return []; + if (!localConfig) return []; // Projects may use a single config function for both development and production modes, so resolve it twice // https://webpack.js.org/configuration/configuration-types/#exporting-a-function - const passes = typeof config === 'function' ? [false, true] : [false]; + const passes = typeof localConfig === 'function' ? [false, true] : [false]; - const dependencies = passes.flatMap(isProduction => { + const dependencies = new Set(); + const entryPatterns = new Set(); + + for (const isProduction of passes) { const env: Env = { production: isProduction }; const argv: Argv = { mode: isProduction ? 'production' : 'development' }; - const resolvedConfig = typeof config === 'function' ? config(env, argv) : config; + const resolvedConfig = typeof localConfig === 'function' ? await localConfig(env, argv) : localConfig; + + for (const options of [resolvedConfig].flat()) { + const entries = []; - return [resolvedConfig].flat().flatMap(options => { - const dependencies = (options.module?.rules?.flatMap(resolveRuleSetDependencies) ?? []).map(loader => - loader.replace(/\?.*/, '') - ); - const entries: string[] = []; + for (const loader of options.module?.rules?.flatMap(resolveRuleSetDependencies) ?? []) { + dependencies.add(loader.replace(/\?.*/, '')); + } if (typeof options.entry === 'string') entries.push(options.entry); else if (Array.isArray(options.entry)) entries.push(...options.entry); @@ -86,15 +91,21 @@ const findWebpackDependencies: GenericPluginCallback = async (configFilePath, { }); } - return [...dependencies, ...entries.map(entry => (options.context ? join(options.context, entry) : entry))]; - }); - }); + entries.forEach(entry => { + const item = relative(cwd, join(options.context ? options.context : cwd, entry)); + const value = options.mode === 'development' ? toEntryPattern(item) : toProductionEntryPattern(item); + entryPatterns.add(value); + }); + } + } + + if (isProduction) return [...entryPatterns]; const scripts = Object.values(manifest.scripts ?? {}); const webpackCLI = scripts.some(script => script?.includes('webpack ')) ? ['webpack-cli'] : []; const webpackDevServer = scripts.some(script => script?.includes('webpack serve')) ? ['webpack-dev-server'] : []; - return compact([...dependencies, ...webpackCLI, ...webpackDevServer]); + return compact([...entryPatterns, ...dependencies, ...webpackCLI, ...webpackDevServer]); }; export const findDependencies = timerify(findWebpackDependencies); diff --git a/src/plugins/webpack/types.ts b/src/plugins/webpack/types.ts index d50e8b354..e27aad657 100644 --- a/src/plugins/webpack/types.ts +++ b/src/plugins/webpack/types.ts @@ -4,4 +4,9 @@ type Mode = 'none' | 'development' | 'production'; export type Env = { production: boolean }; export type Argv = { mode: Mode }; -export type WebpackConfig = Configuration | ((env: Env, argv: Argv) => Configuration); +type Configurations = Configuration | Configuration[]; + +export type WebpackConfig = + | Configurations + | ((env: Env, argv: Argv) => Configurations) + | (() => Promise); diff --git a/src/types/config.ts b/src/types/config.ts index e42c20828..dead48647 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -18,7 +18,7 @@ export type EnsuredPluginConfiguration = { project: NormalizedGlob | null; }; -export type PluginConfiguration = EnsuredPluginConfiguration | boolean; +type PluginConfiguration = EnsuredPluginConfiguration | boolean; export type PluginsConfiguration = Record; diff --git a/src/types/plugins.ts b/src/types/plugins.ts index ce0239a1d..cd60cba45 100644 --- a/src/types/plugins.ts +++ b/src/types/plugins.ts @@ -15,7 +15,7 @@ export type IsPluginEnabledCallback = (options: IsPluginEnabledCallbackOptions) export type GenericPluginCallbackOptions = { cwd: string; manifest: PackageJsonWithPlugins; - config?: EnsuredPluginConfiguration; + config: EnsuredPluginConfiguration; isProduction: boolean; }; diff --git a/src/typescript/SourceFileManager.ts b/src/typescript/SourceFileManager.ts index 73b5b6036..0a269fdea 100644 --- a/src/typescript/SourceFileManager.ts +++ b/src/typescript/SourceFileManager.ts @@ -25,13 +25,13 @@ export class SourceFileManager { if (this.sourceFileCache.has(filePath)) return this.sourceFileCache.get(filePath); const contents = ts.sys.readFile(filePath); if (typeof contents !== 'string') { - if (isInternal(filePath)) debugLog(`Unable to read ${filePath}`); + if (isInternal(filePath)) debugLog('*', `Unable to read ${filePath}`); return this.createSourceFile(filePath, ''); } const ext = extname(filePath); const compiler = this.syncCompilers?.get(ext); const compiled = compiler ? compiler(contents, filePath) : contents; - if (compiler) debugLog(`Compiled ${filePath}`); + if (compiler) debugLog('*', `Compiled ${filePath}`); return this.createSourceFile(filePath, compiled); } @@ -51,7 +51,7 @@ export class SourceFileManager { const compiler = this.asyncCompilers?.get(ext); if (compiler) { const compiled = await compiler(contents, filePath); - debugLog(`Compiled ${filePath}`); + debugLog('*', `Compiled ${filePath}`); this.createSourceFile(filePath, compiled); } } diff --git a/src/util/debug.ts b/src/util/debug.ts index 2dba5a352..364702587 100644 --- a/src/util/debug.ts +++ b/src/util/debug.ts @@ -1,4 +1,5 @@ import util from 'node:util'; +import chalk from 'chalk'; import parsedArgValues from './cli-arguments.js'; const { debug, 'debug-file-filter': debugFileFilter } = parsedArgValues; @@ -8,6 +9,9 @@ const FILE_FILTER = debugFileFilter; const inspectOptions = { maxArrayLength: null, depth: null, colors: true }; +const ctx = (text: string | [string, string]) => + typeof text === 'string' ? chalk.yellow(`[${text}]`) : `${chalk.yellow(`[${text[0]}]`)} ${chalk.cyan(text[1])}`; + // Inspect arrays, otherwise Node [will, knip, ...n-100 more items] const logArray = (collection: string[]) => { if (FILE_FILTER) { @@ -19,20 +23,24 @@ const logArray = (collection: string[]) => { } }; -export const debugLog = (message: string) => { +export const debugLog = (context: string, message: string) => { if (!IS_ENABLED) return; - console.log(`[knip] ${message}`); + console.log(`${ctx(context)} ${message}`); }; -export const debugLogObject = (name: string, obj: unknown) => { +export const debugLogObject = (context: string, name: string, obj: unknown | (() => unknown)) => { if (!IS_ENABLED) return; - console.log(`[knip] ${name}`); - console.log(util.inspect(obj, inspectOptions)); + console.log(`${ctx(context)} ${name}`); + console.log(util.inspect(typeof obj === 'function' ? obj() : obj, inspectOptions)); }; -export const debugLogArray = (name: string, sourceFiles: string[] | Set) => { +export const debugLogArray = ( + context: string | [string, string], + message: string, + elements: string[] | Set +) => { if (!IS_ENABLED) return; - const collection = Array.from(sourceFiles); - console.debug(`[knip] ${name} (${collection.length})`); + const collection = Array.from(elements); + console.debug(`${ctx(context)} ${message} (${collection.length})`); logArray(collection); }; diff --git a/src/util/glob.ts b/src/util/glob.ts index 37b2d9419..22192d9c1 100644 --- a/src/util/glob.ts +++ b/src/util/glob.ts @@ -44,7 +44,7 @@ const glob = async ({ cwd, workingDir = cwd, patterns, ignore = [], gitignore = const ignorePatterns = compact([...ignore, ...GLOBAL_IGNORE_PATTERNS]); - debugLogObject(`Globbing (${relativePath || ROOT_WORKSPACE_NAME})`, { cwd, globPatterns, ignorePatterns }); + debugLogObject(relativePath || ROOT_WORKSPACE_NAME, `Glob options`, { cwd, globPatterns, ignorePatterns }); return globby(globPatterns, { cwd, diff --git a/src/util/path.ts b/src/util/path.ts index 210c9e243..8473efa37 100644 --- a/src/util/path.ts +++ b/src/util/path.ts @@ -16,8 +16,7 @@ export const cwd = toPosix(process.cwd()); export const resolve = (...paths: string[]) => paths.length === 1 ? path.posix.join(cwd, paths[0]) : path.posix.resolve(...paths); -export const relative = (from: string, to?: string) => - path.posix.relative(to ? toPosix(from) : cwd, toPosix(to ?? from)); +export const relative = (from: string, to?: string) => toPosix(path.relative(to ? from : cwd, to ?? from)); export const isInNodeModules = (filePath: string) => filePath.includes('node_modules'); diff --git a/src/util/plugin.ts b/src/util/plugin.ts index 948f467cd..106cbddfc 100644 --- a/src/util/plugin.ts +++ b/src/util/plugin.ts @@ -22,7 +22,13 @@ export const normalizePluginConfig = (pluginConfig: RawPluginConfiguration) => { return pluginConfig; } else { const isObject = typeof pluginConfig !== 'string' && !Array.isArray(pluginConfig); - const config = isObject ? arrayify(pluginConfig.config) : pluginConfig ? arrayify(pluginConfig) : null; + const config = isObject + ? 'config' in pluginConfig + ? arrayify(pluginConfig.config) + : null + : pluginConfig + ? arrayify(pluginConfig) + : null; const entry = isObject && 'entry' in pluginConfig ? arrayify(pluginConfig.entry) : null; const project = isObject && 'project' in pluginConfig ? arrayify(pluginConfig.project) : entry; return { config, entry, project }; diff --git a/src/util/require.ts b/src/util/require.ts index 2e76f62eb..393f6f48d 100644 --- a/src/util/require.ts +++ b/src/util/require.ts @@ -15,7 +15,7 @@ const tryResolve = (specifier: string, from: string) => { try { return resolve(specifier); } catch { - debugLog(`Unable to resolve ${specifier} (from ${from})`); + debugLog('*', `Unable to resolve ${specifier} (from ${from})`); } }; diff --git a/src/version.ts b/src/version.ts index fce3e2d2c..fc903e54d 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '2.33.3'; +export const version = '2.33.4'; diff --git a/test/helpers/index.ts b/test/helpers/index.ts index 87d73ab9e..b30e4739f 100644 --- a/test/helpers/index.ts +++ b/test/helpers/index.ts @@ -3,3 +3,5 @@ import { _require } from '../../src/util/require.js'; import type { PackageJson } from '@npmcli/package-json'; export const getManifest = (cwd: string): PackageJson => _require(join(cwd, 'package.json')); + +export const pluginConfig = { config: null, entry: null, project: null }; diff --git a/test/plugins/_template.test.ts b/test/plugins/_template.test.ts index b7b443bc0..1e6ffffef 100644 --- a/test/plugins/_template.test.ts +++ b/test/plugins/_template.test.ts @@ -2,13 +2,13 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import * as __PLUGIN_CAMELCASED_NAME__ from '../../src/plugins/_template/index.js'; import { resolve, join } from '../../src/util/path.js'; -import { getManifest } from '../helpers/index.js'; +import { getManifest, pluginConfig as config } from '../helpers/index.js'; const cwd = resolve('fixtures/plugins/_template'); const manifest = getManifest(cwd); test('Find dependencies in _template configuration (json)', async () => { const configFilePath = join(cwd, 'package.json'); - const dependencies = await __PLUGIN_CAMELCASED_NAME__.findDependencies(configFilePath, { manifest }); + const dependencies = await __PLUGIN_CAMELCASED_NAME__.findDependencies(configFilePath, { manifest, config }); assert.deepEqual(dependencies, []); }); diff --git a/test/plugins/ava.test.ts b/test/plugins/ava.test.ts index ae40f3633..397ab5aab 100644 --- a/test/plugins/ava.test.ts +++ b/test/plugins/ava.test.ts @@ -2,19 +2,19 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import * as ava from '../../src/plugins/ava/index.js'; import { join, resolve } from '../../src/util/path.js'; -import { getManifest } from '../helpers/index.js'; +import { getManifest, pluginConfig as config } from '../helpers/index.js'; const cwd = resolve('fixtures/plugins/ava'); const manifest = getManifest(cwd); test('Find dependencies in ava configuration (package.json)', async () => { const configFilePath = join(cwd, 'package.json'); - const dependencies = await ava.findDependencies(configFilePath, { cwd, manifest }); + const dependencies = await ava.findDependencies(configFilePath, { cwd, manifest, config }); assert.deepEqual(dependencies, ['entry:**/*.test.*', 'ts-node']); }); test('Find dependencies in ava configuration (ava.config.mjs)', async () => { const configFilePath = join(cwd, 'ava.config.mjs'); - const dependencies = await ava.findDependencies(configFilePath, { cwd, manifest }); + const dependencies = await ava.findDependencies(configFilePath, { cwd, manifest, config }); assert.deepEqual(dependencies, ['entry:**/*.test.*', 'tsconfig-paths']); }); diff --git a/test/plugins/mocha.test.ts b/test/plugins/mocha.test.ts index b70c884ea..043db353a 100644 --- a/test/plugins/mocha.test.ts +++ b/test/plugins/mocha.test.ts @@ -2,25 +2,25 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import * as mocha from '../../src/plugins/mocha/index.js'; import { resolve, join } from '../../src/util/path.js'; -import { getManifest } from '../helpers/index.js'; +import { getManifest, pluginConfig as config } from '../helpers/index.js'; const cwd = resolve('fixtures/plugins/mocha'); const manifest = getManifest(cwd); test('Find dependencies in Mocha configuration (.mocharc.json)', async () => { const configFilePath = join(cwd, '.mocharc.json'); - const dependencies = await mocha.findDependencies(configFilePath, { manifest }); + const dependencies = await mocha.findDependencies(configFilePath, { manifest, config }); assert.deepEqual(dependencies, ['ts-node/register', 'entry:**/test/*.{js,cjs,mjs}']); }); test('Find dependencies in Mocha configuration (package.json)', async () => { const configFilePath = join(cwd, 'package.json'); - const dependencies = await mocha.findDependencies(configFilePath, { manifest }); + const dependencies = await mocha.findDependencies(configFilePath, { manifest, config }); assert.deepEqual(dependencies, ['ts-node/register', 'entry:**/test/*.{js,cjs,mjs}']); }); test('Find dependencies in Mocha configuration (.mocharc.yml)', async () => { const configFilePath = join(cwd, '.mocharc.yml'); - const dependencies = await mocha.findDependencies(configFilePath, { manifest }); + const dependencies = await mocha.findDependencies(configFilePath, { manifest, config }); assert.deepEqual(dependencies, ['ts-node/register', 'entry:**/test/*.{js,cjs,mjs}']); }); diff --git a/test/plugins/vitest.test.ts b/test/plugins/vitest.test.ts index 450893451..147d4fce8 100644 --- a/test/plugins/vitest.test.ts +++ b/test/plugins/vitest.test.ts @@ -5,14 +5,14 @@ import * as vitest from '../../src/plugins/vitest/index.js'; import { resolve, join } from '../../src/util/path.js'; import baseArguments from '../helpers/baseArguments.js'; import baseCounters from '../helpers/baseCounters.js'; -import { getManifest } from '../helpers/index.js'; +import { getManifest, pluginConfig as config } from '../helpers/index.js'; const cwd = resolve('fixtures/plugins/vitest'); const manifest = getManifest(cwd); test('Find dependencies in vitest configuration (vitest)', async () => { const configFilePath = join(cwd, 'vitest.config.ts'); - const dependencies = await vitest.findDependencies(configFilePath, { cwd, manifest }); + const dependencies = await vitest.findDependencies(configFilePath, { cwd, manifest, config }); assert.deepEqual(dependencies, [ 'entry:**/*.{test,spec}.?(c|m)[jt]s?(x)', 'happy-dom', @@ -24,13 +24,13 @@ test('Find dependencies in vitest configuration (vitest)', async () => { test('Find dependencies in vitest configuration without coverage providers (vitest)', async () => { const configFilePath = join(cwd, 'vitest-default-coverage.config'); - const dependencies = await vitest.findDependencies(configFilePath, { cwd, manifest }); + const dependencies = await vitest.findDependencies(configFilePath, { cwd, manifest, config }); assert.deepEqual(dependencies, ['entry:**/*.{test,spec}.?(c|m)[jt]s?(x)', 'jsdom', '@vitest/coverage-v8']); }); test('Find dependencies in vitest configuration (vite)', async () => { const configFilePath = join(cwd, 'vite.config.ts'); - const dependencies = await vitest.findDependencies(configFilePath, { cwd, manifest }); + const dependencies = await vitest.findDependencies(configFilePath, { cwd, manifest, config }); assert.deepEqual(dependencies, [ 'entry:**/*.{test,spec}.?(c|m)[jt]s?(x)', '@edge-runtime/vm', diff --git a/test/plugins/webpack.test.ts b/test/plugins/webpack.test.ts index 9593059d0..40d36ae34 100644 --- a/test/plugins/webpack.test.ts +++ b/test/plugins/webpack.test.ts @@ -16,6 +16,9 @@ test('Find dependencies in Webpack configuration (webpack.config.js)', async () const configFilePath = join(cwd, 'webpack.config.js'); const dependencies = await webpack.findDependencies(configFilePath, { cwd, manifest }); assert.deepEqual(dependencies, [ + 'entry:src/app.ts', + 'entry:src/vendor.ts', + 'production:src/entry.js', 'svg-url-loader', 'babel-loader', '@babel/preset-env', @@ -31,9 +34,6 @@ test('Find dependencies in Webpack configuration (webpack.config.js)', async () 'less-loader', 'svgo-loader', 'base64-inline-loader', - './src/app.ts', - './src/vendor.ts', - './src/entry.js', 'webpack-cli', 'webpack-dev-server', ]); diff --git a/test/workspaces-plugin-config.test.ts b/test/workspaces-plugin-config.test.ts index c799b069d..c8490a118 100644 --- a/test/workspaces-plugin-config.test.ts +++ b/test/workspaces-plugin-config.test.ts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import { main } from '../src/index.js'; -import { resolve } from '../src/util/path.js'; +import { join, resolve } from '../src/util/path.js'; import baseArguments from './helpers/baseArguments.js'; import baseCounters from './helpers/baseCounters.js'; @@ -15,7 +15,31 @@ test('Use root plugin config in workspaces', async () => { assert.deepEqual(counters, { ...baseCounters, - total: 10, - processed: 10, + total: 22, + processed: 22, + }); +}); + +test('Use root plugin config in workspaces (strict production)', async () => { + const { issues, counters } = await main({ + ...baseArguments, + cwd, + isProduction: true, + isStrict: true, + }); + + assert.deepEqual( + issues.files, + new Set([ + join(cwd, 'packages/frontend/components/component.js'), + join(cwd, 'packages/package1/components/component.js'), + ]) + ); + + assert.deepEqual(counters, { + ...baseCounters, + files: 2, + total: 5, + processed: 5, }); });