Skip to content

node_runtime: Respect npm release-age filters for managed npm installs (#56957) (cherry-pick to stable)#57439

Merged
zed-zippy[bot] merged 1 commit into
v1.3.xfrom
cherry-pick-v1.3.x-2a00db06
May 21, 2026
Merged

node_runtime: Respect npm release-age filters for managed npm installs (#56957) (cherry-pick to stable)#57439
zed-zippy[bot] merged 1 commit into
v1.3.xfrom
cherry-pick-v1.3.x-2a00db06

Conversation

@zed-zippy

@zed-zippy zed-zippy Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #56957 to stable


Zed-managed npm installers were resolving a concrete latest version with
npm info and then installing package@version. That is brittle when
users
configure npm release-age filtering via before or min-release-age:
npm's
installer applies those rules during resolution, but our pinned install
target
could disagree with it, and therefore fail to install.

This changes managed npm installs to install package@latest and let
npm apply
its own resolver and user config. The local latest-version lookup
remains as a
best-effort cache freshness check, not as the exact install target.

Exact extension API installs remain unchanged because extensions
explicitly
request a package and version. If we want to revisit that we can.

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX
    checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #53611

Release Notes:

  • Fixed npm-backed tool installs to better respect npm release-age
    filters.

#56957)

Zed-managed npm installers were resolving a concrete latest version with
`npm info` and then installing `package@version`. That is brittle when
users
configure npm release-age filtering via `before` or `min-release-age`:
npm's
installer applies those rules during resolution, but our pinned install
target
could disagree with it, and therefore fail to install.

This changes managed npm installs to install `package@latest` and let
npm apply
its own resolver and user config. The local latest-version lookup
remains as a
best-effort cache freshness check, not as the exact install target.

Exact extension API installs remain unchanged because extensions
explicitly
request a package and version. If we want to revisit that we can.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #53611

Release Notes:

- Fixed npm-backed tool installs to better respect npm release-age
filters.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 21, 2026
@zed-community-bot zed-community-bot Bot added the bot Pull requests authored by a bot label May 21, 2026
@zed-zippy zed-zippy Bot merged commit 1fd5ccf into v1.3.x May 21, 2026
41 checks passed
@zed-zippy zed-zippy Bot deleted the cherry-pick-v1.3.x-2a00db06 branch May 21, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant