Skip to content

chore: hold back deps whose latest drops the supported Node.js floor - #13253

Merged
zkochan merged 1 commit into
mainfrom
ignore-deps
Jul 23, 2026
Merged

zkochan merged 1 commit into
mainfrom
ignore-deps

Conversation

@zkochan

@zkochan zkochan commented Jul 23, 2026 •

Copy link
Copy Markdown
Member

Summary

The update-lockfile workflow runs pnpm update --latest, which bumps dependencies across majors regardless of the caret pins in the catalog. Several dependencies have a latest whose newest major raises its engines.node above pnpm's supported floor (>=22.13), so adopting them would break users on Node 22.13.

This adds an update.ignoreDeps section to pnpm-workspace.yaml listing every such dependency, so --latest leaves them alone.

The catalog already pinned eight of these (cspell, ini, normalize-package-data, npm-packlist, ssri, undici, validate-npm-package-name, write-file-atomic) with explanatory comments, but nothing stopped --latest from overriding the pins. Auditing the latest engines.node of all 243 catalog entries against 22.13.0 surfaced five more in the same situation:

Package latest latest requires
@babel/core 8.0.1 ^22.18.0 || >=24.11.0
@babel/plugin-transform-explicit-resource-management 8.0.1 ^22.18.0 || >=24.11.0
bin-links 7.0.0 ^22.22.2 || ^24.15.0 || >=26.0.0
libnpmpublish 12.0.0 ^22.22.2 || ^24.15.0 || >=26.0.0
npm-registry-fetch 20.0.1 ^22.22.2 || ^24.15.0 || >=26.0.0

All thirteen are now listed in update.ignoreDeps, and the five newly-found catalog entries get the same held-back-because-of-Node comment the others already carry.

Squash Commit Body

Add an `update.ignoreDeps` section to pnpm-workspace.yaml so the
update-lockfile workflow's `pnpm update --latest` stops bumping
dependencies whose newest major requires a Node.js version above pnpm's
supported floor (>=22.13).

The catalog already pinned eight such packages with explanatory comments,
but nothing prevented `--latest` from overriding those pins. Auditing the
`latest` engines.node of every catalog entry against 22.13.0 surfaced five
more: @babel/core (and its explicit-resource-management plugin), bin-links,
libnpmpublish, and npm-registry-fetch. List all thirteen in
update.ignoreDeps and give the five newly-found catalog entries the same
held-back-because-of-Node comment the others carry.

Checklist

  • This is a workspace-config-only change (dev dependency management for the TypeScript monorepo); nothing to port to the Rust pnpm/ port.
  • No changeset: this changes no published package, only the repo's own dependency-update config.
  • No tests: configuration-only change.
  • No documentation change needed.

Written by an agent (Claude Code, claude-opus-4-8).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Chores
    • Documented minimum Node.js requirements for selected package versions.
    • Prevented automatic latest-version updates from upgrading pinned packages beyond supported compatibility limits.

Copilot AI review requested due to automatic review settings July 23, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c81d508-05f0-400b-9f82-69b42242640d

📥 Commits

Reviewing files that changed from the base of the PR and between fd9e534 and 3bae54a.

📒 Files selected for processing (1)
  • pnpm-workspace.yaml

📝 Walkthrough

Walkthrough

Changes

Catalog update safeguards

Layer / File(s) Summary
Documented compatibility pins and update exclusions
pnpm-workspace.yaml
Adds Node.js requirement comments for selected catalog entries and configures update.ignoreDeps to keep constrained dependencies at their pinned versions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • pnpm/pnpm#13197: Adds and uses update.ignoreDeps to prevent pinned dependencies from being upgraded.
  • pnpm/pnpm#13250: Updates the same workspace catalog ignore list and Node.js compatibility comments.

Suggested reviewers: copilot, bholmesdev

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ignore-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zkochan
zkochan merged commit 286e87b into main Jul 23, 2026
21 of 22 checks passed
@zkochan
zkochan deleted the ignore-deps branch July 23, 2026 19:00
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Prevent pnpm --latest from upgrading deps that require newer Node than supported

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Add pnpm workspace ignore list to keep updates compatible with Node >=22.13.
• Document additional catalog deps whose latest majors raise the Node engines floor.
• Ensure update-lockfile’s pnpm update --latest respects catalog holdbacks.
Diagram

graph TD
  A["update-lockfile workflow"] --> B["pnpm update --latest"] --> C["pnpm-workspace.yaml"] --> D["catalog pins"]
  C --> E["update.ignoreDeps"] --> B
  F["Node floor >=22.13"] --> D
  F --> E
  subgraph Legend
    direction LR
    _wf[Workflow] ~~~ _cfg[Config] ~~~ _rule{{Constraint}}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Stop using `pnpm update --latest` in update-lockfile
  • ➕ Respects caret ranges by default; fewer surprise major bumps
  • ➕ Reduces risk of breaking Node floor compatibility implicitly
  • ➖ Less aggressive updates; majors may lag without targeted bumps
  • ➖ Doesn’t address other future sources of forced major upgrades
2. Use a scripted allowlist/denylist based on engines.node at update time
  • ➕ Automates detection instead of manually maintaining ignoreDeps
  • ➕ Can adapt as pnpm’s supported Node floor changes
  • ➖ More moving parts (custom script, network calls, caching)
  • ➖ Harder to reason about and debug than a static config list

Recommendation: Keeping pnpm update --latest but adding update.ignoreDeps is the best fit here: it preserves the workflow’s intent (major upgrades) while enforcing the project’s Node.js floor compatibility in a single, auditable place. The added per-dependency comments plus an explicit ignore list also make future audits straightforward.

Files changed (1) +28 / -0

Other (1) +28 / -0
pnpm-workspace.yamlAdd update.ignoreDeps and document Node-floor-held dependency pins +28/-0

Add update.ignoreDeps and document Node-floor-held dependency pins

• Adds comments explaining that several dependencies’ latest majors require Node versions above the supported floor (>=22.13) and should remain pinned. Introduces 'update.ignoreDeps' to prevent 'pnpm update --latest' (used by update-lockfile) from overriding those pins, including newly identified packages (@babel/core/plugin, bin-links, libnpmpublish, npm-registry-fetch).

pnpm-workspace.yaml

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The workspace setting is supported by the configuration reader, uses exact package-name matching, and is applied to catalog dependencies during the automated latest-update path.

Reviews (1): Last reviewed commit: "chore: add deps to ignoreDeps" | Re-trigger Greptile

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Remediation recommended

1. IgnoreDeps freezes automated updates 🐞 Bug ⛨ Security
Description
update.ignoreDeps causes selector-less dependency updates (like the update-lockfile workflow’s
“update-deps: latest” run) to skip the listed packages entirely, so they won’t be refreshed to newer
patch/minor releases automatically. This increases the chance those deps lag behind on routine fixes
(including future security patches) unless the workflow (or maintainers) explicitly updates them by
name.
Code

pnpm-workspace.yaml[R552-570]

+# Packages whose newer versions require a Node.js version above pnpm's supported
+# floor (>=22.13). `pnpm update --latest` (run by the update-lockfile workflow)
+# would otherwise bump them past the versions pinned in the catalog above, where
+# each entry's comment records the exact Node.js requirement that holds it back.
+update:
+  ignoreDeps:
+    - '@babel/core'
+    - '@babel/plugin-transform-explicit-resource-management'
+    - bin-links
+    - cspell
+    - ini
+    - libnpmpublish
+    - normalize-package-data
+    - npm-packlist
+    - npm-registry-fetch
+    - ssri
+    - undici
+    - validate-npm-package-name
+    - write-file-atomic
Relevance

⭐⭐ Medium

Intentional holdback for Node floor; team uses ignore lists in update path, but may add
mitigations/docs for stale patches.

PR-#12104
PR-#12503
PR-#12135

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workspace setting explicitly defines an ignore list for pnpm update/outdated, and pnpm’s update
implementation skips ignored deps only when no selectors are provided—matching how the lockfile
updater is configured—so those deps will not be automatically refreshed by that job.

pnpm-workspace.yaml[552-571]
.github/workflows/update-lockfile.yml[46-55]
.changeset/update-settings-section.md[8-24]
pnpm/crates/package-manager/src/update.rs[509-549]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`pnpm-workspace.yaml` now sets `update.ignoreDeps`, which makes selector-less update runs skip these dependencies entirely. This achieves the goal of preventing `--latest` major bumps, but also prevents automated patch/minor refreshes for these packages.

### Issue Context
- `update.ignoreDeps` is documented as “skip” for `pnpm update` / `pnpm outdated`.
- The scheduled lockfile updater uses `pnpm/update` with `update-deps: latest`, which triggers a selector-less “update everything” mode.
- pnpm’s update logic applies ignore patterns only when **no selectors** are supplied; providing explicit package selectors bypasses the ignore list.

### Fix Focus Areas
- .github/workflows/update-lockfile.yml[46-55]
- pnpm-workspace.yaml[552-571]

### Suggested fix
Update the lockfile workflow (or the `pnpm/update` action configuration) to still refresh these packages within their currently-pinned major ranges by running an additional explicit update step that names them as selectors (so ignore rules don’t apply), without `--latest`.

Example approach (conceptual):
1) Keep the existing “latest” update for everything else.
2) Add a follow-up command to update the ignored packages explicitly within range, e.g. `pnpm update undici npm-registry-fetch libnpmpublish ...` (no `--latest`).

This preserves the Node-floor protection against major bumps while still getting routine patch/minor refreshes.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

zkochan added a commit that referenced this pull request Jul 23, 2026
…--latest (#13257)

The daily update-lockfile job fails with ERR_PNPM_UNSUPPORTED_ENGINE on
[email protected]. The source is node-gyp, declared directly in
pnpm11/pnpm/package.json and therefore missed by the catalog-oriented sweep
in #13253: `pnpm update --latest` bumps it 12.4.0 -> 13.0.1, and
node-gyp 13 -- along with its nopt 10 and which 7 dependencies -- requires
Node.js ^22.22.2 || ^24.15.0 || >=26.0.0, which engineStrict correctly
rejects against nodeVersion 22.13.0.

Replaying the job locally (lockfile deleted, `pnpm update --recursive
--latest`) confirms node-gyp was the last floor-blocked dependency: with it
held back, resolution completes with no engine errors and node-gyp stays at
12.4.0. The replay stops at the next, separate blocker instead --
ERR_PNPM_IGNORED_BUILDS for [email protected], the runtime: specifier fix in
#13250.

The same replay also showed three catalog entries being bumped past pins
their comments say must hold: `@types/node` (22.x, matching the supported
Node.js floor), bole (5.x, so the published `@pnpm/logger`'s CJS bole shares
the output registry under Jest) and tempy (3.0.0, whose later versions
deadlock the bundled binary at startup). Only the engine-related pins were
enforced, so those three are added to the list as well.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants