web-streams-polyfill 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
package/dist/polyfill.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
package/dist/polyfill.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
package/dist/ponyfill.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
package/dist/ponyfill.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * web-streams-polyfill v3.3.1
3
+ * web-streams-polyfill v3.3.2
4
4
  * Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
5
5
  * This code is released under the MIT license.
6
6
  * SPDX-License-Identifier: MIT
@@ -0,0 +1,24 @@
1
+ /// <reference lib="dom" />
2
+ /// <reference lib="esnext.asynciterable" />
3
+ import { ReadableStreamAsyncIterator, ReadableStreamIteratorOptions } from './ponyfill';
4
+ export * from './ponyfill';
5
+ declare global {
6
+ interface ReadableStream<R = any> {
7
+ /**
8
+ * Asynchronously iterates over the chunks in the stream's internal queue.
9
+ *
10
+ * Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader.
11
+ * The lock will be released if the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method
12
+ * is called, e.g. by breaking out of the loop.
13
+ *
14
+ * By default, calling the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method will also
15
+ * cancel the stream. To prevent this, use the stream's {@link ReadableStream.values | values()} method, passing
16
+ * `true` for the `preventCancel` option.
17
+ */
18
+ values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
19
+ /**
20
+ * {@inheritDoc ReadableStream.values}
21
+ */
22
+ [Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<R>;
23
+ }
24
+ }
@@ -0,0 +1,29 @@
1
+ /// <reference lib="dom" />
2
+ /// <reference lib="es2018.asynciterable" />
3
+
4
+ import type { ReadableStreamAsyncIterator, ReadableStreamIteratorOptions } from './ponyfill';
5
+
6
+ export * from './ponyfill';
7
+
8
+ declare global {
9
+ interface ReadableStream<R = any> {
10
+ /**
11
+ * Asynchronously iterates over the chunks in the stream's internal queue.
12
+ *
13
+ * Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader.
14
+ * The lock will be released if the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method
15
+ * is called, e.g. by breaking out of the loop.
16
+ *
17
+ * By default, calling the async iterator's {@link ReadableStreamAsyncIterator.return | return()} method will also
18
+ * cancel the stream. To prevent this, use the stream's {@link ReadableStream.values | values()} method, passing
19
+ * `true` for the `preventCancel` option.
20
+ */
21
+ values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
22
+
23
+ /**
24
+ * {@inheritDoc ReadableStream.values}
25
+ */
26
+ [Symbol.asyncIterator]: (options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<R>;
27
+ }
28
+ }
29
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-streams-polyfill",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "Web Streams, based on the WHATWG spec reference implementation",
5
5
  "main": "dist/polyfill",
6
6
  "browser": "dist/polyfill.min.js",