Skip to content

Audit fs/path/os/zlib for Node 24 and Haxe 4 - #224

Merged
kevinresol merged 2 commits into
HaxeFoundation:masterfrom
kevinresol:audit/fs-os-zlib
Jul 14, 2026
Merged

Audit fs/path/os/zlib for Node 24 and Haxe 4#224
kevinresol merged 2 commits into
HaxeFoundation:masterfrom
kevinresol:audit/fs-os-zlib

Conversation

@kevinresol

@kevinresol kevinresol commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Completes the Section 2 Node.js v24 + Haxe 4 audit for fs (+promises), path, os, zlib, and related sys/Sys/haxe.zip surfaces.
  • Adds missing public APIs: Fs.openAsBlob, Fs.promises, Fs.mkdtempDisposableSync, FsPromises.mkdtempDisposable, StatWatcher, experimental Utf8Stream, Zstd compress/decompress (classes + convenience methods), Zlib.constants, Stats millisecond fields, Promise overloads on Dir.close/Dir.read, FSWatcher.ref/unref, and glob cwd as String|URL.
  • Marks legacy Fs.F_OK/R_OK/W_OK/X_OK as @:deprecated in favor of Fs.constants.*.
  • Drops Haxe 3 #if haxe4 / haxe_ver gates in this section (Haxe 4+ only) and tightens Dynamic where safe (Fs.write/writeSync string overloads); remaining Dynamic sites are marked TODO(section-2) / TODO(section-6).

Remaining TODOs (inline)

  • Typed Fs.promises module value type (currently Dynamic)
  • realpath.native / realpathSync.native function properties
  • Typed ZlibConstants (currently DynamicAccess<Int>)
  • Stats bigint nanosecond fields (atimeNs etc.)
  • Node ErrnoException typing for sys/Sys catch sites
  • FileHandle.readableWebStream → typed ReadableStream (coord with section 6)
  • Utf8StreamOptions.fs mock object typing

Test plan

  • Targeted Haxe compile of audited modules (-D nodejs + allowPackage('sys'))
  • haxe completion.hxml succeeds
  • Spot-check new APIs against Node.js v24 docs (openAsBlob, mkdtempDisposable*, Zstd, Utf8Stream)
  • Confirm no regressions for existing fs/promises / zlib Brotli callers

kevinresol and others added 2 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>
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>
@kevinresol
kevinresol merged commit 1c0e66b into HaxeFoundation:master Jul 14, 2026
10 checks passed
@kevinresol
kevinresol deleted the audit/fs-os-zlib 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