knip 5.37.1 → 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,
@@ -20,14 +20,16 @@ export const getReportersDependencies = (config, options) => {
20
20
  for (const reporter of config.reporters ?? []) {
21
21
  if (typeof reporter !== 'string' && reporter[0] === 'jest-junit') {
22
22
  const { testCasePropertiesFile, testCasePropertiesDirectory, testSuitePropertiesFile, testSuitePropertiesDirectory, } = reporter[1];
23
- const testCaseFileName = getStringPropOrFallback(testCasePropertiesFile, 'junitProperties.js');
24
- const testCaseDirectory = getStringPropOrFallback(testCasePropertiesDirectory, options.rootCwd);
25
- const testCaseFilePath = join(testCaseDirectory, testCaseFileName);
26
- const testSuiteFileName = getStringPropOrFallback(testSuitePropertiesFile, 'junitTestCaseProperties.js');
27
- const testSuiteDirectory = getStringPropOrFallback(testSuitePropertiesDirectory, options.rootCwd);
28
- const testSuiteFilePath = join(testSuiteDirectory, testSuiteFileName);
29
- jUnitReporterDeps.push(testCaseFilePath);
30
- jUnitReporterDeps.push(testSuiteFilePath);
23
+ if (testCasePropertiesFile) {
24
+ const fileName = getStringPropOrFallback(testCasePropertiesFile, 'junitProperties.js');
25
+ const dir = getStringPropOrFallback(testCasePropertiesDirectory, options.rootCwd);
26
+ jUnitReporterDeps.push(join(dir, fileName));
27
+ }
28
+ if (testSuitePropertiesFile) {
29
+ const fileName = getStringPropOrFallback(testSuitePropertiesFile, 'junitTestCaseProperties.js');
30
+ const dir = getStringPropOrFallback(testSuitePropertiesDirectory, options.rootCwd);
31
+ jUnitReporterDeps.push(join(dir, fileName));
32
+ }
31
33
  }
32
34
  }
33
35
  const reporters = config.reporters
@@ -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',
@@ -137,6 +137,7 @@ export const isConsiderReferencedNS = (node) => ts.isPropertyAssignment(node.par
137
137
  ts.isShorthandPropertyAssignment(node.parent) ||
138
138
  (ts.isCallExpression(node.parent) && node.parent.arguments.includes(node)) ||
139
139
  ts.isSpreadAssignment(node.parent) ||
140
+ ts.isArrayLiteralExpression(node.parent) ||
140
141
  ts.isExportAssignment(node.parent) ||
141
142
  (ts.isVariableDeclaration(node.parent) && node.parent.initializer === node) ||
142
143
  ts.isTypeQueryNode(node.parent);
@@ -1,43 +1,43 @@
1
1
  export declare const helpText = "\u2702\uFE0F Find unused files, dependencies and exports in your JavaScript and TypeScript projects\n\nUsage: knip [options]\n\nOptions:\n -c, --config [file] Configuration file path (default: [.]knip.json[c], knip.js, knip.ts or package.json#knip)\n -t, --tsConfig [file] TypeScript configuration path (default: tsconfig.json)\n --production Analyze only production source files (e.g. no test files, devDependencies)\n --strict Consider only direct dependencies of workspace (not devDependencies, not other workspaces)\n -W, --workspace [dir] Analyze a single workspace (default: analyze all configured workspaces)\n --directory [dir] Run process from a different directory (default: cwd)\n --cache Enable caching\n --cache-location Change cache location (default: node_modules/.cache/knip)\n --watch Watch mode\n --no-gitignore Don't use .gitignore\n --include Report only provided issue type(s), can be comma-separated or repeated (1)\n --exclude Exclude provided issue type(s) from report, can be comma-separated or repeated (1)\n --dependencies Shortcut for --include dependencies,unlisted,binaries,unresolved\n --exports Shortcut for --include exports,nsExports,classMembers,types,nsTypes,enumMembers,duplicates\n --files Shortcut for --include files\n --fix Fix issues\n --fix-type Fix only issues of type, can be comma-separated or repeated (2)\n --allow-remove-files Allow Knip to remove files (with --fix)\n --include-libs Include type definitions from external dependencies (default: false)\n --include-entry-exports Include entry files when reporting unused exports\n --isolate-workspaces Isolate workspaces into separate programs\n -n, --no-progress Don't show dynamic progress updates (automatically enabled in CI environments)\n --preprocessor Preprocess the results before providing it to the reporter(s), can be repeated\n --preprocessor-options Pass extra options to the preprocessor (as JSON string, see --reporter-options example)\n --reporter Select reporter: symbols, compact, codeowners, json, can be repeated (default: symbols)\n --reporter-options Pass extra options to the reporter (as JSON string, see example)\n --tags Include or exclude tagged exports\n --no-config-hints Suppress configuration hints\n --no-exit-code Always exit with code zero (0)\n --max-issues Maximum number of issues before non-zero exit code (default: 0)\n -d, --debug Show debug output\n --trace Show trace output\n --trace-export [name] Show trace output for named export(s)\n --trace-file [file] Show trace output for exports in file\n --performance Measure count and running time of expensive functions and display stats table\n -h, --help Print this help text\n -V, --version Print version\n\n(1) Issue types: files, dependencies, unlisted, unresolved, exports, nsExports, classMembers, types, nsTypes, enumMembers, duplicates\n(2) Fixable issue types: dependencies, exports, types\n\nExamples:\n\n$ knip\n$ knip --production\n$ knip --workspace packages/client --include files,dependencies\n$ knip -c ./config/knip.json --reporter compact\n$ knip --reporter codeowners --reporter-options '{\"path\":\".github/CODEOWNERS\"}'\n$ knip --tags=-knipignore\n\nWebsite: https://knip.dev";
2
2
  declare const _default: {
3
- cache: boolean | undefined;
4
- 'cache-location': string | undefined;
5
- config: string | undefined;
6
- debug: boolean | undefined;
7
- dependencies: boolean | undefined;
8
- directory: string | undefined;
9
- exclude: string[] | undefined;
10
- exports: boolean | undefined;
11
- tags: string[] | undefined;
12
- 'experimental-tags': string[] | undefined;
13
- files: boolean | undefined;
14
- fix: boolean | undefined;
15
- 'fix-type': string[] | undefined;
16
- 'allow-remove-files': boolean | undefined;
17
- help: boolean | undefined;
18
- 'ignore-internal': boolean | undefined;
19
- include: string[] | undefined;
20
- 'include-libs': boolean | undefined;
21
- 'include-entry-exports': boolean | undefined;
22
- 'isolate-workspaces': boolean | undefined;
23
- 'max-issues': string | undefined;
24
- 'no-config-hints': boolean | undefined;
25
- 'no-exit-code': boolean | undefined;
26
- 'no-gitignore': boolean | undefined;
27
- 'no-progress': boolean | undefined;
28
- performance: boolean | undefined;
29
- production: boolean | undefined;
30
- preprocessor: string[] | undefined;
31
- 'preprocessor-options': string | undefined;
32
- reporter: string[] | undefined;
33
- 'reporter-options': string | undefined;
34
- strict: boolean | undefined;
35
- trace: boolean | undefined;
36
- 'trace-export': string | undefined;
37
- 'trace-file': string | undefined;
38
- tsConfig: string | undefined;
39
- version: boolean | undefined;
40
- watch: boolean | undefined;
41
- workspace: string | undefined;
3
+ cache?: boolean | undefined;
4
+ 'cache-location'?: string | undefined;
5
+ config?: string | undefined;
6
+ debug?: boolean | undefined;
7
+ dependencies?: boolean | undefined;
8
+ directory?: string | undefined;
9
+ exclude?: string[] | undefined;
10
+ exports?: boolean | undefined;
11
+ tags?: string[] | undefined;
12
+ 'experimental-tags'?: string[] | undefined;
13
+ files?: boolean | undefined;
14
+ fix?: boolean | undefined;
15
+ 'fix-type'?: string[] | undefined;
16
+ 'allow-remove-files'?: boolean | undefined;
17
+ help?: boolean | undefined;
18
+ 'ignore-internal'?: boolean | undefined;
19
+ include?: string[] | undefined;
20
+ 'include-libs'?: boolean | undefined;
21
+ 'include-entry-exports'?: boolean | undefined;
22
+ 'isolate-workspaces'?: boolean | undefined;
23
+ 'max-issues'?: string | undefined;
24
+ 'no-config-hints'?: boolean | undefined;
25
+ 'no-exit-code'?: boolean | undefined;
26
+ 'no-gitignore'?: boolean | undefined;
27
+ 'no-progress'?: boolean | undefined;
28
+ performance?: boolean | undefined;
29
+ production?: boolean | undefined;
30
+ preprocessor?: string[] | undefined;
31
+ 'preprocessor-options'?: string | undefined;
32
+ reporter?: string[] | undefined;
33
+ 'reporter-options'?: string | undefined;
34
+ strict?: boolean | undefined;
35
+ trace?: boolean | undefined;
36
+ 'trace-export'?: string | undefined;
37
+ 'trace-file'?: string | undefined;
38
+ tsConfig?: string | undefined;
39
+ version?: boolean | undefined;
40
+ watch?: boolean | undefined;
41
+ workspace?: string | undefined;
42
42
  };
43
43
  export default _default;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.37.1";
1
+ export declare const version = "5.38.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.37.1';
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.1",
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",
@@ -82,12 +82,12 @@
82
82
  "devDependencies": {
83
83
  "@jest/types": "^29.6.3",
84
84
  "@release-it/bumper": "^6.0.1",
85
- "@types/bun": "^1.1.11",
85
+ "@types/bun": "^1.1.13",
86
86
  "@types/js-yaml": "^4.0.9",
87
87
  "@types/minimist": "^1.2.5",
88
88
  "@types/picomatch": "3.0.1",
89
89
  "@types/webpack": "^5.28.5",
90
- "@wdio/types": "^9.1.3",
90
+ "@wdio/types": "^9.2.2",
91
91
  "glob": "^10.4.2",
92
92
  "release-it": "^17.10.0",
93
93
  "type-fest": "^4.26.1",