Skip to content

Wire stream/Blob/WebSocket APIs to js.node.web types - #232

Merged
kevinresol merged 21 commits into
HaxeFoundation:masterfrom
kevinresol:chore/cross-wiring-web-streams
Jul 14, 2026
Merged

Wire stream/Blob/WebSocket APIs to js.node.web types#232
kevinresol merged 21 commits into
HaxeFoundation:masterfrom
kevinresol:chore/cross-wiring-web-streams

Conversation

@kevinresol

@kevinresol kevinresol commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Priority A1 cross-section wiring: connects consumers to the §6 js.node.web.* externs added by the audit PRs, replacing the Dynamic/Any placeholders left as TODO(section-6) markers. Depends on the type surface merged in audit PRs #224#230 (already merged into master).

  • stream/Readable.hx, stream/Writable.hx, stream/Duplex.hx: type fromWeb/toWeb (and Duplex.fromWeb/toWeb pair) against js.node.web.ReadableStream / WritableStream (Duplex reuses the existing ReadableStream.ReadableWritablePair typedef)
  • buffer/Buffer.hx: resolveObjectURL returns js.node.web.Blob
  • fs/FileHandle.hx: readableWebStream returns js.node.web.ReadableStream
  • Http.hx: http.WebSocket now typed as Class<js.node.web.WebSocket> instead of Class<Any>

Removes the now-resolved TODO(section-6) markers in these files. Other TODO(section-6) markers outside this wiring scope (e.g. undici dispatcher options in web/WebSocket.hx/web/EventSource.hx/web/Request.hx) are left untouched.

Files changed for wiring:

  • src/js/node/stream/Readable.hx
  • src/js/node/stream/Writable.hx
  • src/js/node/stream/Duplex.hx
  • src/js/node/buffer/Buffer.hx
  • src/js/node/fs/FileHandle.hx
  • src/js/node/Http.hx

Test plan

  • haxe build.hxml (passes; only pre-existing, unrelated deprecation/init warnings)
  • Spot-check caller sites can use typed web stream / Blob / WebSocket values without casts

Made with Cursor

kevinresol and others added 21 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>
Connect Readable/Writable/Duplex fromWeb/toWeb, Buffer.resolveObjectURL,
FileHandle.readableWebStream, and http.WebSocket to the section 6 web
externs and drop the resolved TODO(section-6) placeholders.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kevinresol
kevinresol merged commit 22ec603 into HaxeFoundation:master Jul 14, 2026
10 checks passed
@kevinresol
kevinresol deleted the chore/cross-wiring-web-streams 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