diff options
Diffstat (limited to 'ext/node/polyfills/internal')
| -rw-r--r-- | ext/node/polyfills/internal/child_process.ts | 9 | ||||
| -rw-r--r-- | ext/node/polyfills/internal/crypto/hash.ts | 2 | ||||
| -rw-r--r-- | ext/node/polyfills/internal/timers.mjs | 9 |
3 files changed, 8 insertions, 12 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 92aa8d4fa..81a404c14 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -67,10 +67,6 @@ export function mapValues<T, O>( type NodeStdio = "pipe" | "overlapped" | "ignore" | "inherit" | "ipc"; type DenoStdio = "inherit" | "piped" | "null"; -// @ts-ignore Deno[Deno.internal] is used on purpose here -const DenoCommand = Deno[Deno.internal]?.nodeUnstable?.Command || - Deno.Command; - export function stdioStringToArray( stdio: NodeStdio, channel: NodeStdio | number, @@ -183,9 +179,8 @@ export class ChildProcess extends EventEmitter { this.spawnargs = [cmd, ...cmdArgs]; const stringEnv = mapValues(env, (value) => value.toString()); - try { - this.#process = new DenoCommand(cmd, { + this.#process = new Deno.Command(cmd, { args: cmdArgs, cwd, env: stringEnv, @@ -804,7 +799,7 @@ export function spawnSync( const result: SpawnSyncResult = {}; try { - const output = new DenoCommand(command, { + const output = new Deno.Command(command, { args, cwd, env, diff --git a/ext/node/polyfills/internal/crypto/hash.ts b/ext/node/polyfills/internal/crypto/hash.ts index 7995e5f8c..e6e2409a2 100644 --- a/ext/node/polyfills/internal/crypto/hash.ts +++ b/ext/node/polyfills/internal/crypto/hash.ts @@ -107,7 +107,7 @@ export class Hash extends Transform { * Supported encodings are currently 'hex', 'binary', 'base64', 'base64url'. */ digest(encoding?: string): Buffer | string { - const digest = this.#context.digest(undefined); + const digest = ops.op_node_hash_digest(this.#context); if (encoding === undefined) { return Buffer.from(digest); } diff --git a/ext/node/polyfills/internal/timers.mjs b/ext/node/polyfills/internal/timers.mjs index 648fb1bc1..6796885ce 100644 --- a/ext/node/polyfills/internal/timers.mjs +++ b/ext/node/polyfills/internal/timers.mjs @@ -5,10 +5,11 @@ import { inspect } from "internal:deno_node/polyfills/internal/util/inspect.mjs" import { validateFunction, validateNumber } from "internal:deno_node/polyfills/internal/validators.mjs"; import { ERR_OUT_OF_RANGE } from "internal:deno_node/polyfills/internal/errors.ts"; import { emitWarning } from "internal:deno_node/polyfills/process.ts"; - -const setTimeout_ = globalThis.setTimeout; -const clearTimeout_ = globalThis.clearTimeout; -const setInterval_ = globalThis.setInterval; +import { + setTimeout as setTimeout_, + clearTimeout as clearTimeout_, + setInterval as setInterval_, +} from "internal:deno_web/02_timers.js"; // Timeout values > TIMEOUT_MAX are set to 1. export const TIMEOUT_MAX = 2 ** 31 - 1; |
