diff options
Diffstat (limited to 'ext/node/polyfills/_fs')
41 files changed, 145 insertions, 148 deletions
diff --git a/ext/node/polyfills/_fs/_fs_access.ts b/ext/node/polyfills/_fs/_fs_access.ts index 9450c2f01..ae7c0d5e9 100644 --- a/ext/node/polyfills/_fs/_fs_access.ts +++ b/ext/node/polyfills/_fs/_fs_access.ts @@ -3,15 +3,15 @@ import { type CallbackWithError, makeCallback, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fs } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { fs } from "internal:deno_node/internal_binding/constants.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; import { getValidatedPath, getValidMode, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import type { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import type { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function access( path: string | Buffer | URL, diff --git a/ext/node/polyfills/_fs/_fs_appendFile.ts b/ext/node/polyfills/_fs/_fs_appendFile.ts index d47afe81b..d460600cc 100644 --- a/ext/node/polyfills/_fs/_fs_appendFile.ts +++ b/ext/node/polyfills/_fs/_fs_appendFile.ts @@ -4,17 +4,17 @@ import { isFd, maybeCallback, WriteFileOptions, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { Encodings } from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { Encodings } from "internal:deno_node/_utils.ts"; import { copyObject, getOptions, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; import { writeFile, writeFileSync, -} from "internal:deno_node/polyfills/_fs/_fs_writeFile.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_fs/_fs_writeFile.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** * TODO: Also accept 'data' parameter as a Node polyfill Buffer type once these diff --git a/ext/node/polyfills/_fs/_fs_chmod.ts b/ext/node/polyfills/_fs/_fs_chmod.ts index 3a19e5622..d27bff562 100644 --- a/ext/node/polyfills/_fs/_fs_chmod.ts +++ b/ext/node/polyfills/_fs/_fs_chmod.ts @@ -1,10 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import * as pathModule from "internal:deno_node/polyfills/path.ts"; -import { parseFileMode } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import * as pathModule from "internal:deno_node/path.ts"; +import { parseFileMode } from "internal:deno_node/internal/validators.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function chmod( path: string | Buffer | URL, diff --git a/ext/node/polyfills/_fs/_fs_chown.ts b/ext/node/polyfills/_fs/_fs_chown.ts index 55a469fba..d3323c173 100644 --- a/ext/node/polyfills/_fs/_fs_chown.ts +++ b/ext/node/polyfills/_fs/_fs_chown.ts @@ -2,15 +2,15 @@ import { type CallbackWithError, makeCallback, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; import { getValidatedPath, kMaxUserId, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import * as pathModule from "internal:deno_node/polyfills/path.ts"; -import { validateInteger } from "internal:deno_node/polyfills/internal/validators.mjs"; -import type { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import * as pathModule from "internal:deno_node/path.ts"; +import { validateInteger } from "internal:deno_node/internal/validators.mjs"; +import type { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** * Asynchronously changes the owner and group diff --git a/ext/node/polyfills/_fs/_fs_close.ts b/ext/node/polyfills/_fs/_fs_close.ts index ff6082980..6c3200614 100644 --- a/ext/node/polyfills/_fs/_fs_close.ts +++ b/ext/node/polyfills/_fs/_fs_close.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { getValidatedFd } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { getValidatedFd } from "internal:deno_node/internal/fs/utils.mjs"; export function close(fd: number, callback: CallbackWithError) { fd = getValidatedFd(fd); diff --git a/ext/node/polyfills/_fs/_fs_common.ts b/ext/node/polyfills/_fs/_fs_common.ts index 1e9f0f266..9b4a982bd 100644 --- a/ext/node/polyfills/_fs/_fs_common.ts +++ b/ext/node/polyfills/_fs/_fs_common.ts @@ -7,15 +7,15 @@ import { O_RDWR, O_TRUNC, O_WRONLY, -} from "internal:deno_node/polyfills/_fs/_fs_constants.ts"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import type { ErrnoException } from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_fs/_fs_constants.ts"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import type { ErrnoException } from "internal:deno_node/_global.d.ts"; import { BinaryEncodings, Encodings, notImplemented, TextEncodings, -} from "internal:deno_node/polyfills/_utils.ts"; +} from "internal:deno_node/_utils.ts"; export type CallbackWithError = (err: ErrnoException | null) => void; @@ -212,7 +212,7 @@ export function getOpenOptions( return openOptions; } -export { isUint32 as isFd } from "internal:deno_node/polyfills/internal/validators.mjs"; +export { isUint32 as isFd } from "internal:deno_node/internal/validators.mjs"; export function maybeCallback(cb: unknown) { validateFunction(cb, "cb"); diff --git a/ext/node/polyfills/_fs/_fs_constants.ts b/ext/node/polyfills/_fs/_fs_constants.ts index 761f6a9b7..8064b576f 100644 --- a/ext/node/polyfills/_fs/_fs_constants.ts +++ b/ext/node/polyfills/_fs/_fs_constants.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { fs } from "internal:deno_node/polyfills/internal_binding/constants.ts"; +import { fs } from "internal:deno_node/internal_binding/constants.ts"; export const { F_OK, diff --git a/ext/node/polyfills/_fs/_fs_copy.ts b/ext/node/polyfills/_fs/_fs_copy.ts index 0971da1eb..1b83bc402 100644 --- a/ext/node/polyfills/_fs/_fs_copy.ts +++ b/ext/node/polyfills/_fs/_fs_copy.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { makeCallback } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { makeCallback } from "internal:deno_node/_fs/_fs_common.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { getValidatedPath, getValidMode, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { fs } from "internal:deno_node/polyfills/internal_binding/constants.ts"; -import { codeMap } from "internal:deno_node/polyfills/internal_binding/uv.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { fs } from "internal:deno_node/internal_binding/constants.ts"; +import { codeMap } from "internal:deno_node/internal_binding/uv.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function copyFile( src: string | Buffer | URL, diff --git a/ext/node/polyfills/_fs/_fs_dir.ts b/ext/node/polyfills/_fs/_fs_dir.ts index e13547241..6e53da2e9 100644 --- a/ext/node/polyfills/_fs/_fs_dir.ts +++ b/ext/node/polyfills/_fs/_fs_dir.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import Dirent from "internal:deno_node/polyfills/_fs/_fs_dirent.ts"; -import { assert } from "internal:deno_node/polyfills/_util/asserts.ts"; -import { ERR_MISSING_ARGS } from "internal:deno_node/polyfills/internal/errors.ts"; +import Dirent from "internal:deno_node/_fs/_fs_dirent.ts"; +import { assert } from "internal:deno_node/_util/asserts.ts"; +import { ERR_MISSING_ARGS } from "internal:deno_node/internal/errors.ts"; import { TextDecoder } from "internal:deno_web/08_text_encoding.js"; export default class Dir { diff --git a/ext/node/polyfills/_fs/_fs_dirent.ts b/ext/node/polyfills/_fs/_fs_dirent.ts index 5a7c243bf..ace83087c 100644 --- a/ext/node/polyfills/_fs/_fs_dirent.ts +++ b/ext/node/polyfills/_fs/_fs_dirent.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; export default class Dirent { constructor(private entry: Deno.DirEntry) {} diff --git a/ext/node/polyfills/_fs/_fs_exists.ts b/ext/node/polyfills/_fs/_fs_exists.ts index 9b0f18303..21b0e99c1 100644 --- a/ext/node/polyfills/_fs/_fs_exists.ts +++ b/ext/node/polyfills/_fs/_fs_exists.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; type ExistsCallback = (exists: boolean) => void; diff --git a/ext/node/polyfills/_fs/_fs_fdatasync.ts b/ext/node/polyfills/_fs/_fs_fdatasync.ts index 325ac30da..6ee586b71 100644 --- a/ext/node/polyfills/_fs/_fs_fdatasync.ts +++ b/ext/node/polyfills/_fs/_fs_fdatasync.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; export function fdatasync( fd: number, diff --git a/ext/node/polyfills/_fs/_fs_fstat.ts b/ext/node/polyfills/_fs/_fs_fstat.ts index ab9cbead4..c1f7547ff 100644 --- a/ext/node/polyfills/_fs/_fs_fstat.ts +++ b/ext/node/polyfills/_fs/_fs_fstat.ts @@ -6,7 +6,7 @@ import { statCallbackBigInt, statOptions, Stats, -} from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; +} from "internal:deno_node/_fs/_fs_stat.ts"; export function fstat(fd: number, callback: statCallback): void; export function fstat( diff --git a/ext/node/polyfills/_fs/_fs_fsync.ts b/ext/node/polyfills/_fs/_fs_fsync.ts index 02be24abc..da81b2753 100644 --- a/ext/node/polyfills/_fs/_fs_fsync.ts +++ b/ext/node/polyfills/_fs/_fs_fsync.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; export function fsync( fd: number, diff --git a/ext/node/polyfills/_fs/_fs_ftruncate.ts b/ext/node/polyfills/_fs/_fs_ftruncate.ts index 9c7bfbd01..b2f88c3d6 100644 --- a/ext/node/polyfills/_fs/_fs_ftruncate.ts +++ b/ext/node/polyfills/_fs/_fs_ftruncate.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; export function ftruncate( fd: number, diff --git a/ext/node/polyfills/_fs/_fs_futimes.ts b/ext/node/polyfills/_fs/_fs_futimes.ts index 60f06bc34..2aa3df786 100644 --- a/ext/node/polyfills/_fs/_fs_futimes.ts +++ b/ext/node/polyfills/_fs/_fs_futimes.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; function getValidTime( time: number | string | Date, diff --git a/ext/node/polyfills/_fs/_fs_link.ts b/ext/node/polyfills/_fs/_fs_link.ts index eb95a10f6..153b18295 100644 --- a/ext/node/polyfills/_fs/_fs_link.ts +++ b/ext/node/polyfills/_fs/_fs_link.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these diff --git a/ext/node/polyfills/_fs/_fs_lstat.ts b/ext/node/polyfills/_fs/_fs_lstat.ts index c85f82a11..7acf595d5 100644 --- a/ext/node/polyfills/_fs/_fs_lstat.ts +++ b/ext/node/polyfills/_fs/_fs_lstat.ts @@ -6,8 +6,8 @@ import { statCallbackBigInt, statOptions, Stats, -} from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_fs/_fs_stat.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function lstat(path: string | URL, callback: statCallback): void; export function lstat( diff --git a/ext/node/polyfills/_fs/_fs_mkdir.ts b/ext/node/polyfills/_fs/_fs_mkdir.ts index ac4b78259..e5aada61f 100644 --- a/ext/node/polyfills/_fs/_fs_mkdir.ts +++ b/ext/node/polyfills/_fs/_fs_mkdir.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { validateBoolean } from "internal:deno_node/polyfills/internal/validators.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import { validateBoolean } from "internal:deno_node/internal/validators.mjs"; /** * TODO: Also accept 'path' parameter as a Node polyfill Buffer type once these diff --git a/ext/node/polyfills/_fs/_fs_mkdtemp.ts b/ext/node/polyfills/_fs/_fs_mkdtemp.ts index de227b216..bf80d3b74 100644 --- a/ext/node/polyfills/_fs/_fs_mkdtemp.ts +++ b/ext/node/polyfills/_fs/_fs_mkdtemp.ts @@ -5,16 +5,13 @@ import { TextDecoder, TextEncoder, } from "internal:deno_web/08_text_encoding.js"; -import { existsSync } from "internal:deno_node/polyfills/_fs/_fs_exists.ts"; -import { - mkdir, - mkdirSync, -} from "internal:deno_node/polyfills/_fs/_fs_mkdir.ts"; +import { existsSync } from "internal:deno_node/_fs/_fs_exists.ts"; +import { mkdir, mkdirSync } from "internal:deno_node/_fs/_fs_mkdir.ts"; import { ERR_INVALID_ARG_TYPE, ERR_INVALID_OPT_VALUE_ENCODING, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/errors.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export type mkdtempCallback = ( err: Error | null, diff --git a/ext/node/polyfills/_fs/_fs_open.ts b/ext/node/polyfills/_fs/_fs_open.ts index e703da56f..06f3caa4b 100644 --- a/ext/node/polyfills/_fs/_fs_open.ts +++ b/ext/node/polyfills/_fs/_fs_open.ts @@ -6,13 +6,13 @@ import { O_RDWR, O_TRUNC, O_WRONLY, -} from "internal:deno_node/polyfills/_fs/_fs_constants.ts"; -import { getOpenOptions } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; -import { parseFileMode } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import type { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +} from "internal:deno_node/_fs/_fs_constants.ts"; +import { getOpenOptions } from "internal:deno_node/_fs/_fs_common.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; +import { parseFileMode } from "internal:deno_node/internal/validators.mjs"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import type { Buffer } from "internal:deno_node/buffer.ts"; function existsSync(filePath: string | URL): boolean { try { diff --git a/ext/node/polyfills/_fs/_fs_opendir.ts b/ext/node/polyfills/_fs/_fs_opendir.ts index 5ee13f951..a14f12f15 100644 --- a/ext/node/polyfills/_fs/_fs_opendir.ts +++ b/ext/node/polyfills/_fs/_fs_opendir.ts @@ -1,17 +1,17 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import Dir from "internal:deno_node/polyfills/_fs/_fs_dir.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import Dir from "internal:deno_node/_fs/_fs_dir.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { getOptions, getValidatedPath, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; import { validateFunction, validateInteger, -} from "internal:deno_node/polyfills/internal/validators.mjs"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/validators.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; /** These options aren't funcitonally used right now, as `Dir` doesn't yet support them. * However, these values are still validated. diff --git a/ext/node/polyfills/_fs/_fs_read.ts b/ext/node/polyfills/_fs/_fs_read.ts index d74445829..8aeebfecb 100644 --- a/ext/node/polyfills/_fs/_fs_read.ts +++ b/ext/node/polyfills/_fs/_fs_read.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/polyfills/internal/errors.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { ERR_INVALID_ARG_TYPE } from "internal:deno_node/internal/errors.ts"; import { validateOffsetLengthRead, validatePosition, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; import { validateBuffer, validateInteger, -} from "internal:deno_node/polyfills/internal/validators.mjs"; +} from "internal:deno_node/internal/validators.mjs"; type readOptions = { buffer: Buffer | Uint8Array; diff --git a/ext/node/polyfills/_fs/_fs_readFile.ts b/ext/node/polyfills/_fs/_fs_readFile.ts index 6c5e9fb8b..24f58f6d1 100644 --- a/ext/node/polyfills/_fs/_fs_readFile.ts +++ b/ext/node/polyfills/_fs/_fs_readFile.ts @@ -4,15 +4,15 @@ import { FileOptionsArgument, getEncoding, TextOptionsArgument, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; import { BinaryEncodings, Encodings, TextEncodings, -} from "internal:deno_node/polyfills/_utils.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_utils.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; function maybeDecode(data: Uint8Array, encoding: TextEncodings): string; function maybeDecode( diff --git a/ext/node/polyfills/_fs/_fs_readdir.ts b/ext/node/polyfills/_fs/_fs_readdir.ts index f6cfae4f7..af828c2c0 100644 --- a/ext/node/polyfills/_fs/_fs_readdir.ts +++ b/ext/node/polyfills/_fs/_fs_readdir.ts @@ -4,12 +4,12 @@ import { TextDecoder, TextEncoder, } from "internal:deno_web/08_text_encoding.js"; -import { asyncIterableToCallback } from "internal:deno_node/polyfills/_fs/_fs_watch.ts"; -import Dirent from "internal:deno_node/polyfills/_fs/_fs_dirent.ts"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { asyncIterableToCallback } from "internal:deno_node/_fs/_fs_watch.ts"; +import Dirent from "internal:deno_node/_fs/_fs_dirent.ts"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; function toDirent(val: Deno.DirEntry): Dirent { return new Dirent(val); diff --git a/ext/node/polyfills/_fs/_fs_readlink.ts b/ext/node/polyfills/_fs/_fs_readlink.ts index 07d1b6f6f..69cd9d2d9 100644 --- a/ext/node/polyfills/_fs/_fs_readlink.ts +++ b/ext/node/polyfills/_fs/_fs_readlink.ts @@ -5,9 +5,9 @@ import { intoCallbackAPIWithIntercept, MaybeEmpty, notImplemented, -} from "internal:deno_node/polyfills/_utils.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/_utils.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type ReadlinkCallback = ( err: MaybeEmpty<Error>, diff --git a/ext/node/polyfills/_fs/_fs_realpath.ts b/ext/node/polyfills/_fs/_fs_realpath.ts index 5892b2c0f..7254f8a28 100644 --- a/ext/node/polyfills/_fs/_fs_realpath.ts +++ b/ext/node/polyfills/_fs/_fs_realpath.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type Options = { encoding: string }; type Callback = (err: Error | null, path?: string) => void; diff --git a/ext/node/polyfills/_fs/_fs_rename.ts b/ext/node/polyfills/_fs/_fs_rename.ts index 3f8b5bd7e..10ec90078 100644 --- a/ext/node/polyfills/_fs/_fs_rename.ts +++ b/ext/node/polyfills/_fs/_fs_rename.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function rename( oldPath: string | URL, diff --git a/ext/node/polyfills/_fs/_fs_rm.ts b/ext/node/polyfills/_fs/_fs_rm.ts index 80ba0b5f8..dbbe12179 100644 --- a/ext/node/polyfills/_fs/_fs_rm.ts +++ b/ext/node/polyfills/_fs/_fs_rm.ts @@ -2,9 +2,9 @@ import { validateRmOptions, validateRmOptionsSync, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type rmOptions = { force?: boolean; diff --git a/ext/node/polyfills/_fs/_fs_rmdir.ts b/ext/node/polyfills/_fs/_fs_rmdir.ts index ba753a743..186f92447 100644 --- a/ext/node/polyfills/_fs/_fs_rmdir.ts +++ b/ext/node/polyfills/_fs/_fs_rmdir.ts @@ -5,14 +5,14 @@ import { validateRmdirOptions, validateRmOptions, validateRmOptionsSync, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { toNamespacedPath } from "internal:deno_node/polyfills/path.ts"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { toNamespacedPath } from "internal:deno_node/path.ts"; import { denoErrorToNodeError, ERR_FS_RMDIR_ENOTDIR, -} from "internal:deno_node/polyfills/internal/errors.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/errors.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type rmdirOptions = { maxRetries?: number; diff --git a/ext/node/polyfills/_fs/_fs_stat.ts b/ext/node/polyfills/_fs/_fs_stat.ts index 3a006084d..3a496cb40 100644 --- a/ext/node/polyfills/_fs/_fs_stat.ts +++ b/ext/node/polyfills/_fs/_fs_stat.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { denoErrorToNodeError } from "internal:deno_node/polyfills/internal/errors.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { denoErrorToNodeError } from "internal:deno_node/internal/errors.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export type statOptions = { bigint: boolean; diff --git a/ext/node/polyfills/_fs/_fs_symlink.ts b/ext/node/polyfills/_fs/_fs_symlink.ts index c8652885f..abaa780ae 100644 --- a/ext/node/polyfills/_fs/_fs_symlink.ts +++ b/ext/node/polyfills/_fs/_fs_symlink.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; type SymlinkType = "file" | "dir"; diff --git a/ext/node/polyfills/_fs/_fs_truncate.ts b/ext/node/polyfills/_fs/_fs_truncate.ts index 105555abc..9cdbbdbf3 100644 --- a/ext/node/polyfills/_fs/_fs_truncate.ts +++ b/ext/node/polyfills/_fs/_fs_truncate.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function truncate( path: string | URL, diff --git a/ext/node/polyfills/_fs/_fs_unlink.ts b/ext/node/polyfills/_fs/_fs_unlink.ts index ed43bb1b3..b54edc717 100644 --- a/ext/node/polyfills/_fs/_fs_unlink.ts +++ b/ext/node/polyfills/_fs/_fs_unlink.ts @@ -1,5 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; export function unlink(path: string | URL, callback: (err?: Error) => void) { if (!callback) throw new Error("No callback function supplied"); diff --git a/ext/node/polyfills/_fs/_fs_utimes.ts b/ext/node/polyfills/_fs/_fs_utimes.ts index 7423a1060..1e104a463 100644 --- a/ext/node/polyfills/_fs/_fs_utimes.ts +++ b/ext/node/polyfills/_fs/_fs_utimes.ts @@ -1,8 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import type { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +import type { CallbackWithError } from "internal:deno_node/_fs/_fs_common.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { promisify } from "internal:deno_node/internal/util.mjs"; function getValidTime( time: number | string | Date, diff --git a/ext/node/polyfills/_fs/_fs_watch.ts b/ext/node/polyfills/_fs/_fs_watch.ts index 79f226126..7924eeeed 100644 --- a/ext/node/polyfills/_fs/_fs_watch.ts +++ b/ext/node/polyfills/_fs/_fs_watch.ts @@ -1,14 +1,14 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { basename } from "internal:deno_node/polyfills/path.ts"; -import { EventEmitter } from "internal:deno_node/polyfills/events.ts"; -import { notImplemented } from "internal:deno_node/polyfills/_utils.ts"; -import { promisify } from "internal:deno_node/polyfills/util.ts"; -import { getValidatedPath } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { validateFunction } from "internal:deno_node/polyfills/internal/validators.mjs"; -import { stat, Stats } from "internal:deno_node/polyfills/_fs/_fs_stat.ts"; -import { Stats as StatsClass } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { delay } from "internal:deno_node/polyfills/_util/async.ts"; +import { basename } from "internal:deno_node/path.ts"; +import { EventEmitter } from "internal:deno_node/events.ts"; +import { notImplemented } from "internal:deno_node/_utils.ts"; +import { promisify } from "internal:deno_node/util.ts"; +import { getValidatedPath } from "internal:deno_node/internal/fs/utils.mjs"; +import { validateFunction } from "internal:deno_node/internal/validators.mjs"; +import { stat, Stats } from "internal:deno_node/_fs/_fs_stat.ts"; +import { Stats as StatsClass } from "internal:deno_node/internal/fs/utils.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { delay } from "internal:deno_node/_util/async.ts"; const statPromisified = promisify(stat); const statAsync = async (filename: string): Promise<Stats | null> => { diff --git a/ext/node/polyfills/_fs/_fs_write.d.ts b/ext/node/polyfills/_fs/_fs_write.d.ts index eb6dbcc95..cfa97c5fc 100644 --- a/ext/node/polyfills/_fs/_fs_write.d.ts +++ b/ext/node/polyfills/_fs/_fs_write.d.ts @@ -4,7 +4,7 @@ import { BufferEncoding, ErrnoException, -} from "internal:deno_node/polyfills/_global.d.ts"; +} from "internal:deno_node/_global.d.ts"; /** * Write `buffer` to the file specified by `fd`. If `buffer` is a normal object, it diff --git a/ext/node/polyfills/_fs/_fs_write.mjs b/ext/node/polyfills/_fs/_fs_write.mjs index d44a72921..110e7dfb8 100644 --- a/ext/node/polyfills/_fs/_fs_write.mjs +++ b/ext/node/polyfills/_fs/_fs_write.mjs @@ -1,15 +1,15 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { validateEncoding, validateInteger } from "internal:deno_node/polyfills/internal/validators.mjs"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { validateEncoding, validateInteger } from "internal:deno_node/internal/validators.mjs"; import { getValidatedFd, showStringCoercionDeprecation, validateOffsetLengthWrite, validateStringAfterArrayBufferView, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { isArrayBufferView } from "internal:deno_node/polyfills/internal/util/types.ts"; -import { maybeCallback } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { isArrayBufferView } from "internal:deno_node/internal/util/types.ts"; +import { maybeCallback } from "internal:deno_node/_fs/_fs_common.ts"; export function writeSync(fd, buffer, offset, length, position) { fd = getValidatedFd(fd); diff --git a/ext/node/polyfills/_fs/_fs_writeFile.ts b/ext/node/polyfills/_fs/_fs_writeFile.ts index 3cad5f947..d3f0d35df 100644 --- a/ext/node/polyfills/_fs/_fs_writeFile.ts +++ b/ext/node/polyfills/_fs/_fs_writeFile.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { Encodings } from "internal:deno_node/polyfills/_utils.ts"; -import { fromFileUrl } from "internal:deno_node/polyfills/path.ts"; -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; +import { Encodings } from "internal:deno_node/_utils.ts"; +import { fromFileUrl } from "internal:deno_node/path.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; import { CallbackWithError, checkEncoding, @@ -9,17 +9,17 @@ import { getOpenOptions, isFileOptions, WriteFileOptions, -} from "internal:deno_node/polyfills/_fs/_fs_common.ts"; -import { isWindows } from "internal:deno_node/polyfills/_util/os.ts"; +} from "internal:deno_node/_fs/_fs_common.ts"; +import { isWindows } from "internal:deno_node/_util/os.ts"; import { AbortError, denoErrorToNodeError, -} from "internal:deno_node/polyfills/internal/errors.ts"; +} from "internal:deno_node/internal/errors.ts"; import { showStringCoercionDeprecation, validateStringAfterArrayBufferView, -} from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { promisify } from "internal:deno_node/polyfills/internal/util.mjs"; +} from "internal:deno_node/internal/fs/utils.mjs"; +import { promisify } from "internal:deno_node/internal/util.mjs"; interface Writer { write(p: Uint8Array): Promise<number>; diff --git a/ext/node/polyfills/_fs/_fs_writev.d.ts b/ext/node/polyfills/_fs/_fs_writev.d.ts index d828bf677..909b955d1 100644 --- a/ext/node/polyfills/_fs/_fs_writev.d.ts +++ b/ext/node/polyfills/_fs/_fs_writev.d.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Forked from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/d9df51e34526f48bef4e2546a006157b391ad96c/types/node/fs.d.ts -import { ErrnoException } from "internal:deno_node/polyfills/_global.d.ts"; +import { ErrnoException } from "internal:deno_node/_global.d.ts"; /** * Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`. diff --git a/ext/node/polyfills/_fs/_fs_writev.mjs b/ext/node/polyfills/_fs/_fs_writev.mjs index ffc67c81a..49d0b9a21 100644 --- a/ext/node/polyfills/_fs/_fs_writev.mjs +++ b/ext/node/polyfills/_fs/_fs_writev.mjs @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent, Inc. and Node.js contributors. All rights reserved. MIT license. -import { Buffer } from "internal:deno_node/polyfills/buffer.ts"; -import { validateBufferArray } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { getValidatedFd } from "internal:deno_node/polyfills/internal/fs/utils.mjs"; -import { maybeCallback } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; +import { Buffer } from "internal:deno_node/buffer.ts"; +import { validateBufferArray } from "internal:deno_node/internal/fs/utils.mjs"; +import { getValidatedFd } from "internal:deno_node/internal/fs/utils.mjs"; +import { maybeCallback } from "internal:deno_node/_fs/_fs_common.ts"; export function writev(fd, buffers, position, callback) { const innerWritev = async (fd, buffers, position) => { |