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_symlink.ts | |
parent | 239dc5e681ad61fb77ed7e0791a8512d6842040b (diff) |
fix(ext/node): remove fromFileUrl from "node:path" (#19504)
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_symlink.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_symlink.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/node/polyfills/_fs/_fs_symlink.ts b/ext/node/polyfills/_fs/_fs_symlink.ts index 23e4deaa5..48da49dd1 100644 --- a/ext/node/polyfills/_fs/_fs_symlink.ts +++ b/ext/node/polyfills/_fs/_fs_symlink.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { CallbackWithError } from "ext:deno_node/_fs/_fs_common.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 SymlinkType = "file" | "dir"; @@ -11,8 +11,8 @@ export function symlink( typeOrCallback: SymlinkType | CallbackWithError, maybeCallback?: CallbackWithError, ) { - target = target instanceof URL ? fromFileUrl(target) : target; - path = path instanceof URL ? fromFileUrl(path) : path; + target = target instanceof URL ? pathFromURL(target) : target; + path = path instanceof URL ? pathFromURL(path) : path; const type: SymlinkType = typeof typeOrCallback === "string" ? typeOrCallback @@ -38,8 +38,8 @@ export function symlinkSync( path: string | URL, type?: SymlinkType, ) { - target = target instanceof URL ? fromFileUrl(target) : target; - path = path instanceof URL ? fromFileUrl(path) : path; + target = target instanceof URL ? pathFromURL(target) : target; + path = path instanceof URL ? pathFromURL(path) : path; type = type || "file"; Deno.symlinkSync(target, path, { type }); |