dep-up-surgeon 2.2.1 → 2.2.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/README.md +47 -2
- package/dist/cli/doctor.d.ts +52 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +616 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/doctorCommand.d.ts +2 -0
- package/dist/cli/doctorCommand.d.ts.map +1 -0
- package/dist/cli/doctorCommand.js +71 -0
- package/dist/cli/doctorCommand.js.map +1 -0
- package/dist/cli/doctorRenderer.d.ts +21 -0
- package/dist/cli/doctorRenderer.d.ts.map +1 -0
- package/dist/cli/doctorRenderer.js +79 -0
- package/dist/cli/doctorRenderer.js.map +1 -0
- package/dist/cli/report.d.ts +2 -0
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +4 -0
- package/dist/cli/report.js.map +1 -1
- package/dist/cli.js +14 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/upgrader.d.ts +18 -6
- package/dist/core/upgrader.d.ts.map +1 -1
- package/dist/core/upgrader.js +56 -11
- package/dist/core/upgrader.js.map +1 -1
- package/dist/core/workspaces.d.ts +22 -0
- package/dist/core/workspaces.d.ts.map +1 -1
- package/dist/core/workspaces.js +52 -0
- package/dist/core/workspaces.js.map +1 -1
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/concurrency.d.ts +36 -0
- package/dist/utils/concurrency.d.ts.map +1 -1
- package/dist/utils/concurrency.js +45 -0
- package/dist/utils/concurrency.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--doctor` read-only diagnostic.
|
|
3
|
+
*
|
|
4
|
+
* Runs a suite of read-only checks against the current project and returns a traffic-light
|
|
5
|
+
* report — one entry per check with `status: 'green' | 'yellow' | 'red'`, a short human
|
|
6
|
+
* message, and an optional `hint` with a remediation pointer. No mutations, no installs, no
|
|
7
|
+
* network-exclusive blocking calls (audit is opt-out for air-gapped setups).
|
|
8
|
+
*
|
|
9
|
+
* Designed to be safe to run as a CI pre-check: the exit code maps `red → 2`, `yellow → 1`,
|
|
10
|
+
* `green → 0` (or `--strict` promotes yellow to exit 1 for stricter gates).
|
|
11
|
+
*
|
|
12
|
+
* Checks currently implemented (stable ordering, so downstream diffs stay readable):
|
|
13
|
+
*
|
|
14
|
+
* 1. **node-version** — current Node satisfies `engines.node`, if set.
|
|
15
|
+
* 2. **manager** — a package manager was resolved (lockfile + binary match).
|
|
16
|
+
* 3. **lockfile** — lockfile is present, parseable, and matches the manager.
|
|
17
|
+
* 4. **workspace-coherence** — detected workspace members resolve on disk + have `package.json`.
|
|
18
|
+
* 5. **policy** — `.dep-up-surgeon.policy.{yaml,json}` (when present) parses
|
|
19
|
+
* without warnings.
|
|
20
|
+
* 6. **preflight-validator** — user's `--validate` / auto-detected `<mgr> test` passes RIGHT NOW,
|
|
21
|
+
* before any upgrades. Skipped when `--no-validate` (doctor
|
|
22
|
+
* respects the same flag plumbing as the upgrade flow).
|
|
23
|
+
* 7. **peer-deps** — scan installed tree for existing peer-dep warnings via a
|
|
24
|
+
* `<mgr> ls --all` (npm) or equivalent — catches "already
|
|
25
|
+
* broken before you asked me to upgrade anything" cases.
|
|
26
|
+
* 8. **audit** — `<mgr> audit` dry-run + severity breakdown. Treated as
|
|
27
|
+
* YELLOW for low/moderate, RED for high/critical.
|
|
28
|
+
* 9. **stale-transitives** — reuses `scanStaleTransitives` from `lockfileFix.ts` to flag
|
|
29
|
+
* transitives > 1 minor or a full major behind registry latest.
|
|
30
|
+
* Informational (YELLOW); never blocks.
|
|
31
|
+
*
|
|
32
|
+
* Explicitly NOT a check (yet):
|
|
33
|
+
* - changelog fetch reachability — too flaky across corporate proxies and too many false
|
|
34
|
+
* positives to be useful as a CI gate.
|
|
35
|
+
* - `npm whoami` / auth — out of scope; doctor reports project health, not credentials.
|
|
36
|
+
*/
|
|
37
|
+
import path from 'node:path';
|
|
38
|
+
import fs from 'fs-extra';
|
|
39
|
+
import semver from 'semver';
|
|
40
|
+
import { execa } from 'execa';
|
|
41
|
+
import { detectProjectInfo } from '../core/workspaces.js';
|
|
42
|
+
import { validateProject } from '../core/validator.js';
|
|
43
|
+
import { runAudit } from '../core/audit.js';
|
|
44
|
+
import { tailLines } from '../utils/output.js';
|
|
45
|
+
import { createRegistryCache, runWithConcurrency } from '../utils/concurrency.js';
|
|
46
|
+
import { parseLockfileInstalledVersions } from './lockfileFix.js';
|
|
47
|
+
import { loadPolicy } from '../config/policy.js';
|
|
48
|
+
import { fetchLatestVersion } from '../utils/npm.js';
|
|
49
|
+
/**
|
|
50
|
+
* Public entry point. Runs every enabled check in sequence (checks are cheap enough that
|
|
51
|
+
* serial keeps the log predictable; we don't gain anything by racing them). Never throws —
|
|
52
|
+
* a check that explodes returns `red` with the error as the `message` so downstream renderers
|
|
53
|
+
* still see a complete report.
|
|
54
|
+
*/
|
|
55
|
+
export async function runDoctor(opts) {
|
|
56
|
+
const { cwd, toolVersion } = opts;
|
|
57
|
+
const checks = [];
|
|
58
|
+
// 1. Node version gate — runs first because everything downstream assumes a working Node.
|
|
59
|
+
checks.push(await nodeVersionCheck(cwd));
|
|
60
|
+
// 2. Project info is load-bearing for every downstream check. If detection itself errors
|
|
61
|
+
// we short-circuit and emit a single red check + empty remainder so the report is still
|
|
62
|
+
// structured output rather than an exception.
|
|
63
|
+
let info;
|
|
64
|
+
try {
|
|
65
|
+
info = await detectProjectInfo(cwd);
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
checks.push({
|
|
69
|
+
id: 'manager',
|
|
70
|
+
label: 'Package manager',
|
|
71
|
+
status: 'red',
|
|
72
|
+
message: `Failed to detect project info: ${e instanceof Error ? e.message : String(e)}`,
|
|
73
|
+
hint: 'Ensure this directory contains a readable `package.json`.',
|
|
74
|
+
});
|
|
75
|
+
return finalize(checks, cwd, toolVersion);
|
|
76
|
+
}
|
|
77
|
+
checks.push(managerCheck(info));
|
|
78
|
+
checks.push(await lockfileCheck(cwd, info));
|
|
79
|
+
checks.push(workspaceCoherenceCheck(info));
|
|
80
|
+
checks.push(await policyCheck(cwd));
|
|
81
|
+
checks.push(await preflightValidatorCheck(cwd, info, opts));
|
|
82
|
+
checks.push(await peerDepsCheck(cwd, info, opts));
|
|
83
|
+
checks.push(await auditCheck(cwd, info, opts));
|
|
84
|
+
checks.push(await staleTransitiveCheck(cwd, info, opts));
|
|
85
|
+
return finalize(checks, cwd, toolVersion);
|
|
86
|
+
}
|
|
87
|
+
function finalize(checks, cwd, toolVersion) {
|
|
88
|
+
const counts = { green: 0, yellow: 0, red: 0 };
|
|
89
|
+
for (const c of checks)
|
|
90
|
+
counts[c.status]++;
|
|
91
|
+
const overall = counts.red > 0 ? 'red' : counts.yellow > 0 ? 'yellow' : 'green';
|
|
92
|
+
return { cwd, toolVersion, checks, overall, counts };
|
|
93
|
+
}
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Individual checks
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
async function nodeVersionCheck(cwd) {
|
|
98
|
+
const current = process.version.replace(/^v/, '');
|
|
99
|
+
try {
|
|
100
|
+
const pkg = (await fs.readJson(path.join(cwd, 'package.json')));
|
|
101
|
+
const engines = pkg.engines;
|
|
102
|
+
const range = engines?.node;
|
|
103
|
+
if (!range) {
|
|
104
|
+
return {
|
|
105
|
+
id: 'node-version',
|
|
106
|
+
label: 'Node version',
|
|
107
|
+
status: 'green',
|
|
108
|
+
message: `Running Node ${current} (no \`engines.node\` set, so nothing to enforce).`,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (semver.satisfies(current, range, { includePrerelease: true })) {
|
|
112
|
+
return {
|
|
113
|
+
id: 'node-version',
|
|
114
|
+
label: 'Node version',
|
|
115
|
+
status: 'green',
|
|
116
|
+
message: `Node ${current} satisfies \`engines.node: ${range}\`.`,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
id: 'node-version',
|
|
121
|
+
label: 'Node version',
|
|
122
|
+
status: 'red',
|
|
123
|
+
message: `Node ${current} does NOT satisfy \`engines.node: ${range}\`.`,
|
|
124
|
+
hint: `Switch to a compatible Node version (e.g. via \`nvm use\`) before running the upgrade loop. Installing with a mismatched Node will tear down peer-dep resolution in ways that look like CVE-driven failures.`,
|
|
125
|
+
data: { current, required: range },
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return {
|
|
130
|
+
id: 'node-version',
|
|
131
|
+
label: 'Node version',
|
|
132
|
+
status: 'yellow',
|
|
133
|
+
message: `Running Node ${current}; \`package.json\` was not readable.`,
|
|
134
|
+
hint: 'Unable to read `package.json` — the upgrade flow will also fail to read it.',
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function managerCheck(info) {
|
|
139
|
+
// We have no way of telling "the user set packageManager to pnpm but only package-lock.json
|
|
140
|
+
// exists" without reading both — the detector already resolves this, but we want the doctor
|
|
141
|
+
// to call out the discrepancy explicitly rather than silently preferring one.
|
|
142
|
+
const issues = [];
|
|
143
|
+
if (info.managerSource === 'default') {
|
|
144
|
+
issues.push('no lockfile + no `packageManager` field detected; falling back to npm');
|
|
145
|
+
}
|
|
146
|
+
const ambiguous = countLockfileKinds(info);
|
|
147
|
+
if (ambiguous > 1) {
|
|
148
|
+
issues.push(`${ambiguous} lockfiles present at the project root — pick one and delete the others before upgrading`);
|
|
149
|
+
}
|
|
150
|
+
if (issues.length === 0) {
|
|
151
|
+
return {
|
|
152
|
+
id: 'manager',
|
|
153
|
+
label: 'Package manager',
|
|
154
|
+
status: 'green',
|
|
155
|
+
message: `Detected ${info.manager}${info.managerVersion ? '@' + info.managerVersion : ''} via ${info.managerSource}.`,
|
|
156
|
+
data: {
|
|
157
|
+
manager: info.manager,
|
|
158
|
+
managerVersion: info.managerVersion,
|
|
159
|
+
source: info.managerSource,
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
id: 'manager',
|
|
165
|
+
label: 'Package manager',
|
|
166
|
+
status: 'yellow',
|
|
167
|
+
message: `Resolved ${info.manager}, but: ${issues.join('; ')}.`,
|
|
168
|
+
hint: 'Set `"packageManager": "<mgr>@<version>"` in `package.json` and keep exactly one lockfile committed.',
|
|
169
|
+
data: { issues },
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/** Count how many of the three lockfile kinds exist alongside the detected one. */
|
|
173
|
+
function countLockfileKinds(info) {
|
|
174
|
+
const { cwd } = info;
|
|
175
|
+
let n = 0;
|
|
176
|
+
for (const name of ['package-lock.json', 'pnpm-lock.yaml', 'yarn.lock']) {
|
|
177
|
+
if (fs.existsSync(path.join(cwd, name)))
|
|
178
|
+
n++;
|
|
179
|
+
}
|
|
180
|
+
return n;
|
|
181
|
+
}
|
|
182
|
+
async function lockfileCheck(cwd, info) {
|
|
183
|
+
if (!info.lockfile) {
|
|
184
|
+
return {
|
|
185
|
+
id: 'lockfile',
|
|
186
|
+
label: 'Lockfile',
|
|
187
|
+
status: 'yellow',
|
|
188
|
+
message: 'No lockfile on disk.',
|
|
189
|
+
hint: `Run \`${info.manager} install\` once before the upgrade flow so rollbacks have a reference state.`,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
const abs = path.join(cwd, info.lockfile);
|
|
193
|
+
try {
|
|
194
|
+
const raw = await fs.readFile(abs, 'utf8');
|
|
195
|
+
const tree = parseLockfileInstalledVersions(raw, info.manager);
|
|
196
|
+
if (tree.size === 0) {
|
|
197
|
+
return {
|
|
198
|
+
id: 'lockfile',
|
|
199
|
+
label: 'Lockfile',
|
|
200
|
+
status: 'yellow',
|
|
201
|
+
message: `\`${info.lockfile}\` was readable but the parser couldn't extract any installed versions.`,
|
|
202
|
+
hint: 'If this is an npm v1 lockfile (`dependencies`-only shape) consider running `npm install` to upgrade it to v2 (`packages` map), which every downstream check handles more reliably.',
|
|
203
|
+
data: { lockfile: info.lockfile, parsedPackages: 0 },
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
id: 'lockfile',
|
|
208
|
+
label: 'Lockfile',
|
|
209
|
+
status: 'green',
|
|
210
|
+
message: `\`${info.lockfile}\` parsed OK — ${tree.size} packages tracked.`,
|
|
211
|
+
data: { lockfile: info.lockfile, parsedPackages: tree.size },
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
catch (e) {
|
|
215
|
+
return {
|
|
216
|
+
id: 'lockfile',
|
|
217
|
+
label: 'Lockfile',
|
|
218
|
+
status: 'red',
|
|
219
|
+
message: `Failed to read \`${info.lockfile}\`: ${e instanceof Error ? e.message : String(e)}.`,
|
|
220
|
+
hint: 'Delete the lockfile + `node_modules` and reinstall before running the upgrade flow.',
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function workspaceCoherenceCheck(info) {
|
|
225
|
+
if (!info.hasWorkspaces) {
|
|
226
|
+
return {
|
|
227
|
+
id: 'workspace-coherence',
|
|
228
|
+
label: 'Workspace coherence',
|
|
229
|
+
status: 'green',
|
|
230
|
+
message: 'Single-package project (no workspaces).',
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const missing = [];
|
|
234
|
+
for (const m of info.workspaceMembers) {
|
|
235
|
+
const pj = path.join(m.dir, 'package.json');
|
|
236
|
+
if (!fs.existsSync(pj))
|
|
237
|
+
missing.push(m.name);
|
|
238
|
+
}
|
|
239
|
+
if (missing.length > 0) {
|
|
240
|
+
return {
|
|
241
|
+
id: 'workspace-coherence',
|
|
242
|
+
label: 'Workspace coherence',
|
|
243
|
+
status: 'red',
|
|
244
|
+
message: `${missing.length} workspace member(s) are declared but have no \`package.json\`: ${missing.join(', ')}.`,
|
|
245
|
+
hint: 'Fix the broken workspace globs or drop orphaned members before running the upgrade loop.',
|
|
246
|
+
data: { missing },
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
id: 'workspace-coherence',
|
|
251
|
+
label: 'Workspace coherence',
|
|
252
|
+
status: 'green',
|
|
253
|
+
message: `${info.workspaceMembers.length} workspace member(s) resolved cleanly.`,
|
|
254
|
+
data: { members: info.workspaceMembers.map((m) => m.name) },
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
async function policyCheck(cwd) {
|
|
258
|
+
const { policy, present } = await loadPolicy(cwd);
|
|
259
|
+
if (!present && !policy.sourceFile) {
|
|
260
|
+
return {
|
|
261
|
+
id: 'policy',
|
|
262
|
+
label: 'Policy file',
|
|
263
|
+
status: 'green',
|
|
264
|
+
message: 'No `.dep-up-surgeon.policy.{yaml,json}` present — nothing to validate.',
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
// `sourceFile` is set even on parse failure (we record the file we attempted); `warnings`
|
|
268
|
+
// distinguishes a successful load from a failed one.
|
|
269
|
+
if (policy.warnings.length > 0) {
|
|
270
|
+
return {
|
|
271
|
+
id: 'policy',
|
|
272
|
+
label: 'Policy file',
|
|
273
|
+
status: 'yellow',
|
|
274
|
+
message: `Loaded \`${policy.sourceFile}\` with ${policy.warnings.length} warning(s).`,
|
|
275
|
+
hint: policy.warnings[0],
|
|
276
|
+
data: { sourceFile: policy.sourceFile, warnings: policy.warnings },
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
id: 'policy',
|
|
281
|
+
label: 'Policy file',
|
|
282
|
+
status: 'green',
|
|
283
|
+
message: `Loaded \`${policy.sourceFile}\` (freeze: ${policy.freeze.length}, maxVersion: ${policy.maxVersion.length}, allowMajorAfter: ${policy.allowMajorAfter.length}).`,
|
|
284
|
+
data: {
|
|
285
|
+
sourceFile: policy.sourceFile,
|
|
286
|
+
counts: {
|
|
287
|
+
freeze: policy.freeze.length,
|
|
288
|
+
maxVersion: policy.maxVersion.length,
|
|
289
|
+
allowMajorAfter: policy.allowMajorAfter.length,
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
async function preflightValidatorCheck(cwd, info, opts) {
|
|
295
|
+
if (opts.skipValidator) {
|
|
296
|
+
return {
|
|
297
|
+
id: 'preflight-validator',
|
|
298
|
+
label: 'Pre-flight validator',
|
|
299
|
+
status: 'green',
|
|
300
|
+
message: 'Skipped via `--no-validate`.',
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
try {
|
|
304
|
+
const pkg = (await fs.readJson(path.join(cwd, 'package.json')));
|
|
305
|
+
const vr = await validateProject(cwd, pkg, {
|
|
306
|
+
...(opts.validatorCommand ? { command: opts.validatorCommand } : {}),
|
|
307
|
+
manager: info.manager,
|
|
308
|
+
});
|
|
309
|
+
if (vr.skipped) {
|
|
310
|
+
return {
|
|
311
|
+
id: 'preflight-validator',
|
|
312
|
+
label: 'Pre-flight validator',
|
|
313
|
+
status: 'green',
|
|
314
|
+
message: 'Skipped (no command configured and no default detected).',
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
if (vr.ok) {
|
|
318
|
+
return {
|
|
319
|
+
id: 'preflight-validator',
|
|
320
|
+
label: 'Pre-flight validator',
|
|
321
|
+
status: 'green',
|
|
322
|
+
message: `\`${vr.command ?? '?'}\` passed.`,
|
|
323
|
+
data: { command: vr.command },
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
id: 'preflight-validator',
|
|
328
|
+
label: 'Pre-flight validator',
|
|
329
|
+
status: 'red',
|
|
330
|
+
message: `\`${vr.command ?? '?'}\` exited ${vr.exitCode ?? '?'}.`,
|
|
331
|
+
hint: 'The project is broken BEFORE any upgrade. Fix this first — upgrading on top of a red baseline makes every failure look like a regression.',
|
|
332
|
+
data: {
|
|
333
|
+
command: vr.command,
|
|
334
|
+
exitCode: vr.exitCode,
|
|
335
|
+
lastLines: vr.output ? tailLines(vr.output, 20) : undefined,
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
catch (e) {
|
|
340
|
+
return {
|
|
341
|
+
id: 'preflight-validator',
|
|
342
|
+
label: 'Pre-flight validator',
|
|
343
|
+
status: 'yellow',
|
|
344
|
+
message: `Validator could not run: ${e instanceof Error ? e.message : String(e)}.`,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Quick `<mgr> ls --all --parseable` probe that doesn't install anything — just reports peer
|
|
350
|
+
* dep / missing dep warnings that are ALREADY there. We scan stderr for npm's canonical
|
|
351
|
+
* warning prefixes; pnpm and yarn spew the same shape in a different style, so we fall back
|
|
352
|
+
* to a "did the command find `ELSPROBLEMS` / `peer dep missing` / `invalid`" text match.
|
|
353
|
+
*/
|
|
354
|
+
async function peerDepsCheck(cwd, info, opts) {
|
|
355
|
+
if (opts.skipPeerScan) {
|
|
356
|
+
return {
|
|
357
|
+
id: 'peer-deps',
|
|
358
|
+
label: 'Peer dependencies',
|
|
359
|
+
status: 'green',
|
|
360
|
+
message: 'Skipped via `--skip-peer-scan`.',
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
const command = peerScanCommandFor(info.manager);
|
|
364
|
+
if (!command) {
|
|
365
|
+
return {
|
|
366
|
+
id: 'peer-deps',
|
|
367
|
+
label: 'Peer dependencies',
|
|
368
|
+
status: 'green',
|
|
369
|
+
message: `Peer scan not implemented for ${info.manager}; skipping.`,
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
try {
|
|
373
|
+
const r = await execa(command.bin, command.args, { cwd, reject: false, all: true });
|
|
374
|
+
const combined = [r.stdout, r.stderr].filter(Boolean).join('\n');
|
|
375
|
+
const warnings = extractPeerWarnings(combined);
|
|
376
|
+
if (warnings.length === 0) {
|
|
377
|
+
return {
|
|
378
|
+
id: 'peer-deps',
|
|
379
|
+
label: 'Peer dependencies',
|
|
380
|
+
status: 'green',
|
|
381
|
+
message: 'No existing peer-dep / missing-dep warnings.',
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
const severe = warnings.filter((w) => /invalid|missing/i.test(w)).length;
|
|
385
|
+
return {
|
|
386
|
+
id: 'peer-deps',
|
|
387
|
+
label: 'Peer dependencies',
|
|
388
|
+
status: severe > 0 ? 'red' : 'yellow',
|
|
389
|
+
message: `${warnings.length} peer / missing dep warning${warnings.length === 1 ? '' : 's'} already present${severe > 0 ? ` (${severe} fatal)` : ''}.`,
|
|
390
|
+
hint: 'Resolve these before the upgrade loop — the loop will attribute any new peer failure to the bump, which makes triage harder.',
|
|
391
|
+
data: { warnings: warnings.slice(0, 10), total: warnings.length },
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
catch (e) {
|
|
395
|
+
return {
|
|
396
|
+
id: 'peer-deps',
|
|
397
|
+
label: 'Peer dependencies',
|
|
398
|
+
status: 'yellow',
|
|
399
|
+
message: `Peer scan could not run: ${e instanceof Error ? e.message : String(e)}.`,
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function peerScanCommandFor(manager) {
|
|
404
|
+
switch (manager) {
|
|
405
|
+
case 'npm':
|
|
406
|
+
return { bin: 'npm', args: ['ls', '--all', '--parseable'] };
|
|
407
|
+
case 'pnpm':
|
|
408
|
+
// `pnpm why` is too targeted; `pnpm list -r --depth Infinity` works but is slow. We
|
|
409
|
+
// instead rely on `pnpm install --frozen-lockfile --offline` reporting peer warnings in
|
|
410
|
+
// stderr WITHOUT mutating anything — the `--offline --frozen-lockfile` combo prevents
|
|
411
|
+
// both registry hits and lockfile mutations.
|
|
412
|
+
return { bin: 'pnpm', args: ['install', '--frozen-lockfile', '--offline', '--prefer-offline'] };
|
|
413
|
+
case 'yarn':
|
|
414
|
+
// yarn v1: `yarn check` does the job. Berry has no `yarn check`; fall back to `yarn
|
|
415
|
+
// install --immutable --check-cache` which surfaces peer warnings without mutating.
|
|
416
|
+
return { bin: 'yarn', args: ['check'] };
|
|
417
|
+
default:
|
|
418
|
+
return undefined;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
function extractPeerWarnings(output) {
|
|
422
|
+
const lines = output.split(/\r?\n/);
|
|
423
|
+
const out = [];
|
|
424
|
+
for (const line of lines) {
|
|
425
|
+
if (/peer dep missing|requires a peer|unmet peer dependency|ELSPROBLEMS|invalid:|missing: /i.test(line)) {
|
|
426
|
+
out.push(line.trim());
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return out;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* `<mgr> audit` dry-run. Reuses `runAudit` so the severity filter, parsing, and exit-code
|
|
433
|
+
* tolerance stay consistent with the main upgrade flow's `--security-only` logic.
|
|
434
|
+
*/
|
|
435
|
+
async function auditCheck(cwd, info, opts) {
|
|
436
|
+
if (opts.skipAudit) {
|
|
437
|
+
return {
|
|
438
|
+
id: 'audit',
|
|
439
|
+
label: 'Audit',
|
|
440
|
+
status: 'green',
|
|
441
|
+
message: 'Skipped via `--skip-audit`.',
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
try {
|
|
445
|
+
const r = await runAudit({ manager: info.manager, cwd });
|
|
446
|
+
if (r.error) {
|
|
447
|
+
return {
|
|
448
|
+
id: 'audit',
|
|
449
|
+
label: 'Audit',
|
|
450
|
+
status: 'yellow',
|
|
451
|
+
message: `Audit could not run: ${r.error}.`,
|
|
452
|
+
hint: 'Check your network / registry auth. `--skip-audit` silences this for air-gapped CI.',
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
const counts = countBySeverity(r.advisories);
|
|
456
|
+
const total = r.advisories.length;
|
|
457
|
+
if (total === 0) {
|
|
458
|
+
return {
|
|
459
|
+
id: 'audit',
|
|
460
|
+
label: 'Audit',
|
|
461
|
+
status: 'green',
|
|
462
|
+
message: 'No open advisories.',
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
const status = counts.critical > 0 || counts.high > 0 ? 'red' : 'yellow';
|
|
466
|
+
return {
|
|
467
|
+
id: 'audit',
|
|
468
|
+
label: 'Audit',
|
|
469
|
+
status,
|
|
470
|
+
message: `${total} advisor${total === 1 ? 'y' : 'ies'}: critical=${counts.critical}, high=${counts.high}, moderate=${counts.moderate}, low=${counts.low}.`,
|
|
471
|
+
hint: status === 'red'
|
|
472
|
+
? 'Run `dep-up-surgeon --security-only --apply-overrides` to fix direct + transitive CVEs.'
|
|
473
|
+
: 'Run `dep-up-surgeon --security-only` to clean these up on the next pass.',
|
|
474
|
+
data: { total, counts },
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
catch (e) {
|
|
478
|
+
return {
|
|
479
|
+
id: 'audit',
|
|
480
|
+
label: 'Audit',
|
|
481
|
+
status: 'yellow',
|
|
482
|
+
message: `Audit could not run: ${e instanceof Error ? e.message : String(e)}.`,
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function countBySeverity(advs) {
|
|
487
|
+
const out = { critical: 0, high: 0, moderate: 0, low: 0 };
|
|
488
|
+
for (const a of advs) {
|
|
489
|
+
if (a.severity === 'critical')
|
|
490
|
+
out.critical++;
|
|
491
|
+
else if (a.severity === 'high')
|
|
492
|
+
out.high++;
|
|
493
|
+
else if (a.severity === 'moderate')
|
|
494
|
+
out.moderate++;
|
|
495
|
+
else
|
|
496
|
+
out.low++;
|
|
497
|
+
}
|
|
498
|
+
return out;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Doctor-variant of the stale scan — same intent as `lockfileFix.ts`'s `scanStaleTransitives`
|
|
502
|
+
* but smaller: capped at 100 packages and 4-way concurrency so doctor stays sub-second on
|
|
503
|
+
* most projects. We don't reuse the lockfileFix helper to avoid exporting a private function
|
|
504
|
+
* whose signature shouldn't be part of the public API just for doctor's sake.
|
|
505
|
+
*/
|
|
506
|
+
async function scanStaleInline(tree, cache, limit) {
|
|
507
|
+
const ranked = [...tree.entries()]
|
|
508
|
+
.map(([name, versions]) => ({ name, versions: [...versions] }))
|
|
509
|
+
.sort((a, b) => b.versions.length - a.versions.length || a.name.localeCompare(b.name))
|
|
510
|
+
.slice(0, limit);
|
|
511
|
+
const compare = (a, b) => {
|
|
512
|
+
try {
|
|
513
|
+
return semver.compare(a, b);
|
|
514
|
+
}
|
|
515
|
+
catch {
|
|
516
|
+
return a.localeCompare(b);
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
const results = await runWithConcurrency(ranked, 4, async (entry) => {
|
|
520
|
+
try {
|
|
521
|
+
const latest = await fetchLatestVersion(entry.name, cache);
|
|
522
|
+
const sorted = [...entry.versions].sort(compare);
|
|
523
|
+
const highest = sorted[sorted.length - 1];
|
|
524
|
+
if (!semver.valid(latest) || !semver.valid(highest))
|
|
525
|
+
return undefined;
|
|
526
|
+
if (semver.gte(highest, latest))
|
|
527
|
+
return undefined;
|
|
528
|
+
const majorDelta = semver.major(latest) - semver.major(highest);
|
|
529
|
+
const minorDelta = semver.minor(latest) - semver.minor(highest);
|
|
530
|
+
if (majorDelta === 0 && minorDelta <= 1)
|
|
531
|
+
return undefined;
|
|
532
|
+
return {
|
|
533
|
+
name: entry.name,
|
|
534
|
+
installed: sorted,
|
|
535
|
+
latest,
|
|
536
|
+
majorBehind: Math.max(0, majorDelta),
|
|
537
|
+
minorBehind: Math.max(0, minorDelta),
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
catch {
|
|
541
|
+
return undefined;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
const stale = results.filter((r) => Boolean(r));
|
|
545
|
+
stale.sort((a, b) => {
|
|
546
|
+
if (a.majorBehind !== b.majorBehind)
|
|
547
|
+
return b.majorBehind - a.majorBehind;
|
|
548
|
+
if (a.minorBehind !== b.minorBehind)
|
|
549
|
+
return b.minorBehind - a.minorBehind;
|
|
550
|
+
return a.name.localeCompare(b.name);
|
|
551
|
+
});
|
|
552
|
+
return stale;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Stale transitive scan — packages more than one minor or a full major behind `latest`. We
|
|
556
|
+
* reuse the same logic shipped with `--fix-lockfile`, but capped harder (100 packages, 4-way
|
|
557
|
+
* concurrency) since doctor should return quickly.
|
|
558
|
+
*/
|
|
559
|
+
async function staleTransitiveCheck(cwd, info, opts) {
|
|
560
|
+
if (opts.skipStaleScan) {
|
|
561
|
+
return {
|
|
562
|
+
id: 'stale-transitives',
|
|
563
|
+
label: 'Stale transitives',
|
|
564
|
+
status: 'green',
|
|
565
|
+
message: 'Skipped via `--skip-stale-scan`.',
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
if (!info.lockfile) {
|
|
569
|
+
return {
|
|
570
|
+
id: 'stale-transitives',
|
|
571
|
+
label: 'Stale transitives',
|
|
572
|
+
status: 'green',
|
|
573
|
+
message: 'No lockfile — nothing to scan.',
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
try {
|
|
577
|
+
const raw = await fs.readFile(path.join(cwd, info.lockfile), 'utf8');
|
|
578
|
+
const tree = parseLockfileInstalledVersions(raw, info.manager);
|
|
579
|
+
if (tree.size === 0) {
|
|
580
|
+
return {
|
|
581
|
+
id: 'stale-transitives',
|
|
582
|
+
label: 'Stale transitives',
|
|
583
|
+
status: 'green',
|
|
584
|
+
message: 'Lockfile parser found no installed versions — skipping scan.',
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
const stale = await scanStaleInline(tree, createRegistryCache(), 100);
|
|
588
|
+
if (stale.length === 0) {
|
|
589
|
+
return {
|
|
590
|
+
id: 'stale-transitives',
|
|
591
|
+
label: 'Stale transitives',
|
|
592
|
+
status: 'green',
|
|
593
|
+
message: `Scanned ${Math.min(tree.size, 100)} packages — none more than a minor or major behind.`,
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
// Stale is always informational: it never gates a CI build red. Yellow is the right
|
|
597
|
+
// level because an outdated transitive can become a CVE overnight.
|
|
598
|
+
return {
|
|
599
|
+
id: 'stale-transitives',
|
|
600
|
+
label: 'Stale transitives',
|
|
601
|
+
status: 'yellow',
|
|
602
|
+
message: `${stale.length} transitive${stale.length === 1 ? '' : 's'} significantly behind \`latest\`.`,
|
|
603
|
+
hint: 'Run `dep-up-surgeon --fix-lockfile` to dedupe, then consider bumping the parent direct-dep to pull these forward.',
|
|
604
|
+
data: { top: stale.slice(0, 10) },
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
catch (e) {
|
|
608
|
+
return {
|
|
609
|
+
id: 'stale-transitives',
|
|
610
|
+
label: 'Stale transitives',
|
|
611
|
+
status: 'yellow',
|
|
612
|
+
message: `Stale scan could not run: ${e instanceof Error ? e.message : String(e)}.`,
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAyB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAsB,MAAM,yBAAyB,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBA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