Skip to content

Commit 2265df1

Browse files
committed
Update recently added compatibility flags
1 parent 6ebe319 commit 2265df1

File tree

49 files changed

+840
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+840
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Cache API request `cf` overrides cache rules"
8+
sort_date: "2025-05-19"
9+
enable_date: "2025-05-19"
10+
enable_flag: "cache_api_request_cf_overrides_cache_rules"
11+
disable_flag: "no_cache_api_request_cf_overrides_cache_rules"
12+
---
13+
14+
When `cache_api_request_cf_overrides_cache_rules` is enabled, cache settings specified in the `cf` object of a request passed to the [Cache API](/workers/runtime-apis/cache/) will override cache rules. This applies only to user-owned or grey-clouded sites.
15+
16+
This is the Cache API counterpart to the [`request_cf_overrides_cache_rules`](/workers/configuration/compatibility-flags/#fetch-api-request-cf-overrides-cache-rules) flag, which applies to the `fetch()` API.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable fast JSG struct optimization"
8+
sort_date: "2025-12-03"
9+
enable_date: "2025-12-03"
10+
enable_flag: "enable_fast_jsg_struct"
11+
disable_flag: "disable_fast_jsg_struct"
12+
---
13+
14+
When `enable_fast_jsg_struct` is enabled, internal struct types used by Workers runtime APIs are constructed using a more efficient pattern that reduces object creation time.
15+
16+
However, optional fields will be explicitly set to `undefined` rather than being omitted from the object entirely, which is an observable behavior change. Code that checks for the presence of a property using `"key" in obj` or `Object.hasOwn(obj, "key")` may behave differently, since optional fields that were previously absent will now be present with a value of `undefined`.
17+
18+
To check for a value, prefer `obj.key !== undefined` over `"key" in obj`.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable global Performance classes"
8+
sort_date: "2026-03-17"
9+
enable_date: "2026-03-17"
10+
enable_flag: "enable_global_performance_classes"
11+
disable_flag: "disable_global_performance_classes"
12+
---
13+
14+
When `enable_global_performance_classes` is enabled, the following classes are available on the global scope: `PerformanceEntry`, `PerformanceMark`, `PerformanceMeasure`, `PerformanceResourceTiming`, `PerformanceObserver`, and `PerformanceObserverEntryList`.
15+
16+
These classes are also implicitly enabled by the `enable_nodejs_perf_hooks_module` flag.
17+
18+
This flag is automatically enabled for Workers using a compatibility date of 2026-03-17 or later when [`nodejs_compat`](/workers/runtime-apis/nodejs/) is enabled.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable `node:child_process` module"
8+
sort_date: "2026-03-17"
9+
enable_date: "2026-03-17"
10+
enable_flag: "enable_nodejs_child_process_module"
11+
disable_flag: "disable_nodejs_child_process_module"
12+
---
13+
14+
The `enable_nodejs_child_process_module` flag enables the `node:child_process` module stub in Workers.
15+
16+
This flag is automatically enabled for Workers using a compatibility date of 2026-03-17 or later when [`nodejs_compat`](/workers/runtime-apis/nodejs/) is enabled.
17+
18+
See the [Node.js documentation](https://nodejs.org/docs/latest/api/child_process.html) for more details about the `node:child_process` API.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable `node:cluster` module"
8+
sort_date: "2025-12-04"
9+
enable_date: "2025-12-04"
10+
enable_flag: "enable_nodejs_cluster_module"
11+
disable_flag: "disable_nodejs_cluster_module"
12+
---
13+
14+
The `enable_nodejs_cluster_module` flag enables the `node:cluster` module stub in Workers.
15+
16+
This flag is automatically enabled for Workers using a compatibility date of 2025-12-04 or later when [`nodejs_compat`](/workers/runtime-apis/nodejs/) is enabled.
17+
18+
See the [Node.js documentation](https://nodejs.org/docs/latest/api/cluster.html) for more details about the `node:cluster` API.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable `node:console` module"
8+
sort_date: "2025-09-21"
9+
enable_date: "2025-09-21"
10+
enable_flag: "enable_nodejs_console_module"
11+
disable_flag: "disable_nodejs_console_module"
12+
---
13+
14+
The `enable_nodejs_console_module` flag enables the `node:console` module in Workers.
15+
16+
This flag is automatically enabled for Workers using a compatibility date of 2025-09-21 or later when [`nodejs_compat`](/workers/runtime-apis/nodejs/) is enabled.
17+
18+
See the [Node.js documentation](https://nodejs.org/docs/latest/api/console.html) for more details about the `node:console` API.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable `node:dgram` module"
8+
sort_date: "2026-01-29"
9+
enable_date: "2026-01-29"
10+
enable_flag: "enable_nodejs_dgram_module"
11+
disable_flag: "disable_nodejs_dgram_module"
12+
---
13+
14+
The `enable_nodejs_dgram_module` flag enables the `node:dgram` module stub in Workers.
15+
16+
This flag is automatically enabled for Workers using a compatibility date of 2026-01-29 or later when [`nodejs_compat`](/workers/runtime-apis/nodejs/) is enabled.
17+
18+
See the [Node.js documentation](https://nodejs.org/docs/latest/api/dgram.html) for more details about the `node:dgram` API.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable `node:domain` module"
8+
sort_date: "2025-12-04"
9+
enable_date: "2025-12-04"
10+
enable_flag: "enable_nodejs_domain_module"
11+
disable_flag: "disable_nodejs_domain_module"
12+
---
13+
14+
The `enable_nodejs_domain_module` flag enables the `node:domain` module stub in Workers. Note that `node:domain` is deprecated in Node.js itself.
15+
16+
This flag is automatically enabled for Workers using a compatibility date of 2025-12-04 or later when [`nodejs_compat`](/workers/runtime-apis/nodejs/) is enabled.
17+
18+
See the [Node.js documentation](https://nodejs.org/docs/latest/api/domain.html) for more details about the `node:domain` API.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable `node:fs` module"
8+
sort_date: "2025-09-15"
9+
enable_date: "2025-09-15"
10+
enable_flag: "enable_nodejs_fs_module"
11+
disable_flag: "disable_nodejs_fs_module"
12+
---
13+
14+
The `enable_nodejs_fs_module` flag enables the `node:fs` module in Workers.
15+
16+
This flag is automatically enabled for Workers using a compatibility date of 2025-09-15 or later when [`nodejs_compat`](/workers/runtime-apis/nodejs/) is enabled.
17+
18+
See the [Node.js documentation](https://nodejs.org/docs/latest/api/fs.html) for more details about the `node:fs` API.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
_build:
3+
publishResources: false
4+
render: never
5+
list: never
6+
7+
name: "Enable Node.js-compatible global timers"
8+
sort_date: "2026-02-10"
9+
enable_date: "2026-02-10"
10+
enable_flag: "enable_nodejs_global_timers"
11+
disable_flag: "no_nodejs_global_timers"
12+
---
13+
14+
When `enable_nodejs_global_timers` is enabled, `setTimeout`, `setInterval`, `clearTimeout`, and `clearInterval` return Node.js-compatible `Timeout` objects with methods like `refresh()`, `ref()`, `unref()`, and `hasRef()`, matching the behavior of `node:timers`.
15+
16+
This flag requires [`nodejs_compat`](/workers/runtime-apis/nodejs/) to be enabled and is automatically enabled for Workers using a compatibility date of 2026-02-10 or later when `nodejs_compat` is enabled.
17+
18+
See the [Node.js documentation](https://nodejs.org/docs/latest/api/timers.html) for more details about the timer APIs.

0 commit comments

Comments
 (0)