knip 5.48.0 → 5.50.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/graph/build.js +56 -26
- package/dist/plugins/ava/index.js +1 -1
- package/dist/plugins/create-typescript-app/index.js +11 -0
- package/dist/plugins/cucumber/index.js +1 -1
- package/dist/plugins/cypress/index.js +1 -1
- package/dist/plugins/github-actions/index.js +1 -1
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/jest/index.js +1 -1
- package/dist/plugins/ladle/index.js +1 -1
- package/dist/plugins/mocha/index.js +2 -2
- package/dist/plugins/node/index.js +1 -1
- package/dist/plugins/preconstruct/index.js +1 -1
- package/dist/plugins/react-cosmos/index.js +1 -1
- package/dist/plugins/react-router/index.js +1 -1
- package/dist/plugins/storybook/index.js +1 -1
- package/dist/plugins/tanstack-router/index.js +1 -1
- package/dist/plugins/unbuild/index.js +1 -1
- package/dist/plugins/vitest/index.js +1 -1
- package/dist/schema/plugins.js +1 -0
- package/dist/types/PluginNames.js +1 -0
- package/dist/util/glob-core.js +1 -1
- package/dist/util/object.js +0 -16
- package/dist/util/package-json.js +28 -5
- package/dist/util/to-source-path.js +9 -12
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/schema.json +4 -0
- package/dist/CacheConsultant.d.ts +0 -14
- package/dist/ConfigurationChief.d.ts +0 -181
- package/dist/ConsoleStreamer.d.ts +0 -12
- package/dist/DependencyDeputy.d.ts +0 -78
- package/dist/IssueCollector.d.ts +0 -39
- package/dist/IssueFixer.d.ts +0 -27
- package/dist/PackageJsonPeeker.d.ts +0 -13
- package/dist/PrincipalFactory.d.ts +0 -20
- package/dist/ProjectPrincipal.d.ts +0 -58
- package/dist/WorkspaceWorker.d.ts +0 -69
- package/dist/binaries/bash-parser.d.ts +0 -3
- package/dist/binaries/fallback.d.ts +0 -2
- package/dist/binaries/index.d.ts +0 -2
- package/dist/binaries/package-manager/bun.d.ts +0 -2
- package/dist/binaries/package-manager/bunx.d.ts +0 -3
- package/dist/binaries/package-manager/index.d.ts +0 -10
- package/dist/binaries/package-manager/npm.d.ts +0 -2
- package/dist/binaries/package-manager/npx.d.ts +0 -2
- package/dist/binaries/package-manager/pnpm.d.ts +0 -2
- package/dist/binaries/package-manager/pnpx.d.ts +0 -3
- package/dist/binaries/package-manager/yarn.d.ts +0 -2
- package/dist/binaries/plugins.d.ts +0 -2
- package/dist/binaries/util.d.ts +0 -3
- package/dist/cli.d.ts +0 -1
- package/dist/compilers/astro.d.ts +0 -6
- package/dist/compilers/compilers.d.ts +0 -5
- package/dist/compilers/index.d.ts +0 -987
- package/dist/compilers/mdx.d.ts +0 -6
- package/dist/compilers/svelte.d.ts +0 -6
- package/dist/compilers/types.d.ts +0 -7
- package/dist/compilers/vue.d.ts +0 -6
- package/dist/constants.d.ts +0 -26
- package/dist/graph/analyze.d.ts +0 -30
- package/dist/graph/build.d.ts +0 -40
- package/dist/index.d.ts +0 -11
- package/dist/manifest/helpers.d.ts +0 -9
- package/dist/manifest/index.d.ts +0 -12
- package/dist/plugins/_template/index.d.ts +0 -12
- package/dist/plugins/_template/types.d.ts +0 -4
- package/dist/plugins/angular/index.d.ts +0 -10
- package/dist/plugins/angular/types.d.ts +0 -1048
- package/dist/plugins/astro/index.d.ts +0 -11
- package/dist/plugins/ava/index.d.ts +0 -12
- package/dist/plugins/ava/types.d.ts +0 -8
- package/dist/plugins/babel/helpers.d.ts +0 -14
- package/dist/plugins/babel/index.d.ts +0 -12
- package/dist/plugins/babel/types.d.ts +0 -10
- package/dist/plugins/c8/index.d.ts +0 -10
- package/dist/plugins/capacitor/index.d.ts +0 -10
- package/dist/plugins/capacitor/types.d.ts +0 -3
- package/dist/plugins/changesets/index.d.ts +0 -11
- package/dist/plugins/changesets/types.d.ts +0 -3
- package/dist/plugins/commitizen/index.d.ts +0 -12
- package/dist/plugins/commitizen/types.d.ts +0 -3
- package/dist/plugins/commitlint/index.d.ts +0 -10
- package/dist/plugins/commitlint/types.d.ts +0 -12
- package/dist/plugins/cspell/index.d.ts +0 -10
- package/dist/plugins/cspell/types.d.ts +0 -3
- package/dist/plugins/cucumber/index.d.ts +0 -12
- package/dist/plugins/cucumber/types.d.ts +0 -7
- package/dist/plugins/cypress/helpers.d.ts +0 -3
- package/dist/plugins/cypress/index.d.ts +0 -12
- package/dist/plugins/cypress/types.d.ts +0 -6
- package/dist/plugins/dependency-cruiser/index.d.ts +0 -12
- package/dist/plugins/dotenv/index.d.ts +0 -8
- package/dist/plugins/drizzle/index.d.ts +0 -10
- package/dist/plugins/drizzle/types.d.ts +0 -3
- package/dist/plugins/eleventy/helpers.d.ts +0 -138
- package/dist/plugins/eleventy/index.d.ts +0 -14
- package/dist/plugins/eleventy/types.d.ts +0 -10
- package/dist/plugins/eslint/helpers.d.ts +0 -4
- package/dist/plugins/eslint/index.d.ts +0 -15
- package/dist/plugins/eslint/types.d.ts +0 -29
- package/dist/plugins/expo/helpers.d.ts +0 -20
- package/dist/plugins/expo/index.d.ts +0 -14
- package/dist/plugins/expo/types.d.ts +0 -28
- package/dist/plugins/gatsby/index.d.ts +0 -11
- package/dist/plugins/gatsby/types.d.ts +0 -15
- package/dist/plugins/github-action/index.d.ts +0 -9
- package/dist/plugins/github-actions/index.d.ts +0 -11
- package/dist/plugins/github-actions/types.d.ts +0 -20
- package/dist/plugins/glob/index.d.ts +0 -12
- package/dist/plugins/graphql-codegen/index.d.ts +0 -11
- package/dist/plugins/graphql-codegen/types.d.ts +0 -37
- package/dist/plugins/husky/index.d.ts +0 -10
- package/dist/plugins/index.d.ts +0 -782
- package/dist/plugins/jest/helpers.d.ts +0 -4
- package/dist/plugins/jest/index.d.ts +0 -15
- package/dist/plugins/jest/types.d.ts +0 -3
- package/dist/plugins/karma/helpers.d.ts +0 -7
- package/dist/plugins/karma/index.d.ts +0 -12
- package/dist/plugins/karma/types.d.ts +0 -22
- package/dist/plugins/ladle/index.d.ts +0 -13
- package/dist/plugins/ladle/types.d.ts +0 -4
- package/dist/plugins/lefthook/index.d.ts +0 -9
- package/dist/plugins/lint-staged/index.d.ts +0 -11
- package/dist/plugins/lint-staged/types.d.ts +0 -5
- package/dist/plugins/linthtml/index.d.ts +0 -11
- package/dist/plugins/linthtml/types.d.ts +0 -4
- package/dist/plugins/lockfile-lint/index.d.ts +0 -8
- package/dist/plugins/lost-pixel/index.d.ts +0 -8
- package/dist/plugins/markdownlint/helpers.d.ts +0 -1
- package/dist/plugins/markdownlint/index.d.ts +0 -10
- package/dist/plugins/markdownlint/types.d.ts +0 -3
- package/dist/plugins/metro/index.d.ts +0 -15
- package/dist/plugins/metro/types.d.ts +0 -13
- package/dist/plugins/mocha/index.d.ts +0 -15
- package/dist/plugins/mocha/types.d.ts +0 -4
- package/dist/plugins/moonrepo/index.d.ts +0 -11
- package/dist/plugins/moonrepo/types.d.ts +0 -7
- package/dist/plugins/msw/index.d.ts +0 -11
- package/dist/plugins/msw/types.d.ts +0 -3
- package/dist/plugins/nest/index.d.ts +0 -10
- package/dist/plugins/nest/types.d.ts +0 -3
- package/dist/plugins/netlify/helpers.d.ts +0 -2
- package/dist/plugins/netlify/index.d.ts +0 -12
- package/dist/plugins/netlify/types.d.ts +0 -11
- package/dist/plugins/next/index.d.ts +0 -10
- package/dist/plugins/next/resolveFromAST.d.ts +0 -2
- package/dist/plugins/node/index.d.ts +0 -16
- package/dist/plugins/nodemon/index.d.ts +0 -10
- package/dist/plugins/npm-package-json-lint/index.d.ts +0 -11
- package/dist/plugins/npm-package-json-lint/types.d.ts +0 -3
- package/dist/plugins/nuxt/index.d.ts +0 -14
- package/dist/plugins/nuxt/types.d.ts +0 -8
- package/dist/plugins/nx/index.d.ts +0 -14
- package/dist/plugins/nx/types.d.ts +0 -19
- package/dist/plugins/nyc/index.d.ts +0 -10
- package/dist/plugins/nyc/types.d.ts +0 -4
- package/dist/plugins/oclif/index.d.ts +0 -10
- package/dist/plugins/oclif/types.d.ts +0 -4
- package/dist/plugins/playwright/index.d.ts +0 -21
- package/dist/plugins/playwright/types.d.ts +0 -36
- package/dist/plugins/playwright-ct/index.d.ts +0 -11
- package/dist/plugins/playwright-test/index.d.ts +0 -13
- package/dist/plugins/plop/index.d.ts +0 -8
- package/dist/plugins/postcss/index.d.ts +0 -10
- package/dist/plugins/postcss/types.d.ts +0 -3
- package/dist/plugins/preconstruct/index.d.ts +0 -10
- package/dist/plugins/preconstruct/types.d.ts +0 -3
- package/dist/plugins/prettier/index.d.ts +0 -10
- package/dist/plugins/prettier/types.d.ts +0 -8
- package/dist/plugins/react-cosmos/index.d.ts +0 -12
- package/dist/plugins/react-cosmos/types.d.ts +0 -5
- package/dist/plugins/react-router/index.d.ts +0 -10
- package/dist/plugins/react-router/types.d.ts +0 -7
- package/dist/plugins/release-it/index.d.ts +0 -10
- package/dist/plugins/release-it/types.d.ts +0 -10
- package/dist/plugins/remark/index.d.ts +0 -11
- package/dist/plugins/remark/types.d.ts +0 -3
- package/dist/plugins/remix/index.d.ts +0 -9
- package/dist/plugins/rollup/index.d.ts +0 -10
- package/dist/plugins/rsbuild/index.d.ts +0 -10
- package/dist/plugins/rsbuild/types.d.ts +0 -3
- package/dist/plugins/rspack/index.d.ts +0 -10
- package/dist/plugins/semantic-release/index.d.ts +0 -12
- package/dist/plugins/semantic-release/types.d.ts +0 -3
- package/dist/plugins/sentry/index.d.ts +0 -8
- package/dist/plugins/simple-git-hooks/index.d.ts +0 -10
- package/dist/plugins/simple-git-hooks/types.d.ts +0 -3
- package/dist/plugins/size-limit/index.d.ts +0 -8
- package/dist/plugins/sst/index.d.ts +0 -9
- package/dist/plugins/sst/resolveFromAST.d.ts +0 -2
- package/dist/plugins/starlight/index.d.ts +0 -9
- package/dist/plugins/starlight/resolveFromAST.d.ts +0 -2
- package/dist/plugins/storybook/index.d.ts +0 -13
- package/dist/plugins/storybook/types.d.ts +0 -20
- package/dist/plugins/stryker/index.d.ts +0 -10
- package/dist/plugins/stryker/types.d.ts +0 -5
- package/dist/plugins/stylelint/index.d.ts +0 -10
- package/dist/plugins/stylelint/types.d.ts +0 -8
- package/dist/plugins/svelte/index.d.ts +0 -9
- package/dist/plugins/syncpack/index.d.ts +0 -8
- package/dist/plugins/tailwind/index.d.ts +0 -8
- package/dist/plugins/tanstack-router/index.d.ts +0 -12
- package/dist/plugins/tanstack-router/resolveFromAST.d.ts +0 -2
- package/dist/plugins/tanstack-router/types.d.ts +0 -7
- package/dist/plugins/travis/index.d.ts +0 -10
- package/dist/plugins/ts-node/index.d.ts +0 -15
- package/dist/plugins/tsup/index.d.ts +0 -13
- package/dist/plugins/tsup/types.d.ts +0 -7
- package/dist/plugins/tsx/index.d.ts +0 -9
- package/dist/plugins/typedoc/index.d.ts +0 -16
- package/dist/plugins/typedoc/types.d.ts +0 -4
- package/dist/plugins/typescript/index.d.ts +0 -21
- package/dist/plugins/unbuild/index.d.ts +0 -10
- package/dist/plugins/unbuild/types.d.ts +0 -13
- package/dist/plugins/unocss/index.d.ts +0 -8
- package/dist/plugins/vercel-og/index.d.ts +0 -8
- package/dist/plugins/vike/index.d.ts +0 -8
- package/dist/plugins/vite/index.d.ts +0 -11
- package/dist/plugins/vitest/helpers.d.ts +0 -3
- package/dist/plugins/vitest/index.d.ts +0 -17
- package/dist/plugins/vitest/types.d.ts +0 -39
- package/dist/plugins/vue/index.d.ts +0 -10
- package/dist/plugins/vue/types.d.ts +0 -5
- package/dist/plugins/webdriver-io/index.d.ts +0 -10
- package/dist/plugins/webdriver-io/types.d.ts +0 -3
- package/dist/plugins/webpack/index.d.ts +0 -19
- package/dist/plugins/webpack/types.d.ts +0 -12
- package/dist/plugins/wireit/index.d.ts +0 -10
- package/dist/plugins/wireit/types.d.ts +0 -3
- package/dist/plugins/wrangler/index.d.ts +0 -10
- package/dist/plugins/wrangler/types.d.ts +0 -3
- package/dist/plugins/xo/index.d.ts +0 -11
- package/dist/plugins/xo/types.d.ts +0 -12
- package/dist/plugins/yarn/index.d.ts +0 -9
- package/dist/plugins/yorkie/index.d.ts +0 -11
- package/dist/plugins.d.ts +0 -7
- package/dist/reporters/codeclimate.d.ts +0 -3
- package/dist/reporters/codeowners.d.ts +0 -3
- package/dist/reporters/compact.d.ts +0 -3
- package/dist/reporters/disclosure.d.ts +0 -3
- package/dist/reporters/index.d.ts +0 -10
- package/dist/reporters/json.d.ts +0 -3
- package/dist/reporters/markdown.d.ts +0 -3
- package/dist/reporters/symbols.d.ts +0 -3
- package/dist/reporters/util.d.ts +0 -22
- package/dist/reporters/watch.d.ts +0 -12
- package/dist/schema/configuration.d.ts +0 -5439
- package/dist/schema/plugins.d.ts +0 -2204
- package/dist/types/PluginNames.d.ts +0 -2
- package/dist/types/args.d.ts +0 -14
- package/dist/types/cli.d.ts +0 -27
- package/dist/types/config.d.ts +0 -119
- package/dist/types/exports.d.ts +0 -24
- package/dist/types/imports.d.ts +0 -12
- package/dist/types/issues.d.ts +0 -88
- package/dist/types/module-graph.d.ts +0 -67
- package/dist/types/package-json.d.ts +0 -53
- package/dist/types/project.d.ts +0 -18
- package/dist/types/workspace.d.ts +0 -27
- package/dist/typescript/SourceFile.d.ts +0 -35
- package/dist/typescript/SourceFileManager.d.ts +0 -19
- package/dist/typescript/ast-helpers.d.ts +0 -38
- package/dist/typescript/create-hosts.d.ts +0 -21
- package/dist/typescript/find-internal-references.d.ts +0 -4
- package/dist/typescript/get-imports-and-exports.d.ts +0 -18
- package/dist/typescript/resolve-module-names.d.ts +0 -4
- package/dist/typescript/visitors/dynamic-imports/importCall.d.ts +0 -3
- package/dist/typescript/visitors/dynamic-imports/importType.d.ts +0 -3
- package/dist/typescript/visitors/dynamic-imports/index.d.ts +0 -3
- package/dist/typescript/visitors/dynamic-imports/jsDocType.d.ts +0 -4
- package/dist/typescript/visitors/dynamic-imports/requireCall.d.ts +0 -3
- package/dist/typescript/visitors/dynamic-imports/resolveCall.d.ts +0 -3
- package/dist/typescript/visitors/exports/exportAssignment.d.ts +0 -3
- package/dist/typescript/visitors/exports/exportDeclaration.d.ts +0 -3
- package/dist/typescript/visitors/exports/exportKeyword.d.ts +0 -3
- package/dist/typescript/visitors/exports/exportsAccessExpression.d.ts +0 -3
- package/dist/typescript/visitors/exports/index.d.ts +0 -3
- package/dist/typescript/visitors/exports/moduleExportsAccessExpression.d.ts +0 -3
- package/dist/typescript/visitors/helpers.d.ts +0 -8
- package/dist/typescript/visitors/imports/importDeclaration.d.ts +0 -3
- package/dist/typescript/visitors/imports/importEqualsDeclaration.d.ts +0 -3
- package/dist/typescript/visitors/imports/index.d.ts +0 -3
- package/dist/typescript/visitors/imports/reExportDeclaration.d.ts +0 -3
- package/dist/typescript/visitors/index.d.ts +0 -12
- package/dist/typescript/visitors/scripts/bun.d.ts +0 -3
- package/dist/typescript/visitors/scripts/execa.d.ts +0 -3
- package/dist/typescript/visitors/scripts/index.d.ts +0 -3
- package/dist/typescript/visitors/scripts/zx.d.ts +0 -3
- package/dist/util/Performance.d.ts +0 -26
- package/dist/util/array.d.ts +0 -5
- package/dist/util/cli-arguments.d.ts +0 -44
- package/dist/util/codeowners.d.ts +0 -2
- package/dist/util/create-workspace-graph.d.ts +0 -3
- package/dist/util/debug.d.ts +0 -4
- package/dist/util/empty.d.ts +0 -1
- package/dist/util/errors.d.ts +0 -13
- package/dist/util/file-entry-cache.d.ts +0 -29
- package/dist/util/fs.d.ts +0 -9
- package/dist/util/get-included-issue-types.d.ts +0 -18
- package/dist/util/get-referenced-inputs.d.ts +0 -5
- package/dist/util/git.d.ts +0 -1
- package/dist/util/glob-core.d.ts +0 -28
- package/dist/util/glob.d.ts +0 -16
- package/dist/util/graph-sequencer.d.ts +0 -9
- package/dist/util/has-strictly-ns-references.d.ts +0 -4
- package/dist/util/input.d.ts +0 -42
- package/dist/util/is-identifier-referenced.d.ts +0 -9
- package/dist/util/issue-initializers.d.ts +0 -4
- package/dist/util/jiti.d.ts +0 -1
- package/dist/util/loader.d.ts +0 -1
- package/dist/util/log.d.ts +0 -2
- package/dist/util/map-workspaces.d.ts +0 -5
- package/dist/util/math.d.ts +0 -6
- package/dist/util/module-graph.d.ts +0 -6
- package/dist/util/modules.d.ts +0 -10
- package/dist/util/object.d.ts +0 -5
- package/dist/util/package-json.d.ts +0 -16
- package/dist/util/package-name.d.ts +0 -2
- package/dist/util/path.d.ts +0 -13
- package/dist/util/plugin-config.d.ts +0 -24
- package/dist/util/plugin.d.ts +0 -9
- package/dist/util/regex.d.ts +0 -3
- package/dist/util/remove-export.d.ts +0 -8
- package/dist/util/reporter.d.ts +0 -3
- package/dist/util/require.d.ts +0 -1
- package/dist/util/resolve.d.ts +0 -2
- package/dist/util/string.d.ts +0 -1
- package/dist/util/tag.d.ts +0 -5
- package/dist/util/to-source-path.d.ts +0 -5
- package/dist/util/trace.d.ts +0 -20
- package/dist/util/tsconfig-loader.d.ts +0 -6
- package/dist/util/unwrap-function.d.ts +0 -1
- package/dist/util/watch.d.ts +0 -25
- package/dist/util/workspace.d.ts +0 -1
- package/dist/version.d.ts +0 -1
package/dist/graph/build.js
CHANGED
|
@@ -69,9 +69,10 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
|
|
|
69
69
|
const ignore = worker.getIgnorePatterns();
|
|
70
70
|
const sharedGlobOptions = { cwd, dir, gitignore };
|
|
71
71
|
collector.addIgnorePatterns(ignore.map(pattern => join(cwd, pattern)));
|
|
72
|
-
const entryPathsFromManifest = await getEntryPathsFromManifest(manifest, {
|
|
73
|
-
for (const
|
|
74
|
-
inputs.add(
|
|
72
|
+
const entryPathsFromManifest = await getEntryPathsFromManifest(manifest, { cwd: dir, ignore });
|
|
73
|
+
for (const filePath of entryPathsFromManifest) {
|
|
74
|
+
inputs.add(toProductionEntry(toSourceFilePath(filePath) ?? filePath));
|
|
75
|
+
}
|
|
75
76
|
const principal = factory.createPrincipal({
|
|
76
77
|
cwd: dir,
|
|
77
78
|
paths: config.paths,
|
|
@@ -88,18 +89,32 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
|
|
|
88
89
|
});
|
|
89
90
|
const inputsFromPlugins = await worker.runPlugins();
|
|
90
91
|
for (const id of inputsFromPlugins)
|
|
91
|
-
inputs.add(id);
|
|
92
|
+
inputs.add(Object.assign(id, { skipExportsAnalysis: true }));
|
|
92
93
|
enabledPluginsStore.set(name, worker.enabledPlugins);
|
|
93
|
-
const
|
|
94
|
-
const
|
|
94
|
+
const entryPatterns = new Set();
|
|
95
|
+
const entryPatternsSkipExports = new Set();
|
|
96
|
+
const productionPatterns = new Set();
|
|
97
|
+
const productionPatternsSkipExports = new Set();
|
|
95
98
|
const projectFilePatterns = new Set();
|
|
96
99
|
for (const input of inputs) {
|
|
97
100
|
const specifier = input.specifier;
|
|
98
101
|
if (isEntry(input)) {
|
|
99
|
-
|
|
102
|
+
const relativePath = isAbsolute(specifier) ? relative(dir, specifier) : specifier;
|
|
103
|
+
if (!input.skipExportsAnalysis) {
|
|
104
|
+
entryPatterns.add(relativePath);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
entryPatternsSkipExports.add(relativePath);
|
|
108
|
+
}
|
|
100
109
|
}
|
|
101
110
|
else if (isProductionEntry(input)) {
|
|
102
|
-
|
|
111
|
+
const relativePath = isAbsolute(specifier) ? relative(dir, specifier) : specifier;
|
|
112
|
+
if (!input.skipExportsAnalysis) {
|
|
113
|
+
productionPatterns.add(relativePath);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
productionPatternsSkipExports.add(relativePath);
|
|
117
|
+
}
|
|
103
118
|
}
|
|
104
119
|
else if (isProject(input)) {
|
|
105
120
|
projectFilePatterns.add(isAbsolute(specifier) ? relative(dir, specifier) : specifier);
|
|
@@ -109,11 +124,11 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
|
|
|
109
124
|
const resolvedFilePath = getReferencedInternalFilePath(input, ws);
|
|
110
125
|
if (resolvedFilePath) {
|
|
111
126
|
if (isDeferResolveProductionEntry(input)) {
|
|
112
|
-
|
|
127
|
+
productionPatternsSkipExports.add(resolvedFilePath);
|
|
113
128
|
}
|
|
114
129
|
else if (isDeferResolveEntry(input)) {
|
|
115
130
|
if (!isProduction || !input.optional)
|
|
116
|
-
|
|
131
|
+
entryPatternsSkipExports.add(resolvedFilePath);
|
|
117
132
|
}
|
|
118
133
|
else {
|
|
119
134
|
principal.addEntryPath(resolvedFilePath, { skipExportsAnalysis: true });
|
|
@@ -122,21 +137,27 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
|
|
|
122
137
|
}
|
|
123
138
|
}
|
|
124
139
|
if (isProduction) {
|
|
125
|
-
const negatedEntryPatterns =
|
|
140
|
+
const negatedEntryPatterns = [...entryPatterns, ...entryPatternsSkipExports].map(negate);
|
|
126
141
|
{
|
|
127
|
-
const label = 'entry';
|
|
142
|
+
const label = 'entry paths';
|
|
128
143
|
const patterns = worker.getProductionEntryFilePatterns(negatedEntryPatterns);
|
|
129
144
|
const workspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns, gitignore: false, label });
|
|
130
145
|
principal.addEntryPaths(workspaceEntryPaths);
|
|
131
146
|
}
|
|
132
147
|
{
|
|
133
|
-
const label = 'production
|
|
134
|
-
const patterns = Array.from(
|
|
148
|
+
const label = 'production entry paths from plugins (skip exports analysis)';
|
|
149
|
+
const patterns = Array.from(productionPatternsSkipExports);
|
|
135
150
|
const pluginWorkspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
136
151
|
principal.addEntryPaths(pluginWorkspaceEntryPaths, { skipExportsAnalysis: true });
|
|
137
152
|
}
|
|
138
153
|
{
|
|
139
|
-
const label = '
|
|
154
|
+
const label = 'production entry paths from plugins';
|
|
155
|
+
const patterns = Array.from(productionPatterns);
|
|
156
|
+
const pluginWorkspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
157
|
+
principal.addEntryPaths(pluginWorkspaceEntryPaths);
|
|
158
|
+
}
|
|
159
|
+
{
|
|
160
|
+
const label = 'project paths';
|
|
140
161
|
const patterns = worker.getProductionProjectFilePatterns(negatedEntryPatterns);
|
|
141
162
|
const workspaceProjectPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
142
163
|
for (const projectPath of workspaceProjectPaths)
|
|
@@ -145,33 +166,42 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
|
|
|
145
166
|
}
|
|
146
167
|
else {
|
|
147
168
|
{
|
|
148
|
-
const label = 'entry';
|
|
169
|
+
const label = 'entry paths';
|
|
149
170
|
const patterns = worker.getEntryFilePatterns();
|
|
150
171
|
const workspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns, gitignore: false, label });
|
|
151
172
|
principal.addEntryPaths(workspaceEntryPaths);
|
|
152
173
|
}
|
|
153
174
|
{
|
|
154
|
-
const label = '
|
|
155
|
-
const patterns = worker.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
175
|
+
const label = 'entry paths from plugins (skip exports analysis)';
|
|
176
|
+
const patterns = worker.getPluginEntryFilePatterns([
|
|
177
|
+
...entryPatternsSkipExports,
|
|
178
|
+
...productionPatternsSkipExports,
|
|
179
|
+
]);
|
|
180
|
+
const pluginWorkspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
181
|
+
principal.addEntryPaths(pluginWorkspaceEntryPaths, { skipExportsAnalysis: true });
|
|
159
182
|
}
|
|
160
183
|
{
|
|
161
|
-
const label = '
|
|
162
|
-
const patterns = worker.getPluginEntryFilePatterns([...
|
|
184
|
+
const label = 'entry paths from plugins';
|
|
185
|
+
const patterns = worker.getPluginEntryFilePatterns([...entryPatterns, ...productionPatterns]);
|
|
163
186
|
const pluginWorkspaceEntryPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
164
|
-
principal.addEntryPaths(pluginWorkspaceEntryPaths
|
|
187
|
+
principal.addEntryPaths(pluginWorkspaceEntryPaths);
|
|
188
|
+
}
|
|
189
|
+
{
|
|
190
|
+
const label = 'project paths';
|
|
191
|
+
const patterns = worker.getProjectFilePatterns([...productionPatternsSkipExports, ...projectFilePatterns]);
|
|
192
|
+
const workspaceProjectPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
193
|
+
for (const projectPath of workspaceProjectPaths)
|
|
194
|
+
principal.addProjectPath(projectPath);
|
|
165
195
|
}
|
|
166
196
|
{
|
|
167
|
-
const label = '
|
|
197
|
+
const label = 'project paths from plugins';
|
|
168
198
|
const patterns = worker.getPluginProjectFilePatterns();
|
|
169
199
|
const pluginWorkspaceProjectPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
170
200
|
for (const projectPath of pluginWorkspaceProjectPaths)
|
|
171
201
|
principal.addProjectPath(projectPath);
|
|
172
202
|
}
|
|
173
203
|
{
|
|
174
|
-
const label = 'plugin configuration';
|
|
204
|
+
const label = 'plugin configuration paths (skip exports analysis)';
|
|
175
205
|
const patterns = worker.getPluginConfigPatterns();
|
|
176
206
|
const configurationEntryPaths = await _glob({ ...sharedGlobOptions, patterns, label });
|
|
177
207
|
principal.addEntryPaths(configurationEntryPaths, { skipExportsAnalysis: true });
|
|
@@ -19,7 +19,7 @@ const entry = [
|
|
|
19
19
|
const resolveEntryPaths = localConfig => {
|
|
20
20
|
if (typeof localConfig === 'function')
|
|
21
21
|
localConfig = localConfig();
|
|
22
|
-
return (localConfig?.files ?? entry).map(toEntry);
|
|
22
|
+
return (localConfig?.files ?? entry).map(id => toEntry(id));
|
|
23
23
|
};
|
|
24
24
|
const resolveConfig = async (localConfig, options) => {
|
|
25
25
|
if (typeof localConfig === 'function')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { hasDependency } from '../../util/plugin.js';
|
|
2
|
+
const title = 'create-typescript-app';
|
|
3
|
+
const enablers = ['create-typescript-app'];
|
|
4
|
+
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
5
|
+
const entry = ['create-typescript-app.config.{js,cjs,mjs,ts}'];
|
|
6
|
+
export default {
|
|
7
|
+
enablers,
|
|
8
|
+
entry,
|
|
9
|
+
isEnabled,
|
|
10
|
+
title,
|
|
11
|
+
};
|
|
@@ -6,7 +6,7 @@ const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
|
6
6
|
const config = ['cucumber.{json,yaml,yml,js,cjs,mjs}'];
|
|
7
7
|
const entry = ['features/**/*.@(js|cjs|mjs)'];
|
|
8
8
|
const resolveEntryPaths = config => {
|
|
9
|
-
return (config?.import ? config.import : []).map(toEntry);
|
|
9
|
+
return (config?.import ? config.import : []).map(id => toEntry(id));
|
|
10
10
|
};
|
|
11
11
|
const resolveConfig = config => {
|
|
12
12
|
const formatters = config?.format ? config.format : [];
|
|
@@ -19,7 +19,7 @@ const resolveEntryPaths = async (localConfig) => {
|
|
|
19
19
|
return [
|
|
20
20
|
...(specPatterns.length > 0 ? specPatterns : TEST_FILE_PATTERNS),
|
|
21
21
|
...(supportFiles.length > 0 ? supportFiles : SUPPORT_FILE_PATTERNS),
|
|
22
|
-
].map(toEntry);
|
|
22
|
+
].map(id => toEntry(id));
|
|
23
23
|
};
|
|
24
24
|
const resolveConfig = async (config, options) => {
|
|
25
25
|
const inputs = await resolveDependencies(config, options);
|
|
@@ -41,7 +41,7 @@ const resolveConfig = async (config, options) => {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
return [...inputs, ...getActionDependencies(config, options).map(toEntry)];
|
|
44
|
+
return [...inputs, ...getActionDependencies(config, options).map(id => toEntry(id))];
|
|
45
45
|
};
|
|
46
46
|
export default {
|
|
47
47
|
title,
|
package/dist/plugins/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { default as capacitor } from './capacitor/index.js';
|
|
|
7
7
|
import { default as changesets } from './changesets/index.js';
|
|
8
8
|
import { default as commitizen } from './commitizen/index.js';
|
|
9
9
|
import { default as commitlint } from './commitlint/index.js';
|
|
10
|
+
import { default as createTypescriptApp } from './create-typescript-app/index.js';
|
|
10
11
|
import { default as cspell } from './cspell/index.js';
|
|
11
12
|
import { default as cucumber } from './cucumber/index.js';
|
|
12
13
|
import { default as cypress } from './cypress/index.js';
|
|
@@ -103,6 +104,7 @@ export const Plugins = {
|
|
|
103
104
|
changesets,
|
|
104
105
|
commitizen,
|
|
105
106
|
commitlint,
|
|
107
|
+
'create-typescript-app': createTypescriptApp,
|
|
106
108
|
cspell,
|
|
107
109
|
cucumber,
|
|
108
110
|
cypress,
|
|
@@ -81,7 +81,7 @@ const resolveEntryPaths = async (localConfig, options) => {
|
|
|
81
81
|
const rootDir = localConfig.rootDir ?? configFileDir;
|
|
82
82
|
const replaceRootDir = (name) => name.replace(/<rootDir>/, rootDir);
|
|
83
83
|
if (localConfig.testMatch)
|
|
84
|
-
return localConfig.testMatch.map(replaceRootDir).map(toEntry);
|
|
84
|
+
return localConfig.testMatch.map(replaceRootDir).map(id => toEntry(id));
|
|
85
85
|
return entry.map(id => toEntry(id));
|
|
86
86
|
};
|
|
87
87
|
const resolveConfig = async (localConfig, options) => {
|
|
@@ -14,7 +14,7 @@ const resolveEntryPaths = (localConfig, options) => {
|
|
|
14
14
|
const localStories = typeof localConfig.stories === 'string' ? [localConfig.stories] : localConfig.stories;
|
|
15
15
|
const viteConfig = localConfig.viteConfig ? [toAbsolute(localConfig.viteConfig, options.cwd)] : [];
|
|
16
16
|
const patterns = [...restEntry, ...(localStories ?? stories), ...viteConfig];
|
|
17
|
-
return patterns.map(toEntry);
|
|
17
|
+
return patterns.map(id => toEntry(id));
|
|
18
18
|
};
|
|
19
19
|
const resolveConfig = async (localConfig, options) => {
|
|
20
20
|
if (localConfig.viteConfig) {
|
|
@@ -7,11 +7,11 @@ const config = ['.mocharc.{js,cjs,json,jsonc,yml,yaml}', 'package.json'];
|
|
|
7
7
|
const entry = ['**/test/*.{js,cjs,mjs}'];
|
|
8
8
|
const resolveEntryPaths = localConfig => {
|
|
9
9
|
const entryPatterns = localConfig.spec ? [localConfig.spec].flat() : [];
|
|
10
|
-
return [...entryPatterns].map(toEntry);
|
|
10
|
+
return [...entryPatterns].map(id => toEntry(id));
|
|
11
11
|
};
|
|
12
12
|
const resolveConfig = localConfig => {
|
|
13
13
|
const require = localConfig.require ? [localConfig.require].flat() : [];
|
|
14
|
-
return [...require].map(toEntry);
|
|
14
|
+
return [...require].map(id => toEntry(id));
|
|
15
15
|
};
|
|
16
16
|
const args = {
|
|
17
17
|
nodeImportArgs: true,
|
|
@@ -8,7 +8,7 @@ const resolveEntryPaths = localConfig => {
|
|
|
8
8
|
const entries = [toProductionEntry('server.js')];
|
|
9
9
|
if (scripts && Object.keys(scripts).some(script => /(?<=^|\s)node\s(.*)--test/.test(scripts[script]))) {
|
|
10
10
|
const patterns = ['**/*{.,-,_}test.?(c|m)js', '**/test-*.?(c|m)js', '**/test.?(c|m)js', '**/test/**/*.?(c|m)js'];
|
|
11
|
-
entries.push(...patterns.map(toEntry));
|
|
11
|
+
entries.push(...patterns.map(id => toEntry(id)));
|
|
12
12
|
}
|
|
13
13
|
return entries;
|
|
14
14
|
};
|
|
@@ -5,7 +5,7 @@ const enablers = ['@preconstruct/cli'];
|
|
|
5
5
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
6
6
|
const config = ['package.json'];
|
|
7
7
|
const resolveEntryPaths = async (config) => {
|
|
8
|
-
return (config.entrypoints ?? []).map(toEntry);
|
|
8
|
+
return (config.entrypoints ?? []).map(id => toEntry(id));
|
|
9
9
|
};
|
|
10
10
|
export default {
|
|
11
11
|
title,
|
|
@@ -16,7 +16,7 @@ const resolveEntryPaths = async (localConfig) => {
|
|
|
16
16
|
join(fixturesDir ?? '', `**/*.${fixtureFileSuffix ?? 'fixture'}.${ext}`),
|
|
17
17
|
join(fixturesDir ?? '', `**/${fixtureFileSuffix ?? 'fixture'}.${ext}`),
|
|
18
18
|
];
|
|
19
|
-
return [...entries, ...decoratorEntry].map(toEntry);
|
|
19
|
+
return [...entries, ...decoratorEntry].map(id => toEntry(id));
|
|
20
20
|
};
|
|
21
21
|
const resolveConfig = async (localConfig) => {
|
|
22
22
|
return (localConfig?.plugins ?? []).map(toDeferResolve);
|
|
@@ -21,7 +21,7 @@ const resolveEntryPaths = async (localConfig, options) => {
|
|
|
21
21
|
...(options.config.entry ?? restEntry),
|
|
22
22
|
...(relativePatterns && relativePatterns.length > 0 ? relativePatterns : stories),
|
|
23
23
|
];
|
|
24
|
-
return patterns.map(toEntry);
|
|
24
|
+
return patterns.map(id => toEntry(id));
|
|
25
25
|
};
|
|
26
26
|
const resolveConfig = async (localConfig) => {
|
|
27
27
|
const addons = localConfig.addons?.map(addon => (typeof addon === 'string' ? addon : addon.name)) ?? [];
|
|
@@ -2,7 +2,7 @@ import { toEntry } from '../../util/input.js';
|
|
|
2
2
|
import { extname, join } from '../../util/path.js';
|
|
3
3
|
import { hasDependency } from '../../util/plugin.js';
|
|
4
4
|
import { getCustomConfig } from './resolveFromAST.js';
|
|
5
|
-
const title = '
|
|
5
|
+
const title = 'TanStack Router';
|
|
6
6
|
const enablers = ['@tanstack/react-router', '@tanstack/router-plugin', '@tanstack/router-cli'];
|
|
7
7
|
const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
|
|
8
8
|
const config = [
|
|
@@ -84,7 +84,7 @@ export const resolveConfig = async (localConfig, options) => {
|
|
|
84
84
|
const dir = join(options.configFileDir, cfg.test?.root ?? '.');
|
|
85
85
|
const deps = (typeof entry === 'string' ? [entry] : Object.values(entry))
|
|
86
86
|
.map(specifier => join(dir, specifier))
|
|
87
|
-
.map(toEntry);
|
|
87
|
+
.map(id => toEntry(id));
|
|
88
88
|
for (const dependency of deps)
|
|
89
89
|
inputs.add(dependency);
|
|
90
90
|
}
|
package/dist/schema/plugins.js
CHANGED
package/dist/util/glob-core.js
CHANGED
|
@@ -187,7 +187,7 @@ export async function glob(patterns, options) {
|
|
|
187
187
|
const ignore = cachedIgnores || compact(_ignore);
|
|
188
188
|
const { dir, label, ...fgOptions } = { ...options, ignore };
|
|
189
189
|
const paths = await fg.glob(patterns, fgOptions);
|
|
190
|
-
debugLogObject(relative(options.cwd, dir) || ROOT_WORKSPACE_NAME, label ? `Finding ${label}
|
|
190
|
+
debugLogObject(relative(options.cwd, dir) || ROOT_WORKSPACE_NAME, label ? `Finding ${label}` : 'Finding paths', () => ({ patterns, ...fgOptions, ignore: cachedIgnores ? `// identical to ${dir}` : ignore, paths }));
|
|
191
191
|
if (willCache)
|
|
192
192
|
cachedGlobIgnores.set(options.dir, ignore);
|
|
193
193
|
return paths;
|
package/dist/util/object.js
CHANGED
|
@@ -32,22 +32,6 @@ export const findByKeyDeep = (obj, key) => {
|
|
|
32
32
|
}
|
|
33
33
|
return objects;
|
|
34
34
|
};
|
|
35
|
-
export const getStringValues = (obj) => {
|
|
36
|
-
if (typeof obj === 'string')
|
|
37
|
-
return [obj];
|
|
38
|
-
let values = [];
|
|
39
|
-
for (const prop in obj) {
|
|
40
|
-
if (obj[prop]) {
|
|
41
|
-
if (typeof obj[prop] === 'string') {
|
|
42
|
-
values.push(obj[prop]);
|
|
43
|
-
}
|
|
44
|
-
else if (typeof obj[prop] === 'object') {
|
|
45
|
-
values = values.concat(getStringValues(obj[prop]));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return values;
|
|
50
|
-
};
|
|
51
35
|
export const getKeysByValue = (obj, value) => {
|
|
52
36
|
const keys = [];
|
|
53
37
|
for (const key in obj) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { _glob } from './glob.js';
|
|
3
|
-
import { getStringValues } from './object.js';
|
|
4
3
|
const INDENT = Symbol.for('indent');
|
|
5
4
|
const NEWLINE = Symbol.for('newline');
|
|
6
5
|
const DEFAULT_NEWLINE = '\n';
|
|
@@ -19,6 +18,23 @@ const parseJson = (raw) => {
|
|
|
19
18
|
}
|
|
20
19
|
return result;
|
|
21
20
|
};
|
|
21
|
+
const getEntriesFromExports = (obj) => {
|
|
22
|
+
if (typeof obj === 'string')
|
|
23
|
+
return [obj];
|
|
24
|
+
let values = [];
|
|
25
|
+
for (const prop in obj) {
|
|
26
|
+
if (typeof obj[prop] === 'string') {
|
|
27
|
+
values.push(obj[prop]);
|
|
28
|
+
}
|
|
29
|
+
else if (obj[prop] === null) {
|
|
30
|
+
values.push(`!${prop}`);
|
|
31
|
+
}
|
|
32
|
+
else if (typeof obj[prop] === 'object') {
|
|
33
|
+
values = values.concat(getEntriesFromExports(obj[prop]));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return values;
|
|
37
|
+
};
|
|
22
38
|
export const load = async (filePath) => {
|
|
23
39
|
const file = await readFile(filePath, 'utf8');
|
|
24
40
|
return parseJson(file);
|
|
@@ -30,7 +46,7 @@ export const save = async (filePath, content) => {
|
|
|
30
46
|
const fileContent = `${JSON.stringify(content, null, space)}\n`.replace(/\n/g, EOL);
|
|
31
47
|
await writeFile(filePath, fileContent);
|
|
32
48
|
};
|
|
33
|
-
export const getEntryPathsFromManifest = (manifest,
|
|
49
|
+
export const getEntryPathsFromManifest = (manifest, options) => {
|
|
34
50
|
const { main, module, browser, bin, exports, types, typings } = manifest;
|
|
35
51
|
const entryPaths = new Set();
|
|
36
52
|
if (typeof main === 'string')
|
|
@@ -47,12 +63,19 @@ export const getEntryPathsFromManifest = (manifest, sharedGlobOptions) => {
|
|
|
47
63
|
entryPaths.add(id);
|
|
48
64
|
}
|
|
49
65
|
if (exports) {
|
|
50
|
-
for (const item of
|
|
51
|
-
|
|
66
|
+
for (const item of getEntriesFromExports(exports)) {
|
|
67
|
+
if (item === './*')
|
|
68
|
+
continue;
|
|
69
|
+
const expanded = item
|
|
70
|
+
.replace(/\/\*$/, '/**')
|
|
71
|
+
.replace(/\/\*\./, '/**/*.')
|
|
72
|
+
.replace(/\/\*\//, '/**/');
|
|
73
|
+
entryPaths.add(expanded);
|
|
74
|
+
}
|
|
52
75
|
}
|
|
53
76
|
if (typeof types === 'string')
|
|
54
77
|
entryPaths.add(types);
|
|
55
78
|
if (typeof typings === 'string')
|
|
56
79
|
entryPaths.add(typings);
|
|
57
|
-
return _glob({
|
|
80
|
+
return _glob({ patterns: Array.from(entryPaths), ...options, gitignore: false, label: 'package.json entry paths' });
|
|
58
81
|
};
|
|
@@ -14,25 +14,22 @@ export const augmentWorkspace = (workspace, dir, compilerOptions) => {
|
|
|
14
14
|
};
|
|
15
15
|
export const getToSourcePathHandler = (chief) => {
|
|
16
16
|
const toSourceMapCache = new Map();
|
|
17
|
-
|
|
17
|
+
return (filePath) => {
|
|
18
18
|
if (!isInternal(filePath) || hasJSExt.test(filePath) || hasTSExt.test(filePath))
|
|
19
19
|
return;
|
|
20
20
|
if (toSourceMapCache.has(filePath))
|
|
21
21
|
return toSourceMapCache.get(filePath);
|
|
22
22
|
const workspace = chief.findWorkspaceByFilePath(filePath);
|
|
23
|
-
if (workspace) {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return srcFilePath;
|
|
32
|
-
}
|
|
23
|
+
if (workspace?.srcDir && workspace.outDir) {
|
|
24
|
+
if (filePath.startsWith(workspace.outDir)) {
|
|
25
|
+
const pattern = filePath.replace(workspace.outDir, workspace.srcDir).replace(matchExt, defaultExtensions);
|
|
26
|
+
const [srcFilePath] = fastGlob.sync(pattern);
|
|
27
|
+
toSourceMapCache.set(filePath, srcFilePath);
|
|
28
|
+
if (srcFilePath && srcFilePath !== filePath) {
|
|
29
|
+
debugLog('*', `Source mapping ${toRelative(filePath)} → ${toRelative(srcFilePath)}`);
|
|
30
|
+
return srcFilePath;
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
};
|
|
37
|
-
return toSourcePath;
|
|
38
35
|
};
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.
|
|
1
|
+
export const version = '5.50.0';
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -331,6 +331,10 @@
|
|
|
331
331
|
"title": "commitlint plugin configuration (https://knip.dev/reference/plugins/commitlint)",
|
|
332
332
|
"$ref": "#/definitions/plugin"
|
|
333
333
|
},
|
|
334
|
+
"create-typescript-app": {
|
|
335
|
+
"title": "create-typescript-app plugin configuration (https://knip.dev/reference/plugins/create-typescript-app)",
|
|
336
|
+
"$ref": "#/definitions/plugin"
|
|
337
|
+
},
|
|
334
338
|
"cspell": {
|
|
335
339
|
"title": "cspell plugin configuration (https://knip.dev/reference/plugins/cspell)",
|
|
336
340
|
"$ref": "#/definitions/plugin"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type FileDescriptor } from './util/file-entry-cache.js';
|
|
2
|
-
type CacheOptions = {
|
|
3
|
-
name: string;
|
|
4
|
-
isEnabled: boolean;
|
|
5
|
-
cacheLocation: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class CacheConsultant<T> {
|
|
8
|
-
private isEnabled;
|
|
9
|
-
private cache;
|
|
10
|
-
constructor(options: CacheOptions);
|
|
11
|
-
getFileDescriptor(file: string): FileDescriptor<T>;
|
|
12
|
-
reconcile(): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|