Commit a912426
committed
chore(multiplexer): drop Event/CloseEvent/MessageEvent polyfills, keep ErrorEvent
Node 24 (repo engines floor) has Event, CloseEvent, and MessageEvent as
globals — the typeof checks in Event.ts / CloseEventClass.ts /
MessageEventClass.ts always picked native on any supported runtime.
Inlining native constructors at the 5 Multiplexer/Message call sites and
deleting the three dead polyfill files.
ErrorEvent is NOT yet a Node global — verified on Node 24.14.1 via
'typeof ErrorEvent === "undefined"' (tracked upstream at
nodejs/node#49986; internal-only ErrorEvent lives in undici). Kept
ErrorEventClass.ts and rewrote it to extend native Event (it previously
extended the now-deleted Event2). Runtime smoke test confirms the
polyfill dispatches and listeners see error/message/filename/lineno/colno
fields correctly.
Net: -137/+18 across 6 files, 0 tsc errors, 89/89 tests pass, webpack
clean, generated .d.ts byte-identical (920 bytes).1 parent a858519 commit a912426
6 files changed
Lines changed: 18 additions & 137 deletions
File tree
- src/packages/multiplexer
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | | - | |
| 6 | + | |
4 | 7 | | |
5 | | - | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
| 24 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | | - | |
6 | 4 | | |
7 | | - | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
| |||
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
103 | | - | |
| 100 | + | |
104 | 101 | | |
105 | 102 | | |
106 | 103 | | |
| |||
116 | 113 | | |
117 | 114 | | |
118 | 115 | | |
119 | | - | |
| 116 | + | |
120 | 117 | | |
121 | 118 | | |
122 | 119 | | |
| |||
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
| 132 | + | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
| |||
247 | 244 | | |
248 | 245 | | |
249 | 246 | | |
250 | | - | |
| 247 | + | |
251 | 248 | | |
252 | 249 | | |
253 | 250 | | |
| |||
301 | 298 | | |
302 | 299 | | |
303 | 300 | | |
304 | | - | |
| 301 | + | |
305 | 302 | | |
306 | 303 | | |
307 | 304 | | |
| |||
0 commit comments