knip 6.26.0 → 6.28.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 +12 -0
- package/dist/DependencyDeputy.d.ts +1 -1
- package/dist/DependencyDeputy.js +3 -3
- package/dist/ProjectPrincipal.d.ts +3 -3
- package/dist/ProjectPrincipal.js +4 -4
- package/dist/WorkspaceWorker.js +9 -0
- package/dist/binaries/fallback.js +5 -1
- package/dist/binaries/resolvers/bun.js +13 -5
- package/dist/binaries/resolvers/npm.js +4 -2
- package/dist/binaries/resolvers/pnpm.js +11 -1
- package/dist/binaries/resolvers/yarn.js +10 -4
- package/dist/binaries/util.d.ts +4 -0
- package/dist/binaries/util.js +14 -0
- package/dist/compilers/index.d.ts +20 -0
- package/dist/compilers/less.js +1 -1
- package/dist/compilers/mdx.d.ts +2 -1
- package/dist/compilers/scss.js +1 -1
- package/dist/compilers/stylus.js +1 -1
- package/dist/constants.js +20 -0
- package/dist/graph/analyze.js +7 -5
- package/dist/graph/build.js +16 -4
- package/dist/graph-explorer/explorer.d.ts +1 -1
- package/dist/graph-explorer/operations/is-referenced.d.ts +1 -1
- package/dist/graph-explorer/operations/is-referenced.js +47 -33
- package/dist/manifest/index.d.ts +2 -1
- package/dist/plugins/_vue/auto-import.js +64 -4
- package/dist/plugins/_vue/types.d.ts +18 -11
- package/dist/plugins/angular/index.js +3 -0
- package/dist/plugins/babel/helpers.d.ts +9 -7
- package/dist/plugins/convex/index.js +11 -2
- package/dist/plugins/convex/types.d.ts +3 -0
- package/dist/plugins/convex/types.js +1 -0
- package/dist/plugins/github-actions/index.js +5 -2
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/markdownlint/index.js +26 -5
- package/dist/plugins/markdownlint/types.d.ts +6 -0
- package/dist/plugins/nitro/index.js +3 -1
- package/dist/plugins/nuxt/index.js +19 -8
- package/dist/plugins/openclaw/index.d.ts +3 -0
- package/dist/plugins/openclaw/index.js +52 -0
- package/dist/plugins/openclaw/types.d.ts +25 -0
- package/dist/plugins/openclaw/types.js +1 -0
- package/dist/plugins/prettier/index.js +1 -1
- package/dist/plugins/react-email/index.js +1 -0
- package/dist/plugins/tailwind/compiler.js +9 -4
- package/dist/plugins/tailwind/index.js +8 -0
- package/dist/plugins/tanstack-router/index.js +3 -1
- package/dist/plugins/temporal/index.d.ts +3 -0
- package/dist/plugins/temporal/index.js +12 -0
- package/dist/plugins/tsdown/index.js +58 -3
- package/dist/plugins/tsdown/types.d.ts +4 -1
- package/dist/plugins/typescript/index.js +1 -1
- package/dist/plugins/vitest/index.js +15 -0
- package/dist/plugins/vitest/types.d.ts +5 -0
- package/dist/reporters/util/configuration-hints.js +3 -1
- package/dist/run.js +3 -3
- package/dist/schema/configuration.d.ts +30 -0
- package/dist/schema/plugins.d.ts +10 -0
- package/dist/schema/plugins.js +2 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +2 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/issues.d.ts +1 -1
- package/dist/typescript/ast-nodes.d.ts +4 -1
- package/dist/typescript/comments.d.ts +1 -1
- package/dist/typescript/comments.js +71 -5
- package/dist/typescript/get-imports-and-exports.d.ts +3 -1
- package/dist/typescript/get-imports-and-exports.js +9 -6
- package/dist/typescript/resolve-module-names.d.ts +2 -2
- package/dist/typescript/resolve-module-names.js +97 -18
- package/dist/typescript/visitors/walk.d.ts +3 -1
- package/dist/typescript/visitors/walk.js +27 -3
- package/dist/util/codeowners.js +1 -1
- package/dist/util/create-input-handler.js +8 -1
- package/dist/util/create-options.d.ts +20 -0
- package/dist/util/glob-cache.d.ts +7 -1
- package/dist/util/glob-cache.js +52 -29
- package/dist/util/glob-core.d.ts +2 -0
- package/dist/util/glob-core.js +46 -6
- package/dist/util/glob.d.ts +6 -3
- package/dist/util/glob.js +23 -9
- package/dist/util/loader.d.ts +3 -1
- package/dist/util/package-json.d.ts +7 -0
- package/dist/util/package-json.js +37 -0
- package/dist/util/parse-and-convert-gitignores.d.ts +2 -2
- package/dist/util/parse-and-convert-gitignores.js +4 -4
- package/dist/util/reporter.js +4 -3
- package/dist/util/resolve.d.ts +1 -0
- package/dist/util/resolve.js +1 -1
- package/dist/util/to-source-path.d.ts +4 -3
- package/dist/util/to-source-path.js +22 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -11
- package/schema.json +8 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { collectPropertyValues } from '../../typescript/ast-helpers.js';
|
|
2
|
+
import { _parseFile } from '../../typescript/ast-nodes.js';
|
|
3
|
+
import { toProductionEntry } from '../../util/input.js';
|
|
4
|
+
const title = 'OpenClaw';
|
|
5
|
+
const enablers = 'This plugin is enabled when `package.json#openclaw` is present.';
|
|
6
|
+
const isEnabled = ({ manifest }) => Object.hasOwn(manifest, 'openclaw');
|
|
7
|
+
const config = ['package.json', 'openclaw.plugin.json'];
|
|
8
|
+
const isLoadConfig = ({ configFileName }) => configFileName === 'package.json';
|
|
9
|
+
const toEntries = (value) => (Array.isArray(value) ? value : [value]).flatMap(entry => typeof entry === 'string' ? [toProductionEntry(entry)] : []);
|
|
10
|
+
const toHookEntries = (value) => (Array.isArray(value) ? value : [value]).flatMap(entry => {
|
|
11
|
+
if (typeof entry !== 'string')
|
|
12
|
+
return [];
|
|
13
|
+
const dir = entry.trim().replace(/\/+$/, '');
|
|
14
|
+
return dir ? [toProductionEntry(`${dir}/{handler,index}.{ts,js}`)] : [];
|
|
15
|
+
});
|
|
16
|
+
const resolveConfig = (localConfig, options) => {
|
|
17
|
+
if (!localConfig)
|
|
18
|
+
return [];
|
|
19
|
+
const assetScripts = [localConfig.assetScripts?.build, localConfig.assetScripts?.copy].filter((script) => typeof script === 'string');
|
|
20
|
+
const assetScriptInputs = options
|
|
21
|
+
.getInputsFromScripts(assetScripts)
|
|
22
|
+
.map(input => input.type === 'entry' || input.type === 'deferResolveEntry' ? { ...input, production: true } : input);
|
|
23
|
+
return [
|
|
24
|
+
...toEntries(localConfig.extensions),
|
|
25
|
+
...toEntries(localConfig.runtimeExtensions),
|
|
26
|
+
...toEntries(localConfig.setupEntry),
|
|
27
|
+
...toEntries(localConfig.runtimeSetupEntry),
|
|
28
|
+
...toEntries(localConfig.providerCatalogEntry),
|
|
29
|
+
...toEntries(localConfig.channel?.configuredState?.specifier),
|
|
30
|
+
...toEntries(localConfig.channel?.persistedAuthState?.specifier),
|
|
31
|
+
...toHookEntries(localConfig.hooks),
|
|
32
|
+
...toEntries(localConfig.build?.staticAssets?.map(asset => asset.source)),
|
|
33
|
+
...assetScriptInputs,
|
|
34
|
+
];
|
|
35
|
+
};
|
|
36
|
+
const resolveFromAST = (_, options) => {
|
|
37
|
+
if (options.configFileName !== 'openclaw.plugin.json')
|
|
38
|
+
return [];
|
|
39
|
+
const sourceText = options.readFile(options.configFilePath).replace(/^\uFEFF/, '');
|
|
40
|
+
const { program } = _parseFile(`${options.configFilePath}.ts`, `(${sourceText}\n)`);
|
|
41
|
+
return [...collectPropertyValues(program, 'providerCatalogEntry')].map(entry => toProductionEntry(entry));
|
|
42
|
+
};
|
|
43
|
+
const plugin = {
|
|
44
|
+
title,
|
|
45
|
+
enablers,
|
|
46
|
+
isEnabled,
|
|
47
|
+
config,
|
|
48
|
+
isLoadConfig,
|
|
49
|
+
resolveConfig,
|
|
50
|
+
resolveFromAST,
|
|
51
|
+
};
|
|
52
|
+
export default plugin;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface OpenClawManifest {
|
|
2
|
+
assetScripts?: {
|
|
3
|
+
build?: string;
|
|
4
|
+
copy?: string;
|
|
5
|
+
};
|
|
6
|
+
build?: {
|
|
7
|
+
staticAssets?: {
|
|
8
|
+
source?: string;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
channel?: {
|
|
12
|
+
configuredState?: {
|
|
13
|
+
specifier?: string;
|
|
14
|
+
};
|
|
15
|
+
persistedAuthState?: {
|
|
16
|
+
specifier?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
extensions?: string | string[];
|
|
20
|
+
hooks?: string[];
|
|
21
|
+
providerCatalogEntry?: string;
|
|
22
|
+
runtimeExtensions?: string | string[];
|
|
23
|
+
setupEntry?: string;
|
|
24
|
+
runtimeSetupEntry?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,7 @@ const entry = ['emails/**/*.tsx'];
|
|
|
7
7
|
const previewCommands = new Set(['build', 'dev', 'start']);
|
|
8
8
|
const args = {
|
|
9
9
|
binaries: ['email'],
|
|
10
|
+
alias: { dir: ['d'] },
|
|
10
11
|
resolveInputs: (parsed, { manifest }) => {
|
|
11
12
|
const inputs = [];
|
|
12
13
|
if (previewCommands.has(parsed._[0])) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const directiveMatcher =
|
|
1
|
+
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*\))[^;]*;/g;
|
|
2
|
+
const urlSchemeMatcher = /^[a-z][a-z\d+.-]*:/i;
|
|
2
3
|
const compiler = (text) => {
|
|
3
4
|
if (!text.includes('@import') && !text.includes('@config') && !text.includes('@plugin'))
|
|
4
5
|
return '';
|
|
@@ -6,9 +7,13 @@ const compiler = (text) => {
|
|
|
6
7
|
let match;
|
|
7
8
|
let index = 0;
|
|
8
9
|
directiveMatcher.lastIndex = 0;
|
|
9
|
-
while ((match = directiveMatcher.exec(text)))
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
while ((match = directiveMatcher.exec(text))) {
|
|
11
|
+
const url = match[2] ?? match[3];
|
|
12
|
+
const specifier = match[1] ?? url;
|
|
13
|
+
if (!specifier || (url && (url.startsWith('//') || urlSchemeMatcher.test(url))))
|
|
14
|
+
continue;
|
|
15
|
+
imports.push(`import _$${index++} from '${specifier}';`);
|
|
16
|
+
}
|
|
12
17
|
return imports.join('\n');
|
|
13
18
|
};
|
|
14
19
|
export default compiler;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toProductionEntry } from '../../util/input.js';
|
|
1
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
3
|
import compiler from './compiler.js';
|
|
3
4
|
const title = 'Tailwind';
|
|
@@ -12,11 +13,18 @@ const registerCompilers = ({ registerCompiler, hasDependency }) => {
|
|
|
12
13
|
break;
|
|
13
14
|
}
|
|
14
15
|
};
|
|
16
|
+
const args = {
|
|
17
|
+
binaries: ['tailwindcss'],
|
|
18
|
+
string: ['input'],
|
|
19
|
+
alias: { input: ['i'] },
|
|
20
|
+
resolveInputs: parsed => (parsed.input ? [toProductionEntry(parsed.input)] : []),
|
|
21
|
+
};
|
|
15
22
|
const plugin = {
|
|
16
23
|
title,
|
|
17
24
|
enablers,
|
|
18
25
|
isEnabled,
|
|
19
26
|
entry,
|
|
27
|
+
args,
|
|
20
28
|
registerCompilers,
|
|
21
29
|
};
|
|
22
30
|
export default plugin;
|
|
@@ -9,10 +9,12 @@ const enablers = [
|
|
|
9
9
|
'@tanstack/svelte-router',
|
|
10
10
|
'@tanstack/router-cli',
|
|
11
11
|
'@tanstack/router-plugin',
|
|
12
|
+
'@tanstack/react-start',
|
|
13
|
+
'@tanstack/solid-start',
|
|
12
14
|
];
|
|
13
15
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
14
16
|
const config = ['tsr.config.json'];
|
|
15
|
-
const production = ['src/routeTree.gen.{ts,js}'];
|
|
17
|
+
const production = ['src/routeTree.gen.{ts,js}', 'src/{router,start,client,server}.{js,jsx,ts,tsx}'];
|
|
16
18
|
const resolveConfig = async (localConfig, options) => {
|
|
17
19
|
const { configFileDir } = options;
|
|
18
20
|
const generatedRouteTree = localConfig.generatedRouteTree ?? './src/routeTree.gen.ts';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
const title = 'Temporal.io';
|
|
3
|
+
const enablers = ['@temporalio/worker'];
|
|
4
|
+
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
5
|
+
const production = ['src/workflows{,/index}.{js,cjs,mjs,ts,cts,mts}'];
|
|
6
|
+
const plugin = {
|
|
7
|
+
title,
|
|
8
|
+
enablers,
|
|
9
|
+
isEnabled,
|
|
10
|
+
production,
|
|
11
|
+
};
|
|
12
|
+
export default plugin;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { collectPropertyValues } from '../../typescript/ast-helpers.js';
|
|
2
|
-
import { toProductionEntry } from '../../util/input.js';
|
|
2
|
+
import { toDependency, toProductionEntry } from '../../util/input.js';
|
|
3
3
|
import { hasDependency } from '../../util/plugin.js';
|
|
4
4
|
const title = 'tsdown';
|
|
5
5
|
const enablers = ['tsdown'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
7
7
|
const config = ['tsdown.config.{ts,mts,cts,js,mjs,cjs,json}', 'package.json'];
|
|
8
|
+
const sourcemapModes = new Set(['inline', 'hidden']);
|
|
9
|
+
const subcommands = new Set(['create', 'migrate']);
|
|
8
10
|
const isLoadConfig = ({ configFileName }) => configFileName === 'package.json' || configFileName.endsWith('.json');
|
|
9
11
|
const normalizeEntry = (entry) => {
|
|
10
12
|
if (!entry)
|
|
@@ -17,6 +19,11 @@ const normalizeEntry = (entry) => {
|
|
|
17
19
|
}
|
|
18
20
|
return Object.values(entry).flatMap(value => (Array.isArray(value) ? value : [value]));
|
|
19
21
|
};
|
|
22
|
+
const getExternalDependencies = (options) => {
|
|
23
|
+
const neverBundle = options.deps?.neverBundle;
|
|
24
|
+
const values = Array.isArray(neverBundle) ? neverBundle : [neverBundle];
|
|
25
|
+
return values.filter(value => typeof value === 'string');
|
|
26
|
+
};
|
|
20
27
|
const resolveConfig = async (config) => {
|
|
21
28
|
if (typeof config === 'function')
|
|
22
29
|
config = await config({});
|
|
@@ -24,11 +31,59 @@ const resolveConfig = async (config) => {
|
|
|
24
31
|
.flat()
|
|
25
32
|
.flatMap(config => normalizeEntry(config.entry))
|
|
26
33
|
.map(id => toProductionEntry(id, { allowIncludeExports: true }));
|
|
27
|
-
|
|
34
|
+
const externalDependencies = [config]
|
|
35
|
+
.flat()
|
|
36
|
+
.flatMap(getExternalDependencies)
|
|
37
|
+
.map(id => toDependency(id, { optional: true }));
|
|
38
|
+
return [...entryPatterns, ...externalDependencies];
|
|
28
39
|
};
|
|
29
|
-
const resolveFromAST = program => [
|
|
40
|
+
const resolveFromAST = program => [
|
|
41
|
+
...[...collectPropertyValues(program, 'entry')].map(id => toProductionEntry(id, { allowIncludeExports: true })),
|
|
42
|
+
...[...collectPropertyValues(program, 'neverBundle')].map(id => toDependency(id, { optional: true })),
|
|
43
|
+
];
|
|
30
44
|
const args = {
|
|
31
45
|
config: true,
|
|
46
|
+
args: args => {
|
|
47
|
+
if (subcommands.has(args[0]))
|
|
48
|
+
return [];
|
|
49
|
+
return args.filter((arg, index) => {
|
|
50
|
+
const previous = args[index - 1];
|
|
51
|
+
if (previous === '--sourcemap' && sourcemapModes.has(arg))
|
|
52
|
+
return false;
|
|
53
|
+
return previous !== '--watch' || arg.startsWith('-');
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
boolean: [
|
|
57
|
+
'attw',
|
|
58
|
+
'clean',
|
|
59
|
+
'deps.skip-node-modules-bundle',
|
|
60
|
+
'deps.skipNodeModulesBundle',
|
|
61
|
+
'devtools',
|
|
62
|
+
'dts',
|
|
63
|
+
'exe',
|
|
64
|
+
'exports',
|
|
65
|
+
'fail-on-warn',
|
|
66
|
+
'failOnWarn',
|
|
67
|
+
'minify',
|
|
68
|
+
'publint',
|
|
69
|
+
'report',
|
|
70
|
+
'shims',
|
|
71
|
+
'silent',
|
|
72
|
+
'sourcemap',
|
|
73
|
+
'treeshake',
|
|
74
|
+
'unbundle',
|
|
75
|
+
'unused',
|
|
76
|
+
'write',
|
|
77
|
+
],
|
|
78
|
+
resolveInputs: parsed => [
|
|
79
|
+
...[...parsed._, ...normalizeEntry(parsed.entry)].map(id => toProductionEntry(id, { allowIncludeExports: true })),
|
|
80
|
+
...[parsed.deps?.neverBundle, parsed.deps?.['never-bundle'], parsed.external]
|
|
81
|
+
.flat()
|
|
82
|
+
.filter(id => typeof id === 'string')
|
|
83
|
+
.map(id => toDependency(id, { optional: true })),
|
|
84
|
+
...(parsed.publint ? [toDependency('publint', { optional: true })] : []),
|
|
85
|
+
...(parsed.attw ? [toDependency('@arethetypeswrong/core', { optional: true })] : []),
|
|
86
|
+
],
|
|
32
87
|
};
|
|
33
88
|
const plugin = {
|
|
34
89
|
title,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export type Entry = (string | Record<string, string[] | string>)[] | string | Record<string, string[] | string>;
|
|
2
|
-
type Options = {
|
|
2
|
+
export type Options = {
|
|
3
3
|
entry?: Entry;
|
|
4
|
+
deps?: {
|
|
5
|
+
neverBundle?: unknown;
|
|
6
|
+
};
|
|
4
7
|
};
|
|
5
8
|
type MaybePromise<T> = T | Promise<T>;
|
|
6
9
|
export type TsdownConfig = Options | Options[] | ((overrideOptions: Options) => MaybePromise<Options | Options[]>);
|
|
@@ -3,7 +3,7 @@ import { toConfig, toDeferResolve, toProductionDependency } from '../../util/inp
|
|
|
3
3
|
import { join } from '../../util/path.js';
|
|
4
4
|
import { hasDependency } from '../../util/plugin.js';
|
|
5
5
|
const title = 'TypeScript';
|
|
6
|
-
const enablers = ['typescript', '@typescript/native-preview'];
|
|
6
|
+
const enablers = ['typescript', '@typescript/native', '@typescript/native-preview'];
|
|
7
7
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
8
8
|
const config = ['tsconfig.json'];
|
|
9
9
|
const resolveConfig = async (localConfig, options) => {
|
|
@@ -30,6 +30,10 @@ const findConfigDependencies = (localConfig, options, vitestRoot) => {
|
|
|
30
30
|
const setupFiles = [testConfig.setupFiles ?? []]
|
|
31
31
|
.flat()
|
|
32
32
|
.map(specifier => ({ ...toDeferResolve(specifier), dir: vitestRoot }));
|
|
33
|
+
const snapshotSerializers = (testConfig.snapshotSerializers ?? []).map(specifier => ({
|
|
34
|
+
...toDeferResolve(specifier),
|
|
35
|
+
dir: vitestRoot,
|
|
36
|
+
}));
|
|
33
37
|
const globalSetup = [testConfig.globalSetup ?? []].flat().map(specifier => ({ ...toDeferResolve(specifier), dir }));
|
|
34
38
|
const workspaceDependencies = [];
|
|
35
39
|
if (testConfig.workspace !== undefined) {
|
|
@@ -50,6 +54,7 @@ const findConfigDependencies = (localConfig, options, vitestRoot) => {
|
|
|
50
54
|
...reporters.map(id => toDependency(id)),
|
|
51
55
|
...coverage.map(id => toDependency(id)),
|
|
52
56
|
...setupFiles,
|
|
57
|
+
...snapshotSerializers,
|
|
53
58
|
...globalSetup,
|
|
54
59
|
...workspaceDependencies,
|
|
55
60
|
...projectsDependencies,
|
|
@@ -110,6 +115,9 @@ export const resolveConfig = async (localConfig, options) => {
|
|
|
110
115
|
inputs.add(toConfig('vitest', projectFile, { containingFilePath: options.configFilePath }));
|
|
111
116
|
}
|
|
112
117
|
}
|
|
118
|
+
else if (typeof project.extends === 'string') {
|
|
119
|
+
inputs.add(toConfig('vitest', project.extends, { containingFilePath: options.configFilePath }));
|
|
120
|
+
}
|
|
113
121
|
}
|
|
114
122
|
}
|
|
115
123
|
}
|
|
@@ -153,6 +161,13 @@ export const resolveConfig = async (localConfig, options) => {
|
|
|
153
161
|
if (packageName)
|
|
154
162
|
inputs.add(toDependency(packageName, { optional: true }));
|
|
155
163
|
}
|
|
164
|
+
const ssrExternal = cfg.ssr?.external;
|
|
165
|
+
if (Array.isArray(ssrExternal)) {
|
|
166
|
+
for (const dependency of ssrExternal) {
|
|
167
|
+
if (typeof dependency === 'string')
|
|
168
|
+
inputs.add(toDependency(dependency, { optional: true }));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
156
171
|
if (cfg.resolve?.extensions) {
|
|
157
172
|
const customExtensions = cfg.resolve.extensions.filter(ext => ext.startsWith('.') && !DEFAULT_EXTENSIONS.has(ext));
|
|
158
173
|
for (const ext of customExtensions) {
|
|
@@ -21,6 +21,7 @@ interface VitestConfig {
|
|
|
21
21
|
globalSetup?: string | string[];
|
|
22
22
|
reporters?: (string | [string, unknown] | unknown)[];
|
|
23
23
|
setupFiles?: string | string[];
|
|
24
|
+
snapshotSerializers?: string[];
|
|
24
25
|
workspace?: (ViteConfig & {
|
|
25
26
|
test: VitestConfig['test'] & {
|
|
26
27
|
workspace: never;
|
|
@@ -35,6 +36,7 @@ interface VitestConfig {
|
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
export interface ViteConfig extends VitestConfig {
|
|
39
|
+
extends?: string | true;
|
|
38
40
|
root?: string;
|
|
39
41
|
plugins?: unknown[];
|
|
40
42
|
build?: {
|
|
@@ -47,6 +49,9 @@ export interface ViteConfig extends VitestConfig {
|
|
|
47
49
|
optimizeDeps?: {
|
|
48
50
|
include?: string[];
|
|
49
51
|
};
|
|
52
|
+
ssr?: {
|
|
53
|
+
external?: (string | RegExp)[] | true;
|
|
54
|
+
};
|
|
50
55
|
resolve?: {
|
|
51
56
|
alias?: AliasOptions;
|
|
52
57
|
dedupe?: string[];
|
|
@@ -40,6 +40,7 @@ const addWorkspace = (options) => options.configFilePath
|
|
|
40
40
|
: `Create ${bright('knip.json')} configuration file with ${bright(`workspaces["${options.workspaceName}"]`)} object (${options.size} unused files)`;
|
|
41
41
|
const packageEntry = () => 'Package entry file not found';
|
|
42
42
|
const extensionUnregistered = () => `Extension in ${bright('project')} not registered as a compiler`;
|
|
43
|
+
const extensionExcluded = () => `Compiled extension excluded by ${bright('project')} (imports not followed)`;
|
|
43
44
|
export const hintPrinters = new Map([
|
|
44
45
|
['ignore', { print: unused }],
|
|
45
46
|
['ignoreFiles', { print: unused }],
|
|
@@ -51,6 +52,7 @@ export const hintPrinters = new Map([
|
|
|
51
52
|
['entry-empty', { print: empty }],
|
|
52
53
|
['project-empty', { print: empty }],
|
|
53
54
|
['project-extension-unregistered', { print: extensionUnregistered }],
|
|
55
|
+
['project-extension-excluded', { print: extensionExcluded }],
|
|
54
56
|
['entry-redundant', { print: remove }],
|
|
55
57
|
['project-redundant', { print: remove }],
|
|
56
58
|
['top-level-unconfigured', { print: add }],
|
|
@@ -69,7 +71,7 @@ const hintTypesOrder = [
|
|
|
69
71
|
['ignoreBinaries'],
|
|
70
72
|
['ignoreUnresolved'],
|
|
71
73
|
['entry-empty', 'project-empty', 'entry-redundant', 'project-redundant'],
|
|
72
|
-
['project-extension-unregistered'],
|
|
74
|
+
['project-extension-unregistered', 'project-extension-excluded'],
|
|
73
75
|
['package-entry'],
|
|
74
76
|
];
|
|
75
77
|
const UNCONFIGURED_MIN_FILES = 20;
|
package/dist/run.js
CHANGED
|
@@ -12,7 +12,7 @@ import { debugLogObject } from './util/debug.js';
|
|
|
12
12
|
import { flushGitignoreCache, initGitignoreCache } from './util/gitignore-cache.js';
|
|
13
13
|
import { flushGlobCache, initGlobCache } from './util/glob-cache.js';
|
|
14
14
|
import { getGitIgnoredHandler } from './util/glob-core.js';
|
|
15
|
-
import { getModuleSourcePathHandler,
|
|
15
|
+
import { getModuleSourcePathHandler, getWorkspacePackageTargetHandler } from './util/to-source-path.js';
|
|
16
16
|
import { getSessionHandler } from './util/watch.js';
|
|
17
17
|
export const run = async (options) => {
|
|
18
18
|
debugLogObject('*', 'Unresolved configuration', options);
|
|
@@ -30,8 +30,8 @@ export const run = async (options) => {
|
|
|
30
30
|
const workspaces = await chief.getWorkspaces();
|
|
31
31
|
const isGitIgnored = await getGitIgnoredHandler(options, new Set(workspaces.map(w => w.dir)));
|
|
32
32
|
const toSourceFilePath = getModuleSourcePathHandler(chief);
|
|
33
|
-
const
|
|
34
|
-
const principal = new ProjectPrincipal(options, toSourceFilePath,
|
|
33
|
+
const findWorkspacePackageTarget = getWorkspacePackageTargetHandler(chief);
|
|
34
|
+
const principal = new ProjectPrincipal(options, toSourceFilePath, findWorkspacePackageTarget);
|
|
35
35
|
collector.setWorkspaceFilter(chief.workspaceFilePathFilter);
|
|
36
36
|
collector.setSelectedWorkspaces(chief.selectedWorkspaces);
|
|
37
37
|
collector.setIgnoreIssues(chief.getIgnoreIssues());
|
|
@@ -416,6 +416,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
416
416
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
417
417
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
418
418
|
}, z.core.$strip>]>>;
|
|
419
|
+
openclaw: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
420
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
421
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
422
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
423
|
+
}, z.core.$strip>]>>;
|
|
419
424
|
orval: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
420
425
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
421
426
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -701,6 +706,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
701
706
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
702
707
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
703
708
|
}, z.core.$strip>]>>;
|
|
709
|
+
temporal: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
710
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
711
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
712
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
713
|
+
}, z.core.$strip>]>>;
|
|
704
714
|
travis: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
705
715
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
706
716
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1312,6 +1322,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1312
1322
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1313
1323
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1314
1324
|
}, z.core.$strip>]>>;
|
|
1325
|
+
openclaw: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1326
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1327
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1328
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1329
|
+
}, z.core.$strip>]>>;
|
|
1315
1330
|
orval: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1316
1331
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1317
1332
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1597,6 +1612,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1597
1612
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1598
1613
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1599
1614
|
}, z.core.$strip>]>>;
|
|
1615
|
+
temporal: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1616
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1617
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1618
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1619
|
+
}, z.core.$strip>]>>;
|
|
1600
1620
|
travis: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1601
1621
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1602
1622
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -2226,6 +2246,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
2226
2246
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2227
2247
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2228
2248
|
}, z.core.$strip>]>>;
|
|
2249
|
+
openclaw: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2250
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2251
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2252
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2253
|
+
}, z.core.$strip>]>>;
|
|
2229
2254
|
orval: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2230
2255
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2231
2256
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -2511,6 +2536,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
2511
2536
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2512
2537
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2513
2538
|
}, z.core.$strip>]>>;
|
|
2539
|
+
temporal: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2540
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2541
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2542
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2543
|
+
}, z.core.$strip>]>>;
|
|
2514
2544
|
travis: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2515
2545
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2516
2546
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.d.ts
CHANGED
|
@@ -421,6 +421,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
421
421
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
422
422
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
423
423
|
}, z.core.$strip>]>;
|
|
424
|
+
openclaw: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
425
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
426
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
427
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
428
|
+
}, z.core.$strip>]>;
|
|
424
429
|
orval: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
425
430
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
426
431
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -706,6 +711,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
706
711
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
707
712
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
708
713
|
}, z.core.$strip>]>;
|
|
714
|
+
temporal: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
715
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
716
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
717
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
718
|
+
}, z.core.$strip>]>;
|
|
709
719
|
travis: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
710
720
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
711
721
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.js
CHANGED
|
@@ -93,6 +93,7 @@ export const pluginsSchema = z.object({
|
|
|
93
93
|
nyc: pluginSchema,
|
|
94
94
|
oclif: pluginSchema,
|
|
95
95
|
'openapi-ts': pluginSchema,
|
|
96
|
+
openclaw: pluginSchema,
|
|
96
97
|
orval: pluginSchema,
|
|
97
98
|
oxfmt: pluginSchema,
|
|
98
99
|
oxlint: pluginSchema,
|
|
@@ -150,6 +151,7 @@ export const pluginsSchema = z.object({
|
|
|
150
151
|
'tanstack-router': pluginSchema,
|
|
151
152
|
taskfile: pluginSchema,
|
|
152
153
|
tauri: pluginSchema,
|
|
154
|
+
temporal: pluginSchema,
|
|
153
155
|
travis: pluginSchema,
|
|
154
156
|
'ts-node': pluginSchema,
|
|
155
157
|
tsdown: pluginSchema,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'tauri' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
-
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'quasar', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'tauri', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
1
|
+
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-markdoc' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'catalyst' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'electron-vite' | 'eleventy' | 'esbuild' | 'eslint' | 'eve' | 'execa' | 'expo' | 'expressive-code' | 'fast' | 'fumadocs' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'laravel-vite-plugin' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lit' | 'lockfile-lint' | 'lost-pixel' | 'lunaria' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-spawn' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nuxtjs-i18n' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'openclaw' | 'orval' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | 'quasar' | 'qwik' | 'raycast' | 'react-cosmos' | 'react-email' | 'react-native' | 'react-router' | 'relay' | 'release-it' | 'remark' | 'remix' | 'rolldown' | 'rollup' | 'rsbuild' | 'rslib' | 'rspack' | 'rstest' | 'sanity' | 'semantic-release' | 'sentry' | 'serverless-framework' | 'simple-git-hooks' | 'size-limit' | 'sst' | 'starlight' | 'stencil' | 'storybook' | 'stryker' | 'stylelint' | 'svelte' | 'sveltejs-package' | 'sveltekit' | 'svgo' | 'svgr' | 'swc' | 'syncpack' | 'tailwind' | 'tanstack-router' | 'taskfile' | 'tauri' | 'temporal' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'unplugin-auto-import' | 'unplugin-icons' | 'unplugin-vue-components' | 'unplugin-vue-i18n' | 'unplugin-vue-markdown' | 'unplugin-vue-router' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vite-plugin-pages' | 'vite-plugin-pwa' | 'vite-plugin-vue-layouts-next' | 'vite-plus' | 'vite-pwa-assets-generator' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
+
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-markdoc', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'catalyst', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'electron-vite', 'eleventy', 'esbuild', 'eslint', 'eve', 'execa', 'expo', 'expressive-code', 'fast', 'fumadocs', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'laravel-vite-plugin', 'lefthook', 'lint-staged', 'linthtml', 'lit', 'lockfile-lint', 'lost-pixel', 'lunaria', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-spawn', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nuxtjs-i18n', 'nx', 'nyc', 'oclif', 'openapi-ts', 'openclaw', 'orval', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', 'quasar', 'qwik', 'raycast', 'react-cosmos', 'react-email', 'react-native', 'react-router', 'relay', 'release-it', 'remark', 'remix', 'rolldown', 'rollup', 'rsbuild', 'rslib', 'rspack', 'rstest', 'sanity', 'semantic-release', 'sentry', 'serverless-framework', 'simple-git-hooks', 'size-limit', 'sst', 'starlight', 'stencil', 'storybook', 'stryker', 'stylelint', 'svelte', 'sveltejs-package', 'sveltekit', 'svgo', 'svgr', 'swc', 'syncpack', 'tailwind', 'tanstack-router', 'taskfile', 'tauri', 'temporal', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'unplugin-auto-import', 'unplugin-icons', 'unplugin-vue-components', 'unplugin-vue-i18n', 'unplugin-vue-markdown', 'unplugin-vue-router', 'vercel', 'vercel-og', 'vike', 'vite', 'vite-plugin-pages', 'vite-plugin-pwa', 'vite-plugin-vue-layouts-next', 'vite-plus', 'vite-pwa-assets-generator', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
@@ -82,6 +82,7 @@ export const pluginNames = [
|
|
|
82
82
|
'nyc',
|
|
83
83
|
'oclif',
|
|
84
84
|
'openapi-ts',
|
|
85
|
+
'openclaw',
|
|
85
86
|
'orval',
|
|
86
87
|
'oxfmt',
|
|
87
88
|
'oxlint',
|
|
@@ -139,6 +140,7 @@ export const pluginNames = [
|
|
|
139
140
|
'tanstack-router',
|
|
140
141
|
'taskfile',
|
|
141
142
|
'tauri',
|
|
143
|
+
'temporal',
|
|
142
144
|
'travis',
|
|
143
145
|
'ts-node',
|
|
144
146
|
'tsdown',
|
package/dist/types/config.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type { PackageJson } from './package-json.ts';
|
|
|
14
14
|
export interface GetInputsFromScriptsOptions extends BaseOptions {
|
|
15
15
|
knownBinsOnly?: boolean;
|
|
16
16
|
containingFilePath: string;
|
|
17
|
+
expandedScripts?: Set<string>;
|
|
17
18
|
}
|
|
18
19
|
export type GetInputsFromScripts<T = GetInputsFromScriptsOptions> = (npmScripts: string | string[] | Set<string>, options: T) => Input[];
|
|
19
20
|
export type GetInputsFromScriptsPartial = (npmScripts: string | string[] | Set<string>, options?: Partial<GetInputsFromScriptsOptions>) => Input[];
|
package/dist/types/issues.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export type Preprocessor = (options: ReporterOptions) => ReporterOptions;
|
|
|
75
75
|
export type IssueSeverity = 'error' | 'warn' | 'off';
|
|
76
76
|
export type Rules = Record<IssueType, IssueSeverity>;
|
|
77
77
|
export type ConfigurationHints = Map<string, ConfigurationHint>;
|
|
78
|
-
export type ConfigurationHintType = 'ignore' | 'ignoreFiles' | 'ignoreBinaries' | 'ignoreDependencies' | 'ignoreUnresolved' | 'workspaces' | 'ignoreWorkspaces' | 'entry-redundant' | 'project-redundant' | 'entry-top-level' | 'project-top-level' | 'entry-empty' | 'project-empty' | 'project-extension-unregistered' | 'package-entry' | 'top-level-unconfigured' | 'workspace-unconfigured';
|
|
78
|
+
export type ConfigurationHintType = 'ignore' | 'ignoreFiles' | 'ignoreBinaries' | 'ignoreDependencies' | 'ignoreUnresolved' | 'workspaces' | 'ignoreWorkspaces' | 'entry-redundant' | 'project-redundant' | 'entry-top-level' | 'project-top-level' | 'entry-empty' | 'project-empty' | 'project-extension-unregistered' | 'project-extension-excluded' | 'package-entry' | 'top-level-unconfigured' | 'workspace-unconfigured';
|
|
79
79
|
export type ConfigurationHint = {
|
|
80
80
|
type: ConfigurationHintType;
|
|
81
81
|
identifier: string | RegExp;
|
|
@@ -2,12 +2,14 @@ import { type TemplateLiteral, type TSEnumDeclaration, type TSModuleDeclaration
|
|
|
2
2
|
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile } from '../types/config.ts';
|
|
3
3
|
import type { SymbolType } from '../types/issues.ts';
|
|
4
4
|
import type { ExportMember } from '../types/module-graph.ts';
|
|
5
|
-
|
|
5
|
+
declare const parseFile: (filePath: string, sourceText: string) => import("oxc-parser").ParseResult;
|
|
6
|
+
export declare const _parseFile: typeof parseFile;
|
|
6
7
|
export declare const isAmbientDeclarationFile: (filePath: string, sourceText: string) => boolean;
|
|
7
8
|
export type ResolveModule = (specifier: string, containingFile: string) => ResolvedModule | undefined;
|
|
8
9
|
export interface ResolvedModule {
|
|
9
10
|
resolvedFileName: string;
|
|
10
11
|
isExternalLibraryImport: boolean;
|
|
12
|
+
packageName?: string;
|
|
11
13
|
}
|
|
12
14
|
export declare const buildLineStarts: (sourceText: string) => number[];
|
|
13
15
|
export declare const getLineAndCol: (lineStarts: number[], pos: number) => {
|
|
@@ -24,3 +26,4 @@ export declare const shouldCountRefs: (ignoreExportsUsedInFile: IgnoreExportsUse
|
|
|
24
26
|
export declare function extractNamespaceMembers(decl: TSModuleDeclaration, options: GetImportsAndExportsOptions, lineStarts: number[], getJSDocTags: (start: number) => Set<string>, prefix?: string): ExportMember[];
|
|
25
27
|
export declare const collectAugmentationRefs: (node: TSModuleDeclaration) => string[];
|
|
26
28
|
export declare function extractEnumMembers(decl: TSEnumDeclaration, options: GetImportsAndExportsOptions, lineStarts: number[], getJSDocTags: (start: number) => Set<string>): ExportMember[];
|
|
29
|
+
export {};
|