Skip to content

docs: Use Cloudflare nodejs_compat flag#21659

Merged
JPeer264 merged 2 commits into
getsentry:developfrom
suzunn:fix-cloudflare-nodejs-compat
Jun 29, 2026
Merged

docs: Use Cloudflare nodejs_compat flag#21659
JPeer264 merged 2 commits into
getsentry:developfrom
suzunn:fix-cloudflare-nodejs-compat

Conversation

@suzunn

@suzunn suzunn commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Problem

The Cloudflare SDK README and several Cloudflare test fixtures still allow or use nodejs_als, but the SDK now needs the broader nodejs_compat flag as the minimum compatibility setting for current and future Node.js API usage.

Fixes #18803.

Solution

I updated the Cloudflare README to document nodejs_compat as the required flag, adjusted the async context comment to match, and switched the remaining Cloudflare Wrangler fixtures from nodejs_als to nodejs_compat. I also removed the duplicate compatibility flag from the Cloudflare agent e2e fixture.

Testing

  • corepack yarn install --frozen-lockfile --ignore-scripts
  • node_modules/.bin/oxfmt.cmd --check <changed files>
  • git diff --check
  • rg -n nodejs_als packages/cloudflare dev-packages/cloudflare-integration-tests dev-packages/e2e-tests/test-applications/cloudflare-agent

I also tried the Cloudflare package lint through the workspace script, but the POSIX-style environment assignment in the script does not run under Windows cmd. Running oxlint.cmd directly reached existing type-aware errors in packages/cloudflare/src/async.ts around Scope member access; this patch only changes the comment in that file.

@suzunn suzunn requested a review from a team as a code owner June 19, 2026 13:09
@suzunn suzunn requested review from JPeer264 and andreiborza and removed request for a team June 19, 2026 13:09
@JPeer264

Copy link
Copy Markdown
Member

Thanks for your contributions. This will actually be a breaking change and can't be merged in right now. From the first check it actually looks like how it should have been done.

However, since we can't merge this in right now, and we haven't started with our v11 tasks, I will close this for now. But not to worry, as soon as we start with the breaking changes I will reopen the branch.

This will be done in 1-2 months.

@JPeer264 JPeer264 closed this Jun 19, 2026
@JPeer264 JPeer264 reopened this Jun 29, 2026
@JPeer264 JPeer264 changed the title fix: enforce cloudflare nodejs compat flag docs: Use Cloudflare nodejs_compat flag Jun 29, 2026

@JPeer264 JPeer264 left a comment

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 reopened and removed the test cases. With that we only change everything in the docs and prepare already now for v11.

I kept the test cases to ensure we still have the basic nodejs_als compatibility in v10. I'll also stretch further and see when exactly it will be required. It's always nice to have a lower compatibility even if we require the entire suite

@JPeer264 JPeer264 enabled auto-merge (squash) June 29, 2026 08:04
@JPeer264 JPeer264 disabled auto-merge June 29, 2026 08:05
@JPeer264 JPeer264 enabled auto-merge (squash) June 29, 2026 08:05
@JPeer264 JPeer264 merged commit 5eac026 into getsentry:develop Jun 29, 2026
74 checks passed
mydea pushed a commit that referenced this pull request Jun 29, 2026
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #21659

Co-authored-by: JPeer264 <10677263+JPeer264@users.noreply.github.com>
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.

Cloudflare enforce nodejs_compat

2 participants