Node 22.22+ / 24 removed the try/catch around realpathSync in
finalizeResolution. realpathSync calls binding.lstat which throws ENOENT
for VFS paths (they don't exist on real FS). In Node 24 resolve.js is
loaded eagerly during bootstrap before user code runs, so runtime patches
to fs.realpathSync arrive too late.
Patch the Node source directly during asset builds so the ENOENT guard
is compiled into the binary. This silently no-ops on older Node versions
where the pattern doesn't match (they already catch ENOENT internally).
CI / infra:
- Replace azure-pipelines with GitHub Actions (build-asset.yml)
- Build and publish pre-built assets for windows-x64, mac-arm64,
linux-x64, and linux-x64-musl on tag push
- Remove EOL Node 18 and 20 from build matrix; default to lts/*, 22, 24
Bug fixes:
- fix: _assembleDeliverable deadlock — bundle.finalize() must be called
before MultiStream starts consuming; calling it in the Transform's
first-chunk callback deadlocked because archiver never emits without
finalize, so the sentinel and trailers were never written
- fix: ESM realpathSync ENOENT on Node 22.22+ / Node 24 — these versions
removed the ENOENT catch in finalizeResolution; VFS paths don't exist
on real FS so binding.lstat throws. Two-pronged fix:
(1) boot-nexe.ts: install ENOENT-tolerant wrapper before _compile()
(2) shim.ts: re-apply wrapper after shimFs() overwrites boot-nexe's
patch, so the ESM resolver captures the tolerant version at first
ESM load
- fix: replace got (unmaintained) with axios in download step
- fix: update default remote to oxmc/nexe releases
Features:
- macOS binary signing support (patchMachOExecutable)
- bundleRules option for fine-grained VFS include/exclude per module
- Improved SnapshotZipFS path handling and fallback behaviour
To match the existing (4.x) behaviour, we need to lookup the zipFS for a
file path that's relative to the cwd. This is noticeable when the
executable is in another directory because the existing path lookups
didn't handle this case.
* refactor: compile with esmoudle interop
* Rigidify code replacement by using Lodash templates.
* Generate zip file bundle.
* Use yarn's fslib to implement the fake filesystem.
Leverage the work done by yarn, rather than reimplementing from scratch.
This means the fake fs is now reading from a zip file in the binary.
A few methods need custom implementations as the fake fs is not
writable. These were copied and adjusted from the yarn ZipOpenFS.
* Add test suite using the built artefact.
Smoke tests the different fs methods.
Not perfect in any world, but better than nothing.
* Fix tsc on Windows - globbing doesn't work there.
There's probably a cleaner way to do this...
* Bump version.
* Dep bumps.
* fixup 9d57b32: make fs patch code clearer.
* fixup 3771c720: simplify test to just use require directly.
---------
Co-authored-by: calebboyd <caleb.boyd@gmail.com>
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>