You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use one rule for a project's target Node.js across nodeVersion, runtime pins, and the host in pnpm v12 #68
pnpm v12 has no single rule for which Node.js a project's dependencies run on. Each caller combines four sources itself, and the callers use different orders:
the nodeVersion setting
a devEngines.runtime or engines.runtime pin in the root manifest
the root importer's node@runtime: dependency in the lockfile
With nodeVersion: 22 and a runtime pin for Node.js 24, pnpm checks packages against 22 but stores them under a node24 directory name. That split may be intended, because nodeVersion is documented as an override for compatibility checks. Nothing in the code states it as a rule, and each new caller has to pick an order again.
Proposed change
Decide the intended order for compatibility checks and for store directory names. Check what pnpm v11 does when nodeVersion and a runtime pin are both set, and match it.
Add one function in deps-restorer that returns the project's target Node.js for each use, and document the order there.
Switch every caller in the table to it. Add a test with nodeVersion and a runtime pin for different majors, covering both the compatibility check and the store directory name.
pnpm's own install is a separate case: pnpm runs on the node on PATH whatever the project sets. That case is tracked in #67.
Written by an agent (Claude Code, claude-opus-5-5).
Activity
fix(deps-restorer): use one target Node.js rule for checks and store …
fix(deps-restorer): use one target Node.js rule for checks and store …