knip 5.22.3 → 5.23.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/ConfigurationChief.d.ts +15 -89
- package/dist/ConfigurationValidator.d.ts +1141 -2897
- package/dist/DependencyDeputy.d.ts +6 -21
- package/dist/IssueCollector.d.ts +7 -4
- package/dist/IssueCollector.js +7 -2
- package/dist/IssueFixer.d.ts +1 -1
- package/dist/PrincipalFactory.d.ts +3 -3
- package/dist/ProjectPrincipal.d.ts +9 -9
- package/dist/WorkspaceWorker.d.ts +9 -14
- package/dist/binaries/util.d.ts +5 -5
- package/dist/cli.js +2 -1
- package/dist/compilers/astro.d.ts +1 -1
- package/dist/compilers/compilers.d.ts +2 -2
- package/dist/compilers/index.d.ts +83 -695
- package/dist/compilers/mdx.d.ts +1 -1
- package/dist/constants.d.ts +4 -4
- package/dist/index.d.ts +1 -7
- package/dist/index.js +45 -11
- package/dist/manifest/helpers.d.ts +1 -1
- package/dist/manifest/index.d.ts +6 -4
- package/dist/plugins/babel/helpers.d.ts +1 -1
- package/dist/plugins/babel/index.d.ts +1 -1
- package/dist/plugins/capacitor/index.d.ts +1 -1
- package/dist/plugins/cypress/index.d.ts +1 -1
- package/dist/plugins/eleventy/helpers.d.ts +5 -5
- package/dist/plugins/eleventy/index.d.ts +2 -5
- package/dist/plugins/graphql-codegen/index.d.ts +1 -1
- package/dist/plugins/husky/index.d.ts +1 -1
- package/dist/plugins/jest/index.d.ts +2 -3
- package/dist/plugins/lefthook/index.d.ts +1 -1
- package/dist/plugins/lint-staged/index.d.ts +1 -2
- package/dist/plugins/markdownlint/helpers.d.ts +1 -1
- package/dist/plugins/netlify/helpers.d.ts +1 -1
- package/dist/plugins/netlify/index.d.ts +1 -1
- package/dist/plugins/next/index.d.ts +1 -1
- package/dist/plugins/nx/index.d.ts +1 -1
- package/dist/plugins/playwright-ct/index.d.ts +1 -1
- package/dist/plugins/remix/index.d.ts +1 -1
- package/dist/plugins/sentry/index.d.ts +1 -1
- package/dist/plugins/simple-git-hooks/index.d.ts +1 -2
- package/dist/plugins/storybook/index.d.ts +2 -2
- package/dist/plugins/svelte/index.d.ts +1 -1
- package/dist/plugins/unbuild/index.d.ts +1 -2
- package/dist/plugins/vitest/helpers.d.ts +2 -2
- package/dist/plugins/webpack/index.d.ts +1 -4
- package/dist/plugins/wireit/index.d.ts +3 -2
- package/dist/plugins/yorkie/index.d.ts +1 -2
- package/dist/reporters/index.d.ts +2 -2
- package/dist/reporters/json.d.ts +1 -1
- package/dist/reporters/symbols.d.ts +1 -1
- package/dist/reporters/symbols.js +18 -8
- package/dist/reporters/util.d.ts +1 -1
- package/dist/types/dependency-graph.d.ts +2 -2
- package/dist/types/issues.d.ts +9 -0
- package/dist/typescript/SourceFileManager.d.ts +5 -5
- package/dist/typescript/ast-helpers.d.ts +7 -4
- package/dist/typescript/ast-helpers.js +19 -0
- package/dist/typescript/getImportsAndExports.d.ts +10 -11
- package/dist/typescript/getImportsAndExports.js +48 -27
- package/dist/typescript/visitors/dynamic-imports/index.d.ts +1 -1
- package/dist/typescript/visitors/exports/exportKeyword.js +26 -62
- package/dist/typescript/visitors/exports/index.d.ts +1 -1
- package/dist/typescript/visitors/imports/index.d.ts +1 -1
- package/dist/typescript/visitors/scripts/index.d.ts +1 -1
- package/dist/util/Performance.d.ts +2 -2
- package/dist/util/array.d.ts +2 -2
- package/dist/util/errors.d.ts +1 -1
- package/dist/util/file-entry-cache.d.ts +3 -6
- package/dist/util/fs.d.ts +6 -6
- package/dist/util/get-included-issue-types.d.ts +1 -2
- package/dist/util/git.d.ts +1 -1
- package/dist/util/glob.d.ts +6 -6
- package/dist/util/handle-dependency.d.ts +1 -1
- package/dist/util/is-identifier-referenced.d.ts +1 -1
- package/dist/util/loader.d.ts +1 -1
- package/dist/util/map-workspaces.d.ts +1 -2
- package/dist/util/modules.d.ts +7 -7
- package/dist/util/package-json.d.ts +2 -6
- package/dist/util/path.d.ts +6 -6
- package/dist/util/pkgs-graph.d.ts +1 -1
- package/dist/util/plugin.d.ts +7 -7
- package/dist/util/protocols.d.ts +9 -9
- package/dist/util/regex.d.ts +3 -2
- package/dist/util/regex.js +2 -0
- package/dist/util/reporter.d.ts +1 -1
- package/dist/util/require.d.ts +3 -3
- package/dist/util/resolve.d.ts +1 -1
- package/dist/util/tag.d.ts +3 -2
- package/dist/util/tag.js +2 -2
- package/dist/util/trace.d.ts +2 -2
- package/dist/util/tsconfig-loader.d.ts +1 -6
- package/dist/util/unwrap-function.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -4,5 +4,5 @@ interface Package {
|
|
|
4
4
|
dir: string;
|
|
5
5
|
}
|
|
6
6
|
export type Graph = Record<string, Set<string>>;
|
|
7
|
-
export declare function createPkgGraph(cwd: string, wsNames: string[], wsPkgNames: Set<string>, byPkgName: Map<string, Package>, byName: Map<string, Package>):
|
|
7
|
+
export declare function createPkgGraph(cwd: string, wsNames: string[], wsPkgNames: Set<string>, byPkgName: Map<string, Package>, byName: Map<string, Package>): Record<string, Set<string>>;
|
|
8
8
|
export {};
|
package/dist/util/plugin.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ export { _tryResolve as tryResolve } from './require.js';
|
|
|
4
4
|
export { _getDependenciesFromScripts as getDependenciesFromScripts } from '../binaries/index.js';
|
|
5
5
|
import type { RawPluginConfiguration } from '../types/config.js';
|
|
6
6
|
import type { Plugin, PluginOptions } from '../types/plugins.js';
|
|
7
|
-
export declare const toCamelCase: (name: string) =>
|
|
8
|
-
export declare const hasDependency: (dependencies: Set<string>, values: (string | RegExp)[]) =>
|
|
7
|
+
export declare const toCamelCase: (name: string) => any;
|
|
8
|
+
export declare const hasDependency: (dependencies: Set<string>, values: (string | RegExp)[]) => any;
|
|
9
9
|
export declare const normalizePluginConfig: (pluginConfig: RawPluginConfiguration) => boolean | {
|
|
10
|
-
config: string[] | null;
|
|
11
|
-
entry: string[] | null;
|
|
12
|
-
project: string[] | null;
|
|
10
|
+
config: string | string[] | null | undefined;
|
|
11
|
+
entry: string | string[] | null | undefined;
|
|
12
|
+
project: string | string[] | null | undefined;
|
|
13
13
|
};
|
|
14
|
-
export declare const loadConfigForPlugin: (configFilePath: string, plugin: Plugin, options: PluginOptions, pluginName: string) =>
|
|
15
|
-
export declare const getFinalEntryPaths: (plugin: Plugin, options: PluginOptions, configEntryPaths: string[]) =>
|
|
14
|
+
export declare const loadConfigForPlugin: (configFilePath: string, plugin: Plugin, options: PluginOptions, pluginName: string) => unknown;
|
|
15
|
+
export declare const getFinalEntryPaths: (plugin: Plugin, options: PluginOptions, configEntryPaths: string[]) => any;
|
package/dist/util/protocols.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const toBinary: (specifier: string) =>
|
|
2
|
-
export declare const fromBinary: (specifier: string) =>
|
|
3
|
-
export declare const isBinary: (specifier: string) =>
|
|
4
|
-
export declare const toEntryPattern: (specifier: string) =>
|
|
5
|
-
export declare const fromEntryPattern: (specifier: string) =>
|
|
6
|
-
export declare const isEntryPattern: (specifier: string) =>
|
|
7
|
-
export declare const toProductionEntryPattern: (specifier: string) =>
|
|
8
|
-
export declare const fromProductionEntryPattern: (specifier: string) =>
|
|
9
|
-
export declare const isProductionEntryPattern: (specifier: string) =>
|
|
1
|
+
export declare const toBinary: (specifier: string) => any;
|
|
2
|
+
export declare const fromBinary: (specifier: string) => any;
|
|
3
|
+
export declare const isBinary: (specifier: string) => any;
|
|
4
|
+
export declare const toEntryPattern: (specifier: string) => any;
|
|
5
|
+
export declare const fromEntryPattern: (specifier: string) => any;
|
|
6
|
+
export declare const isEntryPattern: (specifier: string) => any;
|
|
7
|
+
export declare const toProductionEntryPattern: (specifier: string) => any;
|
|
8
|
+
export declare const fromProductionEntryPattern: (specifier: string) => any;
|
|
9
|
+
export declare const isProductionEntryPattern: (specifier: string) => any;
|
package/dist/util/regex.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export declare const toRegexOrString: (value: string | RegExp) =>
|
|
2
|
-
export declare const findMatch: (haystack: undefined | (string | RegExp)[], needle: string) =>
|
|
1
|
+
export declare const toRegexOrString: (value: string | RegExp) => any;
|
|
2
|
+
export declare const findMatch: (haystack: undefined | (string | RegExp)[], needle: string) => any;
|
|
3
|
+
export declare const isIdChar: (text: string) => any;
|
package/dist/util/regex.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export const toRegexOrString = (value) => typeof value === 'string' && /[*+\\(|{^$]/.test(value) ? new RegExp(value) : value;
|
|
2
2
|
export const findMatch = (haystack, needle) => haystack?.find(n => (typeof n === 'string' ? n === needle : n.test(needle)));
|
|
3
|
+
const idCharMatch = /[a-zA-Z0-9$_]/;
|
|
4
|
+
export const isIdChar = (text) => idCharMatch.test(text);
|
package/dist/util/reporter.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ReporterOptions } from '../types/issues.js';
|
|
2
2
|
export declare const runPreprocessors: (data: ReporterOptions, processors?: any) => Promise<ReporterOptions>;
|
|
3
|
-
export declare const runReporters: (options: ReporterOptions) =>
|
|
3
|
+
export declare const runReporters: (options: ReporterOptions) => any;
|
package/dist/util/require.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const _require: NodeRequire;
|
|
2
2
|
export declare const _loadESLintConfig: (configFilePath: string) => any;
|
|
3
|
-
export declare const _resolve: (specifier: string) =>
|
|
4
|
-
export declare const _tryResolve: (specifier: string, from: string) =>
|
|
5
|
-
export declare const _resolveSpecifier: (dir: string, specifier: string) =>
|
|
3
|
+
export declare const _resolve: (specifier: string) => any;
|
|
4
|
+
export declare const _tryResolve: (specifier: string, from: string) => any;
|
|
5
|
+
export declare const _resolveSpecifier: (dir: string, specifier: string) => any;
|
package/dist/util/resolve.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const resolveSync: (specifier: string, containingFile: string, extensions?: string[]) =>
|
|
1
|
+
export declare const resolveSync: (specifier: string, containingFile: string, extensions?: string[]) => any;
|
package/dist/util/tag.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Tags } from '../types/cli.js';
|
|
2
|
-
export declare const splitTags: (rawTags: string[]) =>
|
|
2
|
+
export declare const splitTags: (rawTags: string[]) => any;
|
|
3
3
|
export declare const shouldIgnore: (jsDocTags: Set<string>, tags: Tags) => boolean;
|
|
4
|
-
export declare const getShouldIgnoreHandler: (
|
|
4
|
+
export declare const getShouldIgnoreHandler: (isProduction: boolean) => (jsDocTags: Set<string>) => any;
|
|
5
|
+
export declare const getShouldIgnoreTagHandler: (tags: Tags) => (jsDocTags: Set<string>) => boolean;
|
package/dist/util/tag.js
CHANGED
|
@@ -16,8 +16,8 @@ export const shouldIgnore = (jsDocTags, tags) => {
|
|
|
16
16
|
return true;
|
|
17
17
|
return false;
|
|
18
18
|
};
|
|
19
|
-
export const getShouldIgnoreHandler = (
|
|
19
|
+
export const getShouldIgnoreHandler = (isProduction) => (jsDocTags) => jsDocTags.has('@public') ||
|
|
20
20
|
jsDocTags.has('@beta') ||
|
|
21
21
|
jsDocTags.has('@alias') ||
|
|
22
|
-
shouldIgnore(jsDocTags, tags) ||
|
|
23
22
|
(isProduction && jsDocTags.has('@internal'));
|
|
23
|
+
export const getShouldIgnoreTagHandler = (tags) => (jsDocTags) => shouldIgnore(jsDocTags, tags);
|
package/dist/util/trace.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DependencyGraph } from '../types/dependency-graph.js';
|
|
2
|
-
declare const isTrace:
|
|
2
|
+
declare const isTrace: any;
|
|
3
3
|
type CreateNode = {
|
|
4
4
|
identifier?: string;
|
|
5
5
|
hasRef?: boolean;
|
|
@@ -16,5 +16,5 @@ export type TraceNode = {
|
|
|
16
16
|
export { isTrace };
|
|
17
17
|
export declare const printTrace: (node: TraceNode, filePath: string, identifier?: string) => void;
|
|
18
18
|
export declare const createNode: Create;
|
|
19
|
-
export declare const addNodes: (node: TraceNode, id: string, importedSymbols: DependencyGraph, filePaths?:
|
|
19
|
+
export declare const addNodes: (node: TraceNode, id: string, importedSymbols: DependencyGraph, filePaths?: any) => void;
|
|
20
20
|
export declare const createAndPrintTrace: (filePath: string, options?: CreateNode) => void;
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const loadTSConfig: (tsConfigFilePath: string) => Promise<{
|
|
3
|
-
isFile: boolean;
|
|
4
|
-
compilerOptions: ts.CompilerOptions;
|
|
5
|
-
definitionPaths: string[];
|
|
6
|
-
}>;
|
|
1
|
+
export declare const loadTSConfig: (tsConfigFilePath: string) => unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const unwrapFunction: (maybeFunction: unknown) =>
|
|
1
|
+
export declare const unwrapFunction: (maybeFunction: unknown) => unknown;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.
|
|
1
|
+
export declare const version = "5.23.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.
|
|
1
|
+
export const version = '5.23.1';
|