Skip to content

Enable nodejs_compat by default #6444

Draft
penalosa wants to merge 1 commit intomainfrom
penalosa/nodejs-compat-default-date
Draft

Enable nodejs_compat by default #6444
penalosa wants to merge 1 commit intomainfrom
penalosa/nodejs-compat-default-date

Conversation

@penalosa
Copy link
Copy Markdown
Contributor

@penalosa penalosa commented Mar 27, 2026

Adds a $compatEnableDate("2026-04-14") to the nodeJsCompat flag so that workers with compatibility date >= 2026-04-14 get nodejs_compat enabled by default.

@penalosa penalosa changed the title Enable nodejs_compat by default after 2026-04-14 Enable nodejs_compat by default Mar 27, 2026
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 27, 2026

The change is clean, correct, and consistent with the established pattern. The date is valid (Tuesday), wire-compatible (annotation-only change), and the cascading impliedByAfterDate behavior is the intended design. There are no test changes needed since the @all-compat-flags variant already tests this flag enabled by date, and the date validation test will automatically cover the new date.

LGTM

github run

@github-actions
Copy link
Copy Markdown

The generated output of @cloudflare/workers-types has been changed by this PR. If this is intentional, run just generate-types to update the snapshot. Alternatively, you can download the full generated types:

Full Type Diff
diff -r types/generated-snapshot/latest/index.d.ts bazel-bin/types/definitions/latest/index.d.ts
352a353,360
>   Buffer: any;
>   process: any;
>   global: ServiceWorkerGlobalScope;
>   setImmediate(
>     $function: (...param0: any[]) => void,
>     ...args: any[]
>   ): Immediate;
>   clearImmediate(immediate: Immediate | null): void;
383a392,398
>   Performance: typeof Performance;
>   PerformanceEntry: typeof PerformanceEntry;
>   PerformanceMark: typeof PerformanceMark;
>   PerformanceMeasure: typeof PerformanceMeasure;
>   PerformanceResourceTiming: typeof PerformanceResourceTiming;
>   PerformanceObserver: typeof PerformanceObserver;
>   PerformanceObserverEntryList: typeof PerformanceObserverEntryList;
474a490,497
> declare const Buffer: any;
> declare const process: any;
> declare const global: ServiceWorkerGlobalScope;
> declare function setImmediate(
>   $function: (...param0: any[]) => void,
>   ...args: any[]
> ): Immediate;
> declare function clearImmediate(immediate: Immediate | null): void;
561a585,589
> interface Immediate {
>   ref(): void;
>   unref(): void;
>   hasRef(): boolean;
> }
3919c3947
< declare abstract class Performance {
---
> declare abstract class Performance extends EventTarget {
3923a3952,4010
>   get eventCounts(): EventCounts;
>   /**
>    * The **`clearMarks()`** method removes all or specific PerformanceMark objects from the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks)
>    */
>   clearMarks(name?: string): void;
>   /**
>    * The **`clearMeasures()`** method removes all or specific PerformanceMeasure objects from the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures)
>    */
>   clearMeasures(name?: string): void;
>   /**
>    * The **`clearResourceTimings()`** method removes all performance entries with an PerformanceEntry.entryType of `'resource'` from the browser's performance timeline and sets the size of the performance resource data buffer to zero.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings)
>    */
>   clearResourceTimings(): void;
>   /**
>    * The **`getEntries()`** method returns an array of all PerformanceEntry objects currently present in the performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries)
>    */
>   getEntries(): PerformanceEntry[];
>   /**
>    * The **`getEntriesByName()`** method returns an array of PerformanceEntry objects currently present in the performance timeline with the given _name_ and _type_.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName)
>    */
>   getEntriesByName(name: string, type?: string): PerformanceEntry[];
>   /**
>    * The **`getEntriesByType()`** method returns an array of PerformanceEntry objects currently present in the performance timeline for a given _type_.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType)
>    */
>   getEntriesByType(type: string): PerformanceEntry[];
>   /**
>    * The **`mark()`** method creates a named PerformanceMark object representing a high resolution timestamp marker in the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark)
>    */
>   mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
>   /**
>    * The **`measure()`** method creates a named PerformanceMeasure object representing a time measurement between two marks in the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure)
>    */
>   measure(
>     measureName: string,
>     measureOptionsOrStartMark?: PerformanceMeasureOptions | string,
>     maybeEndMark?: string,
>   ): PerformanceMeasure;
>   /**
>    * The **`setResourceTimingBufferSize()`** method sets the desired size of the browser's resource timing buffer which stores the `'resource'` performance entries.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
>    */
>   setResourceTimingBufferSize(size: number): void;
3929a4017,4303
>   get nodeTiming(): PerformanceNodeTiming;
>   eventLoopUtilization(): PerformanceEventLoopUtilization;
>   markResourceTiming(): void;
>   timerify(fn: () => void): () => void;
> }
> interface PerformanceEventLoopUtilization {
>   idle: number;
>   active: number;
>   utilization: number;
> }
> interface PerformanceNodeTiming extends PerformanceEntry {
>   readonly nodeStart: number;
>   readonly v8Start: number;
>   readonly bootstrapComplete: number;
>   readonly environment: number;
>   readonly loopStart: number;
>   readonly loopExit: number;
>   readonly idleTime: number;
>   readonly uvMetricsInfo: UvMetricsInfo;
>   toJSON(): object;
> }
> interface UvMetricsInfo {
>   loopCount: number;
>   events: number;
>   eventsWaiting: number;
> }
> /**
>  * **`PerformanceMark`** is an interface for PerformanceEntry objects with an PerformanceEntry.entryType of `'mark'`.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
>  */
> declare class PerformanceMark extends PerformanceEntry {
>   constructor(name: string, maybeOptions?: PerformanceMarkOptions);
>   /**
>    * The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (either when using Performance.mark or the PerformanceMark.PerformanceMark constructor).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
>    */
>   get detail(): any;
>   toJSON(): object;
> }
> /**
>  * **`PerformanceMeasure`** is an _abstract_ interface for PerformanceEntry objects with an PerformanceEntry.entryType of `'measure'`.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
>  */
> declare abstract class PerformanceMeasure extends PerformanceEntry {
>   /**
>    * The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (when using Performance.measure.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
>    */
>   get detail(): any;
>   toJSON(): object;
> }
> interface PerformanceMarkOptions {
>   detail?: any;
>   startTime?: number;
> }
> interface PerformanceMeasureOptions {
>   detail?: any;
>   start?: number;
>   duration?: number;
>   end?: number;
> }
> /**
>  * The **`PerformanceObserverEntryList`** interface is a list of PerformanceEntry that were explicitly observed via the PerformanceObserver.observe method.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList)
>  */
> declare abstract class PerformanceObserverEntryList {
>   /**
>    * The **`getEntries()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries)
>    */
>   getEntries(): PerformanceEntry[];
>   /**
>    * The **`getEntriesByType()`** method of the PerformanceObserverEntryList returns a list of explicitly _observed_ PerformanceEntry objects for a given PerformanceEntry.entryType.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType)
>    */
>   getEntriesByType(type: string): PerformanceEntry[];
>   /**
>    * The **`getEntriesByName()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects for a given PerformanceEntry.name and PerformanceEntry.entryType.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName)
>    */
>   getEntriesByName(name: string, type?: string): PerformanceEntry[];
> }
> /**
>  * The **`PerformanceEntry`** object encapsulates a single performance metric that is part of the browser's performance timeline.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
>  */
> declare abstract class PerformanceEntry {
>   /**
>    * The read-only **`name`** property of the PerformanceEntry interface is a string representing the name for a performance entry.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name)
>    */
>   get name(): string;
>   /**
>    * The read-only **`entryType`** property returns a string representing the type of performance metric that this entry represents.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType)
>    */
>   get entryType(): string;
>   /**
>    * The read-only **`startTime`** property returns the first DOMHighResTimeStamp recorded for this PerformanceEntry.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime)
>    */
>   get startTime(): number;
>   /**
>    * The read-only **`duration`** property returns a DOMHighResTimeStamp that is the duration of the PerformanceEntry.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration)
>    */
>   get duration(): number;
>   /**
>    * The **`toJSON()`** method is a Serialization; it returns a JSON representation of the PerformanceEntry object.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
>    */
>   toJSON(): object;
> }
> /**
>  * The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
>  */
> declare abstract class PerformanceResourceTiming extends PerformanceEntry {
>   /**
>    * The **`connectEnd`** read-only property returns the DOMHighResTimeStamp immediately after the browser finishes establishing the connection to the server to retrieve the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd)
>    */
>   get connectEnd(): number;
>   /**
>    * The **`connectStart`** read-only property returns the DOMHighResTimeStamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart)
>    */
>   get connectStart(): number;
>   /**
>    * The **`decodedBodySize`** read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
>    */
>   get decodedBodySize(): number;
>   /**
>    * The **`domainLookupEnd`** read-only property returns the DOMHighResTimeStamp immediately after the browser finishes the domain-name lookup for the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd)
>    */
>   get domainLookupEnd(): number;
>   /**
>    * The **`domainLookupStart`** read-only property returns the DOMHighResTimeStamp immediately before the browser starts the domain name lookup for the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart)
>    */
>   get domainLookupStart(): number;
>   /**
>    * The **`encodedBodySize`** read-only property represents the size (in octets) received from the fetch (HTTP or cache) of the payload body before removing any applied content encodings (like gzip or Brotli).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize)
>    */
>   get encodedBodySize(): number;
>   /**
>    * The **`fetchStart`** read-only property represents a DOMHighResTimeStamp immediately before the browser starts to fetch the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
>    */
>   get fetchStart(): number;
>   /**
>    * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType)
>    */
>   get initiatorType(): string;
>   /**
>    * The **`nextHopProtocol`** read-only property is a string representing the network protocol used to fetch the resource, as identified by the ALPN Protocol ID (RFC7301).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol)
>    */
>   get nextHopProtocol(): string;
>   /**
>    * The **`redirectEnd`** read-only property returns a DOMHighResTimeStamp immediately after receiving the last byte of the response of the last redirect.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd)
>    */
>   get redirectEnd(): number;
>   /**
>    * The **`redirectStart`** read-only property returns a DOMHighResTimeStamp representing the start time of the fetch which that initiates the redirect.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart)
>    */
>   get redirectStart(): number;
>   /**
>    * The **`requestStart`** read-only property returns a DOMHighResTimeStamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart)
>    */
>   get requestStart(): number;
>   /**
>    * The **`responseEnd`** read-only property returns a DOMHighResTimeStamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd)
>    */
>   get responseEnd(): number;
>   /**
>    * The **`responseStart`** read-only property returns a DOMHighResTimeStamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart)
>    */
>   get responseStart(): number;
>   /**
>    * The **`responseStatus`** read-only property represents the HTTP response status code returned when fetching the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus)
>    */
>   get responseStatus(): number;
>   /**
>    * The **`secureConnectionStart`** read-only property returns a DOMHighResTimeStamp immediately before the browser starts the handshake process to secure the current connection.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart)
>    */
>   get secureConnectionStart(): number | undefined;
>   /**
>    * The **`transferSize`** read-only property represents the size (in octets) of the fetched resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize)
>    */
>   get transferSize(): number;
>   /**
>    * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a The `workerStart` property can have the following values: - A DOMHighResTimeStamp.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart)
>    */
>   get workerStart(): number;
> }
> /**
>  * The **`PerformanceObserver`** interface is used to observe performance measurement events and be notified of new PerformanceEntry as they are recorded in the browser's _performance timeline_.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver)
>  */
> declare class PerformanceObserver {
>   constructor(callback: any);
>   /**
>    * The **`disconnect()`** method of the PerformanceObserver interface is used to stop the performance observer from receiving any PerformanceEntry events.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect)
>    */
>   disconnect(): void;
>   /**
>    * The **`observe()`** method of the **PerformanceObserver** interface is used to specify the set of performance entry types to observe.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe)
>    */
>   observe(options?: PerformanceObserverObserveOptions): void;
>   /**
>    * The **`takeRecords()`** method of the PerformanceObserver interface returns the current list of PerformanceEntry objects stored in the performance observer, emptying it out.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/takeRecords)
>    */
>   takeRecords(): PerformanceEntry[];
>   readonly supportedEntryTypes: string[];
> }
> interface PerformanceObserverObserveOptions {
>   buffered?: boolean;
>   durationThreshold?: number;
>   entryTypes?: string[];
>   type?: string;
> }
> interface EventCounts {
>   get size(): number;
>   get(eventType: string): number | undefined;
>   has(eventType: string): boolean;
>   entries(): IterableIterator<string[]>;
>   keys(): IterableIterator<string>;
>   values(): IterableIterator<number>;
>   forEach(
>     param1: (param0: number, param1: string, param2: EventCounts) => void,
>     param2?: any,
>   ): void;
>   [Symbol.iterator](): IterableIterator<string[]>;
diff -r types/generated-snapshot/latest/index.ts bazel-bin/types/definitions/latest/index.ts
352a353,360
>   Buffer: any;
>   process: any;
>   global: ServiceWorkerGlobalScope;
>   setImmediate(
>     $function: (...param0: any[]) => void,
>     ...args: any[]
>   ): Immediate;
>   clearImmediate(immediate: Immediate | null): void;
383a392,398
>   Performance: typeof Performance;
>   PerformanceEntry: typeof PerformanceEntry;
>   PerformanceMark: typeof PerformanceMark;
>   PerformanceMeasure: typeof PerformanceMeasure;
>   PerformanceResourceTiming: typeof PerformanceResourceTiming;
>   PerformanceObserver: typeof PerformanceObserver;
>   PerformanceObserverEntryList: typeof PerformanceObserverEntryList;
476a492,499
> export declare const Buffer: any;
> export declare const process: any;
> export declare const global: ServiceWorkerGlobalScope;
> export declare function setImmediate(
>   $function: (...param0: any[]) => void,
>   ...args: any[]
> ): Immediate;
> export declare function clearImmediate(immediate: Immediate | null): void;
563a587,591
> export interface Immediate {
>   ref(): void;
>   unref(): void;
>   hasRef(): boolean;
> }
3925c3953
< export declare abstract class Performance {
---
> export declare abstract class Performance extends EventTarget {
3929a3958,4016
>   get eventCounts(): EventCounts;
>   /**
>    * The **`clearMarks()`** method removes all or specific PerformanceMark objects from the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks)
>    */
>   clearMarks(name?: string): void;
>   /**
>    * The **`clearMeasures()`** method removes all or specific PerformanceMeasure objects from the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures)
>    */
>   clearMeasures(name?: string): void;
>   /**
>    * The **`clearResourceTimings()`** method removes all performance entries with an PerformanceEntry.entryType of `'resource'` from the browser's performance timeline and sets the size of the performance resource data buffer to zero.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings)
>    */
>   clearResourceTimings(): void;
>   /**
>    * The **`getEntries()`** method returns an array of all PerformanceEntry objects currently present in the performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries)
>    */
>   getEntries(): PerformanceEntry[];
>   /**
>    * The **`getEntriesByName()`** method returns an array of PerformanceEntry objects currently present in the performance timeline with the given _name_ and _type_.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName)
>    */
>   getEntriesByName(name: string, type?: string): PerformanceEntry[];
>   /**
>    * The **`getEntriesByType()`** method returns an array of PerformanceEntry objects currently present in the performance timeline for a given _type_.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType)
>    */
>   getEntriesByType(type: string): PerformanceEntry[];
>   /**
>    * The **`mark()`** method creates a named PerformanceMark object representing a high resolution timestamp marker in the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark)
>    */
>   mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
>   /**
>    * The **`measure()`** method creates a named PerformanceMeasure object representing a time measurement between two marks in the browser's performance timeline.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure)
>    */
>   measure(
>     measureName: string,
>     measureOptionsOrStartMark?: PerformanceMeasureOptions | string,
>     maybeEndMark?: string,
>   ): PerformanceMeasure;
>   /**
>    * The **`setResourceTimingBufferSize()`** method sets the desired size of the browser's resource timing buffer which stores the `'resource'` performance entries.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
>    */
>   setResourceTimingBufferSize(size: number): void;
3935a4023,4309
>   get nodeTiming(): PerformanceNodeTiming;
>   eventLoopUtilization(): PerformanceEventLoopUtilization;
>   markResourceTiming(): void;
>   timerify(fn: () => void): () => void;
> }
> export interface PerformanceEventLoopUtilization {
>   idle: number;
>   active: number;
>   utilization: number;
> }
> export interface PerformanceNodeTiming extends PerformanceEntry {
>   readonly nodeStart: number;
>   readonly v8Start: number;
>   readonly bootstrapComplete: number;
>   readonly environment: number;
>   readonly loopStart: number;
>   readonly loopExit: number;
>   readonly idleTime: number;
>   readonly uvMetricsInfo: UvMetricsInfo;
>   toJSON(): object;
> }
> export interface UvMetricsInfo {
>   loopCount: number;
>   events: number;
>   eventsWaiting: number;
> }
> /**
>  * **`PerformanceMark`** is an interface for PerformanceEntry objects with an PerformanceEntry.entryType of `'mark'`.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
>  */
> export declare class PerformanceMark extends PerformanceEntry {
>   constructor(name: string, maybeOptions?: PerformanceMarkOptions);
>   /**
>    * The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (either when using Performance.mark or the PerformanceMark.PerformanceMark constructor).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
>    */
>   get detail(): any;
>   toJSON(): object;
> }
> /**
>  * **`PerformanceMeasure`** is an _abstract_ interface for PerformanceEntry objects with an PerformanceEntry.entryType of `'measure'`.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
>  */
> export declare abstract class PerformanceMeasure extends PerformanceEntry {
>   /**
>    * The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (when using Performance.measure.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
>    */
>   get detail(): any;
>   toJSON(): object;
> }
> export interface PerformanceMarkOptions {
>   detail?: any;
>   startTime?: number;
> }
> export interface PerformanceMeasureOptions {
>   detail?: any;
>   start?: number;
>   duration?: number;
>   end?: number;
> }
> /**
>  * The **`PerformanceObserverEntryList`** interface is a list of PerformanceEntry that were explicitly observed via the PerformanceObserver.observe method.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList)
>  */
> export declare abstract class PerformanceObserverEntryList {
>   /**
>    * The **`getEntries()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries)
>    */
>   getEntries(): PerformanceEntry[];
>   /**
>    * The **`getEntriesByType()`** method of the PerformanceObserverEntryList returns a list of explicitly _observed_ PerformanceEntry objects for a given PerformanceEntry.entryType.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType)
>    */
>   getEntriesByType(type: string): PerformanceEntry[];
>   /**
>    * The **`getEntriesByName()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects for a given PerformanceEntry.name and PerformanceEntry.entryType.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName)
>    */
>   getEntriesByName(name: string, type?: string): PerformanceEntry[];
> }
> /**
>  * The **`PerformanceEntry`** object encapsulates a single performance metric that is part of the browser's performance timeline.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
>  */
> export declare abstract class PerformanceEntry {
>   /**
>    * The read-only **`name`** property of the PerformanceEntry interface is a string representing the name for a performance entry.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name)
>    */
>   get name(): string;
>   /**
>    * The read-only **`entryType`** property returns a string representing the type of performance metric that this entry represents.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType)
>    */
>   get entryType(): string;
>   /**
>    * The read-only **`startTime`** property returns the first DOMHighResTimeStamp recorded for this PerformanceEntry.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime)
>    */
>   get startTime(): number;
>   /**
>    * The read-only **`duration`** property returns a DOMHighResTimeStamp that is the duration of the PerformanceEntry.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration)
>    */
>   get duration(): number;
>   /**
>    * The **`toJSON()`** method is a Serialization; it returns a JSON representation of the PerformanceEntry object.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
>    */
>   toJSON(): object;
> }
> /**
>  * The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
>  */
> export declare abstract class PerformanceResourceTiming extends PerformanceEntry {
>   /**
>    * The **`connectEnd`** read-only property returns the DOMHighResTimeStamp immediately after the browser finishes establishing the connection to the server to retrieve the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd)
>    */
>   get connectEnd(): number;
>   /**
>    * The **`connectStart`** read-only property returns the DOMHighResTimeStamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart)
>    */
>   get connectStart(): number;
>   /**
>    * The **`decodedBodySize`** read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
>    */
>   get decodedBodySize(): number;
>   /**
>    * The **`domainLookupEnd`** read-only property returns the DOMHighResTimeStamp immediately after the browser finishes the domain-name lookup for the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd)
>    */
>   get domainLookupEnd(): number;
>   /**
>    * The **`domainLookupStart`** read-only property returns the DOMHighResTimeStamp immediately before the browser starts the domain name lookup for the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart)
>    */
>   get domainLookupStart(): number;
>   /**
>    * The **`encodedBodySize`** read-only property represents the size (in octets) received from the fetch (HTTP or cache) of the payload body before removing any applied content encodings (like gzip or Brotli).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize)
>    */
>   get encodedBodySize(): number;
>   /**
>    * The **`fetchStart`** read-only property represents a DOMHighResTimeStamp immediately before the browser starts to fetch the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
>    */
>   get fetchStart(): number;
>   /**
>    * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType)
>    */
>   get initiatorType(): string;
>   /**
>    * The **`nextHopProtocol`** read-only property is a string representing the network protocol used to fetch the resource, as identified by the ALPN Protocol ID (RFC7301).
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol)
>    */
>   get nextHopProtocol(): string;
>   /**
>    * The **`redirectEnd`** read-only property returns a DOMHighResTimeStamp immediately after receiving the last byte of the response of the last redirect.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd)
>    */
>   get redirectEnd(): number;
>   /**
>    * The **`redirectStart`** read-only property returns a DOMHighResTimeStamp representing the start time of the fetch which that initiates the redirect.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart)
>    */
>   get redirectStart(): number;
>   /**
>    * The **`requestStart`** read-only property returns a DOMHighResTimeStamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart)
>    */
>   get requestStart(): number;
>   /**
>    * The **`responseEnd`** read-only property returns a DOMHighResTimeStamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd)
>    */
>   get responseEnd(): number;
>   /**
>    * The **`responseStart`** read-only property returns a DOMHighResTimeStamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart)
>    */
>   get responseStart(): number;
>   /**
>    * The **`responseStatus`** read-only property represents the HTTP response status code returned when fetching the resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus)
>    */
>   get responseStatus(): number;
>   /**
>    * The **`secureConnectionStart`** read-only property returns a DOMHighResTimeStamp immediately before the browser starts the handshake process to secure the current connection.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart)
>    */
>   get secureConnectionStart(): number | undefined;
>   /**
>    * The **`transferSize`** read-only property represents the size (in octets) of the fetched resource.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize)
>    */
>   get transferSize(): number;
>   /**
>    * The **`workerStart`** read-only property of the PerformanceResourceTiming interface returns a The `workerStart` property can have the following values: - A DOMHighResTimeStamp.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart)
>    */
>   get workerStart(): number;
> }
> /**
>  * The **`PerformanceObserver`** interface is used to observe performance measurement events and be notified of new PerformanceEntry as they are recorded in the browser's _performance timeline_.
>  *
>  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver)
>  */
> export declare class PerformanceObserver {
>   constructor(callback: any);
>   /**
>    * The **`disconnect()`** method of the PerformanceObserver interface is used to stop the performance observer from receiving any PerformanceEntry events.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect)
>    */
>   disconnect(): void;
>   /**
>    * The **`observe()`** method of the **PerformanceObserver** interface is used to specify the set of performance entry types to observe.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe)
>    */
>   observe(options?: PerformanceObserverObserveOptions): void;
>   /**
>    * The **`takeRecords()`** method of the PerformanceObserver interface returns the current list of PerformanceEntry objects stored in the performance observer, emptying it out.
>    *
>    * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/takeRecords)
>    */
>   takeRecords(): PerformanceEntry[];
>   readonly supportedEntryTypes: string[];
> }
> export interface PerformanceObserverObserveOptions {
>   buffered?: boolean;
>   durationThreshold?: number;
>   entryTypes?: string[];
>   type?: string;
> }
> export interface EventCounts {
>   get size(): number;
>   get(eventType: string): number | undefined;
>   has(eventType: string): boolean;
>   entries(): IterableIterator<string[]>;
>   keys(): IterableIterator<string>;
>   values(): IterableIterator<number>;
>   forEach(
>     param1: (param0: number, param1: string, param2: EventCounts) => void,
>     param2?: any,
>   ): void;
>   [Symbol.iterator](): IterableIterator<string[]>;

@jasnell
Copy link
Copy Markdown
Collaborator

jasnell commented Mar 27, 2026

No hard objections but per the internal conversation we need to be careful and deliberate on this. There are a number of side effects:

  1. Buffer and process available on the global scope
  2. setImmediate available on the global scope
  3. setTimeout and setInterval returning an object rather than a number
  4. performance available on the global scope

Of these, 3 likely has the greatest potential for introducing problems.

$compatEnableFlag("nodejs_compat")
$compatDisableFlag("no_nodejs_compat");
$compatDisableFlag("no_nodejs_compat")
$compatEnableDate("2026-04-14");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This likely would need to be pushed out another week or two depending on how long it takes to resolve the "should we really do this" question.

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.

3 participants