knip 5.86.0 → 5.88.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 +18 -0
- package/dist/DependencyDeputy.js +11 -1
- package/dist/binaries/bash-parser.js +3 -3
- package/dist/binaries/resolvers/find.js +19 -0
- package/dist/binaries/{package-manager → resolvers}/index.d.ts +1 -0
- package/dist/binaries/{package-manager → resolvers}/index.js +2 -0
- package/dist/binaries/{package-manager → resolvers}/pnpm.js +1 -0
- package/dist/binaries/resolvers/yarn.d.ts +2 -0
- package/dist/compilers/index.d.ts +30 -0
- package/dist/graph/analyze.js +2 -0
- package/dist/graph/build.js +3 -1
- package/dist/plugins/babel/index.js +3 -0
- package/dist/plugins/changesets/index.js +8 -1
- package/dist/plugins/changesets/types.d.ts +1 -0
- package/dist/plugins/docusaurus/index.js +15 -0
- package/dist/plugins/docusaurus/types.d.ts +16 -0
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.js +6 -0
- package/dist/plugins/nuxt/index.js +6 -3
- package/dist/plugins/nx/index.js +10 -8
- package/dist/plugins/nx/types.d.ts +1 -0
- package/dist/plugins/openapi-ts/index.js +0 -9
- package/dist/plugins/oxfmt/index.d.ts +3 -0
- package/dist/plugins/oxfmt/index.js +16 -0
- package/dist/plugins/oxlint/index.js +1 -1
- package/dist/plugins/raycast/index.d.ts +3 -0
- package/dist/plugins/raycast/index.js +25 -0
- package/dist/plugins/raycast/types.d.ts +10 -0
- package/dist/plugins/sanity/index.d.ts +3 -0
- package/dist/plugins/sanity/index.js +12 -0
- package/dist/schema/configuration.d.ts +45 -0
- package/dist/schema/plugins.d.ts +15 -0
- package/dist/schema/plugins.js +3 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +3 -0
- package/dist/typescript/resolve-module-names.js +2 -2
- package/dist/util/Performance.d.ts +3 -5
- package/dist/util/Performance.js +35 -18
- package/dist/util/create-input-handler.js +2 -2
- package/dist/util/create-options.d.ts +30 -0
- package/dist/util/glob-core.js +34 -9
- package/dist/util/modules.d.ts +1 -1
- package/dist/util/modules.js +16 -6
- package/dist/util/path.js +1 -1
- package/dist/util/resolve.d.ts +2 -3
- package/dist/util/resolve.js +4 -3
- package/dist/util/watch.js +4 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/schema.json +8 -0
- package/dist/plugins/openapi-ts/types.d.ts +0 -8
- /package/dist/binaries/{package-manager → resolvers}/bun.d.ts +0 -0
- /package/dist/binaries/{package-manager → resolvers}/bun.js +0 -0
- /package/dist/binaries/{package-manager → resolvers}/bunx.d.ts +0 -0
- /package/dist/binaries/{package-manager → resolvers}/bunx.js +0 -0
- /package/dist/binaries/{package-manager/npm.d.ts → resolvers/find.d.ts} +0 -0
- /package/dist/binaries/{package-manager/npx.d.ts → resolvers/npm.d.ts} +0 -0
- /package/dist/binaries/{package-manager → resolvers}/npm.js +0 -0
- /package/dist/binaries/{package-manager/pnpm.d.ts → resolvers/npx.d.ts} +0 -0
- /package/dist/binaries/{package-manager → resolvers}/npx.js +0 -0
- /package/dist/binaries/{package-manager/yarn.d.ts → resolvers/pnpm.d.ts} +0 -0
- /package/dist/binaries/{package-manager → resolvers}/pnpx.d.ts +0 -0
- /package/dist/binaries/{package-manager → resolvers}/pnpx.js +0 -0
- /package/dist/binaries/{package-manager → resolvers}/yarn.js +0 -0
- /package/dist/plugins/{openapi-ts → raycast}/types.js +0 -0
package/dist/util/path.js
CHANGED
|
@@ -5,7 +5,7 @@ export const dirname = path.posix.dirname;
|
|
|
5
5
|
export const extname = path.posix.extname;
|
|
6
6
|
export const basename = path.posix.basename;
|
|
7
7
|
export const join = path.posix.join;
|
|
8
|
-
export const toPosix = (value) => value.split(path.sep).join(path.posix.sep);
|
|
8
|
+
export const toPosix = isWin ? (value) => value.split(path.sep).join(path.posix.sep) : (value) => value;
|
|
9
9
|
export const resolve = path.posix.resolve;
|
|
10
10
|
export const relative = (from, to) => {
|
|
11
11
|
if (to.startsWith(from)) {
|
package/dist/util/resolve.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare const createSyncModuleResolver: (extensions: string[]) => (specifier: string, basePath: string) => string | undefined;
|
|
2
|
-
export declare const
|
|
3
|
-
export
|
|
2
|
+
export declare const resolveModuleSync: (specifier: string, basePath: string) => string | undefined;
|
|
3
|
+
export { createSyncModuleResolver };
|
|
4
4
|
export declare const _resolveSync: (specifier: string, baseDir: string) => string | undefined;
|
|
5
|
-
export {};
|
package/dist/util/resolve.js
CHANGED
|
@@ -13,6 +13,7 @@ const createSyncModuleResolver = (extensions) => {
|
|
|
13
13
|
'.cjs': ['.cjs', '.cts'],
|
|
14
14
|
},
|
|
15
15
|
conditionNames: ['require', 'import', 'node', 'default'],
|
|
16
|
+
nodePath: false,
|
|
16
17
|
});
|
|
17
18
|
return function resolveSync(specifier, basePath) {
|
|
18
19
|
try {
|
|
@@ -23,13 +24,13 @@ const createSyncModuleResolver = (extensions) => {
|
|
|
23
24
|
catch (_error) { }
|
|
24
25
|
};
|
|
25
26
|
};
|
|
26
|
-
const resolveModuleSync = createSyncModuleResolver([...DEFAULT_EXTENSIONS, '.json', '.jsonc']);
|
|
27
|
-
export
|
|
28
|
-
export const _createSyncModuleResolver = extensions => timerify(createSyncModuleResolver(extensions), 'resolveModuleSync');
|
|
27
|
+
export const resolveModuleSync = createSyncModuleResolver([...DEFAULT_EXTENSIONS, '.json', '.jsonc']);
|
|
28
|
+
export { createSyncModuleResolver };
|
|
29
29
|
const createSyncResolver = (extensions) => {
|
|
30
30
|
const resolver = new ResolverFactory({
|
|
31
31
|
extensions,
|
|
32
32
|
conditionNames: ['require', 'import', 'node', 'default'],
|
|
33
|
+
nodePath: false,
|
|
33
34
|
});
|
|
34
35
|
return function resolveSync(specifier, baseDir) {
|
|
35
36
|
try {
|
package/dist/util/watch.js
CHANGED
|
@@ -30,9 +30,10 @@ export const getSessionHandler = async (options, { analyzedFiles, analyzeSourceF
|
|
|
30
30
|
continue;
|
|
31
31
|
switch (change.type) {
|
|
32
32
|
case 'added':
|
|
33
|
-
added.add(filePath);
|
|
34
33
|
principal.addProjectPath(filePath);
|
|
35
34
|
principal.deletedFiles.delete(filePath);
|
|
35
|
+
if (principal.projectPaths.has(filePath))
|
|
36
|
+
added.add(filePath);
|
|
36
37
|
debugLog(workspace.name, `Watcher: + ${relativePath}`);
|
|
37
38
|
break;
|
|
38
39
|
case 'deleted':
|
|
@@ -106,8 +107,9 @@ export const getSessionHandler = async (options, { analyzedFiles, analyzeSourceF
|
|
|
106
107
|
const workspace = chief.findWorkspaceByFilePath(filePath);
|
|
107
108
|
if (workspace) {
|
|
108
109
|
const principal = factory.getPrincipalByPackageName(workspace.pkgName);
|
|
109
|
-
if (principal)
|
|
110
|
+
if (principal && (principal.projectPaths.has(filePath) || graph.has(filePath))) {
|
|
110
111
|
analyzeSourceFile(filePath, principal);
|
|
112
|
+
}
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.
|
|
1
|
+
export declare const version = "5.88.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.
|
|
1
|
+
export const version = '5.88.0';
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -628,6 +628,10 @@
|
|
|
628
628
|
"title": "oxlint plugin configuration (https://knip.dev/reference/plugins/oxlint)",
|
|
629
629
|
"$ref": "#/definitions/plugin"
|
|
630
630
|
},
|
|
631
|
+
"oxfmt": {
|
|
632
|
+
"title": "oxfmt plugin configuration (https://knip.dev/reference/plugins/oxfmt)",
|
|
633
|
+
"$ref": "#/definitions/plugin"
|
|
634
|
+
},
|
|
631
635
|
"payload": {
|
|
632
636
|
"title": "payload plugin configuration (https://knip.dev/reference/plugins/payload)",
|
|
633
637
|
"$ref": "#/definitions/plugin"
|
|
@@ -720,6 +724,10 @@
|
|
|
720
724
|
"title": "rstest plugin configuration (https://knip.dev/reference/plugins/rstest)",
|
|
721
725
|
"$ref": "#/definitions/plugin"
|
|
722
726
|
},
|
|
727
|
+
"sanity": {
|
|
728
|
+
"title": "sanity plugin configuration (https://knip.dev/reference/plugins/sanity)",
|
|
729
|
+
"$ref": "#/definitions/plugin"
|
|
730
|
+
},
|
|
723
731
|
"semantic-release": {
|
|
724
732
|
"title": "semantic-release plugin configuration (https://knip.dev/reference/plugins/semantic-release)",
|
|
725
733
|
"$ref": "#/definitions/plugin"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|