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 /runtime/js/06_util.js | |
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 'runtime/js/06_util.js')
-rw-r--r-- | runtime/js/06_util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js index d3c95edba..fc134d52d 100644 --- a/runtime/js/06_util.js +++ b/runtime/js/06_util.js @@ -1,5 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +const core = globalThis.Deno.core; const internals = globalThis.__bootstrap.internals; const primordials = globalThis.__bootstrap.primordials; const { @@ -11,7 +12,6 @@ const { StringPrototypeReplace, TypeError, } = primordials; -import { build } from "internal:runtime/01_build.js"; import { URLPrototype } from "internal:deno_url/00_url.js"; let logDebug = false; let logSource = "JS"; @@ -94,7 +94,7 @@ function pathFromURL(pathOrUrl) { throw new TypeError("Must be a file URL."); } - return build.os == "windows" + return core.build.os == "windows" ? pathFromURLWin32(pathOrUrl) : pathFromURLPosix(pathOrUrl); } |