knip 5.36.4 → 5.36.6
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 +5 -5
- package/dist/ConfigurationValidator.d.ts +224 -125
- package/dist/ConfigurationValidator.js +1 -95
- package/dist/binaries/bash-parser.js +4 -1
- package/dist/compilers/index.d.ts +52 -32
- package/dist/schema/plugins.d.ts +1974 -0
- package/dist/schema/plugins.js +96 -0
- package/dist/types/config.d.ts +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
2
|
+
import { globSchema, pluginsSchema } from './schema/plugins.js';
|
|
3
3
|
const pathsSchema = z.record(z.string(), z.array(z.string()));
|
|
4
4
|
const syncCompilerSchema = z.function().args(z.string(), z.string()).returns(z.string());
|
|
5
5
|
const asyncCompilerSchema = z.function().args(z.string(), z.string()).returns(z.promise(z.string()));
|
|
@@ -54,100 +54,6 @@ const reportConfigSchema = z.object({
|
|
|
54
54
|
include: z.array(issueTypeSchema).optional(),
|
|
55
55
|
exclude: z.array(issueTypeSchema).optional(),
|
|
56
56
|
});
|
|
57
|
-
export const pluginSchema = z.union([
|
|
58
|
-
z.boolean(),
|
|
59
|
-
globSchema,
|
|
60
|
-
z.object({
|
|
61
|
-
config: globSchema.optional(),
|
|
62
|
-
entry: globSchema.optional(),
|
|
63
|
-
project: globSchema.optional(),
|
|
64
|
-
}),
|
|
65
|
-
]);
|
|
66
|
-
const pluginsSchema = z.object({
|
|
67
|
-
astro: pluginSchema,
|
|
68
|
-
angular: pluginSchema,
|
|
69
|
-
ava: pluginSchema,
|
|
70
|
-
babel: pluginSchema,
|
|
71
|
-
c8: pluginSchema,
|
|
72
|
-
capacitor: pluginSchema,
|
|
73
|
-
changesets: pluginSchema,
|
|
74
|
-
commitizen: pluginSchema,
|
|
75
|
-
commitlint: pluginSchema,
|
|
76
|
-
cspell: pluginSchema,
|
|
77
|
-
cucumber: pluginSchema,
|
|
78
|
-
cypress: pluginSchema,
|
|
79
|
-
dotenv: pluginSchema,
|
|
80
|
-
eleventy: pluginSchema,
|
|
81
|
-
eslint: pluginSchema,
|
|
82
|
-
gatsby: pluginSchema,
|
|
83
|
-
'github-actions': pluginSchema,
|
|
84
|
-
'graphql-codegen': pluginSchema,
|
|
85
|
-
husky: pluginSchema,
|
|
86
|
-
jest: pluginSchema,
|
|
87
|
-
ladle: pluginSchema,
|
|
88
|
-
lefthook: pluginSchema,
|
|
89
|
-
'lint-staged': pluginSchema,
|
|
90
|
-
linthtml: pluginSchema,
|
|
91
|
-
'lockfile-lint': pluginSchema,
|
|
92
|
-
'lost-pixel': pluginSchema,
|
|
93
|
-
markdownlint: pluginSchema,
|
|
94
|
-
mocha: pluginSchema,
|
|
95
|
-
moonrepo: pluginSchema,
|
|
96
|
-
msw: pluginSchema,
|
|
97
|
-
nest: pluginSchema,
|
|
98
|
-
netlify: pluginSchema,
|
|
99
|
-
next: pluginSchema,
|
|
100
|
-
node: pluginSchema,
|
|
101
|
-
nodemon: pluginSchema,
|
|
102
|
-
'node-test-runner': pluginSchema,
|
|
103
|
-
'npm-package-json-lint': pluginSchema,
|
|
104
|
-
nuxt: pluginSchema,
|
|
105
|
-
nx: pluginSchema,
|
|
106
|
-
nyc: pluginSchema,
|
|
107
|
-
oclif: pluginSchema,
|
|
108
|
-
playwright: pluginSchema,
|
|
109
|
-
'playwright-ct': pluginSchema,
|
|
110
|
-
'playwright-test': pluginSchema,
|
|
111
|
-
postcss: pluginSchema,
|
|
112
|
-
preconstruct: pluginSchema,
|
|
113
|
-
prettier: pluginSchema,
|
|
114
|
-
'react-cosmos': pluginSchema,
|
|
115
|
-
'release-it': pluginSchema,
|
|
116
|
-
remark: pluginSchema,
|
|
117
|
-
remix: pluginSchema,
|
|
118
|
-
rollup: pluginSchema,
|
|
119
|
-
rsbuild: pluginSchema,
|
|
120
|
-
rspack: pluginSchema,
|
|
121
|
-
'semantic-release': pluginSchema,
|
|
122
|
-
sentry: pluginSchema,
|
|
123
|
-
'simple-git-hooks': pluginSchema,
|
|
124
|
-
'size-limit': pluginSchema,
|
|
125
|
-
storybook: pluginSchema,
|
|
126
|
-
stryker: pluginSchema,
|
|
127
|
-
stylelint: pluginSchema,
|
|
128
|
-
svelte: pluginSchema,
|
|
129
|
-
syncpack: pluginSchema,
|
|
130
|
-
tailwind: pluginSchema,
|
|
131
|
-
travis: pluginSchema,
|
|
132
|
-
'ts-node': pluginSchema,
|
|
133
|
-
tsup: pluginSchema,
|
|
134
|
-
tsx: pluginSchema,
|
|
135
|
-
typedoc: pluginSchema,
|
|
136
|
-
typescript: pluginSchema,
|
|
137
|
-
unbuild: pluginSchema,
|
|
138
|
-
unocss: pluginSchema,
|
|
139
|
-
'vercel-og': pluginSchema,
|
|
140
|
-
vue: pluginSchema,
|
|
141
|
-
vike: pluginSchema,
|
|
142
|
-
vite: pluginSchema,
|
|
143
|
-
vitest: pluginSchema,
|
|
144
|
-
'webdriver-io': pluginSchema,
|
|
145
|
-
webpack: pluginSchema,
|
|
146
|
-
wireit: pluginSchema,
|
|
147
|
-
wrangler: pluginSchema,
|
|
148
|
-
xo: pluginSchema,
|
|
149
|
-
yorkie: pluginSchema,
|
|
150
|
-
});
|
|
151
57
|
const baseWorkspaceConfigurationSchema = z.object({
|
|
152
58
|
entry: globSchema.optional(),
|
|
153
59
|
project: globSchema.optional(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import parse, {} from '../../vendor/bash-parser/index.js';
|
|
2
|
-
import { pluginArgsMap } from '../plugins.js';
|
|
2
|
+
import { Plugins, pluginArgsMap } from '../plugins.js';
|
|
3
3
|
import { debugLogObject } from '../util/debug.js';
|
|
4
4
|
import { toBinary, toDeferResolve } from '../util/input.js';
|
|
5
5
|
import { extractBinary } from '../util/modules.js';
|
|
@@ -57,6 +57,9 @@ export const getDependenciesFromScript = (script, options) => {
|
|
|
57
57
|
const command = script.replace(new RegExp(`.*${text ?? binary}(\\s--\\s)?`), '');
|
|
58
58
|
return [toBinary(binary), ...getDependenciesFromScript(command, options)];
|
|
59
59
|
}
|
|
60
|
+
if (binary in Plugins) {
|
|
61
|
+
return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
62
|
+
}
|
|
60
63
|
if (options.knownBinsOnly && !text?.startsWith('.'))
|
|
61
64
|
return [];
|
|
62
65
|
return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
@@ -11,24 +11,14 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
11
11
|
entry?: string | string[] | undefined;
|
|
12
12
|
project?: string | string[] | undefined;
|
|
13
13
|
} | undefined;
|
|
14
|
-
rules?: Partial<Record<"dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
|
|
15
14
|
entry?: string | string[] | undefined;
|
|
16
15
|
project?: string | string[] | undefined;
|
|
17
|
-
|
|
18
|
-
ignore?: string | string[] | undefined;
|
|
19
|
-
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
20
|
-
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
21
|
-
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
22
|
-
ignoreExportsUsedInFile?: boolean | Partial<Record<"function" | "type" | "enum" | "class" | "interface" | "member", boolean>> | undefined;
|
|
23
|
-
ignoreWorkspaces?: string[] | undefined;
|
|
24
|
-
includeEntryExports?: boolean | undefined;
|
|
25
|
-
compilers?: Record<string, ((args_0: string, args_1: string, ...args: unknown[]) => string) | ((args_0: string, args_1: string, ...args: unknown[]) => Promise<string>)> | undefined;
|
|
26
|
-
astro?: string | boolean | string[] | {
|
|
16
|
+
angular?: string | boolean | string[] | {
|
|
27
17
|
config?: string | string[] | undefined;
|
|
28
18
|
entry?: string | string[] | undefined;
|
|
29
19
|
project?: string | string[] | undefined;
|
|
30
20
|
} | undefined;
|
|
31
|
-
|
|
21
|
+
astro?: string | boolean | string[] | {
|
|
32
22
|
config?: string | string[] | undefined;
|
|
33
23
|
entry?: string | string[] | undefined;
|
|
34
24
|
project?: string | string[] | undefined;
|
|
@@ -88,6 +78,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
88
78
|
entry?: string | string[] | undefined;
|
|
89
79
|
project?: string | string[] | undefined;
|
|
90
80
|
} | undefined;
|
|
81
|
+
drizzle?: string | boolean | string[] | {
|
|
82
|
+
config?: string | string[] | undefined;
|
|
83
|
+
entry?: string | string[] | undefined;
|
|
84
|
+
project?: string | string[] | undefined;
|
|
85
|
+
} | undefined;
|
|
91
86
|
eleventy?: string | boolean | string[] | {
|
|
92
87
|
config?: string | string[] | undefined;
|
|
93
88
|
entry?: string | string[] | undefined;
|
|
@@ -108,6 +103,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
108
103
|
entry?: string | string[] | undefined;
|
|
109
104
|
project?: string | string[] | undefined;
|
|
110
105
|
} | undefined;
|
|
106
|
+
glob?: string | boolean | string[] | {
|
|
107
|
+
config?: string | string[] | undefined;
|
|
108
|
+
entry?: string | string[] | undefined;
|
|
109
|
+
project?: string | string[] | undefined;
|
|
110
|
+
} | undefined;
|
|
111
111
|
'graphql-codegen'?: string | boolean | string[] | {
|
|
112
112
|
config?: string | string[] | undefined;
|
|
113
113
|
entry?: string | string[] | undefined;
|
|
@@ -188,12 +188,12 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
188
188
|
entry?: string | string[] | undefined;
|
|
189
189
|
project?: string | string[] | undefined;
|
|
190
190
|
} | undefined;
|
|
191
|
-
|
|
191
|
+
'node-test-runner'?: string | boolean | string[] | {
|
|
192
192
|
config?: string | string[] | undefined;
|
|
193
193
|
entry?: string | string[] | undefined;
|
|
194
194
|
project?: string | string[] | undefined;
|
|
195
195
|
} | undefined;
|
|
196
|
-
|
|
196
|
+
nodemon?: string | boolean | string[] | {
|
|
197
197
|
config?: string | string[] | undefined;
|
|
198
198
|
entry?: string | string[] | undefined;
|
|
199
199
|
project?: string | string[] | undefined;
|
|
@@ -383,22 +383,22 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
383
383
|
entry?: string | string[] | undefined;
|
|
384
384
|
project?: string | string[] | undefined;
|
|
385
385
|
} | undefined;
|
|
386
|
-
|
|
386
|
+
vike?: string | boolean | string[] | {
|
|
387
387
|
config?: string | string[] | undefined;
|
|
388
388
|
entry?: string | string[] | undefined;
|
|
389
389
|
project?: string | string[] | undefined;
|
|
390
390
|
} | undefined;
|
|
391
|
-
|
|
391
|
+
vite?: string | boolean | string[] | {
|
|
392
392
|
config?: string | string[] | undefined;
|
|
393
393
|
entry?: string | string[] | undefined;
|
|
394
394
|
project?: string | string[] | undefined;
|
|
395
395
|
} | undefined;
|
|
396
|
-
|
|
396
|
+
vitest?: string | boolean | string[] | {
|
|
397
397
|
config?: string | string[] | undefined;
|
|
398
398
|
entry?: string | string[] | undefined;
|
|
399
399
|
project?: string | string[] | undefined;
|
|
400
400
|
} | undefined;
|
|
401
|
-
|
|
401
|
+
vue?: string | boolean | string[] | {
|
|
402
402
|
config?: string | string[] | undefined;
|
|
403
403
|
entry?: string | string[] | undefined;
|
|
404
404
|
project?: string | string[] | undefined;
|
|
@@ -433,6 +433,16 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
433
433
|
entry?: string | string[] | undefined;
|
|
434
434
|
project?: string | string[] | undefined;
|
|
435
435
|
} | undefined;
|
|
436
|
+
rules?: Partial<Record<"dependencies" | "exports" | "files" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
|
|
437
|
+
paths?: Record<string, string[]> | undefined;
|
|
438
|
+
ignore?: string | string[] | undefined;
|
|
439
|
+
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
440
|
+
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
441
|
+
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
442
|
+
ignoreExportsUsedInFile?: boolean | Partial<Record<"function" | "type" | "enum" | "class" | "interface" | "member", boolean>> | undefined;
|
|
443
|
+
ignoreWorkspaces?: string[] | undefined;
|
|
444
|
+
includeEntryExports?: boolean | undefined;
|
|
445
|
+
compilers?: Record<string, ((args_0: string, args_1: string, ...args: unknown[]) => string) | ((args_0: string, args_1: string, ...args: unknown[]) => Promise<string>)> | undefined;
|
|
436
446
|
workspaces?: Record<string, {
|
|
437
447
|
node?: string | boolean | string[] | {
|
|
438
448
|
config?: string | string[] | undefined;
|
|
@@ -441,18 +451,12 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
441
451
|
} | undefined;
|
|
442
452
|
entry?: string | string[] | undefined;
|
|
443
453
|
project?: string | string[] | undefined;
|
|
444
|
-
|
|
445
|
-
ignore?: string | string[] | undefined;
|
|
446
|
-
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
447
|
-
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
448
|
-
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
449
|
-
includeEntryExports?: boolean | undefined;
|
|
450
|
-
astro?: string | boolean | string[] | {
|
|
454
|
+
angular?: string | boolean | string[] | {
|
|
451
455
|
config?: string | string[] | undefined;
|
|
452
456
|
entry?: string | string[] | undefined;
|
|
453
457
|
project?: string | string[] | undefined;
|
|
454
458
|
} | undefined;
|
|
455
|
-
|
|
459
|
+
astro?: string | boolean | string[] | {
|
|
456
460
|
config?: string | string[] | undefined;
|
|
457
461
|
entry?: string | string[] | undefined;
|
|
458
462
|
project?: string | string[] | undefined;
|
|
@@ -512,6 +516,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
512
516
|
entry?: string | string[] | undefined;
|
|
513
517
|
project?: string | string[] | undefined;
|
|
514
518
|
} | undefined;
|
|
519
|
+
drizzle?: string | boolean | string[] | {
|
|
520
|
+
config?: string | string[] | undefined;
|
|
521
|
+
entry?: string | string[] | undefined;
|
|
522
|
+
project?: string | string[] | undefined;
|
|
523
|
+
} | undefined;
|
|
515
524
|
eleventy?: string | boolean | string[] | {
|
|
516
525
|
config?: string | string[] | undefined;
|
|
517
526
|
entry?: string | string[] | undefined;
|
|
@@ -532,6 +541,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
532
541
|
entry?: string | string[] | undefined;
|
|
533
542
|
project?: string | string[] | undefined;
|
|
534
543
|
} | undefined;
|
|
544
|
+
glob?: string | boolean | string[] | {
|
|
545
|
+
config?: string | string[] | undefined;
|
|
546
|
+
entry?: string | string[] | undefined;
|
|
547
|
+
project?: string | string[] | undefined;
|
|
548
|
+
} | undefined;
|
|
535
549
|
'graphql-codegen'?: string | boolean | string[] | {
|
|
536
550
|
config?: string | string[] | undefined;
|
|
537
551
|
entry?: string | string[] | undefined;
|
|
@@ -612,12 +626,12 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
612
626
|
entry?: string | string[] | undefined;
|
|
613
627
|
project?: string | string[] | undefined;
|
|
614
628
|
} | undefined;
|
|
615
|
-
|
|
629
|
+
'node-test-runner'?: string | boolean | string[] | {
|
|
616
630
|
config?: string | string[] | undefined;
|
|
617
631
|
entry?: string | string[] | undefined;
|
|
618
632
|
project?: string | string[] | undefined;
|
|
619
633
|
} | undefined;
|
|
620
|
-
|
|
634
|
+
nodemon?: string | boolean | string[] | {
|
|
621
635
|
config?: string | string[] | undefined;
|
|
622
636
|
entry?: string | string[] | undefined;
|
|
623
637
|
project?: string | string[] | undefined;
|
|
@@ -807,22 +821,22 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
807
821
|
entry?: string | string[] | undefined;
|
|
808
822
|
project?: string | string[] | undefined;
|
|
809
823
|
} | undefined;
|
|
810
|
-
|
|
824
|
+
vike?: string | boolean | string[] | {
|
|
811
825
|
config?: string | string[] | undefined;
|
|
812
826
|
entry?: string | string[] | undefined;
|
|
813
827
|
project?: string | string[] | undefined;
|
|
814
828
|
} | undefined;
|
|
815
|
-
|
|
829
|
+
vite?: string | boolean | string[] | {
|
|
816
830
|
config?: string | string[] | undefined;
|
|
817
831
|
entry?: string | string[] | undefined;
|
|
818
832
|
project?: string | string[] | undefined;
|
|
819
833
|
} | undefined;
|
|
820
|
-
|
|
834
|
+
vitest?: string | boolean | string[] | {
|
|
821
835
|
config?: string | string[] | undefined;
|
|
822
836
|
entry?: string | string[] | undefined;
|
|
823
837
|
project?: string | string[] | undefined;
|
|
824
838
|
} | undefined;
|
|
825
|
-
|
|
839
|
+
vue?: string | boolean | string[] | {
|
|
826
840
|
config?: string | string[] | undefined;
|
|
827
841
|
entry?: string | string[] | undefined;
|
|
828
842
|
project?: string | string[] | undefined;
|
|
@@ -857,6 +871,12 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
857
871
|
entry?: string | string[] | undefined;
|
|
858
872
|
project?: string | string[] | undefined;
|
|
859
873
|
} | undefined;
|
|
874
|
+
paths?: Record<string, string[]> | undefined;
|
|
875
|
+
ignore?: string | string[] | undefined;
|
|
876
|
+
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
877
|
+
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
878
|
+
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
879
|
+
includeEntryExports?: boolean | undefined;
|
|
860
880
|
}> | undefined;
|
|
861
881
|
};
|
|
862
882
|
export declare const getIncludedCompilers: (syncCompilers: SyncCompilers, asyncCompilers: AsyncCompilers, dependencies: DependencySet) => [SyncCompilers, AsyncCompilers];
|