knip 6.42.1 → 6.44.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/CacheConsultant.d.ts +1 -0
- package/dist/CacheConsultant.js +2 -0
- package/dist/CatalogCounselor.d.ts +1 -3
- package/dist/CatalogCounselor.js +18 -15
- package/dist/ConfigurationChief.d.ts +42 -0
- package/dist/DependencyDeputy.d.ts +2 -1
- package/dist/DependencyDeputy.js +9 -4
- package/dist/IssueCollector.js +1 -0
- package/dist/IssueFixer.js +10 -5
- package/dist/ProjectPrincipal.d.ts +3 -2
- package/dist/ProjectPrincipal.js +32 -10
- package/dist/WorkspaceWorker.d.ts +5 -2
- package/dist/WorkspaceWorker.js +35 -17
- package/dist/binaries/resolvers/bun.js +1 -0
- package/dist/binaries/resolvers/npm.js +12 -2
- package/dist/binaries/resolvers/pnpm.js +5 -3
- package/dist/binaries/util.js +2 -1
- package/dist/cli.js +6 -1
- package/dist/compilers/compilers.js +2 -2
- package/dist/compilers/index.d.ts +5 -0
- package/dist/compilers/index.js +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -0
- package/dist/graph/analyze.js +3 -2
- package/dist/graph/build.d.ts +2 -0
- package/dist/graph/build.js +37 -22
- package/dist/graph-explorer/cache.d.ts +2 -1
- package/dist/graph-explorer/cache.js +5 -1
- package/dist/graph-explorer/explorer.d.ts +3 -5
- package/dist/graph-explorer/explorer.js +24 -3
- package/dist/plugins/_vue/auto-import.js +31 -1
- package/dist/plugins/biome/index.js +1 -1
- package/dist/plugins/buf/index.d.ts +3 -0
- package/dist/plugins/buf/index.js +33 -0
- package/dist/plugins/buf/types.d.ts +8 -0
- package/dist/plugins/buf/types.js +1 -0
- package/dist/plugins/cspell/index.js +1 -0
- package/dist/plugins/dependency-cruiser/index.js +2 -2
- package/dist/plugins/docusaurus/helpers.js +4 -4
- package/dist/plugins/electron-forge/index.d.ts +3 -0
- package/dist/plugins/electron-forge/index.js +94 -0
- package/dist/plugins/electron-vite/index.js +2 -2
- package/dist/plugins/eslint/helpers.d.ts +1 -0
- package/dist/plugins/eslint/helpers.js +1 -1
- package/dist/plugins/eslint/resolveFromAST.js +35 -10
- package/dist/plugins/expo/helpers.d.ts +1 -1
- package/dist/plugins/expo/helpers.js +15 -8
- package/dist/plugins/expo/types.d.ts +2 -1
- package/dist/plugins/expressive-code/index.d.ts +1 -1
- package/dist/plugins/expressive-code/index.js +2 -2
- package/dist/plugins/gatsby/index.js +6 -6
- package/dist/plugins/gatsby/types.d.ts +1 -1
- package/dist/plugins/github-actions/index.js +1 -1
- package/dist/plugins/i18next-parser/index.js +2 -2
- package/dist/plugins/index.d.ts +8 -1
- package/dist/plugins/index.js +14 -0
- package/dist/plugins/jasmine/index.js +2 -2
- package/dist/plugins/karma/index.js +4 -4
- package/dist/plugins/kysely-codegen/index.d.ts +3 -0
- package/dist/plugins/kysely-codegen/index.js +20 -0
- package/dist/plugins/lefthook/index.js +2 -2
- package/dist/plugins/lingui/index.d.ts +3 -0
- package/dist/plugins/lingui/index.js +16 -0
- package/dist/plugins/lockfile-lint/index.js +2 -2
- package/dist/plugins/lost-pixel/index.js +2 -2
- package/dist/plugins/lunaria/index.js +2 -2
- package/dist/plugins/marko/index.js +5 -6
- package/dist/plugins/mastra/index.d.ts +3 -0
- package/dist/plugins/mastra/index.js +57 -0
- package/dist/plugins/mcp/index.d.ts +3 -0
- package/dist/plugins/mcp/index.js +33 -0
- package/dist/plugins/mcp/types.d.ts +11 -0
- package/dist/plugins/mcp/types.js +1 -0
- package/dist/plugins/mise/index.js +0 -3
- package/dist/plugins/mocha/index.js +42 -3
- package/dist/plugins/mocha/types.d.ts +1 -0
- package/dist/plugins/next/index.d.ts +3 -0
- package/dist/plugins/next/index.js +57 -9
- package/dist/plugins/next/types.d.ts +11 -0
- package/dist/plugins/next/types.js +1 -0
- package/dist/plugins/nx/index.js +3 -8
- package/dist/plugins/nyc/index.js +1 -1
- package/dist/plugins/openapi-ts/index.js +2 -2
- package/dist/plugins/oxfmt/index.js +2 -2
- package/dist/plugins/playwright/index.js +6 -11
- package/dist/plugins/pnpm/index.js +2 -4
- package/dist/plugins/purgecss/index.d.ts +3 -0
- package/dist/plugins/purgecss/index.js +16 -0
- package/dist/plugins/railway/index.js +1 -4
- package/dist/plugins/remix/index.js +1 -1
- package/dist/plugins/rstest/index.js +2 -2
- package/dist/plugins/serverless-framework/index.js +1 -1
- package/dist/plugins/storybook/index.js +5 -5
- package/dist/plugins/sveltekit/resolveFromAST.js +1 -1
- package/dist/plugins/syncpack/index.js +2 -2
- package/dist/plugins/tailwind/compiler.js +6 -2
- package/dist/plugins/tanstack-router/index.js +3 -2
- package/dist/plugins/taskfile/index.js +4 -7
- package/dist/plugins/textlint/helpers.js +2 -2
- package/dist/plugins/travis/index.js +2 -2
- package/dist/plugins/typescript/index.js +9 -7
- package/dist/plugins/unocss/index.js +2 -2
- package/dist/plugins/vite-plugin-pwa/index.js +1 -4
- package/dist/plugins/vite-plugin-pwa/resolveFromAST.d.ts +0 -2
- package/dist/plugins/vite-plugin-pwa/resolveFromAST.js +2 -2
- package/dist/plugins/vite-pwa-assets-generator/index.js +2 -2
- package/dist/plugins/vitest/helpers.d.ts +1 -1
- package/dist/plugins/vitest/helpers.js +17 -10
- package/dist/plugins/vitest/index.js +53 -45
- package/dist/plugins/vitest/types.d.ts +11 -7
- package/dist/plugins/webpack/index.js +4 -2
- package/dist/plugins/yarn/index.js +2 -4
- package/dist/reporters/codeclimate.d.ts +2 -2
- package/dist/reporters/codeclimate.js +2 -4
- package/dist/reporters/codeowners.d.ts +2 -2
- package/dist/reporters/codeowners.js +9 -9
- package/dist/reporters/compact.d.ts +2 -2
- package/dist/reporters/compact.js +8 -7
- package/dist/reporters/cycles.d.ts +2 -2
- package/dist/reporters/cycles.js +7 -6
- package/dist/reporters/disclosure.d.ts +2 -2
- package/dist/reporters/disclosure.js +6 -4
- package/dist/reporters/github-actions.d.ts +2 -2
- package/dist/reporters/github-actions.js +7 -5
- package/dist/reporters/index.d.ts +10 -10
- package/dist/reporters/json.d.ts +2 -2
- package/dist/reporters/json.js +2 -4
- package/dist/reporters/markdown.d.ts +2 -2
- package/dist/reporters/markdown.js +11 -9
- package/dist/reporters/sarif.d.ts +2 -2
- package/dist/reporters/sarif.js +2 -3
- package/dist/reporters/symbols.d.ts +2 -2
- package/dist/reporters/symbols.js +6 -4
- package/dist/run.d.ts +1 -1
- package/dist/run.js +3 -10
- package/dist/schema/configuration.d.ts +105 -0
- package/dist/schema/plugins.d.ts +35 -0
- package/dist/schema/plugins.js +7 -0
- package/dist/session/configuration.d.ts +12 -0
- package/dist/session/configuration.js +43 -0
- package/dist/session/incremental.d.ts +54 -0
- package/dist/session/incremental.js +49 -0
- package/dist/session/session.d.ts +1 -1
- package/dist/session/session.js +62 -27
- package/dist/session/watch.d.ts +2 -0
- package/dist/session/watch.js +41 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +7 -0
- package/dist/types/config.d.ts +2 -0
- package/dist/types/issues.d.ts +4 -0
- package/dist/types/package-json.d.ts +0 -3
- package/dist/typescript/ast-nodes.js +3 -3
- package/dist/typescript/get-imports-and-exports.js +2 -0
- package/dist/typescript/visitors/calls.js +15 -11
- package/dist/typescript/visitors/exports.js +5 -4
- package/dist/typescript/visitors/imports.d.ts +2 -1
- package/dist/typescript/visitors/imports.js +25 -19
- package/dist/typescript/visitors/members.js +23 -26
- package/dist/typescript/visitors/walk.d.ts +3 -0
- package/dist/typescript/visitors/walk.js +55 -3
- package/dist/util/cli-arguments.d.ts +2 -1
- package/dist/util/cli-arguments.js +3 -0
- package/dist/util/create-input-handler.js +1 -1
- package/dist/util/create-options.d.ts +72 -1
- package/dist/util/create-options.js +13 -2
- package/dist/util/file-entry-cache.d.ts +2 -0
- package/dist/util/file-entry-cache.js +19 -1
- package/dist/util/gitignore-cache.d.ts +1 -0
- package/dist/util/gitignore-cache.js +1 -0
- package/dist/util/glob-core.js +4 -2
- package/dist/util/glob.d.ts +1 -0
- package/dist/util/glob.js +6 -0
- package/dist/util/input.d.ts +2 -0
- package/dist/util/loader.d.ts +1 -0
- package/dist/util/loader.js +38 -2
- package/dist/util/modules.js +5 -2
- package/dist/util/path.d.ts +1 -0
- package/dist/util/path.js +1 -0
- package/dist/util/remove-export.js +3 -1
- package/dist/util/reporter.d.ts +1 -1
- package/dist/util/reporter.js +53 -9
- package/dist/util/watch.d.ts +5 -11
- package/dist/util/watch.js +84 -68
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/schema.json +28 -0
package/dist/schema/plugins.d.ts
CHANGED
|
@@ -51,6 +51,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
51
51
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
52
52
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
53
53
|
}, z.core.$strip>]>;
|
|
54
|
+
buf: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
55
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
56
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
57
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
58
|
+
}, z.core.$strip>]>;
|
|
54
59
|
bumpp: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
55
60
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
56
61
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -151,6 +156,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
151
156
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
152
157
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
153
158
|
}, z.core.$strip>]>;
|
|
159
|
+
'electron-forge': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
160
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
161
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
162
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
163
|
+
}, z.core.$strip>]>;
|
|
154
164
|
'electron-vite': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
155
165
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
156
166
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -276,6 +286,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
276
286
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
277
287
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
278
288
|
}, z.core.$strip>]>;
|
|
289
|
+
'kysely-codegen': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
290
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
291
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
292
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
293
|
+
}, z.core.$strip>]>;
|
|
279
294
|
ladle: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
280
295
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
281
296
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -291,6 +306,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
291
306
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
292
307
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
293
308
|
}, z.core.$strip>]>;
|
|
309
|
+
lingui: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
310
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
311
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
312
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
313
|
+
}, z.core.$strip>]>;
|
|
294
314
|
'lint-staged': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
295
315
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
296
316
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -331,6 +351,16 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
331
351
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
332
352
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
333
353
|
}, z.core.$strip>]>;
|
|
354
|
+
mastra: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
355
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
356
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
357
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
358
|
+
}, z.core.$strip>]>;
|
|
359
|
+
mcp: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
360
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
361
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
362
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
363
|
+
}, z.core.$strip>]>;
|
|
334
364
|
mdx: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
335
365
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
336
366
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -556,6 +586,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
556
586
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
557
587
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
558
588
|
}, z.core.$strip>]>;
|
|
589
|
+
purgecss: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
590
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
591
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
592
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
593
|
+
}, z.core.$strip>]>;
|
|
559
594
|
quasar: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
560
595
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
561
596
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.js
CHANGED
|
@@ -19,6 +19,7 @@ export const pluginsSchema = z.object({
|
|
|
19
19
|
babel: pluginSchema,
|
|
20
20
|
biome: pluginSchema,
|
|
21
21
|
borp: pluginSchema,
|
|
22
|
+
buf: pluginSchema,
|
|
22
23
|
bumpp: pluginSchema,
|
|
23
24
|
bun: pluginSchema,
|
|
24
25
|
c8: pluginSchema,
|
|
@@ -39,6 +40,7 @@ export const pluginsSchema = z.object({
|
|
|
39
40
|
docusaurus: pluginSchema,
|
|
40
41
|
dotenv: pluginSchema,
|
|
41
42
|
drizzle: pluginSchema,
|
|
43
|
+
'electron-forge': pluginSchema,
|
|
42
44
|
'electron-vite': pluginSchema,
|
|
43
45
|
eleventy: pluginSchema,
|
|
44
46
|
esbuild: pluginSchema,
|
|
@@ -64,9 +66,11 @@ export const pluginsSchema = z.object({
|
|
|
64
66
|
jest: pluginSchema,
|
|
65
67
|
karma: pluginSchema,
|
|
66
68
|
knex: pluginSchema,
|
|
69
|
+
'kysely-codegen': pluginSchema,
|
|
67
70
|
ladle: pluginSchema,
|
|
68
71
|
'laravel-vite-plugin': pluginSchema,
|
|
69
72
|
lefthook: pluginSchema,
|
|
73
|
+
lingui: pluginSchema,
|
|
70
74
|
'lint-staged': pluginSchema,
|
|
71
75
|
linthtml: pluginSchema,
|
|
72
76
|
lit: pluginSchema,
|
|
@@ -75,6 +79,8 @@ export const pluginsSchema = z.object({
|
|
|
75
79
|
lunaria: pluginSchema,
|
|
76
80
|
markdownlint: pluginSchema,
|
|
77
81
|
marko: pluginSchema,
|
|
82
|
+
mastra: pluginSchema,
|
|
83
|
+
mcp: pluginSchema,
|
|
78
84
|
mdx: pluginSchema,
|
|
79
85
|
mdxlint: pluginSchema,
|
|
80
86
|
metro: pluginSchema,
|
|
@@ -120,6 +126,7 @@ export const pluginsSchema = z.object({
|
|
|
120
126
|
preconstruct: pluginSchema,
|
|
121
127
|
prettier: pluginSchema,
|
|
122
128
|
prisma: pluginSchema,
|
|
129
|
+
purgecss: pluginSchema,
|
|
123
130
|
quasar: pluginSchema,
|
|
124
131
|
qwik: pluginSchema,
|
|
125
132
|
railway: pluginSchema,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { MainOptions } from '../util/create-options.ts';
|
|
2
|
+
import type { WatchChange } from '../util/watch.ts';
|
|
3
|
+
export declare class SessionConfigurationChangedError extends Error {
|
|
4
|
+
constructor(filePath: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class ConfigurationFiles {
|
|
7
|
+
paths: Set<string>;
|
|
8
|
+
private matchers;
|
|
9
|
+
constructor(options: MainOptions);
|
|
10
|
+
addPatterns(dir: string, patterns: string[]): void;
|
|
11
|
+
getChange(changes: WatchChange[], cwd: string): SessionConfigurationChangedError | undefined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import picomatch from 'picomatch';
|
|
2
|
+
import { KNIP_CONFIG_LOCATIONS } from '../constants.js';
|
|
3
|
+
import { isAbsolute, isInNodeModules, join, relative, toAbsolute, toPosix, toRelative } from '../util/path.js';
|
|
4
|
+
export class SessionConfigurationChangedError extends Error {
|
|
5
|
+
constructor(filePath) {
|
|
6
|
+
super(`Configuration changed (${filePath})`);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class ConfigurationFiles {
|
|
10
|
+
paths = new Set();
|
|
11
|
+
matchers = [];
|
|
12
|
+
constructor(options) {
|
|
13
|
+
const manifests = [];
|
|
14
|
+
for (const pattern of options.workspaces)
|
|
15
|
+
manifests.push(join(pattern, 'package.json'));
|
|
16
|
+
this.addPatterns(options.cwd, [...KNIP_CONFIG_LOCATIONS, 'pnpm-workspace.yaml', '**/.gitignore', ...manifests]);
|
|
17
|
+
if (options.configFilePath)
|
|
18
|
+
this.paths.add(options.configFilePath);
|
|
19
|
+
for (const filePath of options.preprocessorInputs)
|
|
20
|
+
if (isAbsolute(filePath))
|
|
21
|
+
this.paths.add(filePath);
|
|
22
|
+
}
|
|
23
|
+
addPatterns(dir, patterns) {
|
|
24
|
+
const included = [];
|
|
25
|
+
const excluded = [];
|
|
26
|
+
for (const pattern of patterns) {
|
|
27
|
+
if (pattern.startsWith('!'))
|
|
28
|
+
excluded.push(toRelative(pattern.slice(1), dir));
|
|
29
|
+
else
|
|
30
|
+
included.push(toRelative(pattern, dir));
|
|
31
|
+
}
|
|
32
|
+
if (included.length > 0)
|
|
33
|
+
this.matchers.push({ dir, isMatch: picomatch(included, { dot: true, ignore: excluded }) });
|
|
34
|
+
}
|
|
35
|
+
getChange(changes, cwd) {
|
|
36
|
+
for (const change of changes) {
|
|
37
|
+
const filePath = toAbsolute(toPosix(change.filePath), cwd);
|
|
38
|
+
if (this.paths.has(filePath) ||
|
|
39
|
+
(!isInNodeModules(filePath) && this.matchers.some(({ dir, isMatch }) => isMatch(relative(dir, filePath)))))
|
|
40
|
+
return new SessionConfigurationChangedError(toRelative(filePath, cwd));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { FileNode } from '../types/module-graph.ts';
|
|
2
|
+
export declare const isIncrementalFile: (file: FileNode) => boolean;
|
|
3
|
+
export declare const getFileTopology: (file: FileNode) => {
|
|
4
|
+
internal: import("../types/module-graph.ts").ImportMap;
|
|
5
|
+
paths: string[];
|
|
6
|
+
imports: {
|
|
7
|
+
specifier: string;
|
|
8
|
+
filePath: string | undefined;
|
|
9
|
+
identifier: string | undefined;
|
|
10
|
+
alias: string | undefined;
|
|
11
|
+
isTypeOnly: boolean;
|
|
12
|
+
modifiers: number;
|
|
13
|
+
jsDocTags: Set<string> | undefined;
|
|
14
|
+
}[];
|
|
15
|
+
external: {
|
|
16
|
+
specifier: string;
|
|
17
|
+
filePath: string | undefined;
|
|
18
|
+
identifier: string | undefined;
|
|
19
|
+
alias: string | undefined;
|
|
20
|
+
isTypeOnly: boolean;
|
|
21
|
+
modifiers: number;
|
|
22
|
+
jsDocTags: Set<string> | undefined;
|
|
23
|
+
}[];
|
|
24
|
+
unresolved: {
|
|
25
|
+
specifier: string;
|
|
26
|
+
filePath: string | undefined;
|
|
27
|
+
identifier: string | undefined;
|
|
28
|
+
alias: string | undefined;
|
|
29
|
+
isTypeOnly: boolean;
|
|
30
|
+
modifiers: number;
|
|
31
|
+
jsDocTags: Set<string> | undefined;
|
|
32
|
+
}[];
|
|
33
|
+
externalRefs: Set<import("../types/module-graph.ts").ExternalRef>;
|
|
34
|
+
exports: {
|
|
35
|
+
identifier: string;
|
|
36
|
+
binding: string;
|
|
37
|
+
type: import("../types/issues.ts").SymbolType;
|
|
38
|
+
jsDocTags: Set<string>;
|
|
39
|
+
hasRefsInFile: boolean;
|
|
40
|
+
isRegistered: boolean;
|
|
41
|
+
referencedIn: Set<string> | undefined;
|
|
42
|
+
isReExport: boolean;
|
|
43
|
+
isBindingReExport: boolean;
|
|
44
|
+
members: {
|
|
45
|
+
identifier: string;
|
|
46
|
+
type: import("../types/issues.ts").SymbolType;
|
|
47
|
+
flags: number;
|
|
48
|
+
jsDocTags: Set<string>;
|
|
49
|
+
hasRefsInFile: boolean;
|
|
50
|
+
}[];
|
|
51
|
+
}[];
|
|
52
|
+
skipExports: boolean;
|
|
53
|
+
};
|
|
54
|
+
export declare const hasSameTopology: (before: ReturnType<typeof getFileTopology>, after: FileNode) => boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
export const isIncrementalFile = (file) => file.scripts.size === 0 &&
|
|
3
|
+
file.importGlobs.length === 0 &&
|
|
4
|
+
file.imports.programFiles.size === 0 &&
|
|
5
|
+
file.imports.entryFiles.size === 0;
|
|
6
|
+
export const getFileTopology = (file) => {
|
|
7
|
+
const exports = [];
|
|
8
|
+
for (const [identifier, item] of file.exports) {
|
|
9
|
+
const members = [];
|
|
10
|
+
for (const member of item.members) {
|
|
11
|
+
members.push({
|
|
12
|
+
identifier: member.identifier,
|
|
13
|
+
type: member.type,
|
|
14
|
+
flags: member.flags,
|
|
15
|
+
jsDocTags: member.jsDocTags,
|
|
16
|
+
hasRefsInFile: member.hasRefsInFile,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.push({
|
|
20
|
+
identifier,
|
|
21
|
+
binding: item.binding,
|
|
22
|
+
type: item.type,
|
|
23
|
+
jsDocTags: item.jsDocTags,
|
|
24
|
+
hasRefsInFile: item.hasRefsInFile,
|
|
25
|
+
isRegistered: item.isRegistered,
|
|
26
|
+
referencedIn: item.referencedIn,
|
|
27
|
+
isReExport: item.isReExport,
|
|
28
|
+
isBindingReExport: item.isBindingReExport,
|
|
29
|
+
members,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const facts = (items) => {
|
|
33
|
+
const result = [];
|
|
34
|
+
for (const { specifier, filePath, identifier, alias, isTypeOnly, modifiers, jsDocTags } of items)
|
|
35
|
+
result.push({ specifier, filePath, identifier, alias, isTypeOnly, modifiers, jsDocTags });
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
return {
|
|
39
|
+
internal: file.imports.internal,
|
|
40
|
+
paths: [...file.imports.internal.keys()],
|
|
41
|
+
imports: facts(file.imports.imports),
|
|
42
|
+
external: facts(file.imports.external),
|
|
43
|
+
unresolved: facts(file.imports.unresolved),
|
|
44
|
+
externalRefs: file.imports.externalRefs,
|
|
45
|
+
exports,
|
|
46
|
+
skipExports: file.skipExports,
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export const hasSameTopology = (before, after) => isIncrementalFile(after) && isDeepStrictEqual(before, getFileTopology(after));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CollectorIssues } from '../IssueCollector.ts';
|
|
2
2
|
import { type Results } from '../run.ts';
|
|
3
|
-
import type
|
|
3
|
+
import { type MainOptions } from '../util/create-options.ts';
|
|
4
4
|
import type { WatchChange } from '../util/watch.ts';
|
|
5
5
|
import { type FileDescriptorOptions } from './file-descriptor.ts';
|
|
6
6
|
import { type PackageJsonFile } from './package-json-descriptor.ts';
|
package/dist/session/session.js
CHANGED
|
@@ -1,36 +1,71 @@
|
|
|
1
1
|
import { run } from '../run.js';
|
|
2
|
+
import { createOptions } from '../util/create-options.js';
|
|
2
3
|
import { createPreprocessor, toReporterOptions } from '../util/preprocessor.js';
|
|
4
|
+
import { clearResolverCache } from '../util/resolve.js';
|
|
5
|
+
import { clearModuleResolutionCaches } from '../typescript/resolve-module-names.js';
|
|
6
|
+
import { clearGlobCache } from '../util/glob-cache.js';
|
|
7
|
+
import { clearGitignoreCache } from '../util/gitignore-cache.js';
|
|
8
|
+
import { unload } from '../util/loader.js';
|
|
3
9
|
import { buildFileDescriptor } from './file-descriptor.js';
|
|
4
10
|
import { buildPackageJsonDescriptor } from './package-json-descriptor.js';
|
|
11
|
+
import { SessionConfigurationChangedError } from './configuration.js';
|
|
5
12
|
export const createSession = async (options) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const initialize = async (options) => {
|
|
14
|
+
const { session, results } = await run(options);
|
|
15
|
+
if (!session)
|
|
16
|
+
throw new Error('Unable to initialize watch session');
|
|
17
|
+
const preprocess = options.preprocessor.length > 0 ? await createPreprocessor(options.preprocessor) : undefined;
|
|
18
|
+
const updateResults = async () => {
|
|
19
|
+
const collected = session.getIssues();
|
|
20
|
+
const data = preprocess
|
|
21
|
+
? await preprocess({ ...toReporterOptions(options, results), ...structuredClone(collected) })
|
|
22
|
+
: collected;
|
|
23
|
+
results.issues = data.issues;
|
|
24
|
+
results.counters = data.counters;
|
|
25
|
+
results.tagHints = data.tagHints;
|
|
26
|
+
results.configurationHints = data.configurationHints;
|
|
27
|
+
results.hasConfigLoadErrors = collected.hasConfigLoadErrors;
|
|
28
|
+
};
|
|
29
|
+
await updateResults();
|
|
30
|
+
return { session, results, options, updateResults, preprocess };
|
|
15
31
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
let current = await initialize(options);
|
|
33
|
+
const results = current.results;
|
|
34
|
+
let pending = Promise.resolve();
|
|
35
|
+
const processChanges = async (changes) => {
|
|
36
|
+
try {
|
|
37
|
+
const update = await current.session.handleFileChanges(changes);
|
|
38
|
+
if (update) {
|
|
39
|
+
await current.updateResults();
|
|
40
|
+
Object.assign(results, current.results);
|
|
41
|
+
}
|
|
42
|
+
return update;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (!(error instanceof SessionConfigurationChangedError))
|
|
46
|
+
throw error;
|
|
47
|
+
const startTime = performance.now();
|
|
48
|
+
clearResolverCache();
|
|
49
|
+
clearModuleResolutionCaches();
|
|
50
|
+
clearGlobCache();
|
|
51
|
+
clearGitignoreCache();
|
|
52
|
+
if (current.session.configurationFiles)
|
|
53
|
+
unload(current.session.configurationFiles.paths);
|
|
54
|
+
const nextOptions = await createOptions(current.options.createdFrom);
|
|
55
|
+
current = await initialize({ ...nextOptions, isCache: false });
|
|
56
|
+
Object.assign(results, current.results);
|
|
57
|
+
return { duration: performance.now() - startTime, mem: process.memoryUsage().heapUsed };
|
|
58
|
+
}
|
|
26
59
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
60
|
+
return {
|
|
61
|
+
handleFileChanges: changes => {
|
|
62
|
+
const update = pending.then(() => processChanges(changes));
|
|
63
|
+
pending = update.then(() => { }, () => { });
|
|
64
|
+
return update;
|
|
65
|
+
},
|
|
66
|
+
getIssues: () => (current.preprocess ? results : current.session.getIssues()),
|
|
67
|
+
getResults: () => results,
|
|
68
|
+
describeFile: (filePath, opts) => buildFileDescriptor(filePath, current.options.cwd, current.session.getGraph(), current.session.getEntryPaths(), opts),
|
|
69
|
+
describePackageJson: () => buildPackageJsonDescriptor(current.session.getGraph(), current.session.getEntryPaths()),
|
|
33
70
|
};
|
|
34
|
-
adapter.getIssues = () => results;
|
|
35
|
-
return adapter;
|
|
36
71
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { watch } from 'node:fs';
|
|
2
|
+
import { ConsoleStreamer } from '../ConsoleStreamer.js';
|
|
3
|
+
import watchReporter from '../reporters/watch.js';
|
|
4
|
+
import { debugLog } from '../util/debug.js';
|
|
5
|
+
import { hasErrorCause } from '../util/errors.js';
|
|
6
|
+
import { isFile } from '../util/fs.js';
|
|
7
|
+
import { logError } from '../util/log.js';
|
|
8
|
+
import { toPosix } from '../util/path.js';
|
|
9
|
+
import { createSession } from './session.js';
|
|
10
|
+
export const watchSession = async (options) => {
|
|
11
|
+
const streamer = new ConsoleStreamer(options);
|
|
12
|
+
const session = await createSession(options);
|
|
13
|
+
const report = (duration) => {
|
|
14
|
+
const { issues, counters } = session.getIssues();
|
|
15
|
+
watchReporter(options, { issues, streamer, size: counters.processed - counters.files, duration });
|
|
16
|
+
};
|
|
17
|
+
const onError = (error) => {
|
|
18
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
19
|
+
const reason = error instanceof Error && hasErrorCause(error) ? `\nReason: ${error.cause.message}` : '';
|
|
20
|
+
logError(message + reason);
|
|
21
|
+
process.exitCode = 2;
|
|
22
|
+
};
|
|
23
|
+
const watcher = watch(options.cwd, { recursive: true }, (eventType, filePath) => {
|
|
24
|
+
debugLog('*', `(raw) ${eventType} ${filePath}`);
|
|
25
|
+
if (typeof filePath !== 'string')
|
|
26
|
+
return;
|
|
27
|
+
const path = toPosix(filePath);
|
|
28
|
+
const type = eventType === 'rename' ? (isFile(options.cwd, path) ? 'added' : 'deleted') : 'modified';
|
|
29
|
+
session.handleFileChanges([{ type, filePath: path }]).then(update => {
|
|
30
|
+
if (!update)
|
|
31
|
+
return;
|
|
32
|
+
process.exitCode = 0;
|
|
33
|
+
report(update.duration);
|
|
34
|
+
}, onError);
|
|
35
|
+
});
|
|
36
|
+
watcher.on('error', error => {
|
|
37
|
+
onError(error);
|
|
38
|
+
watcher.close();
|
|
39
|
+
});
|
|
40
|
+
report();
|
|
41
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'borp' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expo-router' | 'expressive-code' | 'fast' | 'filesystem-routing' | 'flue' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jasmine' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'marko' | 'mdx' | 'mdxlint' | 'metro' | 'mise' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'openclaw' | 'orval' | 'osls' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'pre-commit' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | 'qwik' | 'railway' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'solidjs-vite-plugin' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'tauri' | 'temporal' | 'textlint' | 'travis' | 'ts-node' | 'tsd' | 'tsdown' | 'tsrs' | 'tsup' | 'tsx' | 'turbo' | 'typedoc' | 'typescript' | 'typescript-content-mapper' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'varlock' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
-
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'borp', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expo-router', 'expressive-code', 'fast', 'filesystem-routing', 'flue', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jasmine', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'marko', 'mdx', 'mdxlint', 'metro', 'mise', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'openclaw', 'orval', 'osls', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'pre-commit', 'preconstruct', 'prettier', 'prisma', 'quasar', 'qwik', 'railway', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'solidjs-vite-plugin', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'tauri', 'temporal', 'textlint', 'travis', 'ts-node', 'tsd', 'tsdown', 'tsrs', 'tsup', 'tsx', 'turbo', 'typedoc', 'typescript', 'typescript-content-mapper', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'varlock', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
1
|
+
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'borp' | 'buf' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-forge' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expo-router' | 'expressive-code' | 'fast' | 'filesystem-routing' | 'flue' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jasmine' | 'jest' | 'karma' | 'knex' | 'kysely-codegen' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lingui' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'marko' | 'mastra' | 'mcp' | 'mdx' | 'mdxlint' | 'metro' | 'mise' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'openclaw' | 'orval' | 'osls' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'pre-commit' | 'preconstruct' | 'prettier' | 'prisma' | 'purgecss' | 'quasar' | 'qwik' | 'railway' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'solidjs-vite-plugin' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'tauri' | 'temporal' | 'textlint' | 'travis' | 'ts-node' | 'tsd' | 'tsdown' | 'tsrs' | 'tsup' | 'tsx' | 'turbo' | 'typedoc' | 'typescript' | 'typescript-content-mapper' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'varlock' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
+
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'borp', 'buf', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-forge', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expo-router', 'expressive-code', 'fast', 'filesystem-routing', 'flue', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jasmine', 'jest', 'karma', 'knex', 'kysely-codegen', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lingui', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'marko', 'mastra', 'mcp', 'mdx', 'mdxlint', 'metro', 'mise', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'openclaw', 'orval', 'osls', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'pre-commit', 'preconstruct', 'prettier', 'prisma', 'purgecss', 'quasar', 'qwik', 'railway', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'solidjs-vite-plugin', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'tauri', 'temporal', 'textlint', 'travis', 'ts-node', 'tsd', 'tsdown', 'tsrs', 'tsup', 'tsx', 'turbo', 'typedoc', 'typescript', 'typescript-content-mapper', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'varlock', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
@@ -8,6 +8,7 @@ export const pluginNames = [
|
|
|
8
8
|
'babel',
|
|
9
9
|
'biome',
|
|
10
10
|
'borp',
|
|
11
|
+
'buf',
|
|
11
12
|
'bumpp',
|
|
12
13
|
'bun',
|
|
13
14
|
'c8',
|
|
@@ -28,6 +29,7 @@ export const pluginNames = [
|
|
|
28
29
|
'docusaurus',
|
|
29
30
|
'dotenv',
|
|
30
31
|
'drizzle',
|
|
32
|
+
'electron-forge',
|
|
31
33
|
'electron-vite',
|
|
32
34
|
'eleventy',
|
|
33
35
|
'esbuild',
|
|
@@ -53,9 +55,11 @@ export const pluginNames = [
|
|
|
53
55
|
'jest',
|
|
54
56
|
'karma',
|
|
55
57
|
'knex',
|
|
58
|
+
'kysely-codegen',
|
|
56
59
|
'ladle',
|
|
57
60
|
'laravel-vite-plugin',
|
|
58
61
|
'lefthook',
|
|
62
|
+
'lingui',
|
|
59
63
|
'lint-staged',
|
|
60
64
|
'linthtml',
|
|
61
65
|
'lit',
|
|
@@ -64,6 +68,8 @@ export const pluginNames = [
|
|
|
64
68
|
'lunaria',
|
|
65
69
|
'markdownlint',
|
|
66
70
|
'marko',
|
|
71
|
+
'mastra',
|
|
72
|
+
'mcp',
|
|
67
73
|
'mdx',
|
|
68
74
|
'mdxlint',
|
|
69
75
|
'metro',
|
|
@@ -109,6 +115,7 @@ export const pluginNames = [
|
|
|
109
115
|
'preconstruct',
|
|
110
116
|
'prettier',
|
|
111
117
|
'prisma',
|
|
118
|
+
'purgecss',
|
|
112
119
|
'quasar',
|
|
113
120
|
'qwik',
|
|
114
121
|
'railway',
|
package/dist/types/config.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface GetInputsFromScriptsOptions extends BaseOptions {
|
|
|
17
17
|
optionalBinaries?: boolean;
|
|
18
18
|
containingFilePath: string;
|
|
19
19
|
expandedScripts?: Set<string>;
|
|
20
|
+
manifestDir?: string;
|
|
20
21
|
}
|
|
21
22
|
export type GetInputsFromScripts<T = GetInputsFromScriptsOptions> = (npmScripts: string | string[] | Set<string>, options: T) => Input[];
|
|
22
23
|
export type GetInputsFromScriptsPartial = (npmScripts: string | string[] | Set<string>, options?: Partial<GetInputsFromScriptsOptions>) => Input[];
|
|
@@ -173,6 +174,7 @@ export interface Plugin {
|
|
|
173
174
|
project?: string[];
|
|
174
175
|
setup?: PluginSetup;
|
|
175
176
|
isLoadConfig?: IsLoadConfig;
|
|
177
|
+
isLoadConfigOptional?: boolean;
|
|
176
178
|
resolveConfig?: ResolveConfig;
|
|
177
179
|
resolve?: Resolve;
|
|
178
180
|
resolveSourceMap?: ResolveSourceMap;
|
package/dist/types/issues.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ export type ReporterOptions = {
|
|
|
71
71
|
selectedWorkspaces: string[] | undefined;
|
|
72
72
|
configFilePath: string | undefined;
|
|
73
73
|
maxShowIssues?: number;
|
|
74
|
+
write?: (output: string) => void;
|
|
75
|
+
};
|
|
76
|
+
export type InternalReporterOptions = ReporterOptions & {
|
|
77
|
+
write: (output: string) => void;
|
|
74
78
|
};
|
|
75
79
|
export type Reporter = (options: ReporterOptions) => void;
|
|
76
80
|
export type Preprocessor = (options: ReporterOptions) => ReporterOptions;
|
|
@@ -28,9 +28,6 @@ type Dependencies = Record<string, string>;
|
|
|
28
28
|
type TypesVersions = Record<string, Record<string, string[]>>;
|
|
29
29
|
export type PackageExtensions = Record<string, {
|
|
30
30
|
peerDependencies?: Dependencies;
|
|
31
|
-
peerDependenciesMeta?: Record<string, {
|
|
32
|
-
optional?: boolean;
|
|
33
|
-
}>;
|
|
34
31
|
}>;
|
|
35
32
|
export type PackageJson = {
|
|
36
33
|
name?: string;
|
|
@@ -94,7 +94,7 @@ export function extractNamespaceMembers(decl, options, lineStarts, getJSDocTags,
|
|
|
94
94
|
if (!decl.body || decl.body.type !== 'TSModuleBlock')
|
|
95
95
|
return [];
|
|
96
96
|
const members = [];
|
|
97
|
-
const addMember = (name, pos, stmtStart, stmtEnd) => {
|
|
97
|
+
const addMember = (name, pos, stmtStart, stmtEnd, isFixable = true) => {
|
|
98
98
|
const fullName = prefix ? `${prefix}.${name}` : name;
|
|
99
99
|
const tags = getJSDocTags(stmtStart);
|
|
100
100
|
const existing = members.find(m => m.identifier === fullName);
|
|
@@ -109,7 +109,7 @@ export function extractNamespaceMembers(decl, options, lineStarts, getJSDocTags,
|
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
const { line, col } = getLineAndCol(lineStarts, pos);
|
|
112
|
-
const fix = options.isFixExports
|
|
112
|
+
const fix = options.isFixExports && isFixable
|
|
113
113
|
? [stmtStart, stmtEnd, FIX_FLAGS.OBJECT_BINDING | FIX_FLAGS.WITH_NEWLINE]
|
|
114
114
|
: undefined;
|
|
115
115
|
members.push({
|
|
@@ -131,7 +131,7 @@ export function extractNamespaceMembers(decl, options, lineStarts, getJSDocTags,
|
|
|
131
131
|
if (d.type === 'VariableDeclaration') {
|
|
132
132
|
for (const declarator of d.declarations) {
|
|
133
133
|
if (declarator.id.type === 'Identifier') {
|
|
134
|
-
addMember(declarator.id.name, declarator.id.start, stmt.start, stmt.end);
|
|
134
|
+
addMember(declarator.id.name, declarator.id.start, stmt.start, stmt.end, d.declarations.length === 1);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
@@ -26,6 +26,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
|
|
|
26
26
|
const scripts = new Set();
|
|
27
27
|
const importGlobs = [];
|
|
28
28
|
const handledImportExpressions = new Set();
|
|
29
|
+
const caughtImportExpressions = new Set();
|
|
29
30
|
const importAliases = new Map();
|
|
30
31
|
const addImportAlias = (aliasName, id, importFilePath) => {
|
|
31
32
|
const aliases = importAliases.get(aliasName);
|
|
@@ -342,6 +343,7 @@ const getImportsAndExports = (filePath, sourceText, resolveModule, options, igno
|
|
|
342
343
|
programFiles,
|
|
343
344
|
entryFiles,
|
|
344
345
|
handledImportExpressions,
|
|
346
|
+
caughtImportExpressions,
|
|
345
347
|
visitor,
|
|
346
348
|
getJSDocTags,
|
|
347
349
|
});
|