knip 5.54.0 → 5.54.1
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.
|
@@ -65,7 +65,10 @@ export const resolveConfig = async (localConfig, options) => {
|
|
|
65
65
|
for (const [alias, value] of Object.entries(aliasOptions)) {
|
|
66
66
|
if (!value)
|
|
67
67
|
continue;
|
|
68
|
-
const prefixes = [value]
|
|
68
|
+
const prefixes = [value]
|
|
69
|
+
.flat()
|
|
70
|
+
.filter(value => typeof value === 'string')
|
|
71
|
+
.map(prefix => {
|
|
69
72
|
if (toPosix(prefix).startsWith(options.cwd))
|
|
70
73
|
return prefix;
|
|
71
74
|
return join(options.cwd, prefix);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const knipConfigurationSchema: z.ZodObject<
|
|
2
|
+
export declare const knipConfigurationSchema: z.ZodObject<{
|
|
3
3
|
$schema: z.ZodOptional<z.ZodString>;
|
|
4
4
|
rules: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"files">, z.ZodLiteral<"dependencies">, z.ZodLiteral<"devDependencies">, z.ZodLiteral<"optionalPeerDependencies">, z.ZodLiteral<"unlisted">, z.ZodLiteral<"binaries">, z.ZodLiteral<"unresolved">, z.ZodLiteral<"exports">, z.ZodLiteral<"types">, z.ZodLiteral<"nsExports">, z.ZodLiteral<"nsTypes">, z.ZodLiteral<"duplicates">, z.ZodLiteral<"enumMembers">, z.ZodLiteral<"classMembers">]>, z.ZodEnum<["error", "warn", "off"]>>>;
|
|
5
5
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -18,11 +18,11 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
18
18
|
asyncCompilers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodString], z.ZodUnknown>, z.ZodPromise<z.ZodString>>>>;
|
|
19
19
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
20
|
treatConfigHintsAsErrors: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
}
|
|
21
|
+
} & {
|
|
22
22
|
include: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"files">, z.ZodLiteral<"dependencies">, z.ZodLiteral<"devDependencies">, z.ZodLiteral<"optionalPeerDependencies">, z.ZodLiteral<"unlisted">, z.ZodLiteral<"binaries">, z.ZodLiteral<"unresolved">, z.ZodLiteral<"exports">, z.ZodLiteral<"types">, z.ZodLiteral<"nsExports">, z.ZodLiteral<"nsTypes">, z.ZodLiteral<"duplicates">, z.ZodLiteral<"enumMembers">, z.ZodLiteral<"classMembers">]>, "many">>;
|
|
23
23
|
exclude: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"files">, z.ZodLiteral<"dependencies">, z.ZodLiteral<"devDependencies">, z.ZodLiteral<"optionalPeerDependencies">, z.ZodLiteral<"unlisted">, z.ZodLiteral<"binaries">, z.ZodLiteral<"unresolved">, z.ZodLiteral<"exports">, z.ZodLiteral<"types">, z.ZodLiteral<"nsExports">, z.ZodLiteral<"nsTypes">, z.ZodLiteral<"duplicates">, z.ZodLiteral<"enumMembers">, z.ZodLiteral<"classMembers">]>, "many">>;
|
|
24
|
-
}
|
|
25
|
-
workspaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<
|
|
24
|
+
} & {
|
|
25
|
+
workspaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
26
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
27
27
|
project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
28
28
|
paths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -32,7 +32,7 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
32
32
|
ignoreMembers: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">>;
|
|
33
33
|
ignoreUnresolved: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">>;
|
|
34
34
|
includeEntryExports: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
-
}
|
|
35
|
+
} & {
|
|
36
36
|
angular: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
37
37
|
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
38
38
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -1346,7 +1346,7 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1346
1346
|
entry?: string | string[] | undefined;
|
|
1347
1347
|
project?: string | string[] | undefined;
|
|
1348
1348
|
}>]>>;
|
|
1349
|
-
}
|
|
1349
|
+
}, "strip", z.ZodTypeAny, {
|
|
1350
1350
|
node?: string | boolean | string[] | {
|
|
1351
1351
|
config?: string | string[] | undefined;
|
|
1352
1352
|
entry?: string | string[] | undefined;
|
|
@@ -2377,7 +2377,7 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
2377
2377
|
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
2378
2378
|
includeEntryExports?: boolean | undefined;
|
|
2379
2379
|
}>>>;
|
|
2380
|
-
}
|
|
2380
|
+
} & {
|
|
2381
2381
|
angular: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
2382
2382
|
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
2383
2383
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -3691,7 +3691,7 @@ export declare const knipConfigurationSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
3691
3691
|
entry?: string | string[] | undefined;
|
|
3692
3692
|
project?: string | string[] | undefined;
|
|
3693
3693
|
}>]>>;
|
|
3694
|
-
}
|
|
3694
|
+
}, "strict", z.ZodTypeAny, {
|
|
3695
3695
|
exclude?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
3696
3696
|
tags?: string[] | undefined;
|
|
3697
3697
|
include?: ("dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.54.
|
|
1
|
+
export declare const version = "5.54.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.54.
|
|
1
|
+
export const version = '5.54.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "5.54.
|
|
3
|
+
"version": "5.54.1",
|
|
4
4
|
"description": "Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects",
|
|
5
5
|
"homepage": "https://knip.dev",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,9 @@
|
|
|
42
42
|
"format": "biome format --write .",
|
|
43
43
|
"test": "bun test test/*.test.ts test/**/*.test.ts",
|
|
44
44
|
"test:watch": "bun test test/*.test.ts test/**/*.test.ts --reporter=junit --reporter-outfile=junit.xml || bun test --watch $(grep -o 'name=\"[^\"]*\".*failures=\"[^0]' junit.xml | grep -v 'name=\"bun test\"' | grep -o 'name=\"[^\"]*\"' | cut -d'\"' -f2)",
|
|
45
|
-
"test:node": "glob -c \"npx -y tsx --test --import ./transform-test.js\" \"test/**/*.test.ts\"",
|
|
46
45
|
"test:smoke": "bun test test/*.test.ts test/{plugins,util}/*.test.ts",
|
|
46
|
+
"test:node": "tsx --test --import ./transform-test.js test/**/*.test.ts test/*.test.ts",
|
|
47
|
+
"test:node:smoke": "tsx --test --import ./transform-test.js {test/*.test.ts,test/plugins/*.test.ts,test/util/*.test.ts}",
|
|
47
48
|
"watch": "npm link && tsc --watch",
|
|
48
49
|
"prebuild": "npm run generate-plugin-defs && node rmdir.js dist",
|
|
49
50
|
"build": "tsc",
|
|
@@ -88,8 +89,8 @@
|
|
|
88
89
|
"@types/webpack": "^5.28.5",
|
|
89
90
|
"@wdio/types": "^9.5.0",
|
|
90
91
|
"codeclimate-types": "^0.3.1",
|
|
91
|
-
"glob": "^10.4.2",
|
|
92
92
|
"release-it": "^19.0.1",
|
|
93
|
+
"tsx": "^4.19.4",
|
|
93
94
|
"type-fest": "^4.31.0",
|
|
94
95
|
"typescript": "^5.5.2"
|
|
95
96
|
},
|