deno
4e8c1742 - fix(ext/node): add missing node:util APIs getSystemErrorMap, transferableAbortSignal, transferableAbortController (#34372)

Commit
177 days ago
fix(ext/node): add missing node:util APIs getSystemErrorMap, transferableAbortSignal, transferableAbortController (#34372) ## Summary Adds three previously missing `node:util` APIs from the tracking list in denoland/deno#21378: - `util.getSystemErrorMap()` — returns the full libuv error code map. - `util.transferableAbortSignal(signal)` — validates and returns the signal. - `util.transferableAbortController()` — returns a new `AbortController`. The other items from the tracker (`util.aborted`, `util.MIMEParams`, `util.MIMEType`, `util.debug`) already exist in this codebase, so the issue can be closed once this lands. ## Notes on the transferable* helpers Deno's `AbortSignal` is not yet structured-cloneable, so the transferable helpers do not currently mark signals for `postMessage` / `structuredClone` transfer. The functions are still exported with Node-compatible argument validation so user code calling them no longer throws — and they can be upgraded with real transfer support later without changing the API surface. ## Test plan - [x] `cargo test unit_node::util_test` — new tests cover `getSystemErrorMap`, `transferableAbortSignal`, and `transferableAbortController`. - [x] `./tools/format.js` - [x] `./tools/lint.js --js` Refs denoland/deno#21378 Closes denoland/orchid#231 Co-authored-by: divybot <divybot@users.noreply.github.com> Co-authored-by: Divy Srivastava <me@littledivy.com>
Author
Parents
Loading