Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for native Node Readable stream: require manual conversion to Node's Web Streams #36

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

larabr
Copy link
Collaborator

@larabr larabr commented Jan 12, 2024

Utils to convert from and to Web Streams in Node are available from v17, see https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options .

Previously, we automatically converted between Node native streams and web-like ReadableStreams. This led to occasional issues.

…on to Node Web Streams

Utils to convert from and to Web Streams in Node are available from v17,
see https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options .

Previously, we automatically converted between Node native streams and custom, Web-like Readable streams.
This led to occasional issues.
@larabr larabr force-pushed the drop-node-streams branch from d52a2b3 to 2097f90 Compare January 15, 2024 16:55
@larabr larabr requested a review from twiss January 15, 2024 16:57
@larabr larabr force-pushed the drop-node-streams branch from 415aada to 1e2f3e2 Compare January 17, 2024 08:08
Buffer is now a subtype of Uint8Array, so no special handling is required anymore
@larabr larabr force-pushed the drop-node-streams branch from 1e2f3e2 to 060c88f Compare January 17, 2024 09:24
…eams are no longer support

A more generic check suffices, and requires no special handling in browsers.
Also, TS will warn on unexpected input type.
@larabr larabr merged commit ce23f43 into openpgpjs:main Jan 24, 2024
3 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.

None yet

2 participants