knip 5.63.0 → 5.63.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.
- package/dist/CacheConsultant.d.ts +3 -9
- package/dist/CacheConsultant.js +5 -5
- package/dist/ConfigurationChief.d.ts +585 -38
- package/dist/ConfigurationChief.js +33 -122
- package/dist/ConsoleStreamer.d.ts +2 -3
- package/dist/ConsoleStreamer.js +2 -2
- package/dist/DependencyDeputy.d.ts +2 -6
- package/dist/IssueCollector.d.ts +4 -12
- package/dist/IssueCollector.js +9 -9
- package/dist/IssueFixer.d.ts +3 -14
- package/dist/IssueFixer.js +11 -21
- package/dist/PrincipalFactory.d.ts +3 -2
- package/dist/PrincipalFactory.js +11 -11
- package/dist/ProjectPrincipal.d.ts +4 -3
- package/dist/ProjectPrincipal.js +8 -8
- package/dist/WorkspaceWorker.d.ts +4 -9
- package/dist/WorkspaceWorker.js +8 -12
- package/dist/binaries/bash-parser.js +1 -1
- package/dist/binaries/fallback.js +1 -1
- package/dist/binaries/package-manager/pnpm.js +6 -1
- package/dist/cli.js +43 -61
- package/dist/compilers/index.d.ts +14 -4
- package/dist/graph/analyze.d.ts +3 -8
- package/dist/graph/analyze.js +24 -27
- package/dist/graph/build.d.ts +3 -17
- package/dist/graph/build.js +42 -39
- package/dist/index.d.ts +3 -7
- package/dist/index.js +22 -62
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/index.js +2 -0
- package/dist/plugins/nuxt/index.js +4 -3
- package/dist/plugins/nuxt/types.d.ts +3 -2
- package/dist/plugins/pnpm/index.d.ts +7 -0
- package/dist/plugins/pnpm/index.js +8 -0
- package/dist/plugins/rsbuild/index.js +23 -6
- package/dist/plugins/rsbuild/types.d.ts +3 -0
- package/dist/plugins.js +3 -2
- package/dist/reporters/codeclimate.d.ts +1 -1
- package/dist/reporters/codeclimate.js +10 -10
- package/dist/reporters/codeowners.d.ts +1 -1
- package/dist/reporters/codeowners.js +5 -5
- package/dist/reporters/compact.d.ts +1 -1
- package/dist/reporters/compact.js +7 -7
- package/dist/reporters/disclosure.d.ts +1 -1
- package/dist/reporters/disclosure.js +2 -2
- package/dist/reporters/index.d.ts +6 -6
- package/dist/reporters/json.d.ts +1 -1
- package/dist/reporters/json.js +3 -3
- package/dist/reporters/markdown.d.ts +1 -1
- package/dist/reporters/markdown.js +4 -4
- package/dist/reporters/symbols.js +1 -1
- package/dist/reporters/util/configuration-hints.d.ts +1 -1
- package/dist/reporters/util/configuration-hints.js +6 -7
- package/dist/reporters/util/util.d.ts +2 -2
- package/dist/reporters/util/util.js +4 -4
- package/dist/reporters/watch.d.ts +3 -4
- package/dist/reporters/watch.js +5 -5
- package/dist/schema/configuration.d.ts +64 -8
- package/dist/schema/plugins.d.ts +23 -0
- package/dist/schema/plugins.js +1 -0
- package/dist/types/PluginNames.d.ts +2 -2
- package/dist/types/PluginNames.js +1 -0
- package/dist/types/config.d.ts +4 -10
- package/dist/types/issues.d.ts +1 -2
- package/dist/types/{cli.d.ts → options.d.ts} +2 -2
- package/dist/types/package-json.d.ts +1 -0
- package/dist/types/project.d.ts +1 -7
- package/dist/typescript/get-imports-and-exports.d.ts +2 -2
- package/dist/typescript/get-imports-and-exports.js +9 -10
- package/dist/util/Performance.js +16 -6
- package/dist/util/cli-arguments.d.ts +1 -2
- package/dist/util/cli-arguments.js +3 -13
- package/dist/util/create-options.d.ts +1219 -0
- package/dist/util/create-options.js +112 -0
- package/dist/util/debug.js +3 -4
- package/dist/util/errors.d.ts +1 -1
- package/dist/util/file-entry-cache.js +3 -3
- package/dist/util/get-included-issue-types.d.ts +9 -13
- package/dist/util/get-included-issue-types.js +10 -16
- package/dist/util/get-referenced-inputs.js +1 -1
- package/dist/util/input.d.ts +1 -1
- package/dist/util/input.js +1 -1
- package/dist/util/is-identifier-referenced.d.ts +1 -1
- package/dist/util/is-identifier-referenced.js +2 -2
- package/dist/util/load-config.d.ts +1 -0
- package/dist/util/load-config.js +24 -0
- package/dist/util/path.d.ts +4 -4
- package/dist/util/path.js +5 -7
- package/dist/util/require.js +1 -2
- package/dist/util/tag.d.ts +1 -1
- package/dist/util/to-source-path.d.ts +1 -1
- package/dist/util/to-source-path.js +5 -5
- package/dist/util/trace.d.ts +6 -6
- package/dist/util/trace.js +18 -22
- package/dist/util/watch.d.ts +2 -5
- package/dist/util/watch.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/schema.json +4 -0
- package/dist/util/unwrap-function.d.ts +0 -1
- package/dist/util/unwrap-function.js +0 -13
- /package/dist/types/{cli.js → options.js} +0 -0
|
@@ -1,15 +1,9 @@
|
|
|
1
|
+
import type { MainOptions } from './util/create-options.js';
|
|
1
2
|
import { type FileDescriptor } from './util/file-entry-cache.js';
|
|
2
|
-
type CacheOptions = {
|
|
3
|
-
name: string;
|
|
4
|
-
isEnabled: boolean;
|
|
5
|
-
cacheLocation: string;
|
|
6
|
-
isProduction: boolean;
|
|
7
|
-
};
|
|
8
3
|
export declare class CacheConsultant<T> {
|
|
9
4
|
private isEnabled;
|
|
10
5
|
private cache;
|
|
11
|
-
constructor(options:
|
|
12
|
-
getFileDescriptor(
|
|
6
|
+
constructor(name: string, options: MainOptions);
|
|
7
|
+
getFileDescriptor(filePath: string): FileDescriptor<T>;
|
|
13
8
|
reconcile(): void;
|
|
14
9
|
}
|
|
15
|
-
export {};
|
package/dist/CacheConsultant.js
CHANGED
|
@@ -5,18 +5,18 @@ const dummyFileDescriptor = { key: '', changed: true, notFound: true };
|
|
|
5
5
|
export class CacheConsultant {
|
|
6
6
|
isEnabled;
|
|
7
7
|
cache;
|
|
8
|
-
constructor(options) {
|
|
9
|
-
this.isEnabled = options.
|
|
8
|
+
constructor(name, options) {
|
|
9
|
+
this.isEnabled = options.isCache;
|
|
10
10
|
if (this.isEnabled) {
|
|
11
|
-
const cacheName = `${
|
|
11
|
+
const cacheName = `${name.replace(/[^a-z0-9]/g, '-').replace(/-*$/, '')}-${options.isProduction ? '-prod' : ''}-${version}`;
|
|
12
12
|
this.cache = new FileEntryCache(cacheName, options.cacheLocation);
|
|
13
13
|
this.reconcile = timerify(this.cache.reconcile).bind(this.cache);
|
|
14
14
|
this.getFileDescriptor = timerify(this.cache.getFileDescriptor).bind(this.cache);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
getFileDescriptor(
|
|
17
|
+
getFileDescriptor(filePath) {
|
|
18
18
|
if (this.isEnabled && this.cache)
|
|
19
|
-
return this.cache.getFileDescriptor(
|
|
19
|
+
return this.cache.getFileDescriptor(filePath);
|
|
20
20
|
return dummyFileDescriptor;
|
|
21
21
|
}
|
|
22
22
|
reconcile() {
|