knip 6.10.0 → 6.12.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 +6 -0
- package/dist/binaries/bash-parser.js +5 -1
- package/dist/cli.js +4 -2
- package/dist/compilers/compilers.js +2 -2
- package/dist/compilers/index.d.ts +10 -0
- package/dist/constants.js +3 -0
- package/dist/graph/analyze.js +15 -10
- package/dist/graph/build.js +15 -1
- package/dist/plugins/astro/resolveFromAST.js +2 -6
- package/dist/plugins/cypress/helpers.js +13 -12
- package/dist/plugins/cypress/types.d.ts +9 -10
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/postcss/index.js +5 -4
- package/dist/plugins/taskfile/index.js +5 -5
- package/dist/plugins/vercel/index.d.ts +3 -0
- package/dist/plugins/vercel/index.js +15 -0
- package/dist/plugins/vite/helpers.d.ts +1 -1
- package/dist/plugins/vite/helpers.js +11 -8
- package/dist/plugins/vite/index.js +3 -3
- package/dist/plugins/yarn/index.js +1 -1
- package/dist/reporters/symbols.js +5 -2
- package/dist/reporters/util/configuration-hints.d.ts +1 -0
- package/dist/reporters/util/configuration-hints.js +3 -1
- package/dist/schema/configuration.d.ts +15 -0
- package/dist/schema/plugins.d.ts +5 -0
- package/dist/schema/plugins.js +1 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +1 -0
- package/dist/types/issues.d.ts +1 -0
- package/dist/typescript/ast-helpers.d.ts +1 -0
- package/dist/typescript/ast-helpers.js +25 -3
- package/dist/typescript/comments.js +4 -3
- package/dist/typescript/visitors/exports.js +7 -0
- package/dist/util/create-options.d.ts +11 -0
- package/dist/util/create-options.js +1 -0
- package/dist/util/glob.js +1 -4
- package/dist/util/load-tsconfig.d.ts +6 -2
- package/dist/util/load-tsconfig.js +31 -34
- package/dist/util/tag.d.ts +1 -0
- package/dist/util/tag.js +2 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/schema.json +4 -0
|
@@ -726,6 +726,11 @@ export declare class ConfigurationChief {
|
|
|
726
726
|
entry?: string | string[] | undefined;
|
|
727
727
|
project?: string | string[] | undefined;
|
|
728
728
|
} | undefined;
|
|
729
|
+
vercel?: string | boolean | string[] | {
|
|
730
|
+
config?: string | string[] | undefined;
|
|
731
|
+
entry?: string | string[] | undefined;
|
|
732
|
+
project?: string | string[] | undefined;
|
|
733
|
+
} | undefined;
|
|
729
734
|
'vercel-og'?: string | boolean | string[] | {
|
|
730
735
|
config?: string | string[] | undefined;
|
|
731
736
|
entry?: string | string[] | undefined;
|
|
@@ -958,6 +963,7 @@ export declare class ConfigurationChief {
|
|
|
958
963
|
typescript?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
959
964
|
unbuild?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
960
965
|
unocss?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
966
|
+
vercel?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
961
967
|
"vercel-og"?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
962
968
|
vike?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
963
969
|
vite?: (boolean | import("./types/config.ts").EnsuredPluginConfiguration) | undefined;
|
|
@@ -94,7 +94,11 @@ export const getDependenciesFromScript = (script, options) => {
|
|
|
94
94
|
return [toBinary(binary), ...getDependenciesFromScript(rest, options)];
|
|
95
95
|
}
|
|
96
96
|
if (binary in Plugins) {
|
|
97
|
-
|
|
97
|
+
const inputs = fallbackResolve(binary, args, { ...options, fromArgs });
|
|
98
|
+
if (options.knownBinsOnly)
|
|
99
|
+
for (const input of inputs)
|
|
100
|
+
input.optional = true;
|
|
101
|
+
return [...inputs, ...fromNodeOptions];
|
|
98
102
|
}
|
|
99
103
|
if (options.knownBinsOnly && !text?.startsWith('.'))
|
|
100
104
|
return [];
|
package/dist/cli.js
CHANGED
|
@@ -46,6 +46,7 @@ const main = async () => {
|
|
|
46
46
|
cwd: options.cwd,
|
|
47
47
|
configFilePath: options.configFilePath,
|
|
48
48
|
isDisableConfigHints: options.isDisableConfigHints,
|
|
49
|
+
isDisableTagHints: options.isDisableTagHints,
|
|
49
50
|
isProduction: options.isProduction,
|
|
50
51
|
isShowProgress: options.isShowProgress,
|
|
51
52
|
isTreatConfigHintsAsErrors: options.isTreatConfigHintsAsErrors,
|
|
@@ -72,8 +73,9 @@ const main = async () => {
|
|
|
72
73
|
console.log('\nTotal running time:', prettyMilliseconds(duration));
|
|
73
74
|
perfObserver.reset();
|
|
74
75
|
}
|
|
75
|
-
if (
|
|
76
|
-
(
|
|
76
|
+
if (!args['no-exit-code'] &&
|
|
77
|
+
(totalErrorCount > Number(args['max-issues'] ?? 0) ||
|
|
78
|
+
(!options.isDisableConfigHints && options.isTreatConfigHintsAsErrors && configurationHints.length > 0))) {
|
|
77
79
|
process.exitCode = 1;
|
|
78
80
|
return;
|
|
79
81
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const fencedCodeBlockMatcher = /```[\s\S]*?```/g;
|
|
2
2
|
export const inlineCodeMatcher = /`[^`]+`/g;
|
|
3
|
-
const scriptExtractor = /<script\b[^>]*>([\s\S]*?)<\/script>/gm;
|
|
3
|
+
const scriptExtractor = /<script\b(?:[^>"']|"[^"]*"|'[^']*')*>([\s\S]*?)<\/script>/gm;
|
|
4
4
|
export const importMatcher = /import[^'"]+['"][^'"]+['"]/g;
|
|
5
5
|
export const importsWithinScripts = (text) => {
|
|
6
6
|
const scripts = [];
|
|
@@ -12,7 +12,7 @@ export const importsWithinScripts = (text) => {
|
|
|
12
12
|
}
|
|
13
13
|
return scripts.join(';\n');
|
|
14
14
|
};
|
|
15
|
-
const scriptBodyExtractor = /<script\b[^>]*>(?<body>[\s\S]*?)<\/script>/gm;
|
|
15
|
+
const scriptBodyExtractor = /<script\b(?:[^>"']|"[^"]*"|'[^']*')*>(?<body>[\s\S]*?)<\/script>/gm;
|
|
16
16
|
export const scriptBodies = (text) => {
|
|
17
17
|
const scripts = [];
|
|
18
18
|
let scriptMatch;
|
|
@@ -673,6 +673,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
673
673
|
entry?: string | string[] | undefined;
|
|
674
674
|
project?: string | string[] | undefined;
|
|
675
675
|
} | undefined;
|
|
676
|
+
vercel?: string | boolean | string[] | {
|
|
677
|
+
config?: string | string[] | undefined;
|
|
678
|
+
entry?: string | string[] | undefined;
|
|
679
|
+
project?: string | string[] | undefined;
|
|
680
|
+
} | undefined;
|
|
676
681
|
'vercel-og'?: string | boolean | string[] | {
|
|
677
682
|
config?: string | string[] | undefined;
|
|
678
683
|
entry?: string | string[] | undefined;
|
|
@@ -1439,6 +1444,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
1439
1444
|
entry?: string | string[] | undefined;
|
|
1440
1445
|
project?: string | string[] | undefined;
|
|
1441
1446
|
} | undefined;
|
|
1447
|
+
vercel?: string | boolean | string[] | {
|
|
1448
|
+
config?: string | string[] | undefined;
|
|
1449
|
+
entry?: string | string[] | undefined;
|
|
1450
|
+
project?: string | string[] | undefined;
|
|
1451
|
+
} | undefined;
|
|
1442
1452
|
'vercel-og'?: string | boolean | string[] | {
|
|
1443
1453
|
config?: string | string[] | undefined;
|
|
1444
1454
|
entry?: string | string[] | undefined;
|
package/dist/constants.js
CHANGED
|
@@ -75,6 +75,7 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
|
|
|
75
75
|
'mkdir',
|
|
76
76
|
'mknod',
|
|
77
77
|
'mv',
|
|
78
|
+
'nc',
|
|
78
79
|
'nice',
|
|
79
80
|
'nl',
|
|
80
81
|
'node',
|
|
@@ -100,6 +101,7 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
|
|
|
100
101
|
'sha512sum',
|
|
101
102
|
'shred',
|
|
102
103
|
'shuf',
|
|
104
|
+
'sleep',
|
|
103
105
|
'sort',
|
|
104
106
|
'split',
|
|
105
107
|
'ssh',
|
|
@@ -113,6 +115,7 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
|
|
|
113
115
|
'time',
|
|
114
116
|
'timeout',
|
|
115
117
|
'touch',
|
|
118
|
+
'trap',
|
|
116
119
|
'tr',
|
|
117
120
|
'true',
|
|
118
121
|
'tsort',
|
package/dist/graph/analyze.js
CHANGED
|
@@ -5,7 +5,8 @@ import { shouldCountRefs } from '../typescript/visitors/helpers.js';
|
|
|
5
5
|
import { getPackageNameFromModuleSpecifier } from '../util/modules.js';
|
|
6
6
|
import { perfObserver } from '../util/Performance.js';
|
|
7
7
|
import { findMatch } from '../util/regex.js';
|
|
8
|
-
import { getShouldIgnoreHandler, getShouldIgnoreTagHandler } from '../util/tag.js';
|
|
8
|
+
import { getShouldIgnoreHandler, getShouldIgnoreTagHandler, isAlwaysIgnored } from '../util/tag.js';
|
|
9
|
+
import { INTERNAL_TAG } from '../constants.js';
|
|
9
10
|
export const analyze = async ({ analyzedFiles, counselor, chief, collector, deputy, entryPaths, graph, streamer, unreferencedFiles, options, }) => {
|
|
10
11
|
const shouldIgnore = getShouldIgnoreHandler(options.isProduction);
|
|
11
12
|
const shouldIgnoreTags = getShouldIgnoreTagHandler(options.tags);
|
|
@@ -21,12 +22,14 @@ export const analyze = async ({ analyzedFiles, counselor, chief, collector, depu
|
|
|
21
22
|
const inExport = file.exports.get(containingExport);
|
|
22
23
|
if (!inExport)
|
|
23
24
|
continue;
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (explorer.isReferenced(filePath, containingExport, { includeEntryExports })[0])
|
|
28
|
-
return true;
|
|
25
|
+
if ((inExport.type === 'type' || inExport.type === 'interface' || inExport.type === 'enum') &&
|
|
26
|
+
!shouldCountRefs(ignoreExportsUsedInFile, inExport.type)) {
|
|
27
|
+
continue;
|
|
29
28
|
}
|
|
29
|
+
if (inExport.hasRefsInFile)
|
|
30
|
+
return true;
|
|
31
|
+
if (explorer.isReferenced(filePath, containingExport, { includeEntryExports })[0])
|
|
32
|
+
return true;
|
|
30
33
|
if (inExport.referencedIn) {
|
|
31
34
|
const v = visited ?? new Set();
|
|
32
35
|
if (!v.has(containingExport)) {
|
|
@@ -54,9 +57,10 @@ export const analyze = async ({ analyzedFiles, counselor, chief, collector, depu
|
|
|
54
57
|
}
|
|
55
58
|
const importsForExport = file.importedBy;
|
|
56
59
|
for (const [identifier, exportedItem] of exportItems) {
|
|
57
|
-
if (
|
|
60
|
+
if (isAlwaysIgnored(exportedItem.jsDocTags))
|
|
58
61
|
continue;
|
|
59
|
-
const
|
|
62
|
+
const isInternalProd = options.isProduction && exportedItem.jsDocTags.has(INTERNAL_TAG);
|
|
63
|
+
const isIgnored = shouldIgnoreTags(exportedItem.jsDocTags) || isInternalProd;
|
|
60
64
|
if (importsForExport) {
|
|
61
65
|
const [isReferenced, reExportingEntryFile] = explorer.isReferenced(filePath, identifier, {
|
|
62
66
|
includeEntryExports: isIncludeEntryExports,
|
|
@@ -64,7 +68,7 @@ export const analyze = async ({ analyzedFiles, counselor, chief, collector, depu
|
|
|
64
68
|
if (isIgnored &&
|
|
65
69
|
(isReferenced || isReferencedInUsedExport(exportedItem, filePath, isIncludeEntryExports))) {
|
|
66
70
|
for (const tagName of exportedItem.jsDocTags) {
|
|
67
|
-
if (options.tags[1].includes(tagName)) {
|
|
71
|
+
if (options.tags[1].includes(tagName) || (isInternalProd && tagName === INTERNAL_TAG)) {
|
|
68
72
|
collector.addTagHint({ type: 'tag', filePath, identifier, tagName });
|
|
69
73
|
}
|
|
70
74
|
}
|
|
@@ -171,7 +175,8 @@ export const analyze = async ({ analyzedFiles, counselor, chief, collector, depu
|
|
|
171
175
|
if (file.imports?.external) {
|
|
172
176
|
for (const extImport of file.imports.external) {
|
|
173
177
|
const packageName = getPackageNameFromModuleSpecifier(extImport.specifier);
|
|
174
|
-
const isHandled = packageName &&
|
|
178
|
+
const isHandled = packageName &&
|
|
179
|
+
deputy.maybeAddReferencedExternalDependency(ws, packageName, undefined, extImport.isTypeOnly);
|
|
175
180
|
if (!isHandled)
|
|
176
181
|
collector.addIssue({
|
|
177
182
|
type: 'unlisted',
|
package/dist/graph/build.js
CHANGED
|
@@ -5,6 +5,7 @@ import { partition } from '../util/array.js';
|
|
|
5
5
|
import { createInputHandler } from '../util/create-input-handler.js';
|
|
6
6
|
import { debugLog, debugLogArray } from '../util/debug.js';
|
|
7
7
|
import { existsSync } from 'node:fs';
|
|
8
|
+
import picomatch from 'picomatch';
|
|
8
9
|
import { tryRealpath } from '../util/fs.js';
|
|
9
10
|
import { createManifest } from '../util/package-json.js';
|
|
10
11
|
import { _glob, _syncGlob, negate, prependDirToPattern as prependDir } from '../util/glob.js';
|
|
@@ -57,7 +58,7 @@ export async function build({ chief, collector, counselor, deputy, principal, is
|
|
|
57
58
|
const dependencies = deputy.getDependencies(name);
|
|
58
59
|
const baseConfig = chief.getConfigForWorkspace(name);
|
|
59
60
|
const tsConfigFilePath = join(dir, options.tsConfigFile ?? 'tsconfig.json');
|
|
60
|
-
const { isFile, compilerOptions, fileNames } = await loadTSConfig(tsConfigFilePath);
|
|
61
|
+
const { isFile, compilerOptions, fileNames, include, exclude } = await loadTSConfig(tsConfigFilePath);
|
|
61
62
|
const [definitionPaths, tscSourcePaths] = partition(fileNames, filePath => IS_DTS.test(filePath));
|
|
62
63
|
const worker = new WorkspaceWorker({
|
|
63
64
|
name,
|
|
@@ -249,6 +250,19 @@ export async function build({ chief, collector, counselor, deputy, principal, is
|
|
|
249
250
|
principal.addProjectPath(filePath);
|
|
250
251
|
}
|
|
251
252
|
}
|
|
253
|
+
if (extensions.length > 0) {
|
|
254
|
+
const extPart = extensions.length === 1 ? extensions[0] : `.{${extensions.map(ext => ext.slice(1)).join(',')}}`;
|
|
255
|
+
const bases = include ? new Set(include.map(p => picomatch.scan(p).base || dir)) : new Set([dir]);
|
|
256
|
+
const patterns = [
|
|
257
|
+
...Array.from(bases, base => `${base}/**/*${extPart}`),
|
|
258
|
+
...(exclude?.map(p => `!${p}`) ?? []),
|
|
259
|
+
];
|
|
260
|
+
const compilerPaths = await _glob({ ...sharedGlobOptions, patterns, label: 'compiler extension paths' });
|
|
261
|
+
for (const compilerPath of compilerPaths) {
|
|
262
|
+
if (!isIgnoredWorkspace(compilerPath))
|
|
263
|
+
principal.addProjectPath(compilerPath);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
252
266
|
}
|
|
253
267
|
else {
|
|
254
268
|
const patterns = options.isProduction
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { collectPropertyValues, findProperty, getPropertyKey, getStringValue, hasImportSpecifier, } from '../../typescript/ast-helpers.js';
|
|
1
|
+
import { collectPropertyValues, findProperty, getPropertyKey, getStringValue, hasImportSpecifier, resolveObjectArg, } from '../../typescript/ast-helpers.js';
|
|
2
2
|
export const getSrcDir = (program) => {
|
|
3
3
|
const values = collectPropertyValues(program, 'srcDir');
|
|
4
4
|
return values.size > 0 ? Array.from(values)[0] : 'src';
|
|
@@ -22,11 +22,7 @@ export const getViteAliases = (program) => {
|
|
|
22
22
|
if (node.type !== 'ExportDefaultDeclaration')
|
|
23
23
|
continue;
|
|
24
24
|
const decl = node.declaration;
|
|
25
|
-
const root = decl?.type === '
|
|
26
|
-
? decl
|
|
27
|
-
: decl?.type === 'CallExpression' && decl.arguments?.[0]?.type === 'ObjectExpression'
|
|
28
|
-
? decl.arguments[0]
|
|
29
|
-
: undefined;
|
|
25
|
+
const root = decl?.type === 'CallExpression' ? resolveObjectArg(decl.arguments?.[0]) : resolveObjectArg(decl);
|
|
30
26
|
const aliasNode = findProperty(findProperty(findProperty(root, 'vite'), 'resolve'), 'alias');
|
|
31
27
|
if (aliasNode?.type !== 'ObjectExpression')
|
|
32
28
|
continue;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { isInternal, toAbsolute } from '../../util/path.js';
|
|
2
2
|
import { load } from '../../util/plugin.js';
|
|
3
3
|
export const resolveDependencies = async (config, options) => {
|
|
4
|
-
const { reporter } = config;
|
|
5
4
|
const { configFileDir } = options;
|
|
6
|
-
const reporters =
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
const reporters = new Set();
|
|
6
|
+
for (const scope of [config, config.e2e, config.component]) {
|
|
7
|
+
const reporter = scope?.reporter;
|
|
8
|
+
if (!reporter)
|
|
9
|
+
continue;
|
|
10
|
+
reporters.add(reporter);
|
|
11
|
+
if (reporter === 'cypress-multi-reporters' && scope?.reporterOptions?.configFile) {
|
|
12
|
+
const configFilePath = toAbsolute(scope.reporterOptions.configFile, configFileDir);
|
|
13
|
+
if (isInternal(configFilePath)) {
|
|
14
|
+
const reporterConfig = await load(configFilePath);
|
|
15
|
+
if (typeof reporterConfig === 'object' && reporterConfig.reporterEnabled) {
|
|
16
|
+
for (const name of reporterConfig.reporterEnabled.split(','))
|
|
17
|
+
reporters.add(name.trim());
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface CypressTestingTypeConfig {
|
|
2
|
+
specPattern?: string[];
|
|
3
|
+
supportFile?: string;
|
|
4
|
+
reporter?: string;
|
|
3
5
|
reporterOptions?: {
|
|
4
6
|
configFile?: string;
|
|
5
7
|
};
|
|
6
|
-
component?: {
|
|
7
|
-
specPattern?: string[];
|
|
8
|
-
supportFile?: string;
|
|
9
|
-
};
|
|
10
|
-
e2e?: {
|
|
11
|
-
specPattern?: string[];
|
|
12
|
-
supportFile?: string;
|
|
13
|
-
};
|
|
14
8
|
}
|
|
9
|
+
export interface CypressConfig extends CypressTestingTypeConfig {
|
|
10
|
+
component?: CypressTestingTypeConfig;
|
|
11
|
+
e2e?: CypressTestingTypeConfig;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -138,6 +138,7 @@ export declare const Plugins: {
|
|
|
138
138
|
typescript: import("../types/config.ts").Plugin;
|
|
139
139
|
unbuild: import("../types/config.ts").Plugin;
|
|
140
140
|
unocss: import("../types/config.ts").Plugin;
|
|
141
|
+
vercel: import("../types/config.ts").Plugin;
|
|
141
142
|
'vercel-og': import("../types/config.ts").Plugin;
|
|
142
143
|
vike: import("../types/config.ts").Plugin;
|
|
143
144
|
vite: import("../types/config.ts").Plugin;
|
package/dist/plugins/index.js
CHANGED
|
@@ -132,6 +132,7 @@ import { default as typedoc } from './typedoc/index.js';
|
|
|
132
132
|
import { default as typescript } from './typescript/index.js';
|
|
133
133
|
import { default as unbuild } from './unbuild/index.js';
|
|
134
134
|
import { default as unocss } from './unocss/index.js';
|
|
135
|
+
import { default as vercel } from './vercel/index.js';
|
|
135
136
|
import { default as vercelOg } from './vercel-og/index.js';
|
|
136
137
|
import { default as vike } from './vike/index.js';
|
|
137
138
|
import { default as vite } from './vite/index.js';
|
|
@@ -282,6 +283,7 @@ export const Plugins = {
|
|
|
282
283
|
typescript,
|
|
283
284
|
unbuild,
|
|
284
285
|
unocss,
|
|
286
|
+
vercel,
|
|
285
287
|
'vercel-og': vercelOg,
|
|
286
288
|
vike,
|
|
287
289
|
vite,
|
|
@@ -2,7 +2,7 @@ import { toDeferResolve, toDependency } from '../../util/input.js';
|
|
|
2
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
import { toLilconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'PostCSS';
|
|
5
|
-
const enablers = ['postcss', 'postcss-cli', 'next'];
|
|
5
|
+
const enablers = ['postcss', 'postcss-cli', 'next', '@tailwindcss/postcss'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
7
7
|
const config = [
|
|
8
8
|
'package.json',
|
|
@@ -20,9 +20,10 @@ const resolveConfig = config => {
|
|
|
20
20
|
})
|
|
21
21
|
: [];
|
|
22
22
|
const inputs = plugins.map(id => toDeferResolve(id));
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (plugins.includes('tailwindcss')) {
|
|
24
|
+
return [...inputs, toDependency('postcss')];
|
|
25
|
+
}
|
|
26
|
+
return plugins.includes('@tailwindcss/postcss') ? [...inputs, toDependency('postcss', { optional: true })] : inputs;
|
|
26
27
|
};
|
|
27
28
|
const plugin = {
|
|
28
29
|
title,
|
|
@@ -4,7 +4,7 @@ import { join, relative } from '../../util/path.js';
|
|
|
4
4
|
const title = 'Taskfile';
|
|
5
5
|
const enablers = 'This plugin is enabled when a Taskfile is found (Taskfile.yml, taskfile.yml, Taskfile.yaml, taskfile.yaml, etc.).';
|
|
6
6
|
const isRootOnly = true;
|
|
7
|
-
const
|
|
7
|
+
const config = [
|
|
8
8
|
'Taskfile.yml',
|
|
9
9
|
'taskfile.yml',
|
|
10
10
|
'Taskfile.yaml',
|
|
@@ -14,10 +14,10 @@ const taskFiles = [
|
|
|
14
14
|
'Taskfile.dist.yaml',
|
|
15
15
|
'taskfile.dist.yaml',
|
|
16
16
|
];
|
|
17
|
-
const isEnabled =
|
|
18
|
-
if (
|
|
17
|
+
const isEnabled = ({ cwd, config: wsConfig }) => {
|
|
18
|
+
if (wsConfig.taskfile)
|
|
19
19
|
return true;
|
|
20
|
-
return
|
|
20
|
+
return config.some(file => isFile(cwd, file));
|
|
21
21
|
};
|
|
22
22
|
const extractScriptsFromCommand = (command) => {
|
|
23
23
|
const scripts = [];
|
|
@@ -113,7 +113,7 @@ const plugin = {
|
|
|
113
113
|
title,
|
|
114
114
|
enablers,
|
|
115
115
|
isEnabled,
|
|
116
|
-
config
|
|
116
|
+
config,
|
|
117
117
|
resolveConfig,
|
|
118
118
|
isRootOnly,
|
|
119
119
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isFile } from '../../util/fs.js';
|
|
2
|
+
const title = 'Vercel';
|
|
3
|
+
const enablers = 'This plugin is enabled when a Vercel project configuration file is found in the root folder.';
|
|
4
|
+
const entry = ['vercel.{json,js,mjs,cjs,ts,mts}'];
|
|
5
|
+
const configFiles = ['vercel.json', 'vercel.js', 'vercel.mjs', 'vercel.cjs', 'vercel.ts', 'vercel.mts'];
|
|
6
|
+
const isEnabled = ({ cwd }) => configFiles.some(file => isFile(cwd, file));
|
|
7
|
+
const isRootOnly = true;
|
|
8
|
+
const plugin = {
|
|
9
|
+
title,
|
|
10
|
+
enablers,
|
|
11
|
+
isEnabled,
|
|
12
|
+
entry,
|
|
13
|
+
isRootOnly,
|
|
14
|
+
};
|
|
15
|
+
export default plugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Program } from 'oxc-parser';
|
|
2
2
|
import { type Input } from '../../util/input.ts';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const getReactBabelInputs: (program: Program) => string[];
|
|
4
4
|
export declare const getIndexHtmlEntries: (rootDir: string) => Promise<Input[]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Visitor } from 'oxc-parser';
|
|
2
|
-
import { findProperty, getDefaultImportName, getImportMap, getStringValues } from '../../typescript/ast-helpers.js';
|
|
2
|
+
import { findProperty, getDefaultImportName, getImportMap, getStringValues, resolveObjectArg, } from '../../typescript/ast-helpers.js';
|
|
3
3
|
import { isFile, loadFile } from '../../util/fs.js';
|
|
4
4
|
import { toProductionEntry } from '../../util/input.js';
|
|
5
5
|
import { join } from '../../util/path.js';
|
|
6
|
-
export const
|
|
7
|
-
const
|
|
6
|
+
export const getReactBabelInputs = (program) => {
|
|
7
|
+
const inputs = [];
|
|
8
8
|
const importMap = getImportMap(program);
|
|
9
9
|
const reactPluginNames = new Set();
|
|
10
10
|
for (const [importName, importPath] of importMap) {
|
|
@@ -22,7 +22,8 @@ export const getReactBabelPlugins = (program) => {
|
|
|
22
22
|
CallExpression(node) {
|
|
23
23
|
if (node.callee?.type !== 'Identifier' || node.callee.name !== 'defineConfig')
|
|
24
24
|
return;
|
|
25
|
-
const
|
|
25
|
+
const config = resolveObjectArg(node.arguments?.[0]);
|
|
26
|
+
const plugins = findProperty(config, 'plugins');
|
|
26
27
|
if (plugins?.type !== 'ArrayExpression')
|
|
27
28
|
return;
|
|
28
29
|
for (const el of plugins.elements ?? []) {
|
|
@@ -30,14 +31,16 @@ export const getReactBabelPlugins = (program) => {
|
|
|
30
31
|
continue;
|
|
31
32
|
if (!reactPluginNames.has(el.callee.name))
|
|
32
33
|
continue;
|
|
33
|
-
const
|
|
34
|
-
for (const
|
|
35
|
-
|
|
34
|
+
const babel = findProperty(el.arguments?.[0], 'babel');
|
|
35
|
+
for (const key of ['plugins', 'presets']) {
|
|
36
|
+
for (const v of getStringValues(findProperty(babel, key)))
|
|
37
|
+
inputs.push(v);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
});
|
|
39
42
|
visitor.visit(program);
|
|
40
|
-
return
|
|
43
|
+
return inputs;
|
|
41
44
|
};
|
|
42
45
|
const moduleScriptPattern = /<script\b(?=[^>]*\btype\s*=\s*["']?module["']?)(?=[^>]*\bsrc\s*=\s*["']?([^"' >]+)["']?)[^>]*>/gi;
|
|
43
46
|
const normalizeModuleScriptSrc = (value) => value.trim().replace(/^\//, '');
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { toDependency } from '../../util/input.js';
|
|
2
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
import { resolveConfig } from '../vitest/index.js';
|
|
4
|
-
import { getIndexHtmlEntries,
|
|
4
|
+
import { getIndexHtmlEntries, getReactBabelInputs } from './helpers.js';
|
|
5
5
|
import { createImportMetaGlobVisitor } from './visitors/importMetaGlob.js';
|
|
6
6
|
const title = 'Vite';
|
|
7
7
|
const enablers = ['vite', 'vitest'];
|
|
8
8
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
9
9
|
export const config = ['vite.config.{js,mjs,ts,cjs,mts,cts}'];
|
|
10
10
|
const resolveFromAST = program => {
|
|
11
|
-
const
|
|
12
|
-
return
|
|
11
|
+
const inputs = getReactBabelInputs(program);
|
|
12
|
+
return inputs.map(id => toDependency(id));
|
|
13
13
|
};
|
|
14
14
|
const registerVisitors = ({ ctx, registerVisitor }) => {
|
|
15
15
|
registerVisitor(createImportMetaGlobVisitor(ctx));
|
|
@@ -2,7 +2,7 @@ import { isFile } from '../../util/fs.js';
|
|
|
2
2
|
import { toEntry } from '../../util/input.js';
|
|
3
3
|
const title = 'Yarn';
|
|
4
4
|
const enablers = 'This plugin is enabled when a `yarn.lock` file is found in the root folder.';
|
|
5
|
-
const isEnabled =
|
|
5
|
+
const isEnabled = ({ cwd }) => isFile(cwd, 'yarn.lock');
|
|
6
6
|
const isRootOnly = true;
|
|
7
7
|
const config = ['.yarnrc.yml'];
|
|
8
8
|
const entry = ['yarn.config.cjs'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { printConfigurationHints } from './util/configuration-hints.js';
|
|
1
|
+
import { printConfigurationHints, printTagHints } from './util/configuration-hints.js';
|
|
2
2
|
import { dim, flattenIssues, getColoredTitle, getIssueTypeTitle, getTableForType } from './util/util.js';
|
|
3
3
|
export default (options) => {
|
|
4
|
-
const { report, issues, isDisableConfigHints, isShowProgress } = options;
|
|
4
|
+
const { report, issues, isDisableConfigHints, isDisableTagHints, isShowProgress } = options;
|
|
5
5
|
const reportMultipleGroups = Object.values(report).filter(Boolean).length > 1;
|
|
6
6
|
let totalIssues = 0;
|
|
7
7
|
for (const [reportType, isReportType] of Object.entries(report)) {
|
|
@@ -24,6 +24,9 @@ export default (options) => {
|
|
|
24
24
|
if (!isDisableConfigHints) {
|
|
25
25
|
printConfigurationHints(options);
|
|
26
26
|
}
|
|
27
|
+
if (!isDisableTagHints) {
|
|
28
|
+
printTagHints(options);
|
|
29
|
+
}
|
|
27
30
|
if (totalIssues === 0 &&
|
|
28
31
|
isShowProgress &&
|
|
29
32
|
(!options.isTreatConfigHintsAsErrors || options.configurationHints.length === 0)) {
|
|
@@ -19,4 +19,5 @@ export declare const finalizeConfigurationHints: (results: Results, options: {
|
|
|
19
19
|
configFilePath?: string;
|
|
20
20
|
}) => ProcessedHint[];
|
|
21
21
|
export declare const printConfigurationHints: ({ cwd, counters, issues, tagHints, configurationHints, enabledPlugins, isTreatConfigHintsAsErrors, includedWorkspaceDirs, selectedWorkspaces, configFilePath, }: ReporterOptions) => void;
|
|
22
|
+
export declare const printTagHints: ({ cwd, tagHints }: ReporterOptions) => void;
|
|
22
23
|
export {};
|
|
@@ -124,9 +124,11 @@ export const printConfigurationHints = ({ cwd, counters, issues, tagHints, confi
|
|
|
124
124
|
const rows = finalizeConfigurationHints({ issues, counters, configurationHints, tagHints, includedWorkspaceDirs, selectedWorkspaces, enabledPlugins }, { cwd, configFilePath });
|
|
125
125
|
if (rows.length > 0) {
|
|
126
126
|
const getTitle = isTreatConfigHintsAsErrors ? getColoredTitle : getDimmedTitle;
|
|
127
|
-
console.
|
|
127
|
+
console.warn(getTitle('Configuration hints', configurationHints.length));
|
|
128
128
|
console.warn(getTableForHints(rows).toString());
|
|
129
129
|
}
|
|
130
|
+
};
|
|
131
|
+
export const printTagHints = ({ cwd, tagHints }) => {
|
|
130
132
|
if (tagHints.size > 0) {
|
|
131
133
|
console.log(getDimmedTitle('Tag hints', tagHints.size));
|
|
132
134
|
for (const hint of tagHints) {
|
|
@@ -671,6 +671,11 @@ export declare const workspaceConfigurationSchema: z.ZodMiniObject<{
|
|
|
671
671
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
672
672
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
673
673
|
}, z.core.$strip>]>>;
|
|
674
|
+
vercel: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
675
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
676
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
677
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
678
|
+
}, z.core.$strip>]>>;
|
|
674
679
|
'vercel-og': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
675
680
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
676
681
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -1428,6 +1433,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
1428
1433
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1429
1434
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1430
1435
|
}, z.core.$strip>]>>;
|
|
1436
|
+
vercel: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1437
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1438
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1439
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1440
|
+
}, z.core.$strip>]>>;
|
|
1431
1441
|
'vercel-og': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
1432
1442
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
1433
1443
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
@@ -2202,6 +2212,11 @@ export declare const knipConfigurationSchema: z.ZodMiniObject<{
|
|
|
2202
2212
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2203
2213
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2204
2214
|
}, z.core.$strip>]>>;
|
|
2215
|
+
vercel: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2216
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2217
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2218
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2219
|
+
}, z.core.$strip>]>>;
|
|
2205
2220
|
'vercel-og': z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
2206
2221
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
2207
2222
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.d.ts
CHANGED
|
@@ -676,6 +676,11 @@ export declare const pluginsSchema: z.ZodMiniObject<{
|
|
|
676
676
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
677
677
|
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
678
678
|
}, z.core.$strip>]>;
|
|
679
|
+
vercel: z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
680
|
+
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
681
|
+
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
682
|
+
project: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
683
|
+
}, z.core.$strip>]>;
|
|
679
684
|
'vercel-og': z.ZodMiniUnion<readonly [z.ZodMiniBoolean<boolean>, z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>, z.ZodMiniObject<{
|
|
680
685
|
config: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
|
681
686
|
entry: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>]>>;
|
package/dist/schema/plugins.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | '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' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
-
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'eleventy', 'eslint', 'execa', 'expo', 'expressive-code', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lockfile-lint', 'lost-pixel', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nx', 'nyc', 'oclif', 'openapi-ts', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', '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', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel-og', 'vike', 'vite', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
|
1
|
+
export type PluginName = 'angular' | 'astro' | 'astro-db' | 'astro-og-canvas' | 'ava' | 'babel' | 'biome' | 'bumpp' | 'bun' | 'c8' | 'capacitor' | 'changelogen' | 'changelogithub' | 'changesets' | 'commitizen' | 'commitlint' | 'convex' | 'create-typescript-app' | 'cspell' | 'cucumber' | 'cypress' | 'danger' | 'dependency-cruiser' | 'docusaurus' | 'dotenv' | 'drizzle' | 'eleventy' | 'eslint' | 'execa' | 'expo' | 'expressive-code' | 'gatsby' | 'github-action' | 'github-actions' | 'glob' | 'graphql-codegen' | 'hardhat' | 'husky' | 'i18next-parser' | 'jest' | 'karma' | 'knex' | 'ladle' | 'lefthook' | 'lint-staged' | 'linthtml' | 'lockfile-lint' | 'lost-pixel' | 'markdownlint' | 'mdx' | 'mdxlint' | 'metro' | 'mocha' | 'moonrepo' | 'msw' | 'nano-staged' | 'nest' | 'netlify' | 'next' | 'next-intl' | 'next-mdx' | 'nitro' | 'node' | 'node-modules-inspector' | 'nodemon' | 'npm-package-json-lint' | 'nuxt' | 'nx' | 'nyc' | 'oclif' | 'openapi-ts' | 'oxfmt' | 'oxlint' | 'panda-css' | 'parcel' | 'payload' | 'pino' | 'playwright' | 'playwright-ct' | 'playwright-test' | 'plop' | 'pm2' | 'pnpm' | 'postcss' | 'preconstruct' | 'prettier' | 'prisma' | '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' | 'travis' | 'ts-node' | 'tsdown' | 'tsup' | 'tsx' | 'typedoc' | 'typescript' | 'unbuild' | 'unocss' | 'vercel' | 'vercel-og' | 'vike' | 'vite' | 'vitepress' | 'vitest' | 'vue' | 'webdriver-io' | 'webpack' | 'wireit' | 'wrangler' | 'wxt' | 'xo' | 'yarn' | 'yorkie' | 'zx';
|
|
2
|
+
export declare const pluginNames: readonly ['angular', 'astro', 'astro-db', 'astro-og-canvas', 'ava', 'babel', 'biome', 'bumpp', 'bun', 'c8', 'capacitor', 'changelogen', 'changelogithub', 'changesets', 'commitizen', 'commitlint', 'convex', 'create-typescript-app', 'cspell', 'cucumber', 'cypress', 'danger', 'dependency-cruiser', 'docusaurus', 'dotenv', 'drizzle', 'eleventy', 'eslint', 'execa', 'expo', 'expressive-code', 'gatsby', 'github-action', 'github-actions', 'glob', 'graphql-codegen', 'hardhat', 'husky', 'i18next-parser', 'jest', 'karma', 'knex', 'ladle', 'lefthook', 'lint-staged', 'linthtml', 'lockfile-lint', 'lost-pixel', 'markdownlint', 'mdx', 'mdxlint', 'metro', 'mocha', 'moonrepo', 'msw', 'nano-staged', 'nest', 'netlify', 'next', 'next-intl', 'next-mdx', 'nitro', 'node', 'node-modules-inspector', 'nodemon', 'npm-package-json-lint', 'nuxt', 'nx', 'nyc', 'oclif', 'openapi-ts', 'oxfmt', 'oxlint', 'panda-css', 'parcel', 'payload', 'pino', 'playwright', 'playwright-ct', 'playwright-test', 'plop', 'pm2', 'pnpm', 'postcss', 'preconstruct', 'prettier', 'prisma', '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', 'travis', 'ts-node', 'tsdown', 'tsup', 'tsx', 'typedoc', 'typescript', 'unbuild', 'unocss', 'vercel', 'vercel-og', 'vike', 'vite', 'vitepress', 'vitest', 'vue', 'webdriver-io', 'webpack', 'wireit', 'wrangler', 'wxt', 'xo', 'yarn', 'yorkie', 'zx'];
|
package/dist/types/issues.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export type ReporterOptions = {
|
|
|
54
54
|
configurationHints: ConfigurationHint[];
|
|
55
55
|
enabledPlugins: Record<string, string[]>;
|
|
56
56
|
isDisableConfigHints: boolean;
|
|
57
|
+
isDisableTagHints: boolean;
|
|
57
58
|
isTreatConfigHintsAsErrors: boolean;
|
|
58
59
|
cwd: string;
|
|
59
60
|
isProduction: boolean;
|
|
@@ -5,6 +5,7 @@ export declare const getImportMap: (program: Program) => Map<string, string>;
|
|
|
5
5
|
export declare const getDefaultImportName: (importMap: Map<string, string>, specifier: string) => string | undefined;
|
|
6
6
|
export declare const getPropertyValues: (node: any, propertyName: string) => Set<string>;
|
|
7
7
|
export declare const collectPropertyValues: (program: Program, propertyName: string) => Set<string>;
|
|
8
|
+
export declare const resolveObjectArg: (arg: any) => any | undefined;
|
|
8
9
|
export declare const findCallArg: (program: Program, fnName: string) => any | undefined;
|
|
9
10
|
export declare const findProperty: (node: any, name: string) => any | undefined;
|
|
10
11
|
export declare const getStringValues: (node: any) => Set<string>;
|
|
@@ -82,6 +82,28 @@ export const collectPropertyValues = (program, propertyName) => {
|
|
|
82
82
|
visitor.visit(program);
|
|
83
83
|
return values;
|
|
84
84
|
};
|
|
85
|
+
const unwrapParens = (node) => node?.type === 'ParenthesizedExpression' ? unwrapParens(node.expression) : node;
|
|
86
|
+
export const resolveObjectArg = (arg) => {
|
|
87
|
+
const node = unwrapParens(arg);
|
|
88
|
+
if (!node)
|
|
89
|
+
return;
|
|
90
|
+
if (node.type === 'ObjectExpression')
|
|
91
|
+
return node;
|
|
92
|
+
if (node.type !== 'ArrowFunctionExpression' && node.type !== 'FunctionExpression')
|
|
93
|
+
return;
|
|
94
|
+
const body = unwrapParens(node.body);
|
|
95
|
+
if (body?.type === 'ObjectExpression')
|
|
96
|
+
return body;
|
|
97
|
+
if (body?.type !== 'BlockStatement')
|
|
98
|
+
return;
|
|
99
|
+
for (const stmt of body.body ?? []) {
|
|
100
|
+
if (stmt.type === 'ReturnStatement') {
|
|
101
|
+
const ret = unwrapParens(stmt.argument);
|
|
102
|
+
if (ret?.type === 'ObjectExpression')
|
|
103
|
+
return ret;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
85
107
|
export const findCallArg = (program, fnName) => {
|
|
86
108
|
let result;
|
|
87
109
|
const visitor = new Visitor({
|
|
@@ -89,9 +111,9 @@ export const findCallArg = (program, fnName) => {
|
|
|
89
111
|
if (result)
|
|
90
112
|
return;
|
|
91
113
|
if (node.callee?.type === 'Identifier' && node.callee.name === fnName) {
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
result =
|
|
114
|
+
const obj = resolveObjectArg(node.arguments?.[0]);
|
|
115
|
+
if (obj)
|
|
116
|
+
result = obj;
|
|
95
117
|
}
|
|
96
118
|
},
|
|
97
119
|
});
|
|
@@ -2,7 +2,7 @@ import { IMPORT_FLAGS } from '../constants.js';
|
|
|
2
2
|
const jsDocImportRe = /import\(\s*['"]([^'"]+)['"]\s*\)(?:\.(\w+))?/g;
|
|
3
3
|
const jsDocImportTagRe = /@import\s+(?:\{[^}]*\}|\*\s+as\s+\w+)\s+from\s+['"]([^'"]+)['"]/g;
|
|
4
4
|
const jsxImportSourceRe = /@jsxImportSource\s+(\S+)/;
|
|
5
|
-
const
|
|
5
|
+
const referenceRe = /\s*<reference\s+(types|path)\s*=\s*"([^"]+)"[^/]*\/>/;
|
|
6
6
|
const envPragmaRe = /@(vitest|jest)-environment\s+([@\w./-]+)/g;
|
|
7
7
|
const resolveEnvironmentPragma = (tool, value) => {
|
|
8
8
|
if (value === 'node')
|
|
@@ -55,9 +55,10 @@ export const extractImportsFromComments = (comments, firstStmtStart, addImport)
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
if (comment.type === 'Line') {
|
|
58
|
-
const refMatch = comment.value.match(
|
|
58
|
+
const refMatch = comment.value.match(referenceRe);
|
|
59
59
|
if (refMatch) {
|
|
60
|
-
|
|
60
|
+
const flags = IMPORT_FLAGS.TYPE_ONLY | (refMatch[1] === 'path' ? IMPORT_FLAGS.OPTIONAL : 0);
|
|
61
|
+
addImport(refMatch[2], undefined, undefined, undefined, comment.start, flags);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -111,6 +111,11 @@ export function handleExportNamed(node, s) {
|
|
|
111
111
|
findSpreads(declarator.init, [name]);
|
|
112
112
|
}
|
|
113
113
|
s.addExport(name, SYMBOL_TYPE.UNKNOWN, declarator.id.start, [], fix, isReExport, jsDocTags);
|
|
114
|
+
if (declarator.id.typeAnnotation)
|
|
115
|
+
s.collectRefsInType(declarator.id.typeAnnotation, name, true);
|
|
116
|
+
if (declarator.init?.type === 'ArrowFunctionExpression' || declarator.init?.type === 'FunctionExpression') {
|
|
117
|
+
s.collectRefsInType(declarator.init, name, true);
|
|
118
|
+
}
|
|
114
119
|
if (!jsDocTags.has(ALIAS_TAG) && declarator.init?.type === 'Identifier') {
|
|
115
120
|
const initName = declarator.init.name;
|
|
116
121
|
const existingExport = s.exports.get(initName);
|
|
@@ -133,6 +138,7 @@ export function handleExportNamed(node, s) {
|
|
|
133
138
|
else if ((decl.type === 'FunctionDeclaration' || decl.type === 'TSDeclareFunction') && decl.id) {
|
|
134
139
|
const fix = s.getFix(exportStart, exportStart + 7);
|
|
135
140
|
s.addExport(decl.id.name, SYMBOL_TYPE.FUNCTION, decl.id.start, [], fix, false, s.getJSDocTags(exportStart));
|
|
141
|
+
s.collectRefsInType(decl, decl.id.name, true);
|
|
136
142
|
}
|
|
137
143
|
else if (decl.type === 'ClassDeclaration' && decl.id) {
|
|
138
144
|
const fix = s.getFix(exportStart, exportStart + 7);
|
|
@@ -210,6 +216,7 @@ export function handleExportDefault(node, s) {
|
|
|
210
216
|
if (decl.type === 'FunctionDeclaration') {
|
|
211
217
|
type = SYMBOL_TYPE.FUNCTION;
|
|
212
218
|
pos = decl.id?.start ?? decl.start;
|
|
219
|
+
s.collectRefsInType(decl, 'default', true);
|
|
213
220
|
}
|
|
214
221
|
else if (decl.type === 'ClassDeclaration') {
|
|
215
222
|
type = SYMBOL_TYPE.CLASS;
|
|
@@ -18,6 +18,7 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
18
18
|
isCache: boolean;
|
|
19
19
|
isDebug: boolean;
|
|
20
20
|
isDisableConfigHints: boolean;
|
|
21
|
+
isDisableTagHints: boolean;
|
|
21
22
|
isFix: boolean;
|
|
22
23
|
isFixCatalog: boolean;
|
|
23
24
|
isFixDependencies: boolean;
|
|
@@ -711,6 +712,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
711
712
|
entry?: string | string[] | undefined;
|
|
712
713
|
project?: string | string[] | undefined;
|
|
713
714
|
} | undefined;
|
|
715
|
+
vercel?: string | boolean | string[] | {
|
|
716
|
+
config?: string | string[] | undefined;
|
|
717
|
+
entry?: string | string[] | undefined;
|
|
718
|
+
project?: string | string[] | undefined;
|
|
719
|
+
} | undefined;
|
|
714
720
|
'vercel-og'?: string | boolean | string[] | {
|
|
715
721
|
config?: string | string[] | undefined;
|
|
716
722
|
entry?: string | string[] | undefined;
|
|
@@ -1479,6 +1485,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1479
1485
|
entry?: string | string[] | undefined;
|
|
1480
1486
|
project?: string | string[] | undefined;
|
|
1481
1487
|
} | undefined;
|
|
1488
|
+
vercel?: string | boolean | string[] | {
|
|
1489
|
+
config?: string | string[] | undefined;
|
|
1490
|
+
entry?: string | string[] | undefined;
|
|
1491
|
+
project?: string | string[] | undefined;
|
|
1492
|
+
} | undefined;
|
|
1482
1493
|
'vercel-og'?: string | boolean | string[] | {
|
|
1483
1494
|
config?: string | string[] | undefined;
|
|
1484
1495
|
entry?: string | string[] | undefined;
|
|
@@ -107,6 +107,7 @@ export const createOptions = async (options) => {
|
|
|
107
107
|
isCache: args.cache ?? false,
|
|
108
108
|
isDebug,
|
|
109
109
|
isDisableConfigHints: args['no-config-hints'] || isProduction || Boolean(workspace),
|
|
110
|
+
isDisableTagHints: Boolean(args['no-config-hints']),
|
|
110
111
|
isFix: args.fix ?? options.isFix ?? isFixFiles ?? fixTypes.length > 0,
|
|
111
112
|
isFixCatalog: fixTypes.length === 0 || fixTypes.includes('catalog'),
|
|
112
113
|
isFixDependencies: fixTypes.length === 0 || fixTypes.includes('dependencies'),
|
package/dist/util/glob.js
CHANGED
|
@@ -5,10 +5,7 @@ import { glob } from './glob-core.js';
|
|
|
5
5
|
import { timerify } from './Performance.js';
|
|
6
6
|
import { isAbsolute, join, relative } from './path.js';
|
|
7
7
|
const prepend = (pattern, relativePath) => isAbsolute(pattern.replace(/^!/, '')) ? pattern : prependDirToPattern(relativePath, pattern);
|
|
8
|
-
const prependDirToPatterns = (cwd, dir, patterns) =>
|
|
9
|
-
const relativePath = relative(cwd, dir);
|
|
10
|
-
return compact([patterns].flat().map(p => removeProductionSuffix(prepend(p, relativePath)))).sort(negatedLast);
|
|
11
|
-
};
|
|
8
|
+
const prependDirToPatterns = (cwd, dir, patterns) => compact([patterns].flat().map(p => removeProductionSuffix(prepend(p, relative(cwd, dir))))).sort(negatedLast);
|
|
12
9
|
export const removeProductionSuffix = (pattern) => pattern.replace(/!$/, '');
|
|
13
10
|
const negatedLast = (pattern) => (pattern.startsWith('!') ? 1 : -1);
|
|
14
11
|
export const prependDirToPattern = (dir, pattern) => {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { CompilerOptions } from '../types/project.ts';
|
|
2
|
-
|
|
2
|
+
interface TSConfigInfo {
|
|
3
3
|
isFile: boolean;
|
|
4
4
|
compilerOptions: CompilerOptions;
|
|
5
5
|
fileNames: string[];
|
|
6
|
-
|
|
6
|
+
include: string[] | undefined;
|
|
7
|
+
exclude: string[] | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const loadTSConfig: (tsConfigFilePath: string) => Promise<TSConfigInfo>;
|
|
10
|
+
export {};
|
|
@@ -73,42 +73,39 @@ const fillFromReferences = (target, references, dir, visited) => {
|
|
|
73
73
|
fillFromReferences(target, refConfig.references, refDir, visited);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
+
const EMPTY = {
|
|
77
|
+
compilerOptions: {},
|
|
78
|
+
fileNames: [],
|
|
79
|
+
include: undefined,
|
|
80
|
+
exclude: undefined,
|
|
81
|
+
};
|
|
76
82
|
export const loadTSConfig = async (tsConfigFilePath) => {
|
|
77
|
-
if (isFile(tsConfigFilePath))
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if ((!compilerOptions.outDir || !compilerOptions.rootDir) && config.references?.length) {
|
|
93
|
-
fillFromReferences(compilerOptions, config.references, dir, new Set([tsConfigFilePath]));
|
|
94
|
-
}
|
|
95
|
-
const include = resolvePatterns(config.include, dir, true);
|
|
96
|
-
const exclude = resolvePatterns(config.exclude, dir, true);
|
|
97
|
-
const files = resolvePatterns(config.files, dir);
|
|
98
|
-
const fileNames = expandFileNames(dir, compilerOptions, include, exclude, files);
|
|
99
|
-
return { isFile: true, compilerOptions, fileNames };
|
|
83
|
+
if (!isFile(tsConfigFilePath))
|
|
84
|
+
return { isFile: false, ...EMPTY };
|
|
85
|
+
try {
|
|
86
|
+
const config = parseTsconfig(tsConfigFilePath);
|
|
87
|
+
const dir = dirname(tsConfigFilePath);
|
|
88
|
+
const compilerOptions = (config.compilerOptions ?? {});
|
|
89
|
+
if (compilerOptions.outDir)
|
|
90
|
+
compilerOptions.outDir = toAbsolute(compilerOptions.outDir, dir).replace(/\/+$/, '');
|
|
91
|
+
if (compilerOptions.rootDir)
|
|
92
|
+
compilerOptions.rootDir = toAbsolute(compilerOptions.rootDir, dir).replace(/\/+$/, '');
|
|
93
|
+
if (compilerOptions.paths) {
|
|
94
|
+
compilerOptions.pathsBasePath ??= dir;
|
|
95
|
+
}
|
|
96
|
+
if (compilerOptions.rootDirs) {
|
|
97
|
+
compilerOptions.rootDirs = compilerOptions.rootDirs.map((d) => (isAbsolute(d) ? d : join(dir, d)));
|
|
100
98
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
isFile: true,
|
|
104
|
-
compilerOptions: {},
|
|
105
|
-
fileNames: [],
|
|
106
|
-
};
|
|
99
|
+
if ((!compilerOptions.outDir || !compilerOptions.rootDir) && config.references?.length) {
|
|
100
|
+
fillFromReferences(compilerOptions, config.references, dir, new Set([tsConfigFilePath]));
|
|
107
101
|
}
|
|
102
|
+
const include = resolvePatterns(config.include, dir, true);
|
|
103
|
+
const exclude = resolvePatterns(config.exclude, dir, true);
|
|
104
|
+
const files = resolvePatterns(config.files, dir);
|
|
105
|
+
const fileNames = expandFileNames(dir, compilerOptions, include, exclude, files);
|
|
106
|
+
return { isFile: true, compilerOptions, fileNames, include, exclude };
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
return { isFile: true, ...EMPTY };
|
|
108
110
|
}
|
|
109
|
-
return {
|
|
110
|
-
isFile: false,
|
|
111
|
-
compilerOptions: {},
|
|
112
|
-
fileNames: [],
|
|
113
|
-
};
|
|
114
111
|
};
|
package/dist/util/tag.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Tags } from '../types/options.ts';
|
|
2
2
|
export declare const splitTags: (rawTags: string[]) => Tags;
|
|
3
3
|
export declare const shouldIgnore: (jsDocTags: Set<string>, tags: Tags) => boolean;
|
|
4
|
+
export declare const isAlwaysIgnored: (jsDocTags: Set<string>) => boolean;
|
|
4
5
|
export declare const getShouldIgnoreHandler: (isProduction: boolean) => (jsDocTags: Set<string>) => boolean;
|
|
5
6
|
export declare const getShouldIgnoreTagHandler: (tags: Tags) => (jsDocTags: Set<string>) => boolean;
|
package/dist/util/tag.js
CHANGED
|
@@ -17,8 +17,6 @@ export const shouldIgnore = (jsDocTags, tags) => {
|
|
|
17
17
|
return true;
|
|
18
18
|
return false;
|
|
19
19
|
};
|
|
20
|
-
export const
|
|
21
|
-
|
|
22
|
-
jsDocTags.has(ALIAS_TAG) ||
|
|
23
|
-
(isProduction && jsDocTags.has(INTERNAL_TAG));
|
|
20
|
+
export const isAlwaysIgnored = (jsDocTags) => jsDocTags.has(PUBLIC_TAG) || jsDocTags.has(BETA_TAG) || jsDocTags.has(ALIAS_TAG);
|
|
21
|
+
export const getShouldIgnoreHandler = (isProduction) => (jsDocTags) => isAlwaysIgnored(jsDocTags) || (isProduction && jsDocTags.has(INTERNAL_TAG));
|
|
24
22
|
export const getShouldIgnoreTagHandler = (tags) => (jsDocTags) => shouldIgnore(jsDocTags, tags);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.
|
|
1
|
+
export declare const version = "6.12.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '6.
|
|
1
|
+
export const version = '6.12.0';
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -864,6 +864,10 @@
|
|
|
864
864
|
"title": "unocss plugin configuration (https://knip.dev/reference/plugins/unocss)",
|
|
865
865
|
"$ref": "#/definitions/plugin"
|
|
866
866
|
},
|
|
867
|
+
"vercel": {
|
|
868
|
+
"title": "vercel plugin configuration (https://knip.dev/reference/plugins/vercel)",
|
|
869
|
+
"$ref": "#/definitions/plugin"
|
|
870
|
+
},
|
|
867
871
|
"vercel-og": {
|
|
868
872
|
"title": "vercel-og plugin configuration (https://knip.dev/reference/plugins/vercel-og)",
|
|
869
873
|
"$ref": "#/definitions/plugin"
|