Skip to content

Audit core foundation for Node 24 / Haxe 4+ - #228

Merged
kevinresol merged 1 commit into
HaxeFoundation:masterfrom
kevinresol:audit/core-foundation
Jul 14, 2026
Merged

Audit core foundation for Node 24 / Haxe 4+#228
kevinresol merged 1 commit into
HaxeFoundation:masterfrom
kevinresol:audit/core-foundation

Conversation

@kevinresol

Copy link
Copy Markdown
Contributor

Summary

  • Section 1 (events, stream(+promises), buffer, timers(+promises), process, module/require, console, string_decoder, constants, Node.hx globals) audited against Node.js v24 Active LTS.
  • Removed remaining Haxe 3 #if haxe4 / haxe_ver / untyped __js__ branches; Haxe 4+ only (js.lib.*, js.Syntax.code, arrow types, enum abstract).
  • Filled notable public API gaps: events utils (on, addAbortListener, captureRejections, EventEmitterAsyncResource), stream helpers (compose, duplexPair, addAbortSignal, fromWeb/toWeb, promises), buffer (copyBytesFrom, kStringMaxLength, resolveObjectURL), process (memory/CPU/resource helpers, warnings, finalization/permission package, more events), module (isBuiltin, source-map/strip/registerHooks stubs).
  • Minimal docs: README/haxelib Node 24 notes; HOWTO drops @:enum Haxe 3 syntax.

Remaining TODOs (cross-section)

  • section-5: process IPC channel/sendHandle, module SourceMap / registerHooks typing
  • section-6: web stream types for Readable/Writable/Duplex fromWeb/toWeb, buffer resolveObjectURLBlob
  • section-7: type EventEmitterAsyncResource.asyncResource as async_hooks.AsyncResource
  • Console/require/exports keep intentional Dynamic (variadic / module load surfaces)
  • Aggregate constants module left as historical crypto subset (prefer module-specific constants)

Test plan

  • haxe build.hxml (ImportAll + examples) succeeds on this branch
  • CI: Haxe 4.0.5 / 4.3.7 / latest
  • Spot-check typed usage of new Events.on / Stream.compose / Process.hrtimeBigint / Module.isBuiltin

Made with Cursor

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>
@kevinresol
kevinresol merged commit 5279fcb into HaxeFoundation:master Jul 14, 2026
10 checks passed
@kevinresol
kevinresol deleted the audit/core-foundation branch July 15, 2026 00:59
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