From 4470bab3082ed93c8fbbab836d1c6faec493d126 Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Tue, 20 Oct 2026 07:58:16 -0700 Subject: [PATCH] Give the undici shim's Dispatcher an explicit constructor The implicit constructor forwarded its arguments to EventEmitter's options-taking constructor, which compiles to a deferred runtime fence. Dispatcher takes no options, so it calls super() directly. Co-Authored-By: Claude Opus 5.5 --- packages/compiler/shims/undici/core/dispatcher.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/compiler/shims/undici/core/dispatcher.ts b/packages/compiler/shims/undici/core/dispatcher.ts index cd195b5da..d9d35c33f 100644 --- a/packages/compiler/shims/undici/core/dispatcher.ts +++ b/packages/compiler/shims/undici/core/dispatcher.ts @@ -38,6 +38,12 @@ export interface ResponseData { const defaultProfile: Profile = { major: 7 }; export class Dispatcher extends EventEmitter { + // An explicit constructor: the implicit one forwards its arguments to + // EventEmitter's options-taking constructor, which stays a runtime fence. + constructor() { + super(); + } + dispatch(_options: DispatchOptions, _handler: DispatchHandlers): boolean { throw new Error("not implemented"); }