knip 6.24.0 → 6.26.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 +115 -1
- package/dist/ConfigurationChief.js +3 -0
- package/dist/ProjectPrincipal.d.ts +2 -0
- package/dist/ProjectPrincipal.js +4 -1
- package/dist/binaries/bash-parser.js +55 -83
- package/dist/binaries/index.js +3 -0
- package/dist/compilers/index.d.ts +199 -5
- package/dist/constants.d.ts +5 -1
- package/dist/constants.js +18 -0
- package/dist/graph/analyze.js +37 -2
- package/dist/graph/build.js +17 -3
- package/dist/graph-explorer/explorer.d.ts +1 -0
- package/dist/graph-explorer/explorer.js +2 -0
- package/dist/graph-explorer/operations/find-all-cycles.d.ts +3 -0
- package/dist/graph-explorer/operations/find-all-cycles.js +43 -0
- package/dist/graph-explorer/operations/find-cycles.js +3 -9
- package/dist/graph-explorer/utils.d.ts +10 -1
- package/dist/graph-explorer/utils.js +53 -0
- package/dist/plugins/_vue/auto-import.d.ts +12 -0
- package/dist/plugins/_vue/auto-import.js +272 -0
- package/dist/plugins/_vue/types.d.ts +38 -0
- package/dist/plugins/_vue/types.js +1 -0
- package/dist/plugins/astro/index.js +2 -37
- package/dist/plugins/astro/resolveFromAST.d.ts +4 -4
- package/dist/plugins/astro/resolveFromAST.js +34 -7
- package/dist/plugins/bun/index.js +28 -14
- package/dist/plugins/electron-vite/index.d.ts +3 -0
- package/dist/plugins/electron-vite/index.js +51 -0
- package/dist/plugins/electron-vite/types.d.ts +23 -0
- package/dist/plugins/electron-vite/types.js +1 -0
- package/dist/plugins/esbuild/index.d.ts +3 -0
- package/dist/plugins/esbuild/index.js +17 -0
- package/dist/plugins/eslint/resolveFromAST.js +18 -21
- package/dist/plugins/eve/index.d.ts +3 -0
- package/dist/plugins/eve/index.js +22 -0
- package/dist/plugins/execa/visitors/execa.js +10 -18
- package/dist/plugins/fumadocs/index.d.ts +3 -0
- package/dist/plugins/fumadocs/index.js +18 -0
- package/dist/plugins/graphql-codegen/index.js +9 -7
- package/dist/plugins/index.d.ts +19 -0
- package/dist/plugins/index.js +38 -0
- package/dist/plugins/jest/index.js +13 -3
- package/dist/plugins/laravel-vite-plugin/index.d.ts +3 -0
- package/dist/plugins/laravel-vite-plugin/index.js +14 -0
- package/dist/plugins/laravel-vite-plugin/resolveFromAST.d.ts +2 -0
- package/dist/plugins/laravel-vite-plugin/resolveFromAST.js +27 -0
- package/dist/plugins/next/index.js +25 -12
- package/dist/plugins/next-mdx/index.js +2 -8
- package/dist/plugins/next-mdx/resolveFromAST.d.ts +3 -2
- package/dist/plugins/next-mdx/resolveFromAST.js +17 -21
- package/dist/plugins/node/index.js +4 -1
- package/dist/plugins/nuxt/index.js +5 -68
- package/dist/plugins/nuxt/types.d.ts +0 -34
- package/dist/plugins/nuxtjs-i18n/index.d.ts +3 -0
- package/dist/plugins/nuxtjs-i18n/index.js +12 -0
- package/dist/plugins/oclif/index.js +10 -5
- package/dist/plugins/orval/index.js +1 -3
- package/dist/plugins/orval/resolveFromAST.d.ts +2 -2
- package/dist/plugins/orval/resolveFromAST.js +4 -7
- package/dist/plugins/oxlint/index.js +23 -2
- package/dist/plugins/pnpm/index.js +22 -1
- package/dist/plugins/pnpm/types.d.ts +4 -0
- package/dist/plugins/pnpm/types.js +1 -0
- package/dist/plugins/prettier/index.js +19 -3
- package/dist/plugins/prettier/types.d.ts +6 -1
- package/dist/plugins/quasar/index.d.ts +3 -0
- package/dist/plugins/quasar/index.js +15 -0
- package/dist/plugins/quasar/resolveFromAST.d.ts +3 -0
- package/dist/plugins/quasar/resolveFromAST.js +63 -0
- package/dist/plugins/qwik/index.js +1 -25
- package/dist/plugins/qwik/resolveFromAST.d.ts +5 -3
- package/dist/plugins/qwik/resolveFromAST.js +28 -9
- package/dist/plugins/rolldown/index.js +2 -5
- package/dist/plugins/rollup/index.js +2 -5
- package/dist/plugins/rslib/index.js +2 -5
- package/dist/plugins/rspack/index.js +5 -0
- package/dist/plugins/serverless-framework/index.js +12 -1
- package/dist/plugins/serverless-framework/types.d.ts +5 -2
- package/dist/plugins/sst/index.js +1 -5
- package/dist/plugins/sst/resolveFromAST.d.ts +1 -1
- package/dist/plugins/sst/resolveFromAST.js +1 -1
- package/dist/plugins/starlight/index.js +1 -19
- package/dist/plugins/starlight/resolveFromAST.d.ts +2 -2
- package/dist/plugins/starlight/resolveFromAST.js +12 -8
- package/dist/plugins/stencil/index.js +2 -37
- package/dist/plugins/stencil/resolveFromAST.d.ts +3 -0
- package/dist/plugins/stencil/resolveFromAST.js +36 -0
- package/dist/plugins/storybook/index.js +10 -0
- package/dist/plugins/sveltekit/index.js +1 -48
- package/dist/plugins/sveltekit/resolveFromAST.d.ts +2 -0
- package/dist/plugins/sveltekit/resolveFromAST.js +45 -0
- package/dist/plugins/tauri/index.d.ts +3 -0
- package/dist/plugins/tauri/index.js +42 -0
- package/dist/plugins/tauri/types.d.ts +16 -0
- package/dist/plugins/tauri/types.js +1 -0
- package/dist/plugins/tsdown/index.js +2 -5
- package/dist/plugins/tsup/index.js +2 -5
- package/dist/plugins/typedoc/index.js +9 -3
- package/dist/plugins/typedoc/types.d.ts +2 -0
- package/dist/plugins/unplugin-auto-import/index.d.ts +3 -0
- package/dist/plugins/unplugin-auto-import/index.js +18 -0
- package/dist/plugins/unplugin-icons/index.d.ts +3 -0
- package/dist/plugins/unplugin-icons/index.js +17 -0
- package/dist/plugins/unplugin-vue-components/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-components/index.js +16 -0
- package/dist/plugins/unplugin-vue-i18n/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-i18n/index.js +10 -0
- package/dist/plugins/unplugin-vue-markdown/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-markdown/index.js +16 -0
- package/dist/plugins/unplugin-vue-router/index.d.ts +3 -0
- package/dist/plugins/unplugin-vue-router/index.js +14 -0
- package/dist/plugins/vite/helpers.d.ts +2 -0
- package/dist/plugins/vite/helpers.js +46 -31
- package/dist/plugins/vite/index.js +1 -1
- package/dist/plugins/vite/visitors/importMetaGlob.js +1 -8
- package/dist/plugins/vite-plugin-pages/index.d.ts +3 -0
- package/dist/plugins/vite-plugin-pages/index.js +26 -0
- package/dist/plugins/vite-plugin-pwa/index.d.ts +3 -0
- package/dist/plugins/vite-plugin-pwa/index.js +17 -0
- package/dist/plugins/vite-plugin-pwa/resolveFromAST.d.ts +4 -0
- package/dist/plugins/vite-plugin-pwa/resolveFromAST.js +37 -0
- package/dist/plugins/vite-plugin-vue-layouts-next/index.d.ts +3 -0
- package/dist/plugins/vite-plugin-vue-layouts-next/index.js +23 -0
- package/dist/plugins/vite-plus/index.d.ts +3 -0
- package/dist/plugins/vite-plus/index.js +14 -0
- package/dist/plugins/vite-plus/resolveFromAST.d.ts +2 -0
- package/dist/plugins/vite-plus/resolveFromAST.js +37 -0
- package/dist/plugins/vite-pwa-assets-generator/index.d.ts +3 -0
- package/dist/plugins/vite-pwa-assets-generator/index.js +12 -0
- package/dist/plugins/vitepress/index.js +5 -1
- package/dist/plugins/vitest/index.js +4 -0
- package/dist/plugins/vitest/types.d.ts +3 -0
- package/dist/plugins/vue/index.js +5 -3
- package/dist/plugins/webpack/visitors/requireContext.js +2 -13
- package/dist/plugins/yarn/index.js +14 -4
- package/dist/plugins/yarn/types.d.ts +8 -0
- package/dist/plugins/yarn/types.js +1 -0
- package/dist/plugins/zx/visitors/zx.js +4 -4
- package/dist/reporters/cycles.d.ts +3 -0
- package/dist/reporters/cycles.js +79 -0
- package/dist/reporters/index.d.ts +1 -0
- package/dist/reporters/index.js +2 -0
- package/dist/reporters/json.d.ts +3 -0
- package/dist/reporters/json.js +2 -1
- package/dist/reporters/util/util.d.ts +3 -1
- package/dist/reporters/util/util.js +5 -1
- package/dist/schema/configuration.d.ts +295 -6
- package/dist/schema/configuration.js +6 -0
- package/dist/schema/plugins.d.ts +95 -0
- package/dist/schema/plugins.js +19 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +19 -0
- package/dist/types/config.d.ts +9 -0
- package/dist/types/issues.d.ts +3 -0
- package/dist/types/module-graph.d.ts +7 -0
- package/dist/types/package-json.d.ts +8 -1
- package/dist/typescript/ast-helpers.d.ts +7 -2
- package/dist/typescript/ast-helpers.js +36 -8
- package/dist/typescript/ast-nodes.d.ts +4 -1
- package/dist/typescript/ast-nodes.js +17 -1
- package/dist/typescript/get-imports-and-exports.js +10 -0
- package/dist/typescript/glob-imports.d.ts +3 -0
- package/dist/typescript/glob-imports.js +49 -0
- package/dist/typescript/resolve-module-names.d.ts +2 -0
- package/dist/typescript/resolve-module-names.js +35 -1
- package/dist/typescript/visitors/calls.js +4 -6
- package/dist/typescript/visitors/imports.js +8 -8
- package/dist/typescript/visitors/script-visitors.js +4 -4
- package/dist/typescript/visitors/walk.js +2 -3
- package/dist/util/cli-arguments.d.ts +2 -1
- package/dist/util/cli-arguments.js +5 -3
- package/dist/util/create-options.d.ts +202 -5
- package/dist/util/create-options.js +4 -1
- package/dist/util/get-included-issue-types.d.ts +1 -0
- package/dist/util/get-included-issue-types.js +4 -2
- package/dist/util/issue-initializers.js +1 -1
- package/dist/util/load-tsconfig.js +17 -4
- package/dist/util/module-graph.js +1 -0
- package/dist/util/modules.js +25 -4
- package/dist/util/resolve.js +4 -1
- package/dist/util/scripts.d.ts +7 -0
- package/dist/util/scripts.js +75 -0
- package/dist/util/to-source-path.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/schema.json +108 -1
- package/dist/plugins/next/resolveFromAST.d.ts +0 -2
- package/dist/plugins/next/resolveFromAST.js +0 -2
- package/dist/plugins/nuxt/helpers.d.ts +0 -15
- package/dist/plugins/nuxt/helpers.js +0 -133
- package/dist/plugins/rolldown/resolveFromAST.d.ts +0 -2
- package/dist/plugins/rolldown/resolveFromAST.js +0 -4
- package/dist/plugins/rollup/resolveFromAST.d.ts +0 -2
- package/dist/plugins/rollup/resolveFromAST.js +0 -4
- package/dist/plugins/rslib/resolveFromAST.d.ts +0 -2
- package/dist/plugins/rslib/resolveFromAST.js +0 -4
- package/dist/plugins/tsdown/resolveFromAST.d.ts +0 -2
- package/dist/plugins/tsdown/resolveFromAST.js +0 -4
- package/dist/plugins/tsup/resolveFromAST.d.ts +0 -2
- package/dist/plugins/tsup/resolveFromAST.js +0 -4
- package/dist/plugins/vue/compiler.d.ts +0 -3
- package/dist/plugins/vue/compiler.js +0 -10
|
@@ -197,16 +197,31 @@ export declare class ConfigurationChief {
|
|
|
197
197
|
entry?: string | string[] | undefined;
|
|
198
198
|
project?: string | string[] | undefined;
|
|
199
199
|
} | undefined;
|
|
200
|
+
'electron-vite'?: string | boolean | string[] | {
|
|
201
|
+
config?: string | string[] | undefined;
|
|
202
|
+
entry?: string | string[] | undefined;
|
|
203
|
+
project?: string | string[] | undefined;
|
|
204
|
+
} | undefined;
|
|
200
205
|
eleventy?: string | boolean | string[] | {
|
|
201
206
|
config?: string | string[] | undefined;
|
|
202
207
|
entry?: string | string[] | undefined;
|
|
203
208
|
project?: string | string[] | undefined;
|
|
204
209
|
} | undefined;
|
|
210
|
+
esbuild?: string | boolean | string[] | {
|
|
211
|
+
config?: string | string[] | undefined;
|
|
212
|
+
entry?: string | string[] | undefined;
|
|
213
|
+
project?: string | string[] | undefined;
|
|
214
|
+
} | undefined;
|
|
205
215
|
eslint?: string | boolean | string[] | {
|
|
206
216
|
config?: string | string[] | undefined;
|
|
207
217
|
entry?: string | string[] | undefined;
|
|
208
218
|
project?: string | string[] | undefined;
|
|
209
219
|
} | undefined;
|
|
220
|
+
eve?: string | boolean | string[] | {
|
|
221
|
+
config?: string | string[] | undefined;
|
|
222
|
+
entry?: string | string[] | undefined;
|
|
223
|
+
project?: string | string[] | undefined;
|
|
224
|
+
} | undefined;
|
|
210
225
|
execa?: string | boolean | string[] | {
|
|
211
226
|
config?: string | string[] | undefined;
|
|
212
227
|
entry?: string | string[] | undefined;
|
|
@@ -227,6 +242,11 @@ export declare class ConfigurationChief {
|
|
|
227
242
|
entry?: string | string[] | undefined;
|
|
228
243
|
project?: string | string[] | undefined;
|
|
229
244
|
} | undefined;
|
|
245
|
+
fumadocs?: string | boolean | string[] | {
|
|
246
|
+
config?: string | string[] | undefined;
|
|
247
|
+
entry?: string | string[] | undefined;
|
|
248
|
+
project?: string | string[] | undefined;
|
|
249
|
+
} | undefined;
|
|
230
250
|
gatsby?: string | boolean | string[] | {
|
|
231
251
|
config?: string | string[] | undefined;
|
|
232
252
|
entry?: string | string[] | undefined;
|
|
@@ -287,6 +307,11 @@ export declare class ConfigurationChief {
|
|
|
287
307
|
entry?: string | string[] | undefined;
|
|
288
308
|
project?: string | string[] | undefined;
|
|
289
309
|
} | undefined;
|
|
310
|
+
'laravel-vite-plugin'?: string | boolean | string[] | {
|
|
311
|
+
config?: string | string[] | undefined;
|
|
312
|
+
entry?: string | string[] | undefined;
|
|
313
|
+
project?: string | string[] | undefined;
|
|
314
|
+
} | undefined;
|
|
290
315
|
lefthook?: string | boolean | string[] | {
|
|
291
316
|
config?: string | string[] | undefined;
|
|
292
317
|
entry?: string | string[] | undefined;
|
|
@@ -422,6 +447,11 @@ export declare class ConfigurationChief {
|
|
|
422
447
|
entry?: string | string[] | undefined;
|
|
423
448
|
project?: string | string[] | undefined;
|
|
424
449
|
} | undefined;
|
|
450
|
+
'nuxtjs-i18n'?: string | boolean | string[] | {
|
|
451
|
+
config?: string | string[] | undefined;
|
|
452
|
+
entry?: string | string[] | undefined;
|
|
453
|
+
project?: string | string[] | undefined;
|
|
454
|
+
} | undefined;
|
|
425
455
|
nx?: string | boolean | string[] | {
|
|
426
456
|
config?: string | string[] | undefined;
|
|
427
457
|
entry?: string | string[] | undefined;
|
|
@@ -527,6 +557,11 @@ export declare class ConfigurationChief {
|
|
|
527
557
|
entry?: string | string[] | undefined;
|
|
528
558
|
project?: string | string[] | undefined;
|
|
529
559
|
} | undefined;
|
|
560
|
+
quasar?: string | boolean | string[] | {
|
|
561
|
+
config?: string | string[] | undefined;
|
|
562
|
+
entry?: string | string[] | undefined;
|
|
563
|
+
project?: string | string[] | undefined;
|
|
564
|
+
} | undefined;
|
|
530
565
|
qwik?: string | boolean | string[] | {
|
|
531
566
|
config?: string | string[] | undefined;
|
|
532
567
|
entry?: string | string[] | undefined;
|
|
@@ -717,6 +752,11 @@ export declare class ConfigurationChief {
|
|
|
717
752
|
entry?: string | string[] | undefined;
|
|
718
753
|
project?: string | string[] | undefined;
|
|
719
754
|
} | undefined;
|
|
755
|
+
tauri?: string | boolean | string[] | {
|
|
756
|
+
config?: string | string[] | undefined;
|
|
757
|
+
entry?: string | string[] | undefined;
|
|
758
|
+
project?: string | string[] | undefined;
|
|
759
|
+
} | undefined;
|
|
720
760
|
travis?: string | boolean | string[] | {
|
|
721
761
|
config?: string | string[] | undefined;
|
|
722
762
|
entry?: string | string[] | undefined;
|
|
@@ -762,6 +802,36 @@ export declare class ConfigurationChief {
|
|
|
762
802
|
entry?: string | string[] | undefined;
|
|
763
803
|
project?: string | string[] | undefined;
|
|
764
804
|
} | undefined;
|
|
805
|
+
'unplugin-auto-import'?: string | boolean | string[] | {
|
|
806
|
+
config?: string | string[] | undefined;
|
|
807
|
+
entry?: string | string[] | undefined;
|
|
808
|
+
project?: string | string[] | undefined;
|
|
809
|
+
} | undefined;
|
|
810
|
+
'unplugin-icons'?: string | boolean | string[] | {
|
|
811
|
+
config?: string | string[] | undefined;
|
|
812
|
+
entry?: string | string[] | undefined;
|
|
813
|
+
project?: string | string[] | undefined;
|
|
814
|
+
} | undefined;
|
|
815
|
+
'unplugin-vue-components'?: string | boolean | string[] | {
|
|
816
|
+
config?: string | string[] | undefined;
|
|
817
|
+
entry?: string | string[] | undefined;
|
|
818
|
+
project?: string | string[] | undefined;
|
|
819
|
+
} | undefined;
|
|
820
|
+
'unplugin-vue-i18n'?: string | boolean | string[] | {
|
|
821
|
+
config?: string | string[] | undefined;
|
|
822
|
+
entry?: string | string[] | undefined;
|
|
823
|
+
project?: string | string[] | undefined;
|
|
824
|
+
} | undefined;
|
|
825
|
+
'unplugin-vue-markdown'?: string | boolean | string[] | {
|
|
826
|
+
config?: string | string[] | undefined;
|
|
827
|
+
entry?: string | string[] | undefined;
|
|
828
|
+
project?: string | string[] | undefined;
|
|
829
|
+
} | undefined;
|
|
830
|
+
'unplugin-vue-router'?: string | boolean | string[] | {
|
|
831
|
+
config?: string | string[] | undefined;
|
|
832
|
+
entry?: string | string[] | undefined;
|
|
833
|
+
project?: string | string[] | undefined;
|
|
834
|
+
} | undefined;
|
|
765
835
|
vercel?: string | boolean | string[] | {
|
|
766
836
|
config?: string | string[] | undefined;
|
|
767
837
|
entry?: string | string[] | undefined;
|
|
@@ -782,6 +852,31 @@ export declare class ConfigurationChief {
|
|
|
782
852
|
entry?: string | string[] | undefined;
|
|
783
853
|
project?: string | string[] | undefined;
|
|
784
854
|
} | undefined;
|
|
855
|
+
'vite-plugin-pages'?: string | boolean | string[] | {
|
|
856
|
+
config?: string | string[] | undefined;
|
|
857
|
+
entry?: string | string[] | undefined;
|
|
858
|
+
project?: string | string[] | undefined;
|
|
859
|
+
} | undefined;
|
|
860
|
+
'vite-plugin-pwa'?: string | boolean | string[] | {
|
|
861
|
+
config?: string | string[] | undefined;
|
|
862
|
+
entry?: string | string[] | undefined;
|
|
863
|
+
project?: string | string[] | undefined;
|
|
864
|
+
} | undefined;
|
|
865
|
+
'vite-plugin-vue-layouts-next'?: string | boolean | string[] | {
|
|
866
|
+
config?: string | string[] | undefined;
|
|
867
|
+
entry?: string | string[] | undefined;
|
|
868
|
+
project?: string | string[] | undefined;
|
|
869
|
+
} | undefined;
|
|
870
|
+
'vite-plus'?: string | boolean | string[] | {
|
|
871
|
+
config?: string | string[] | undefined;
|
|
872
|
+
entry?: string | string[] | undefined;
|
|
873
|
+
project?: string | string[] | undefined;
|
|
874
|
+
} | undefined;
|
|
875
|
+
'vite-pwa-assets-generator'?: string | boolean | string[] | {
|
|
876
|
+
config?: string | string[] | undefined;
|
|
877
|
+
entry?: string | string[] | undefined;
|
|
878
|
+
project?: string | string[] | undefined;
|
|
879
|
+
} | undefined;
|
|
785
880
|
vitepress?: string | boolean | string[] | {
|
|
786
881
|
config?: string | string[] | undefined;
|
|
787
882
|
entry?: string | string[] | undefined;
|
|
@@ -852,7 +947,7 @@ export declare class ConfigurationChief {
|
|
|
852
947
|
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
853
948
|
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
854
949
|
ignoreExportsUsedInFile?: boolean | Record<string, boolean | undefined> | undefined;
|
|
855
|
-
ignoreIssues?: Record<string, ("binaries" | "catalog" | "dependencies" | "devDependencies" | "duplicates" | "enumMembers" | "exports" | "files" | "namespaceMembers" | "nsExports" | "nsTypes" | "optionalPeerDependencies" | "types" | "unlisted" | "unresolved")[]> | undefined;
|
|
950
|
+
ignoreIssues?: Record<string, ("binaries" | "catalog" | "cycles" | "dependencies" | "devDependencies" | "duplicates" | "enumMembers" | "exports" | "files" | "namespaceMembers" | "nsExports" | "nsTypes" | "optionalPeerDependencies" | "types" | "unlisted" | "unresolved")[]> | undefined;
|
|
856
951
|
includeEntryExports?: boolean | undefined;
|
|
857
952
|
};
|
|
858
953
|
getIgnores(workspaceName: string): {
|
|
@@ -897,12 +992,16 @@ export declare class ConfigurationChief {
|
|
|
897
992
|
docusaurus?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
898
993
|
dotenv?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
899
994
|
drizzle?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
995
|
+
"electron-vite"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
900
996
|
eleventy?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
997
|
+
esbuild?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
901
998
|
eslint?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
999
|
+
eve?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
902
1000
|
execa?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
903
1001
|
expo?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
904
1002
|
"expressive-code"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
905
1003
|
fast?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1004
|
+
fumadocs?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
906
1005
|
gatsby?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
907
1006
|
"github-action"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
908
1007
|
"github-actions"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -915,6 +1014,7 @@ export declare class ConfigurationChief {
|
|
|
915
1014
|
karma?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
916
1015
|
knex?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
917
1016
|
ladle?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1017
|
+
"laravel-vite-plugin"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
918
1018
|
lefthook?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
919
1019
|
"lint-staged"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
920
1020
|
linthtml?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -942,6 +1042,7 @@ export declare class ConfigurationChief {
|
|
|
942
1042
|
nodemon?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
943
1043
|
"npm-package-json-lint"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
944
1044
|
nuxt?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1045
|
+
"nuxtjs-i18n"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
945
1046
|
nx?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
946
1047
|
nyc?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
947
1048
|
oclif?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -963,6 +1064,7 @@ export declare class ConfigurationChief {
|
|
|
963
1064
|
preconstruct?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
964
1065
|
prettier?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
965
1066
|
prisma?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1067
|
+
quasar?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
966
1068
|
qwik?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
967
1069
|
raycast?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
968
1070
|
"react-cosmos"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -1001,6 +1103,7 @@ export declare class ConfigurationChief {
|
|
|
1001
1103
|
tailwind?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1002
1104
|
"tanstack-router"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1003
1105
|
taskfile?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1106
|
+
tauri?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1004
1107
|
travis?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1005
1108
|
"ts-node"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1006
1109
|
tsdown?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -1010,10 +1113,21 @@ export declare class ConfigurationChief {
|
|
|
1010
1113
|
typescript?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1011
1114
|
unbuild?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1012
1115
|
unocss?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1116
|
+
"unplugin-auto-import"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1117
|
+
"unplugin-icons"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1118
|
+
"unplugin-vue-components"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1119
|
+
"unplugin-vue-i18n"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1120
|
+
"unplugin-vue-markdown"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1121
|
+
"unplugin-vue-router"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1013
1122
|
vercel?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1014
1123
|
"vercel-og"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1015
1124
|
vike?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1016
1125
|
vite?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1126
|
+
"vite-plugin-pages"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1127
|
+
"vite-plugin-pwa"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1128
|
+
"vite-plugin-vue-layouts-next"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1129
|
+
"vite-plus"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1130
|
+
"vite-pwa-assets-generator"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1017
1131
|
vitepress?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1018
1132
|
vitest?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
1019
1133
|
vue?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -34,6 +34,7 @@ const defaultConfig = {
|
|
|
34
34
|
ignoreBinaries: [],
|
|
35
35
|
ignoreDependencies: [],
|
|
36
36
|
ignoreFiles: [],
|
|
37
|
+
cycles: {},
|
|
37
38
|
ignoreIssues: {},
|
|
38
39
|
ignoreMembers: [],
|
|
39
40
|
ignoreUnresolved: [],
|
|
@@ -103,6 +104,7 @@ export class ConfigurationChief {
|
|
|
103
104
|
const ignoreMembers = rawConfig.ignoreMembers ?? [];
|
|
104
105
|
const ignoreUnresolved = rawConfig.ignoreUnresolved ?? [];
|
|
105
106
|
const ignoreExportsUsedInFile = rawConfig.ignoreExportsUsedInFile ?? false;
|
|
107
|
+
const cycles = rawConfig.cycles ?? {};
|
|
106
108
|
const ignoreIssues = rawConfig.ignoreIssues ?? {};
|
|
107
109
|
const ignoreWorkspaces = rawConfig.ignoreWorkspaces ?? defaultConfig.ignoreWorkspaces;
|
|
108
110
|
const isIncludeEntryExports = rawConfig.includeEntryExports ?? this.isIncludeEntryExports;
|
|
@@ -116,6 +118,7 @@ export class ConfigurationChief {
|
|
|
116
118
|
return {
|
|
117
119
|
ignore,
|
|
118
120
|
ignoreFiles,
|
|
121
|
+
cycles,
|
|
119
122
|
ignoreBinaries,
|
|
120
123
|
ignoreDependencies,
|
|
121
124
|
ignoreMembers,
|
|
@@ -4,6 +4,7 @@ import type { AsyncCompilers, SyncCompilers } from './compilers/types.ts';
|
|
|
4
4
|
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile, PluginVisitorContext, PluginVisitorObject } from './types/config.ts';
|
|
5
5
|
import type { FileNode, ModuleGraph } from './types/module-graph.ts';
|
|
6
6
|
import type { Paths } from './types/project.ts';
|
|
7
|
+
import type { ResolveGlobPattern } from './typescript/resolve-module-names.ts';
|
|
7
8
|
import { SourceFileManager } from './typescript/SourceFileManager.ts';
|
|
8
9
|
import type { MainOptions } from './util/create-options.ts';
|
|
9
10
|
import type { ToSourceFilePath, WorkspaceManifestHandler } from './util/to-source-path.ts';
|
|
@@ -27,6 +28,7 @@ export declare class ProjectPrincipal {
|
|
|
27
28
|
private findWorkspaceManifestImports;
|
|
28
29
|
fileManager: SourceFileManager;
|
|
29
30
|
private resolveModule;
|
|
31
|
+
resolveGlobPattern: ResolveGlobPattern;
|
|
30
32
|
resolvedFiles: Set<string>;
|
|
31
33
|
deletedFiles: Set<string>;
|
|
32
34
|
private onPathAdded;
|
package/dist/ProjectPrincipal.js
CHANGED
|
@@ -6,7 +6,7 @@ import { DEFAULT_EXTENSIONS } from './constants.js';
|
|
|
6
6
|
import { _getImportsAndExports } from './typescript/get-imports-and-exports.js';
|
|
7
7
|
import { createBunShellVisitor } from './typescript/visitors/script-visitors.js';
|
|
8
8
|
import { buildVisitor } from './typescript/visitors/walk.js';
|
|
9
|
-
import { createCustomModuleResolver } from './typescript/resolve-module-names.js';
|
|
9
|
+
import { createCustomModuleResolver, createGlobAliasResolver } from './typescript/resolve-module-names.js';
|
|
10
10
|
import { SourceFileManager } from './typescript/SourceFileManager.js';
|
|
11
11
|
import { compact } from './util/array.js';
|
|
12
12
|
import { timerify } from './util/Performance.js';
|
|
@@ -21,6 +21,7 @@ export class ProjectPrincipal {
|
|
|
21
21
|
sourceText: '',
|
|
22
22
|
addScript: () => { },
|
|
23
23
|
addImport: () => { },
|
|
24
|
+
addImportGlob: () => { },
|
|
24
25
|
markExportRegistered: () => { },
|
|
25
26
|
};
|
|
26
27
|
pluginVisitorObjects = [];
|
|
@@ -37,6 +38,7 @@ export class ProjectPrincipal {
|
|
|
37
38
|
findWorkspaceManifestImports;
|
|
38
39
|
fileManager;
|
|
39
40
|
resolveModule = () => undefined;
|
|
41
|
+
resolveGlobPattern = pattern => [pattern];
|
|
40
42
|
resolvedFiles = new Set();
|
|
41
43
|
deletedFiles = new Set();
|
|
42
44
|
onPathAdded;
|
|
@@ -90,6 +92,7 @@ export class ProjectPrincipal {
|
|
|
90
92
|
const scopedPaths = this.paths.size > 0 ? Array.from(this.paths, ([scope, paths]) => ({ scope, paths })) : undefined;
|
|
91
93
|
const scopedRootDirs = this.rootDirs.size > 0 ? Array.from(this.rootDirs, ([scope, rootDirs]) => ({ scope, rootDirs })) : undefined;
|
|
92
94
|
this.resolveModule = createCustomModuleResolver({ scopedPaths, scopedRootDirs }, customCompilerExtensions, this.toSourceFilePath, this.findWorkspaceManifestImports, this.tsConfigFile);
|
|
95
|
+
this.resolveGlobPattern = createGlobAliasResolver(scopedPaths);
|
|
93
96
|
}
|
|
94
97
|
readFile(filePath) {
|
|
95
98
|
return this.fileManager.readFile(filePath);
|
|
@@ -5,6 +5,7 @@ import { toBinary, toDeferResolve } from '../util/input.js';
|
|
|
5
5
|
import { extractBinary, isValidBinary } from '../util/modules.js';
|
|
6
6
|
import { relative } from '../util/path.js';
|
|
7
7
|
import { truncate } from '../util/string.js';
|
|
8
|
+
import { walkCommands } from '../util/scripts.js';
|
|
8
9
|
import { resolve as fallbackResolve } from './fallback.js';
|
|
9
10
|
import KnownResolvers from './resolvers/index.js';
|
|
10
11
|
import { resolve as resolverFromPlugins } from './plugins.js';
|
|
@@ -46,93 +47,64 @@ export const getDependenciesFromScript = (script, options) => {
|
|
|
46
47
|
const processScript = (s) => {
|
|
47
48
|
collectFunctionNames(s.commands);
|
|
48
49
|
const pending = [];
|
|
49
|
-
const mainDeps =
|
|
50
|
+
const mainDeps = [];
|
|
51
|
+
for (const statement of s.commands) {
|
|
52
|
+
for (const command of walkCommands(statement.command))
|
|
53
|
+
mainDeps.push(...processCommand(command, pending));
|
|
54
|
+
}
|
|
50
55
|
const expansionDeps = pending.flatMap(inner => processScript(inner));
|
|
51
56
|
return [...mainDeps, ...expansionDeps];
|
|
52
57
|
};
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (binary in KnownResolvers) {
|
|
83
|
-
const resolver = KnownResolvers[binary];
|
|
84
|
-
return resolver(binary, args, { ...options, fromArgs });
|
|
85
|
-
}
|
|
86
|
-
if (pluginArgsMap.has(binary)) {
|
|
87
|
-
return [...resolverFromPlugins(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
88
|
-
}
|
|
89
|
-
if (spawningBinaries.includes(binary)) {
|
|
90
|
-
const rest = node.suffix
|
|
91
|
-
.filter(w => w.text !== '--')
|
|
92
|
-
.map(w => w.text)
|
|
93
|
-
.join(' ');
|
|
94
|
-
return [toBinary(binary), ...getDependenciesFromScript(rest, options)];
|
|
95
|
-
}
|
|
96
|
-
if (binary in Plugins) {
|
|
97
|
-
const inputs = fallbackResolve(binary, args, { ...options, fromArgs });
|
|
98
|
-
if (options.knownBinsOnly)
|
|
99
|
-
for (const input of inputs)
|
|
100
|
-
input.optional = true;
|
|
101
|
-
return [...inputs, ...fromNodeOptions];
|
|
102
|
-
}
|
|
103
|
-
if (options.knownBinsOnly && !text?.startsWith('.'))
|
|
104
|
-
return [];
|
|
105
|
-
return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
106
|
-
}
|
|
107
|
-
case 'AndOr':
|
|
108
|
-
case 'Pipeline':
|
|
109
|
-
return node.commands.flatMap(n => getDependenciesFromNode(n, pending));
|
|
110
|
-
case 'If':
|
|
111
|
-
return [
|
|
112
|
-
...getDependenciesFromStatements(node.clause.commands, pending),
|
|
113
|
-
...getDependenciesFromStatements(node.then.commands, pending),
|
|
114
|
-
...(node.else ? getDependenciesFromNode(node.else, pending) : []),
|
|
115
|
-
];
|
|
116
|
-
case 'While':
|
|
117
|
-
return [
|
|
118
|
-
...getDependenciesFromStatements(node.clause.commands, pending),
|
|
119
|
-
...getDependenciesFromStatements(node.body.commands, pending),
|
|
120
|
-
];
|
|
121
|
-
case 'For':
|
|
122
|
-
case 'Select':
|
|
123
|
-
case 'Subshell':
|
|
124
|
-
case 'BraceGroup':
|
|
125
|
-
return getDependenciesFromStatements(node.body.commands, pending);
|
|
126
|
-
case 'CompoundList':
|
|
127
|
-
return getDependenciesFromStatements(node.commands, pending);
|
|
128
|
-
case 'Function':
|
|
129
|
-
case 'Coproc':
|
|
130
|
-
return getDependenciesFromNode(node.body, pending);
|
|
131
|
-
case 'Statement':
|
|
132
|
-
return getDependenciesFromNode(node.command, pending);
|
|
133
|
-
default:
|
|
134
|
-
return [];
|
|
58
|
+
const processCommand = (node, pending) => {
|
|
59
|
+
const text = node.name?.value;
|
|
60
|
+
const binary = text ? extractBinary(text) : text;
|
|
61
|
+
if (node.name)
|
|
62
|
+
collectExpansionScripts(node.name, pending);
|
|
63
|
+
for (const prefix of node.prefix)
|
|
64
|
+
if (prefix.value)
|
|
65
|
+
collectExpansionScripts(prefix.value, pending);
|
|
66
|
+
for (const suffix of node.suffix)
|
|
67
|
+
collectExpansionScripts(suffix, pending);
|
|
68
|
+
if (!binary || binary === '.' || binary === 'source' || binary === '[')
|
|
69
|
+
return [];
|
|
70
|
+
if (binary.startsWith('-') || binary.startsWith('..'))
|
|
71
|
+
return [];
|
|
72
|
+
if (definedFunctions.has(binary))
|
|
73
|
+
return [];
|
|
74
|
+
const args = node.suffix.map(w => w.value);
|
|
75
|
+
if (['!', 'test'].includes(binary))
|
|
76
|
+
return fromArgs(args);
|
|
77
|
+
const fromNodeOptions = node.prefix
|
|
78
|
+
.filter(a => a.name === 'NODE_OPTIONS' && a.value)
|
|
79
|
+
.map(a => a.value.value)
|
|
80
|
+
.map(arg => parseNodeArgs(arg.split(' ')))
|
|
81
|
+
.filter(args => args.require)
|
|
82
|
+
.flatMap(arg => arg.require)
|
|
83
|
+
.map(id => toDeferResolve(id));
|
|
84
|
+
if (binary in KnownResolvers) {
|
|
85
|
+
const resolver = KnownResolvers[binary];
|
|
86
|
+
return resolver(binary, args, { ...options, fromArgs });
|
|
135
87
|
}
|
|
88
|
+
if (pluginArgsMap.has(binary)) {
|
|
89
|
+
return [...resolverFromPlugins(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
90
|
+
}
|
|
91
|
+
if (spawningBinaries.includes(binary)) {
|
|
92
|
+
const rest = node.suffix
|
|
93
|
+
.filter(w => w.text !== '--')
|
|
94
|
+
.map(w => w.text)
|
|
95
|
+
.join(' ');
|
|
96
|
+
return [toBinary(binary), ...getDependenciesFromScript(rest, options)];
|
|
97
|
+
}
|
|
98
|
+
if (binary in Plugins) {
|
|
99
|
+
const inputs = fallbackResolve(binary, args, { ...options, fromArgs });
|
|
100
|
+
if (options.knownBinsOnly)
|
|
101
|
+
for (const input of inputs)
|
|
102
|
+
input.optional = true;
|
|
103
|
+
return [...inputs, ...fromNodeOptions];
|
|
104
|
+
}
|
|
105
|
+
if (options.knownBinsOnly && !text?.startsWith('.'))
|
|
106
|
+
return [];
|
|
107
|
+
return [...fallbackResolve(binary, args, { ...options, fromArgs }), ...fromNodeOptions];
|
|
136
108
|
};
|
|
137
109
|
try {
|
|
138
110
|
const parsed = parse(script);
|
package/dist/binaries/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SCRIPT_INTERPOLATION } from '../constants.js';
|
|
1
2
|
import { fromBinary, isBinary, isDependency } from '../util/input.js';
|
|
2
3
|
import { timerify } from '../util/Performance.js';
|
|
3
4
|
import { getDependenciesFromScript } from './bash-parser.js';
|
|
@@ -8,6 +9,8 @@ const getInputsFromScripts = (npmScripts, options) => {
|
|
|
8
9
|
for (const input of results) {
|
|
9
10
|
if (!input.specifier)
|
|
10
11
|
continue;
|
|
12
|
+
if (input.specifier.includes(SCRIPT_INTERPOLATION))
|
|
13
|
+
continue;
|
|
11
14
|
if (isDependency(input) && input.specifier.startsWith('http'))
|
|
12
15
|
continue;
|
|
13
16
|
if (isBinary(input) && !/^\b/.test(fromBinary(input)))
|