knip 5.64.0 → 5.64.2
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/CacheConsultant.js +1 -1
- package/dist/ConfigurationChief.d.ts +10 -10
- package/dist/DependencyDeputy.d.ts +2 -2
- package/dist/DependencyDeputy.js +2 -2
- package/dist/IssueCollector.js +6 -7
- package/dist/ProjectPrincipal.d.ts +1 -1
- package/dist/ProjectPrincipal.js +2 -2
- package/dist/WorkspaceWorker.d.ts +3 -3
- package/dist/WorkspaceWorker.js +2 -2
- package/dist/binaries/index.js +1 -1
- package/dist/cli.js +10 -10
- package/dist/compilers/index.d.ts +37 -30
- package/dist/compilers/index.js +1 -1
- package/dist/graph/build.js +2 -2
- package/dist/index.js +2 -2
- package/dist/manifest/index.js +1 -1
- package/dist/plugins/bumpp/index.js +2 -1
- package/dist/plugins/changelogen/index.js +1 -1
- package/dist/plugins/changelogithub/index.js +1 -1
- package/dist/plugins/commitlint/index.js +1 -1
- package/dist/plugins/eslint/helpers.js +2 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +2 -2
- package/dist/plugins/lint-staged/index.js +1 -1
- package/dist/plugins/linthtml/index.js +1 -1
- package/dist/plugins/lockfile-lint/index.js +1 -1
- package/dist/plugins/next/index.js +2 -1
- package/dist/plugins/node-modules-inspector/index.js +1 -1
- package/dist/plugins/npm-package-json-lint/index.js +1 -1
- package/dist/plugins/postcss/index.js +1 -1
- package/dist/plugins/react-router/index.js +1 -1
- package/dist/plugins/semantic-release/index.js +1 -1
- package/dist/plugins/size-limit/index.js +1 -1
- package/dist/plugins/stylelint/index.js +1 -1
- package/dist/plugins/syncpack/index.js +1 -1
- package/dist/plugins/unocss/index.js +1 -1
- package/dist/plugins/vitest/index.d.ts +3 -0
- package/dist/plugins/vitest/index.js +6 -0
- package/dist/plugins.d.ts +1 -1
- package/dist/schema/configuration.d.ts +1187 -6505
- package/dist/schema/configuration.js +54 -51
- package/dist/schema/plugins.d.ts +579 -2641
- package/dist/schema/plugins.js +4 -4
- package/dist/types/config.d.ts +2 -2
- package/dist/types/issues.d.ts +2 -2
- package/dist/typescript/get-imports-and-exports.js +1 -1
- package/dist/typescript/resolve-module-names.js +1 -1
- package/dist/util/create-options.d.ts +39 -32
- package/dist/util/errors.d.ts +4 -4
- package/dist/util/errors.js +8 -8
- package/dist/util/file-entry-cache.js +1 -1
- package/dist/util/glob-core.js +1 -1
- package/dist/util/glob.js +1 -1
- package/dist/util/input.d.ts +1 -1
- package/dist/util/loader.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +17 -18
package/dist/CacheConsultant.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { timerify } from './util/Performance.js';
|
|
2
1
|
import { FileEntryCache } from './util/file-entry-cache.js';
|
|
2
|
+
import { timerify } from './util/Performance.js';
|
|
3
3
|
import { version } from './version.js';
|
|
4
4
|
const dummyFileDescriptor = { key: '', changed: true, notFound: true };
|
|
5
5
|
export class CacheConsultant {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Configuration, IgnorePatterns, RawConfiguration, WorkspaceConfiguration } from './types/config.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConfigurationHint } from './types/issues.js';
|
|
3
3
|
import type { WorkspacePackage } from './types/package-json.js';
|
|
4
4
|
import type { MainOptions } from './util/create-options.js';
|
|
5
5
|
import { type WorkspaceGraph } from './util/create-workspace-graph.js';
|
|
@@ -36,7 +36,7 @@ export declare class ConfigurationChief {
|
|
|
36
36
|
workspaceGraph: WorkspaceGraph;
|
|
37
37
|
includedWorkspaces: Workspace[];
|
|
38
38
|
constructor(options: MainOptions);
|
|
39
|
-
getConfigurationHints():
|
|
39
|
+
getConfigurationHints(): Set<ConfigurationHint>;
|
|
40
40
|
private normalize;
|
|
41
41
|
getWorkspaces(): Promise<Workspace[]>;
|
|
42
42
|
private getListedWorkspaces;
|
|
@@ -52,13 +52,6 @@ export declare class ConfigurationChief {
|
|
|
52
52
|
getNegatedWorkspacePatterns(name: string): string[];
|
|
53
53
|
private getConfigKeyForWorkspace;
|
|
54
54
|
getWorkspaceConfig(workspaceName: string): {
|
|
55
|
-
node?: string | boolean | string[] | {
|
|
56
|
-
config?: string | string[] | undefined;
|
|
57
|
-
entry?: string | string[] | undefined;
|
|
58
|
-
project?: string | string[] | undefined;
|
|
59
|
-
} | undefined;
|
|
60
|
-
entry?: string | string[] | undefined;
|
|
61
|
-
project?: string | string[] | undefined;
|
|
62
55
|
angular?: string | boolean | string[] | {
|
|
63
56
|
config?: string | string[] | undefined;
|
|
64
57
|
entry?: string | string[] | undefined;
|
|
@@ -314,6 +307,11 @@ export declare class ConfigurationChief {
|
|
|
314
307
|
entry?: string | string[] | undefined;
|
|
315
308
|
project?: string | string[] | undefined;
|
|
316
309
|
} | undefined;
|
|
310
|
+
node?: string | boolean | string[] | {
|
|
311
|
+
config?: string | string[] | undefined;
|
|
312
|
+
entry?: string | string[] | undefined;
|
|
313
|
+
project?: string | string[] | undefined;
|
|
314
|
+
} | undefined;
|
|
317
315
|
'node-modules-inspector'?: string | boolean | string[] | {
|
|
318
316
|
config?: string | string[] | undefined;
|
|
319
317
|
entry?: string | string[] | undefined;
|
|
@@ -624,6 +622,8 @@ export declare class ConfigurationChief {
|
|
|
624
622
|
entry?: string | string[] | undefined;
|
|
625
623
|
project?: string | string[] | undefined;
|
|
626
624
|
} | undefined;
|
|
625
|
+
entry?: string | string[] | undefined;
|
|
626
|
+
project?: string | string[] | undefined;
|
|
627
627
|
paths?: Record<string, string[]> | undefined;
|
|
628
628
|
ignore?: string | string[] | undefined;
|
|
629
629
|
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
@@ -638,7 +638,6 @@ export declare class ConfigurationChief {
|
|
|
638
638
|
ignoreUnresolved: (string | RegExp)[];
|
|
639
639
|
};
|
|
640
640
|
getConfigForWorkspace(workspaceName: string, extensions?: string[]): {
|
|
641
|
-
node?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
642
641
|
angular?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
643
642
|
astro?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
644
643
|
ava?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
@@ -690,6 +689,7 @@ export declare class ConfigurationChief {
|
|
|
690
689
|
nest?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
691
690
|
netlify?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
692
691
|
next?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
692
|
+
node?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
693
693
|
"node-modules-inspector"?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
694
694
|
nodemon?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
695
695
|
"npm-package-json-lint"?: (boolean | import("./types/config.js").EnsuredPluginConfiguration) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Workspace } from './ConfigurationChief.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConfigurationHint, Counters, Issue, Issues, SymbolIssueType } from './types/issues.js';
|
|
3
3
|
import type { PackageJson } from './types/package-json.js';
|
|
4
4
|
import type { DependencyArray, DependencySet, HostDependencies, InstalledBinaries, WorkspaceManifests } from './types/workspace.js';
|
|
5
5
|
import type { MainOptions } from './util/create-options.js';
|
|
@@ -70,7 +70,7 @@ export declare class DependencyDeputy {
|
|
|
70
70
|
issues: Issues;
|
|
71
71
|
counters: Counters;
|
|
72
72
|
}): void;
|
|
73
|
-
getConfigurationHints():
|
|
73
|
+
getConfigurationHints(): Set<ConfigurationHint>;
|
|
74
74
|
addIgnoredDependencies(workspaceName: string, identifier: string): void;
|
|
75
75
|
addIgnoredBinaries(workspaceName: string, identifier: string): void;
|
|
76
76
|
}
|
package/dist/DependencyDeputy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isBuiltin } from 'node:module';
|
|
2
|
-
import {
|
|
3
|
-
import { DT_SCOPE, IGNORED_DEPENDENCIES, IGNORED_GLOBAL_BINARIES, IGNORED_RUNTIME_DEPENDENCIES, IGNORE_DEFINITELY_TYPED, ROOT_WORKSPACE_NAME, } from './constants.js';
|
|
2
|
+
import { DT_SCOPE, IGNORE_DEFINITELY_TYPED, IGNORED_DEPENDENCIES, IGNORED_GLOBAL_BINARIES, IGNORED_RUNTIME_DEPENDENCIES, ROOT_WORKSPACE_NAME, } from './constants.js';
|
|
4
3
|
import { getDependencyMetaData } from './manifest/index.js';
|
|
4
|
+
import { PackagePeeker } from './PackagePeeker.js';
|
|
5
5
|
import { getDefinitelyTypedFor, getPackageFromDefinitelyTyped, getPackageNameFromModuleSpecifier, isDefinitelyTyped, } from './util/modules.js';
|
|
6
6
|
import { findMatch, toRegexOrString } from './util/regex.js';
|
|
7
7
|
const filterIsProduction = (id, isProduction) => typeof id === 'string' ? (isProduction || !id.endsWith('!') ? id.replace(/!$/, '') : []) : id;
|
package/dist/IssueCollector.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import picomatch from 'picomatch';
|
|
2
|
-
import { timerify } from './util/Performance.js';
|
|
3
2
|
import { initCounters, initIssues } from './util/issue-initializers.js';
|
|
3
|
+
import { timerify } from './util/Performance.js';
|
|
4
4
|
import { join, relative } from './util/path.js';
|
|
5
|
-
const hasConfigurationHint = (hints, hint) => Array.from(hints).some(item => item.identifier === hint.identifier && item.type === hint.type && item.workspaceName === hint.workspaceName);
|
|
6
5
|
const isMatch = timerify(picomatch.isMatch, 'isMatch');
|
|
7
6
|
export class IssueCollector {
|
|
8
7
|
cwd;
|
|
@@ -11,7 +10,7 @@ export class IssueCollector {
|
|
|
11
10
|
issues = initIssues();
|
|
12
11
|
counters = initCounters();
|
|
13
12
|
referencedFiles = new Set();
|
|
14
|
-
configurationHints = new
|
|
13
|
+
configurationHints = new Map();
|
|
15
14
|
tagHints = new Set();
|
|
16
15
|
ignorePatterns = new Set();
|
|
17
16
|
isMatch;
|
|
@@ -64,9 +63,9 @@ export class IssueCollector {
|
|
|
64
63
|
return issue;
|
|
65
64
|
}
|
|
66
65
|
addConfigurationHint(issue) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
const key = `${issue.workspaceName}::${issue.type}::${issue.identifier}`;
|
|
67
|
+
if (!this.configurationHints.has(key))
|
|
68
|
+
this.configurationHints.set(key, issue);
|
|
70
69
|
}
|
|
71
70
|
addTagHint(issue) {
|
|
72
71
|
this.tagHints.add(issue);
|
|
@@ -82,7 +81,7 @@ export class IssueCollector {
|
|
|
82
81
|
issues: this.issues,
|
|
83
82
|
counters: this.counters,
|
|
84
83
|
tagHints: this.tagHints,
|
|
85
|
-
configurationHints: this.configurationHints,
|
|
84
|
+
configurationHints: new Set(this.configurationHints.values()),
|
|
86
85
|
};
|
|
87
86
|
}
|
|
88
87
|
}
|
|
@@ -4,8 +4,8 @@ import type { AsyncCompilers, SyncCompilers } from './compilers/types.js';
|
|
|
4
4
|
import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile } from './types/config.js';
|
|
5
5
|
import type { Export, ExportMember, FileNode, ModuleGraph } from './types/module-graph.js';
|
|
6
6
|
import type { Paths, PrincipalOptions } from './types/project.js';
|
|
7
|
-
import { SourceFileManager } from './typescript/SourceFileManager.js';
|
|
8
7
|
import type { ResolveModuleNames } from './typescript/resolve-module-names.js';
|
|
8
|
+
import { SourceFileManager } from './typescript/SourceFileManager.js';
|
|
9
9
|
import type { MainOptions } from './util/create-options.js';
|
|
10
10
|
import type { ToSourceFilePath } from './util/to-source-path.js';
|
|
11
11
|
export declare class ProjectPrincipal {
|
package/dist/ProjectPrincipal.js
CHANGED
|
@@ -2,11 +2,11 @@ import ts from 'typescript';
|
|
|
2
2
|
import { CacheConsultant } from './CacheConsultant.js';
|
|
3
3
|
import { getCompilerExtensions } from './compilers/index.js';
|
|
4
4
|
import { ANONYMOUS, DEFAULT_EXTENSIONS, PUBLIC_TAG } from './constants.js';
|
|
5
|
-
import { SourceFileManager } from './typescript/SourceFileManager.js';
|
|
6
5
|
import { createHosts } from './typescript/create-hosts.js';
|
|
7
6
|
import { _getImportsAndExports } from './typescript/get-imports-and-exports.js';
|
|
8
|
-
import {
|
|
7
|
+
import { SourceFileManager } from './typescript/SourceFileManager.js';
|
|
9
8
|
import { compact } from './util/array.js';
|
|
9
|
+
import { timerify } from './util/Performance.js';
|
|
10
10
|
import { extname, isInNodeModules, toAbsolute } from './util/path.js';
|
|
11
11
|
const baseCompilerOptions = {
|
|
12
12
|
allowJs: true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CacheConsultant } from './CacheConsultant.js';
|
|
2
2
|
import { type Workspace } from './ConfigurationChief.js';
|
|
3
|
-
import type { PluginName } from './types/PluginNames.js';
|
|
4
3
|
import type { Configuration, GetReferencedInternalFilePath, GetSourceFile, WorkspaceConfiguration } from './types/config.js';
|
|
5
|
-
import type {
|
|
4
|
+
import type { ConfigurationHint } from './types/issues.js';
|
|
5
|
+
import type { PluginName } from './types/PluginNames.js';
|
|
6
6
|
import type { PackageJson } from './types/package-json.js';
|
|
7
7
|
import type { DependencySet } from './types/workspace.js';
|
|
8
8
|
import type { MainOptions } from './util/create-options.js';
|
|
@@ -60,7 +60,7 @@ export declare class WorkspaceWorker {
|
|
|
60
60
|
private getConfigurationFilePatterns;
|
|
61
61
|
getIgnorePatterns(): string[];
|
|
62
62
|
runPlugins(): Promise<Input[]>;
|
|
63
|
-
getConfigurationHints(type: 'entry' | 'project', patterns: string[], filePaths: string[], includedPaths: Set<string>):
|
|
63
|
+
getConfigurationHints(type: 'entry' | 'project', patterns: string[], filePaths: string[], includedPaths: Set<string>): Set<ConfigurationHint>;
|
|
64
64
|
onDispose(): void;
|
|
65
65
|
}
|
|
66
66
|
export {};
|
package/dist/WorkspaceWorker.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import picomatch from 'picomatch';
|
|
2
|
+
import { _getInputsFromScripts } from './binaries/index.js';
|
|
2
3
|
import { CacheConsultant } from './CacheConsultant.js';
|
|
3
4
|
import { isDefaultPattern } from './ConfigurationChief.js';
|
|
4
|
-
import { _getInputsFromScripts } from './binaries/index.js';
|
|
5
5
|
import { ROOT_WORKSPACE_NAME } from './constants.js';
|
|
6
6
|
import { getFilteredScripts } from './manifest/helpers.js';
|
|
7
7
|
import { PluginEntries, Plugins } from './plugins.js';
|
|
8
|
-
import { timerify } from './util/Performance.js';
|
|
9
8
|
import { compact } from './util/array.js';
|
|
10
9
|
import { debugLogArray, debugLogObject } from './util/debug.js';
|
|
11
10
|
import { _glob, hasNoProductionSuffix, hasProductionSuffix, negate, prependDirToPattern } from './util/glob.js';
|
|
12
11
|
import { isConfig, toConfig, toDebugString, toEntry, toProductionEntry, } from './util/input.js';
|
|
13
12
|
import { getKeysByValue } from './util/object.js';
|
|
13
|
+
import { timerify } from './util/Performance.js';
|
|
14
14
|
import { basename, dirname, join } from './util/path.js';
|
|
15
15
|
import { loadConfigForPlugin } from './util/plugin.js';
|
|
16
16
|
import { ELLIPSIS } from './util/string.js';
|
package/dist/binaries/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { timerify } from '../util/Performance.js';
|
|
2
1
|
import { fromBinary, isBinary, isDependency } from '../util/input.js';
|
|
2
|
+
import { timerify } from '../util/Performance.js';
|
|
3
3
|
import { getDependenciesFromScript } from './bash-parser.js';
|
|
4
4
|
const getInputsFromScripts = (npmScripts, options) => {
|
|
5
5
|
const scripts = typeof npmScripts === 'string' ? [npmScripts] : Array.from(npmScripts);
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { main } from './index.js';
|
|
2
|
-
import {
|
|
3
|
-
import { helpText } from './util/cli-arguments.js';
|
|
4
|
-
import parseArgs from './util/cli-arguments.js';
|
|
2
|
+
import parseArgs, { helpText } from './util/cli-arguments.js';
|
|
5
3
|
import { createOptions } from './util/create-options.js';
|
|
6
|
-
import {
|
|
4
|
+
import { getKnownErrors, hasErrorCause, isConfigurationError, isKnownError } from './util/errors.js';
|
|
7
5
|
import { logError, logWarning } from './util/log.js';
|
|
6
|
+
import { perfObserver } from './util/Performance.js';
|
|
8
7
|
import { runPreprocessors, runReporters } from './util/reporter.js';
|
|
9
8
|
import { prettyMilliseconds } from './util/string.js';
|
|
10
9
|
import { version } from './version.js';
|
|
@@ -73,18 +72,19 @@ const run = async () => {
|
|
|
73
72
|
logWarning('WARNING', 'Class members are not tracked when using the --isolate-workspaces flag');
|
|
74
73
|
}
|
|
75
74
|
if ((!parsedCLIArgs['no-exit-code'] && totalErrorCount > Number(parsedCLIArgs['max-issues'] ?? 0)) ||
|
|
76
|
-
(options.isTreatConfigHintsAsErrors && configurationHints.size > 0)) {
|
|
75
|
+
(!options.isDisableConfigHints && options.isTreatConfigHintsAsErrors && configurationHints.size > 0)) {
|
|
77
76
|
process.exit(1);
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
catch (error) {
|
|
81
80
|
process.exitCode = 2;
|
|
82
81
|
if (!parsedCLIArgs.debug && error instanceof Error && isKnownError(error)) {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
const knownErrors = getKnownErrors(error);
|
|
83
|
+
for (const knownError of knownErrors)
|
|
84
|
+
logError('ERROR', knownError.message);
|
|
85
|
+
if (hasErrorCause(knownErrors[0]))
|
|
86
|
+
console.error('Reason:', knownErrors[0].cause.message);
|
|
87
|
+
if (isConfigurationError(knownErrors[0]))
|
|
88
88
|
console.log('\nRun `knip --help` or visit https://knip.dev for help');
|
|
89
89
|
process.exit(2);
|
|
90
90
|
}
|
|
@@ -4,13 +4,6 @@ import type { AsyncCompilerFn, AsyncCompilers, RawSyncCompilers, SyncCompilerFn,
|
|
|
4
4
|
export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
5
5
|
syncCompilers: Record<string, SyncCompilerFn>;
|
|
6
6
|
asyncCompilers: Record<string, AsyncCompilerFn>;
|
|
7
|
-
node?: string | boolean | string[] | {
|
|
8
|
-
config?: string | string[] | undefined;
|
|
9
|
-
entry?: string | string[] | undefined;
|
|
10
|
-
project?: string | string[] | undefined;
|
|
11
|
-
} | undefined;
|
|
12
|
-
entry?: string | string[] | undefined;
|
|
13
|
-
project?: string | string[] | undefined;
|
|
14
7
|
angular?: string | boolean | string[] | {
|
|
15
8
|
config?: string | string[] | undefined;
|
|
16
9
|
entry?: string | string[] | undefined;
|
|
@@ -266,6 +259,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
266
259
|
entry?: string | string[] | undefined;
|
|
267
260
|
project?: string | string[] | undefined;
|
|
268
261
|
} | undefined;
|
|
262
|
+
node?: string | boolean | string[] | {
|
|
263
|
+
config?: string | string[] | undefined;
|
|
264
|
+
entry?: string | string[] | undefined;
|
|
265
|
+
project?: string | string[] | undefined;
|
|
266
|
+
} | undefined;
|
|
269
267
|
'node-modules-inspector'?: string | boolean | string[] | {
|
|
270
268
|
config?: string | string[] | undefined;
|
|
271
269
|
entry?: string | string[] | undefined;
|
|
@@ -576,30 +574,7 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
576
574
|
entry?: string | string[] | undefined;
|
|
577
575
|
project?: string | string[] | undefined;
|
|
578
576
|
} | undefined;
|
|
579
|
-
exclude?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
580
|
-
$schema?: string | undefined;
|
|
581
|
-
rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
|
|
582
|
-
paths?: Record<string, string[]> | undefined;
|
|
583
|
-
ignore?: string | string[] | undefined;
|
|
584
|
-
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
585
|
-
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
586
|
-
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
587
|
-
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
588
|
-
ignoreExportsUsedInFile?: boolean | Partial<Record<"function" | "type" | "enum" | "class" | "interface" | "member", boolean>> | undefined;
|
|
589
|
-
ignoreWorkspaces?: string[] | undefined;
|
|
590
|
-
includeEntryExports?: boolean | undefined;
|
|
591
|
-
compilers?: Record<string, true | ((args_0: string, args_1: string, ...args: unknown[]) => string) | ((args_0: string, args_1: string, ...args: unknown[]) => Promise<string>)> | undefined;
|
|
592
|
-
tags?: string[] | undefined;
|
|
593
|
-
treatConfigHintsAsErrors?: boolean | undefined;
|
|
594
|
-
include?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
595
577
|
workspaces?: Record<string, {
|
|
596
|
-
node?: string | boolean | string[] | {
|
|
597
|
-
config?: string | string[] | undefined;
|
|
598
|
-
entry?: string | string[] | undefined;
|
|
599
|
-
project?: string | string[] | undefined;
|
|
600
|
-
} | undefined;
|
|
601
|
-
entry?: string | string[] | undefined;
|
|
602
|
-
project?: string | string[] | undefined;
|
|
603
578
|
angular?: string | boolean | string[] | {
|
|
604
579
|
config?: string | string[] | undefined;
|
|
605
580
|
entry?: string | string[] | undefined;
|
|
@@ -855,6 +830,11 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
855
830
|
entry?: string | string[] | undefined;
|
|
856
831
|
project?: string | string[] | undefined;
|
|
857
832
|
} | undefined;
|
|
833
|
+
node?: string | boolean | string[] | {
|
|
834
|
+
config?: string | string[] | undefined;
|
|
835
|
+
entry?: string | string[] | undefined;
|
|
836
|
+
project?: string | string[] | undefined;
|
|
837
|
+
} | undefined;
|
|
858
838
|
'node-modules-inspector'?: string | boolean | string[] | {
|
|
859
839
|
config?: string | string[] | undefined;
|
|
860
840
|
entry?: string | string[] | undefined;
|
|
@@ -1165,6 +1145,8 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
1165
1145
|
entry?: string | string[] | undefined;
|
|
1166
1146
|
project?: string | string[] | undefined;
|
|
1167
1147
|
} | undefined;
|
|
1148
|
+
entry?: string | string[] | undefined;
|
|
1149
|
+
project?: string | string[] | undefined;
|
|
1168
1150
|
paths?: Record<string, string[]> | undefined;
|
|
1169
1151
|
ignore?: string | string[] | undefined;
|
|
1170
1152
|
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
@@ -1173,6 +1155,31 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
|
|
|
1173
1155
|
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
1174
1156
|
includeEntryExports?: boolean | undefined;
|
|
1175
1157
|
}> | undefined;
|
|
1158
|
+
include?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
1159
|
+
exclude?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
1160
|
+
$schema?: string | undefined;
|
|
1161
|
+
rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
|
|
1162
|
+
entry?: string | string[] | undefined;
|
|
1163
|
+
project?: string | string[] | undefined;
|
|
1164
|
+
paths?: Record<string, string[]> | undefined;
|
|
1165
|
+
ignore?: string | string[] | undefined;
|
|
1166
|
+
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
1167
|
+
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
1168
|
+
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
1169
|
+
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
1170
|
+
ignoreExportsUsedInFile?: boolean | {
|
|
1171
|
+
class?: boolean | undefined;
|
|
1172
|
+
enum?: boolean | undefined;
|
|
1173
|
+
function?: boolean | undefined;
|
|
1174
|
+
interface?: boolean | undefined;
|
|
1175
|
+
member?: boolean | undefined;
|
|
1176
|
+
type?: boolean | undefined;
|
|
1177
|
+
} | undefined;
|
|
1178
|
+
ignoreWorkspaces?: string[] | undefined;
|
|
1179
|
+
includeEntryExports?: boolean | undefined;
|
|
1180
|
+
compilers?: Record<string, true | ((filename: string, contents: string) => string) | ((filename: string, contents: string) => Promise<string>)> | undefined;
|
|
1181
|
+
tags?: string[] | undefined;
|
|
1182
|
+
treatConfigHintsAsErrors?: boolean | undefined;
|
|
1176
1183
|
};
|
|
1177
1184
|
export declare const getIncludedCompilers: (syncCompilers: RawSyncCompilers, asyncCompilers: AsyncCompilers, dependencies: DependencySet) => [SyncCompilers, AsyncCompilers];
|
|
1178
1185
|
export declare const getCompilerExtensions: (compilers: [SyncCompilers, AsyncCompilers]) => string[];
|
package/dist/compilers/index.js
CHANGED
package/dist/graph/build.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { WorkspaceWorker } from '../WorkspaceWorker.js';
|
|
2
1
|
import { _getInputsFromScripts } from '../binaries/index.js';
|
|
3
2
|
import { getCompilerExtensions, getIncludedCompilers } from '../compilers/index.js';
|
|
4
3
|
import { DEFAULT_EXTENSIONS, FOREIGN_FILE_EXTENSIONS } from '../constants.js';
|
|
5
|
-
import { perfObserver } from '../util/Performance.js';
|
|
6
4
|
import { debugLog, debugLogArray } from '../util/debug.js';
|
|
7
5
|
import { getReferencedInputsHandler } from '../util/get-referenced-inputs.js';
|
|
8
6
|
import { _glob, _syncGlob, negate } from '../util/glob.js';
|
|
@@ -10,9 +8,11 @@ import { isAlias, isConfig, isDeferResolveEntry, isDeferResolveProductionEntry,
|
|
|
10
8
|
import { loadTSConfig } from '../util/load-tsconfig.js';
|
|
11
9
|
import { getOrCreateFileNode, updateImportMap } from '../util/module-graph.js';
|
|
12
10
|
import { getPackageNameFromModuleSpecifier, isStartsLikePackageName, sanitizeSpecifier } from '../util/modules.js';
|
|
11
|
+
import { perfObserver } from '../util/Performance.js';
|
|
13
12
|
import { getEntrySpecifiersFromManifest, getManifestImportDependencies } from '../util/package-json.js';
|
|
14
13
|
import { dirname, extname, isAbsolute, join, relative, toRelative } from '../util/path.js';
|
|
15
14
|
import { augmentWorkspace, getToSourcePathHandler, getToSourcePathsHandler } from '../util/to-source-path.js';
|
|
15
|
+
import { WorkspaceWorker } from '../WorkspaceWorker.js';
|
|
16
16
|
export async function build({ chief, collector, deputy, factory, isGitIgnored, streamer, workspaces, options, }) {
|
|
17
17
|
const configFilesMap = new Map();
|
|
18
18
|
const enabledPluginsStore = new Map();
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { formatly } from 'formatly';
|
|
|
3
3
|
import { ConfigurationChief } from './ConfigurationChief.js';
|
|
4
4
|
import { ConsoleStreamer } from './ConsoleStreamer.js';
|
|
5
5
|
import { DependencyDeputy } from './DependencyDeputy.js';
|
|
6
|
+
import { analyze } from './graph/analyze.js';
|
|
7
|
+
import { build } from './graph/build.js';
|
|
6
8
|
import { IssueCollector } from './IssueCollector.js';
|
|
7
9
|
import { IssueFixer } from './IssueFixer.js';
|
|
8
10
|
import { PrincipalFactory } from './PrincipalFactory.js';
|
|
9
|
-
import { analyze } from './graph/analyze.js';
|
|
10
|
-
import { build } from './graph/build.js';
|
|
11
11
|
import { debugLogArray, debugLogObject } from './util/debug.js';
|
|
12
12
|
import { getGitIgnoredHandler } from './util/glob-core.js';
|
|
13
13
|
import { getWatchHandler } from './util/watch.js';
|
package/dist/manifest/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { timerify } from '../util/Performance.js';
|
|
2
1
|
import { isDefinitelyTyped } from '../util/modules.js';
|
|
2
|
+
import { timerify } from '../util/Performance.js';
|
|
3
3
|
import { loadPackageManifest } from './helpers.js';
|
|
4
4
|
const getMetaDataFromPackageJson = ({ cwd, dir, packageNames }) => {
|
|
5
5
|
const hostDependencies = new Map();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toC12config } from '../../util/plugin-config.js';
|
|
2
3
|
const title = 'bumpp';
|
|
3
4
|
const enablers = ['bumpp'];
|
|
4
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
5
|
-
const entry = ['
|
|
6
|
+
const entry = ['package.json', ...toC12config('bump')];
|
|
6
7
|
export default {
|
|
7
8
|
title,
|
|
8
9
|
enablers,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toC12config } from '../../util/plugin-config.js';
|
|
2
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toC12config } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'Changelogen';
|
|
4
4
|
const enablers = ['changelogen'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toC12config } from '../../util/plugin-config.js';
|
|
2
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toC12config } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'Changelogithub';
|
|
4
4
|
const enablers = ['changelogithub'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toDependency } from '../../util/input.js';
|
|
2
|
-
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
3
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'commitlint';
|
|
5
5
|
const enablers = ['@commitlint/cli'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -8,7 +8,8 @@ export const getInputs = (config, options) => {
|
|
|
8
8
|
if (extname(configFileName) === '.json' || !/eslint\.config/.test(configFileName)) {
|
|
9
9
|
return getInputsDeprecated(config, options);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const configArray = Array.isArray(config) ? config : [config];
|
|
12
|
+
const dependencies = configArray.flatMap(config => config.settings ? getDependenciesFromSettings(config.settings) : []);
|
|
12
13
|
dependencies.push('eslint-import-resolver-typescript');
|
|
13
14
|
return compact(dependencies).map(id => toDeferResolve(id, { optional: true }));
|
|
14
15
|
};
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -857,6 +857,7 @@ export declare const Plugins: {
|
|
|
857
857
|
resolveConfig: import("../types/config.js").ResolveConfig<import("./vitest/types.js").ViteConfigOrFn | import("./vitest/types.js").VitestWorkspaceConfig>;
|
|
858
858
|
args: {
|
|
859
859
|
config: boolean;
|
|
860
|
+
resolveInputs: (parsed: import("minimist").ParsedArgs) => import("../util/input.js").Input[];
|
|
860
861
|
};
|
|
861
862
|
};
|
|
862
863
|
vue: {
|
package/dist/plugins/index.js
CHANGED
|
@@ -49,8 +49,8 @@ import { default as nanoStaged } from './nano-staged/index.js';
|
|
|
49
49
|
import { default as nest } from './nest/index.js';
|
|
50
50
|
import { default as netlify } from './netlify/index.js';
|
|
51
51
|
import { default as next } from './next/index.js';
|
|
52
|
-
import { default as nodeModulesInspector } from './node-modules-inspector/index.js';
|
|
53
52
|
import { default as node } from './node/index.js';
|
|
53
|
+
import { default as nodeModulesInspector } from './node-modules-inspector/index.js';
|
|
54
54
|
import { default as nodemon } from './nodemon/index.js';
|
|
55
55
|
import { default as npmPackageJsonLint } from './npm-package-json-lint/index.js';
|
|
56
56
|
import { default as nuxt } from './nuxt/index.js';
|
|
@@ -58,9 +58,9 @@ import { default as nx } from './nx/index.js';
|
|
|
58
58
|
import { default as nyc } from './nyc/index.js';
|
|
59
59
|
import { default as oclif } from './oclif/index.js';
|
|
60
60
|
import { default as oxlint } from './oxlint/index.js';
|
|
61
|
+
import { default as playwright } from './playwright/index.js';
|
|
61
62
|
import { default as playwrightCt } from './playwright-ct/index.js';
|
|
62
63
|
import { default as playwrightTest } from './playwright-test/index.js';
|
|
63
|
-
import { default as playwright } from './playwright/index.js';
|
|
64
64
|
import { default as plop } from './plop/index.js';
|
|
65
65
|
import { default as pnpm } from './pnpm/index.js';
|
|
66
66
|
import { default as postcss } from './postcss/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toLilconfig } from '../../util/plugin-config.js';
|
|
2
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toLilconfig } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'lint-staged';
|
|
4
4
|
const enablers = ['lint-staged'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toDeferResolve } from '../../util/input.js';
|
|
2
|
-
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
3
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'LintHTML';
|
|
5
5
|
const packageJsonPath = 'linthtmlConfig';
|
|
6
6
|
const enablers = ['@linthtml/linthtml'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
2
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'lockfile-lint';
|
|
4
4
|
const enablers = ['lockfile-lint'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -11,7 +11,8 @@ const productionEntryFilePatterns = [
|
|
|
11
11
|
'app/global-error.{js,jsx,ts,tsx}',
|
|
12
12
|
'app/**/{error,layout,loading,not-found,page,template,default}.{js,jsx,ts,tsx}',
|
|
13
13
|
'app/**/route.{js,jsx,ts,tsx}',
|
|
14
|
-
'app/{manifest,
|
|
14
|
+
'app/{manifest,robots}.{js,ts}',
|
|
15
|
+
'app/**/sitemap.{js,ts}',
|
|
15
16
|
'app/**/{icon,apple-icon}.{js,jsx,ts,tsx}',
|
|
16
17
|
'app/**/{opengraph,twitter}-image.{js,jsx,ts,tsx}',
|
|
17
18
|
'mdx-components.{js,jsx,ts,tsx}',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toUnconfig } from '../../util/plugin-config.js';
|
|
2
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toUnconfig } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'node-modules-inspector';
|
|
4
4
|
const enablers = ['node-modules-inspector'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toDependency } from '../../util/input.js';
|
|
2
|
-
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
3
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'npm-package-json-lint';
|
|
5
5
|
const enablers = ['npm-package-json-lint'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toDeferResolve, toDependency } from '../../util/input.js';
|
|
2
|
-
import { toLilconfig } from '../../util/plugin-config.js';
|
|
3
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toLilconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'PostCSS';
|
|
5
5
|
const enablers = ['postcss', 'postcss-cli', 'next'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -29,7 +29,7 @@ const resolveConfig = async (localConfig, options) => {
|
|
|
29
29
|
};
|
|
30
30
|
const routes = routeConfig
|
|
31
31
|
.flatMap(mapRoute)
|
|
32
|
-
.map(route => (isWindows ? route : route.replace(/[\^*+?()
|
|
32
|
+
.map(route => (isWindows ? route : route.replace(/[\^*+?()[\]]/g, '\\$&')));
|
|
33
33
|
const resolved = [
|
|
34
34
|
toEntry(join(appDir, 'routes.{js,ts}')),
|
|
35
35
|
toProductionEntry(join(appDir, 'root.{jsx,tsx}')),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toDeferResolve } from '../../util/input.js';
|
|
2
|
-
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
3
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'Semantic Release';
|
|
5
5
|
const enablers = ['semantic-release'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toDependency } from '../../util/input.js';
|
|
2
|
-
import { toLilconfig } from '../../util/plugin-config.js';
|
|
3
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toLilconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'size-limit';
|
|
5
5
|
const enablers = ['size-limit'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toDeferResolve } from '../../util/input.js';
|
|
2
|
-
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
3
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
4
4
|
const title = 'Stylelint';
|
|
5
5
|
const enablers = ['stylelint'];
|
|
6
6
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
2
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toCosmiconfig } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'Syncpack';
|
|
4
4
|
const enablers = ['syncpack'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toUnconfig } from '../../util/plugin-config.js';
|
|
2
1
|
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
import { toUnconfig } from '../../util/plugin-config.js';
|
|
3
3
|
const title = 'UnoCSS';
|
|
4
4
|
const enablers = ['unocss'];
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|