knip 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConfigurationChief.d.ts +14 -12
- package/dist/ConfigurationChief.js +37 -25
- package/dist/ConfigurationValidator.d.ts +56 -0
- package/dist/ConfigurationValidator.js +1 -0
- package/dist/DependencyDeputy.d.ts +16 -17
- package/dist/DependencyDeputy.js +40 -27
- package/dist/IssueFixer.js +1 -1
- package/dist/ProjectPrincipal.d.ts +1 -1
- package/dist/ProjectPrincipal.js +4 -4
- package/dist/WorkspaceWorker.d.ts +15 -23
- package/dist/WorkspaceWorker.js +31 -53
- package/dist/binaries/bash-parser.d.ts +2 -6
- package/dist/binaries/bash-parser.js +5 -5
- package/dist/binaries/index.js +2 -4
- package/dist/binaries/resolvers/bun.js +2 -3
- package/dist/binaries/resolvers/npx.js +4 -5
- package/dist/binaries/resolvers/pnpm.js +2 -3
- package/dist/binaries/resolvers/yarn.js +3 -4
- package/dist/binaries/types.d.ts +7 -11
- package/dist/compilers/index.d.ts +13 -3
- package/dist/compilers/index.js +3 -8
- package/dist/index.js +36 -20
- package/dist/manifest/helpers.d.ts +8 -2
- package/dist/manifest/helpers.js +14 -1
- package/dist/manifest/index.d.ts +3 -8
- package/dist/manifest/index.js +6 -21
- package/dist/plugins/ava/index.js +2 -6
- package/dist/plugins/eleventy/index.js +4 -4
- package/dist/plugins/eslint/helpers.d.ts +2 -2
- package/dist/plugins/github-actions/index.js +5 -13
- package/dist/plugins/husky/index.js +2 -6
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/lefthook/index.js +3 -3
- package/dist/plugins/lint-staged/index.js +1 -2
- package/dist/plugins/netlify/helpers.d.ts +2 -0
- package/dist/plugins/netlify/helpers.js +4 -0
- package/dist/plugins/netlify/index.d.ts +10 -0
- package/dist/plugins/netlify/index.js +38 -0
- package/dist/plugins/netlify/types.d.ts +11 -0
- package/dist/plugins/netlify/types.js +1 -0
- package/dist/plugins/nx/index.js +2 -2
- package/dist/plugins/release-it/index.js +2 -2
- package/dist/plugins/vitest/index.js +7 -8
- package/dist/plugins/wireit/index.js +2 -2
- package/dist/types/config.d.ts +0 -2
- package/dist/types/package-json.d.ts +3 -2
- package/dist/types/plugins.d.ts +11 -6
- package/dist/types/workspace.d.ts +11 -9
- package/dist/typescript/createHosts.js +2 -2
- package/dist/util/fs.d.ts +1 -0
- package/dist/util/fs.js +5 -0
- package/dist/util/loader.js +4 -1
- package/dist/util/modules.d.ts +1 -1
- package/dist/util/regex.d.ts +0 -1
- package/dist/util/regex.js +0 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
- package/schema.json +4 -0
package/dist/util/regex.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export const toRegexOrString = (value) => typeof value === 'string' && /[*+\\(|{^$]/.test(value) ? new RegExp(value) : value;
|
|
2
2
|
export const hasMatch = (haystack, needle) => haystack && haystack.some(n => (typeof n === 'string' ? n === needle : n.test(needle)));
|
|
3
3
|
export const hasMatchInSet = (haystack, needle) => haystack && (typeof needle === 'string' ? haystack.has(needle) : [...haystack].some(n => needle.test(n)));
|
|
4
|
-
export const hasMatchInArray = (haystack, needle) => typeof needle === 'string' ? haystack.includes(needle) : haystack.some(n => needle.test(n));
|
|
5
4
|
export const findKey = (map, key) => [...map.keys()].find(k => k instanceof RegExp && k.source === key.source);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.
|
|
1
|
+
export declare const version = "4.2.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.
|
|
1
|
+
export const version = '4.2.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
|
|
5
5
|
"homepage": "https://knip.dev",
|
|
6
6
|
"repository": {
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"picocolors": "1.0.0",
|
|
72
72
|
"picomatch": "3.0.1",
|
|
73
73
|
"pretty-ms": "8.0.0",
|
|
74
|
+
"smol-toml": "1.1.3",
|
|
74
75
|
"strip-json-comments": "5.0.1",
|
|
75
76
|
"summary": "2.1.0",
|
|
76
77
|
"zod": "3.22.4",
|
package/schema.json
CHANGED
|
@@ -358,6 +358,10 @@
|
|
|
358
358
|
"title": "Mocha plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/mocha/README.md)",
|
|
359
359
|
"$ref": "#/definitions/plugin"
|
|
360
360
|
},
|
|
361
|
+
"netlify": {
|
|
362
|
+
"title": "Netlify plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/netlify/README.md)",
|
|
363
|
+
"$ref": "#/definitions/plugin"
|
|
364
|
+
},
|
|
361
365
|
"next": {
|
|
362
366
|
"title": "Next.js plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/main/README.md)",
|
|
363
367
|
"$ref": "#/definitions/plugin"
|