summaryrefslogtreecommitdiff
path: root/runtime/js/01_version.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/01_version.js')
-rw-r--r--runtime/js/01_version.js41
1 files changed, 18 insertions, 23 deletions
diff --git a/runtime/js/01_version.js b/runtime/js/01_version.js
index b1b778a42..62f3df17c 100644
--- a/runtime/js/01_version.js
+++ b/runtime/js/01_version.js
@@ -1,29 +1,24 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-"use strict";
-((window) => {
- const { ObjectFreeze } = window.__bootstrap.primordials;
+const primordials = globalThis.__bootstrap.primordials;
+const { ObjectFreeze } = primordials;
- const version = {
- deno: "",
- v8: "",
- typescript: "",
- };
+const version = {
+ deno: "",
+ v8: "",
+ typescript: "",
+};
- function setVersions(
- denoVersion,
- v8Version,
- tsVersion,
- ) {
- version.deno = denoVersion;
- version.v8 = v8Version;
- version.typescript = tsVersion;
+function setVersions(
+ denoVersion,
+ v8Version,
+ tsVersion,
+) {
+ version.deno = denoVersion;
+ version.v8 = v8Version;
+ version.typescript = tsVersion;
- ObjectFreeze(version);
- }
+ ObjectFreeze(version);
+}
- window.__bootstrap.version = {
- version,
- setVersions,
- };
-})(this);
+export { setVersions, version };