Skip to content

Commit 1270e6a

Browse files
sgammonisaacs
authored andcommitted
fix: use node:-prefixed requires for builtins
This adjusts Node built-in imports to use the `node:` prefix, so that such imports work on all runtimes. Fixes and closes #54 Relates to isaacs/node-glob#580 and isaacs/path-scurry#16 Signed-off-by: Sam Gammon <sam@elide.dev> PR-URL: #55 Credit: @sgammon Close: #55 Reviewed-by: @isaacs
1 parent c95c13a commit 1270e6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const proc =
55
stdout: null,
66
stderr: null,
77
}
8-
import { EventEmitter } from 'events'
9-
import Stream from 'stream'
10-
import { StringDecoder } from 'string_decoder'
8+
import { EventEmitter } from 'node:events'
9+
import Stream from 'node:stream'
10+
import { StringDecoder } from 'node:string_decoder'
1111

1212
/**
1313
* Same as StringDecoder, but exposing the `lastNeed` flag on the type

0 commit comments

Comments
 (0)