Compare commits

...
Author SHA1 Message Date
Jimmy Wärting 46f06235d2 using v4 2021-09-07 16:51:17 +02:00
3 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -79,6 +79,6 @@
}
],
"dependencies": {
"web-streams-polyfill": "^3.0.3"
"web-streams-polyfill": "^4.0.0-beta.1"
}
}
+1 -1
View File
@@ -7,7 +7,7 @@ if (!globalThis.ReadableStream) {
Object.assign(globalThis, require('stream/web'))
} catch (error) {
// TODO: Remove when only supporting node >= 16.5.0
Object.assign(globalThis, require('web-streams-polyfill/dist/ponyfill.es2018.js'))
require('web-streams-polyfill/polyfill')
}
}
+2 -4
View File
@@ -388,9 +388,7 @@ test('returns a readable stream', t => {
t.true(typeof stream.getReader === 'function');
});
test('checking instanceof blob#stream', async t => {
// eslint-disable-next-line node/no-unsupported-features/es-syntax
const {ReadableStream} = await import('stream/web').catch(_ => import('web-streams-polyfill/dist/ponyfill.es2018.js'));
test('checking instanceof blob#stream', t => {
const stream = new File([], '').stream();
t.true(stream instanceof ReadableStream);
t.true(stream instanceof globalThis.ReadableStream);
});