knip 5.62.0 → 5.63.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.
Files changed (64) hide show
  1. package/README.md +22 -24
  2. package/dist/ConfigurationChief.d.ts +3 -0
  3. package/dist/ConfigurationChief.js +12 -4
  4. package/dist/IssueCollector.js +1 -1
  5. package/dist/ProjectPrincipal.d.ts +1 -0
  6. package/dist/ProjectPrincipal.js +9 -3
  7. package/dist/binaries/fallback.js +4 -2
  8. package/dist/cli.js +3 -2
  9. package/dist/compilers/index.d.ts +20 -0
  10. package/dist/graph/analyze.js +1 -1
  11. package/dist/graph/build.js +18 -8
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +2 -1
  14. package/dist/plugins/astro/index.d.ts +1 -0
  15. package/dist/plugins/astro/index.js +4 -0
  16. package/dist/plugins/index.d.ts +19 -1
  17. package/dist/plugins/index.js +4 -0
  18. package/dist/plugins/lefthook/index.js +2 -0
  19. package/dist/plugins/node-modules-inspector/index.d.ts +12 -0
  20. package/dist/plugins/node-modules-inspector/index.js +17 -0
  21. package/dist/plugins/playwright/index.js +8 -1
  22. package/dist/plugins/playwright/types.d.ts +20 -14
  23. package/dist/plugins/preconstruct/index.js +2 -1
  24. package/dist/plugins/react-router/index.js +18 -8
  25. package/dist/plugins/rsbuild/index.js +11 -2
  26. package/dist/plugins/rsbuild/types.d.ts +8 -0
  27. package/dist/plugins/rslib/index.d.ts +10 -0
  28. package/dist/plugins/rslib/index.js +15 -0
  29. package/dist/plugins/rslib/types.d.ts +1 -0
  30. package/dist/plugins/rslib/types.js +1 -0
  31. package/dist/plugins/rspack/index.js +1 -1
  32. package/dist/plugins/typescript/index.d.ts +1 -1
  33. package/dist/reporters/symbols.js +3 -1
  34. package/dist/reporters/util/configuration-hints.d.ts +1 -1
  35. package/dist/reporters/util/configuration-hints.js +55 -19
  36. package/dist/reporters/util/util.d.ts +0 -2
  37. package/dist/reporters/util/util.js +2 -2
  38. package/dist/schema/configuration.d.ts +112 -0
  39. package/dist/schema/plugins.d.ts +46 -0
  40. package/dist/schema/plugins.js +2 -0
  41. package/dist/types/PluginNames.d.ts +2 -2
  42. package/dist/types/PluginNames.js +2 -0
  43. package/dist/types/entries.d.ts +3 -0
  44. package/dist/types/entries.js +1 -0
  45. package/dist/types/issues.d.ts +3 -1
  46. package/dist/types/package-json.d.ts +4 -0
  47. package/dist/types/tsconfig-json.d.ts +14 -0
  48. package/dist/types/tsconfig-json.js +1 -0
  49. package/dist/typescript/ast-helpers.js +1 -1
  50. package/dist/util/fs.d.ts +1 -1
  51. package/dist/util/glob-core.d.ts +1 -1
  52. package/dist/util/glob-core.js +8 -7
  53. package/dist/util/glob.d.ts +1 -0
  54. package/dist/util/glob.js +1 -1
  55. package/dist/util/is-identifier-referenced.js +17 -17
  56. package/dist/util/package-json.d.ts +2 -1
  57. package/dist/util/package-json.js +24 -12
  58. package/dist/util/parse-and-convert-gitignores.js +2 -0
  59. package/dist/util/reporter.js +3 -3
  60. package/dist/util/table.js +1 -3
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/package.json +9 -14
  64. package/schema.json +8 -0
@@ -1,11 +1,12 @@
1
1
  import { toProductionEntry } from '../../util/input.js';
2
+ import { join } from '../../util/path.js';
2
3
  import { hasDependency } from '../../util/plugin.js';
3
4
  const title = 'Preconstruct';
4
5
  const enablers = ['@preconstruct/cli'];
5
6
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
6
7
  const config = ['package.json'];
7
8
  const resolveConfig = async (config) => {
8
- return (config.entrypoints ?? []).map(id => toProductionEntry(id, { allowIncludeExports: true }));
9
+ return (config.entrypoints ?? []).map(id => toProductionEntry(join('src', id), { allowIncludeExports: true }));
9
10
  };
10
11
  export default {
11
12
  title,
@@ -1,6 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import os from 'node:os';
3
- import { toEntry } from '../../util/input.js';
3
+ import { _glob } from '../../util/glob.js';
4
+ import { toEntry, toProductionDependency, toProductionEntry } from '../../util/input.js';
4
5
  import { join } from '../../util/path.js';
5
6
  import { hasDependency, load } from '../../util/plugin.js';
6
7
  import vite from '../vite/index.js';
@@ -28,13 +29,22 @@ const resolveConfig = async (localConfig, options) => {
28
29
  };
29
30
  const routes = routeConfig
30
31
  .flatMap(mapRoute)
31
- .map(route => (isWindows ? route : route.replace(/[$^*+?()\[\]]/g, '\\$&')));
32
- return [
33
- join(appDir, 'routes.{js,ts}'),
34
- join(appDir, 'root.{jsx,tsx}'),
35
- join(appDir, 'entry.{client,server}.{js,jsx,ts,tsx}'),
36
- ...routes,
37
- ].map(id => toEntry(id));
32
+ .map(route => (isWindows ? route : route.replace(/[\^*+?()\[\]]/g, '\\$&')));
33
+ const resolved = [
34
+ toEntry(join(appDir, 'routes.{js,ts}')),
35
+ toProductionEntry(join(appDir, 'root.{jsx,tsx}')),
36
+ toProductionEntry(join(appDir, 'entry.{client,server}.{js,jsx,ts,tsx}')),
37
+ ...routes.map(id => toProductionEntry(id)),
38
+ ];
39
+ const serverEntries = await _glob({
40
+ cwd: appDir,
41
+ patterns: ['entry.server.{js,ts,jsx,tsx}'],
42
+ });
43
+ if (serverEntries.length === 0) {
44
+ resolved.push(toProductionDependency('@react-router/node'));
45
+ resolved.push(toProductionDependency('isbot'));
46
+ }
47
+ return resolved;
38
48
  };
39
49
  export default {
40
50
  title,
@@ -1,10 +1,19 @@
1
+ import { toEntry } from '../../util/input.js';
1
2
  import { hasDependency } from '../../util/plugin.js';
2
3
  const title = 'Rsbuild';
3
4
  const enablers = ['@rsbuild/core'];
4
5
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
6
  const config = ['rsbuild*.config.{mjs,ts,js,cjs,mts,cts}'];
6
- const resolveConfig = async () => {
7
- return [];
7
+ const resolveConfig = async (config) => {
8
+ const inputs = new Set();
9
+ if (config.source?.entry) {
10
+ if (Array.isArray(config.source.entry))
11
+ for (const entry of config.source.entry)
12
+ inputs.add(toEntry(entry));
13
+ if (typeof config.source.entry === 'string')
14
+ inputs.add(toEntry(config.source.entry));
15
+ }
16
+ return Array.from(inputs);
8
17
  };
9
18
  export default {
10
19
  title,
@@ -1,3 +1,11 @@
1
+ type EntryDescription = Record<string, unknown>;
2
+ type Entry = Record<string, string | string[] | (EntryDescription & {
3
+ html?: boolean;
4
+ })>;
1
5
  export type RsbuildConfig = {
2
6
  plugins?: unknown[];
7
+ source?: {
8
+ entry?: Entry;
9
+ };
3
10
  };
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { IsPluginEnabled, ResolveConfig } from '../../types/config.js';
2
+ import type { RslibConfig } from './types.js';
3
+ declare const _default: {
4
+ title: string;
5
+ enablers: string[];
6
+ isEnabled: IsPluginEnabled;
7
+ entry: string[];
8
+ resolveConfig: ResolveConfig<RslibConfig>;
9
+ };
10
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { hasDependency } from '../../util/plugin.js';
2
+ const title = 'Rslib';
3
+ const enablers = ['rslib'];
4
+ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
+ const entry = ['rslib*.config.{mjs,ts,js,cjs,mts,cts}'];
6
+ const resolveConfig = () => {
7
+ return [];
8
+ };
9
+ export default {
10
+ title,
11
+ enablers,
12
+ isEnabled,
13
+ entry,
14
+ resolveConfig,
15
+ };
@@ -0,0 +1 @@
1
+ export type RslibConfig = {};
@@ -0,0 +1 @@
1
+ export {};
@@ -3,7 +3,7 @@ import { findWebpackDependenciesFromConfig } from '../webpack/index.js';
3
3
  const title = 'Rspack';
4
4
  const enablers = ['@rspack/core'];
5
5
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
6
- const config = ['rspack.config*.{js,ts,mjs,cjs}'];
6
+ const config = ['rspack.config*.{js,ts,mjs,mts,cjs,cts}'];
7
7
  const resolveConfig = async (localConfig, options) => {
8
8
  const inputs = await findWebpackDependenciesFromConfig(localConfig, options);
9
9
  return inputs.filter(input => !input.specifier.startsWith('builtin:'));
@@ -1,5 +1,5 @@
1
- import type { TsConfigJson } from 'type-fest';
2
1
  import type { IsPluginEnabled, ResolveConfig } from '../../types/config.js';
2
+ import type { TsConfigJson } from '../../types/tsconfig-json.js';
3
3
  export declare const docs: {
4
4
  note: string;
5
5
  };
@@ -20,7 +20,9 @@ export default (options) => {
20
20
  if (!isDisableConfigHints) {
21
21
  printConfigurationHints(options);
22
22
  }
23
- if (totalIssues === 0 && isShowProgress) {
23
+ if (totalIssues === 0 &&
24
+ isShowProgress &&
25
+ (!options.isTreatConfigHintsAsErrors || options.configurationHints.size === 0)) {
24
26
  console.log('✂️ Excellent, Knip found no issues.');
25
27
  }
26
28
  };
@@ -1,2 +1,2 @@
1
1
  import type { ReporterOptions } from '../../types/issues.js';
2
- export declare const printConfigurationHints: ({ counters, issues, tagHints, configurationHints, isTreatConfigHintsAsErrors, includedWorkspaces, }: ReporterOptions) => void;
2
+ export declare const printConfigurationHints: ({ counters, issues, tagHints, configurationHints, isTreatConfigHintsAsErrors, includedWorkspaces, configFilePath, }: ReporterOptions) => void;
@@ -1,14 +1,33 @@
1
- import { toRelative } from '../../util/path.js';
1
+ import { relative, toRelative } from '../../util/path.js';
2
+ import { Table } from '../../util/table.js';
2
3
  import { byPathDepth } from '../../util/workspace.js';
3
- import { bright, dim, getColoredTitle, getDimmedTitle, plain, yellow } from './util.js';
4
- const id = (id) => bright(id.toString() + (id === '.' ? ' (root)' : ''));
5
- const type = (id) => yellow(id.split('-').at(0));
6
- const workspace = ({ isRootOnly, workspaceName: id }) => isRootOnly ? '' : id === '.' ? ` in root ${yellow('"."')} workspace` : ` in ${yellow(id ?? '.')}`;
7
- const unused = (options) => `Remove from ${type(options.type)}${options.workspaceName === '.' ? '' : `${workspace(options)}`}: ${id(options.identifier)}`;
8
- const empty = (options) => `Refine ${type(options.type)}${workspace(options)}: ${id(options.identifier)} (no files found)`;
9
- const remove = (options) => `Remove ${type(options.type)}${workspace(options)}: ${id(options.identifier)}`;
10
- const add = (options) => `Add to or refine in ${yellow('workspaces')}: ${id(options.identifier)} (${options.size} unused files)`;
11
- const topLevel = (options) => `Remove or move unused top-level ${type(options.type)} to one of ${yellow('workspaces')}: ${id(options.identifier)}`;
4
+ import { bright, dim, getColoredTitle, getDimmedTitle } from './util.js';
5
+ const getWorkspaceName = (hint) => hint.workspaceName &&
6
+ hint.workspaceName !== '.' &&
7
+ hint.type !== 'workspace-unconfigured' &&
8
+ hint.type !== 'package-entry'
9
+ ? hint.workspaceName
10
+ : '';
11
+ const getTableForHints = (hints) => {
12
+ const table = new Table({ truncateStart: ['identifier', 'workspace', 'filePath'] });
13
+ for (const hint of hints) {
14
+ table.row();
15
+ table.cell('identifier', hint.identifier.toString());
16
+ table.cell('workspace', getWorkspaceName(hint));
17
+ table.cell('filePath', hint.filePath ? relative(hint.filePath) : '');
18
+ table.cell('description', dim(hint.message));
19
+ }
20
+ return table;
21
+ };
22
+ const type = (id) => bright(id.split('-').at(0));
23
+ const unused = (options) => `Remove from ${type(options.type)}`;
24
+ const empty = (options) => `Refine ${type(options.type)} pattern (no matches)`;
25
+ const remove = (options) => `Remove redundant ${type(options.type)} pattern`;
26
+ const topLevel = (options) => `Remove, or move unused top-level ${type(options.type)} to one of ${bright('"workspaces"')}`;
27
+ const add = (options) => options.configFilePath
28
+ ? `Add ${bright('entry')} and/or refine ${bright('project')} files in ${bright(`workspaces["${options.workspaceName}"]`)} (${options.size} unused files)`
29
+ : `Create ${bright('knip.json')} configuration file with ${bright(`workspaces["${options.workspaceName}"]`)} object (${options.size} unused files)`;
30
+ const packageEntry = () => 'Package entry file not found';
12
31
  const hintPrinters = new Map([
13
32
  ['ignoreBinaries', { print: unused }],
14
33
  ['ignoreDependencies', { print: unused }],
@@ -21,8 +40,19 @@ const hintPrinters = new Map([
21
40
  ['workspace-unconfigured', { print: add }],
22
41
  ['entry-top-level', { print: topLevel }],
23
42
  ['project-top-level', { print: topLevel }],
43
+ ['package-entry', { print: packageEntry }],
24
44
  ]);
25
- export const printConfigurationHints = ({ counters, issues, tagHints, configurationHints, isTreatConfigHintsAsErrors, includedWorkspaces, }) => {
45
+ const hintTypesOrder = [
46
+ ['workspace-unconfigured'],
47
+ ['entry-top-level', 'project-top-level'],
48
+ ['ignoreWorkspaces'],
49
+ ['ignoreDependencies'],
50
+ ['ignoreBinaries'],
51
+ ['ignoreUnresolved'],
52
+ ['entry-empty', 'project-empty', 'entry-redundant', 'project-redundant'],
53
+ ['package-entry'],
54
+ ];
55
+ export const printConfigurationHints = ({ counters, issues, tagHints, configurationHints, isTreatConfigHintsAsErrors, includedWorkspaces, configFilePath, }) => {
26
56
  if (counters.files > 20) {
27
57
  const workspaces = includedWorkspaces
28
58
  .map(workspace => workspace.dir)
@@ -41,17 +71,23 @@ export const printConfigurationHints = ({ counters, issues, tagHints, configurat
41
71
  }
42
72
  }
43
73
  if (configurationHints.size > 0) {
44
- const isTopLevel = (type) => type.includes('top-level');
45
- const hintOrderer = (a, b) => isTopLevel(a.type) && !isTopLevel(b.type) ? -1 : !isTopLevel(a.type) && isTopLevel(b.type) ? 1 : 0;
46
74
  const getTitle = isTreatConfigHintsAsErrors ? getColoredTitle : getDimmedTitle;
47
- const style = isTreatConfigHintsAsErrors ? plain : dim;
48
75
  console.log(getTitle('Configuration hints', configurationHints.size));
49
- const isRootOnly = includedWorkspaces.length === 1 && includedWorkspaces[0].name === '.';
50
- for (const hint of Array.from(configurationHints).sort(hintOrderer)) {
51
- const hintPrinter = hintPrinters.get(hint.type);
52
- if (hintPrinter)
53
- console.warn(style(hintPrinter.print({ ...hint, isRootOnly })));
76
+ const hintsByType = new Map();
77
+ for (const hint of configurationHints) {
78
+ const hints = hintsByType.get(hint.type) ?? [];
79
+ hintsByType.set(hint.type, [...hints, hint]);
54
80
  }
81
+ const rows = hintTypesOrder.flatMap(hintTypes => hintTypes.flatMap(hintType => {
82
+ const hints = hintsByType.get(hintType) ?? [];
83
+ return hints.map(hint => {
84
+ hint.filePath ??= configFilePath;
85
+ const hintPrinter = hintPrinters.get(hint.type);
86
+ const message = hintPrinter ? hintPrinter.print({ ...hint, configFilePath }) : '';
87
+ return { ...hint, message };
88
+ });
89
+ }));
90
+ console.warn(getTableForHints(rows).toString());
55
91
  }
56
92
  if (tagHints.size > 0) {
57
93
  console.log(getColoredTitle('Tag issues', tagHints.size));
@@ -1,10 +1,8 @@
1
1
  import { ISSUE_TYPE_TITLE } from '../../constants.js';
2
2
  import { type Issue, type IssueSeverity, type IssueSymbol } from '../../types/issues.js';
3
3
  import { Table } from '../../util/table.js';
4
- export declare const plain: (text: string) => string;
5
4
  export declare const dim: import("picocolors/types.js").Formatter;
6
5
  export declare const bright: import("picocolors/types.js").Formatter;
7
- export declare const yellow: import("picocolors/types.js").Formatter;
8
6
  export declare const getIssueTypeTitle: (reportType: keyof typeof ISSUE_TYPE_TITLE) => string;
9
7
  export declare const getColoredTitle: (title: string, count: number) => string;
10
8
  export declare const getDimmedTitle: (title: string, count: number) => string;
@@ -3,10 +3,10 @@ import { ISSUE_TYPE_TITLE } from '../../constants.js';
3
3
  import { SymbolType } from '../../types/issues.js';
4
4
  import { relative } from '../../util/path.js';
5
5
  import { Table } from '../../util/table.js';
6
- export const plain = (text) => text;
6
+ const plain = (text) => text;
7
7
  export const dim = picocolors.gray;
8
8
  export const bright = picocolors.whiteBright;
9
- export const yellow = picocolors.yellow;
9
+ const yellow = picocolors.yellow;
10
10
  export const getIssueTypeTitle = (reportType) => ISSUE_TYPE_TITLE[reportType];
11
11
  export const getColoredTitle = (title, count) => `${picocolors.yellowBright(picocolors.underline(title))} (${count})`;
12
12
  export const getDimmedTitle = (title, count) => `${yellow(`${picocolors.underline(title)} (${count})`)}`;
@@ -696,6 +696,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
696
696
  entry?: string | string[] | undefined;
697
697
  project?: string | string[] | undefined;
698
698
  }>]>>;
699
+ 'node-modules-inspector': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
700
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
701
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
702
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
703
+ }, "strip", z.ZodTypeAny, {
704
+ config?: string | string[] | undefined;
705
+ entry?: string | string[] | undefined;
706
+ project?: string | string[] | undefined;
707
+ }, {
708
+ config?: string | string[] | undefined;
709
+ entry?: string | string[] | undefined;
710
+ project?: string | string[] | undefined;
711
+ }>]>>;
699
712
  nodemon: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
700
713
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
701
714
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -995,6 +1008,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
995
1008
  entry?: string | string[] | undefined;
996
1009
  project?: string | string[] | undefined;
997
1010
  }>]>>;
1011
+ rslib: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1012
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1013
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1014
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1015
+ }, "strip", z.ZodTypeAny, {
1016
+ config?: string | string[] | undefined;
1017
+ entry?: string | string[] | undefined;
1018
+ project?: string | string[] | undefined;
1019
+ }, {
1020
+ config?: string | string[] | undefined;
1021
+ entry?: string | string[] | undefined;
1022
+ project?: string | string[] | undefined;
1023
+ }>]>>;
998
1024
  rspack: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
999
1025
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1000
1026
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1708,6 +1734,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
1708
1734
  entry?: string | string[] | undefined;
1709
1735
  project?: string | string[] | undefined;
1710
1736
  } | undefined;
1737
+ 'node-modules-inspector'?: string | boolean | string[] | {
1738
+ config?: string | string[] | undefined;
1739
+ entry?: string | string[] | undefined;
1740
+ project?: string | string[] | undefined;
1741
+ } | undefined;
1711
1742
  nodemon?: string | boolean | string[] | {
1712
1743
  config?: string | string[] | undefined;
1713
1744
  entry?: string | string[] | undefined;
@@ -1823,6 +1854,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
1823
1854
  entry?: string | string[] | undefined;
1824
1855
  project?: string | string[] | undefined;
1825
1856
  } | undefined;
1857
+ rslib?: string | boolean | string[] | {
1858
+ config?: string | string[] | undefined;
1859
+ entry?: string | string[] | undefined;
1860
+ project?: string | string[] | undefined;
1861
+ } | undefined;
1826
1862
  rspack?: string | boolean | string[] | {
1827
1863
  config?: string | string[] | undefined;
1828
1864
  entry?: string | string[] | undefined;
@@ -2263,6 +2299,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
2263
2299
  entry?: string | string[] | undefined;
2264
2300
  project?: string | string[] | undefined;
2265
2301
  } | undefined;
2302
+ 'node-modules-inspector'?: string | boolean | string[] | {
2303
+ config?: string | string[] | undefined;
2304
+ entry?: string | string[] | undefined;
2305
+ project?: string | string[] | undefined;
2306
+ } | undefined;
2266
2307
  nodemon?: string | boolean | string[] | {
2267
2308
  config?: string | string[] | undefined;
2268
2309
  entry?: string | string[] | undefined;
@@ -2378,6 +2419,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
2378
2419
  entry?: string | string[] | undefined;
2379
2420
  project?: string | string[] | undefined;
2380
2421
  } | undefined;
2422
+ rslib?: string | boolean | string[] | {
2423
+ config?: string | string[] | undefined;
2424
+ entry?: string | string[] | undefined;
2425
+ project?: string | string[] | undefined;
2426
+ } | undefined;
2381
2427
  rspack?: string | boolean | string[] | {
2382
2428
  config?: string | string[] | undefined;
2383
2429
  entry?: string | string[] | undefined;
@@ -3225,6 +3271,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
3225
3271
  entry?: string | string[] | undefined;
3226
3272
  project?: string | string[] | undefined;
3227
3273
  }>]>>;
3274
+ 'node-modules-inspector': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3275
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3276
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3277
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3278
+ }, "strip", z.ZodTypeAny, {
3279
+ config?: string | string[] | undefined;
3280
+ entry?: string | string[] | undefined;
3281
+ project?: string | string[] | undefined;
3282
+ }, {
3283
+ config?: string | string[] | undefined;
3284
+ entry?: string | string[] | undefined;
3285
+ project?: string | string[] | undefined;
3286
+ }>]>>;
3228
3287
  nodemon: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3229
3288
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3230
3289
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -3524,6 +3583,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
3524
3583
  entry?: string | string[] | undefined;
3525
3584
  project?: string | string[] | undefined;
3526
3585
  }>]>>;
3586
+ rslib: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3587
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3588
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3589
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3590
+ }, "strip", z.ZodTypeAny, {
3591
+ config?: string | string[] | undefined;
3592
+ entry?: string | string[] | undefined;
3593
+ project?: string | string[] | undefined;
3594
+ }, {
3595
+ config?: string | string[] | undefined;
3596
+ entry?: string | string[] | undefined;
3597
+ project?: string | string[] | undefined;
3598
+ }>]>>;
3527
3599
  rspack: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3528
3600
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3529
3601
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -4240,6 +4312,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
4240
4312
  entry?: string | string[] | undefined;
4241
4313
  project?: string | string[] | undefined;
4242
4314
  } | undefined;
4315
+ 'node-modules-inspector'?: string | boolean | string[] | {
4316
+ config?: string | string[] | undefined;
4317
+ entry?: string | string[] | undefined;
4318
+ project?: string | string[] | undefined;
4319
+ } | undefined;
4243
4320
  nodemon?: string | boolean | string[] | {
4244
4321
  config?: string | string[] | undefined;
4245
4322
  entry?: string | string[] | undefined;
@@ -4355,6 +4432,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
4355
4432
  entry?: string | string[] | undefined;
4356
4433
  project?: string | string[] | undefined;
4357
4434
  } | undefined;
4435
+ rslib?: string | boolean | string[] | {
4436
+ config?: string | string[] | undefined;
4437
+ entry?: string | string[] | undefined;
4438
+ project?: string | string[] | undefined;
4439
+ } | undefined;
4358
4440
  rspack?: string | boolean | string[] | {
4359
4441
  config?: string | string[] | undefined;
4360
4442
  entry?: string | string[] | undefined;
@@ -4803,6 +4885,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
4803
4885
  entry?: string | string[] | undefined;
4804
4886
  project?: string | string[] | undefined;
4805
4887
  } | undefined;
4888
+ 'node-modules-inspector'?: string | boolean | string[] | {
4889
+ config?: string | string[] | undefined;
4890
+ entry?: string | string[] | undefined;
4891
+ project?: string | string[] | undefined;
4892
+ } | undefined;
4806
4893
  nodemon?: string | boolean | string[] | {
4807
4894
  config?: string | string[] | undefined;
4808
4895
  entry?: string | string[] | undefined;
@@ -4918,6 +5005,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
4918
5005
  entry?: string | string[] | undefined;
4919
5006
  project?: string | string[] | undefined;
4920
5007
  } | undefined;
5008
+ rslib?: string | boolean | string[] | {
5009
+ config?: string | string[] | undefined;
5010
+ entry?: string | string[] | undefined;
5011
+ project?: string | string[] | undefined;
5012
+ } | undefined;
4921
5013
  rspack?: string | boolean | string[] | {
4922
5014
  config?: string | string[] | undefined;
4923
5015
  entry?: string | string[] | undefined;
@@ -5362,6 +5454,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
5362
5454
  entry?: string | string[] | undefined;
5363
5455
  project?: string | string[] | undefined;
5364
5456
  } | undefined;
5457
+ 'node-modules-inspector'?: string | boolean | string[] | {
5458
+ config?: string | string[] | undefined;
5459
+ entry?: string | string[] | undefined;
5460
+ project?: string | string[] | undefined;
5461
+ } | undefined;
5365
5462
  nodemon?: string | boolean | string[] | {
5366
5463
  config?: string | string[] | undefined;
5367
5464
  entry?: string | string[] | undefined;
@@ -5477,6 +5574,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
5477
5574
  entry?: string | string[] | undefined;
5478
5575
  project?: string | string[] | undefined;
5479
5576
  } | undefined;
5577
+ rslib?: string | boolean | string[] | {
5578
+ config?: string | string[] | undefined;
5579
+ entry?: string | string[] | undefined;
5580
+ project?: string | string[] | undefined;
5581
+ } | undefined;
5480
5582
  rspack?: string | boolean | string[] | {
5481
5583
  config?: string | string[] | undefined;
5482
5584
  entry?: string | string[] | undefined;
@@ -5925,6 +6027,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
5925
6027
  entry?: string | string[] | undefined;
5926
6028
  project?: string | string[] | undefined;
5927
6029
  } | undefined;
6030
+ 'node-modules-inspector'?: string | boolean | string[] | {
6031
+ config?: string | string[] | undefined;
6032
+ entry?: string | string[] | undefined;
6033
+ project?: string | string[] | undefined;
6034
+ } | undefined;
5928
6035
  nodemon?: string | boolean | string[] | {
5929
6036
  config?: string | string[] | undefined;
5930
6037
  entry?: string | string[] | undefined;
@@ -6040,6 +6147,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
6040
6147
  entry?: string | string[] | undefined;
6041
6148
  project?: string | string[] | undefined;
6042
6149
  } | undefined;
6150
+ rslib?: string | boolean | string[] | {
6151
+ config?: string | string[] | undefined;
6152
+ entry?: string | string[] | undefined;
6153
+ project?: string | string[] | undefined;
6154
+ } | undefined;
6043
6155
  rspack?: string | boolean | string[] | {
6044
6156
  config?: string | string[] | undefined;
6045
6157
  entry?: string | string[] | undefined;
@@ -677,6 +677,19 @@ export declare const pluginsSchema: z.ZodObject<{
677
677
  entry?: string | string[] | undefined;
678
678
  project?: string | string[] | undefined;
679
679
  }>]>;
680
+ 'node-modules-inspector': z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
681
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
682
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
683
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
684
+ }, "strip", z.ZodTypeAny, {
685
+ config?: string | string[] | undefined;
686
+ entry?: string | string[] | undefined;
687
+ project?: string | string[] | undefined;
688
+ }, {
689
+ config?: string | string[] | undefined;
690
+ entry?: string | string[] | undefined;
691
+ project?: string | string[] | undefined;
692
+ }>]>;
680
693
  nodemon: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
681
694
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
682
695
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -976,6 +989,19 @@ export declare const pluginsSchema: z.ZodObject<{
976
989
  entry?: string | string[] | undefined;
977
990
  project?: string | string[] | undefined;
978
991
  }>]>;
992
+ rslib: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
993
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
994
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
995
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
996
+ }, "strip", z.ZodTypeAny, {
997
+ config?: string | string[] | undefined;
998
+ entry?: string | string[] | undefined;
999
+ project?: string | string[] | undefined;
1000
+ }, {
1001
+ config?: string | string[] | undefined;
1002
+ entry?: string | string[] | undefined;
1003
+ project?: string | string[] | undefined;
1004
+ }>]>;
979
1005
  rspack: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
980
1006
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
981
1007
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1687,6 +1713,11 @@ export declare const pluginsSchema: z.ZodObject<{
1687
1713
  entry?: string | string[] | undefined;
1688
1714
  project?: string | string[] | undefined;
1689
1715
  };
1716
+ 'node-modules-inspector': string | boolean | string[] | {
1717
+ config?: string | string[] | undefined;
1718
+ entry?: string | string[] | undefined;
1719
+ project?: string | string[] | undefined;
1720
+ };
1690
1721
  nodemon: string | boolean | string[] | {
1691
1722
  config?: string | string[] | undefined;
1692
1723
  entry?: string | string[] | undefined;
@@ -1802,6 +1833,11 @@ export declare const pluginsSchema: z.ZodObject<{
1802
1833
  entry?: string | string[] | undefined;
1803
1834
  project?: string | string[] | undefined;
1804
1835
  };
1836
+ rslib: string | boolean | string[] | {
1837
+ config?: string | string[] | undefined;
1838
+ entry?: string | string[] | undefined;
1839
+ project?: string | string[] | undefined;
1840
+ };
1805
1841
  rspack: string | boolean | string[] | {
1806
1842
  config?: string | string[] | undefined;
1807
1843
  entry?: string | string[] | undefined;
@@ -2233,6 +2269,11 @@ export declare const pluginsSchema: z.ZodObject<{
2233
2269
  entry?: string | string[] | undefined;
2234
2270
  project?: string | string[] | undefined;
2235
2271
  };
2272
+ 'node-modules-inspector': string | boolean | string[] | {
2273
+ config?: string | string[] | undefined;
2274
+ entry?: string | string[] | undefined;
2275
+ project?: string | string[] | undefined;
2276
+ };
2236
2277
  nodemon: string | boolean | string[] | {
2237
2278
  config?: string | string[] | undefined;
2238
2279
  entry?: string | string[] | undefined;
@@ -2348,6 +2389,11 @@ export declare const pluginsSchema: z.ZodObject<{
2348
2389
  entry?: string | string[] | undefined;
2349
2390
  project?: string | string[] | undefined;
2350
2391
  };
2392
+ rslib: string | boolean | string[] | {
2393
+ config?: string | string[] | undefined;
2394
+ entry?: string | string[] | undefined;
2395
+ project?: string | string[] | undefined;
2396
+ };
2351
2397
  rspack: string | boolean | string[] | {
2352
2398
  config?: string | string[] | undefined;
2353
2399
  entry?: string | string[] | undefined;
@@ -61,6 +61,7 @@ export const pluginsSchema = z.object({
61
61
  netlify: pluginSchema,
62
62
  next: pluginSchema,
63
63
  node: pluginSchema,
64
+ 'node-modules-inspector': pluginSchema,
64
65
  nodemon: pluginSchema,
65
66
  'npm-package-json-lint': pluginSchema,
66
67
  nuxt: pluginSchema,
@@ -84,6 +85,7 @@ export const pluginsSchema = z.object({
84
85
  remix: pluginSchema,
85
86
  rollup: pluginSchema,
86
87
  rsbuild: pluginSchema,
88
+ rslib: pluginSchema,
87
89
  rspack: pluginSchema,
88
90
  'semantic-release': pluginSchema,
89
91
  sentry: pluginSchema,
@@ -1,2 +1,2 @@
1
- export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'biome' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'expo' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'node' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'oxlint' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'react-cosmos' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'svgo' | 'syncpack' | 'tailwind' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie';
2
- export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "biome", "bun", "c8", "capacitor", "changelogen", "changelogithub", "changesets", "commitizen", "commitlint", "convex", "create-typescript-app", "cspell", "cucumber", "cypress", "dependency-cruiser", "docusaurus", "dotenv", "drizzle", "eleventy", "eslint", "expo", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "hardhat", "husky", "i18next-parser", "jest", "karma", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "metro", "mocha", "moonrepo", "msw", "nano-staged", "nest", "netlify", "next", "node", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "oxlint", "playwright", "playwright-ct", "playwright-test", "plop", "postcss", "preconstruct", "prettier", "prisma", "react-cosmos", "react-router", "relay", "release-it", "remark", "remix", "rollup", "rsbuild", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "svgo", "syncpack", "tailwind", "travis", "ts-node", "tsdown", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie"];
1
+ export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'biome' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'expo' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'oxlint' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'react-cosmos' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'semantic-release' | 'sentry' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'svgo' | 'syncpack' | 'tailwind' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'xo' | 'yarn' | 'yorkie';
2
+ export declare const pluginNames: readonly ["angular", "astro", "ava", "babel", "biome", "bun", "c8", "capacitor", "changelogen", "changelogithub", "changesets", "commitizen", "commitlint", "convex", "create-typescript-app", "cspell", "cucumber", "cypress", "dependency-cruiser", "docusaurus", "dotenv", "drizzle", "eleventy", "eslint", "expo", "gatsby", "github-action", "github-actions", "glob", "graphql-codegen", "hardhat", "husky", "i18next-parser", "jest", "karma", "ladle", "lefthook", "lint-staged", "linthtml", "lockfile-lint", "lost-pixel", "markdownlint", "metro", "mocha", "moonrepo", "msw", "nano-staged", "nest", "netlify", "next", "node", "node-modules-inspector", "nodemon", "npm-package-json-lint", "nuxt", "nx", "nyc", "oclif", "oxlint", "playwright", "playwright-ct", "playwright-test", "plop", "postcss", "preconstruct", "prettier", "prisma", "react-cosmos", "react-router", "relay", "release-it", "remark", "remix", "rollup", "rsbuild", "rslib", "rspack", "semantic-release", "sentry", "simple-git-hooks", "size-limit", "sst", "starlight", "storybook", "stryker", "stylelint", "svelte", "svgo", "syncpack", "tailwind", "travis", "ts-node", "tsdown", "tsup", "tsx", "typedoc", "typescript", "unbuild", "unocss", "vercel-og", "vike", "vite", "vitest", "vue", "webdriver-io", "webpack", "wireit", "wrangler", "xo", "yarn", "yorkie"];