Skip to content

fix(node:stream): honor Readable.from options#2248

Merged
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-stream-readable-from-options
May 29, 2026
Merged

fix(node:stream): honor Readable.from options#2248
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-stream-readable-from-options

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • route static Readable.from(iterable, options) lowering to a two-argument runtime helper
  • apply Node's Readable.from defaults: objectMode: true and highWaterMark: 1
  • honor explicit objectMode: false and highWaterMark, and remove the two now-passing known failures

DeepWiki

  • reference/deepwiki/nodejs-node-readable-from-options-2026-05-28.md confirms Readable.from() defaults object mode on, uses HWM 1, and reflects options through readableObjectMode / readableHighWaterMark

Verification

  • baseline FAIL: node-suite/stream/readable/from-with-options, report test-parity/reports/parity_report_20260528_082348.json
  • baseline FAIL: node-suite/stream/readable/static-from-with-options, report test-parity/reports/parity_report_20260528_082426.json
  • PASS before known-failure removal: from-with-options, report test-parity/reports/parity_report_20260528_083023.json
  • PASS before known-failure removal: static-from-with-options, report test-parity/reports/parity_report_20260528_083106.json
  • final PASS after known-failure removal: from-with-options, report test-parity/reports/parity_report_20260528_083126.json
  • final PASS after known-failure removal: static-from-with-options, report test-parity/reports/parity_report_20260528_083131.json
  • guardrail PASS: node-suite/stream/readable/from-iterable-iteration, report test-parity/reports/parity_report_20260528_083309.json
  • PASS: cargo test -p perry-runtime readable_from_uses_node_object_mode_and_high_water_mark_defaults
  • PASS: cargo check -p perry-runtime -p perry-stdlib -p perry-codegen
  • PASS: cargo fmt --check
  • PASS: jq empty test-parity/known_failures.json
  • PASS: git diff --check

Non-goals

  • no async-iterable driving
  • no Promise-yield handling
  • no full Readable.from state-machine rewrite
  • no option surface expansion beyond targeted objectMode / highWaterMark behavior

@proggeramlug proggeramlug merged commit bc5f24d into PerryTS:main May 29, 2026
11 checks passed
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.

2 participants