From 01b5dfd9ea927d41492fde352cd79f7b972439b9 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Tue, 17 Sep 2024 09:43:36 +1000 Subject: [PATCH] chore: remove `warnOnDeprecatedApi()` (#25673) --- cli/main.rs | 2 +- cli/standalone/mod.rs | 2 +- runtime/js/99_main.js | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cli/main.rs b/cli/main.rs index ca233d43cd..6a4fa6f9d4 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -495,7 +495,7 @@ fn resolve_flags_and_init( }; init_v8_flags(&default_v8_flags, &flags.v8_flags, get_v8_flags_from_env()); - // TODO(bartlomieju): remove last argument in Deno 2. + // TODO(bartlomieju): remove last argument once Deploy no longer needs it deno_core::JsRuntime::init_platform( None, /* import assertions enabled */ false, ); diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index 40968a8c44..1b1635d598 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -745,7 +745,7 @@ pub async fn run( // Initialize v8 once from the main thread. v8_set_flags(construct_v8_flags(&[], &metadata.v8_flags, vec![])); - // TODO(bartlomieju): remove last argument in Deno 2. + // TODO(bartlomieju): remove last argument once Deploy no longer needs it deno_core::JsRuntime::init_platform(None, true); let mut worker = worker_factory diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 944a9f4a45..8f53cffc42 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -111,9 +111,6 @@ ObjectDefineProperties(Symbol, { let windowIsClosing = false; let globalThis_; -// TODO(2.0): remove once all deprecated APIs are removed. -function warnOnDeprecatedApi() {} - function windowClose() { if (!windowIsClosing) { windowIsClosing = true; @@ -506,7 +503,7 @@ function removeImportedOps() { // FIXME(bartlomieju): temporarily add whole `Deno.core` to // `Deno[Deno.internal]` namespace. It should be removed and only necessary // methods should be left there. -ObjectAssign(internals, { core, warnOnDeprecatedApi }); +ObjectAssign(internals, { core }); const internalSymbol = Symbol("Deno.internal"); const finalDenoNs = { internal: internalSymbol,