docs: Use Cloudflare nodejs_compat flag#21659
Conversation
|
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. |
There was a problem hiding this comment.
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
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>
Problem
The Cloudflare SDK README and several Cloudflare test fixtures still allow or use
nodejs_als, but the SDK now needs the broadernodejs_compatflag as the minimum compatibility setting for current and future Node.js API usage.Fixes #18803.
Solution
I updated the Cloudflare README to document
nodejs_compatas the required flag, adjusted the async context comment to match, and switched the remaining Cloudflare Wrangler fixtures fromnodejs_alstonodejs_compat. I also removed the duplicate compatibility flag from the Cloudflare agent e2e fixture.Testing
corepack yarn install --frozen-lockfile --ignore-scriptsnode_modules/.bin/oxfmt.cmd --check <changed files>git diff --checkrg -n nodejs_als packages/cloudflare dev-packages/cloudflare-integration-tests dev-packages/e2e-tests/test-applications/cloudflare-agentI 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. Runningoxlint.cmddirectly reached existing type-aware errors inpackages/cloudflare/src/async.tsaroundScopemember access; this patch only changes the comment in that file.