From 2d5b19277b483de64087822934d42fc3e09c1c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 7 Mar 2024 23:06:28 +0000 Subject: [PATCH] chore: upgrade deno_core (#22782) --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- runtime/js/99_main.js | 12 ++++++++++++ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b2a70a6be..e36b3482f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1257,9 +1257,9 @@ dependencies = [ [[package]] name = "deno_core" -version = "0.268.0" +version = "0.269.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e476c779b2c95d8b78cf0dcd7d1611800f29d1f762f635519ea0875a366026" +checksum = "a14bd0f882d9f2c9041c7e311ca11ebb96f31d0524d67d9ced650bb0bf1c0923" dependencies = [ "anyhow", "bincode", @@ -1714,9 +1714,9 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.144.0" +version = "0.145.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ebaf38d6a37bffed23c5253c94c5bdb33c45872a7476608afc746b21815780d" +checksum = "855c2a983b2e0533c05172fa1afc7cc00c23cb3d8de1a4ec4428fb54507a13e2" dependencies = [ "proc-macro-rules", "proc-macro2", @@ -5609,9 +5609,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.177.0" +version = "0.178.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c875bf0cfb75bf24ad5dd9718420a9a9b30c72e4ec5e54fee8cfe25c96311388" +checksum = "b2a1c7ecee7d18a29aa6a079cfd1202bdee92eff4b3c3ae6e7d1256b9d0ff8ce" dependencies = [ "bytes", "derive_more", diff --git a/Cargo.toml b/Cargo.toml index b11710d0ad..46f8c1481e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "0.34.1", features = ["transpiling"] } -deno_core = { version = "0.268.0" } +deno_core = { version = "0.269.0", features = ["lazy_eval_snapshot"] } deno_bench_util = { version = "0.134.0", path = "./bench_util" } deno_lockfile = "0.19.0" diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 19ebf7ceca..2299b63f9c 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -763,6 +763,12 @@ function bootstrapMainRuntime(runtimeOptions) { delete Object.prototype.__proto__; } + if (!ArrayPrototypeIncludes(unstableFeatures, unstableIds.temporal)) { + // Removes the `Temporal` API. + delete globalThis.Temporal; + delete globalThis.Date.prototype.toTemporalInstant; + } + // Setup `Deno` global - we're actually overriding already existing global // `Deno` with `Deno` namespace from "./deno.ts". ObjectDefineProperty(globalThis, "Deno", core.propReadOnly(finalDenoNs)); @@ -875,6 +881,12 @@ function bootstrapWorkerRuntime( delete Object.prototype.__proto__; } + if (!ArrayPrototypeIncludes(unstableFeatures, unstableIds.temporal)) { + // Removes the `Temporal` API. + delete globalThis.Temporal; + delete globalThis.Date.prototype.toTemporalInstant; + } + ObjectDefineProperties(finalDenoNs, { pid: core.propGetterOnly(opPid), noColor: core.propGetterOnly(() => op_bootstrap_no_color()),