summaryrefslogtreecommitdiff
path: root/runtime/js/01_build.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-05 18:18:13 -0400
committerGitHub <noreply@github.com>2023-03-05 22:18:13 +0000
commit5f34c9be91a42e9087536d63b7e319439ceba756 (patch)
tree529a4414ef89104fa39ab422181028670f6f718b /runtime/js/01_build.js
parent273777f7d9201de92b6f8c6f2f9579321165ec17 (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/01_build.js')
-rw-r--r--runtime/js/01_build.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/runtime/js/01_build.js b/runtime/js/01_build.js
deleted file mode 100644
index a9515c5b8..000000000
--- a/runtime/js/01_build.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-
-const primordials = globalThis.__bootstrap.primordials;
-const { ObjectFreeze, StringPrototypeSplit } = primordials;
-
-const build = {
- target: "unknown",
- arch: "unknown",
- os: "unknown",
- vendor: "unknown",
- env: undefined,
-};
-
-function setBuildInfo(target) {
- const { 0: arch, 1: vendor, 2: os, 3: env } = StringPrototypeSplit(
- target,
- "-",
- 4,
- );
- build.target = target;
- build.arch = arch;
- build.vendor = vendor;
- build.os = os;
- build.env = env;
- ObjectFreeze(build);
-}
-
-export { build, setBuildInfo };