Skip to content

chore: pin npm 11.12.1 via packageManager - #155

Merged
jonnyparris merged 1 commit into
mainfrom
chore/pin-npm-packagemanager
Oct 26, 2026
Merged

jonnyparris merged 1 commit into
mainfrom
chore/pin-npm-packagemanager

Conversation

@jonnyparris

Copy link
Copy Markdown
Owner

Workers Builds now installs the npm version named in packageManager (changelog: https://developers.cloudflare.com/changelog/post/2026-10-23-workers-builds-pin-npm-version/). Its default is npm 10.9.2.

Measured on this branch with npm ci --dry-run --ignore-scripts:

  • npm 10.9.2: fails, EUSAGE lock out of sync (missing @cloudflare/workers-types@5…, ws@8.22.0)
  • npm 11.12.1: ok, 527 packages

This removes one of two blockers for the README Deploy button. The other is the experimental compat flag (#46), which this does not touch.

beep-boop-🤖

Workers Builds (and so the Deploy to Cloudflare button) now installs the
npm version named in packageManager. Its default is npm 10.9.2, which
reads lockfiles written by npm 11 differently. Pinning makes the button
build install the same tree as local installs.

https://developers.cloudflare.com/changelog/post/2026-10-23-workers-builds-pin-npm-version/
@github-actions

Copy link
Copy Markdown

Preview deployed: https://dodo-preview.jonnyparris.club

Serves 8e11710 from this PR. Access-gated (same policies as prod). Load it in a Browser Run session with the Dodo service token to verify UI changes.

The preview is shared: the next PR push replaces this build, and this PR gets a new comment when that happens. Add the preview-lock label to hold it during a live check, and remove the label when you are done.

Replaced ca629c6 from #154.

@polylane

polylane Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Note

This change is unlikely to harm production.

I checked the dodo Worker over 72h: 64 requests, 0 errors, ~0.6 req/h. This line only sets the npm version Workers Builds installs and changes no runtime code, so the served Worker is unaffected.

View the full analysis →

Also considered · 3 refuted
  • Refuted · Pinning packageManager makes the CI npm ci install fail · Both workflows use actions/setup-node@v4 with node-version-file .nvmrc (Node 24) and no corepack step, so npm ci runs Node's bundled npm and npm does not enforce the packageManager field.
  • Refuted · A different npm major resolves a different bundle for the deployed Worker · npm ci installs strictly from the committed lockfile, so the resolved tree and the wrangler bundle are identical regardless of npm major, and the packageManager field is not part of the runtime script.
  • Refuted · corepack enforcement adds a registry fetch that can fail the deploy · No corepack enable step exists in either workflow, and the fetch would be a build-time step on a networked runner, not a production runtime path.

dodo · requests per hour

Analysed against 1 Cloudflare Worker and 1 repository

View in Polylane Pause assessments

Polylane analysed 8e11710 for production impact. You can ask follow-ups by mentioning @polylane in a comment.

Rate this review: 👍 helpful · 👎 not helpful · 😕 confusing

@jonnyparris
jonnyparris merged commit 77de46e into main Oct 26, 2026
3 checks passed
@jonnyparris
jonnyparris deleted the chore/pin-npm-packagemanager branch October 26, 2026 14:45

This branch was successfully deployed

1 active deployment
dodo-preview — 8e117101 Deployed Oct 26, 2026 by github-actions[bot]
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.

1 participant