-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Update recently added compatibility flags #24083
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
Merged
jasnell
merged 3 commits into
cloudflare:production
from
jasnell:jasnell/update-workers-compat-flags
Aug 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/content/compatibility-flags/allow-eval-during-startup.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Enable eval during startup" | ||
| sort_date: "2025-06-01" | ||
| enable_date: "2025-06-01" | ||
| enable_flag: "allow_eval_during_startup" | ||
| disable_flag: "disallow_eval_during_startup" | ||
| --- | ||
|
|
||
| When the `allow_eval_during_startup` flag is set, Workers can use `eval()` | ||
| and `new Function(text)` during the startup phase of a Worker script. This | ||
| allows for dynamic code execution at the beginning of a Worker lifecycle. | ||
|
|
||
| When the `disallow_eval_during_startup` flag is set, using `eval()` or | ||
| `new Function(text)` during the startup phase will throw an error. |
22 changes: 22 additions & 0 deletions
22
src/content/compatibility-flags/bind-asynclocalstorage-snapshot-to-request.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Bind AsyncLocalStorage snapshots to the request" | ||
| sort_date: "2025-06-16" | ||
| enable_date: "2025-06-16" | ||
| enable_flag: "bind_asynclocalstorage_snapshot_to_request" | ||
| disable_flag: "do_not_bind_asynclocalstorage_snapshot_to" | ||
| --- | ||
|
|
||
| The AsyncLocalStorage frame can capture values that are bound to the | ||
| current request context. This is not always in the users control since we use | ||
| the ALS storage frame to propagate internal trace spans as well as | ||
| user-provided values. When the `bind_asynclocalstorage_snapshot_to_request` | ||
| flag is set, the runtime binds the snapshot / bound functions to the current | ||
| request context and will throw an error if the bound functions are called | ||
| outside of the request in which they were created. | ||
|
|
||
| The `do_not_bind_asynclocalstorage_snapshot_to` flag disables this behavior. |
18 changes: 18 additions & 0 deletions
18
src/content/compatibility-flags/disallow_importable_env.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Disallowing importable environment" | ||
| sort_date: "2025-05-05" | ||
| enable_flag: "disallow_importable_env" | ||
| disable_flag: "allow_importable_env" | ||
| --- | ||
|
|
||
| When the `disallow_importable_env` flag is enabled, Workers will not allow importing the | ||
| environment variables via the `cloudflare:workers` module and will not populate the | ||
| environment variables in the global `process.env` object when Node.js compatibility is | ||
| enabled. | ||
|
|
||
| There is no default enabled date for this flag. |
19 changes: 19 additions & 0 deletions
19
src/content/compatibility-flags/enable-navigator-language.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Enable `navigator.language`" | ||
| sort_date: "2025-05-19" | ||
| enable_date: "2025-05-19" | ||
| enable_flag: "enable_navigator_language" | ||
| disable_flag: "disable_navigator_language" | ||
| --- | ||
|
|
||
| When the `enable_navigator_language` flag is set, the `navigator.language` property | ||
| will be available in Workers. For now, the value of `navigator.language` will | ||
| always be `en`. | ||
|
|
||
| When the `disable_navigator_language` flag is set, the `navigator.language` property | ||
| will not be available. |
18 changes: 18 additions & 0 deletions
18
src/content/compatibility-flags/enable-nodejs-http-modules.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Enable availability of `node:http` modules" | ||
| sort_date: "2025-08-15" | ||
| enable_date: "2025-08-15" | ||
| enable_flag: "enable_nodejs_http_modules" | ||
| disable_flag: "disable_nodejs_http_modules" | ||
| --- | ||
|
|
||
| The `enable_nodejs_http_modules` flag enables the availability of Node.js | ||
jasnell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| `node:http` and `node:https` modules in Workers. | ||
jasnell marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The `disable_nodejs_http_modules` flag disables the availability of these | ||
| modules. | ||
18 changes: 18 additions & 0 deletions
18
src/content/compatibility-flags/expose-global-message-channel.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Expose global MessageChannel and MessagePort" | ||
| sort_date: "2025-08-15" | ||
| enable_date: "2025-08-15" | ||
| enable_flag: "expose_global_message_channel" | ||
| disable_flag: "no_expose_global_message_channel" | ||
| --- | ||
|
|
||
| When the `expose_global_message_channel` flag is set, Workers will expose | ||
| the `MessageChannel` and `MessagePort` constructors globally. | ||
|
|
||
| When the `no_expose_global_message_channel` flag is set, Workers will not | ||
| expose these. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Pedantic Web Platform Tests (WPT) compliance" | ||
| sort_date: "2025-07-15" | ||
| enable_flag: "pedantic_wpt" | ||
| disable_flag: "non_pedantic_wpt" | ||
| --- | ||
|
|
||
| The `pedantic_wpt` flag enables strict compliance with Web Platform Tests (WPT) | ||
| in Workers. Initially this only effects `Event` and `EventTarget` APIs but | ||
| will be expanded to other APIs in the future. There is no default enable | ||
| date for this flag. |
15 changes: 15 additions & 0 deletions
15
src/content/compatibility-flags/python-no-global-handlers.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Disable global handlers for Python Workers" | ||
| sort_date: "2025-08-14" | ||
| enable_date: "2025-08-14" | ||
| enable_flag: "python_no_global_handlers" | ||
| disable_flag: "disable_python_no_global_handlers" | ||
| --- | ||
|
|
||
| When the `python_no_global_handlers` flag is set, Python Workers will disable | ||
| the global handlers and enforce their use via default entrypoint classes. |
18 changes: 18 additions & 0 deletions
18
src/content/compatibility-flags/request-signal-passthrough.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Passthrough AbortSignal of incoming request to subrequests" | ||
| sort_date: "2025-05-05" | ||
| enable_flag: "request_signal_passthrough" | ||
| disable_flag: "no_request_signal_passthrough" | ||
| --- | ||
|
|
||
| When the `request_signal_passthrough` flag set, the `AbortSignal` of an incoming | ||
| request will be passed through to subrequests when the request is forwarded to | ||
| a subrequest using the `fetch()` API. | ||
|
|
||
| The the `no_request_signal_passthrough` flag is set, the `AbortSignal` of the | ||
| incoming request will not be passed through. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Set the `this` value of EventTarget event handlers" | ||
| sort_date: "2025-08-01" | ||
| enable_date: "2025-08-01" | ||
| enable_flag: "set_event_target_this" | ||
| disable_flag: "no_set_event_target_this" | ||
| --- | ||
|
|
||
| When the `set_event_target_this` flag is se, Workers will set the `this` value | ||
| of event handlers to the `EventTarget` instance that the event is being | ||
| dispatched on. This is compliant with the specification. | ||
|
|
||
| When then `no_set_event_target_this` flag is set, Workers will not set the | ||
| `this` value of event handlers, and it will be `undefined` instead. |
17 changes: 17 additions & 0 deletions
17
src/content/compatibility-flags/set-forwardable-email-full-headers.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Set forwardable email full headers" | ||
| sort_date: "2025-08-01" | ||
| enable_date: "2025-08-01" | ||
| enable_flag: "set_forwardable_email_full_headers" | ||
| disable_flag: "set_forwardable_email_single_headers" | ||
| --- | ||
|
|
||
| The original version of the headers sent to edgeworker were truncated to a | ||
| single value for specific header names, such as To and Cc. With the | ||
| `set_forwardable_email_full_headers` flag set, Workers will receive the full | ||
| header values to the worker script. |
22 changes: 22 additions & 0 deletions
22
src/content/compatibility-flags/throw-on-unrecognized-import-assertion.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Throw on unrecognized import assertions" | ||
| sort_date: "2025-06-16" | ||
| enable_date: "2025-06-16" | ||
| enable_flag: "throw_on_unrecognized_import_assertion" | ||
| disable_flag: "ignore_unrecognized_import_assertion" | ||
| --- | ||
|
|
||
| The `throw_on_unrecognized_import_assertion` flag controls how Workers handle | ||
| import attributes that are not recognized by the runtime. Previously, Workers | ||
| would ignore all import attributes, which is not compliant with the | ||
| specification. Runtimes are expected to throw an error when an import | ||
| attribute is encountered that is not recognized. | ||
|
|
||
| When the `ignore_unrecognized_import_assertion` flag is set, Workers will | ||
| ignore unrecognized import attributes. | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.