diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-05 18:18:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 22:18:13 +0000 |
commit | 5f34c9be91a42e9087536d63b7e319439ceba756 (patch) | |
tree | 529a4414ef89104fa39ab422181028670f6f718b /ext/node/polyfills/_process | |
parent | 273777f7d9201de92b6f8c6f2f9579321165ec17 (diff) |
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".
Diffstat (limited to 'ext/node/polyfills/_process')
-rw-r--r-- | ext/node/polyfills/_process/process.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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"); |