-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs for nodejs_compat default enable date #17043
Conversation
Simplifies docs to direct people to use `nodejs_compat` rather than `nodejs_compat_v2`. Tries to reiterate the need to set your compatibility date multiple times, since this is an important detail to follow that could otherwise be missed.
Deploying cloudflare-docs with Cloudflare Pages
|
Files with changes (up to 15)
|
Co-authored-by: ToriLindsay <tgalatro@cloudflare.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we dropping docs around Pages nodejs compatibility?
``` | ||
|
||
:::note | ||
Starting on September 23rd, 2024, when your compatibility date is on or after `2024-09-23`, the `nodejs_compat` compatibility flag will enable the exact same behavior as `nodejs_compat_v2`. | ||
As of September 23rd, 2024, the `nodejs_compat` compatibility flag enables the exact same behavior as the `nodejs_compat_v2` compatibility flag, as long as your compatibility date is set to September 23rd, 2024 or later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should explicitly say that you can move back the compatibility date before 9-23 to get the old behavior? Obviously not something we want to encourage broadly, but if somebody runs into a bug with V2 that's not on V1 then it could give them a workaround.
compatibility_flags = [ "nodejs_compat_v2" ] | ||
``` | ||
|
||
## Enable Node.js in Pages Functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all still seems relevant. Why drop it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works the same way as Workers? Set flag in wrangler.toml
.
compatibility_flags = [ "nodejs_compat_v2" ] | ||
``` | ||
|
||
## Enable Node.js in Pages Functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works the same way as Workers? Set flag in wrangler.toml
.
* Update docs for nodejs_compat default enable date Simplifies docs to direct people to use `nodejs_compat` rather than `nodejs_compat_v2`. Tries to reiterate the need to set your compatibility date multiple times, since this is an important detail to follow that could otherwise be missed. * Apply suggestions from code review Co-authored-by: ToriLindsay <tgalatro@cloudflare.com> * Update src/content/docs/workers/runtime-apis/nodejs/index.mdx --------- Co-authored-by: ToriLindsay <tgalatro@cloudflare.com>
* Update docs for nodejs_compat default enable date Simplifies docs to direct people to use `nodejs_compat` rather than `nodejs_compat_v2`. Tries to reiterate the need to set your compatibility date multiple times, since this is an important detail to follow that could otherwise be missed. * Apply suggestions from code review Co-authored-by: ToriLindsay <tgalatro@cloudflare.com> * Update src/content/docs/workers/runtime-apis/nodejs/index.mdx --------- Co-authored-by: ToriLindsay <tgalatro@cloudflare.com>
* Update docs for nodejs_compat default enable date Simplifies docs to direct people to use `nodejs_compat` rather than `nodejs_compat_v2`. Tries to reiterate the need to set your compatibility date multiple times, since this is an important detail to follow that could otherwise be missed. * Apply suggestions from code review Co-authored-by: ToriLindsay <tgalatro@cloudflare.com> * Update src/content/docs/workers/runtime-apis/nodejs/index.mdx --------- Co-authored-by: ToriLindsay <tgalatro@cloudflare.com>
Simplifies docs to direct people to use
nodejs_compat
rather thannodejs_compat_v2
. Tries to reiterate the need to set your compatibility date multiple times, since this is an important detail to follow that could otherwise be missed.