Skip to content

Require npm with dependency cooldown support - #27844

Merged
zanieb merged 2 commits into
astral-sh:mainfrom
zaniebot:agent/enforce-existing-npm-cooldowns
Aug 19, 2026
Merged

zanieb merged 2 commits into
astral-sh:mainfrom
zaniebot:agent/enforce-existing-npm-cooldowns

Conversation

@zaniebot

@zaniebot zaniebot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Older npm releases silently ignore the seven-day dependency cooldown added in #27796. Require npm 11.10.0 or newer in the playground, playground API, and ty benchmark projects, and enable engine-strict so unsupported clients fail during npm install or npm ci. The lockfile changes only record that requirement; dependency versions and the existing cooldown are unchanged.

Pin Node.js to 24.19.0 for the playground CI and publishing jobs, which provides a compatible bundled npm. The separate script-default changes are in #27837, and the locked playground deployment tool is in #27838.

Related: #27855 pins the remaining WebAssembly test and publication runtimes. astral-sh/setup-uv#1026 and astral-sh/ruff-action#411 enforce the same legacy-aware npm version floor. astral-sh/uv#21193 applies it to uv's locked formatter toolchain.

@astral-sh-bot

astral-sh-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@zanieb
zanieb marked this pull request as ready for review August 18, 2026 20:44
@zanieb
zanieb requested a review from a team as a code owner August 18, 2026 20:44
zanieb pushed a commit that referenced this pull request Aug 18, 2026
The WebAssembly test and npm publication jobs select `node-version: 24`,
so the Node.js and bundled `npm` versions can change between runs
without a workflow change. Pin both selectors to `24.19.0`, keeping the
existing Node major and publication permissions. The existing Renovate
GitHub Actions manager continues to track these inputs.

Related: #27838, #27839, and
#27844 pin the playground runtimes; #27842
covers the `prek`-managed runtime. astral-sh/packse#326 makes the
corresponding exact Node.js 24 pin for formatter CI.

Co-authored-by: zaniebot <[email protected]>
@zanieb zanieb added the ci Related to internal CI tooling label Aug 18, 2026
Comment thread playground/README.md

## Getting started

Use npm 11.10.0 or newer so that the dependency cooldown in `.npmrc` is enforced.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If someone used an older npm version to bump a dependency that does not respect the cooldown, and made a PR, is this something our CI would catch?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure, I will look into that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. So we should be careful with PRs that change our lock files

@zanieb
zanieb merged commit 0680a1b into astral-sh:main Aug 19, 2026
57 checks passed
zanieb pushed a commit that referenced this pull request Aug 19, 2026
The playground workflows disable dependency lifecycle scripts, but
ordinary local installs in the playground, its API, and the ty benchmark
project still enable them. Set `ignore-scripts` in each project's
`.npmrc` so the same default applies outside CI, while preserving the
existing seven-day release-age policy. Because `ignore-scripts` also
suppresses first-party pre/post hooks, the playground's `build`,
`dev:build`, and `start` commands invoke their required WASM preparation
explicitly. The datastore instructions now install from the API lockfile
and invoke its local Wrangler instead of allowing `npx` to resolve a
separate dependency tree.

Related: astral-sh/ruff-vscode#1151 and astral-sh/ty-vscode#525 apply
the same install-script default to the editor extensions.
#27844 enforces the cooldown-supporting `npm` floor,
#27842 hardens the native `prek` formatter environment,
and #27838 locks the playground deployment toolchain.

---------

Co-authored-by: zaniebot <[email protected]>
zanieb pushed a commit that referenced this pull request Aug 19, 2026
Pinning `cloudflare/wrangler-action` does not pin the `wrangler@4`
package it installs during deployment. Install Wrangler from a
dedicated, committed lockfile with lifecycle scripts disabled, then
invoke that local executable directly. Require `npm>=11.10.0` with
`engines.npm` and `engine-strict` so older clients cannot silently
ignore the seven-day `min-release-age` policy, and pin Node.js to
`24.19.0` at the install sites. Both playgrounds now use the reviewed
dependency tree already recorded for the playground API, and Cloudflare
credentials are passed only to the deployment command.

Related: #27839 isolates the playground builds from
deployment credentials, and #27844 enforces the
corresponding `npm` floor in the existing package roots.
astral-sh/ruff-vscode#1152 and astral-sh/ty-vscode#526 likewise give
credentialed publishers their own locked toolchains.

---------

Co-authored-by: zaniebot <[email protected]>
eifinger pushed a commit to astral-sh/ruff-action that referenced this pull request Aug 20, 2026
`devEngines` is ignored by npm releases such as `10.8.2`, so those
clients can install dependencies without applying the seven-day
`min-release-age` setting added in #401. Declare the same minimum in
`engines.npm` and enable `engine-strict` to make that legacy installer
requirement fatal. Keep `devEngines` for its earlier checks on newer npm
versions, and pin the build and checksum workflows to Node.js `24.19.0`
so their bundled `npm` supports the policy.

Related: astral-sh/setup-uv#1026 and astral-sh/ruff#27844 enforce the
same legacy-aware `npm` version floor. #400 covers
Dependabot's update cooldown, and #402 separately
verifies registry signatures and available provenance.

---------

Co-authored-by: zaniebot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Related to internal CI tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants