Repository navigation
fix(deps.status): skip engine check when scanning workspace projects - #11592
Conversation
checkDepsStatus (run by verifyDepsBeforeRun) called findWorkspaceProjects without a nodeVersion, so the engine check fell back to the system Node from PATH and emitted spurious "Unsupported engine" warnings before scripts ran. The actual install still does engine validation; a status check shouldn't.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
📝 WalkthroughWalkthroughcheckDepsStatus now uses findWorkspaceProjectsNoCheck when scanning workspace manifests so engine validation is skipped during workspace discovery; install-time engine validation is unchanged. ChangesSkip Engine Check in Workspace Scanning
🎯 2 (Simple) | ⏱️ ~8 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Adjusts checkDepsStatus (used by verifyDepsBeforeRun) to avoid emitting misleading engine warnings when scanning workspace projects, by bypassing installability validation during project discovery.
Changes:
- Replace
findWorkspaceProjects()withfindWorkspaceProjectsNoCheck()in thecheckDepsStatusworkspace scan path. - Add a changeset bumping
@pnpm/deps.statusandpnpmwith rationale for the warning suppression.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| deps/status/src/checkDepsStatus.ts | Uses workspace project discovery without installability checks to prevent pre-script engine warnings. |
| .changeset/check-deps-status-skip-engine-check.md | Documents the behavior change and publishes patch releases for the affected packages. |
Comments suppressed due to low confidence (1)
deps/status/src/checkDepsStatus.ts:363
- This code path (deriving
allProjectswhenopts.allProjectsis undefined) is behaviorally changed, but there doesn't appear to be deps/status test coverage asserting that workspace project scanning no longer triggers engine/platform warnings. Adding a unit test that mocks@pnpm/workspace.projects-reader(and/or the warning logger) would prevent regressions back tofindWorkspaceProjects()without anodeVersion.
if (!allProjects) {
const workspaceRoot = workspaceDir ?? rootProjectManifestDir
const workspaceManifest = await readWorkspaceManifest(workspaceRoot)
if (workspaceManifest ?? workspaceDir) {
const allProjects = await findWorkspaceProjectsNoCheck(rootProjectManifestDir, {
patterns: workspaceManifest?.packages,
})
return checkDepsStatus({
...opts,
allProjects,
})
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
checkDepsStatus(run byverifyDepsBeforeRun) calledfindWorkspaceProjectswithout anodeVersion, so the engine check fell back to the system Node fromPATHand emitted spurious[WARN] Unsupported enginelines before scripts ran.findWorkspaceProjectsNoCheck— a status check shouldn't validate engines. Install paths still callfindWorkspaceProjectswithnodeVersionand continue to validate engines.This was visible in CI when
devEngines.runtime.nodewas set: the runner's pre-installed Node v20.20.2 (not the desired 24.6.0) was reported ascurrentin the warning, because that's whatgetSystemNodeVersion()returned via PATH lookup.Test plan
pnpm --filter @pnpm/deps.status testpassesCompile & Lintjob on a branch that setsdevEngines.runtimeWritten by an agent (Claude Code, claude-opus-4-7).
Summary by CodeRabbit