Skip to content

Commit b187f8f

Browse files
committed
Prefix stream/web import with node:
1 parent 9022f8f commit b187f8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

streams.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const POOL_SIZE = 65536;
44

55
if (!globalThis.ReadableStream) {
66
try {
7-
Object.assign(globalThis, require('stream/web'))
7+
Object.assign(globalThis, require('node:stream/web'))
88
} catch (error) {
99
// TODO: Remove when only supporting node >= 16.5.0
1010
Object.assign(globalThis, require('web-streams-polyfill/dist/ponyfill.es2018.js'))

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ test('returns a readable stream', t => {
390390

391391
test('checking instanceof blob#stream', async t => {
392392
// 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'));
393+
const {ReadableStream} = await import('node:stream/web').catch(_ => import('web-streams-polyfill/dist/ponyfill.es2018.js'));
394394
const stream = new File([], '').stream();
395395
t.true(stream instanceof ReadableStream);
396396
});

0 commit comments

Comments
 (0)