Skip to content

Update nodejs_compat status - #32549

Open
jasnell wants to merge 3 commits into
cloudflare:productionfrom
jasnell:jasnell/update-nodejs-compat-status
Open

Update nodejs_compat status#32549
jasnell wants to merge 3 commits into
cloudflare:productionfrom
jasnell:jasnell/update-nodejs-compat-status

Conversation

@jasnell

@jasnell jasnell commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a changelog entry and update the Workers docs to reflect that nodejs_compat and nodejs_compat_v2 default on for compatibility dates of 2026-08-04 or later. Document the valid opt-in dates, complete opt-out flags, and that Workers developer tools ignore redundant positive flags so existing projects can update without removing them.

Related implementation: cloudflare/workers-sdk#15123 and cloudflare/workers-sdk#15148

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 1 warning found in commit 2f0374d.

👉 Fix in your agent 👈
Fix the following review findings in PR #32549 (https://github.com/cloudflare/cloudflare-docs/pull/32549).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Style Guide Review

### Warnings (1)

#### SG-cec77a382619 · Use turn on / turn off instead of enable/disable (for toggles)
- **File:** `src/content/partials/workers/nodejs_compat.mdx` line 7
- **Issue:** Line uses `enable` for compatibility flags: "Workers and Pages projects enable both `nodejs_compat` and `nodejs_compat_v2` by default."
- **Fix:** Change `enable` to `turn on`: "Workers and Pages projects turn on both `nodejs_compat` and `nodejs_compat_v2` by default."

Code Review

This code review is in beta and may not always be helpful — use your judgment.

No code review issues found.

Conventions

No convention issues found.

Style Guide Review

Warnings (1)
File Issue
partials/workers/nodejs_compat.mdx line 7 Use turn on / turn off instead of enable/disable (for toggles) — Line uses enable for compatibility flags: "Workers and Pages projects enable both nodejs_compat and nodejs_compat_v2 by default." Fix: Change enable to turn on: "Workers and Pages projects turn on both nodejs_compat and nodejs_compat_v2 by default."
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@irvinebroque

Copy link
Copy Markdown
Contributor

/bonk please review and update based on feedback

@ask-bonk

ask-bonk Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

I've reviewed all changed files and the bot feedback. Here's my assessment:

Bot Feedback — All Agreed

ID File Finding Verdict
SG-500a8f17c039 changelog/workers/2026-08-04-nodejs-compat-default.mdx line 15 "out of the box" → "by default" Agree — straightforward style guide fix.
SG-066cd925afa5 workers/configuration/compatibility-flags.mdx line 59 Missing trailing slash on ](/workers/runtime-apis/nodejs) Agree — should be ](/workers/runtime-apis/nodejs/). Note: there are two links on this line; the first [growing subset](/workers/runtime-apis/nodejs/) already has the slash. The second [Runtime APIs](/workers/runtime-apis/nodejs) is the one that needs fixing.
SG-8c36ea53a826 partials/workers/nodejs-compat-howto.mdx line 8 Non-descriptive "Learn more" link text Agree — reword to something like refer to [Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag).
SG-184841117a1b workers/runtime-apis/nodejs/index.mdx line 23 Passive voice: "Node.js compatibility is enabled by default." Agree — rewrite in active voice, e.g. "For compatibility dates of 2026-08-04 or later, Workers enables Node.js compatibility by default."

Additional Finding (Bot Missed)

File: src/content/docs/workers/runtime-apis/nodejs/index.mdx line 23
Issue: Same non-descriptive link text as SG-8c36ea53a826. The line ends with [Learn more about the Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag).
Fix: Reword similarly, e.g. For more information, refer to the [Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag).

Other Observations

The content changes themselves are accurate and well-structured:

  • Changelog entry has correct product, date, and description
  • enable_date: "2026-08-04" is correctly added to the compatibility flag metadata
  • The test update in worker/index.worker.test.ts correctly validates the new enable date
  • Messaging is consistent across partials, docs, and changelog

Note: This run is in review-only mode (fork PR), so I cannot push fixes. The four bot findings plus the additional link-text issue above all need to be addressed by the PR author in a follow-up commit.

github run

@jasnell
jasnell force-pushed the jasnell/update-nodejs-compat-status branch from c3dd8c0 to 40f30eb Compare August 5, 2026 18:16
@jasnell

jasnell commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/bonk re-review. review comments addressed in squashed commit

@ask-bonk

This comment was marked as resolved.

@jasnell
jasnell enabled auto-merge (squash) August 5, 2026 18:46
@MattieTK
MattieTK disabled auto-merge August 6, 2026 10:35
@MattieTK

MattieTK commented Aug 6, 2026

Copy link
Copy Markdown
Member

Have disabled auto merge as we want to wait for this to land in workers-sdk for local dev first.

@MattieTK

Copy link
Copy Markdown
Member

Updated this PR to align the documentation with workers-sdk #15123:

  • Documented that both nodejs_compat and nodejs_compat_v2 default on for compatibility dates of 2026-08-04 or later.
  • Clarified that explicit positive flags must be removed for those dates and added the exact workerd error with recovery guidance.
  • Documented that a complete opt-out requires both no_nodejs_compat and no_nodejs_compat_v2.
  • Made the explicit opt-in window 2024-09-23 through 2026-08-03, with a date inside that range in the configuration example.
  • Clarified that Wrangler, the Cloudflare Vite plugin, and Vitest Pool Workers can infer today's date when it is omitted.

Validation completed successfully with formatting, pnpm run check, the full site build, and git diff --check.

@MattieTK
MattieTK force-pushed the jasnell/update-nodejs-compat-status branch from a2e2a77 to ccbef83 Compare August 11, 2026 22:12
@MattieTK

Copy link
Copy Markdown
Member

Follow-up documentation update for workers-sdk #15148, superseding the earlier redundant-flag recovery guidance:

  • Existing projects can advance to compatibility date 2026-08-04 or later without removing nodejs_compat or nodejs_compat_v2.
  • Wrangler, Miniflare, the Cloudflare Vite plugin, and Vitest Pool Workers ignore those redundant positive flags when starting the runtime.
  • New configurations should omit the positive flags because the compatibility date enables the same behavior.
  • To opt out completely, remove positive flags if present and add both no_nodejs_compat and no_nodejs_compat_v2.

Formatting, pnpm run check, and git diff --check pass.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.