Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

readable-stream

Package Overview
Dependencies
1
Maintainers
3
Versions
91
Issues
File Explorer

Advanced tools

readable-stream

Node.js Streams, a user-land copy of the stream library from Node.js

    4.0.0latest

Version published
Maintainers
3
Weekly downloads
101,384,835
increased by0.66%

Weekly downloads

Changelog

Source

v4.0.0

What's Changed

  • Add ronag to the streams wg by @ronag in https://github.com/nodejs/readable-stream/pull/430
  • Add vweevers to streams wg by @vweevers in https://github.com/nodejs/readable-stream/pull/431
  • Use the shared Travis config by @dominykas in https://github.com/nodejs/readable-stream/pull/444
  • tests: add GitHub Actions CI by @bnb in https://github.com/nodejs/readable-stream/pull/418
  • Upgrade airtap and use GitHub Actions by @vweevers in https://github.com/nodejs/readable-stream/pull/443
  • Adds Node v14 to github actions by @mcollina in https://github.com/nodejs/readable-stream/pull/445
  • Cleanup CI by @vweevers in https://github.com/nodejs/readable-stream/pull/446
  • Add usage instructions for Webpack 5 by @vweevers in https://github.com/nodejs/readable-stream/pull/455
  • Update to Node 18.0.0 by @ShogunPanda in https://github.com/nodejs/readable-stream/pull/471
  • Evade override mistake by @erights in https://github.com/nodejs/readable-stream/pull/474
  • v4 launch details by @mcollina in https://github.com/nodejs/readable-stream/pull/472

New Contributors

  • @ronag made their first contribution in https://github.com/nodejs/readable-stream/pull/430
  • @dominykas made their first contribution in https://github.com/nodejs/readable-stream/pull/444
  • @bnb made their first contribution in https://github.com/nodejs/readable-stream/pull/418
  • @ShogunPanda made their first contribution in https://github.com/nodejs/readable-stream/pull/471
  • @erights made their first contribution in https://github.com/nodejs/readable-stream/pull/474

Full Changelog: https://github.com/nodejs/readable-stream/compare/v3.6.0...v4.0.0

Readme

Source

readable-stream

Node.js core streams for userland

npm status node Node.js Build Browsers Build

npm install readable-stream

This package is a mirror of the streams implementations in Node.js 18.0.0.

Full documentation may be found on the Node.js website.

If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use readable-stream only and avoid the "stream" module in Node-core, for background see this blogpost.

As of version 2.0.0 readable-stream uses semantic versioning.

Version 4.x.x

v4.x.x of readable-stream is a cut from Node 18. This version supports Node 12, 14, 16 and 18, as well as evergreen browsers. The breaking changes introduced by v4 are composed of the combined breaking changes in:

This also includes many new features.

Version 3.x.x

v3.x.x of readable-stream is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in Node v9 and Node v10, as follows:

  1. Error codes: https://github.com/nodejs/node/pull/13310, https://github.com/nodejs/node/pull/13291, https://github.com/nodejs/node/pull/16589, https://github.com/nodejs/node/pull/15042, https://github.com/nodejs/node/pull/15665, https://github.com/nodejs/readable-stream/pull/344
  2. 'readable' have precedence over flowing https://github.com/nodejs/node/pull/18994
  3. make virtual methods errors consistent https://github.com/nodejs/node/pull/18813
  4. updated streams error handling https://github.com/nodejs/node/pull/18438
  5. writable.end should return this. https://github.com/nodejs/node/pull/18780
  6. readable continues to read when push('') https://github.com/nodejs/node/pull/18211
  7. add custom inspect to BufferList https://github.com/nodejs/node/pull/17907
  8. always defer 'readable' with nextTick https://github.com/nodejs/node/pull/17979

Version 2.x.x

v2.x.x of readable-stream is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.

Usage

You can swap your require('stream') with require('readable-stream') without any changes, if you are just using one of the main classes and functions.

const { Readable, Writable, Transform, Duplex, pipeline, finished } = require('readable-stream')

Note that require('stream') will return Stream, while require('readable-stream') will return Readable. We discourage using whatever is exported directly, but rather use one of the properties as shown in the example above.

Usage In Browsers

You will need a bundler like browserify, webpack, parcel or similar. With Webpack 5 (which unlike other bundlers does not polyfill Node.js core modules and globals like process) you will also need to:

  1. Install polyfills by running npm install buffer process --save-dev
  2. Create a webpack.config.js file containing:
const webpack = require('webpack') module.exports = { plugins: [ new webpack.ProvidePlugin({ process: 'process/browser' }) ], resolve: { fallback: { buffer: require.resolve('buffer/') } } }

Streams Working Group

readable-stream is maintained by the Streams Working Group, which oversees the development and maintenance of the Streams API within Node.js. The responsibilities of the Streams Working Group include:

  • Addressing stream issues on the Node.js issue tracker.
  • Authoring and editing stream documentation within the Node.js project.
  • Reviewing changes to stream subclasses within the Node.js project.
  • Redirecting changes to streams from the Node.js project to this project.
  • Assisting in the implementation of stream providers within Node.js.
  • Recommending versions of readable-stream to be included in Node.js.
  • Messaging about the future of streams to give the community advance notice of changes.

Team Members

Keywords

FAQs

What is readable-stream?

Node.js Streams, a user-land copy of the stream library from Node.js

Is readable-stream popular?

The npm package readable-stream receives a total of 96,597,959 weekly downloads. As such, readable-stream popularity was classified as popular.

Is readable-stream well maintained?

We found that readable-stream demonstrated a healthy version release cadence and project activity. It has 3 open source maintainers collaborating on the project.

Last updated on 14 Jun 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc