From 5f34c9be91a42e9087536d63b7e319439ceba756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 5 Mar 2023 18:18:13 -0400 Subject: refactor: move definition of Deno.build from "runtime" to "core" (#18036) We use information about build in several extension crates like "ext/node" or "runtime/". In an effort to move "fs" APIs to a separate crate it is a prerequisite to have this information available outside of the "runtime/" crate. This commit moves definition of "build" object to "Deno.core" that is later forwarded to "Deno.build". --- ext/node/polyfills/_process/process.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/node/polyfills/_process') diff --git a/ext/node/polyfills/_process/process.ts b/ext/node/polyfills/_process/process.ts index 3bcf6dcf9..bee65f905 100644 --- a/ext/node/polyfills/_process/process.ts +++ b/ext/node/polyfills/_process/process.ts @@ -4,16 +4,16 @@ // The following are all the process APIs that don't depend on the stream module // They have to be split this way to prevent a circular dependency -import { build } from "internal:runtime/01_build.js"; +const core = globalThis.Deno.core; import { nextTick as _nextTick } from "internal:deno_node/_next_tick.ts"; import { _exiting } from "internal:deno_node/_process/exiting.ts"; import * as fs from "internal:runtime/30_fs.js"; /** Returns the operating system CPU architecture for which the Deno binary was compiled */ export function arch(): string { - if (build.arch == "x86_64") { + if (core.build.arch == "x86_64") { return "x64"; - } else if (build.arch == "aarch64") { + } else if (core.build.arch == "aarch64") { return "arm64"; } else { throw Error("unreachable"); -- cgit v1.2.3