Skip to content

Commit 46f0623

Browse files
committed
using v4
1 parent 46476fa commit 46f0623

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@
7979
}
8080
],
8181
"dependencies": {
82-
"web-streams-polyfill": "^3.0.3"
82+
"web-streams-polyfill": "^4.0.0-beta.1"
8383
}
8484
}

streams.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (!globalThis.ReadableStream) {
77
Object.assign(globalThis, require('stream/web'))
88
} catch (error) {
99
// TODO: Remove when only supporting node >= 16.5.0
10-
Object.assign(globalThis, require('web-streams-polyfill/dist/ponyfill.es2018.js'))
10+
require('web-streams-polyfill/polyfill')
1111
}
1212
}
1313

test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,7 @@ test('returns a readable stream', t => {
388388
t.true(typeof stream.getReader === 'function');
389389
});
390390

391-
test('checking instanceof blob#stream', async t => {
392-
// eslint-disable-next-line node/no-unsupported-features/es-syntax
393-
const {ReadableStream} = await import('stream/web').catch(_ => import('web-streams-polyfill/dist/ponyfill.es2018.js'));
391+
test('checking instanceof blob#stream', t => {
394392
const stream = new File([], '').stream();
395-
t.true(stream instanceof ReadableStream);
393+
t.true(stream instanceof globalThis.ReadableStream);
396394
});

0 commit comments

Comments
 (0)