Skip to content

Commit

Permalink
fix: use node:-prefixed requires for builtins
Browse files Browse the repository at this point in the history
This adjusts Node built-in imports to use the `node:` prefix, so
that such imports work on all runtimes.

Fixes and closes isaacs#54
Relates to isaacs/node-glob#580 and isaacs/path-scurry#16

Signed-off-by: Sam Gammon <sam@elide.dev>
  • Loading branch information
sgammon committed Mar 31, 2024
1 parent 7231d42 commit 247e7c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const proc =
stdout: null,
stderr: null,
}
import { EventEmitter } from 'events'
import Stream from 'stream'
import { StringDecoder } from 'string_decoder'
import { EventEmitter } from 'node:events'
import Stream from 'node:stream'
import { StringDecoder } from 'node:string_decoder'

/**
* Same as StringDecoder, but exposing the `lastNeed` flag on the type
Expand Down

0 comments on commit 247e7c1

Please sign in to comment.