Skip to content

Commit

Permalink
fix: use node:-prefixed requires for builtins
Browse files Browse the repository at this point in the history
This changeset fixes and closes isaacs#16 so that this
package can be used on all JS runtimes.

Signed-off-by: Sam Gammon <sam@elide.ventures>
  • Loading branch information
sgammon committed Mar 31, 2024
1 parent b106ef5 commit ddb6488
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { LRUCache } from 'lru-cache'
import { posix, win32 } from 'path'
import { posix, win32 } from 'node:path'

import { fileURLToPath } from 'url'
import { fileURLToPath } from 'node:url'

import * as actualFS from 'fs'
import * as actualFS from 'node:fs'
import {
lstatSync,
readdir as readdirCB,
Expand All @@ -14,9 +14,9 @@ import {
const realpathSync = rps.native
// TODO: test perf of fs/promises realpath vs realpathCB,
// since the promises one uses realpath.native
import { lstat, readdir, readlink, realpath } from 'fs/promises'
import { lstat, readdir, readlink, realpath } from 'node:fs/promises'

import type { Dirent, Stats } from 'fs'
import type { Dirent, Stats } from 'node:fs'
import { Minipass } from 'minipass'

/**
Expand Down

0 comments on commit ddb6488

Please sign in to comment.