unstale

npm / web-streams-polyfill

web-streams-polyfill

What changed in web-streams-polyfill 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

6 breaking4 performance1 behavior and defaults1 tooling2 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

web-streams-polyfill 414 changes

Breaking changes 6

  • Rejects strings and other non-object values because the argument is converted to an IDL async_sequence.

    4.4.0release notes

  • The package root now provides the ES2015+ ponyfill, replacing the v3 ponyfill/es6 and ponyfill/es2018 imports.

    4.0.0release notes

  • The ES2018 variant is removed in favor of the ES2015 variant.

    4.0.0release notes

  • The ES5+ ponyfill import replaces the v3 ponyfill import.

    4.0.0release notes

  • The ES2015+ polyfill import replaces the v3 es6 and es2018 imports.

    4.0.0release notes

  • The ES5+ polyfill import replaces the v3 web-streams-polyfill import.

    4.0.0release notes

Performance 4

  • Adds sideEffects metadata so bundlers can remove unused imports of web-streams-polyfill and web-streams-polyfill/es5; only the polyfill entry points are marked as having side effects.

    4.5.1release notes

  • Reduces allocations and promise overhead throughout the implementation, including in pipeTo(), tee(), and async iteration.

    4.5.0release notes

  • When a chunk is available in the stream’s internal queue, reads now return a resolved promise using Promise.resolve(), which is slightly faster.

    4.3.0release notes

  • All code in the published package is minified to reduce download size.

    4.0.0release notes

Behavior and default changes 1

  • When chunks are available in the internal queue, pipeTo() reads them in a single batch and writes them to the destination while respecting backpressure.

    4.3.0release notes

Tooling 1

  • The import condition for the package and its /es5 subpath now uses ESM type definitions, so TypeScript no longer treats them as CommonJS types.

    4.5.0release notes

Fixes and other changes 2

  • Creating a ReadableStream without a pull() method no longer schedules a pull or an extra microtask.

    4.5.0release notes

  • Fixes a memory leak where internal promises accumulated when the destination applies backpressure.

    4.4.0release notes