knip 5.64.0 → 5.64.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/CacheConsultant.js +1 -1
  2. package/dist/ConfigurationChief.d.ts +8 -8
  3. package/dist/DependencyDeputy.js +2 -2
  4. package/dist/IssueCollector.js +1 -1
  5. package/dist/ProjectPrincipal.d.ts +1 -1
  6. package/dist/ProjectPrincipal.js +2 -2
  7. package/dist/WorkspaceWorker.d.ts +1 -1
  8. package/dist/WorkspaceWorker.js +2 -2
  9. package/dist/binaries/index.js +1 -1
  10. package/dist/cli.js +9 -9
  11. package/dist/compilers/index.d.ts +37 -30
  12. package/dist/compilers/index.js +1 -1
  13. package/dist/graph/build.js +2 -2
  14. package/dist/index.js +2 -2
  15. package/dist/manifest/index.js +1 -1
  16. package/dist/plugins/changelogen/index.js +1 -1
  17. package/dist/plugins/changelogithub/index.js +1 -1
  18. package/dist/plugins/commitlint/index.js +1 -1
  19. package/dist/plugins/index.js +2 -2
  20. package/dist/plugins/lint-staged/index.js +1 -1
  21. package/dist/plugins/linthtml/index.js +1 -1
  22. package/dist/plugins/lockfile-lint/index.js +1 -1
  23. package/dist/plugins/node-modules-inspector/index.js +1 -1
  24. package/dist/plugins/npm-package-json-lint/index.js +1 -1
  25. package/dist/plugins/postcss/index.js +1 -1
  26. package/dist/plugins/react-router/index.js +1 -1
  27. package/dist/plugins/semantic-release/index.js +1 -1
  28. package/dist/plugins/size-limit/index.js +1 -1
  29. package/dist/plugins/stylelint/index.js +1 -1
  30. package/dist/plugins/syncpack/index.js +1 -1
  31. package/dist/plugins/unocss/index.js +1 -1
  32. package/dist/plugins.d.ts +1 -1
  33. package/dist/schema/configuration.d.ts +1187 -6505
  34. package/dist/schema/configuration.js +54 -51
  35. package/dist/schema/plugins.d.ts +579 -2641
  36. package/dist/schema/plugins.js +4 -4
  37. package/dist/types/config.d.ts +2 -2
  38. package/dist/typescript/get-imports-and-exports.js +1 -1
  39. package/dist/typescript/resolve-module-names.js +1 -1
  40. package/dist/util/create-options.d.ts +39 -32
  41. package/dist/util/errors.d.ts +4 -4
  42. package/dist/util/errors.js +8 -8
  43. package/dist/util/file-entry-cache.js +1 -1
  44. package/dist/util/glob-core.js +1 -1
  45. package/dist/util/glob.js +1 -1
  46. package/dist/util/input.d.ts +1 -1
  47. package/dist/util/loader.js +1 -1
  48. package/dist/version.d.ts +1 -1
  49. package/dist/version.js +1 -1
  50. package/package.json +17 -18
@@ -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 {
@@ -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,7 +1,7 @@
1
1
  import { isBuiltin } from 'node:module';
2
- import { PackagePeeker } from './PackagePeeker.js';
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;
@@ -1,6 +1,6 @@
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
5
  const hasConfigurationHint = (hints, hint) => Array.from(hints).some(item => item.identifier === hint.identifier && item.type === hint.type && item.workspaceName === hint.workspaceName);
6
6
  const isMatch = timerify(picomatch.isMatch, 'isMatch');
@@ -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 {
@@ -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 { timerify } from './util/Performance.js';
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
4
  import type { ConfigurationHints } 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';
@@ -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';
@@ -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 { perfObserver } from './util/Performance.js';
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 { getKnownError, isConfigurationError, isDisplayReason, isKnownError } from './util/errors.js';
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';
@@ -80,11 +79,12 @@ const run = async () => {
80
79
  catch (error) {
81
80
  process.exitCode = 2;
82
81
  if (!parsedCLIArgs.debug && error instanceof Error && isKnownError(error)) {
83
- const knownError = getKnownError(error);
84
- logError('ERROR', knownError.message);
85
- if (isDisplayReason(knownError))
86
- console.error('Reason:', knownError.cause.message);
87
- if (isConfigurationError(knownError))
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[];
@@ -1,5 +1,5 @@
1
- import AstroMDX from './astro-mdx.js';
2
1
  import Astro from './astro.js';
2
+ import AstroMDX from './astro-mdx.js';
3
3
  import MDX from './mdx.js';
4
4
  import Svelte from './svelte.js';
5
5
  import Vue from './vue.js';
@@ -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';
@@ -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,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);
@@ -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);
@@ -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(/[\^*+?()\[\]]/g, '\\$&')));
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);
package/dist/plugins.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { PluginName } from './types/PluginNames.js';
2
1
  import type { Args } from './types/args.js';
3
2
  import type { Entries, PluginMap } from './types/config.js';
3
+ import type { PluginName } from './types/PluginNames.js';
4
4
  declare const PMap: PluginMap;
5
5
  declare const PluginEntries: Entries;
6
6
  declare const pluginArgsMap: Map<string, [PluginName, Args]>;