knip 2.38.0 → 2.38.2
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/ConfigurationValidator.d.ts +56 -56
- package/dist/ConfigurationValidator.js +1 -1
- package/dist/ProjectPrincipal.js +4 -2
- package/dist/WorkspaceWorker.d.ts +1 -1
- package/dist/binaries/index.js +2 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/storybook/index.d.ts +0 -1
- package/dist/plugins/storybook/index.js +13 -5
- package/dist/plugins/storybook/types.d.ts +7 -1
- package/dist/util/compilers.d.ts +10 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -8
|
@@ -34,19 +34,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
34
34
|
ignore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
35
35
|
ignoreBinaries: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
36
36
|
ignoreDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
37
|
-
'graphql-codegen': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
38
|
-
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
39
|
-
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
40
|
-
project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
config?: string | string[] | undefined;
|
|
43
|
-
entry?: string | string[] | undefined;
|
|
44
|
-
project?: string | string[] | undefined;
|
|
45
|
-
}, {
|
|
46
|
-
config?: string | string[] | undefined;
|
|
47
|
-
entry?: string | string[] | undefined;
|
|
48
|
-
project?: string | string[] | undefined;
|
|
49
|
-
}>]>>;
|
|
50
37
|
astro: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
51
38
|
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
52
39
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -216,6 +203,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
216
203
|
entry?: string | string[] | undefined;
|
|
217
204
|
project?: string | string[] | undefined;
|
|
218
205
|
}>]>>;
|
|
206
|
+
'graphql-codegen': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
207
|
+
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
208
|
+
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
209
|
+
project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
config?: string | string[] | undefined;
|
|
212
|
+
entry?: string | string[] | undefined;
|
|
213
|
+
project?: string | string[] | undefined;
|
|
214
|
+
}, {
|
|
215
|
+
config?: string | string[] | undefined;
|
|
216
|
+
entry?: string | string[] | undefined;
|
|
217
|
+
project?: string | string[] | undefined;
|
|
218
|
+
}>]>>;
|
|
219
219
|
husky: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
220
220
|
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
221
221
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -600,11 +600,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
600
600
|
ignore?: string | string[] | undefined;
|
|
601
601
|
ignoreBinaries?: string[] | undefined;
|
|
602
602
|
ignoreDependencies?: string[] | undefined;
|
|
603
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
604
|
-
config?: string | string[] | undefined;
|
|
605
|
-
entry?: string | string[] | undefined;
|
|
606
|
-
project?: string | string[] | undefined;
|
|
607
|
-
} | undefined;
|
|
608
603
|
astro?: string | boolean | string[] | {
|
|
609
604
|
config?: string | string[] | undefined;
|
|
610
605
|
entry?: string | string[] | undefined;
|
|
@@ -670,6 +665,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
670
665
|
entry?: string | string[] | undefined;
|
|
671
666
|
project?: string | string[] | undefined;
|
|
672
667
|
} | undefined;
|
|
668
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
669
|
+
config?: string | string[] | undefined;
|
|
670
|
+
entry?: string | string[] | undefined;
|
|
671
|
+
project?: string | string[] | undefined;
|
|
672
|
+
} | undefined;
|
|
673
673
|
husky?: string | boolean | string[] | {
|
|
674
674
|
config?: string | string[] | undefined;
|
|
675
675
|
entry?: string | string[] | undefined;
|
|
@@ -822,11 +822,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
822
822
|
ignore?: string | string[] | undefined;
|
|
823
823
|
ignoreBinaries?: string[] | undefined;
|
|
824
824
|
ignoreDependencies?: string[] | undefined;
|
|
825
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
826
|
-
config?: string | string[] | undefined;
|
|
827
|
-
entry?: string | string[] | undefined;
|
|
828
|
-
project?: string | string[] | undefined;
|
|
829
|
-
} | undefined;
|
|
830
825
|
astro?: string | boolean | string[] | {
|
|
831
826
|
config?: string | string[] | undefined;
|
|
832
827
|
entry?: string | string[] | undefined;
|
|
@@ -892,6 +887,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
892
887
|
entry?: string | string[] | undefined;
|
|
893
888
|
project?: string | string[] | undefined;
|
|
894
889
|
} | undefined;
|
|
890
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
891
|
+
config?: string | string[] | undefined;
|
|
892
|
+
entry?: string | string[] | undefined;
|
|
893
|
+
project?: string | string[] | undefined;
|
|
894
|
+
} | undefined;
|
|
895
895
|
husky?: string | boolean | string[] | {
|
|
896
896
|
config?: string | string[] | undefined;
|
|
897
897
|
entry?: string | string[] | undefined;
|
|
@@ -1038,19 +1038,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
1038
1038
|
project?: string | string[] | undefined;
|
|
1039
1039
|
} | undefined;
|
|
1040
1040
|
}>>>;
|
|
1041
|
-
'graphql-codegen': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
1042
|
-
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1043
|
-
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1044
|
-
project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1045
|
-
}, "strip", z.ZodTypeAny, {
|
|
1046
|
-
config?: string | string[] | undefined;
|
|
1047
|
-
entry?: string | string[] | undefined;
|
|
1048
|
-
project?: string | string[] | undefined;
|
|
1049
|
-
}, {
|
|
1050
|
-
config?: string | string[] | undefined;
|
|
1051
|
-
entry?: string | string[] | undefined;
|
|
1052
|
-
project?: string | string[] | undefined;
|
|
1053
|
-
}>]>>;
|
|
1054
1041
|
astro: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
1055
1042
|
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1056
1043
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -1220,6 +1207,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
1220
1207
|
entry?: string | string[] | undefined;
|
|
1221
1208
|
project?: string | string[] | undefined;
|
|
1222
1209
|
}>]>>;
|
|
1210
|
+
'graphql-codegen': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
1211
|
+
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1212
|
+
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1213
|
+
project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1214
|
+
}, "strip", z.ZodTypeAny, {
|
|
1215
|
+
config?: string | string[] | undefined;
|
|
1216
|
+
entry?: string | string[] | undefined;
|
|
1217
|
+
project?: string | string[] | undefined;
|
|
1218
|
+
}, {
|
|
1219
|
+
config?: string | string[] | undefined;
|
|
1220
|
+
entry?: string | string[] | undefined;
|
|
1221
|
+
project?: string | string[] | undefined;
|
|
1222
|
+
}>]>>;
|
|
1223
1223
|
husky: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
|
|
1224
1224
|
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1225
1225
|
entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
@@ -1619,11 +1619,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
1619
1619
|
ignore?: string | string[] | undefined;
|
|
1620
1620
|
ignoreBinaries?: string[] | undefined;
|
|
1621
1621
|
ignoreDependencies?: string[] | undefined;
|
|
1622
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
1623
|
-
config?: string | string[] | undefined;
|
|
1624
|
-
entry?: string | string[] | undefined;
|
|
1625
|
-
project?: string | string[] | undefined;
|
|
1626
|
-
} | undefined;
|
|
1627
1622
|
astro?: string | boolean | string[] | {
|
|
1628
1623
|
config?: string | string[] | undefined;
|
|
1629
1624
|
entry?: string | string[] | undefined;
|
|
@@ -1689,6 +1684,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
1689
1684
|
entry?: string | string[] | undefined;
|
|
1690
1685
|
project?: string | string[] | undefined;
|
|
1691
1686
|
} | undefined;
|
|
1687
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
1688
|
+
config?: string | string[] | undefined;
|
|
1689
|
+
entry?: string | string[] | undefined;
|
|
1690
|
+
project?: string | string[] | undefined;
|
|
1691
|
+
} | undefined;
|
|
1692
1692
|
husky?: string | boolean | string[] | {
|
|
1693
1693
|
config?: string | string[] | undefined;
|
|
1694
1694
|
entry?: string | string[] | undefined;
|
|
@@ -1835,11 +1835,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
1835
1835
|
project?: string | string[] | undefined;
|
|
1836
1836
|
} | undefined;
|
|
1837
1837
|
}> | undefined;
|
|
1838
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
1839
|
-
config?: string | string[] | undefined;
|
|
1840
|
-
entry?: string | string[] | undefined;
|
|
1841
|
-
project?: string | string[] | undefined;
|
|
1842
|
-
} | undefined;
|
|
1843
1838
|
astro?: string | boolean | string[] | {
|
|
1844
1839
|
config?: string | string[] | undefined;
|
|
1845
1840
|
entry?: string | string[] | undefined;
|
|
@@ -1905,6 +1900,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
1905
1900
|
entry?: string | string[] | undefined;
|
|
1906
1901
|
project?: string | string[] | undefined;
|
|
1907
1902
|
} | undefined;
|
|
1903
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
1904
|
+
config?: string | string[] | undefined;
|
|
1905
|
+
entry?: string | string[] | undefined;
|
|
1906
|
+
project?: string | string[] | undefined;
|
|
1907
|
+
} | undefined;
|
|
1908
1908
|
husky?: string | boolean | string[] | {
|
|
1909
1909
|
config?: string | string[] | undefined;
|
|
1910
1910
|
entry?: string | string[] | undefined;
|
|
@@ -2072,11 +2072,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
2072
2072
|
ignore?: string | string[] | undefined;
|
|
2073
2073
|
ignoreBinaries?: string[] | undefined;
|
|
2074
2074
|
ignoreDependencies?: string[] | undefined;
|
|
2075
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
2076
|
-
config?: string | string[] | undefined;
|
|
2077
|
-
entry?: string | string[] | undefined;
|
|
2078
|
-
project?: string | string[] | undefined;
|
|
2079
|
-
} | undefined;
|
|
2080
2075
|
astro?: string | boolean | string[] | {
|
|
2081
2076
|
config?: string | string[] | undefined;
|
|
2082
2077
|
entry?: string | string[] | undefined;
|
|
@@ -2142,6 +2137,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
2142
2137
|
entry?: string | string[] | undefined;
|
|
2143
2138
|
project?: string | string[] | undefined;
|
|
2144
2139
|
} | undefined;
|
|
2140
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
2141
|
+
config?: string | string[] | undefined;
|
|
2142
|
+
entry?: string | string[] | undefined;
|
|
2143
|
+
project?: string | string[] | undefined;
|
|
2144
|
+
} | undefined;
|
|
2145
2145
|
husky?: string | boolean | string[] | {
|
|
2146
2146
|
config?: string | string[] | undefined;
|
|
2147
2147
|
entry?: string | string[] | undefined;
|
|
@@ -2288,11 +2288,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
2288
2288
|
project?: string | string[] | undefined;
|
|
2289
2289
|
} | undefined;
|
|
2290
2290
|
}> | undefined;
|
|
2291
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
2292
|
-
config?: string | string[] | undefined;
|
|
2293
|
-
entry?: string | string[] | undefined;
|
|
2294
|
-
project?: string | string[] | undefined;
|
|
2295
|
-
} | undefined;
|
|
2296
2291
|
astro?: string | boolean | string[] | {
|
|
2297
2292
|
config?: string | string[] | undefined;
|
|
2298
2293
|
entry?: string | string[] | undefined;
|
|
@@ -2358,6 +2353,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
|
|
|
2358
2353
|
entry?: string | string[] | undefined;
|
|
2359
2354
|
project?: string | string[] | undefined;
|
|
2360
2355
|
} | undefined;
|
|
2356
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
2357
|
+
config?: string | string[] | undefined;
|
|
2358
|
+
entry?: string | string[] | undefined;
|
|
2359
|
+
project?: string | string[] | undefined;
|
|
2360
|
+
} | undefined;
|
|
2361
2361
|
husky?: string | boolean | string[] | {
|
|
2362
2362
|
config?: string | string[] | undefined;
|
|
2363
2363
|
entry?: string | string[] | undefined;
|
|
@@ -60,7 +60,6 @@ export const pluginSchema = z.union([
|
|
|
60
60
|
}),
|
|
61
61
|
]);
|
|
62
62
|
const pluginsSchema = z.object({
|
|
63
|
-
'graphql-codegen': pluginSchema,
|
|
64
63
|
astro: pluginSchema,
|
|
65
64
|
angular: pluginSchema,
|
|
66
65
|
ava: pluginSchema,
|
|
@@ -74,6 +73,7 @@ const pluginsSchema = z.object({
|
|
|
74
73
|
eslint: pluginSchema,
|
|
75
74
|
gatsby: pluginSchema,
|
|
76
75
|
'github-actions': pluginSchema,
|
|
76
|
+
'graphql-codegen': pluginSchema,
|
|
77
77
|
husky: pluginSchema,
|
|
78
78
|
jest: pluginSchema,
|
|
79
79
|
lefthook: pluginSchema,
|
package/dist/ProjectPrincipal.js
CHANGED
|
@@ -129,14 +129,16 @@ export class ProjectPrincipal {
|
|
|
129
129
|
}
|
|
130
130
|
else {
|
|
131
131
|
const sanitizedSpecifier = sanitizeSpecifier(specifier);
|
|
132
|
-
|
|
132
|
+
const ext = extname(sanitizedSpecifier);
|
|
133
|
+
const hasIgnoredExtension = IGNORED_FILE_EXTENSIONS.includes(ext);
|
|
134
|
+
if (!hasIgnoredExtension && isMaybePackageName(sanitizedSpecifier)) {
|
|
133
135
|
external.add(sanitizedSpecifier);
|
|
134
136
|
}
|
|
135
137
|
else {
|
|
136
138
|
const isIgnored = this.isGitIgnored(join(dirname(filePath), sanitizedSpecifier));
|
|
137
139
|
if (!isIgnored) {
|
|
138
140
|
const ext = extname(sanitizedSpecifier);
|
|
139
|
-
if (!ext || (ext !== '.json' && !
|
|
141
|
+
if (!ext || (ext !== '.json' && !hasIgnoredExtension)) {
|
|
140
142
|
unresolvedImports.add(specifier);
|
|
141
143
|
}
|
|
142
144
|
}
|
|
@@ -52,7 +52,7 @@ export declare class WorkspaceWorker {
|
|
|
52
52
|
installedBinaries: InstalledBinaries;
|
|
53
53
|
referencedDependencies: ReferencedDependencies;
|
|
54
54
|
hasTypesIncluded: Set<string>;
|
|
55
|
-
enabledPlugins: ("astro" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "drizzle" | "githubActions" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "svelte"
|
|
55
|
+
enabledPlugins: ("astro" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "svelte")[];
|
|
56
56
|
entryFilePatterns: string[];
|
|
57
57
|
productionEntryFilePatterns: string[];
|
|
58
58
|
}>;
|
package/dist/binaries/index.js
CHANGED
|
@@ -11,6 +11,8 @@ const getDependenciesFromScripts = (npmScripts, options = {}) => {
|
|
|
11
11
|
const scripts = typeof npmScripts === 'string' ? [npmScripts] : [...npmScripts];
|
|
12
12
|
const results = scripts.flatMap(script => getBinariesFromScript(script, { cwd, manifest, knownGlobalsOnly }));
|
|
13
13
|
return compact(results.map(identifier => {
|
|
14
|
+
if (identifier.startsWith('http'))
|
|
15
|
+
return;
|
|
14
16
|
if (isBinary(identifier))
|
|
15
17
|
return identifier;
|
|
16
18
|
if (isInternal(identifier)) {
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * as drizzle from './drizzle/index.js';
|
|
|
12
12
|
export * as eslint from './eslint/index.js';
|
|
13
13
|
export * as gatsby from './gatsby/index.js';
|
|
14
14
|
export * as githubActions from './github-actions/index.js';
|
|
15
|
+
export * as graphqlCodegen from './graphql-codegen/index.js';
|
|
15
16
|
export * as husky from './husky/index.js';
|
|
16
17
|
export * as jest from './jest/index.js';
|
|
17
18
|
export * as lefthook from './lefthook/index.js';
|
|
@@ -43,4 +44,3 @@ export * as typescript from './typescript/index.js';
|
|
|
43
44
|
export * as vite from './vite/index.js';
|
|
44
45
|
export * as vitest from './vitest/index.js';
|
|
45
46
|
export * as webpack from './webpack/index.js';
|
|
46
|
-
export * as graphqlCodegen from './graphql-codegen/index.js';
|
package/dist/plugins/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export * as drizzle from './drizzle/index.js';
|
|
|
12
12
|
export * as eslint from './eslint/index.js';
|
|
13
13
|
export * as gatsby from './gatsby/index.js';
|
|
14
14
|
export * as githubActions from './github-actions/index.js';
|
|
15
|
+
export * as graphqlCodegen from './graphql-codegen/index.js';
|
|
15
16
|
export * as husky from './husky/index.js';
|
|
16
17
|
export * as jest from './jest/index.js';
|
|
17
18
|
export * as lefthook from './lefthook/index.js';
|
|
@@ -43,4 +44,3 @@ export * as typescript from './typescript/index.js';
|
|
|
43
44
|
export * as vite from './vite/index.js';
|
|
44
45
|
export * as vitest from './vitest/index.js';
|
|
45
46
|
export * as webpack from './webpack/index.js';
|
|
46
|
-
export * as graphqlCodegen from './graphql-codegen/index.js';
|
|
@@ -3,7 +3,6 @@ export declare const NAME = "Storybook";
|
|
|
3
3
|
export declare const ENABLERS: (string | RegExp)[];
|
|
4
4
|
export declare const isEnabled: IsPluginEnabledCallback;
|
|
5
5
|
export declare const CONFIG_FILE_PATTERNS: string[];
|
|
6
|
-
export declare const STORIES_FILE_PATTERNS: string[];
|
|
7
6
|
export declare const ENTRY_FILE_PATTERNS: string[];
|
|
8
7
|
export declare const PROJECT_FILE_PATTERNS: string[];
|
|
9
8
|
export declare const findDependencies: GenericPluginCallback;
|
|
@@ -6,8 +6,9 @@ export const NAME = 'Storybook';
|
|
|
6
6
|
export const ENABLERS = [/^@storybook\//, '@nrwl/storybook'];
|
|
7
7
|
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
8
8
|
export const CONFIG_FILE_PATTERNS = ['.storybook/{main,test-runner}.{js,ts}'];
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const STORIES_FILE_PATTERNS = ['**/*.@(mdx|stories.@(mdx|js|jsx|mjs|ts|tsx))'];
|
|
10
|
+
const REST_ENTRY_FILE_PATTERNS = ['.storybook/{manager,preview}.{js,jsx,ts,tsx}'];
|
|
11
|
+
export const ENTRY_FILE_PATTERNS = [...REST_ENTRY_FILE_PATTERNS, ...STORIES_FILE_PATTERNS];
|
|
11
12
|
export const PROJECT_FILE_PATTERNS = ['.storybook/**/*.{js,jsx,ts,tsx}'];
|
|
12
13
|
const findStorybookDependencies = async (configFilePath, options) => {
|
|
13
14
|
const { isProduction, cwd, config } = options;
|
|
@@ -15,9 +16,16 @@ const findStorybookDependencies = async (configFilePath, options) => {
|
|
|
15
16
|
const stories = typeof localConfig?.stories === 'function'
|
|
16
17
|
? await localConfig.stories(STORIES_FILE_PATTERNS)
|
|
17
18
|
: localConfig?.stories;
|
|
18
|
-
const relativePatterns = stories?.map(pattern =>
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const relativePatterns = stories?.map(pattern => {
|
|
20
|
+
if (typeof pattern === 'string')
|
|
21
|
+
return relative(cwd, join(dirname(configFilePath), pattern));
|
|
22
|
+
return relative(cwd, join(dirname(configFilePath), pattern.directory, pattern.files ?? STORIES_FILE_PATTERNS[0]));
|
|
23
|
+
});
|
|
24
|
+
const patterns = [
|
|
25
|
+
...(config?.entry ?? REST_ENTRY_FILE_PATTERNS),
|
|
26
|
+
...(relativePatterns && relativePatterns.length > 0 ? relativePatterns : STORIES_FILE_PATTERNS),
|
|
27
|
+
];
|
|
28
|
+
const entryPatterns = patterns.map(toEntryPattern);
|
|
21
29
|
if (!localConfig || isProduction)
|
|
22
30
|
return entryPatterns;
|
|
23
31
|
const addons = localConfig.addons?.map(addon => (typeof addon === 'string' ? addon : addon.name)) ?? [];
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
type Stories = (string | {
|
|
2
|
+
directory: string;
|
|
3
|
+
files?: string;
|
|
4
|
+
titlePrefix?: string;
|
|
5
|
+
})[];
|
|
1
6
|
export type StorybookConfig = {
|
|
2
|
-
stories?:
|
|
7
|
+
stories?: Stories | ((patterns: string[]) => Promise<string[]>);
|
|
3
8
|
addons?: (string | {
|
|
4
9
|
name: string;
|
|
5
10
|
})[];
|
|
@@ -10,3 +15,4 @@ export type StorybookConfig = {
|
|
|
10
15
|
name?: string;
|
|
11
16
|
};
|
|
12
17
|
};
|
|
18
|
+
export {};
|
package/dist/util/compilers.d.ts
CHANGED
|
@@ -22,11 +22,6 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
22
22
|
ignore?: string | string[] | undefined;
|
|
23
23
|
ignoreBinaries?: string[] | undefined;
|
|
24
24
|
ignoreDependencies?: string[] | undefined;
|
|
25
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
26
|
-
config?: string | string[] | undefined;
|
|
27
|
-
entry?: string | string[] | undefined;
|
|
28
|
-
project?: string | string[] | undefined;
|
|
29
|
-
} | undefined;
|
|
30
25
|
astro?: string | boolean | string[] | {
|
|
31
26
|
config?: string | string[] | undefined;
|
|
32
27
|
entry?: string | string[] | undefined;
|
|
@@ -92,6 +87,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
92
87
|
entry?: string | string[] | undefined;
|
|
93
88
|
project?: string | string[] | undefined;
|
|
94
89
|
} | undefined;
|
|
90
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
91
|
+
config?: string | string[] | undefined;
|
|
92
|
+
entry?: string | string[] | undefined;
|
|
93
|
+
project?: string | string[] | undefined;
|
|
94
|
+
} | undefined;
|
|
95
95
|
husky?: string | boolean | string[] | {
|
|
96
96
|
config?: string | string[] | undefined;
|
|
97
97
|
entry?: string | string[] | undefined;
|
|
@@ -238,11 +238,6 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
238
238
|
project?: string | string[] | undefined;
|
|
239
239
|
} | undefined;
|
|
240
240
|
}> | undefined;
|
|
241
|
-
'graphql-codegen'?: string | boolean | string[] | {
|
|
242
|
-
config?: string | string[] | undefined;
|
|
243
|
-
entry?: string | string[] | undefined;
|
|
244
|
-
project?: string | string[] | undefined;
|
|
245
|
-
} | undefined;
|
|
246
241
|
astro?: string | boolean | string[] | {
|
|
247
242
|
config?: string | string[] | undefined;
|
|
248
243
|
entry?: string | string[] | undefined;
|
|
@@ -308,6 +303,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
308
303
|
entry?: string | string[] | undefined;
|
|
309
304
|
project?: string | string[] | undefined;
|
|
310
305
|
} | undefined;
|
|
306
|
+
'graphql-codegen'?: string | boolean | string[] | {
|
|
307
|
+
config?: string | string[] | undefined;
|
|
308
|
+
entry?: string | string[] | undefined;
|
|
309
|
+
project?: string | string[] | undefined;
|
|
310
|
+
} | undefined;
|
|
311
311
|
husky?: string | boolean | string[] | {
|
|
312
312
|
config?: string | string[] | undefined;
|
|
313
313
|
entry?: string | string[] | undefined;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.38.
|
|
1
|
+
export declare const version = "2.38.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.38.
|
|
1
|
+
export const version = '2.38.2';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "2.38.
|
|
3
|
+
"version": "2.38.2",
|
|
4
4
|
"description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
|
|
5
5
|
"homepage": "https://github.com/webpro/knip",
|
|
6
6
|
"repository": "github:webpro/knip",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@npmcli/map-workspaces": "^3.0.4",
|
|
47
47
|
"@pkgjs/parseargs": "0.11.0",
|
|
48
48
|
"@pnpm/logger": "5.0.0",
|
|
49
|
-
"@pnpm/workspace.pkgs-graph": "2.0.
|
|
49
|
+
"@pnpm/workspace.pkgs-graph": "2.0.9",
|
|
50
50
|
"@snyk/github-codeowners": "^1.1.0",
|
|
51
51
|
"chalk": "^5.2.0",
|
|
52
52
|
"easy-table": "^1.2.0",
|
|
@@ -68,21 +68,21 @@
|
|
|
68
68
|
"@npmcli/package-json": "5.0.0",
|
|
69
69
|
"@release-it/bumper": "5.1.0",
|
|
70
70
|
"@swc/cli": "0.1.62",
|
|
71
|
-
"@swc/core": "1.3.
|
|
71
|
+
"@swc/core": "1.3.95",
|
|
72
72
|
"@types/eslint": "8.44.6",
|
|
73
73
|
"@types/js-yaml": "4.0.8",
|
|
74
74
|
"@types/micromatch": "4.0.4",
|
|
75
75
|
"@types/minimist": "1.2.4",
|
|
76
|
-
"@types/node": "20.8.
|
|
76
|
+
"@types/node": "20.8.9",
|
|
77
77
|
"@types/npmcli__map-workspaces": "3.0.3",
|
|
78
78
|
"@types/pkgjs__parseargs": "0.10.2",
|
|
79
79
|
"@types/webpack": "5.28.4",
|
|
80
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
81
|
-
"@typescript-eslint/parser": "6.
|
|
80
|
+
"@typescript-eslint/eslint-plugin": "6.9.0",
|
|
81
|
+
"@typescript-eslint/parser": "6.9.0",
|
|
82
82
|
"c8": "8.0.1",
|
|
83
83
|
"eslint": "8.52.0",
|
|
84
84
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
85
|
-
"eslint-plugin-import": "2.
|
|
85
|
+
"eslint-plugin-import": "2.29.0",
|
|
86
86
|
"eslint-plugin-n": "16.2.0",
|
|
87
87
|
"playwright": "1.39.0",
|
|
88
88
|
"prettier": "3.0.3",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"remark-cli": "12.0.0",
|
|
91
91
|
"remark-preset-webpro": "1.0.0",
|
|
92
92
|
"tsx": "3.14.0",
|
|
93
|
-
"type-fest": "4.
|
|
93
|
+
"type-fest": "4.6.0"
|
|
94
94
|
},
|
|
95
95
|
"engines": {
|
|
96
96
|
"node": ">=16.17.0 <17 || >=18.6.0"
|