knip 5.37.2 → 5.38.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.
@@ -116,6 +116,7 @@ export declare class ConfigurationChief {
116
116
  playwright?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
117
117
  "playwright-ct"?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
118
118
  "playwright-test"?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
119
+ plop?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
119
120
  postcss?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
120
121
  preconstruct?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
121
122
  prettier?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
@@ -182,8 +182,7 @@ export class ConfigurationChief {
182
182
  const ignoredWorkspacesManifest = this.getListedWorkspaces()
183
183
  .filter(name => name.startsWith('!'))
184
184
  .map(name => name.replace(/^!/, ''));
185
- const ignoredWorkspacesConfig = this.config.ignoreWorkspaces.map(name => name.replace(/\/\*$/, ''));
186
- return [...ignoredWorkspacesManifest, ...ignoredWorkspacesConfig];
185
+ return [...ignoredWorkspacesManifest, ...this.config.ignoreWorkspaces];
187
186
  }
188
187
  getConfiguredWorkspaceKeys() {
189
188
  const initialWorkspaces = this.rawConfig?.workspaces
@@ -626,6 +626,19 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
626
626
  entry?: string | string[] | undefined;
627
627
  project?: string | string[] | undefined;
628
628
  }>]>>;
629
+ plop: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
630
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
631
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
632
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
633
+ }, "strip", z.ZodTypeAny, {
634
+ config?: string | string[] | undefined;
635
+ entry?: string | string[] | undefined;
636
+ project?: string | string[] | undefined;
637
+ }, {
638
+ config?: string | string[] | undefined;
639
+ entry?: string | string[] | undefined;
640
+ project?: string | string[] | undefined;
641
+ }>]>>;
629
642
  postcss: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
630
643
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
631
644
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1366,6 +1379,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
1366
1379
  entry?: string | string[] | undefined;
1367
1380
  project?: string | string[] | undefined;
1368
1381
  } | undefined;
1382
+ plop?: string | boolean | string[] | {
1383
+ config?: string | string[] | undefined;
1384
+ entry?: string | string[] | undefined;
1385
+ project?: string | string[] | undefined;
1386
+ } | undefined;
1369
1387
  postcss?: string | boolean | string[] | {
1370
1388
  config?: string | string[] | undefined;
1371
1389
  entry?: string | string[] | undefined;
@@ -1800,6 +1818,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
1800
1818
  entry?: string | string[] | undefined;
1801
1819
  project?: string | string[] | undefined;
1802
1820
  } | undefined;
1821
+ plop?: string | boolean | string[] | {
1822
+ config?: string | string[] | undefined;
1823
+ entry?: string | string[] | undefined;
1824
+ project?: string | string[] | undefined;
1825
+ } | undefined;
1803
1826
  postcss?: string | boolean | string[] | {
1804
1827
  config?: string | string[] | undefined;
1805
1828
  entry?: string | string[] | undefined;
@@ -2601,6 +2624,19 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
2601
2624
  entry?: string | string[] | undefined;
2602
2625
  project?: string | string[] | undefined;
2603
2626
  }>]>>;
2627
+ plop: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2628
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2629
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2630
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2631
+ }, "strip", z.ZodTypeAny, {
2632
+ config?: string | string[] | undefined;
2633
+ entry?: string | string[] | undefined;
2634
+ project?: string | string[] | undefined;
2635
+ }, {
2636
+ config?: string | string[] | undefined;
2637
+ entry?: string | string[] | undefined;
2638
+ project?: string | string[] | undefined;
2639
+ }>]>>;
2604
2640
  postcss: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2605
2641
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2606
2642
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -3343,6 +3379,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
3343
3379
  entry?: string | string[] | undefined;
3344
3380
  project?: string | string[] | undefined;
3345
3381
  } | undefined;
3382
+ plop?: string | boolean | string[] | {
3383
+ config?: string | string[] | undefined;
3384
+ entry?: string | string[] | undefined;
3385
+ project?: string | string[] | undefined;
3386
+ } | undefined;
3346
3387
  postcss?: string | boolean | string[] | {
3347
3388
  config?: string | string[] | undefined;
3348
3389
  entry?: string | string[] | undefined;
@@ -3783,6 +3824,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
3783
3824
  entry?: string | string[] | undefined;
3784
3825
  project?: string | string[] | undefined;
3785
3826
  } | undefined;
3827
+ plop?: string | boolean | string[] | {
3828
+ config?: string | string[] | undefined;
3829
+ entry?: string | string[] | undefined;
3830
+ project?: string | string[] | undefined;
3831
+ } | undefined;
3786
3832
  postcss?: string | boolean | string[] | {
3787
3833
  config?: string | string[] | undefined;
3788
3834
  entry?: string | string[] | undefined;
@@ -4220,6 +4266,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
4220
4266
  entry?: string | string[] | undefined;
4221
4267
  project?: string | string[] | undefined;
4222
4268
  } | undefined;
4269
+ plop?: string | boolean | string[] | {
4270
+ config?: string | string[] | undefined;
4271
+ entry?: string | string[] | undefined;
4272
+ project?: string | string[] | undefined;
4273
+ } | undefined;
4223
4274
  postcss?: string | boolean | string[] | {
4224
4275
  config?: string | string[] | undefined;
4225
4276
  entry?: string | string[] | undefined;
@@ -4660,6 +4711,11 @@ export declare const ConfigurationValidator: z.ZodObject<z.objectUtil.extendShap
4660
4711
  entry?: string | string[] | undefined;
4661
4712
  project?: string | string[] | undefined;
4662
4713
  } | undefined;
4714
+ plop?: string | boolean | string[] | {
4715
+ config?: string | string[] | undefined;
4716
+ entry?: string | string[] | undefined;
4717
+ project?: string | string[] | undefined;
4718
+ } | undefined;
4663
4719
  postcss?: string | boolean | string[] | {
4664
4720
  config?: string | string[] | undefined;
4665
4721
  entry?: string | string[] | undefined;
@@ -238,6 +238,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
238
238
  entry?: string | string[] | undefined;
239
239
  project?: string | string[] | undefined;
240
240
  } | undefined;
241
+ plop?: string | boolean | string[] | {
242
+ config?: string | string[] | undefined;
243
+ entry?: string | string[] | undefined;
244
+ project?: string | string[] | undefined;
245
+ } | undefined;
241
246
  postcss?: string | boolean | string[] | {
242
247
  config?: string | string[] | undefined;
243
248
  entry?: string | string[] | undefined;
@@ -676,6 +681,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
676
681
  entry?: string | string[] | undefined;
677
682
  project?: string | string[] | undefined;
678
683
  } | undefined;
684
+ plop?: string | boolean | string[] | {
685
+ config?: string | string[] | undefined;
686
+ entry?: string | string[] | undefined;
687
+ project?: string | string[] | undefined;
688
+ } | undefined;
679
689
  postcss?: string | boolean | string[] | {
680
690
  config?: string | string[] | undefined;
681
691
  entry?: string | string[] | undefined;
@@ -4,7 +4,12 @@ const title = 'Astro';
4
4
  const enablers = ['astro'];
5
5
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
6
6
  const entry = ['astro.config.{js,cjs,mjs,ts}', 'src/content/config.ts'];
7
- const production = ['src/pages/**/*.{astro,mdx,js,ts}', 'src/content/**/*.mdx'];
7
+ const production = [
8
+ 'src/pages/**/*.{astro,mdx,js,ts}',
9
+ 'src/content/**/*.mdx',
10
+ 'src/middleware.{js,ts}',
11
+ 'src/actions/index.{js,ts}',
12
+ ];
8
13
  const resolve = options => {
9
14
  const { manifest, isProduction } = options;
10
15
  const inputs = [];
@@ -384,6 +384,12 @@ export declare const Plugins: {
384
384
  config: boolean;
385
385
  };
386
386
  };
387
+ plop: {
388
+ title: string;
389
+ enablers: string[];
390
+ isEnabled: import("../types/config.js").IsPluginEnabled;
391
+ config: string[];
392
+ };
387
393
  postcss: {
388
394
  title: string;
389
395
  enablers: string[];
@@ -44,6 +44,7 @@ import { default as oclif } from './oclif/index.js';
44
44
  import { default as playwrightCt } from './playwright-ct/index.js';
45
45
  import { default as playwrightTest } from './playwright-test/index.js';
46
46
  import { default as playwright } from './playwright/index.js';
47
+ import { default as plop } from './plop/index.js';
47
48
  import { default as postcss } from './postcss/index.js';
48
49
  import { default as preconstruct } from './preconstruct/index.js';
49
50
  import { default as prettier } from './prettier/index.js';
@@ -130,6 +131,7 @@ export const Plugins = {
130
131
  playwright,
131
132
  'playwright-ct': playwrightCt,
132
133
  'playwright-test': playwrightTest,
134
+ plop,
133
135
  postcss,
134
136
  preconstruct,
135
137
  prettier,
@@ -0,0 +1,8 @@
1
+ import type { IsPluginEnabled } from '../../types/config.js';
2
+ declare const _default: {
3
+ title: string;
4
+ enablers: string[];
5
+ isEnabled: IsPluginEnabled;
6
+ config: string[];
7
+ };
8
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { hasDependency } from '../../util/plugin.js';
2
+ const title = 'Plop';
3
+ const enablers = ['plop'];
4
+ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
+ const config = ['plopfile.{cjs,mjs,js,ts}'];
6
+ export default {
7
+ title,
8
+ enablers,
9
+ isEnabled,
10
+ config,
11
+ };
@@ -3,7 +3,7 @@ import { toDeferResolve, toDependency, toDevDependency, toEntry, toProductionEnt
3
3
  import { isAbsolute, isInternal, join, relative } from '../../util/path.js';
4
4
  import { hasDependency } from '../../util/plugin.js';
5
5
  import { getDependenciesFromConfig } from '../babel/index.js';
6
- const title = 'Webpack';
6
+ const title = 'webpack';
7
7
  const enablers = ['webpack', 'webpack-cli'];
8
8
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
9
9
  const config = ['webpack.config.{js,ts,mjs,cjs,mts,cts}'];
@@ -612,6 +612,19 @@ export declare const pluginsSchema: z.ZodObject<{
612
612
  entry?: string | string[] | undefined;
613
613
  project?: string | string[] | undefined;
614
614
  }>]>;
615
+ plop: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
616
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
617
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
618
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ config?: string | string[] | undefined;
621
+ entry?: string | string[] | undefined;
622
+ project?: string | string[] | undefined;
623
+ }, {
624
+ config?: string | string[] | undefined;
625
+ entry?: string | string[] | undefined;
626
+ project?: string | string[] | undefined;
627
+ }>]>;
615
628
  postcss: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
616
629
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
617
630
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1350,6 +1363,11 @@ export declare const pluginsSchema: z.ZodObject<{
1350
1363
  entry?: string | string[] | undefined;
1351
1364
  project?: string | string[] | undefined;
1352
1365
  };
1366
+ plop: string | boolean | string[] | {
1367
+ config?: string | string[] | undefined;
1368
+ entry?: string | string[] | undefined;
1369
+ project?: string | string[] | undefined;
1370
+ };
1353
1371
  postcss: string | boolean | string[] | {
1354
1372
  config?: string | string[] | undefined;
1355
1373
  entry?: string | string[] | undefined;
@@ -1776,6 +1794,11 @@ export declare const pluginsSchema: z.ZodObject<{
1776
1794
  entry?: string | string[] | undefined;
1777
1795
  project?: string | string[] | undefined;
1778
1796
  };
1797
+ plop: string | boolean | string[] | {
1798
+ config?: string | string[] | undefined;
1799
+ entry?: string | string[] | undefined;
1800
+ project?: string | string[] | undefined;
1801
+ };
1779
1802
  postcss: string | boolean | string[] | {
1780
1803
  config?: string | string[] | undefined;
1781
1804
  entry?: string | string[] | undefined;
@@ -56,6 +56,7 @@ export const pluginsSchema = z.object({
56
56
  playwright: pluginSchema,
57
57
  'playwright-ct': pluginSchema,
58
58
  'playwright-test': pluginSchema,
59
+ plop: pluginSchema,
59
60
  postcss: pluginSchema,
60
61
  preconstruct: pluginSchema,
61
62
  prettier: pluginSchema,
@@ -1,2 +1,2 @@
1
- export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'c8' | 'capacitor' | 'changesets' | 'commitizen' | 'commitlint' | 'cspell' | 'cucumber' | 'cypress' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'gatsby' | 'github-actions' | 'glob' | 'graphql-codegen' | 'husky' | 'jest' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mocha' | 'moonrepo' | 'msw' | 'nest' | 'netlify' | 'next' | 'node' | 'node-test-runner' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'postcss' | 'preconstruct' | 'prettier' | 'react-cosmos' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'syncpack' | 'tailwind' | 'travis' | 'ts-node' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yorkie';
2
- export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "c8", "capacitor", "changesets", "commitizen", "commitlint", "cspell", "cucumber", "cypress", "dotenv", "drizzle", "eleventy", "eslint", "gatsby", "github-actions", "glob", "graphql-codegen", "husky", "jest", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mocha", "moonrepo", "msw", "nest", "netlify", "next", "node", "node-test-runner", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "playwright", "playwright-ct", "playwright-test", "postcss", "preconstruct", "prettier", "react-cosmos", "release-it", "remark", "remix", "rollup", "rsbuild", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "storybook", "stryker", "stylelint", "svelte", "syncpack", "tailwind", "travis", "ts-node", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yorkie"];
1
+ export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'c8' | 'capacitor' | 'changesets' | 'commitizen' | 'commitlint' | 'cspell' | 'cucumber' | 'cypress' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'gatsby' | 'github-actions' | 'glob' | 'graphql-codegen' | 'husky' | 'jest' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mocha' | 'moonrepo' | 'msw' | 'nest' | 'netlify' | 'next' | 'node' | 'node-test-runner' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'postcss' | 'preconstruct' | 'prettier' | 'react-cosmos' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'syncpack' | 'tailwind' | 'travis' | 'ts-node' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yorkie';
2
+ export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "c8", "capacitor", "changesets", "commitizen", "commitlint", "cspell", "cucumber", "cypress", "dotenv", "drizzle", "eleventy", "eslint", "gatsby", "github-actions", "glob", "graphql-codegen", "husky", "jest", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "mocha", "moonrepo", "msw", "nest", "netlify", "next", "node", "node-test-runner", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "playwright", "playwright-ct", "playwright-test", "plop", "postcss", "preconstruct", "prettier", "react-cosmos", "release-it", "remark", "remix", "rollup", "rsbuild", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "storybook", "stryker", "stylelint", "svelte", "syncpack", "tailwind", "travis", "ts-node", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yorkie"];
@@ -45,6 +45,7 @@ export const pluginNames = [
45
45
  'playwright',
46
46
  'playwright-ct',
47
47
  'playwright-test',
48
+ 'plop',
48
49
  'postcss',
49
50
  'preconstruct',
50
51
  'prettier',
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.37.2";
1
+ export declare const version = "5.38.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.37.2';
1
+ export const version = '5.38.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.37.2",
3
+ "version": "5.38.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": {
@@ -69,7 +69,7 @@
69
69
  "picocolors": "^1.1.0",
70
70
  "picomatch": "^4.0.1",
71
71
  "pretty-ms": "^9.0.0",
72
- "smol-toml": "^1.3.0",
72
+ "smol-toml": "^1.3.1",
73
73
  "strip-json-comments": "5.0.1",
74
74
  "summary": "2.1.0",
75
75
  "zod": "^3.22.4",