knip 5.5.0 → 5.6.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.
@@ -115,6 +115,7 @@ export declare class ConfigurationChief {
115
115
  vitest?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
116
116
  webpack?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
117
117
  wireit?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
118
+ wrangler?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
118
119
  yorkie?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
119
120
  drizzle?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
120
121
  githubActions?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
@@ -740,6 +740,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
740
740
  entry?: string | string[] | undefined;
741
741
  project?: string | string[] | undefined;
742
742
  }>]>>;
743
+ wrangler: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
744
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
745
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
746
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
747
+ }, "strip", z.ZodTypeAny, {
748
+ config?: string | string[] | undefined;
749
+ entry?: string | string[] | undefined;
750
+ project?: string | string[] | undefined;
751
+ }, {
752
+ config?: string | string[] | undefined;
753
+ entry?: string | string[] | undefined;
754
+ project?: string | string[] | undefined;
755
+ }>]>>;
743
756
  yorkie: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
744
757
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
745
758
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1032,6 +1045,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
1032
1045
  entry?: string | string[] | undefined;
1033
1046
  project?: string | string[] | undefined;
1034
1047
  } | undefined;
1048
+ wrangler?: string | boolean | string[] | {
1049
+ config?: string | string[] | undefined;
1050
+ entry?: string | string[] | undefined;
1051
+ project?: string | string[] | undefined;
1052
+ } | undefined;
1035
1053
  yorkie?: string | boolean | string[] | {
1036
1054
  config?: string | string[] | undefined;
1037
1055
  entry?: string | string[] | undefined;
@@ -1316,6 +1334,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
1316
1334
  entry?: string | string[] | undefined;
1317
1335
  project?: string | string[] | undefined;
1318
1336
  } | undefined;
1337
+ wrangler?: string | boolean | string[] | {
1338
+ config?: string | string[] | undefined;
1339
+ entry?: string | string[] | undefined;
1340
+ project?: string | string[] | undefined;
1341
+ } | undefined;
1319
1342
  yorkie?: string | boolean | string[] | {
1320
1343
  config?: string | string[] | undefined;
1321
1344
  entry?: string | string[] | undefined;
@@ -2024,6 +2047,19 @@ export declare const ConfigurationValidator: z.ZodObject<{
2024
2047
  entry?: string | string[] | undefined;
2025
2048
  project?: string | string[] | undefined;
2026
2049
  }>]>>;
2050
+ wrangler: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2051
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2052
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2053
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2054
+ }, "strip", z.ZodTypeAny, {
2055
+ config?: string | string[] | undefined;
2056
+ entry?: string | string[] | undefined;
2057
+ project?: string | string[] | undefined;
2058
+ }, {
2059
+ config?: string | string[] | undefined;
2060
+ entry?: string | string[] | undefined;
2061
+ project?: string | string[] | undefined;
2062
+ }>]>>;
2027
2063
  yorkie: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2028
2064
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2029
2065
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -2333,6 +2369,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2333
2369
  entry?: string | string[] | undefined;
2334
2370
  project?: string | string[] | undefined;
2335
2371
  } | undefined;
2372
+ wrangler?: string | boolean | string[] | {
2373
+ config?: string | string[] | undefined;
2374
+ entry?: string | string[] | undefined;
2375
+ project?: string | string[] | undefined;
2376
+ } | undefined;
2336
2377
  yorkie?: string | boolean | string[] | {
2337
2378
  config?: string | string[] | undefined;
2338
2379
  entry?: string | string[] | undefined;
@@ -2609,6 +2650,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2609
2650
  entry?: string | string[] | undefined;
2610
2651
  project?: string | string[] | undefined;
2611
2652
  } | undefined;
2653
+ wrangler?: string | boolean | string[] | {
2654
+ config?: string | string[] | undefined;
2655
+ entry?: string | string[] | undefined;
2656
+ project?: string | string[] | undefined;
2657
+ } | undefined;
2612
2658
  yorkie?: string | boolean | string[] | {
2613
2659
  config?: string | string[] | undefined;
2614
2660
  entry?: string | string[] | undefined;
@@ -2910,6 +2956,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
2910
2956
  entry?: string | string[] | undefined;
2911
2957
  project?: string | string[] | undefined;
2912
2958
  } | undefined;
2959
+ wrangler?: string | boolean | string[] | {
2960
+ config?: string | string[] | undefined;
2961
+ entry?: string | string[] | undefined;
2962
+ project?: string | string[] | undefined;
2963
+ } | undefined;
2913
2964
  yorkie?: string | boolean | string[] | {
2914
2965
  config?: string | string[] | undefined;
2915
2966
  entry?: string | string[] | undefined;
@@ -3186,6 +3237,11 @@ export declare const ConfigurationValidator: z.ZodObject<{
3186
3237
  entry?: string | string[] | undefined;
3187
3238
  project?: string | string[] | undefined;
3188
3239
  } | undefined;
3240
+ wrangler?: string | boolean | string[] | {
3241
+ config?: string | string[] | undefined;
3242
+ entry?: string | string[] | undefined;
3243
+ project?: string | string[] | undefined;
3244
+ } | undefined;
3189
3245
  yorkie?: string | boolean | string[] | {
3190
3246
  config?: string | string[] | undefined;
3191
3247
  entry?: string | string[] | undefined;
@@ -117,6 +117,7 @@ const pluginsSchema = z.object({
117
117
  vitest: pluginSchema,
118
118
  webpack: pluginSchema,
119
119
  wireit: pluginSchema,
120
+ wrangler: pluginSchema,
120
121
  yorkie: pluginSchema,
121
122
  });
122
123
  const baseWorkspaceConfigurationSchema = z.object({
@@ -27,7 +27,7 @@ export declare class WorkspaceWorker {
27
27
  isStrict: boolean;
28
28
  rootIgnore: Configuration['ignore'];
29
29
  negatedWorkspacePatterns: string[];
30
- enabledPluginsMap: Record<"astro" | "svelte" | "vue" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eleventy" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "linthtml" | "markdownlint" | "mocha" | "msw" | "netlify" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "tsup" | "typedoc" | "typescript" | "unbuild" | "vite" | "vitest" | "webpack" | "wireit" | "yorkie" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "vercelOg", boolean>;
30
+ enabledPluginsMap: Record<"astro" | "svelte" | "vue" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eleventy" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "linthtml" | "markdownlint" | "mocha" | "msw" | "netlify" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "tsup" | "typedoc" | "typescript" | "unbuild" | "vite" | "vitest" | "webpack" | "wireit" | "wrangler" | "yorkie" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "vercelOg", boolean>;
31
31
  enabledPlugins: PluginName[];
32
32
  enabledPluginsInAncestors: string[];
33
33
  constructor({ name, dir, cwd, config, manifest, dependencies, isProduction, isStrict, rootIgnore, negatedWorkspacePatterns, enabledPluginsInAncestors, }: WorkspaceManagerOptions);
@@ -46,7 +46,7 @@ export declare class WorkspaceWorker {
46
46
  entryFilePatterns: Set<string>;
47
47
  productionEntryFilePatterns: Set<string>;
48
48
  referencedDependencies: ReferencedDependencies;
49
- enabledPlugins: ("astro" | "svelte" | "vue" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eleventy" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "linthtml" | "markdownlint" | "mocha" | "msw" | "netlify" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "tsup" | "typedoc" | "typescript" | "unbuild" | "vite" | "vitest" | "webpack" | "wireit" | "yorkie" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "vercelOg")[];
49
+ enabledPlugins: ("astro" | "svelte" | "vue" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eleventy" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "linthtml" | "markdownlint" | "mocha" | "msw" | "netlify" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "tsup" | "typedoc" | "typescript" | "unbuild" | "vite" | "vitest" | "webpack" | "wireit" | "wrangler" | "yorkie" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "vercelOg")[];
50
50
  }>;
51
51
  }
52
52
  export {};
@@ -297,6 +297,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
297
297
  entry?: string | string[] | undefined;
298
298
  project?: string | string[] | undefined;
299
299
  } | undefined;
300
+ wrangler?: string | boolean | string[] | {
301
+ config?: string | string[] | undefined;
302
+ entry?: string | string[] | undefined;
303
+ project?: string | string[] | undefined;
304
+ } | undefined;
300
305
  yorkie?: string | boolean | string[] | {
301
306
  config?: string | string[] | undefined;
302
307
  entry?: string | string[] | undefined;
@@ -573,6 +578,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
573
578
  entry?: string | string[] | undefined;
574
579
  project?: string | string[] | undefined;
575
580
  } | undefined;
581
+ wrangler?: string | boolean | string[] | {
582
+ config?: string | string[] | undefined;
583
+ entry?: string | string[] | undefined;
584
+ project?: string | string[] | undefined;
585
+ } | undefined;
576
586
  yorkie?: string | boolean | string[] | {
577
587
  config?: string | string[] | undefined;
578
588
  entry?: string | string[] | undefined;
@@ -1,9 +1,8 @@
1
- import type { IgnorePatterns } from '#p/types/config.js';
2
1
  import type { IsPluginEnabled, ResolveConfig } from '#p/types/plugins.js';
3
2
  import type { PluginConfig } from './types.js';
4
3
  declare const _default: {
5
4
  title: string;
6
- enablers: IgnorePatterns;
5
+ enablers: import("#p/types/config.js").IgnorePatterns;
7
6
  isEnabled: IsPluginEnabled;
8
7
  config: string[];
9
8
  entry: string[];
@@ -53,4 +53,5 @@ export { default as vitest } from './vitest/index.js';
53
53
  export { default as vue } from './vue/index.js';
54
54
  export { default as webpack } from './webpack/index.js';
55
55
  export { default as wireit } from './wireit/index.js';
56
+ export { default as wrangler } from './wrangler/index.js';
56
57
  export { default as yorkie } from './yorkie/index.js';
@@ -53,4 +53,5 @@ export { default as vitest } from './vitest/index.js';
53
53
  export { default as vue } from './vue/index.js';
54
54
  export { default as webpack } from './webpack/index.js';
55
55
  export { default as wireit } from './wireit/index.js';
56
+ export { default as wrangler } from './wrangler/index.js';
56
57
  export { default as yorkie } from './yorkie/index.js';
@@ -58,6 +58,8 @@ const resolveDependencies = async (config, options) => {
58
58
  : []).filter(value => !/\$[0-9]/.test(value));
59
59
  const testResultsProcessor = config.testResultsProcessor ? [config.testResultsProcessor] : [];
60
60
  const snapshotResolver = config.snapshotResolver ? [config.snapshotResolver] : [];
61
+ const testSequencer = config.testSequencer ? [config.testSequencer] : [];
62
+ const globalSetup = config.globalSetup ? [config.globalSetup] : [];
61
63
  return [
62
64
  ...presets,
63
65
  ...projects,
@@ -72,6 +74,8 @@ const resolveDependencies = async (config, options) => {
72
74
  ...moduleNameMapper,
73
75
  ...testResultsProcessor,
74
76
  ...snapshotResolver,
77
+ ...testSequencer,
78
+ ...globalSetup,
75
79
  ];
76
80
  };
77
81
  const resolveEntryPaths = async (localConfig, options) => {
@@ -0,0 +1,10 @@
1
+ import type { IsPluginEnabled, ResolveEntryPaths } from '#p/types/plugins.js';
2
+ import type { WranglerConfig } from './types.js';
3
+ declare const _default: {
4
+ title: string;
5
+ enablers: string[];
6
+ isEnabled: IsPluginEnabled;
7
+ config: string[];
8
+ resolveEntryPaths: ResolveEntryPaths<WranglerConfig>;
9
+ };
10
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { hasDependency } from '#p/util/plugin.js';
2
+ const title = 'Wrangler';
3
+ const enablers = ['wrangler'];
4
+ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
+ const config = ['wrangler.{json,toml}'];
6
+ const resolveEntryPaths = async (config) => {
7
+ return config.main ? [config.main] : [];
8
+ };
9
+ export default {
10
+ title,
11
+ enablers,
12
+ isEnabled,
13
+ config,
14
+ resolveEntryPaths,
15
+ };
@@ -0,0 +1,3 @@
1
+ export type WranglerConfig = {
2
+ main?: string;
3
+ };
@@ -0,0 +1 @@
1
+ export {};
package/dist/plugins.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import type { Plugin } from './types/plugins.js';
2
- declare const plugins: Record<"astro" | "svelte" | "vue" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eleventy" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "linthtml" | "markdownlint" | "mocha" | "msw" | "netlify" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "tsup" | "typedoc" | "typescript" | "unbuild" | "vite" | "vitest" | "webpack" | "wireit" | "yorkie" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "vercelOg", Plugin>;
2
+ declare const plugins: Record<"astro" | "svelte" | "vue" | "angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eleventy" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "linthtml" | "markdownlint" | "mocha" | "msw" | "netlify" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "tsup" | "typedoc" | "typescript" | "unbuild" | "vite" | "vitest" | "webpack" | "wireit" | "wrangler" | "yorkie" | "drizzle" | "githubActions" | "graphqlCodegen" | "lintStaged" | "nodeTestRunner" | "npmPackageJsonLint" | "playwrightCt" | "releaseIt" | "semanticRelease" | "vercelOg", Plugin>;
3
3
  export { plugins };
@@ -7,6 +7,7 @@ export type RawConfiguration = z.infer<typeof ConfigurationValidator>;
7
7
  export type RawPluginConfiguration = z.infer<typeof pluginSchema>;
8
8
  type NormalizedGlob = string[];
9
9
  export type IgnorePatterns = (string | RegExp)[];
10
+ export type EnablerPatterns = IgnorePatterns;
10
11
  export type PluginName = keyof typeof Plugins;
11
12
  export type PluginMap = typeof Plugins;
12
13
  export type EnsuredPluginConfiguration = {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.5.0";
1
+ export declare const version = "5.6.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.5.0';
1
+ export const version = '5.6.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {
package/schema.json CHANGED
@@ -491,6 +491,10 @@
491
491
  "title": "Wireit plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/wireit/README.md)",
492
492
  "$ref": "#/definitions/plugin"
493
493
  },
494
+ "wrangler": {
495
+ "title": "wrangler plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/wrangler/README.md)",
496
+ "$ref": "#/definitions/plugin"
497
+ },
494
498
  "yorkie": {
495
499
  "title": "yorkie plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/yorkie/README.md)",
496
500
  "$ref": "#/definitions/plugin"