Strip redundant nodejs_compat flags - #15148
Conversation
🦋 Changeset detectedLatest commit: e013f7d The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
|
✅ All changesets look good |
|
Good, the test helper exists. The implementation is well-tested and correct. Let me do one final sanity check on the miniflare test — whether it's actually verifying the fix. The test creates a worker with I've completed a thorough review. The core logic is correct:
The only borderline point is the contradiction case still failing to start (since workerd emits the redundant-flag error independent of the contradictory error), but this is intentional and consistent with the changeset's stated goal of surfacing the contradiction. That's a reasonable design choice, not a bug. No actionable issues. LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Ignore a
nodejs_compatcompatibility flag that the compatibility date already enablesFixes #15146
workerd rejects a compatibility flag that its compatibility date enables by default, so a Worker configured with both a compatibility date of
2026-08-04or later andnodejs_compatfailed to start locally with "The compatibility flag nodejs_compat became the default as of 2026-08-04 so does not need to be specified anymore".The redundant
nodejs_compatandnodejs_compat_v2flags are now dropped when starting the runtime, which has no effect on the resulting Worker because the compatibility date enables both anyway.no_nodejs_compatandno_nodejs_compat_v2still switch Node.js compatibility off, and a flag specified alongside its own opt-out is left alone so that workerd still reports those as contradictory.A picture of a cute animal (not mandatory, but encouraged)