Skip to content

Commit

Permalink
Merge pull request #156 from MattiasBuelens/update-20241203
Browse files Browse the repository at this point in the history
Update to spec version of 3 December 2024
  • Loading branch information
MattiasBuelens authored Jan 5, 2025
2 parents f32598d + 927c972 commit c2f7590
Show file tree
Hide file tree
Showing 30 changed files with 1,429 additions and 1,758 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id-token: write
strategy:
matrix:
node-version: [ 20 ]
node-version: [ 22 ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
test-node:
name: Node
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22 ]
# Run only on non-merged non-draft mergeable pull requests
if: |
(
Expand All @@ -19,10 +22,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
submodules: true
- name: Use Node.js 20
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
env:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
node-version: [20, 22]
# Skip job if commit message contains "[skip ci]"
if: |
!contains(github.event.head_commit.message, '[skip ci]')
Expand All @@ -32,22 +32,23 @@ jobs:
name: ${{ matrix.browser }}
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.48.0-noble
image: mcr.microsoft.com/playwright:v1.49.1-noble
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox]
node-version: [ 22 ]
if: |
!contains(github.event.head_commit.message, '[skip ci]')
steps:
- name: Check out commit
uses: actions/checkout@v4
with:
submodules: true
- name: Use Node.js 20
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run test:wpt:${{ matrix.browser }}
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
> - 🏠 Internal
> - 💅 Polish
## Unreleased

* 👓 Align with [spec version `fa4891a`](https://github.com/whatwg/streams/tree/fa4891a35ff05281ff8ed66f8ad447644ea7cec3/) ([#156](https://github.com/MattiasBuelens/web-streams-polyfill/pull/156))
* Commit pull-into descriptors *after* filling them from the internal queue.
This prevents an issue where an incorrect BYOB request would temporarily be visible through a patched `Object.prototype.then`,
which broke some internal invariants.
* The `next()` and `return()` methods of `ReadableStream`'s async iterator are now correctly "chained",
such that the promises returned by *either* of these methods are always resolved in the same order
as those methods were called.

## 4.0.0 (2024-02-28)

* 💥 Rework the list of variants to have more modern defaults.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ When using TypeScript, make sure your [`moduleResolution`](https://www.typescrip

## Compliance

The polyfill implements [version `4dc123a` (13 Nov 2023)][spec-snapshot] of the streams specification.
The polyfill implements [version `fa4891a` (3 Dec 2024)][spec-snapshot] of the streams specification.

The polyfill is tested against the same [web platform tests][wpt] that are used by browsers to test their native implementations.
The polyfill aims to pass all tests, although it allows some exceptions for practical reasons:
Expand Down Expand Up @@ -112,8 +112,8 @@ Thanks to these people for their work on [the original polyfill][creatorrr-polyf
[ws-controller-signal]: https://streams.spec.whatwg.org/#ws-default-controller-signal
[abortcontroller-polyfill]: https://www.npmjs.com/package/abortcontroller-polyfill
[mdn-byob-read]: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/read
[spec-snapshot]: https://streams.spec.whatwg.org/commit-snapshots/4dc123a6e7f7ba89a8c6a7975b021156f39cab52/
[wpt]: https://github.com/web-platform-tests/wpt/tree/2a298b616b7c865917d7198a287310881cbfdd8d/streams
[wpt-async-iterator-prototype]: https://github.com/web-platform-tests/wpt/blob/2a298b616b7c865917d7198a287310881cbfdd8d/streams/readable-streams/async-iterator.any.js#L24
[spec-snapshot]: https://streams.spec.whatwg.org/commit-snapshots/fa4891a35ff05281ff8ed66f8ad447644ea7cec3/
[wpt]: https://github.com/web-platform-tests/wpt/tree/7ef95a1c3f1c178e455b21569eddb31af7c3691f/streams
[wpt-async-iterator-prototype]: https://github.com/web-platform-tests/wpt/blob/7ef95a1c3f1c178e455b21569eddb31af7c3691f/streams/readable-streams/async-iterator.any.js#L24
[stub-async-iterator-prototype]: https://github.com/MattiasBuelens/web-streams-polyfill/blob/v4.0.0/src/lib/readable-stream/async-iterator.ts#L143-L147
[creatorrr-polyfill]: https://github.com/creatorrr/web-streams-polyfill
Loading

0 comments on commit c2f7590

Please sign in to comment.