Skip to content

Support nodejs_compat being on by default - #15062

Draft
jamesopstad wants to merge 1 commit into
mainfrom
james/node-compat-default
Draft

Support nodejs_compat being on by default#15062
jamesopstad wants to merge 1 commit into
mainfrom
james/node-compat-default

Conversation

@jamesopstad

Copy link
Copy Markdown
Contributor

Enable Node.js compatibility by default for compatibility dates of 2026-08-04 or later

Workers with a compatibility date of 2026-08-04 or later now have Node.js compatibility enabled automatically. Previously the nodejs_compat flag had to be set explicitly.

Set the no_nodejs_compat compatibility flag to opt out.

// wrangler.json
{
	"compatibility_date": "2026-08-04",
	"compatibility_flags": ["no_nodejs_compat"]
}

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: already being documented

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e22c6f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
miniflare Minor
wrangler Minor
@cloudflare/deploy-helpers Patch
@cloudflare/pages-shared Patch
@cloudflare/remote-bindings Patch
@cloudflare/runtime-types Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch

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

* @param compatibilityFlags The compatibility flags
* @returns the mode and flags to indicate specific configuration for validating.
*/
export function getNodeCompat(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It doesn't seem right to me that this function lives in Miniflare. It should probably be in workers-utils but I haven't changed that in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants