Skip to content

Lock wrangler for playground deployments - #27838

Merged
zanieb merged 3 commits into
astral-sh:mainfrom
zaniebot:agent/lock-playground-deployments
Aug 19, 2026
Merged

zanieb merged 3 commits into
astral-sh:mainfrom
zaniebot:agent/lock-playground-deployments

Conversation

@zaniebot

@zaniebot zaniebot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

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.

@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 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 marked this pull request as ready for review August 18, 2026 20:46
@zanieb zanieb added the ci Related to internal CI tooling label Aug 18, 2026
"npm": ">=11.10.0"
},
"devDependencies": {
"wrangler": "4.118.0"

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.

What's the reason for creating a new package over adding the dev dependency to `api/package.json?

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 think the intent is to reduce the number of dependencies we install in deployment contexts

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.

but why should the deployment install dev dependencies?

zanieb pushed a commit that referenced this pull request Aug 19, 2026
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.

---------

Co-authored-by: zaniebot <[email protected]>
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
zanieb merged commit dff9c75 into astral-sh:main Aug 19, 2026
57 checks passed
carljm added a commit that referenced this pull request Aug 19, 2026
…ype-form

* origin/main:
  [ty] Fix dynamic-class diagnostic snapshot in string annotations (#27890)
  Lock `wrangler` for playground deployments (#27838)
  [ty] Dogfood standalone scripts with inline configuration (#27885)
  Annotate intentional release secret inheritance (#27887)
  [ty] Skip invalid subscript operands in string annotations (#27882)
  [ty] Handle dynamic classes in string annotations (#27883)
  Disable `npm` install scripts by default (#27837)
  Require wheels for Python tooling dependencies (#27861)
  Update dependency pytest to v9 (#27881)
zanieb pushed a commit that referenced this pull request Aug 20, 2026
The playground release jobs run `npm run check` and the builds on the
runner that later receives `CF_API_TOKEN`. Move those commands into
unprivileged jobs and pass named, digest-verified static artifacts to
fresh `release-playground` jobs. The publishers reject symlinks, special
files, and Pages server-code entrypoints before deployment. This
isolates the playground build tools; it does not remove the publisher's
Wrangler dependency. Locking that tooling is handled separately in
#27838.

Related: astral-sh/ruff-vscode#1152 and astral-sh/ty-vscode#526 reduce
the dependency trees installed by the marketplace publishers.

---------

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.

3 participants