Skip to content

Wire js.Node web globals (fetch, events, storage, …) - #233

Merged
kevinresol merged 23 commits into
HaxeFoundation:masterfrom
kevinresol:chore/cross-wiring-node-globals
Jul 14, 2026
Merged

Wire js.Node web globals (fetch, events, storage, …)#233
kevinresol merged 23 commits into
HaxeFoundation:masterfrom
kevinresol:chore/cross-wiring-node-globals

Conversation

@kevinresol

@kevinresol kevinresol commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expose Node 24 web globals on js.Node: fetch, navigator, and localStorage / sessionStorage.
  • Confirm Node.performance already uses js.Syntax.code (no Haxe 3 untyped __js__ leftover) and clear the related PerfHooks TODO.
  • Clear matching TODO(section-1) markers in js.node.web/* that asked for these aliases.

Integration branch merges the seven audit branches on top of origin/master, then adds this wiring commit.

Test plan

  • haxe build.hxml (Haxe 5 preview + 4.3.7)
  • CI on Haxe 4.0.5 / 4.3.7 / latest
  • Spot-check that js.Node.fetch / navigator / storage getters type-check against existing js.node.web externs

Made with Cursor

kevinresol and others added 23 commits July 14, 2026 16:00
Add missing Node 24 fs/zlib APIs (openAsBlob, mkdtempDisposable*, Zstd),
drop Haxe 3 conditionals in this section, and tighten Dynamic where possible.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop remaining Haxe 3 conditionals, prefer js.node.web.AbortSignal, and add core node:trace_events, node:sqlite, and node:sea surfaces.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add StatWatcher/Utf8Stream, Fs.promises, F_OK deprecations, glob URL cwd,
FSWatcher ref/unref, Zlib options polish, and PathModule.toNamespacedPath.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fill net/http/https/http2/tls/dgram/dns/tty API gaps against Node 24,
replace Haxe 3 conditionals with Haxe 4 types, and tighten Dynamics
where practical.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align child_process, cluster, readline, repl, vm, v8, and domain with Node 24 APIs, drop Haxe 3 conditionals, and add core async_hooks, worker_threads, and wasi stubs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop Haxe 3 conditionals across events, stream, buffer, timers, process,
module, and globals; add missing Node 24 public APIs; tighten Dynamics where
types exist; leave cross-section TODOs for web streams and IPC/loader types.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix registerStorage options shape, expose DatabaseSync open/txn/limits,
tighten Network headers typing, and clean MockTracker formatting.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop Haxe 3 conditionals, add missing Node 24 APIs (KeyObject, X509,
MIMEType, CallTracker, URLPattern, argon2/KEM, parseArgs, etc.), and
narrow avoidable Dynamic usage with remaining gaps marked TODO(section-4).

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop Haxe 3 import gates, tighten Dynamic/Any typing for fetch/abort/events,
and add missing Node 24 web-platform externs (streams, messaging, WebSocket,
EventSource, Navigator/locks, Storage, encoding globals).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Expose fetch, AbortController, Event/EventTarget/CustomEvent, File,
TextEncoder/TextDecoder, DOMException, navigator, and Storage locals on
js.Node; drop the obsolete PerfHooks TODO pointing at Haxe 3 __js__.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kevinresol
kevinresol merged commit 0419c6a into HaxeFoundation:master Jul 14, 2026
9 checks passed
@kevinresol
kevinresol deleted the chore/cross-wiring-node-globals branch July 15, 2026 01:01
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.

1 participant