Skip to content

Conversation

@larabr
Copy link
Collaborator

@larabr larabr commented Jan 25, 2024

Breaking change: all functions taking streams as inputs will now require passing Web Streams in Node.js . If given a native stream.Readable input, they will throw. The browser build is unaffected by this change.

More context about WebStream stream support in Node.js:
Node v16.5.0 adds supports for the Web Stream API, see https://nodejs.org/api/webstreams.html#web-streams-api .
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 (fix #1690).

@larabr larabr force-pushed the v6-drop-node-streams branch from 6c19b8d to f88a968 Compare January 25, 2024 16:12
…b 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.
Avoid interfaces, since the original types are not interfaces either,
and in TS v5 it could cause type inference issues between GenericWebStreams
and the redefined WebStreams.
Move to away from Node native streams.
@larabr larabr merged commit 99899d1 into openpgpjs:v6 Jan 26, 2024
@larabr larabr mentioned this pull request Feb 1, 2024
Merged
20 tasks
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