deno/ext/node/polyfills/internal/streams
Divy Srivastava 01b6da9d9b
fix(ext/node): upgrade node:stream (#28855)
Ref https://github.com/denoland/deno/issues/28836

This PR replaces the _stream.mjs bundle with a file-by-file port instead. A codemod transpiles Node.js internals to ESM. The codemod performs three tasks: translating CJS to ESM, remapping internal dependencies, and hoisting lazy requires as imports.

The process is fully automated through the `update_node_stream.ts` script, simplifying future internal updates. The script checks out Node.js from a specific tag defined in the `tests/node_compat/runner`.

Additionally, the update enables new tests in our Node test runner and adds features (like compose()) that were missing from the outdated bundle.

## Performance

There is a 140KB+ binary size increase on aarch64-apple-darwin and nop startup time stays the same.
2025-04-14 21:35:34 +05:30
..
add-abort-signal.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
compose.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
destroy.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
duplex.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
duplexify.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
duplexpair.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
end-of-stream.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
from.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
lazy_transform.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
legacy.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
operators.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
passthrough.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
pipeline.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
readable.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
state.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
transform.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
utils.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30
writable.js fix(ext/node): upgrade node:stream (#28855) 2025-04-14 21:35:34 +05:30