Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46f06235d2 |
+1
-1
@@ -79,6 +79,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"web-streams-polyfill": "^3.0.3"
|
"web-streams-polyfill": "^4.0.0-beta.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ if (!globalThis.ReadableStream) {
|
|||||||
Object.assign(globalThis, require('stream/web'))
|
Object.assign(globalThis, require('stream/web'))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// TODO: Remove when only supporting node >= 16.5.0
|
// 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')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -388,9 +388,7 @@ test('returns a readable stream', t => {
|
|||||||
t.true(typeof stream.getReader === 'function');
|
t.true(typeof stream.getReader === 'function');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('checking instanceof blob#stream', async t => {
|
test('checking instanceof blob#stream', 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'));
|
|
||||||
const stream = new File([], '').stream();
|
const stream = new File([], '').stream();
|
||||||
t.true(stream instanceof ReadableStream);
|
t.true(stream instanceof globalThis.ReadableStream);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user