knip 6.42.1 → 6.43.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.
- package/dist/ConfigurationChief.d.ts +18 -0
- package/dist/IssueFixer.js +10 -5
- package/dist/WorkspaceWorker.js +15 -10
- package/dist/binaries/resolvers/bun.js +1 -0
- package/dist/binaries/resolvers/npm.js +12 -2
- package/dist/binaries/resolvers/pnpm.js +5 -3
- package/dist/compilers/compilers.js +2 -2
- package/dist/constants.js +1 -0
- package/dist/plugins/_vue/auto-import.js +31 -1
- package/dist/plugins/buf/index.d.ts +3 -0
- package/dist/plugins/buf/index.js +33 -0
- package/dist/plugins/buf/types.d.ts +8 -0
- package/dist/plugins/buf/types.js +1 -0
- package/dist/plugins/electron-forge/index.d.ts +3 -0
- package/dist/plugins/electron-forge/index.js +94 -0
- package/dist/plugins/eslint/helpers.d.ts +1 -0
- package/dist/plugins/eslint/helpers.js +1 -1
- package/dist/plugins/eslint/resolveFromAST.js +35 -10
- package/dist/plugins/expo/helpers.d.ts +1 -1
- package/dist/plugins/expo/helpers.js +15 -8
- package/dist/plugins/expo/types.d.ts +2 -1
- package/dist/plugins/index.d.ts +3 -0
- package/dist/plugins/index.js +6 -0
- package/dist/plugins/mcp/index.d.ts +3 -0
- package/dist/plugins/mcp/index.js +33 -0
- package/dist/plugins/mcp/types.d.ts +11 -0
- package/dist/plugins/mcp/types.js +1 -0
- package/dist/plugins/next/index.d.ts +3 -0
- package/dist/plugins/next/index.js +57 -9
- package/dist/plugins/next/types.d.ts +11 -0
- package/dist/plugins/next/types.js +1 -0
- package/dist/plugins/tailwind/compiler.js +6 -2
- package/dist/plugins/travis/index.js +2 -2
- package/dist/plugins/typescript/index.js +2 -4
- package/dist/plugins/vitest/helpers.d.ts +1 -1
- package/dist/plugins/vitest/helpers.js +13 -3
- package/dist/plugins/vitest/index.js +52 -44
- package/dist/plugins/vitest/types.d.ts +11 -7
- package/dist/run.js +1 -1
- package/dist/schema/configuration.d.ts +45 -0
- package/dist/schema/plugins.d.ts +15 -0
- package/dist/schema/plugins.js +3 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +3 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/typescript/ast-nodes.js +3 -3
- package/dist/typescript/visitors/exports.js +5 -4
- package/dist/typescript/visitors/walk.js +13 -1
- package/dist/util/create-options.d.ts +30 -0
- package/dist/util/modules.js +2 -1
- package/dist/util/remove-export.js +3 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/schema.json +12 -0
package/dist/plugins/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { default as ava } from './ava/index.js';
|
|
|
7
7
|
import { default as babel } from './babel/index.js';
|
|
8
8
|
import { default as biome } from './biome/index.js';
|
|
9
9
|
import { default as borp } from './borp/index.js';
|
|
10
|
+
import { default as buf } from './buf/index.js';
|
|
10
11
|
import { default as bumpp } from './bumpp/index.js';
|
|
11
12
|
import { default as bun } from './bun/index.js';
|
|
12
13
|
import { default as c8 } from './c8/index.js';
|
|
@@ -27,6 +28,7 @@ import { default as dependencyCruiser } from './dependency-cruiser/index.js';
|
|
|
27
28
|
import { default as docusaurus } from './docusaurus/index.js';
|
|
28
29
|
import { default as dotenv } from './dotenv/index.js';
|
|
29
30
|
import { default as drizzle } from './drizzle/index.js';
|
|
31
|
+
import { default as electronForge } from './electron-forge/index.js';
|
|
30
32
|
import { default as electronVite } from './electron-vite/index.js';
|
|
31
33
|
import { default as eleventy } from './eleventy/index.js';
|
|
32
34
|
import { default as esbuild } from './esbuild/index.js';
|
|
@@ -63,6 +65,7 @@ import { default as lostPixel } from './lost-pixel/index.js';
|
|
|
63
65
|
import { default as lunaria } from './lunaria/index.js';
|
|
64
66
|
import { default as markdownlint } from './markdownlint/index.js';
|
|
65
67
|
import { default as marko } from './marko/index.js';
|
|
68
|
+
import { default as mcp } from './mcp/index.js';
|
|
66
69
|
import { default as mdx } from './mdx/index.js';
|
|
67
70
|
import { default as mdxlint } from './mdxlint/index.js';
|
|
68
71
|
import { default as metro } from './metro/index.js';
|
|
@@ -203,6 +206,7 @@ export const Plugins = {
|
|
|
203
206
|
babel,
|
|
204
207
|
biome,
|
|
205
208
|
borp,
|
|
209
|
+
buf,
|
|
206
210
|
bumpp,
|
|
207
211
|
bun,
|
|
208
212
|
c8,
|
|
@@ -223,6 +227,7 @@ export const Plugins = {
|
|
|
223
227
|
docusaurus,
|
|
224
228
|
dotenv,
|
|
225
229
|
drizzle,
|
|
230
|
+
'electron-forge': electronForge,
|
|
226
231
|
'electron-vite': electronVite,
|
|
227
232
|
eleventy,
|
|
228
233
|
esbuild,
|
|
@@ -259,6 +264,7 @@ export const Plugins = {
|
|
|
259
264
|
lunaria,
|
|
260
265
|
markdownlint,
|
|
261
266
|
marko,
|
|
267
|
+
mcp,
|
|
262
268
|
mdx,
|
|
263
269
|
mdxlint,
|
|
264
270
|
metro,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isFile } from '../../util/fs.js';
|
|
2
|
+
import { toAbsolute } from '../../util/path.js';
|
|
3
|
+
const title = 'MCP';
|
|
4
|
+
const enablers = 'This plugin is enabled when `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json` or `.codex/config.toml` is found.';
|
|
5
|
+
const isRootOnly = true;
|
|
6
|
+
const config = ['.mcp.json', '.cursor/mcp.json', '.vscode/mcp.json', '.codex/config.toml'];
|
|
7
|
+
const isEnabled = ({ cwd }) => config.some(file => isFile(cwd, file));
|
|
8
|
+
const PROJECT_DIR_VAR = /\$\{(?:workspaceFolder|CLAUDE_PROJECT_DIR(?::-[^}]*)?)\}/g;
|
|
9
|
+
const resolveConfig = async (localConfig, options) => {
|
|
10
|
+
const { cwd, getInputsFromScripts } = options;
|
|
11
|
+
const servers = { ...localConfig.mcpServers, ...localConfig.servers, ...localConfig.mcp_servers };
|
|
12
|
+
const inputs = [];
|
|
13
|
+
for (const server of Object.values(servers)) {
|
|
14
|
+
if (typeof server?.command !== 'string')
|
|
15
|
+
continue;
|
|
16
|
+
const script = [server.command, ...(server.args ?? [])].join(' ').replace(PROJECT_DIR_VAR, '.');
|
|
17
|
+
const dir = server.cwd ? toAbsolute(server.cwd.replace(PROJECT_DIR_VAR, '.'), cwd) : cwd;
|
|
18
|
+
for (const input of getInputsFromScripts(script, { optionalBinaries: true })) {
|
|
19
|
+
input.dir = dir;
|
|
20
|
+
inputs.push(input);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return inputs;
|
|
24
|
+
};
|
|
25
|
+
const plugin = {
|
|
26
|
+
title,
|
|
27
|
+
enablers,
|
|
28
|
+
isEnabled,
|
|
29
|
+
isRootOnly,
|
|
30
|
+
config,
|
|
31
|
+
resolveConfig,
|
|
32
|
+
};
|
|
33
|
+
export default plugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { findProperty, getPropertyValues } from '../../typescript/ast-helpers.js
|
|
|
3
3
|
import { getStringValue } from '../../typescript/ast-nodes.js';
|
|
4
4
|
import { isDirectory } from '../../util/fs.js';
|
|
5
5
|
import { toConfig, toDeferResolve, toProductionEntry } from '../../util/input.js';
|
|
6
|
-
import { join } from '../../util/path.js';
|
|
6
|
+
import { isInNodeModules, join } from '../../util/path.js';
|
|
7
7
|
import { hasDependency } from '../../util/plugin.js';
|
|
8
8
|
const title = 'Next.js';
|
|
9
9
|
const enablers = ['next'];
|
|
@@ -39,6 +39,56 @@ const getEntryFilePatterns = (pageExtensions = defaultPageExtensions, cwd) => {
|
|
|
39
39
|
];
|
|
40
40
|
};
|
|
41
41
|
const production = getEntryFilePatterns();
|
|
42
|
+
const getInputs = (pageExtensions, loaders, aliasTargets, configFileDir) => {
|
|
43
|
+
const extensions = pageExtensions.length > 0 ? pageExtensions : defaultPageExtensions;
|
|
44
|
+
const patterns = [...getEntryFilePatterns(extensions, configFileDir), 'next-env.d.ts'];
|
|
45
|
+
const inputs = patterns.map(id => toProductionEntry(join(configFileDir, id)));
|
|
46
|
+
for (const loader of loaders)
|
|
47
|
+
inputs.push(toDeferResolve(loader));
|
|
48
|
+
for (const target of aliasTargets)
|
|
49
|
+
inputs.push({ ...toDeferResolve(target, { dir: configFileDir }), production: true });
|
|
50
|
+
return inputs;
|
|
51
|
+
};
|
|
52
|
+
const isObject = (value) => typeof value === 'object' && value !== null;
|
|
53
|
+
const addSpecifier = (specifiers, value) => {
|
|
54
|
+
if (typeof value === 'string' && !isInNodeModules(value))
|
|
55
|
+
specifiers.add(value);
|
|
56
|
+
};
|
|
57
|
+
const collectLoaderValues = (value, loaders) => {
|
|
58
|
+
if (Array.isArray(value))
|
|
59
|
+
for (const item of value)
|
|
60
|
+
collectLoaderValues(item, loaders);
|
|
61
|
+
else if (isObject(value)) {
|
|
62
|
+
addSpecifier(loaders, value.loader);
|
|
63
|
+
collectLoaderValues(value.loaders, loaders);
|
|
64
|
+
}
|
|
65
|
+
else
|
|
66
|
+
addSpecifier(loaders, value);
|
|
67
|
+
};
|
|
68
|
+
const collectAliasTargetValues = (value, targets) => {
|
|
69
|
+
if (Array.isArray(value))
|
|
70
|
+
for (const item of value)
|
|
71
|
+
collectAliasTargetValues(item, targets);
|
|
72
|
+
else if (isObject(value))
|
|
73
|
+
collectAliasTargetValues(value.browser, targets);
|
|
74
|
+
else
|
|
75
|
+
addSpecifier(targets, value);
|
|
76
|
+
};
|
|
77
|
+
const resolveConfig = async (localConfig, { configFileDir }) => {
|
|
78
|
+
const config = typeof localConfig === 'function'
|
|
79
|
+
? await localConfig('phase-production-build', { defaultConfig: {} })
|
|
80
|
+
: localConfig;
|
|
81
|
+
const pageExtensions = Array.isArray(config?.pageExtensions)
|
|
82
|
+
? config.pageExtensions.filter(extension => typeof extension === 'string')
|
|
83
|
+
: [];
|
|
84
|
+
const loaders = new Set();
|
|
85
|
+
for (const rule of Object.values(config?.turbopack?.rules ?? {}))
|
|
86
|
+
collectLoaderValues(rule, loaders);
|
|
87
|
+
const aliasTargets = new Set();
|
|
88
|
+
for (const target of Object.values(config?.turbopack?.resolveAlias ?? {}))
|
|
89
|
+
collectAliasTargetValues(target, aliasTargets);
|
|
90
|
+
return getInputs(pageExtensions, loaders, aliasTargets, configFileDir);
|
|
91
|
+
};
|
|
42
92
|
const resolveFromAST = (program, { configFileDir }) => {
|
|
43
93
|
const pageExtensions = new Set();
|
|
44
94
|
const loaders = new Set();
|
|
@@ -100,14 +150,7 @@ const resolveFromAST = (program, { configFileDir }) => {
|
|
|
100
150
|
},
|
|
101
151
|
});
|
|
102
152
|
visitor.visit(program);
|
|
103
|
-
|
|
104
|
-
const patterns = [...getEntryFilePatterns(extensions, configFileDir), 'next-env.d.ts'];
|
|
105
|
-
const inputs = patterns.map(id => toProductionEntry(join(configFileDir, id)));
|
|
106
|
-
for (const loader of loaders)
|
|
107
|
-
inputs.push(toDeferResolve(loader));
|
|
108
|
-
for (const target of aliasTargets)
|
|
109
|
-
inputs.push({ ...toDeferResolve(target, { dir: configFileDir }), production: true });
|
|
110
|
-
return inputs;
|
|
153
|
+
return getInputs([...pageExtensions], loaders, aliasTargets, configFileDir);
|
|
111
154
|
};
|
|
112
155
|
const commands = new Set(['dev', 'build', 'start']);
|
|
113
156
|
const args = {
|
|
@@ -119,12 +162,17 @@ const args = {
|
|
|
119
162
|
return [toConfig('next', join(dir, 'next.config'))];
|
|
120
163
|
},
|
|
121
164
|
};
|
|
165
|
+
const note = `Knip loads \`next.config.*\` to read Turbopack loaders and alias targets from the composed configuration,
|
|
166
|
+
including values a shared configuration factory adds. A configuration file that fails to load is analyzed statically.`;
|
|
167
|
+
export const docs = { note };
|
|
122
168
|
const plugin = {
|
|
123
169
|
title,
|
|
124
170
|
enablers,
|
|
125
171
|
isEnabled,
|
|
126
172
|
config,
|
|
127
173
|
production,
|
|
174
|
+
isLoadConfigOptional: true,
|
|
175
|
+
resolveConfig,
|
|
128
176
|
resolveFromAST,
|
|
129
177
|
args,
|
|
130
178
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type NextConfig = {
|
|
2
|
+
pageExtensions?: string[];
|
|
3
|
+
turbopack?: {
|
|
4
|
+
rules?: Record<string, unknown>;
|
|
5
|
+
resolveAlias?: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export type NextConfigModule = NextConfig | ((phase: string, context: {
|
|
9
|
+
defaultConfig: NextConfig;
|
|
10
|
+
}) => NextConfig | Promise<NextConfig>);
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { getUrlSpecifier } from '../../compilers/shared.js';
|
|
2
2
|
import { hasUrlScheme } from '../../util/url.js';
|
|
3
|
-
const directiveMatcher = /"(?:\\(?:\r\n|[\s\S]|$)|[^"\\\r\n\f])*(?:"|[\r\n\f]|$)|'(?:\\(?:\r\n|[\s\S]|$)|[^'\\\r\n\f])*(?:'|[\r\n\f]|$)|\/\*[\s\S]*?(?:\*\/|$)|@(?:(?:import|config|plugin)\s+['"]([^'"]+)['"]|import\s+url\(\s*(?:['"]([^'"]+)['"]|([^'")\s]+))\s*\))[^;]
|
|
3
|
+
const directiveMatcher = /"(?:\\(?:\r\n|[\s\S]|$)|[^"\\\r\n\f])*(?:"|[\r\n\f]|$)|'(?:\\(?:\r\n|[\s\S]|$)|[^'\\\r\n\f])*(?:'|[\r\n\f]|$)|\/\*[\s\S]*?(?:\*\/|$)|@(?:(?:import|config|plugin|reference)\s+['"]([^'"]+)['"]|import\s+url\(\s*(?:['"]([^'"]+)['"]|([^'")\s]+))\s*\))(?:\s*\{|[^;]*;)|url\(\s*(?:["']([^"'\r\n]*)["']|([^'")\s]+))\s*\)/g;
|
|
4
4
|
const compiler = (text) => {
|
|
5
|
-
if (!text.includes('@import') &&
|
|
5
|
+
if (!text.includes('@import') &&
|
|
6
|
+
!text.includes('@config') &&
|
|
7
|
+
!text.includes('@plugin') &&
|
|
8
|
+
!text.includes('@reference') &&
|
|
9
|
+
!text.includes('url('))
|
|
6
10
|
return '';
|
|
7
11
|
const imports = [];
|
|
8
12
|
let match;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isFile } from '../../util/fs.js';
|
|
2
2
|
const title = 'Travis CI';
|
|
3
3
|
const enablers = 'This plugin is enabled when a `.travis.yml` file is found in the root folder.';
|
|
4
|
-
const isEnabled =
|
|
4
|
+
const isEnabled = ({ cwd }) => isFile(cwd, '.travis.yml');
|
|
5
5
|
const isRootOnly = true;
|
|
6
6
|
const config = ['.travis.yml'];
|
|
7
7
|
const resolveConfig = async (config, options) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compact } from '../../util/array.js';
|
|
2
2
|
import { toConfig, toDeferResolve, toDependency, toProductionDependency } from '../../util/input.js';
|
|
3
|
-
import { join } from '../../util/path.js';
|
|
3
|
+
import { join, toAbsolute } from '../../util/path.js';
|
|
4
4
|
import { hasDependency } from '../../util/plugin.js';
|
|
5
5
|
import { contentMapperResolvers } from './content-mappers.js';
|
|
6
6
|
const title = 'TypeScript';
|
|
@@ -22,9 +22,7 @@ export const resolveConfig = (localConfig, options) => {
|
|
|
22
22
|
const extend = localConfig.extends
|
|
23
23
|
? [localConfig.extends].flat().map(specifier => toConfig(options.pluginName, specifier))
|
|
24
24
|
: [];
|
|
25
|
-
const references = localConfig.references
|
|
26
|
-
?.filter(reference => reference.path.endsWith('.json'))
|
|
27
|
-
.map(reference => toConfig(options.pluginName, reference.path)) ?? [];
|
|
25
|
+
const references = localConfig.references?.map(({ path }) => toConfig(options.pluginName, path.endsWith('.json') ? path : toAbsolute(join(path, 'tsconfig.json'), options.configFileDir))) ?? [];
|
|
28
26
|
const contentMappers = resolveContentMappers(localConfig);
|
|
29
27
|
if (!(compilerOptions && localConfig))
|
|
30
28
|
return compact([...contentMappers, ...extend, ...references]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Input } from '../../util/input.ts';
|
|
2
2
|
import type { AliasOptions, ViteConfig } from './types.ts';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const toEnvDependency: (env: string) => Input;
|
|
4
4
|
export declare const getAliasInputs: (aliasOptions: AliasOptions, cwd: string) => Input[];
|
|
5
5
|
export declare const getExternalReporters: (reporters?: ViteConfig['test']['reporters']) => string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toAlias } from '../../util/input.js';
|
|
1
|
+
import { toAlias, toDependency } from '../../util/input.js';
|
|
2
2
|
import { join, toPosix } from '../../util/path.js';
|
|
3
3
|
const environments = {
|
|
4
4
|
node: null,
|
|
@@ -11,11 +11,12 @@ const envPackageNames = {
|
|
|
11
11
|
'happy-dom': 'happy-dom',
|
|
12
12
|
'edge-runtime': '@edge-runtime/vm',
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
const getEnvSpecifier = (env) => {
|
|
15
15
|
if (env in envPackageNames)
|
|
16
16
|
return envPackageNames[env];
|
|
17
17
|
return `vitest-environment-${env}`;
|
|
18
18
|
};
|
|
19
|
+
export const toEnvDependency = (env) => toDependency(getEnvSpecifier(env), env === 'nuxt' ? { optional: true } : undefined);
|
|
19
20
|
const builtInReporters = [
|
|
20
21
|
'agent',
|
|
21
22
|
'basic',
|
|
@@ -34,9 +35,18 @@ const builtInReporters = [
|
|
|
34
35
|
'verbose',
|
|
35
36
|
];
|
|
36
37
|
const addStar = (value) => (value.endsWith('*') ? value : join(value, '*').replace(/\/\*\*$/, '/*'));
|
|
38
|
+
const getAliasEntries = (aliasOptions) => {
|
|
39
|
+
if (!Array.isArray(aliasOptions))
|
|
40
|
+
return Object.entries(aliasOptions);
|
|
41
|
+
const entries = [];
|
|
42
|
+
for (const { find, replacement } of aliasOptions)
|
|
43
|
+
if (typeof find === 'string')
|
|
44
|
+
entries.push([find, replacement]);
|
|
45
|
+
return entries;
|
|
46
|
+
};
|
|
37
47
|
export const getAliasInputs = (aliasOptions, cwd) => {
|
|
38
48
|
const inputs = [];
|
|
39
|
-
for (const [alias, value] of
|
|
49
|
+
for (const [alias, value] of getAliasEntries(aliasOptions)) {
|
|
40
50
|
if (!value)
|
|
41
51
|
continue;
|
|
42
52
|
const prefixes = [value]
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { DEFAULT_EXTENSIONS } from '../../constants.js';
|
|
2
2
|
import { filterTransitiveDependencies } from '../../util/filter-transitive-dependencies.js';
|
|
3
|
-
import {
|
|
3
|
+
import { findFileWithExtensions } from '../../util/fs.js';
|
|
4
|
+
import { _dirGlob, _glob } from '../../util/glob.js';
|
|
4
5
|
import { toConfig, toDeferResolve, toDependency, toEntry, toProductionEntry } from '../../util/input.js';
|
|
5
6
|
import { getPackageNameFromModuleSpecifier } from '../../util/modules.js';
|
|
6
|
-
import { isAbsolute, isInternal, join, toAbsolute, toPosix } from '../../util/path.js';
|
|
7
|
+
import { basename, isAbsolute, isInternal, join, toAbsolute, toPosix } from '../../util/path.js';
|
|
7
8
|
import { hasDependency } from '../../util/plugin.js';
|
|
8
9
|
import { resolveExtendedConfig } from '../oxlint/index.js';
|
|
9
10
|
import { getHtmlScriptEntries, getIndexHtmlEntries } from '../vite/helpers.js';
|
|
10
|
-
import { getAliasInputs,
|
|
11
|
+
import { getAliasInputs, getExternalReporters, toEnvDependency } from './helpers.js';
|
|
11
12
|
import { createVitestMockVisitor } from './visitors/mock.js';
|
|
12
13
|
const title = 'Vitest';
|
|
13
14
|
const enablers = ['vitest', 'vite-plus'];
|
|
14
15
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
16
|
+
const configExtensions = ['.ts', '.mts', '.cts', '.js', '.mjs', '.cjs'];
|
|
17
|
+
const projectConfigFile = /^vite(?:st)?(?:\.[\w-]+)?\.config\./;
|
|
15
18
|
const config = ['vitest.config.{js,mjs,ts,cjs,mts,cts}', 'vitest.{workspace,projects}.{js,mjs,ts,cjs,mts,cts,json}'];
|
|
16
19
|
const mocks = ['**/__mocks__/**/*.?(c|m)[jt]s?(x)'];
|
|
17
20
|
const testEntry = ['**/*.{bench,test,test-d,spec,spec-d}.?(c|m)[jt]s?(x)'];
|
|
18
21
|
const entry = [...testEntry, ...mocks];
|
|
19
22
|
const benchmark = ['**/*.bench.?(c|m)[jt]s?(x)'];
|
|
23
|
+
const isProjectConfig = (project) => typeof project === 'object' && !(project instanceof Promise);
|
|
20
24
|
const findConfigDependencies = (localConfig, options, vitestRoot) => {
|
|
21
25
|
const testConfig = localConfig.test;
|
|
22
26
|
if (!testConfig)
|
|
23
27
|
return [];
|
|
24
28
|
const env = testConfig.environment;
|
|
25
|
-
const environments = env && env !== 'node'
|
|
26
|
-
? isInternal(env) || isAbsolute(env)
|
|
27
|
-
? [toDeferResolve(env)]
|
|
28
|
-
: [toDependency(getEnvSpecifier(env))]
|
|
29
|
-
: [];
|
|
29
|
+
const environments = env && env !== 'node' ? (isInternal(env) || isAbsolute(env) ? [toDeferResolve(env)] : [toEnvDependency(env)]) : [];
|
|
30
30
|
const reporters = getExternalReporters(testConfig.reporters).map(specifier => isInternal(specifier) || isAbsolute(specifier)
|
|
31
31
|
? { ...toDeferResolve(specifier), dir: vitestRoot }
|
|
32
32
|
: toDependency(specifier));
|
|
@@ -51,7 +51,7 @@ const findConfigDependencies = (localConfig, options, vitestRoot) => {
|
|
|
51
51
|
const projectsDependencies = [];
|
|
52
52
|
if (testConfig.projects !== undefined) {
|
|
53
53
|
for (const projectConfig of testConfig.projects) {
|
|
54
|
-
if (
|
|
54
|
+
if (isProjectConfig(projectConfig)) {
|
|
55
55
|
projectsDependencies.push(...findConfigDependencies(projectConfig, options, vitestRoot));
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -79,30 +79,31 @@ const getConfigs = async (localConfig) => {
|
|
|
79
79
|
if (typeof config === 'function') {
|
|
80
80
|
for (const command of ['serve', 'build']) {
|
|
81
81
|
for (const mode of ['development', 'production']) {
|
|
82
|
-
for (const
|
|
83
|
-
const cfg = await config({ command, mode, ssrBuild });
|
|
84
|
-
configs.push(cfg);
|
|
85
|
-
if (cfg.test?.projects) {
|
|
86
|
-
for (const project of cfg.test.projects) {
|
|
87
|
-
if (typeof project !== 'string') {
|
|
88
|
-
configs.push(project);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
82
|
+
for (const isSsrBuild of command === 'build' ? [undefined, false, true] : [undefined]) {
|
|
83
|
+
const cfg = await config({ command, mode, isSsrBuild, ssrBuild: isSsrBuild });
|
|
84
|
+
configs.push(cfg, ...(await getProjectConfigs(cfg, command === 'serve' && mode === 'development')));
|
|
92
85
|
}
|
|
93
86
|
}
|
|
94
87
|
}
|
|
95
88
|
}
|
|
96
89
|
else {
|
|
97
|
-
configs.push(config);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
90
|
+
configs.push(config, ...(await getProjectConfigs(config)));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return configs;
|
|
95
|
+
};
|
|
96
|
+
const projectEnv = { command: 'serve', mode: 'test', isPreview: false, isSsrBuild: false };
|
|
97
|
+
const getProjectConfigs = async (config, isCallFunctions = true) => {
|
|
98
|
+
const configs = [];
|
|
99
|
+
if (config.test?.projects) {
|
|
100
|
+
for (const project of config.test.projects) {
|
|
101
|
+
if (typeof project === 'function') {
|
|
102
|
+
if (isCallFunctions)
|
|
103
|
+
configs.push(await project(projectEnv));
|
|
105
104
|
}
|
|
105
|
+
else if (typeof project !== 'string')
|
|
106
|
+
configs.push(await project);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
return configs;
|
|
@@ -112,23 +113,30 @@ export const resolveConfig = async (localConfig, options) => {
|
|
|
112
113
|
const lintInputs = [];
|
|
113
114
|
inputs.add(toEntry(join(options.cwd, 'src/vite-env.d.ts')));
|
|
114
115
|
const configs = await getConfigs(localConfig);
|
|
116
|
+
const patterns = new Set();
|
|
115
117
|
for (const cfg of configs) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
118
|
+
for (const project of cfg.test?.projects ?? []) {
|
|
119
|
+
if (typeof project === 'string')
|
|
120
|
+
patterns.add(project);
|
|
121
|
+
else if (isProjectConfig(project) && typeof project.extends === 'string')
|
|
122
|
+
inputs.add(toConfig('vitest', project.extends));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (patterns.size > 0) {
|
|
126
|
+
const [files, dirs] = await Promise.all([
|
|
127
|
+
_glob({ cwd: options.cwd, patterns: [...patterns], gitignore: false }),
|
|
128
|
+
_dirGlob({ cwd: options.cwd, patterns: [...patterns], gitignore: false }),
|
|
129
|
+
]);
|
|
130
|
+
for (const file of files) {
|
|
131
|
+
if (projectConfigFile.test(basename(file)))
|
|
132
|
+
inputs.add(toConfig('vitest', file));
|
|
133
|
+
}
|
|
134
|
+
for (const dir of dirs) {
|
|
135
|
+
const projectRoot = toAbsolute(dir, options.cwd);
|
|
136
|
+
const configFile = findFileWithExtensions(join(projectRoot, 'vitest.config'), configExtensions) ??
|
|
137
|
+
findFileWithExtensions(join(projectRoot, 'vite.config'), configExtensions);
|
|
138
|
+
if (configFile)
|
|
139
|
+
inputs.add(toConfig('vitest', configFile));
|
|
132
140
|
}
|
|
133
141
|
}
|
|
134
142
|
const addAliases = (aliasOptions) => {
|
|
@@ -239,7 +247,7 @@ const args = {
|
|
|
239
247
|
}
|
|
240
248
|
}
|
|
241
249
|
if (parsed['environment'] && parsed['environment'] !== 'node') {
|
|
242
|
-
inputs.push(
|
|
250
|
+
inputs.push(toEnvDependency(parsed['environment']));
|
|
243
251
|
}
|
|
244
252
|
if (typeof parsed['typecheck'] === 'object' && parsed['typecheck'].checker) {
|
|
245
253
|
inputs.push(toDependency(parsed['typecheck'].checker === 'tsc' ? 'typescript' : parsed['typecheck'].checker));
|
|
@@ -29,11 +29,7 @@ interface VitestConfig {
|
|
|
29
29
|
workspace: never;
|
|
30
30
|
};
|
|
31
31
|
})[];
|
|
32
|
-
projects?: (string |
|
|
33
|
-
test: VitestConfig['test'] & {
|
|
34
|
-
projects: never;
|
|
35
|
-
};
|
|
36
|
-
}))[];
|
|
32
|
+
projects?: (string | VitestProject)[];
|
|
37
33
|
alias?: AliasOptions;
|
|
38
34
|
};
|
|
39
35
|
}
|
|
@@ -73,12 +69,20 @@ export interface ViteConfig extends VitestConfig {
|
|
|
73
69
|
};
|
|
74
70
|
}
|
|
75
71
|
export type COMMAND = 'serve' | 'build';
|
|
76
|
-
export type MODE = 'development' | 'production';
|
|
77
|
-
interface Options {
|
|
72
|
+
export type MODE = 'development' | 'production' | 'test';
|
|
73
|
+
export interface Options {
|
|
78
74
|
command: COMMAND;
|
|
79
75
|
mode: MODE;
|
|
76
|
+
isSsrBuild?: boolean | undefined;
|
|
80
77
|
ssrBuild?: boolean | undefined;
|
|
78
|
+
isPreview?: boolean | undefined;
|
|
81
79
|
}
|
|
82
80
|
export type ViteConfigOrFn = ViteConfig | ((options: Options) => ViteConfig) | ((options: Options) => Promise<ViteConfig>);
|
|
81
|
+
export type VitestProjectConfig = ViteConfig & {
|
|
82
|
+
test: VitestConfig['test'] & {
|
|
83
|
+
projects: never;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export type VitestProject = VitestProjectConfig | Promise<VitestProjectConfig> | ((options: Options) => VitestProjectConfig | Promise<VitestProjectConfig>);
|
|
83
87
|
export type VitestWorkspaceConfig = (string | ViteConfig)[];
|
|
84
88
|
export {};
|
package/dist/run.js
CHANGED
|
@@ -114,7 +114,7 @@ export const run = async (options) => {
|
|
|
114
114
|
entryPaths,
|
|
115
115
|
});
|
|
116
116
|
if (options.isWatch)
|
|
117
|
-
watch(
|
|
117
|
+
watch(options.cwd, { recursive: true }, session.listener);
|
|
118
118
|
}
|
|
119
119
|
const { issues, counters, tagHints, configurationHints, hasConfigLoadErrors } = collector.getIssues();
|
|
120
120
|
if (!options.isWatch)
|
|
@@ -46,6 +46,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
46
46
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
47
47
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
48
48
|
}, z.core.$strip>]>>;
|
|
49
|
+
buf: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
50
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
51
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
52
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
53
|
+
}, z.core.$strip>]>>;
|
|
49
54
|
bumpp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
50
55
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
51
56
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -146,6 +151,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
146
151
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
147
152
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
148
153
|
}, z.core.$strip>]>>;
|
|
154
|
+
'electron-forge': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
155
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
156
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
157
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
158
|
+
}, z.core.$strip>]>>;
|
|
149
159
|
'electron-vite': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
150
160
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
151
161
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -326,6 +336,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
326
336
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
327
337
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
328
338
|
}, z.core.$strip>]>>;
|
|
339
|
+
mcp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
340
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
341
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
342
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
343
|
+
}, z.core.$strip>]>>;
|
|
329
344
|
mdx: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
330
345
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
331
346
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1038,6 +1053,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1038
1053
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1039
1054
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1040
1055
|
}, z.core.$strip>]>>;
|
|
1056
|
+
buf: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1057
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1058
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1059
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1060
|
+
}, z.core.$strip>]>>;
|
|
1041
1061
|
bumpp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1042
1062
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1043
1063
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1138,6 +1158,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1138
1158
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1139
1159
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1140
1160
|
}, z.core.$strip>]>>;
|
|
1161
|
+
'electron-forge': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1162
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1163
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1164
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1165
|
+
}, z.core.$strip>]>>;
|
|
1141
1166
|
'electron-vite': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1142
1167
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1143
1168
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1318,6 +1343,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1318
1343
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1319
1344
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1320
1345
|
}, z.core.$strip>]>>;
|
|
1346
|
+
mcp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1347
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1348
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1349
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1350
|
+
}, z.core.$strip>]>>;
|
|
1321
1351
|
mdx: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1322
1352
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1323
1353
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -2049,6 +2079,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
2049
2079
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2050
2080
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2051
2081
|
}, z.core.$strip>]>>;
|
|
2082
|
+
buf: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2083
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2084
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2085
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2086
|
+
}, z.core.$strip>]>>;
|
|
2052
2087
|
bumpp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2053
2088
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2054
2089
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -2149,6 +2184,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
2149
2184
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2150
2185
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2151
2186
|
}, z.core.$strip>]>>;
|
|
2187
|
+
'electron-forge': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2188
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2189
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2190
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2191
|
+
}, z.core.$strip>]>>;
|
|
2152
2192
|
'electron-vite': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2153
2193
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2154
2194
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -2329,6 +2369,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
2329
2369
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2330
2370
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2331
2371
|
}, z.core.$strip>]>>;
|
|
2372
|
+
mcp: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2373
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2374
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2375
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2376
|
+
}, z.core.$strip>]>>;
|
|
2332
2377
|
mdx: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2333
2378
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2334
2379
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|