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/schema/plugins.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
2
|
export const globSchema = z.union([z.string(), z.array(z.string())]);
|
|
3
3
|
export const pluginSchema = z.union([
|
|
4
4
|
z.boolean(),
|
|
5
5
|
globSchema,
|
|
6
6
|
z.object({
|
|
7
|
-
config:
|
|
8
|
-
entry:
|
|
9
|
-
project:
|
|
7
|
+
config: z.optional(globSchema),
|
|
8
|
+
entry: z.optional(globSchema),
|
|
9
|
+
project: z.optional(globSchema),
|
|
10
10
|
}),
|
|
11
11
|
]);
|
|
12
12
|
export const pluginsSchema = z.object({
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
|
-
import type { z } from 'zod';
|
|
2
|
+
import type { z } from 'zod/mini';
|
|
3
3
|
import type { AsyncCompilers, SyncCompilers } from '../compilers/types.js';
|
|
4
4
|
import type { knipConfigurationSchema } from '../schema/configuration.js';
|
|
5
5
|
import type { pluginSchema } from '../schema/plugins.js';
|
|
6
6
|
import type { Input } from '../util/input.js';
|
|
7
|
-
import type { PluginName } from './PluginNames.js';
|
|
8
7
|
import type { Args } from './args.js';
|
|
9
8
|
import type { SymbolType } from './issues.js';
|
|
10
9
|
import type { Tags } from './options.js';
|
|
10
|
+
import type { PluginName } from './PluginNames.js';
|
|
11
11
|
import type { PackageJson } from './package-json.js';
|
|
12
12
|
export interface GetInputsFromScriptsOptions extends BaseOptions {
|
|
13
13
|
knownBinsOnly?: boolean;
|
package/dist/types/issues.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export type ReporterOptions = {
|
|
|
59
59
|
issues: Issues;
|
|
60
60
|
counters: Counters;
|
|
61
61
|
tagHints: TagHints;
|
|
62
|
-
configurationHints:
|
|
62
|
+
configurationHints: Set<ConfigurationHint>;
|
|
63
63
|
isDisableConfigHints: boolean;
|
|
64
64
|
isTreatConfigHintsAsErrors: boolean;
|
|
65
65
|
cwd: string;
|
|
@@ -74,7 +74,7 @@ export type Reporter = (options: ReporterOptions) => void;
|
|
|
74
74
|
export type Preprocessor = (options: ReporterOptions) => ReporterOptions;
|
|
75
75
|
export type IssueSeverity = 'error' | 'warn' | 'off';
|
|
76
76
|
export type Rules = Record<IssueType, IssueSeverity>;
|
|
77
|
-
export type ConfigurationHints =
|
|
77
|
+
export type ConfigurationHints = Map<string, ConfigurationHint>;
|
|
78
78
|
export type ConfigurationHintType = 'ignoreBinaries' | 'ignoreDependencies' | 'ignoreUnresolved' | 'ignoreWorkspaces' | 'entry-redundant' | 'project-redundant' | 'entry-top-level' | 'project-top-level' | 'entry-empty' | 'project-empty' | 'package-entry' | 'workspace-unconfigured';
|
|
79
79
|
export type ConfigurationHint = {
|
|
80
80
|
type: ConfigurationHintType;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isBuiltin } from 'node:module';
|
|
2
2
|
import ts from 'typescript';
|
|
3
3
|
import { ALIAS_TAG, ANONYMOUS, IMPORT_STAR, PROTOCOL_VIRTUAL } from '../constants.js';
|
|
4
|
-
import { timerify } from '../util/Performance.js';
|
|
5
4
|
import { addNsValue, addValue, createImports } from '../util/module-graph.js';
|
|
6
5
|
import { getPackageNameFromFilePath, isStartsLikePackageName, sanitizeSpecifier } from '../util/modules.js';
|
|
6
|
+
import { timerify } from '../util/Performance.js';
|
|
7
7
|
import { isInNodeModules } from '../util/path.js';
|
|
8
8
|
import { shouldIgnore } from '../util/tag.js';
|
|
9
9
|
import { getAccessMembers, getDestructuredIds, getJSDocTags, getLineAndCharacterOfPosition, getTypeRef, isAccessExpression, isConsiderReferencedNS, isDestructuring, isImportSpecifier, isInForIteration, isObjectEnumerationCallExpressionArgument, isReferencedInExport, } from './ast-helpers.js';
|
|
@@ -2,8 +2,8 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { isBuiltin } from 'node:module';
|
|
3
3
|
import ts from 'typescript';
|
|
4
4
|
import { DEFAULT_EXTENSIONS } from '../constants.js';
|
|
5
|
-
import { timerify } from '../util/Performance.js';
|
|
6
5
|
import { sanitizeSpecifier } from '../util/modules.js';
|
|
6
|
+
import { timerify } from '../util/Performance.js';
|
|
7
7
|
import { dirname, extname, isAbsolute, isInNodeModules, join } from '../util/path.js';
|
|
8
8
|
import { _createSyncResolver, _resolveSync } from '../util/resolve.js';
|
|
9
9
|
import { isDeclarationFileExtension } from './ast-helpers.js';
|
|
@@ -38,13 +38,6 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
38
38
|
isTreatConfigHintsAsErrors: boolean;
|
|
39
39
|
isWatch: boolean;
|
|
40
40
|
parsedConfig: {
|
|
41
|
-
node?: string | boolean | string[] | {
|
|
42
|
-
config?: string | string[] | undefined;
|
|
43
|
-
entry?: string | string[] | undefined;
|
|
44
|
-
project?: string | string[] | undefined;
|
|
45
|
-
} | undefined;
|
|
46
|
-
entry?: string | string[] | undefined;
|
|
47
|
-
project?: string | string[] | undefined;
|
|
48
41
|
angular?: string | boolean | string[] | {
|
|
49
42
|
config?: string | string[] | undefined;
|
|
50
43
|
entry?: string | string[] | undefined;
|
|
@@ -300,6 +293,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
300
293
|
entry?: string | string[] | undefined;
|
|
301
294
|
project?: string | string[] | undefined;
|
|
302
295
|
} | undefined;
|
|
296
|
+
node?: string | boolean | string[] | {
|
|
297
|
+
config?: string | string[] | undefined;
|
|
298
|
+
entry?: string | string[] | undefined;
|
|
299
|
+
project?: string | string[] | undefined;
|
|
300
|
+
} | undefined;
|
|
303
301
|
'node-modules-inspector'?: string | boolean | string[] | {
|
|
304
302
|
config?: string | string[] | undefined;
|
|
305
303
|
entry?: string | string[] | undefined;
|
|
@@ -610,32 +608,7 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
610
608
|
entry?: string | string[] | undefined;
|
|
611
609
|
project?: string | string[] | undefined;
|
|
612
610
|
} | undefined;
|
|
613
|
-
exclude?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
614
|
-
$schema?: string | undefined;
|
|
615
|
-
rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
|
|
616
|
-
paths?: Record<string, string[]> | undefined;
|
|
617
|
-
ignore?: string | string[] | undefined;
|
|
618
|
-
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
619
|
-
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
620
|
-
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
621
|
-
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
622
|
-
ignoreExportsUsedInFile?: boolean | Partial<Record<"function" | "type" | "enum" | "class" | "interface" | "member", boolean>> | undefined;
|
|
623
|
-
ignoreWorkspaces?: string[] | undefined;
|
|
624
|
-
includeEntryExports?: boolean | undefined;
|
|
625
|
-
compilers?: Record<string, true | ((args_0: string, args_1: string, ...args: unknown[]) => string) | ((args_0: string, args_1: string, ...args: unknown[]) => Promise<string>)> | undefined;
|
|
626
|
-
syncCompilers?: Record<string, true | ((args_0: string, args_1: string, ...args: unknown[]) => string)> | undefined;
|
|
627
|
-
asyncCompilers?: Record<string, (args_0: string, args_1: string, ...args: unknown[]) => Promise<string>> | undefined;
|
|
628
|
-
tags?: string[] | undefined;
|
|
629
|
-
treatConfigHintsAsErrors?: boolean | undefined;
|
|
630
|
-
include?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
631
611
|
workspaces?: Record<string, {
|
|
632
|
-
node?: string | boolean | string[] | {
|
|
633
|
-
config?: string | string[] | undefined;
|
|
634
|
-
entry?: string | string[] | undefined;
|
|
635
|
-
project?: string | string[] | undefined;
|
|
636
|
-
} | undefined;
|
|
637
|
-
entry?: string | string[] | undefined;
|
|
638
|
-
project?: string | string[] | undefined;
|
|
639
612
|
angular?: string | boolean | string[] | {
|
|
640
613
|
config?: string | string[] | undefined;
|
|
641
614
|
entry?: string | string[] | undefined;
|
|
@@ -891,6 +864,11 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
891
864
|
entry?: string | string[] | undefined;
|
|
892
865
|
project?: string | string[] | undefined;
|
|
893
866
|
} | undefined;
|
|
867
|
+
node?: string | boolean | string[] | {
|
|
868
|
+
config?: string | string[] | undefined;
|
|
869
|
+
entry?: string | string[] | undefined;
|
|
870
|
+
project?: string | string[] | undefined;
|
|
871
|
+
} | undefined;
|
|
894
872
|
'node-modules-inspector'?: string | boolean | string[] | {
|
|
895
873
|
config?: string | string[] | undefined;
|
|
896
874
|
entry?: string | string[] | undefined;
|
|
@@ -1201,6 +1179,8 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1201
1179
|
entry?: string | string[] | undefined;
|
|
1202
1180
|
project?: string | string[] | undefined;
|
|
1203
1181
|
} | undefined;
|
|
1182
|
+
entry?: string | string[] | undefined;
|
|
1183
|
+
project?: string | string[] | undefined;
|
|
1204
1184
|
paths?: Record<string, string[]> | undefined;
|
|
1205
1185
|
ignore?: string | string[] | undefined;
|
|
1206
1186
|
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
@@ -1209,6 +1189,33 @@ export declare const createOptions: (options: CreateOptions) => Promise<{
|
|
|
1209
1189
|
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
1210
1190
|
includeEntryExports?: boolean | undefined;
|
|
1211
1191
|
}> | undefined;
|
|
1192
|
+
include?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
1193
|
+
exclude?: ("files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers")[] | undefined;
|
|
1194
|
+
$schema?: string | undefined;
|
|
1195
|
+
rules?: Partial<Record<"files" | "dependencies" | "devDependencies" | "optionalPeerDependencies" | "unlisted" | "binaries" | "unresolved" | "exports" | "types" | "nsExports" | "nsTypes" | "duplicates" | "enumMembers" | "classMembers", "error" | "warn" | "off">> | undefined;
|
|
1196
|
+
entry?: string | string[] | undefined;
|
|
1197
|
+
project?: string | string[] | undefined;
|
|
1198
|
+
paths?: Record<string, string[]> | undefined;
|
|
1199
|
+
ignore?: string | string[] | undefined;
|
|
1200
|
+
ignoreBinaries?: (string | RegExp)[] | undefined;
|
|
1201
|
+
ignoreDependencies?: (string | RegExp)[] | undefined;
|
|
1202
|
+
ignoreMembers?: (string | RegExp)[] | undefined;
|
|
1203
|
+
ignoreUnresolved?: (string | RegExp)[] | undefined;
|
|
1204
|
+
ignoreExportsUsedInFile?: boolean | {
|
|
1205
|
+
class?: boolean | undefined;
|
|
1206
|
+
enum?: boolean | undefined;
|
|
1207
|
+
function?: boolean | undefined;
|
|
1208
|
+
interface?: boolean | undefined;
|
|
1209
|
+
member?: boolean | undefined;
|
|
1210
|
+
type?: boolean | undefined;
|
|
1211
|
+
} | undefined;
|
|
1212
|
+
ignoreWorkspaces?: string[] | undefined;
|
|
1213
|
+
includeEntryExports?: boolean | undefined;
|
|
1214
|
+
compilers?: Record<string, true | ((filename: string, contents: string) => string) | ((filename: string, contents: string) => Promise<string>)> | undefined;
|
|
1215
|
+
syncCompilers?: Record<string, true | ((filename: string, contents: string) => string)> | undefined;
|
|
1216
|
+
asyncCompilers?: Record<string, (filename: string, contents: string) => Promise<string>> | undefined;
|
|
1217
|
+
tags?: string[] | undefined;
|
|
1218
|
+
treatConfigHintsAsErrors?: boolean | undefined;
|
|
1212
1219
|
};
|
|
1213
1220
|
rules: {
|
|
1214
1221
|
files: import("../types/issues.js").IssueSeverity;
|
package/dist/util/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { core } from 'zod/mini';
|
|
2
2
|
interface ErrorWithCause extends Error {
|
|
3
3
|
cause: Error;
|
|
4
4
|
}
|
|
@@ -6,8 +6,8 @@ export declare class ConfigurationError extends Error {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class LoaderError extends Error {
|
|
8
8
|
}
|
|
9
|
-
export declare const isKnownError: (error: Error) => error is ZodError<any> | ConfigurationError | LoaderError;
|
|
10
|
-
export declare const
|
|
9
|
+
export declare const isKnownError: (error: Error) => error is core.$ZodError<any> | ConfigurationError | LoaderError;
|
|
10
|
+
export declare const hasErrorCause: (error: Error) => error is ErrorWithCause;
|
|
11
11
|
export declare const isConfigurationError: (error: Error) => error is ConfigurationError;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const getKnownErrors: (error: Error) => Error[];
|
|
13
13
|
export {};
|
package/dist/util/errors.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { core } from 'zod/mini';
|
|
2
|
+
const isZodErrorLike = (error) => error instanceof core.$ZodError;
|
|
3
3
|
export class ConfigurationError extends Error {
|
|
4
4
|
}
|
|
5
5
|
export class LoaderError extends Error {
|
|
6
6
|
}
|
|
7
|
-
export const isKnownError = (error) => error instanceof ConfigurationError || error instanceof LoaderError || error
|
|
8
|
-
export const
|
|
7
|
+
export const isKnownError = (error) => error instanceof ConfigurationError || error instanceof LoaderError || isZodErrorLike(error);
|
|
8
|
+
export const hasErrorCause = (error) => !isZodErrorLike(error) && error.cause instanceof Error;
|
|
9
9
|
export const isConfigurationError = (error) => error instanceof ConfigurationError;
|
|
10
|
-
export const
|
|
11
|
-
if (error
|
|
12
|
-
return
|
|
13
|
-
return error;
|
|
10
|
+
export const getKnownErrors = (error) => {
|
|
11
|
+
if (isZodErrorLike(error))
|
|
12
|
+
return [...error.issues].map(error => new Error(error.message));
|
|
13
|
+
return [error];
|
|
14
14
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { deserialize, serialize } from 'node:v8';
|
|
4
|
-
import { timerify } from './Performance.js';
|
|
5
4
|
import { debugLog } from './debug.js';
|
|
6
5
|
import { isDirectory, isFile } from './fs.js';
|
|
6
|
+
import { timerify } from './Performance.js';
|
|
7
7
|
import { dirname, isAbsolute, resolve } from './path.js';
|
|
8
8
|
const createCache = (filePath) => {
|
|
9
9
|
try {
|
package/dist/util/glob-core.js
CHANGED
|
@@ -4,10 +4,10 @@ import { walk as _walk } from '@nodelib/fs.walk';
|
|
|
4
4
|
import fg, {} from 'fast-glob';
|
|
5
5
|
import picomatch from 'picomatch';
|
|
6
6
|
import { GLOBAL_IGNORE_PATTERNS, ROOT_WORKSPACE_NAME } from '../constants.js';
|
|
7
|
-
import { timerify } from './Performance.js';
|
|
8
7
|
import { compact, partition } from './array.js';
|
|
9
8
|
import { debugLogObject } from './debug.js';
|
|
10
9
|
import { isDirectory, isFile } from './fs.js';
|
|
10
|
+
import { timerify } from './Performance.js';
|
|
11
11
|
import { parseAndConvertGitignorePatterns } from './parse-and-convert-gitignores.js';
|
|
12
12
|
import { dirname, join, relative, toPosix } from './path.js';
|
|
13
13
|
const walk = promisify(_walk);
|
package/dist/util/glob.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fg from 'fast-glob';
|
|
2
2
|
import { GLOBAL_IGNORE_PATTERNS } from '../constants.js';
|
|
3
|
-
import { timerify } from './Performance.js';
|
|
4
3
|
import { compact } from './array.js';
|
|
5
4
|
import { glob } from './glob-core.js';
|
|
5
|
+
import { timerify } from './Performance.js';
|
|
6
6
|
import { isAbsolute, join, relative } from './path.js';
|
|
7
7
|
const prepend = (pattern, relativePath) => isAbsolute(pattern.replace(/^!/, '')) ? pattern : prependDirToPattern(relativePath, pattern);
|
|
8
8
|
const prependDirToPatterns = (cwd, dir, patterns) => {
|
package/dist/util/input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PluginName } from '../types/PluginNames.js';
|
|
2
1
|
import type { IssueType } from '../types/issues.js';
|
|
2
|
+
import type { PluginName } from '../types/PluginNames.js';
|
|
3
3
|
type InputType = 'binary' | 'entry' | 'project' | 'config' | 'dependency' | 'deferResolve' | 'deferResolveEntry' | 'alias' | 'ignore';
|
|
4
4
|
export interface Input {
|
|
5
5
|
type: InputType;
|
package/dist/util/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { timerify } from './Performance.js';
|
|
2
1
|
import { LoaderError } from './errors.js';
|
|
3
2
|
import { loadFile, loadJSON, loadTOML, loadYAML, parseJSON, parseYAML } from './fs.js';
|
|
4
3
|
import { jiti } from './jiti.js';
|
|
4
|
+
import { timerify } from './Performance.js';
|
|
5
5
|
import { extname, isInternal } from './path.js';
|
|
6
6
|
const load = async (filePath) => {
|
|
7
7
|
try {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.64.
|
|
1
|
+
export declare const version = "5.64.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.64.
|
|
1
|
+
export const version = '5.64.2';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "5.64.
|
|
3
|
+
"version": "5.64.2",
|
|
4
4
|
"description": "Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects",
|
|
5
5
|
"homepage": "https://knip.dev",
|
|
6
6
|
"repository": {
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"scripts": {
|
|
35
35
|
"knip": "node ./dist/cli.js --directory ../..",
|
|
36
36
|
"knip:production": "node ./dist/cli.js --directory ../.. --production --strict",
|
|
37
|
-
"lint": "biome lint
|
|
38
|
-
"format": "biome format --write
|
|
39
|
-
"test": "
|
|
40
|
-
"test:
|
|
41
|
-
"test:
|
|
42
|
-
"test:
|
|
43
|
-
"test:
|
|
37
|
+
"lint": "biome lint",
|
|
38
|
+
"format": "biome format --write",
|
|
39
|
+
"test": "node scripts/run-test.ts",
|
|
40
|
+
"test:node": "tsx --test test/*.test.ts test/**/*.test.ts",
|
|
41
|
+
"test:bun": "bun test test/*.test.ts test/**/*.test.ts",
|
|
42
|
+
"test:smoke": "glob -c \"tsx --test\" \"test/*.test.ts\" && glob -c \"tsx --test\" \"test/{plugins,util}/*.test.ts\"",
|
|
43
|
+
"test:bun:smoke": "bun test test/*.test.ts test/{plugins,util}/*.test.ts",
|
|
44
44
|
"watch": "npm link && tsc --watch",
|
|
45
|
-
"prebuild": "
|
|
45
|
+
"prebuild": "pnpm run generate-plugin-defs && node rmdir.js dist",
|
|
46
46
|
"build": "tsc",
|
|
47
|
-
"qa": "
|
|
47
|
+
"qa": "pnpm lint && pnpm build && pnpm knip && pnpm knip:production && pnpm run test",
|
|
48
48
|
"release": "release-it",
|
|
49
|
-
"create-plugin": "
|
|
50
|
-
"postcreate-plugin": "
|
|
49
|
+
"create-plugin": "node ./scripts/create-new-plugin.ts",
|
|
50
|
+
"postcreate-plugin": "pnpm run build && biome format --write schema.json schema-jsonc.json src/schema/plugins.ts",
|
|
51
51
|
"generate-plugin-defs": "node ./scripts/generate-plugin-defs.js && biome check --write src/plugins/index.ts src/types/PluginNames.ts src/schema/plugins.ts"
|
|
52
52
|
},
|
|
53
53
|
"files": [
|
|
@@ -60,25 +60,24 @@
|
|
|
60
60
|
"@nodelib/fs.walk": "^1.2.3",
|
|
61
61
|
"fast-glob": "^3.3.3",
|
|
62
62
|
"formatly": "^0.3.0",
|
|
63
|
-
"jiti": "^2.
|
|
63
|
+
"jiti": "^2.6.0",
|
|
64
64
|
"js-yaml": "^4.1.0",
|
|
65
65
|
"minimist": "^1.2.8",
|
|
66
|
-
"oxc-resolver": "^11.8.
|
|
66
|
+
"oxc-resolver": "^11.8.3",
|
|
67
67
|
"picocolors": "^1.1.1",
|
|
68
68
|
"picomatch": "^4.0.1",
|
|
69
69
|
"smol-toml": "^1.4.1",
|
|
70
70
|
"strip-json-comments": "5.0.2",
|
|
71
|
-
"zod": "^
|
|
72
|
-
"zod-validation-error": "^3.0.3"
|
|
71
|
+
"zod": "^4.1.11"
|
|
73
72
|
},
|
|
74
73
|
"peerDependencies": {
|
|
75
74
|
"@types/node": ">=18",
|
|
76
|
-
"typescript": ">=5.0.4"
|
|
75
|
+
"typescript": ">=5.0.4 <7"
|
|
77
76
|
},
|
|
78
77
|
"devDependencies": {
|
|
79
78
|
"@jest/types": "^29.6.3",
|
|
80
79
|
"@release-it/bumper": "^7.0.5",
|
|
81
|
-
"@types/bun": "1.2.
|
|
80
|
+
"@types/bun": "1.2.22",
|
|
82
81
|
"@types/js-yaml": "^4.0.9",
|
|
83
82
|
"@types/minimist": "^1.2.5",
|
|
84
83
|
"@types/picomatch": "3.0.1",
|