diff options
author | Ryan Clements <ryanclementshax@gmail.com> | 2023-06-16 06:43:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 19:43:59 +0900 |
commit | d32287d2111ec7b845e09c7cfe6a5d779c5f3bd1 (patch) | |
tree | 20341750a687b05458a5cae8a634fb3ac79888f9 /ext/node/polyfills/_fs/_fs_readlink.ts | |
parent | 239dc5e681ad61fb77ed7e0791a8512d6842040b (diff) |
fix(ext/node): remove fromFileUrl from "node:path" (#19504)
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_readlink.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_readlink.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/node/polyfills/_fs/_fs_readlink.ts b/ext/node/polyfills/_fs/_fs_readlink.ts index 982376152..c5e344c4b 100644 --- a/ext/node/polyfills/_fs/_fs_readlink.ts +++ b/ext/node/polyfills/_fs/_fs_readlink.ts @@ -6,7 +6,7 @@ import { MaybeEmpty, notImplemented, } from "ext:deno_node/_utils.ts"; -import { fromFileUrl } from "ext:deno_node/path.ts"; +import { pathFromURL } from "ext:deno_web/00_infra.js"; import { promisify } from "ext:deno_node/internal/util.mjs"; type ReadlinkCallback = ( @@ -55,7 +55,7 @@ export function readlink( optOrCallback: ReadlinkCallback | ReadlinkOptions, callback?: ReadlinkCallback, ) { - path = path instanceof URL ? fromFileUrl(path) : path; + path = path instanceof URL ? pathFromURL(path) : path; let cb: ReadlinkCallback | undefined; if (typeof optOrCallback === "function") { @@ -83,7 +83,7 @@ export function readlinkSync( path: string | URL, opt?: ReadlinkOptions, ): string | Uint8Array { - path = path instanceof URL ? fromFileUrl(path) : path; + path = path instanceof URL ? pathFromURL(path) : path; return maybeEncode(Deno.readLinkSync(path), getEncoding(opt)); } |