knip 5.64.2 → 5.64.3
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.
|
@@ -18,7 +18,9 @@ const resolveConfig = async (config, options) => {
|
|
|
18
18
|
if (!config)
|
|
19
19
|
return [];
|
|
20
20
|
const inputs = new Set();
|
|
21
|
-
for (const entry of Object.
|
|
21
|
+
for (const [key, entry] of Object.entries(config)) {
|
|
22
|
+
if (key.startsWith('_'))
|
|
23
|
+
continue;
|
|
22
24
|
const scripts = [typeof entry === 'function' ? await entry([]) : entry].flat();
|
|
23
25
|
for (const id of options.getInputsFromScripts(scripts))
|
|
24
26
|
inputs.add(id);
|
|
@@ -97,6 +97,8 @@ export const findWebpackDependenciesFromConfig = async (config, options) => {
|
|
|
97
97
|
entries.push(entry['filename']);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
+
if (entries.length === 0 && opts.context)
|
|
101
|
+
entries.push('./src/index');
|
|
100
102
|
for (const entry of entries) {
|
|
101
103
|
if (isInternal(entry)) {
|
|
102
104
|
const dir = opts.context ? opts.context : cwd;
|
|
@@ -97,7 +97,7 @@ export const createOptions = async (options) => {
|
|
|
97
97
|
isShowProgress: parsedCLIArgs['no-progress'] === false && process.stdout.isTTY && typeof process.stdout.cursorTo === 'function',
|
|
98
98
|
isSkipLibs: !(isIncludeLibs || includedIssueTypes.classMembers),
|
|
99
99
|
isStrict,
|
|
100
|
-
isTrace: parsedCLIArgs.trace ??
|
|
100
|
+
isTrace: Boolean(parsedCLIArgs.trace ?? parsedCLIArgs['trace-file'] ?? parsedCLIArgs['trace-export']),
|
|
101
101
|
isTreatConfigHintsAsErrors: parsedCLIArgs['treat-config-hints-as-errors'] ?? parsedConfig.treatConfigHintsAsErrors ?? false,
|
|
102
102
|
isWatch: parsedCLIArgs.watch ?? rest.isWatch ?? false,
|
|
103
103
|
parsedConfig,
|
package/dist/util/loader.js
CHANGED
|
@@ -21,7 +21,7 @@ const load = async (filePath) => {
|
|
|
21
21
|
if (ext === '' && isInternal(filePath)) {
|
|
22
22
|
return await loadFile(filePath);
|
|
23
23
|
}
|
|
24
|
-
if (ext === '.json' || ext === '.jsonc') {
|
|
24
|
+
if (ext === '.json' || ext === '.jsonc' || ext === '.json5') {
|
|
25
25
|
return await loadJSON(filePath);
|
|
26
26
|
}
|
|
27
27
|
if (typeof Bun !== 'undefined') {
|
package/dist/util/trace.js
CHANGED
|
@@ -33,7 +33,7 @@ const renderTrace = (node, level = 0, levels = new Set()) => {
|
|
|
33
33
|
export const printTrace = (node, filePath, options, identifier) => {
|
|
34
34
|
if (!options.isTrace)
|
|
35
35
|
return;
|
|
36
|
-
if (options.traceExport && identifier
|
|
36
|
+
if (options.traceExport && identifier !== options.traceExport)
|
|
37
37
|
return;
|
|
38
38
|
if (options.traceFile && filePath !== toAbsolute(options.traceFile, options.cwd))
|
|
39
39
|
return;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.64.
|
|
1
|
+
export declare const version = "5.64.3";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.64.
|
|
1
|
+
export const version = '5.64.3';
|