knip 5.83.0 → 5.84.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 +24 -0
- package/dist/IssueCollector.d.ts +15 -2
- package/dist/IssueCollector.js +59 -9
- package/dist/ProjectPrincipal.d.ts +2 -1
- package/dist/ProjectPrincipal.js +2 -1
- package/dist/WorkspaceWorker.d.ts +4 -1
- package/dist/WorkspaceWorker.js +69 -13
- package/dist/binaries/bash-parser.d.ts +0 -1
- package/dist/binaries/bash-parser.js +2 -3
- package/dist/binaries/fallback.js +1 -1
- package/dist/binaries/package-manager/npm.js +1 -1
- package/dist/binaries/package-manager/pnpm.js +3 -2
- package/dist/binaries/package-manager/yarn.js +1 -1
- package/dist/binaries/plugins.js +1 -0
- package/dist/compilers/compilers.d.ts +3 -3
- package/dist/compilers/index.d.ts +45 -4
- package/dist/compilers/index.js +6 -20
- package/dist/compilers/scss.d.ts +2 -2
- package/dist/compilers/types.d.ts +6 -5
- package/dist/constants.js +1 -0
- package/dist/graph/analyze.js +11 -0
- package/dist/graph/build.js +29 -15
- package/dist/plugins/astro/compiler-mdx.d.ts +2 -0
- package/dist/{compilers/astro-mdx.js → plugins/astro/compiler-mdx.js} +2 -4
- package/dist/plugins/astro/compiler.d.ts +2 -0
- package/dist/{compilers/astro.js → plugins/astro/compiler.js} +2 -3
- package/dist/plugins/astro/index.js +10 -0
- package/dist/plugins/bun/index.js +14 -5
- package/dist/plugins/bun/types.d.ts +5 -0
- package/dist/plugins/bun/types.js +1 -0
- package/dist/plugins/c8/index.js +1 -1
- package/dist/plugins/convex/index.js +1 -1
- package/dist/plugins/dotenv/index.js +8 -1
- package/dist/plugins/execa/index.d.ts +3 -0
- package/dist/plugins/execa/index.js +15 -0
- package/dist/{typescript/visitors/scripts → plugins/execa/visitors}/execa.js +3 -3
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.js +8 -0
- package/dist/plugins/jest/index.js +2 -2
- package/dist/plugins/metro/index.js +8 -2
- package/dist/plugins/nx/index.js +1 -1
- package/dist/plugins/pm2/index.d.ts +3 -0
- package/dist/plugins/pm2/index.js +34 -0
- package/dist/plugins/pm2/types.d.ts +9 -0
- package/dist/plugins/pm2/types.js +1 -0
- package/dist/plugins/prettier/index.js +2 -0
- package/dist/plugins/prisma/compiler.d.ts +2 -0
- package/dist/{compilers/prisma.js → plugins/prisma/compiler.js} +1 -2
- package/dist/plugins/prisma/index.js +6 -0
- package/dist/plugins/react-native/index.d.ts +3 -0
- package/dist/plugins/react-native/index.js +38 -0
- package/dist/plugins/react-native/types.d.ts +7 -0
- package/dist/plugins/react-native/types.js +1 -0
- package/dist/plugins/svelte/compiler.d.ts +2 -0
- package/dist/plugins/svelte/compiler.js +3 -0
- package/dist/plugins/svelte/index.js +6 -0
- package/dist/plugins/tailwind/compiler.d.ts +2 -0
- package/dist/{compilers/tailwind.js → plugins/tailwind/compiler.js} +2 -3
- package/dist/plugins/tailwind/index.js +6 -0
- package/dist/plugins/typescript/index.js +2 -2
- package/dist/plugins/vite/helpers.d.ts +2 -0
- package/dist/plugins/vite/helpers.js +23 -0
- package/dist/plugins/vite/index.js +10 -1
- package/dist/plugins/vite/visitors/importMetaGlob.d.ts +2 -0
- package/dist/plugins/vite/visitors/importMetaGlob.js +32 -0
- package/dist/plugins/vitest/index.js +24 -9
- package/dist/plugins/vue/compiler.d.ts +2 -0
- package/dist/plugins/vue/compiler.js +3 -0
- package/dist/plugins/vue/index.js +6 -0
- package/dist/plugins/webpack/index.js +15 -6
- package/dist/plugins/webpack/visitors/requireContext.d.ts +2 -0
- package/dist/plugins/webpack/visitors/requireContext.js +29 -0
- package/dist/plugins/yarn/index.js +18 -0
- package/dist/plugins/zx/index.d.ts +3 -0
- package/dist/plugins/zx/index.js +15 -0
- package/dist/{typescript/visitors/scripts → plugins/zx/visitors}/zx.js +2 -2
- package/dist/reporters/util/configuration-hints.js +3 -0
- package/dist/reporters/util/util.js +2 -2
- package/dist/run.d.ts +1 -1
- package/dist/schema/configuration.d.ts +60 -0
- package/dist/schema/plugins.d.ts +20 -0
- package/dist/schema/plugins.js +4 -0
- package/dist/session/session.d.ts +1 -1
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +4 -0
- package/dist/types/config.d.ts +26 -4
- package/dist/types/issues.d.ts +1 -1
- package/dist/typescript/ast-helpers.d.ts +2 -0
- package/dist/typescript/ast-helpers.js +55 -6
- package/dist/typescript/get-imports-and-exports.d.ts +2 -2
- package/dist/typescript/get-imports-and-exports.js +5 -5
- package/dist/typescript/visitors/dynamic-imports/index.d.ts +2 -1
- package/dist/typescript/visitors/dynamic-imports/index.js +3 -2
- package/dist/typescript/visitors/dynamic-imports/moduleRegister.d.ts +3 -0
- package/dist/typescript/visitors/dynamic-imports/moduleRegister.js +25 -0
- package/dist/typescript/visitors/index.d.ts +2 -0
- package/dist/typescript/visitors/scripts/index.d.ts +2 -1
- package/dist/typescript/visitors/scripts/index.js +2 -4
- package/dist/util/cli-arguments.d.ts +1 -1
- package/dist/util/cli-arguments.js +5 -3
- package/dist/util/create-input-handler.js +8 -4
- package/dist/util/create-options.d.ts +40 -0
- package/dist/util/jiti.d.ts +1 -5
- package/dist/util/jiti.js +2 -7
- package/dist/util/loader.js +1 -1
- package/dist/util/modules.d.ts +1 -0
- package/dist/util/modules.js +1 -0
- package/dist/util/watch.d.ts +1 -1
- package/dist/util/watch.js +9 -2
- package/dist/util/workspace-selectors.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/schema.json +19 -0
- package/dist/compilers/astro-mdx.d.ts +0 -6
- package/dist/compilers/astro.d.ts +0 -6
- package/dist/compilers/prisma.d.ts +0 -6
- package/dist/compilers/svelte.d.ts +0 -6
- package/dist/compilers/svelte.js +0 -4
- package/dist/compilers/tailwind.d.ts +0 -6
- package/dist/compilers/vue.d.ts +0 -6
- package/dist/compilers/vue.js +0 -4
- /package/dist/{typescript/visitors/scripts → plugins/execa/visitors}/execa.d.ts +0 -0
- /package/dist/{typescript/visitors/scripts → plugins/zx/visitors}/zx.d.ts +0 -0
|
@@ -142,6 +142,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
142
142
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
143
143
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
144
144
|
}, z.core.$strip>]>>;
|
|
145
|
+
execa: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
146
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
147
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
148
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
149
|
+
}, z.core.$strip>]>>;
|
|
145
150
|
expo: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
146
151
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
147
152
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -377,6 +382,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
377
382
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
378
383
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
379
384
|
}, z.core.$strip>]>>;
|
|
385
|
+
pm2: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
386
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
387
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
388
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
389
|
+
}, z.core.$strip>]>>;
|
|
380
390
|
pnpm: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
381
391
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
382
392
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -407,6 +417,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
407
417
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
408
418
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
409
419
|
}, z.core.$strip>]>>;
|
|
420
|
+
'react-native': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
421
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
422
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
423
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
424
|
+
}, z.core.$strip>]>>;
|
|
410
425
|
'react-router': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
411
426
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
412
427
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -657,6 +672,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
657
672
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
658
673
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
659
674
|
}, z.core.$strip>]>>;
|
|
675
|
+
zx: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
676
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
677
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
678
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
679
|
+
}, z.core.$strip>]>>;
|
|
660
680
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
661
681
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
662
682
|
paths: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>>>;
|
|
@@ -809,6 +829,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
809
829
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
810
830
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
811
831
|
}, z.core.$strip>]>>;
|
|
832
|
+
execa: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
833
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
834
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
835
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
836
|
+
}, z.core.$strip>]>>;
|
|
812
837
|
expo: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
813
838
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
814
839
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1044,6 +1069,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1044
1069
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1045
1070
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1046
1071
|
}, z.core.$strip>]>>;
|
|
1072
|
+
pm2: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1073
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1074
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1075
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1076
|
+
}, z.core.$strip>]>>;
|
|
1047
1077
|
pnpm: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1048
1078
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1049
1079
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1074,6 +1104,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1074
1104
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1075
1105
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1076
1106
|
}, z.core.$strip>]>>;
|
|
1107
|
+
'react-native': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1108
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1109
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1110
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1111
|
+
}, z.core.$strip>]>>;
|
|
1077
1112
|
'react-router': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1078
1113
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1079
1114
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1324,6 +1359,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1324
1359
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1325
1360
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1326
1361
|
}, z.core.$strip>]>>;
|
|
1362
|
+
zx: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1363
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1364
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1365
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1366
|
+
}, z.core.$strip>]>>;
|
|
1327
1367
|
workspaces: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
1328
1368
|
angular: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1329
1369
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1465,6 +1505,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1465
1505
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1466
1506
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1467
1507
|
}, z.core.$strip>]>>;
|
|
1508
|
+
execa: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1509
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1510
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1511
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1512
|
+
}, z.core.$strip>]>>;
|
|
1468
1513
|
expo: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1469
1514
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1470
1515
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1700,6 +1745,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1700
1745
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1701
1746
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1702
1747
|
}, z.core.$strip>]>>;
|
|
1748
|
+
pm2: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1749
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1750
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1751
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1752
|
+
}, z.core.$strip>]>>;
|
|
1703
1753
|
pnpm: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1704
1754
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1705
1755
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1730,6 +1780,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1730
1780
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1731
1781
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1732
1782
|
}, z.core.$strip>]>>;
|
|
1783
|
+
'react-native': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1784
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1785
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1786
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1787
|
+
}, z.core.$strip>]>>;
|
|
1733
1788
|
'react-router': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1734
1789
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1735
1790
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1980,6 +2035,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1980
2035
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1981
2036
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1982
2037
|
}, z.core.$strip>]>>;
|
|
2038
|
+
zx: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2039
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2040
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2041
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2042
|
+
}, z.core.$strip>]>>;
|
|
1983
2043
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1984
2044
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1985
2045
|
paths: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>>>;
|
package/dist/schema/plugins.d.ts
CHANGED
|
@@ -146,6 +146,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
146
146
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
147
147
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
148
148
|
}, z.core.$strip>]>;
|
|
149
|
+
execa: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
150
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
151
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
152
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
153
|
+
}, z.core.$strip>]>;
|
|
149
154
|
expo: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
150
155
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
151
156
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -381,6 +386,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
381
386
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
382
387
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
383
388
|
}, z.core.$strip>]>;
|
|
389
|
+
pm2: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
390
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
391
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
392
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
393
|
+
}, z.core.$strip>]>;
|
|
384
394
|
pnpm: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
385
395
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
386
396
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -411,6 +421,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
411
421
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
412
422
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
413
423
|
}, z.core.$strip>]>;
|
|
424
|
+
'react-native': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
425
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
426
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
427
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
428
|
+
}, z.core.$strip>]>;
|
|
414
429
|
'react-router': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
415
430
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
416
431
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -661,4 +676,9 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
661
676
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
662
677
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
663
678
|
}, z.core.$strip>]>;
|
|
679
|
+
zx: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
680
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
681
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
682
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
683
|
+
}, z.core.$strip>]>;
|
|
664
684
|
}, z.core.$strip>;
|
package/dist/schema/plugins.js
CHANGED
|
@@ -38,6 +38,7 @@ export const pluginsSchema = z.object({
|
|
|
38
38
|
drizzle: pluginSchema,
|
|
39
39
|
eleventy: pluginSchema,
|
|
40
40
|
eslint: pluginSchema,
|
|
41
|
+
execa: pluginSchema,
|
|
41
42
|
expo: pluginSchema,
|
|
42
43
|
'expressive-code': pluginSchema,
|
|
43
44
|
gatsby: pluginSchema,
|
|
@@ -85,12 +86,14 @@ export const pluginsSchema = z.object({
|
|
|
85
86
|
'playwright-ct': pluginSchema,
|
|
86
87
|
'playwright-test': pluginSchema,
|
|
87
88
|
plop: pluginSchema,
|
|
89
|
+
pm2: pluginSchema,
|
|
88
90
|
pnpm: pluginSchema,
|
|
89
91
|
postcss: pluginSchema,
|
|
90
92
|
preconstruct: pluginSchema,
|
|
91
93
|
prettier: pluginSchema,
|
|
92
94
|
prisma: pluginSchema,
|
|
93
95
|
'react-cosmos': pluginSchema,
|
|
96
|
+
'react-native': pluginSchema,
|
|
94
97
|
'react-router': pluginSchema,
|
|
95
98
|
relay: pluginSchema,
|
|
96
99
|
'release-it': pluginSchema,
|
|
@@ -141,4 +144,5 @@ export const pluginsSchema = z.object({
|
|
|
141
144
|
xo: pluginSchema,
|
|
142
145
|
yarn: pluginSchema,
|
|
143
146
|
yorkie: pluginSchema,
|
|
147
|
+
zx: pluginSchema,
|
|
144
148
|
});
|
|
@@ -10,7 +10,7 @@ type WatchUpdate = {
|
|
|
10
10
|
mem: number;
|
|
11
11
|
};
|
|
12
12
|
export interface Session {
|
|
13
|
-
handleFileChanges(changes: WatchChange[]): Promise<WatchUpdate>;
|
|
13
|
+
handleFileChanges(changes: WatchChange[]): Promise<WatchUpdate | undefined>;
|
|
14
14
|
getIssues(): CollectorIssues;
|
|
15
15
|
getResults(): Results;
|
|
16
16
|
describeFile(filePath: string, options?: FileDescriptorOptions): File | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'oxlint' | 'parcel' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'react-cosmos' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie';
|
|
2
|
-
export declare const pluginNames: readonly ["angular", "astro", "astro-db", "astro-og-canvas", "ava", "babel", "biome", "bumpp", "bun", "c8", "capacitor", "changelogen", "changelogithub", "changesets", "commitizen", "commitlint", "convex", "create-typescript-app", "cspell", "cucumber", "cypress", "danger", "dependency-cruiser", "docusaurus", "dotenv", "drizzle", "eleventy", "eslint", "expo", "expressive-code", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "hardhat", "husky", "i18next-parser", "jest", "karma", "knex", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mdx", "mdxlint", "metro", "mocha", "moonrepo", "msw", "nano-staged", "nest", "netlify", "next", "next-intl", "next-mdx", "nitro", "node", "node-modules-inspector", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "oxlint", "parcel", "playwright", "playwright-ct", "playwright-test", "plop", "pnpm", "postcss", "preconstruct", "prettier", "prisma", "react-cosmos", "react-router", "relay", "release-it", "remark", "remix", "rollup", "rsbuild", "rslib", "rspack", "rstest", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "sveltekit", "svgo", "svgr", "swc", "syncpack", "tailwind", "tanstack-router", "taskfile", "travis", "ts-node", "tsdown", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitepress", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie"];
|
|
1
|
+
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'oxlint' | 'parcel' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'react-cosmos' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
+
export declare const pluginNames: readonly ["angular", "astro", "astro-db", "astro-og-canvas", "ava", "babel", "biome", "bumpp", "bun", "c8", "capacitor", "changelogen", "changelogithub", "changesets", "commitizen", "commitlint", "convex", "create-typescript-app", "cspell", "cucumber", "cypress", "danger", "dependency-cruiser", "docusaurus", "dotenv", "drizzle", "eleventy", "eslint", "execa", "expo", "expressive-code", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "hardhat", "husky", "i18next-parser", "jest", "karma", "knex", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mdx", "mdxlint", "metro", "mocha", "moonrepo", "msw", "nano-staged", "nest", "netlify", "next", "next-intl", "next-mdx", "nitro", "node", "node-modules-inspector", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "oxlint", "parcel", "playwright", "playwright-ct", "playwright-test", "plop", "pm2", "pnpm", "postcss", "preconstruct", "prettier", "prisma", "react-cosmos", "react-native", "react-router", "relay", "release-it", "remark", "remix", "rollup", "rsbuild", "rslib", "rspack", "rstest", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "sveltekit", "svgo", "svgr", "swc", "syncpack", "tailwind", "tanstack-router", "taskfile", "travis", "ts-node", "tsdown", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitepress", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie", "zx"];
|
|
@@ -27,6 +27,7 @@ export const pluginNames = [
|
|
|
27
27
|
'drizzle',
|
|
28
28
|
'eleventy',
|
|
29
29
|
'eslint',
|
|
30
|
+
'execa',
|
|
30
31
|
'expo',
|
|
31
32
|
'expressive-code',
|
|
32
33
|
'gatsby',
|
|
@@ -74,12 +75,14 @@ export const pluginNames = [
|
|
|
74
75
|
'playwright-ct',
|
|
75
76
|
'playwright-test',
|
|
76
77
|
'plop',
|
|
78
|
+
'pm2',
|
|
77
79
|
'pnpm',
|
|
78
80
|
'postcss',
|
|
79
81
|
'preconstruct',
|
|
80
82
|
'prettier',
|
|
81
83
|
'prisma',
|
|
82
84
|
'react-cosmos',
|
|
85
|
+
'react-native',
|
|
83
86
|
'react-router',
|
|
84
87
|
'relay',
|
|
85
88
|
'release-it',
|
|
@@ -130,4 +133,5 @@ export const pluginNames = [
|
|
|
130
133
|
'xo',
|
|
131
134
|
'yarn',
|
|
132
135
|
'yorkie',
|
|
136
|
+
'zx',
|
|
133
137
|
];
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
2
|
import type { z } from 'zod/mini';
|
|
3
|
-
import type { AsyncCompilers, SyncCompilers } from '../compilers/types.js';
|
|
3
|
+
import type { AsyncCompilers, CompilerSync, HasDependency, SyncCompilers } from '../compilers/types.js';
|
|
4
4
|
import type { knipConfigurationSchema, workspaceConfigurationSchema } from '../schema/configuration.js';
|
|
5
5
|
import type { pluginSchema } from '../schema/plugins.js';
|
|
6
|
+
import type { ImportVisitor, ScriptVisitor } from '../typescript/visitors/index.js';
|
|
6
7
|
import type { ParsedCLIArgs } from '../util/cli-arguments.js';
|
|
7
8
|
import type { Input } from '../util/input.js';
|
|
8
9
|
import type { Args } from './args.js';
|
|
@@ -93,16 +94,35 @@ export interface PluginOptions extends BaseOptions {
|
|
|
93
94
|
enabledPlugins: string[];
|
|
94
95
|
getInputsFromScripts: GetInputsFromScriptsPartial;
|
|
95
96
|
}
|
|
96
|
-
type PluginSetup = (
|
|
97
|
-
type PluginTeardown = (options: PluginOptions) => Promise<void> | void;
|
|
97
|
+
type PluginSetup = () => Promise<void> | void;
|
|
98
98
|
export type IsLoadConfig = (options: PluginOptions, dependencies: Set<string>) => boolean;
|
|
99
99
|
export type ResolveConfig<T = any> = (config: T, options: PluginOptions) => Promise<Input[]> | Input[];
|
|
100
100
|
export type Resolve = (options: PluginOptions) => Promise<Input[]> | Input[];
|
|
101
101
|
export type GetSourceFile = (filePath: string) => ts.SourceFile | undefined;
|
|
102
102
|
export type HandleInput = (input: Input) => string | undefined;
|
|
103
|
+
export type RegisterCompilerInput = {
|
|
104
|
+
extension: string;
|
|
105
|
+
compiler: CompilerSync;
|
|
106
|
+
};
|
|
107
|
+
export type RegisterCompiler = (input: RegisterCompilerInput) => void;
|
|
103
108
|
export type ResolveFromAST = (sourceFile: ts.SourceFile, options: PluginOptions & {
|
|
104
109
|
getSourceFile: GetSourceFile;
|
|
105
110
|
}) => Input[];
|
|
111
|
+
export type RegisterCompilersOptions = {
|
|
112
|
+
cwd: string;
|
|
113
|
+
hasDependency: HasDependency;
|
|
114
|
+
registerCompiler: RegisterCompiler;
|
|
115
|
+
};
|
|
116
|
+
export type RegisterCompilers = (options: RegisterCompilersOptions) => Promise<void> | void;
|
|
117
|
+
export type Visitors = {
|
|
118
|
+
dynamicImport: ImportVisitor[];
|
|
119
|
+
script: ScriptVisitor[];
|
|
120
|
+
};
|
|
121
|
+
export type RegisterVisitor = (visitors: Partial<Visitors>) => void;
|
|
122
|
+
export type RegisterVisitorsOptions = {
|
|
123
|
+
registerVisitors: RegisterVisitor;
|
|
124
|
+
};
|
|
125
|
+
export type RegisterVisitors = (options: RegisterVisitorsOptions) => void;
|
|
106
126
|
export interface Plugin {
|
|
107
127
|
title: string;
|
|
108
128
|
args?: Args;
|
|
@@ -117,11 +137,13 @@ export interface Plugin {
|
|
|
117
137
|
production?: string[];
|
|
118
138
|
project?: string[];
|
|
119
139
|
setup?: PluginSetup;
|
|
120
|
-
teardown?: PluginTeardown;
|
|
121
140
|
isLoadConfig?: IsLoadConfig;
|
|
122
141
|
resolveConfig?: ResolveConfig;
|
|
123
142
|
resolve?: Resolve;
|
|
124
143
|
resolveFromAST?: ResolveFromAST;
|
|
144
|
+
isFilterTransitiveDependencies?: boolean;
|
|
145
|
+
registerCompilers?: RegisterCompilers;
|
|
146
|
+
registerVisitors?: RegisterVisitors;
|
|
125
147
|
}
|
|
126
148
|
export type PluginMap = Record<PluginName, Plugin>;
|
|
127
149
|
export type Entries = [PluginName, Plugin][];
|
package/dist/types/issues.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export type Preprocessor = (options: ReporterOptions) => ReporterOptions;
|
|
|
73
73
|
export type IssueSeverity = 'error' | 'warn' | 'off';
|
|
74
74
|
export type Rules = Record<IssueType, IssueSeverity>;
|
|
75
75
|
export type ConfigurationHints = Map<string, ConfigurationHint>;
|
|
76
|
-
export type ConfigurationHintType = 'ignoreBinaries' | 'ignoreDependencies' | 'ignoreUnresolved' | 'ignoreWorkspaces' | 'entry-redundant' | 'project-redundant' | 'entry-top-level' | 'project-top-level' | 'entry-empty' | 'project-empty' | 'package-entry' | 'top-level-unconfigured' | 'workspace-unconfigured';
|
|
76
|
+
export type ConfigurationHintType = 'ignore' | 'ignoreFiles' | 'ignoreBinaries' | 'ignoreDependencies' | 'ignoreUnresolved' | 'ignoreWorkspaces' | 'entry-redundant' | 'project-redundant' | 'entry-top-level' | 'project-top-level' | 'entry-empty' | 'project-empty' | 'package-entry' | 'top-level-unconfigured' | 'workspace-unconfigured';
|
|
77
77
|
export type ConfigurationHint = {
|
|
78
78
|
type: ConfigurationHintType;
|
|
79
79
|
identifier: string | RegExp;
|
|
@@ -35,6 +35,8 @@ export declare const getLeadingComments: (sourceFile: BoundSourceFile) => {
|
|
|
35
35
|
pos: number;
|
|
36
36
|
end: number;
|
|
37
37
|
}[];
|
|
38
|
+
export declare const isExternalReExportsOnly: (sourceFile: ts.SourceFile) => boolean;
|
|
39
|
+
export declare const collectStringLiterals: (sourceFile: ts.SourceFile) => Set<string>;
|
|
38
40
|
export declare const isDeclarationFileExtension: (extension: string) => extension is ".d.ts" | ".d.mts" | ".d.cts";
|
|
39
41
|
export declare const getJSDocTags: (node: ts.Node) => Set<string>;
|
|
40
42
|
export declare const getLineAndCharacterOfPosition: (node: ts.Node, pos: number) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
2
|
import { FIX_FLAGS, MEMBER_FLAGS, SYMBOL_TYPE } from '../constants.js';
|
|
3
|
+
import { isInternal } from '../util/path.js';
|
|
3
4
|
function isGetOrSetAccessorDeclaration(node) {
|
|
4
5
|
return node.kind === ts.SyntaxKind.SetAccessor || node.kind === ts.SyntaxKind.GetAccessor;
|
|
5
6
|
}
|
|
@@ -134,6 +135,49 @@ export const getLeadingComments = (sourceFile) => {
|
|
|
134
135
|
}
|
|
135
136
|
return comments;
|
|
136
137
|
};
|
|
138
|
+
export const isExternalReExportsOnly = (sourceFile) => {
|
|
139
|
+
let hasExternalReExport = false;
|
|
140
|
+
for (const statement of sourceFile.statements) {
|
|
141
|
+
if (ts.isExportDeclaration(statement)) {
|
|
142
|
+
if (statement.moduleSpecifier && ts.isStringLiteral(statement.moduleSpecifier)) {
|
|
143
|
+
if (isInternal(statement.moduleSpecifier.text))
|
|
144
|
+
return false;
|
|
145
|
+
hasExternalReExport = true;
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
if (ts.isExpressionStatement(statement)) {
|
|
151
|
+
if (ts.isStringLiteral(statement.expression))
|
|
152
|
+
continue;
|
|
153
|
+
if (ts.isBinaryExpression(statement.expression)) {
|
|
154
|
+
const { left, right } = statement.expression;
|
|
155
|
+
if (ts.isPropertyAccessExpression(left) && isModuleExportsAccess(left) && isRequireCall(right)) {
|
|
156
|
+
const arg = right.arguments[0];
|
|
157
|
+
if (ts.isStringLiteral(arg)) {
|
|
158
|
+
if (isInternal(arg.text))
|
|
159
|
+
return false;
|
|
160
|
+
hasExternalReExport = true;
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
return hasExternalReExport;
|
|
170
|
+
};
|
|
171
|
+
export const collectStringLiterals = (sourceFile) => {
|
|
172
|
+
const literals = new Set();
|
|
173
|
+
const visit = (node) => {
|
|
174
|
+
if (ts.isStringLiteral(node))
|
|
175
|
+
literals.add(node.text);
|
|
176
|
+
ts.forEachChild(node, visit);
|
|
177
|
+
};
|
|
178
|
+
ts.forEachChild(sourceFile, visit);
|
|
179
|
+
return literals;
|
|
180
|
+
};
|
|
137
181
|
export const isDeclarationFileExtension = (extension) => extension === '.d.ts' || extension === '.d.mts' || extension === '.d.cts';
|
|
138
182
|
export const getJSDocTags = (node) => {
|
|
139
183
|
const tags = new Set();
|
|
@@ -239,14 +283,19 @@ const getContainingExportDeclaration = (node) => {
|
|
|
239
283
|
return node;
|
|
240
284
|
return node.parent ? getContainingExportDeclaration(node.parent) : undefined;
|
|
241
285
|
};
|
|
286
|
+
const isTypeExport = (node) => ts.isTypeAliasDeclaration(node) || ts.isInterfaceDeclaration(node);
|
|
242
287
|
export const isReferencedInExport = (node) => {
|
|
243
288
|
const parent = node.parent;
|
|
244
|
-
if (
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
289
|
+
if (!parent?.parent)
|
|
290
|
+
return;
|
|
291
|
+
const isTypeQuery = ts.isTypeQueryNode(parent);
|
|
292
|
+
if (!isTypeQuery && !ts.isTypeReferenceNode(parent))
|
|
293
|
+
return;
|
|
294
|
+
const exportDecl = getContainingExportDeclaration(parent.parent);
|
|
295
|
+
if (!exportDecl)
|
|
296
|
+
return;
|
|
297
|
+
if (isTypeQuery || isTypeExport(exportDecl))
|
|
298
|
+
return exportDecl.name?.getText();
|
|
250
299
|
};
|
|
251
300
|
export const getExportKeywordNode = (node) => node.modifiers?.find(mod => mod.kind === ts.SyntaxKind.ExportKeyword);
|
|
252
301
|
export const getDefaultKeywordNode = (node) => node.modifiers?.find(mod => mod.kind === ts.SyntaxKind.DefaultKeyword);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile } from '../types/config.js';
|
|
2
|
+
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile, Visitors } from '../types/config.js';
|
|
3
3
|
import type { Export, ExportMember, FileNode } from '../types/module-graph.js';
|
|
4
4
|
import type { BoundSourceFile } from './SourceFile.js';
|
|
5
5
|
export type ExportWithSymbol = Export & {
|
|
@@ -9,4 +9,4 @@ export type ExportWithSymbol = Export & {
|
|
|
9
9
|
export type MemberWithSymbol = ExportMember & {
|
|
10
10
|
symbol: ts.Symbol | undefined;
|
|
11
11
|
};
|
|
12
|
-
export declare const _getImportsAndExports: (sourceFile: BoundSourceFile, resolveModule: (specifier: string) => ts.ResolvedModuleFull | undefined, typeChecker: ts.TypeChecker, options: GetImportsAndExportsOptions, ignoreExportsUsedInFile: IgnoreExportsUsedInFile, skipExportsForFile: boolean) => FileNode;
|
|
12
|
+
export declare const _getImportsAndExports: (sourceFile: BoundSourceFile, resolveModule: (specifier: string) => ts.ResolvedModuleFull | undefined, typeChecker: ts.TypeChecker, options: GetImportsAndExportsOptions, ignoreExportsUsedInFile: IgnoreExportsUsedInFile, skipExportsForFile: boolean, pluginVisitors: Visitors) => FileNode;
|
|
@@ -13,11 +13,11 @@ import getDynamicImportVisitors from './visitors/dynamic-imports/index.js';
|
|
|
13
13
|
import getExportVisitors from './visitors/exports/index.js';
|
|
14
14
|
import getImportVisitors from './visitors/imports/index.js';
|
|
15
15
|
import getScriptVisitors from './visitors/scripts/index.js';
|
|
16
|
-
const getVisitors = (sourceFile) => ({
|
|
16
|
+
const getVisitors = (sourceFile, visitors) => ({
|
|
17
17
|
export: getExportVisitors(sourceFile),
|
|
18
18
|
import: getImportVisitors(sourceFile),
|
|
19
|
-
dynamicImport: getDynamicImportVisitors(sourceFile),
|
|
20
|
-
script: getScriptVisitors(sourceFile),
|
|
19
|
+
dynamicImport: getDynamicImportVisitors(sourceFile, visitors.dynamicImport),
|
|
20
|
+
script: getScriptVisitors(sourceFile, visitors.script),
|
|
21
21
|
});
|
|
22
22
|
const shouldCountRefs = (ignoreExportsUsedInFile, type) => ignoreExportsUsedInFile === true ||
|
|
23
23
|
(typeof ignoreExportsUsedInFile === 'object' && type !== 'unknown' && ignoreExportsUsedInFile[type]);
|
|
@@ -36,7 +36,7 @@ const createMember = (node, member, pos) => {
|
|
|
36
36
|
flags: member.flags,
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options, ignoreExportsUsedInFile, skipExportsForFile) => {
|
|
39
|
+
const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options, ignoreExportsUsedInFile, skipExportsForFile, pluginVisitors) => {
|
|
40
40
|
const skipExports = skipExportsForFile || !options.isReportExports;
|
|
41
41
|
const internal = new Map();
|
|
42
42
|
const external = new Set();
|
|
@@ -57,7 +57,7 @@ const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options, i
|
|
|
57
57
|
importAliases.set(aliasName, new Set([{ id, filePath }]));
|
|
58
58
|
};
|
|
59
59
|
const referencedInExport = new Map();
|
|
60
|
-
const visitors = getVisitors(sourceFile);
|
|
60
|
+
const visitors = getVisitors(sourceFile, pluginVisitors);
|
|
61
61
|
const addNsMemberRefs = (internalImport, namespace, member) => {
|
|
62
62
|
if (typeof member === 'string') {
|
|
63
63
|
internalImport.refs.add(`${namespace}.${member}`);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
|
-
|
|
2
|
+
import type { ImportVisitor } from '../index.js';
|
|
3
|
+
declare const _default: (sourceFile: ts.SourceFile, extraVisitors: ImportVisitor[]) => ((node: ts.Node, options: import("../../../types/config.js").GetImportsAndExportsOptions) => import("../../../types/imports.js").ImportNode | import("../../../types/imports.js").ImportNode[] | undefined)[];
|
|
3
4
|
export default _default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import importCall from './importCall.js';
|
|
2
2
|
import importType from './importType.js';
|
|
3
3
|
import jsDocType from './jsDocType.js';
|
|
4
|
+
import moduleRegister from './moduleRegister.js';
|
|
4
5
|
import requireCall from './requireCall.js';
|
|
5
6
|
import resolveCall from './resolveCall.js';
|
|
6
7
|
import urlConstructor from './urlConstructor.js';
|
|
7
|
-
const visitors = [importCall, importType, jsDocType, resolveCall, requireCall, urlConstructor];
|
|
8
|
-
export default (sourceFile) => visitors.map(v => v(sourceFile));
|
|
8
|
+
const visitors = [importCall, importType, jsDocType, moduleRegister, resolveCall, requireCall, urlConstructor];
|
|
9
|
+
export default (sourceFile, extraVisitors) => [...visitors, ...extraVisitors].map(v => v(sourceFile));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
declare const _default: (sourceFile: ts.SourceFile) => (node: ts.Node, options: import("../../../types/config.js").GetImportsAndExportsOptions) => import("../../../types/imports.js").ImportNode | import("../../../types/imports.js").ImportNode[] | undefined;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
import { IMPORT_FLAGS } from '../../../constants.js';
|
|
3
|
+
import { isPropertyAccessCall } from '../../ast-helpers.js';
|
|
4
|
+
import { importVisitor as visit } from '../index.js';
|
|
5
|
+
const isNodeModuleImport = (node) => ts.isImportDeclaration(node) &&
|
|
6
|
+
ts.isStringLiteral(node.moduleSpecifier) &&
|
|
7
|
+
(node.moduleSpecifier.text === 'node:module' || node.moduleSpecifier.text === 'module');
|
|
8
|
+
export default visit(sourceFile => sourceFile.statements.some(isNodeModuleImport), node => {
|
|
9
|
+
if ((ts.isCallExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === 'register') ||
|
|
10
|
+
isPropertyAccessCall(node, 'module.register')) {
|
|
11
|
+
if (node.arguments[0] && ts.isStringLiteralLike(node.arguments[0])) {
|
|
12
|
+
const specifier = node.arguments[0].text;
|
|
13
|
+
if (specifier)
|
|
14
|
+
return {
|
|
15
|
+
specifier,
|
|
16
|
+
identifier: undefined,
|
|
17
|
+
pos: node.arguments[0].pos,
|
|
18
|
+
modifiers: IMPORT_FLAGS.ENTRY,
|
|
19
|
+
alias: undefined,
|
|
20
|
+
namespace: undefined,
|
|
21
|
+
symbol: undefined,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
@@ -6,6 +6,8 @@ type FileCondition = (sourceFile: ts.SourceFile) => boolean;
|
|
|
6
6
|
type VisitorFactory<T> = (fileCondition: FileCondition, fn: Visitor<T>) => VisitorCondition<T>;
|
|
7
7
|
type VisitorCondition<T> = (sourceFile: ts.SourceFile) => Visitor<T>;
|
|
8
8
|
type Visitor<T> = (node: ts.Node, options: GetImportsAndExportsOptions) => undefined | T | T[];
|
|
9
|
+
export type ImportVisitor = ReturnType<VisitorFactory<ImportNode>>;
|
|
10
|
+
export type ScriptVisitor = ReturnType<VisitorFactory<string>>;
|
|
9
11
|
export declare const importVisitor: VisitorFactory<ImportNode>;
|
|
10
12
|
export declare const exportVisitor: VisitorFactory<ExportNode>;
|
|
11
13
|
export declare const scriptVisitor: VisitorFactory<string>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
|
-
|
|
2
|
+
import type { ScriptVisitor } from '../index.js';
|
|
3
|
+
declare const _default: (sourceFile: ts.SourceFile, extraVisitors: ScriptVisitor[]) => ((node: ts.Node, options: import("../../../types/config.js").GetImportsAndExportsOptions) => string | string[] | undefined)[];
|
|
3
4
|
export default _default;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import bun from './bun.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const visitors = [bun, execa, zx];
|
|
5
|
-
export default (sourceFile) => visitors.map(v => v(sourceFile));
|
|
2
|
+
const visitors = [bun];
|
|
3
|
+
export default (sourceFile, extraVisitors) => [...visitors, ...extraVisitors].map(v => v(sourceFile));
|