sindresorhus/get-stream (get-stream)
### [`v9.0.1`](https://togithub.com/sindresorhus/get-stream/releases/tag/v9.0.1)
[Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v9.0.0...v9.0.1)
- Upgrade `ReadableStream[Symbol.asyncIterator]` ponyfill ([#128](https://togithub.com/sindresorhus/get-stream/issues/128)) [`df42674`](https://togithub.com/sindresorhus/get-stream/commit/df42674)
### [`v9.0.0`](https://togithub.com/sindresorhus/get-stream/releases/tag/v9.0.0)
[Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v8.0.1...v9.0.0)
##### Breaking
- Require Node.js 18 ([#111](https://togithub.com/sindresorhus/get-stream/issues/111)) [`7ccab70`](https://togithub.com/sindresorhus/get-stream/commit/7ccab70)
##### Improvements
- Fix browser support ([#122](https://togithub.com/sindresorhus/get-stream/issues/122)) [`4d233d3`](https://togithub.com/sindresorhus/get-stream/commit/4d233d3)
- Allow multiple readers at once ([#121](https://togithub.com/sindresorhus/get-stream/issues/121)) [`a51d085`](https://togithub.com/sindresorhus/get-stream/commit/a51d085)
### [`v8.0.1`](https://togithub.com/sindresorhus/get-stream/releases/tag/v8.0.1)
[Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v8.0.0...v8.0.1)
#### Fixes
- Ensure [`error.bufferedData`](https://togithub.com/sindresorhus/get-stream#errors) is as full as possible. ([#106](https://togithub.com/sindresorhus/get-stream/issues/106))
- Fix the [`maxBuffer`](https://togithub.com/sindresorhus/get-stream#maxbuffer) option being one byte off in some edge case. ([#105](https://togithub.com/sindresorhus/get-stream/issues/105))
### [`v8.0.0`](https://togithub.com/sindresorhus/get-stream/releases/tag/v8.0.0)
[Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v7.0.1...v8.0.0)
Huge thanks to [@ehmicky](https://togithub.com/ehmicky) for doing all the work for this release 🙌
##### Breaking
- Remove the `encoding` option. ([#69](https://togithub.com/sindresorhus/get-stream/issues/69), [#67](https://togithub.com/sindresorhus/get-stream/issues/67))
- This package handles binary, UTF-8 and object streams.
- For other encodings like UTF-16, hexacimal and base64, please see the [following tip](https://togithub.com/sindresorhus/get-stream#non-utf-8-encoding). ([#84](https://togithub.com/sindresorhus/get-stream/issues/84))
- Methods like [`buffer.toString('hex')` or `buffer.toString('base64')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end) can also be used.
##### Improvements
- Support any JavaScript environment, including browsers. ([#85](https://togithub.com/sindresorhus/get-stream/issues/85))
- Support web streams ([`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)). ([#82](https://togithub.com/sindresorhus/get-stream/issues/82), [#78](https://togithub.com/sindresorhus/get-stream/issues/78), [#79](https://togithub.com/sindresorhus/get-stream/issues/79), [#80](https://togithub.com/sindresorhus/get-stream/issues/80))
- Support [async iterables](https://togithub.com/sindresorhus/get-stream#async-iterables). ([#69](https://togithub.com/sindresorhus/get-stream/issues/69), [#93](https://togithub.com/sindresorhus/get-stream/issues/93))
- Add [`getStreamAsArray()`](https://togithub.com/ehmicky/get-stream#getstreamasarraystream-options) method to pass streams [in object mode](https://togithub.com/ehmicky/get-stream#getstreamasarraystream-options). ([#86](https://togithub.com/sindresorhus/get-stream/issues/86))
- Add [`getStreamAsArrayBuffer()`](https://togithub.com/sindresorhus/get-stream#getstreamasarraybufferstream-options) method to return the stream as an [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). ([#81](https://togithub.com/sindresorhus/get-stream/issues/81))
- When the stream is larger than the maximum size for a [string](https://nodejs.org/api/buffer.html#bufferconstantsmax_string_length), [buffer or `ArrayBuffer`](https://nodejs.org/api/buffer.html#bufferconstantsmax_length), set [`error.bufferedData`](https://togithub.com/ehmicky/get-stream#errors) with the partially read data instead of leaving it empty. ([#68](https://togithub.com/sindresorhus/get-stream/issues/68), [#48](https://togithub.com/sindresorhus/get-stream/issues/48))
#### Fixes
- Do not crash on big streams (with one/many GBs). ([#66](https://togithub.com/sindresorhus/get-stream/issues/66))
- Ensure `maxBuffer` stops infinite streams. ([#62](https://togithub.com/sindresorhus/get-stream/issues/62))
- Stop consuming the streaming when hitting [`maxBuffer`](https://togithub.com/ehmicky/get-stream#maxbuffer). ([#42](https://togithub.com/sindresorhus/get-stream/issues/42), [#69](https://togithub.com/sindresorhus/get-stream/issues/69)).
- Set [`error.bufferedData`](https://togithub.com/ehmicky/get-stream#errors) when the stream errors for other reasons than [`maxBuffer`](https://togithub.com/ehmicky/get-stream#maxbuffer). ([#56](https://togithub.com/sindresorhus/get-stream/issues/56), [#63](https://togithub.com/sindresorhus/get-stream/issues/63))
- Ensure [`error.bufferedData`](https://togithub.com/ehmicky/get-stream#errors) is smaller than [`maxBuffer`](https://togithub.com/ehmicky/get-stream#maxbuffer). ([#89](https://togithub.com/sindresorhus/get-stream/issues/89))
#### TypeScript types
- The `stream` argument must be a [`Readable`, `ReadableStream` or `AsyncIterable`](https://togithub.com/sindresorhus/get-stream/blob/c1df6e8f3a52885489f0120d3c5e55d4f49d9d44/source/index.d.ts#L10). ([#71](https://togithub.com/sindresorhus/get-stream/issues/71))
#### Documentation
- Add tips on [alternatives](https://togithub.com/sindresorhus/get-stream#alternatives), [`Blob`](https://togithub.com/sindresorhus/get-stream/tree/main#blobs) and [JSON streaming](https://togithub.com/sindresorhus/get-stream/tree/main#json-streaming). ([#58](https://togithub.com/sindresorhus/get-stream/issues/58), [#95](https://togithub.com/sindresorhus/get-stream/issues/95), [#96](https://togithub.com/sindresorhus/get-stream/issues/96), [#97](https://togithub.com/sindresorhus/get-stream/issues/97))
#### Performance
- Do not block the event loop when the stream ends. ([#92](https://togithub.com/sindresorhus/get-stream/issues/92))
### [`v7.0.1`](https://togithub.com/sindresorhus/get-stream/releases/tag/v7.0.1)
[Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v7.0.0...v7.0.1)
- Work around issue with handling large sizes [`e58d141`](https://togithub.com/sindresorhus/get-stream/commit/e58d141)
### [`v7.0.0`](https://togithub.com/sindresorhus/get-stream/releases/tag/v7.0.0)
[Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v6.0.1...v7.0.0)
##### Breaking
- Require Node.js 16 [`70571f8`](https://togithub.com/sindresorhus/get-stream/commit/70571f8)
- This package is now pure ESM. **Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).**
- Removed `getStream.array()`
- It complicated the codebase considerably and I personally never used it.
- You can use [`readableStream.toArray()`](https://nodejs.org/api/stream.html#readabletoarrayoptions) instead. [Example](https://togithub.com/sindresorhus/get-stream#tip)
- `const getStream = require('get-stream'); getStream.buffer(…);` → `import {getStreamAsBuffer} from 'get-stream'; getStreamAsBuffer(…);`
- `const getStream = require('get-stream'); getStream.MaxBufferError;` → `import {MaxBufferError} from 'get-stream'; MaxBufferError;`
##### Tip
[You may not need this package anymore.](https://togithub.com/sindresorhus/get-stream#tip)
***
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^6.0.0
->^9.0.0
Release Notes
sindresorhus/get-stream (get-stream)
### [`v9.0.1`](https://togithub.com/sindresorhus/get-stream/releases/tag/v9.0.1) [Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v9.0.0...v9.0.1) - Upgrade `ReadableStream[Symbol.asyncIterator]` ponyfill ([#128](https://togithub.com/sindresorhus/get-stream/issues/128)) [`df42674`](https://togithub.com/sindresorhus/get-stream/commit/df42674) ### [`v9.0.0`](https://togithub.com/sindresorhus/get-stream/releases/tag/v9.0.0) [Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v8.0.1...v9.0.0) ##### Breaking - Require Node.js 18 ([#111](https://togithub.com/sindresorhus/get-stream/issues/111)) [`7ccab70`](https://togithub.com/sindresorhus/get-stream/commit/7ccab70) ##### Improvements - Fix browser support ([#122](https://togithub.com/sindresorhus/get-stream/issues/122)) [`4d233d3`](https://togithub.com/sindresorhus/get-stream/commit/4d233d3) - Allow multiple readers at once ([#121](https://togithub.com/sindresorhus/get-stream/issues/121)) [`a51d085`](https://togithub.com/sindresorhus/get-stream/commit/a51d085) ### [`v8.0.1`](https://togithub.com/sindresorhus/get-stream/releases/tag/v8.0.1) [Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v8.0.0...v8.0.1) #### Fixes - Ensure [`error.bufferedData`](https://togithub.com/sindresorhus/get-stream#errors) is as full as possible. ([#106](https://togithub.com/sindresorhus/get-stream/issues/106)) - Fix the [`maxBuffer`](https://togithub.com/sindresorhus/get-stream#maxbuffer) option being one byte off in some edge case. ([#105](https://togithub.com/sindresorhus/get-stream/issues/105)) ### [`v8.0.0`](https://togithub.com/sindresorhus/get-stream/releases/tag/v8.0.0) [Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v7.0.1...v8.0.0) Huge thanks to [@ehmicky](https://togithub.com/ehmicky) for doing all the work for this release 🙌 ##### Breaking - Remove the `encoding` option. ([#69](https://togithub.com/sindresorhus/get-stream/issues/69), [#67](https://togithub.com/sindresorhus/get-stream/issues/67)) - This package handles binary, UTF-8 and object streams. - For other encodings like UTF-16, hexacimal and base64, please see the [following tip](https://togithub.com/sindresorhus/get-stream#non-utf-8-encoding). ([#84](https://togithub.com/sindresorhus/get-stream/issues/84)) - Methods like [`buffer.toString('hex')` or `buffer.toString('base64')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end) can also be used. ##### Improvements - Support any JavaScript environment, including browsers. ([#85](https://togithub.com/sindresorhus/get-stream/issues/85)) - Support web streams ([`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)). ([#82](https://togithub.com/sindresorhus/get-stream/issues/82), [#78](https://togithub.com/sindresorhus/get-stream/issues/78), [#79](https://togithub.com/sindresorhus/get-stream/issues/79), [#80](https://togithub.com/sindresorhus/get-stream/issues/80)) - Support [async iterables](https://togithub.com/sindresorhus/get-stream#async-iterables). ([#69](https://togithub.com/sindresorhus/get-stream/issues/69), [#93](https://togithub.com/sindresorhus/get-stream/issues/93)) - Add [`getStreamAsArray()`](https://togithub.com/ehmicky/get-stream#getstreamasarraystream-options) method to pass streams [in object mode](https://togithub.com/ehmicky/get-stream#getstreamasarraystream-options). ([#86](https://togithub.com/sindresorhus/get-stream/issues/86)) - Add [`getStreamAsArrayBuffer()`](https://togithub.com/sindresorhus/get-stream#getstreamasarraybufferstream-options) method to return the stream as an [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). ([#81](https://togithub.com/sindresorhus/get-stream/issues/81)) - When the stream is larger than the maximum size for a [string](https://nodejs.org/api/buffer.html#bufferconstantsmax_string_length), [buffer or `ArrayBuffer`](https://nodejs.org/api/buffer.html#bufferconstantsmax_length), set [`error.bufferedData`](https://togithub.com/ehmicky/get-stream#errors) with the partially read data instead of leaving it empty. ([#68](https://togithub.com/sindresorhus/get-stream/issues/68), [#48](https://togithub.com/sindresorhus/get-stream/issues/48)) #### Fixes - Do not crash on big streams (with one/many GBs). ([#66](https://togithub.com/sindresorhus/get-stream/issues/66)) - Ensure `maxBuffer` stops infinite streams. ([#62](https://togithub.com/sindresorhus/get-stream/issues/62)) - Stop consuming the streaming when hitting [`maxBuffer`](https://togithub.com/ehmicky/get-stream#maxbuffer). ([#42](https://togithub.com/sindresorhus/get-stream/issues/42), [#69](https://togithub.com/sindresorhus/get-stream/issues/69)). - Set [`error.bufferedData`](https://togithub.com/ehmicky/get-stream#errors) when the stream errors for other reasons than [`maxBuffer`](https://togithub.com/ehmicky/get-stream#maxbuffer). ([#56](https://togithub.com/sindresorhus/get-stream/issues/56), [#63](https://togithub.com/sindresorhus/get-stream/issues/63)) - Ensure [`error.bufferedData`](https://togithub.com/ehmicky/get-stream#errors) is smaller than [`maxBuffer`](https://togithub.com/ehmicky/get-stream#maxbuffer). ([#89](https://togithub.com/sindresorhus/get-stream/issues/89)) #### TypeScript types - The `stream` argument must be a [`Readable`, `ReadableStream` or `AsyncIterable`](https://togithub.com/sindresorhus/get-stream/blob/c1df6e8f3a52885489f0120d3c5e55d4f49d9d44/source/index.d.ts#L10). ([#71](https://togithub.com/sindresorhus/get-stream/issues/71)) #### Documentation - Add tips on [alternatives](https://togithub.com/sindresorhus/get-stream#alternatives), [`Blob`](https://togithub.com/sindresorhus/get-stream/tree/main#blobs) and [JSON streaming](https://togithub.com/sindresorhus/get-stream/tree/main#json-streaming). ([#58](https://togithub.com/sindresorhus/get-stream/issues/58), [#95](https://togithub.com/sindresorhus/get-stream/issues/95), [#96](https://togithub.com/sindresorhus/get-stream/issues/96), [#97](https://togithub.com/sindresorhus/get-stream/issues/97)) #### Performance - Do not block the event loop when the stream ends. ([#92](https://togithub.com/sindresorhus/get-stream/issues/92)) ### [`v7.0.1`](https://togithub.com/sindresorhus/get-stream/releases/tag/v7.0.1) [Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v7.0.0...v7.0.1) - Work around issue with handling large sizes [`e58d141`](https://togithub.com/sindresorhus/get-stream/commit/e58d141) ### [`v7.0.0`](https://togithub.com/sindresorhus/get-stream/releases/tag/v7.0.0) [Compare Source](https://togithub.com/sindresorhus/get-stream/compare/v6.0.1...v7.0.0) ##### Breaking - Require Node.js 16 [`70571f8`](https://togithub.com/sindresorhus/get-stream/commit/70571f8) - This package is now pure ESM. **Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).** - Removed `getStream.array()` - It complicated the codebase considerably and I personally never used it. - You can use [`readableStream.toArray()`](https://nodejs.org/api/stream.html#readabletoarrayoptions) instead. [Example](https://togithub.com/sindresorhus/get-stream#tip) - `const getStream = require('get-stream'); getStream.buffer(…);` → `import {getStreamAsBuffer} from 'get-stream'; getStreamAsBuffer(…);` - `const getStream = require('get-stream'); getStream.MaxBufferError;` → `import {MaxBufferError} from 'get-stream'; MaxBufferError;` ##### Tip [You may not need this package anymore.](https://togithub.com/sindresorhus/get-stream#tip) ***Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.