From d32287d2111ec7b845e09c7cfe6a5d779c5f3bd1 Mon Sep 17 00:00:00 2001 From: Ryan Clements Date: Fri, 16 Jun 2023 06:43:59 -0400 Subject: fix(ext/node): remove fromFileUrl from "node:path" (#19504) --- ext/node/polyfills/_fs/_fs_writeFile.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/node/polyfills/_fs/_fs_writeFile.ts') diff --git a/ext/node/polyfills/_fs/_fs_writeFile.ts b/ext/node/polyfills/_fs/_fs_writeFile.ts index a72d49147..fd573147b 100644 --- a/ext/node/polyfills/_fs/_fs_writeFile.ts +++ b/ext/node/polyfills/_fs/_fs_writeFile.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { Encodings } from "ext:deno_node/_utils.ts"; -import { fromFileUrl } from "ext:deno_node/path.ts"; +import { pathFromURL } from "ext:deno_web/00_infra.js"; import { Buffer } from "ext:deno_node/buffer.ts"; import { CallbackWithError, @@ -41,7 +41,7 @@ export function writeFile( throw new TypeError("Callback must be a function."); } - pathOrRid = pathOrRid instanceof URL ? fromFileUrl(pathOrRid) : pathOrRid; + pathOrRid = pathOrRid instanceof URL ? pathFromURL(pathOrRid) : pathOrRid; const flag: string | undefined = isFileOptions(options) ? options.flag @@ -107,7 +107,7 @@ export function writeFileSync( data: string | Uint8Array | Object, options?: Encodings | WriteFileOptions, ) { - pathOrRid = pathOrRid instanceof URL ? fromFileUrl(pathOrRid) : pathOrRid; + pathOrRid = pathOrRid instanceof URL ? pathFromURL(pathOrRid) : pathOrRid; const flag: string | undefined = isFileOptions(options) ? options.flag -- cgit v1.2.3