$ the-wire · showcase
Node fixes rmSync on Windows, V8 debugger plugin support
By RepoJournal · Filed · About Node.js
Node core ships a fix for removing read-only files on Windows and enables V8 postmortem debugging plugin support.
fs.rmSync failed with EPERM on Windows when Node was built with clang libc++ (such as Electron) because libc++ std::filesystem::remove and remove_all do not clear the read-only attribute before deletion. A Windows-specific helper, ClearReadOnlyAttributeW, now clears FILE_ATTRIBUTE_READONLY recursively before removal, matching MSVC STL behavior [1].
V8 gdb/lldb postmortem plugin support is now built into Node, producing libv8_debug_helper.so or libv8_debug_helper.dylib that can be loaded with the corresponding V8 plugin for the V8 version Node is built against [2]. Separately, running without a startup snapshot (for example with --no-node-snapshot, an --without-node-snapshot build, or a bootstrapped embedder) used to make a null pointer call in Worker startup and NodeMainInstance setup. The call happened through a null SnapshotData* and was reported by UBSan; it only worked because the called function does not touch this. The fix removes that call [3].
On the tooling side, citgm updated all dependencies, including major releases for package-json (v8.0.0), chalk (v6.0.0), execa (v10.0.0), and pnpm (v11.0.0) [4]. The q lookup was removed from citgm because the package is deprecated and the repo archived [5]. changelog-maker dropped the chalk dependency in favor of Node's built-in util.styleText [6].
Action items
- → Upgrade Node.js to include the rmSync fix and null pointer fix in your next release nodejs/node [plan]
- → Test rmSync on Windows with clang libc++ builds (Electron) nodejs/node [immediate]
- → Monitor citgm for regressions after the major dependency updates nodejs/citgm [monitor]
References
- [1] fs: support removing read-only files in rmSync on Windows ↗ nodejs/node
- [2] build: enable V8 gdb/lldb plugin support ↗ nodejs/node
- [3] src: fix null pointer call when running without a startup snapshot ↗ nodejs/node
- [4] chore: update all dependencies ↗ nodejs/citgm
- [5] lookup: remove q (#1123) ↗ nodejs/citgm
- [6] refactor: replace chalk with util.styleText ↗ nodejs/changelog-maker