knip 5.63.1 → 5.64.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 (76) hide show
  1. package/dist/ConfigurationChief.d.ts +12 -0
  2. package/dist/DependencyDeputy.js +3 -2
  3. package/dist/IssueFixer.js +3 -1
  4. package/dist/binaries/bash-parser.d.ts +1 -0
  5. package/dist/binaries/bash-parser.js +3 -0
  6. package/dist/binaries/fallback.js +3 -2
  7. package/dist/binaries/package-manager/bun.js +1 -0
  8. package/dist/binaries/plugins.js +3 -1
  9. package/dist/compilers/index.d.ts +20 -0
  10. package/dist/constants.js +2 -0
  11. package/dist/graph/analyze.js +7 -4
  12. package/dist/graph/build.js +7 -7
  13. package/dist/plugins/angular/index.js +2 -3
  14. package/dist/plugins/bumpp/index.d.ts +8 -0
  15. package/dist/plugins/bumpp/index.js +11 -0
  16. package/dist/plugins/eslint/index.d.ts +7 -0
  17. package/dist/plugins/eslint/index.js +12 -0
  18. package/dist/plugins/glob/index.d.ts +0 -1
  19. package/dist/plugins/glob/index.js +0 -1
  20. package/dist/plugins/index.d.ts +19 -7
  21. package/dist/plugins/index.js +4 -0
  22. package/dist/plugins/karma/helpers.js +1 -1
  23. package/dist/plugins/node-modules-inspector/index.d.ts +0 -1
  24. package/dist/plugins/node-modules-inspector/index.js +0 -1
  25. package/dist/plugins/nuxt/index.js +7 -1
  26. package/dist/plugins/nuxt/types.d.ts +1 -1
  27. package/dist/plugins/oxlint/index.d.ts +0 -1
  28. package/dist/plugins/oxlint/index.js +0 -1
  29. package/dist/plugins/playwright/index.d.ts +0 -1
  30. package/dist/plugins/playwright/index.js +0 -1
  31. package/dist/plugins/playwright-test/index.d.ts +0 -1
  32. package/dist/plugins/playwright-test/index.js +0 -1
  33. package/dist/plugins/pnpm/index.d.ts +1 -0
  34. package/dist/plugins/pnpm/index.js +5 -1
  35. package/dist/plugins/prisma/index.d.ts +0 -1
  36. package/dist/plugins/prisma/index.js +0 -1
  37. package/dist/plugins/rslib/index.js +1 -1
  38. package/dist/plugins/rstest/index.d.ts +10 -0
  39. package/dist/plugins/rstest/index.js +29 -0
  40. package/dist/plugins/rstest/types.d.ts +6 -0
  41. package/dist/plugins/rstest/types.js +1 -0
  42. package/dist/plugins/ts-node/index.d.ts +0 -1
  43. package/dist/plugins/ts-node/index.js +0 -1
  44. package/dist/reporters/githubActions.d.ts +3 -0
  45. package/dist/reporters/githubActions.js +94 -0
  46. package/dist/reporters/index.d.ts +1 -0
  47. package/dist/reporters/index.js +2 -0
  48. package/dist/reporters/json.js +1 -1
  49. package/dist/reporters/util/configuration-hints.d.ts +13 -1
  50. package/dist/reporters/util/configuration-hints.js +1 -0
  51. package/dist/schema/configuration.d.ts +112 -0
  52. package/dist/schema/plugins.d.ts +46 -0
  53. package/dist/schema/plugins.js +2 -0
  54. package/dist/types/PluginNames.d.ts +2 -2
  55. package/dist/types/PluginNames.js +2 -0
  56. package/dist/types/args.d.ts +2 -0
  57. package/dist/types/exports.d.ts +1 -1
  58. package/dist/types/imports.d.ts +1 -1
  59. package/dist/types/module-graph.d.ts +5 -4
  60. package/dist/typescript/SourceFile.d.ts +2 -2
  61. package/dist/typescript/ast-helpers.d.ts +4 -0
  62. package/dist/typescript/ast-helpers.js +29 -0
  63. package/dist/typescript/find-internal-references.js +10 -1
  64. package/dist/typescript/get-imports-and-exports.js +27 -17
  65. package/dist/typescript/visitors/dynamic-imports/importCall.js +6 -1
  66. package/dist/util/cli-arguments.d.ts +3 -2
  67. package/dist/util/cli-arguments.js +2 -2
  68. package/dist/util/create-options.d.ts +22 -3
  69. package/dist/util/create-options.js +1 -1
  70. package/dist/util/load-config.d.ts +2 -1
  71. package/dist/util/load-config.js +4 -4
  72. package/dist/util/modules.js +18 -7
  73. package/dist/version.d.ts +1 -1
  74. package/dist/version.js +1 -1
  75. package/package.json +3 -3
  76. package/schema.json +8 -0
@@ -1,8 +1,12 @@
1
+ import { _firstGlob } from '../../util/glob.js';
1
2
  const title = 'pnpm';
2
- const isEnabled = ({ manifest }) => Boolean(manifest.packageManager?.startsWith('pnpm@'));
3
+ const isEnabled = async ({ cwd, manifest }) => Boolean(manifest.packageManager?.startsWith('pnpm@') ||
4
+ (await _firstGlob({ cwd, patterns: ['pnpm-lock.yaml', 'pnpm-workspace.yaml'] })));
5
+ const isRootOnly = true;
3
6
  const config = ['.pnpmfile.cjs'];
4
7
  export default {
5
8
  title,
6
9
  isEnabled,
10
+ isRootOnly,
7
11
  config,
8
12
  };
@@ -6,7 +6,6 @@ declare const _default: {
6
6
  isEnabled: IsPluginEnabled;
7
7
  config: string[];
8
8
  args: {
9
- binaries: string[];
10
9
  config: boolean;
11
10
  };
12
11
  resolveConfig: ResolveConfig<PrismaConfig>;
@@ -10,7 +10,6 @@ const resolveConfig = async (config, options) => {
10
10
  return [];
11
11
  };
12
12
  const args = {
13
- binaries: ['prisma'],
14
13
  config: true,
15
14
  };
16
15
  export default {
@@ -1,6 +1,6 @@
1
1
  import { hasDependency } from '../../util/plugin.js';
2
2
  const title = 'Rslib';
3
- const enablers = ['rslib'];
3
+ const enablers = ['@rslib/core'];
4
4
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
5
5
  const entry = ['rslib*.config.{mjs,ts,js,cjs,mts,cts}'];
6
6
  const resolveConfig = () => {
@@ -0,0 +1,10 @@
1
+ import type { IsPluginEnabled, ResolveConfig } from '../../types/config.js';
2
+ import type { RstestConfig } from './types.js';
3
+ declare const _default: {
4
+ title: string;
5
+ enablers: string[];
6
+ isEnabled: IsPluginEnabled;
7
+ config: string[];
8
+ resolveConfig: ResolveConfig<RstestConfig>;
9
+ };
10
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import { toDeferResolve, toEntry } from '../../util/input.js';
2
+ import { hasDependency } from '../../util/plugin.js';
3
+ const title = 'Rstest';
4
+ const enablers = ['@rstest/core'];
5
+ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
6
+ const config = ['rstest.config.{js,cjs,mjs,ts,cts,mts}'];
7
+ const mocks = ['**/__mocks__/**/*.?(c|m)[jt]s?(x)'];
8
+ const entry = ['**/*.{test,spec}.?(c|m)[jt]s?(x)'];
9
+ function testEnvironment(config) {
10
+ if (!config.testEnvironment || config.testEnvironment === 'node')
11
+ return [];
12
+ return [config.testEnvironment];
13
+ }
14
+ const resolveConfig = async (config) => {
15
+ const entries = (config.include ?? entry)
16
+ .concat(...mocks)
17
+ .map(toEntry)
18
+ .concat(...(config.exclude ?? []).map(id => toEntry(`!${id}`)));
19
+ const environments = testEnvironment(config);
20
+ const setupFiles = config.setupFiles ?? [];
21
+ return [...environments, ...setupFiles, ...entries].map(id => (typeof id === 'string' ? toDeferResolve(id) : id));
22
+ };
23
+ export default {
24
+ title,
25
+ enablers,
26
+ isEnabled,
27
+ config,
28
+ resolveConfig,
29
+ };
@@ -0,0 +1,6 @@
1
+ export type RstestConfig = {
2
+ include?: string[];
3
+ exclude?: string[];
4
+ testEnvironment?: 'node' | 'jsdom' | 'happy-dom';
5
+ setupFiles?: string[];
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,6 @@
1
1
  declare const _default: {
2
2
  title: string;
3
3
  args: {
4
- binaries: string[];
5
4
  positional: boolean;
6
5
  nodeImportArgs: boolean;
7
6
  boolean: string[];
@@ -1,6 +1,5 @@
1
1
  const title = 'ts-node';
2
2
  const args = {
3
- binaries: [title],
4
3
  positional: true,
5
4
  nodeImportArgs: true,
6
5
  boolean: ['transpileOnly', 'compilerHost', 'ignoreDiagnostics', 'swc', 'preferTsExts'],
@@ -0,0 +1,3 @@
1
+ import type { ReporterOptions } from '../types/issues.js';
2
+ declare const _default: ({ report, issues, cwd, configurationHints, isDisableConfigHints, isTreatConfigHintsAsErrors, configFilePath, }: ReporterOptions) => void;
3
+ export default _default;
@@ -0,0 +1,94 @@
1
+ import { ISSUE_TYPE_TITLE } from '../constants.js';
2
+ import { relative } from '../util/path.js';
3
+ import { hintPrinters } from './util/configuration-hints.js';
4
+ import { getIssueTypeTitle } from './util/util.js';
5
+ const createGitHubActionsLogger = () => {
6
+ const formatAnnotation = (level, message, options) => {
7
+ const params = [`file=${options.file}`];
8
+ if (options.startLine != null)
9
+ params.push(`line=${options.startLine}`);
10
+ if (options.endLine != null)
11
+ params.push(`endLine=${options.endLine}`);
12
+ if (options.startColumn != null)
13
+ params.push(`col=${options.startColumn}`);
14
+ if (options.endColumn != null)
15
+ params.push(`endColumn=${options.endColumn}`);
16
+ params.push(`title=✂️ Knip${options.title ? ` / ${options.title}` : ''}`);
17
+ const paramString = params.join(',');
18
+ console.log(`::${level} ${paramString}::${message}`);
19
+ };
20
+ return {
21
+ info: (message) => console.log(message),
22
+ error: (message, options) => formatAnnotation('error', message, options),
23
+ warning: (message, options) => formatAnnotation('warning', message, options),
24
+ notice: (message, options) => formatAnnotation('notice', message, options),
25
+ };
26
+ };
27
+ export default ({ report, issues, cwd, configurationHints, isDisableConfigHints, isTreatConfigHintsAsErrors, configFilePath, }) => {
28
+ const core = createGitHubActionsLogger();
29
+ const reportMultipleGroups = Object.values(report).filter(Boolean).length > 1;
30
+ for (let [reportType, isReportType] of Object.entries(report)) {
31
+ if (reportType === 'files')
32
+ reportType = '_files';
33
+ if (isReportType) {
34
+ const title = reportMultipleGroups && getIssueTypeTitle(reportType);
35
+ const issuesForType = Object.values(issues[reportType]).flatMap(Object.values);
36
+ if (issuesForType.length > 0) {
37
+ title && core.info(`${title} (${issuesForType.length})`);
38
+ for (const issue of issuesForType) {
39
+ if (issue.isFixed || issue.severity === 'off')
40
+ continue;
41
+ const log = issue.severity === 'error' ? core.error : core.warning;
42
+ const filePath = relative(cwd, issue.filePath);
43
+ const message = reportType === '_files' ? issue.symbol : `${issue.symbol} in ${filePath}`;
44
+ log(message, {
45
+ file: filePath,
46
+ startLine: issue.line ?? 1,
47
+ endLine: issue.line ?? 1,
48
+ startColumn: issue.col ?? 1,
49
+ endColumn: issue.col ?? 1,
50
+ title: ISSUE_TYPE_TITLE[issue.type],
51
+ });
52
+ }
53
+ }
54
+ }
55
+ }
56
+ if (!isDisableConfigHints && configurationHints.size > 0) {
57
+ const CONFIG_HINTS_TITLE = 'Configuration hints';
58
+ core.info(`${CONFIG_HINTS_TITLE} (${configurationHints.size})`);
59
+ for (const hint of configurationHints) {
60
+ const hintPrinter = hintPrinters.get(hint.type);
61
+ const message = hintPrinter?.print({
62
+ ...hint,
63
+ filePath: hint.filePath ?? configFilePath ?? '',
64
+ configFilePath,
65
+ }) ?? '';
66
+ const file = hint.filePath
67
+ ? relative(cwd, hint.filePath)
68
+ : configFilePath
69
+ ? relative(cwd, configFilePath)
70
+ : 'knip.json';
71
+ const hintMessage = `${message}: ${hint.identifier} in ${file}`;
72
+ if (isTreatConfigHintsAsErrors) {
73
+ core.error(hintMessage, {
74
+ file,
75
+ startLine: 1,
76
+ endLine: 1,
77
+ startColumn: 1,
78
+ endColumn: 1,
79
+ title: CONFIG_HINTS_TITLE,
80
+ });
81
+ }
82
+ else {
83
+ core.notice(hintMessage, {
84
+ file,
85
+ startLine: 1,
86
+ endLine: 1,
87
+ startColumn: 1,
88
+ endColumn: 1,
89
+ title: CONFIG_HINTS_TITLE,
90
+ });
91
+ }
92
+ }
93
+ }
94
+ };
@@ -6,5 +6,6 @@ declare const _default: {
6
6
  codeclimate: ({ report, issues, cwd }: import("../index.js").ReporterOptions) => Promise<void>;
7
7
  json: ({ report, issues, options, cwd }: import("../index.js").ReporterOptions) => Promise<void>;
8
8
  markdown: ({ report, issues, cwd }: import("../index.js").ReporterOptions) => void;
9
+ 'github-actions': ({ report, issues, cwd, configurationHints, isDisableConfigHints, isTreatConfigHintsAsErrors, configFilePath, }: import("../index.js").ReporterOptions) => void;
9
10
  };
10
11
  export default _default;
@@ -2,6 +2,7 @@ import codeclimate from './codeclimate.js';
2
2
  import codeowners from './codeowners.js';
3
3
  import compact from './compact.js';
4
4
  import disclosure from './disclosure.js';
5
+ import githubActions from './githubActions.js';
5
6
  import json from './json.js';
6
7
  import markdown from './markdown.js';
7
8
  import symbols from './symbols.js';
@@ -13,4 +14,5 @@ export default {
13
14
  codeclimate,
14
15
  json,
15
16
  markdown,
17
+ 'github-actions': githubActions,
16
18
  };
@@ -54,7 +54,7 @@ export default async ({ report, issues, options, cwd }) => {
54
54
  }
55
55
  }
56
56
  else {
57
- if (['unlisted', 'binaries'].includes(type)) {
57
+ if (type === 'binaries') {
58
58
  json[filePath][type]?.push({ name: symbol });
59
59
  }
60
60
  else {
@@ -1,2 +1,14 @@
1
- import type { ReporterOptions } from '../../types/issues.js';
1
+ import type { ConfigurationHintType, ReporterOptions } from '../../types/issues.js';
2
+ interface PrintHintOptions {
3
+ type: ConfigurationHintType;
4
+ identifier: string | RegExp;
5
+ filePath: string;
6
+ configFilePath?: string;
7
+ workspaceName?: string;
8
+ size?: number;
9
+ }
10
+ declare const hintPrinters: Map<ConfigurationHintType, {
11
+ print: (options: PrintHintOptions) => string;
12
+ }>;
13
+ export { hintPrinters };
2
14
  export declare const printConfigurationHints: ({ cwd, counters, issues, tagHints, configurationHints, isTreatConfigHintsAsErrors, includedWorkspaceDirs, configFilePath, }: ReporterOptions) => void;
@@ -42,6 +42,7 @@ const hintPrinters = new Map([
42
42
  ['project-top-level', { print: topLevel }],
43
43
  ['package-entry', { print: packageEntry }],
44
44
  ]);
45
+ export { hintPrinters };
45
46
  const hintTypesOrder = [
46
47
  ['workspace-unconfigured'],
47
48
  ['entry-top-level', 'project-top-level'],
@@ -98,6 +98,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
98
98
  entry?: string | string[] | undefined;
99
99
  project?: string | string[] | undefined;
100
100
  }>]>>;
101
+ bumpp: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
102
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
103
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
104
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ config?: string | string[] | undefined;
107
+ entry?: string | string[] | undefined;
108
+ project?: string | string[] | undefined;
109
+ }, {
110
+ config?: string | string[] | undefined;
111
+ entry?: string | string[] | undefined;
112
+ project?: string | string[] | undefined;
113
+ }>]>>;
101
114
  bun: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
102
115
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
103
116
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1047,6 +1060,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
1047
1060
  entry?: string | string[] | undefined;
1048
1061
  project?: string | string[] | undefined;
1049
1062
  }>]>>;
1063
+ rstest: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1064
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1065
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1066
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1067
+ }, "strip", z.ZodTypeAny, {
1068
+ config?: string | string[] | undefined;
1069
+ entry?: string | string[] | undefined;
1070
+ project?: string | string[] | undefined;
1071
+ }, {
1072
+ config?: string | string[] | undefined;
1073
+ entry?: string | string[] | undefined;
1074
+ project?: string | string[] | undefined;
1075
+ }>]>>;
1050
1076
  'semantic-release': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1051
1077
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1052
1078
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1522,6 +1548,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
1522
1548
  entry?: string | string[] | undefined;
1523
1549
  project?: string | string[] | undefined;
1524
1550
  } | undefined;
1551
+ bumpp?: string | boolean | string[] | {
1552
+ config?: string | string[] | undefined;
1553
+ entry?: string | string[] | undefined;
1554
+ project?: string | string[] | undefined;
1555
+ } | undefined;
1525
1556
  bun?: string | boolean | string[] | {
1526
1557
  config?: string | string[] | undefined;
1527
1558
  entry?: string | string[] | undefined;
@@ -1882,6 +1913,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
1882
1913
  entry?: string | string[] | undefined;
1883
1914
  project?: string | string[] | undefined;
1884
1915
  } | undefined;
1916
+ rstest?: string | boolean | string[] | {
1917
+ config?: string | string[] | undefined;
1918
+ entry?: string | string[] | undefined;
1919
+ project?: string | string[] | undefined;
1920
+ } | undefined;
1885
1921
  'semantic-release'?: string | boolean | string[] | {
1886
1922
  config?: string | string[] | undefined;
1887
1923
  entry?: string | string[] | undefined;
@@ -2092,6 +2128,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
2092
2128
  entry?: string | string[] | undefined;
2093
2129
  project?: string | string[] | undefined;
2094
2130
  } | undefined;
2131
+ bumpp?: string | boolean | string[] | {
2132
+ config?: string | string[] | undefined;
2133
+ entry?: string | string[] | undefined;
2134
+ project?: string | string[] | undefined;
2135
+ } | undefined;
2095
2136
  bun?: string | boolean | string[] | {
2096
2137
  config?: string | string[] | undefined;
2097
2138
  entry?: string | string[] | undefined;
@@ -2452,6 +2493,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
2452
2493
  entry?: string | string[] | undefined;
2453
2494
  project?: string | string[] | undefined;
2454
2495
  } | undefined;
2496
+ rstest?: string | boolean | string[] | {
2497
+ config?: string | string[] | undefined;
2498
+ entry?: string | string[] | undefined;
2499
+ project?: string | string[] | undefined;
2500
+ } | undefined;
2455
2501
  'semantic-release'?: string | boolean | string[] | {
2456
2502
  config?: string | string[] | undefined;
2457
2503
  entry?: string | string[] | undefined;
@@ -2696,6 +2742,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
2696
2742
  entry?: string | string[] | undefined;
2697
2743
  project?: string | string[] | undefined;
2698
2744
  }>]>>;
2745
+ bumpp: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2746
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2747
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2748
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2749
+ }, "strip", z.ZodTypeAny, {
2750
+ config?: string | string[] | undefined;
2751
+ entry?: string | string[] | undefined;
2752
+ project?: string | string[] | undefined;
2753
+ }, {
2754
+ config?: string | string[] | undefined;
2755
+ entry?: string | string[] | undefined;
2756
+ project?: string | string[] | undefined;
2757
+ }>]>>;
2699
2758
  bun: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
2700
2759
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
2701
2760
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -3645,6 +3704,19 @@ export declare const knipConfigurationSchema: z.ZodObject<{
3645
3704
  entry?: string | string[] | undefined;
3646
3705
  project?: string | string[] | undefined;
3647
3706
  }>]>>;
3707
+ rstest: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3708
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3709
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3710
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3711
+ }, "strip", z.ZodTypeAny, {
3712
+ config?: string | string[] | undefined;
3713
+ entry?: string | string[] | undefined;
3714
+ project?: string | string[] | undefined;
3715
+ }, {
3716
+ config?: string | string[] | undefined;
3717
+ entry?: string | string[] | undefined;
3718
+ project?: string | string[] | undefined;
3719
+ }>]>>;
3648
3720
  'semantic-release': z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
3649
3721
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3650
3722
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -4120,6 +4192,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
4120
4192
  entry?: string | string[] | undefined;
4121
4193
  project?: string | string[] | undefined;
4122
4194
  } | undefined;
4195
+ bumpp?: string | boolean | string[] | {
4196
+ config?: string | string[] | undefined;
4197
+ entry?: string | string[] | undefined;
4198
+ project?: string | string[] | undefined;
4199
+ } | undefined;
4123
4200
  bun?: string | boolean | string[] | {
4124
4201
  config?: string | string[] | undefined;
4125
4202
  entry?: string | string[] | undefined;
@@ -4480,6 +4557,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
4480
4557
  entry?: string | string[] | undefined;
4481
4558
  project?: string | string[] | undefined;
4482
4559
  } | undefined;
4560
+ rstest?: string | boolean | string[] | {
4561
+ config?: string | string[] | undefined;
4562
+ entry?: string | string[] | undefined;
4563
+ project?: string | string[] | undefined;
4564
+ } | undefined;
4483
4565
  'semantic-release'?: string | boolean | string[] | {
4484
4566
  config?: string | string[] | undefined;
4485
4567
  entry?: string | string[] | undefined;
@@ -4701,6 +4783,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
4701
4783
  entry?: string | string[] | undefined;
4702
4784
  project?: string | string[] | undefined;
4703
4785
  } | undefined;
4786
+ bumpp?: string | boolean | string[] | {
4787
+ config?: string | string[] | undefined;
4788
+ entry?: string | string[] | undefined;
4789
+ project?: string | string[] | undefined;
4790
+ } | undefined;
4704
4791
  bun?: string | boolean | string[] | {
4705
4792
  config?: string | string[] | undefined;
4706
4793
  entry?: string | string[] | undefined;
@@ -5061,6 +5148,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
5061
5148
  entry?: string | string[] | undefined;
5062
5149
  project?: string | string[] | undefined;
5063
5150
  } | undefined;
5151
+ rstest?: string | boolean | string[] | {
5152
+ config?: string | string[] | undefined;
5153
+ entry?: string | string[] | undefined;
5154
+ project?: string | string[] | undefined;
5155
+ } | undefined;
5064
5156
  'semantic-release'?: string | boolean | string[] | {
5065
5157
  config?: string | string[] | undefined;
5066
5158
  entry?: string | string[] | undefined;
@@ -5272,6 +5364,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
5272
5364
  entry?: string | string[] | undefined;
5273
5365
  project?: string | string[] | undefined;
5274
5366
  } | undefined;
5367
+ bumpp?: string | boolean | string[] | {
5368
+ config?: string | string[] | undefined;
5369
+ entry?: string | string[] | undefined;
5370
+ project?: string | string[] | undefined;
5371
+ } | undefined;
5275
5372
  bun?: string | boolean | string[] | {
5276
5373
  config?: string | string[] | undefined;
5277
5374
  entry?: string | string[] | undefined;
@@ -5632,6 +5729,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
5632
5729
  entry?: string | string[] | undefined;
5633
5730
  project?: string | string[] | undefined;
5634
5731
  } | undefined;
5732
+ rstest?: string | boolean | string[] | {
5733
+ config?: string | string[] | undefined;
5734
+ entry?: string | string[] | undefined;
5735
+ project?: string | string[] | undefined;
5736
+ } | undefined;
5635
5737
  'semantic-release'?: string | boolean | string[] | {
5636
5738
  config?: string | string[] | undefined;
5637
5739
  entry?: string | string[] | undefined;
@@ -5853,6 +5955,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
5853
5955
  entry?: string | string[] | undefined;
5854
5956
  project?: string | string[] | undefined;
5855
5957
  } | undefined;
5958
+ bumpp?: string | boolean | string[] | {
5959
+ config?: string | string[] | undefined;
5960
+ entry?: string | string[] | undefined;
5961
+ project?: string | string[] | undefined;
5962
+ } | undefined;
5856
5963
  bun?: string | boolean | string[] | {
5857
5964
  config?: string | string[] | undefined;
5858
5965
  entry?: string | string[] | undefined;
@@ -6213,6 +6320,11 @@ export declare const knipConfigurationSchema: z.ZodObject<{
6213
6320
  entry?: string | string[] | undefined;
6214
6321
  project?: string | string[] | undefined;
6215
6322
  } | undefined;
6323
+ rstest?: string | boolean | string[] | {
6324
+ config?: string | string[] | undefined;
6325
+ entry?: string | string[] | undefined;
6326
+ project?: string | string[] | undefined;
6327
+ } | undefined;
6216
6328
  'semantic-release'?: string | boolean | string[] | {
6217
6329
  config?: string | string[] | undefined;
6218
6330
  entry?: string | string[] | undefined;
@@ -79,6 +79,19 @@ export declare const pluginsSchema: z.ZodObject<{
79
79
  entry?: string | string[] | undefined;
80
80
  project?: string | string[] | undefined;
81
81
  }>]>;
82
+ bumpp: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
83
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
84
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
85
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ config?: string | string[] | undefined;
88
+ entry?: string | string[] | undefined;
89
+ project?: string | string[] | undefined;
90
+ }, {
91
+ config?: string | string[] | undefined;
92
+ entry?: string | string[] | undefined;
93
+ project?: string | string[] | undefined;
94
+ }>]>;
82
95
  bun: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
83
96
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
84
97
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1028,6 +1041,19 @@ export declare const pluginsSchema: z.ZodObject<{
1028
1041
  entry?: string | string[] | undefined;
1029
1042
  project?: string | string[] | undefined;
1030
1043
  }>]>;
1044
+ rstest: z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1045
+ config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1046
+ entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1047
+ project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1048
+ }, "strip", z.ZodTypeAny, {
1049
+ config?: string | string[] | undefined;
1050
+ entry?: string | string[] | undefined;
1051
+ project?: string | string[] | undefined;
1052
+ }, {
1053
+ config?: string | string[] | undefined;
1054
+ entry?: string | string[] | undefined;
1055
+ project?: string | string[] | undefined;
1056
+ }>]>;
1031
1057
  'semantic-release': z.ZodUnion<[z.ZodBoolean, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1032
1058
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1033
1059
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1501,6 +1527,11 @@ export declare const pluginsSchema: z.ZodObject<{
1501
1527
  entry?: string | string[] | undefined;
1502
1528
  project?: string | string[] | undefined;
1503
1529
  };
1530
+ bumpp: string | boolean | string[] | {
1531
+ config?: string | string[] | undefined;
1532
+ entry?: string | string[] | undefined;
1533
+ project?: string | string[] | undefined;
1534
+ };
1504
1535
  bun: string | boolean | string[] | {
1505
1536
  config?: string | string[] | undefined;
1506
1537
  entry?: string | string[] | undefined;
@@ -1861,6 +1892,11 @@ export declare const pluginsSchema: z.ZodObject<{
1861
1892
  entry?: string | string[] | undefined;
1862
1893
  project?: string | string[] | undefined;
1863
1894
  };
1895
+ rstest: string | boolean | string[] | {
1896
+ config?: string | string[] | undefined;
1897
+ entry?: string | string[] | undefined;
1898
+ project?: string | string[] | undefined;
1899
+ };
1864
1900
  'semantic-release': string | boolean | string[] | {
1865
1901
  config?: string | string[] | undefined;
1866
1902
  entry?: string | string[] | undefined;
@@ -2062,6 +2098,11 @@ export declare const pluginsSchema: z.ZodObject<{
2062
2098
  entry?: string | string[] | undefined;
2063
2099
  project?: string | string[] | undefined;
2064
2100
  };
2101
+ bumpp: string | boolean | string[] | {
2102
+ config?: string | string[] | undefined;
2103
+ entry?: string | string[] | undefined;
2104
+ project?: string | string[] | undefined;
2105
+ };
2065
2106
  bun: string | boolean | string[] | {
2066
2107
  config?: string | string[] | undefined;
2067
2108
  entry?: string | string[] | undefined;
@@ -2422,6 +2463,11 @@ export declare const pluginsSchema: z.ZodObject<{
2422
2463
  entry?: string | string[] | undefined;
2423
2464
  project?: string | string[] | undefined;
2424
2465
  };
2466
+ rstest: string | boolean | string[] | {
2467
+ config?: string | string[] | undefined;
2468
+ entry?: string | string[] | undefined;
2469
+ project?: string | string[] | undefined;
2470
+ };
2425
2471
  'semantic-release': string | boolean | string[] | {
2426
2472
  config?: string | string[] | undefined;
2427
2473
  entry?: string | string[] | undefined;
@@ -15,6 +15,7 @@ export const pluginsSchema = z.object({
15
15
  ava: pluginSchema,
16
16
  babel: pluginSchema,
17
17
  biome: pluginSchema,
18
+ bumpp: pluginSchema,
18
19
  bun: pluginSchema,
19
20
  c8: pluginSchema,
20
21
  capacitor: pluginSchema,
@@ -88,6 +89,7 @@ export const pluginsSchema = z.object({
88
89
  rsbuild: pluginSchema,
89
90
  rslib: pluginSchema,
90
91
  rspack: pluginSchema,
92
+ rstest: pluginSchema,
91
93
  'semantic-release': pluginSchema,
92
94
  sentry: pluginSchema,
93
95
  'simple-git-hooks': 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' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'oxlint' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pnpm' | '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", "pnpm", "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"];
1
+ export type PluginName = 'angular' | 'astro' | 'ava' | 'babel' | 'biome' | 'bumpp' | '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' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'react-cosmos' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | '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", "bumpp", "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", "pnpm", "postcss", "preconstruct", "prettier", "prisma", "react-cosmos", "react-router", "relay", "release-it", "remark", "remix", "rollup", "rsbuild", "rslib", "rspack", "rstest", "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"];
@@ -4,6 +4,7 @@ export const pluginNames = [
4
4
  'ava',
5
5
  'babel',
6
6
  'biome',
7
+ 'bumpp',
7
8
  'bun',
8
9
  'c8',
9
10
  'capacitor',
@@ -77,6 +78,7 @@ export const pluginNames = [
77
78
  'rsbuild',
78
79
  'rslib',
79
80
  'rspack',
81
+ 'rstest',
80
82
  'semantic-release',
81
83
  'sentry',
82
84
  'simple-git-hooks',
@@ -1,4 +1,5 @@
1
1
  import type { ParsedArgs } from 'minimist';
2
+ import type { Input } from '../util/input.js';
2
3
  export type ConfigArg = boolean | (string | [string, (id: string) => string])[];
3
4
  export type Args = {
4
5
  binaries?: string[];
@@ -11,4 +12,5 @@ export type Args = {
11
12
  config?: ConfigArg;
12
13
  args?: (args: string[]) => string[];
13
14
  fromArgs?: string[] | ((parsed: ParsedArgs, args: string[]) => string[]);
15
+ resolveInputs?: (parsed: ParsedArgs, args: string[]) => Input[];
14
16
  };