knip 5.55.0 → 5.55.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/ConsoleStreamer.d.ts +1 -1
- package/dist/ConsoleStreamer.js +2 -2
- package/dist/constants.js +1 -0
- package/dist/graph/analyze.js +1 -1
- package/dist/graph/build.js +3 -3
- package/dist/index.js +1 -1
- package/dist/plugins/webpack/index.js +9 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/ConsoleStreamer.js
CHANGED
|
@@ -21,13 +21,13 @@ export class ConsoleStreamer {
|
|
|
21
21
|
process.stdout.write(`${messages.join('\n')}\n`);
|
|
22
22
|
this.lines = messages.length;
|
|
23
23
|
}
|
|
24
|
-
cast(message) {
|
|
24
|
+
cast(message, sub) {
|
|
25
25
|
if (!this.isEnabled)
|
|
26
26
|
return;
|
|
27
27
|
if (Array.isArray(message))
|
|
28
28
|
this.update(message);
|
|
29
29
|
else
|
|
30
|
-
this.update([message]);
|
|
30
|
+
this.update([`${message}${!sub || sub === '.' ? '' : ` (${sub})`}…`]);
|
|
31
31
|
}
|
|
32
32
|
clear() {
|
|
33
33
|
if (!this.isEnabled)
|
package/dist/constants.js
CHANGED
package/dist/graph/analyze.js
CHANGED
|
@@ -23,7 +23,7 @@ export const analyze = async (options) => {
|
|
|
23
23
|
: ignoreExportsUsedInFile));
|
|
24
24
|
const analyzeGraph = async () => {
|
|
25
25
|
if (isReportValues || isReportTypes) {
|
|
26
|
-
streamer.cast('Connecting the dots
|
|
26
|
+
streamer.cast('Connecting the dots');
|
|
27
27
|
for (const [filePath, file] of graph.entries()) {
|
|
28
28
|
const exportItems = file.exports;
|
|
29
29
|
if (!exportItems || exportItems.size === 0)
|
package/dist/graph/build.js
CHANGED
|
@@ -29,7 +29,7 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
|
|
|
29
29
|
}
|
|
30
30
|
for (const workspace of workspaces) {
|
|
31
31
|
const { name, dir, ancestors, pkgName } = workspace;
|
|
32
|
-
streamer.cast(
|
|
32
|
+
streamer.cast('Analyzing workspace', name);
|
|
33
33
|
const manifest = chief.getManifestForWorkspace(name);
|
|
34
34
|
if (!manifest) {
|
|
35
35
|
continue;
|
|
@@ -276,10 +276,10 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
|
|
|
276
276
|
continue;
|
|
277
277
|
principal.init();
|
|
278
278
|
if (principal.asyncCompilers.size > 0) {
|
|
279
|
-
streamer.cast('Running async compilers
|
|
279
|
+
streamer.cast('Running async compilers');
|
|
280
280
|
await principal.runAsyncCompilers();
|
|
281
281
|
}
|
|
282
|
-
streamer.cast(
|
|
282
|
+
streamer.cast('Analyzing source files', toRelative(principal.cwd));
|
|
283
283
|
let size = principal.entryPaths.size;
|
|
284
284
|
let round = 0;
|
|
285
285
|
do {
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export const main = async (unresolvedConfiguration) => {
|
|
|
18
18
|
const deputy = new DependencyDeputy({ isProduction, isStrict });
|
|
19
19
|
const factory = new PrincipalFactory();
|
|
20
20
|
const streamer = new ConsoleStreamer({ isEnabled: isShowProgress });
|
|
21
|
-
streamer.cast('Reading workspace configuration
|
|
21
|
+
streamer.cast('Reading workspace configuration');
|
|
22
22
|
await chief.init();
|
|
23
23
|
const workspaces = chief.getWorkspaces();
|
|
24
24
|
const report = chief.getIncludedIssueTypes({
|
|
@@ -57,8 +57,8 @@ const resolveUseItem = (use) => {
|
|
|
57
57
|
return [];
|
|
58
58
|
};
|
|
59
59
|
export const findWebpackDependenciesFromConfig = async (config, options) => {
|
|
60
|
-
const { cwd } = options;
|
|
61
|
-
const passes = typeof config === 'function' ? [false, true] : [
|
|
60
|
+
const { cwd, isProduction } = options;
|
|
61
|
+
const passes = typeof config === 'function' ? [false, true] : [isProduction];
|
|
62
62
|
const inputs = new Set();
|
|
63
63
|
for (const isProduction of passes) {
|
|
64
64
|
const mode = isProduction ? 'production' : 'development';
|
|
@@ -98,16 +98,16 @@ export const findWebpackDependenciesFromConfig = async (config, options) => {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
for (const entry of entries) {
|
|
101
|
-
if (
|
|
102
|
-
inputs.add(toDependency(entry));
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
101
|
+
if (isInternal(entry)) {
|
|
105
102
|
const dir = opts.context ? opts.context : cwd;
|
|
106
|
-
const input =
|
|
107
|
-
?
|
|
108
|
-
:
|
|
103
|
+
const input = isProduction
|
|
104
|
+
? toDeferResolveProductionEntry(entry, { dir })
|
|
105
|
+
: toDeferResolveEntry(entry, { dir });
|
|
109
106
|
inputs.add(input);
|
|
110
107
|
}
|
|
108
|
+
else {
|
|
109
|
+
inputs.add(toDeferResolve(entry));
|
|
110
|
+
}
|
|
111
111
|
}
|
|
112
112
|
if (opts.resolve?.alias) {
|
|
113
113
|
const addStar = (value) => (value.endsWith('*') ? value : join(value, '*').replace(/\/\*\*$/, '/*'));
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.55.
|
|
1
|
+
export declare const version = "5.55.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.55.
|
|
1
|
+
export const version = '5.55.1';
|