knip 5.23.0 → 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 +4 -4
- 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/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 -8
- package/dist/index.js +12 -10
- 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 +1 -1
- package/dist/reporters/json.d.ts +1 -1
- package/dist/reporters/util.d.ts +1 -1
- package/dist/typescript/SourceFileManager.d.ts +5 -5
- package/dist/typescript/ast-helpers.d.ts +7 -5
- package/dist/typescript/ast-helpers.js +15 -5
- package/dist/typescript/getImportsAndExports.d.ts +10 -11
- package/dist/typescript/getImportsAndExports.js +16 -7
- 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 -3
- 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 +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
|
@@ -49,14 +49,14 @@ const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options) =
|
|
|
49
49
|
const referencedSymbolsInExportedTypes = new Set();
|
|
50
50
|
const visitors = getVisitors(sourceFile);
|
|
51
51
|
const addInternalImport = (options) => {
|
|
52
|
-
const { identifier, symbol, filePath, namespace, specifier, isReExport } = options;
|
|
52
|
+
const { identifier, symbol, filePath, namespace, alias, specifier, isReExport } = options;
|
|
53
53
|
const isStar = identifier === IMPORT_STAR;
|
|
54
54
|
specifiers.add([specifier, filePath]);
|
|
55
55
|
const file = internalImports.get(filePath);
|
|
56
56
|
const imports = file ?? createImports();
|
|
57
57
|
if (!file)
|
|
58
58
|
internalImports.set(filePath, imports);
|
|
59
|
-
const nsOrAlias = symbol ? String(symbol.escapedName) :
|
|
59
|
+
const nsOrAlias = symbol ? String(symbol.escapedName) : alias;
|
|
60
60
|
if (isReExport) {
|
|
61
61
|
if (isStar && namespace) {
|
|
62
62
|
addValue(imports.reExportedNs, namespace, sourceFile.fileName);
|
|
@@ -224,7 +224,10 @@ const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options) =
|
|
|
224
224
|
const result = visitor(node, options);
|
|
225
225
|
result && (Array.isArray(result) ? result.forEach(addImportWithNode) : addImportWithNode(result));
|
|
226
226
|
}
|
|
227
|
-
const isTopLevel = node.parent
|
|
227
|
+
const isTopLevel = node.parent &&
|
|
228
|
+
('commonJsModuleIndicator' in sourceFile
|
|
229
|
+
? node.parent.parent === sourceFile || node.parent === sourceFile
|
|
230
|
+
: node.parent === sourceFile);
|
|
228
231
|
if (isTopLevel) {
|
|
229
232
|
for (const visitor of visitors.import) {
|
|
230
233
|
const result = visitor(node, options);
|
|
@@ -285,7 +288,7 @@ const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options) =
|
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
}
|
|
288
|
-
if (ignoreExportsUsedInFile && !isTopLevel && isReferencedInExportedType(node
|
|
291
|
+
if (ignoreExportsUsedInFile && !isTopLevel && isReferencedInExportedType(node)) {
|
|
289
292
|
referencedSymbolsInExportedTypes.add(symbol.exportSymbol);
|
|
290
293
|
}
|
|
291
294
|
}
|
|
@@ -308,14 +311,18 @@ const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options) =
|
|
|
308
311
|
const setRefs = (item) => {
|
|
309
312
|
if (!item.symbol)
|
|
310
313
|
return;
|
|
314
|
+
if (item.symbol.flags & ts.SymbolFlags.AliasExcludes) {
|
|
315
|
+
item.refs = [1, false];
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
311
318
|
const symbols = new Set();
|
|
312
319
|
let index = 0;
|
|
313
320
|
const text = sourceFile.text;
|
|
314
321
|
const id = item.identifier;
|
|
315
322
|
while (index < text.length && (index = text.indexOf(id, index)) !== -1) {
|
|
316
323
|
if (!isIdChar(text.charAt(index - 1)) && !isIdChar(text.charAt(index + id.length))) {
|
|
317
|
-
const
|
|
318
|
-
if (!
|
|
324
|
+
const isExportDeclaration = index === item.pos || index === item.pos + 1;
|
|
325
|
+
if (!isExportDeclaration) {
|
|
319
326
|
const symbol = typeChecker.getSymbolAtLocation(ts.getTokenAtPosition(sourceFile, index));
|
|
320
327
|
if (symbol) {
|
|
321
328
|
const isInExportedType = referencedSymbolsInExportedTypes.has(symbol);
|
|
@@ -342,9 +349,11 @@ const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options) =
|
|
|
342
349
|
index += id.length;
|
|
343
350
|
}
|
|
344
351
|
};
|
|
352
|
+
const isSetRefs = ignoreExportsUsedInFile;
|
|
345
353
|
for (const item of exports.values()) {
|
|
346
|
-
if (
|
|
354
|
+
if (isSetRefs === true || (typeof isSetRefs === 'object' && item.type !== 'unknown' && !!isSetRefs[item.type])) {
|
|
347
355
|
setRefs(item);
|
|
356
|
+
}
|
|
348
357
|
for (const member of item.members) {
|
|
349
358
|
setRefs(member);
|
|
350
359
|
member.symbol = undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
|
-
declare const _default: (sourceFile: ts.SourceFile) =>
|
|
2
|
+
declare const _default: (sourceFile: ts.SourceFile) => any;
|
|
3
3
|
export default _default;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
2
|
import { SymbolType } from '../../../types/issues.js';
|
|
3
3
|
import { compact } from '../../../util/array.js';
|
|
4
|
-
import { isGetOrSetAccessorDeclaration, isPrivateMember, stripQuotes } from '../../ast-helpers.js';
|
|
4
|
+
import { getDefaultKeywordNode, getExportKeywordNode, isGetOrSetAccessorDeclaration, isPrivateMember, stripQuotes, } from '../../ast-helpers.js';
|
|
5
5
|
import { exportVisitor as visit } from '../index.js';
|
|
6
6
|
export default visit(() => true, (node, { isFixExports, isFixTypes, isReportClassMembers }) => {
|
|
7
|
-
const exportKeyword = node
|
|
7
|
+
const exportKeyword = getExportKeywordNode(node);
|
|
8
8
|
if (exportKeyword) {
|
|
9
|
+
const getFix = (node, defaultKeyword) => isFixExports ? [node.getStart(), (defaultKeyword ?? node).getEnd() + 1] : undefined;
|
|
10
|
+
const getElementFix = (node) => (isFixExports ? [node.getStart(), node.getEnd()] : undefined);
|
|
11
|
+
const getTypeFix = (node) => (isFixTypes ? [node.getStart(), node.getEnd() + 1] : undefined);
|
|
9
12
|
if (ts.isVariableStatement(node)) {
|
|
10
13
|
return node.declarationList.declarations.flatMap(declaration => {
|
|
11
14
|
if (ts.isObjectBindingPattern(declaration.name)) {
|
|
12
15
|
return compact(declaration.name.elements.map(element => {
|
|
13
16
|
if (ts.isIdentifier(element.name)) {
|
|
14
|
-
const fix =
|
|
17
|
+
const fix = getElementFix(element);
|
|
15
18
|
return {
|
|
16
19
|
node: element,
|
|
17
20
|
identifier: element.name.escapedText.toString(),
|
|
@@ -25,7 +28,7 @@ export default visit(() => true, (node, { isFixExports, isFixTypes, isReportClas
|
|
|
25
28
|
if (ts.isArrayBindingPattern(declaration.name)) {
|
|
26
29
|
return compact(declaration.name.elements.map(element => {
|
|
27
30
|
if (ts.isBindingElement(element)) {
|
|
28
|
-
const fix =
|
|
31
|
+
const fix = getElementFix(element);
|
|
29
32
|
return {
|
|
30
33
|
node: element,
|
|
31
34
|
identifier: element.getText(),
|
|
@@ -37,34 +40,22 @@ export default visit(() => true, (node, { isFixExports, isFixTypes, isReportClas
|
|
|
37
40
|
}));
|
|
38
41
|
}
|
|
39
42
|
const identifier = declaration.name.getText();
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
identifier,
|
|
44
|
-
type: SymbolType.UNKNOWN,
|
|
45
|
-
pos: declaration.name.getStart(),
|
|
46
|
-
fix,
|
|
47
|
-
};
|
|
43
|
+
const pos = declaration.name.getStart();
|
|
44
|
+
const fix = getFix(exportKeyword);
|
|
45
|
+
return { node: declaration, identifier, type: SymbolType.UNKNOWN, pos, fix };
|
|
48
46
|
});
|
|
49
47
|
}
|
|
50
|
-
const defaultKeyword = node
|
|
48
|
+
const defaultKeyword = getDefaultKeywordNode(node);
|
|
51
49
|
if (ts.isFunctionDeclaration(node) && node.name) {
|
|
52
50
|
const identifier = defaultKeyword ? 'default' : node.name.getText();
|
|
53
51
|
const pos = (node.name ?? node.body ?? node).getStart();
|
|
54
|
-
const fix =
|
|
55
|
-
|
|
56
|
-
: undefined;
|
|
57
|
-
return {
|
|
58
|
-
node,
|
|
59
|
-
identifier,
|
|
60
|
-
pos,
|
|
61
|
-
type: SymbolType.FUNCTION,
|
|
62
|
-
fix,
|
|
63
|
-
};
|
|
52
|
+
const fix = getFix(exportKeyword, defaultKeyword);
|
|
53
|
+
return { node, identifier, pos, type: SymbolType.FUNCTION, fix };
|
|
64
54
|
}
|
|
65
55
|
if (ts.isClassDeclaration(node) && node.name) {
|
|
66
56
|
const identifier = defaultKeyword ? 'default' : node.name.getText();
|
|
67
57
|
const pos = (node.name ?? node).getStart();
|
|
58
|
+
const fix = getFix(exportKeyword, defaultKeyword);
|
|
68
59
|
const members = isReportClassMembers
|
|
69
60
|
? node.members
|
|
70
61
|
.filter((member) => (ts.isPropertyDeclaration(member) ||
|
|
@@ -79,43 +70,24 @@ export default visit(() => true, (node, { isFixExports, isFixTypes, isReportClas
|
|
|
79
70
|
fix: undefined,
|
|
80
71
|
}))
|
|
81
72
|
: [];
|
|
82
|
-
|
|
83
|
-
? [exportKeyword.getStart(), (defaultKeyword ?? exportKeyword).getEnd() + 1]
|
|
84
|
-
: undefined;
|
|
85
|
-
return {
|
|
86
|
-
node,
|
|
87
|
-
identifier,
|
|
88
|
-
type: SymbolType.CLASS,
|
|
89
|
-
pos,
|
|
90
|
-
members,
|
|
91
|
-
fix,
|
|
92
|
-
};
|
|
73
|
+
return { node, identifier, type: SymbolType.CLASS, pos, members, fix };
|
|
93
74
|
}
|
|
94
75
|
if (ts.isTypeAliasDeclaration(node)) {
|
|
95
|
-
const identifier =
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
identifier,
|
|
100
|
-
type: SymbolType.TYPE,
|
|
101
|
-
pos: node.name.getStart(),
|
|
102
|
-
fix,
|
|
103
|
-
};
|
|
76
|
+
const identifier = node.name.getText();
|
|
77
|
+
const pos = node.name.getStart();
|
|
78
|
+
const fix = getTypeFix(exportKeyword);
|
|
79
|
+
return { node, identifier, type: SymbolType.TYPE, pos, fix };
|
|
104
80
|
}
|
|
105
81
|
if (ts.isInterfaceDeclaration(node)) {
|
|
106
|
-
const identifier =
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
identifier,
|
|
111
|
-
type: SymbolType.INTERFACE,
|
|
112
|
-
pos: node.name.getStart(),
|
|
113
|
-
fix,
|
|
114
|
-
};
|
|
82
|
+
const identifier = node.name.getText();
|
|
83
|
+
const pos = node.name.getStart();
|
|
84
|
+
const fix = getTypeFix(exportKeyword);
|
|
85
|
+
return { node, identifier, type: SymbolType.INTERFACE, pos, fix };
|
|
115
86
|
}
|
|
116
87
|
if (ts.isEnumDeclaration(node)) {
|
|
117
|
-
const identifier =
|
|
88
|
+
const identifier = node.name.getText();
|
|
118
89
|
const pos = node.name.getStart();
|
|
90
|
+
const fix = getTypeFix(exportKeyword);
|
|
119
91
|
const members = node.members.map(member => ({
|
|
120
92
|
node: member,
|
|
121
93
|
identifier: stripQuotes(member.name.getText()),
|
|
@@ -123,15 +95,7 @@ export default visit(() => true, (node, { isFixExports, isFixTypes, isReportClas
|
|
|
123
95
|
type: SymbolType.MEMBER,
|
|
124
96
|
fix: undefined,
|
|
125
97
|
}));
|
|
126
|
-
|
|
127
|
-
return {
|
|
128
|
-
node,
|
|
129
|
-
identifier,
|
|
130
|
-
type: SymbolType.ENUM,
|
|
131
|
-
pos,
|
|
132
|
-
members,
|
|
133
|
-
fix,
|
|
134
|
-
};
|
|
98
|
+
return { node, identifier, type: SymbolType.ENUM, pos, members, fix };
|
|
135
99
|
}
|
|
136
100
|
}
|
|
137
101
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
|
-
declare const _default: (sourceFile: ts.SourceFile) =>
|
|
2
|
+
declare const _default: (sourceFile: ts.SourceFile) => any;
|
|
3
3
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
|
-
declare const _default: (sourceFile: ts.SourceFile) =>
|
|
2
|
+
declare const _default: (sourceFile: ts.SourceFile) => any;
|
|
3
3
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type ts from 'typescript';
|
|
2
|
-
declare const _default: (sourceFile: ts.SourceFile) =>
|
|
2
|
+
declare const _default: (sourceFile: ts.SourceFile) => any;
|
|
3
3
|
export default _default;
|
|
@@ -15,11 +15,11 @@ declare class Performance {
|
|
|
15
15
|
private clearMark;
|
|
16
16
|
private flush;
|
|
17
17
|
private getEntriesByName;
|
|
18
|
-
getTable():
|
|
18
|
+
getTable(): any;
|
|
19
19
|
getCurrentDurationInMs(startTime?: number): number;
|
|
20
20
|
getMemHeapUsage(): number;
|
|
21
21
|
getCurrentMemUsageInMb(): number;
|
|
22
|
-
finalize():
|
|
22
|
+
finalize(): any;
|
|
23
23
|
reset(): void;
|
|
24
24
|
}
|
|
25
25
|
export declare const perfObserver: Performance;
|
package/dist/util/array.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Collection<T> = Array<T> | Set<T>;
|
|
2
|
-
export declare const compact: <T>(collection: Collection<T | undefined>) =>
|
|
3
|
-
export declare const arrayify: (value?: string[] | string) => string[];
|
|
2
|
+
export declare const compact: <T>(collection: Collection<T | undefined>) => any;
|
|
3
|
+
export declare const arrayify: (value?: string[] | string) => string | string[] | undefined;
|
|
4
4
|
export declare const partition: <T>(collection: T[], predicate: (item: T) => unknown) => [T[], T[]];
|
|
5
5
|
export {};
|
package/dist/util/errors.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export declare class LoaderError extends Error {
|
|
|
9
9
|
export declare const isKnownError: (error: Error) => error is ConfigurationError | LoaderError | ZodError<any>;
|
|
10
10
|
export declare const hasCause: (error: Error) => error is ErrorWithCause;
|
|
11
11
|
export declare const isConfigurationError: (error: Error) => error is ConfigurationError;
|
|
12
|
-
export declare const getKnownError: (error: Error) =>
|
|
12
|
+
export declare const getKnownError: (error: Error) => any;
|
|
13
13
|
export {};
|
|
@@ -13,17 +13,14 @@ export type FileDescriptor<T> = {
|
|
|
13
13
|
};
|
|
14
14
|
export declare class FileEntryCache<T> {
|
|
15
15
|
filePath: string;
|
|
16
|
-
cache:
|
|
17
|
-
normalizedEntries:
|
|
16
|
+
cache: any;
|
|
17
|
+
normalizedEntries: any;
|
|
18
18
|
constructor(cacheId: string, _path: string);
|
|
19
19
|
removeNotFoundFiles(): void;
|
|
20
20
|
getFileDescriptor(filePath: string): FileDescriptor<T>;
|
|
21
21
|
_getFileDescriptorUsingMtimeAndSize(filePath: string, fstat: fs.Stats): FileDescriptor<T>;
|
|
22
22
|
removeEntry(entryName: string): void;
|
|
23
|
-
_getMetaForFileUsingMtimeAndSize(cacheEntry: FileDescriptor<T>):
|
|
24
|
-
size: number;
|
|
25
|
-
mtime: number;
|
|
26
|
-
};
|
|
23
|
+
_getMetaForFileUsingMtimeAndSize(cacheEntry: FileDescriptor<T>): any;
|
|
27
24
|
reconcile(): void;
|
|
28
25
|
}
|
|
29
26
|
export {};
|
package/dist/util/fs.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare const isDirectory: (filePath: string) => boolean;
|
|
2
2
|
export declare const isFile: (filePath: string) => boolean;
|
|
3
3
|
export declare const findFile: (workingDir: string, fileName: string) => string | undefined;
|
|
4
|
-
export declare const loadFile: (filePath: string) =>
|
|
5
|
-
export declare const loadJSON: (filePath: string) =>
|
|
6
|
-
export declare const loadYAML: (filePath: string) =>
|
|
7
|
-
export declare const loadTOML: (filePath: string) =>
|
|
8
|
-
export declare const parseJSON: (filePath: string, contents: string) =>
|
|
4
|
+
export declare const loadFile: (filePath: string) => unknown;
|
|
5
|
+
export declare const loadJSON: (filePath: string) => unknown;
|
|
6
|
+
export declare const loadYAML: (filePath: string) => unknown;
|
|
7
|
+
export declare const loadTOML: (filePath: string) => unknown;
|
|
8
|
+
export declare const parseJSON: (filePath: string, contents: string) => unknown;
|
|
9
9
|
export declare const parseYAML: (contents: string) => unknown;
|
|
10
10
|
export declare function isTypeModule(path: string): boolean;
|
|
11
|
-
export declare const _loadJSON: (filePath: string) =>
|
|
11
|
+
export declare const _loadJSON: (filePath: string) => unknown;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Report } from '../types/issues.js';
|
|
2
1
|
type CLIArguments = {
|
|
3
2
|
include: string[];
|
|
4
3
|
exclude: string[];
|
|
@@ -14,5 +13,5 @@ type Options = {
|
|
|
14
13
|
exports?: boolean;
|
|
15
14
|
};
|
|
16
15
|
export declare const defaultExcludedIssueTypes: string[];
|
|
17
|
-
export declare const getIncludedIssueTypes: (cliArgs: CLIArguments, { include, exclude, isProduction }?: Options) =>
|
|
16
|
+
export declare const getIncludedIssueTypes: (cliArgs: CLIArguments, { include, exclude, isProduction }?: Options) => any;
|
|
18
17
|
export {};
|
package/dist/util/git.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getGitHookPaths: (defaultPath?: string, followGitConfig?: boolean) =>
|
|
1
|
+
export declare const getGitHookPaths: (defaultPath?: string, followGitConfig?: boolean) => any;
|
package/dist/util/glob.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const prependDirToPattern: (workingDir: string, pattern: string) => string;
|
|
2
|
-
export declare const negate: (pattern: string) =>
|
|
3
|
-
export declare const hasProductionSuffix: (pattern: string) =>
|
|
2
|
+
export declare const negate: (pattern: string) => any;
|
|
3
|
+
export declare const hasProductionSuffix: (pattern: string) => any;
|
|
4
4
|
export declare const hasNoProductionSuffix: (pattern: string) => boolean;
|
|
5
5
|
interface BaseGlobOptions {
|
|
6
6
|
cwd: string;
|
|
@@ -10,8 +10,8 @@ interface BaseGlobOptions {
|
|
|
10
10
|
interface GlobOptions extends BaseGlobOptions {
|
|
11
11
|
workingDir?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const _glob: ({ cwd, workingDir, patterns, gitignore }: GlobOptions) =>
|
|
14
|
-
export declare const _pureGlob: ({ cwd, patterns, gitignore }: BaseGlobOptions) =>
|
|
15
|
-
export declare const _firstGlob: ({ cwd, patterns }: BaseGlobOptions) =>
|
|
16
|
-
export declare const _dirGlob: ({ cwd, patterns, gitignore }: BaseGlobOptions) =>
|
|
13
|
+
export declare const _glob: ({ cwd, workingDir, patterns, gitignore }: GlobOptions) => unknown;
|
|
14
|
+
export declare const _pureGlob: ({ cwd, patterns, gitignore }: BaseGlobOptions) => unknown;
|
|
15
|
+
export declare const _firstGlob: ({ cwd, patterns }: BaseGlobOptions) => unknown;
|
|
16
|
+
export declare const _dirGlob: ({ cwd, patterns, gitignore }: BaseGlobOptions) => unknown;
|
|
17
17
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ConfigurationChief, Workspace } from '../ConfigurationChief.js';
|
|
2
2
|
import type { DependencyDeputy } from '../DependencyDeputy.js';
|
|
3
3
|
import type { IssueCollector } from '../IssueCollector.js';
|
|
4
|
-
export declare const getHandler: (collector: IssueCollector, deputy: DependencyDeputy, chief: ConfigurationChief) => (specifier: string, containingFilePath: string, workspace: Workspace) =>
|
|
4
|
+
export declare const getHandler: (collector: IssueCollector, deputy: DependencyDeputy, chief: ConfigurationChief) => (specifier: string, containingFilePath: string, workspace: Workspace) => any;
|
|
@@ -5,5 +5,5 @@ type Result = {
|
|
|
5
5
|
reExportingEntryFile: undefined | string;
|
|
6
6
|
traceNode: TraceNode;
|
|
7
7
|
};
|
|
8
|
-
export declare const getIsIdentifierReferencedHandler: (graph: DependencyGraph, entryPaths: Set<string>) => (filePath: string, id: string, isIncludeEntryExports?: boolean, traceNode?: TraceNode, seen?:
|
|
8
|
+
export declare const getIsIdentifierReferencedHandler: (graph: DependencyGraph, entryPaths: Set<string>) => (filePath: string, id: string, isIncludeEntryExports?: boolean, traceNode?: TraceNode, seen?: any) => Result;
|
|
9
9
|
export {};
|
package/dist/util/loader.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const _load: (filePath: string) =>
|
|
1
|
+
export declare const _load: (filePath: string) => unknown;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function mapWorkspaces(cwd: string, workspaces: string[]): Promise<Map<string, Package>[]>;
|
|
1
|
+
export default function mapWorkspaces(cwd: string, workspaces: string[]): unknown;
|
package/dist/util/modules.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { PackageJson } from '../types/package-json.js';
|
|
2
|
-
export declare const getPackageNameFromModuleSpecifier: (moduleSpecifier: string) =>
|
|
3
|
-
export declare const getPackageNameFromFilePath: (value: string) =>
|
|
4
|
-
export declare const normalizeSpecifierFromFilePath: (value: string) =>
|
|
5
|
-
export declare const isStartsLikePackageName: (specifier: string) =>
|
|
6
|
-
export declare const isDefinitelyTyped: (packageName: string) =>
|
|
2
|
+
export declare const getPackageNameFromModuleSpecifier: (moduleSpecifier: string) => any;
|
|
3
|
+
export declare const getPackageNameFromFilePath: (value: string) => any;
|
|
4
|
+
export declare const normalizeSpecifierFromFilePath: (value: string) => any;
|
|
5
|
+
export declare const isStartsLikePackageName: (specifier: string) => any;
|
|
6
|
+
export declare const isDefinitelyTyped: (packageName: string) => any;
|
|
7
7
|
export declare const getDefinitelyTypedFor: (packageName: string) => string;
|
|
8
8
|
export declare const getPackageFromDefinitelyTyped: (typedDependency: string) => string;
|
|
9
9
|
export declare const getEntryPathFromManifest: (manifest: PackageJson, sharedGlobOptions: {
|
|
@@ -11,5 +11,5 @@ export declare const getEntryPathFromManifest: (manifest: PackageJson, sharedGlo
|
|
|
11
11
|
workingDir: string;
|
|
12
12
|
gitignore: boolean;
|
|
13
13
|
ignore: string[];
|
|
14
|
-
}) =>
|
|
15
|
-
export declare const sanitizeSpecifier: (specifier: string) =>
|
|
14
|
+
}) => unknown;
|
|
15
|
+
export declare const sanitizeSpecifier: (specifier: string) => any;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { PackageJson } from '../types/package-json.js';
|
|
2
|
-
declare const INDENT: unique symbol;
|
|
3
|
-
declare const NEWLINE: unique symbol;
|
|
4
2
|
interface ExtendedPackageJson extends PackageJson {
|
|
5
|
-
[INDENT]?: string;
|
|
6
|
-
[NEWLINE]?: string;
|
|
7
3
|
}
|
|
8
|
-
export declare const load: (filePath: string) =>
|
|
9
|
-
export declare const save: (filePath: string, content: ExtendedPackageJson) =>
|
|
4
|
+
export declare const load: (filePath: string) => unknown;
|
|
5
|
+
export declare const save: (filePath: string, content: ExtendedPackageJson) => any;
|
|
10
6
|
export {};
|
package/dist/util/path.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ export declare const dirname: (path: string) => string;
|
|
|
3
3
|
export declare const extname: (path: string) => string;
|
|
4
4
|
export declare const basename: (path: string, suffix?: string) => string;
|
|
5
5
|
export declare const join: (...paths: string[]) => string;
|
|
6
|
-
export declare const toPosix: (value: string) =>
|
|
7
|
-
export declare const cwd:
|
|
6
|
+
export declare const toPosix: (value: string) => any;
|
|
7
|
+
export declare const cwd: any;
|
|
8
8
|
export declare const resolve: (...paths: string[]) => string;
|
|
9
|
-
export declare const relative: (from: string, to?: string) =>
|
|
10
|
-
export declare const isInNodeModules: (filePath: string) =>
|
|
9
|
+
export declare const relative: (from: string, to?: string) => any;
|
|
10
|
+
export declare const isInNodeModules: (filePath: string) => any;
|
|
11
11
|
export declare const toAbsolute: (id: string, base?: string) => string;
|
|
12
|
-
export declare const toRelative: (id: string) =>
|
|
13
|
-
export declare const isInternal: (id: string) =>
|
|
12
|
+
export declare const toRelative: (id: string) => any;
|
|
13
|
+
export declare const isInternal: (id: string) => any;
|
|
@@ -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,3 +1,3 @@
|
|
|
1
|
-
export declare const toRegexOrString: (value: string | RegExp) =>
|
|
2
|
-
export declare const findMatch: (haystack: undefined | (string | RegExp)[], needle: string) =>
|
|
3
|
-
export declare const isIdChar: (text: 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/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,5 +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: (isProduction: boolean) => (jsDocTags: Set<string>) =>
|
|
4
|
+
export declare const getShouldIgnoreHandler: (isProduction: boolean) => (jsDocTags: Set<string>) => any;
|
|
5
5
|
export declare const getShouldIgnoreTagHandler: (tags: Tags) => (jsDocTags: Set<string>) => boolean;
|
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.23.
|
|
1
|
+
export declare const version = "5.23.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.23.
|
|
1
|
+
export const version = '5.23.1';
|