Skip to content

fix(node:stream): decode setEncoding buffer chunks#2241

Open
andrewtdiz wants to merge 3 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-stream-setencoding-buffers
Open

fix(node:stream): decode setEncoding buffer chunks#2241
andrewtdiz wants to merge 3 commits into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-stream-setencoding-buffers

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • decode readable Buffer chunks through the active readable encoding before buffering or data-event emission
  • preserve Node-like base64 StringDecoder chunking by carrying remainder bytes until EOF flush
  • return strings from no-size read() when readableEncoding is active and remove the now-passing known-failure entries

Verification

  • cargo test -p perry-runtime readable_set_encoding
  • cargo fmt --check
  • cargo check -p perry-runtime -p perry-stdlib -p perry-codegen
  • jq empty test-parity/known_failures.json
  • git diff --check
  • ./run_parity_tests.sh --suite=node-suite --module=stream --filter encoding/base64
  • ./run_parity_tests.sh --suite=node-suite --module=stream --filter encoding/hex
  • ./run_parity_tests.sh --suite=node-suite --module=stream --filter encoding/latin1
  • ./run_parity_tests.sh --suite=node-suite --module=stream --filter readable/set-encoding

Residual: readable/push-string-with-encoding-set still fails and remains in known_failures.json.

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.

1 participant