From aaf2bf4bfbf90bed0b6e9812f337f057d1d24f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 17 Sep 2024 02:13:34 +0100 Subject: chore: upgrade deno_core (#25674) No functional changes, just removes dead code. --- ext/broadcast_channel/lib.rs | 9 +++------ ext/cron/lib.rs | 4 +--- ext/kv/lib.rs | 4 +--- ext/net/lib.rs | 4 +--- ext/net/ops.rs | 5 +---- 5 files changed, 7 insertions(+), 19 deletions(-) (limited to 'ext') diff --git a/ext/broadcast_channel/lib.rs b/ext/broadcast_channel/lib.rs index 437580971..47c48656d 100644 --- a/ext/broadcast_channel/lib.rs +++ b/ext/broadcast_channel/lib.rs @@ -50,12 +50,9 @@ pub fn op_broadcast_subscribe( where BC: BroadcastChannel + 'static, { - // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` - // once we phase out `check_or_exit_with_legacy_fallback` - state.feature_checker.check_or_exit_with_legacy_fallback( - UNSTABLE_FEATURE_NAME, - "BroadcastChannel", - ); + state + .feature_checker + .check_or_exit(UNSTABLE_FEATURE_NAME, "BroadcastChannel"); let bc = state.borrow::(); let resource = bc.subscribe()?; Ok(state.resource_table.add(resource)) diff --git a/ext/cron/lib.rs b/ext/cron/lib.rs index 95e38179d..e350e4d69 100644 --- a/ext/cron/lib.rs +++ b/ext/cron/lib.rs @@ -62,11 +62,9 @@ where { let cron_handler = { let state = state.borrow(); - // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` - // once we phase out `check_or_exit_with_legacy_fallback` state .feature_checker - .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, "Deno.cron"); + .check_or_exit(UNSTABLE_FEATURE_NAME, "Deno.cron"); state.borrow::>().clone() }; diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs index c7a995073..45095724d 100644 --- a/ext/kv/lib.rs +++ b/ext/kv/lib.rs @@ -129,11 +129,9 @@ where { let handler = { let state = state.borrow(); - // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` - // once we phase out `check_or_exit_with_legacy_fallback` state .feature_checker - .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, "Deno.openKv"); + .check_or_exit(UNSTABLE_FEATURE_NAME, "Deno.openKv"); state.borrow::>().clone() }; let db = handler.open(state.clone(), path).await?; diff --git a/ext/net/lib.rs b/ext/net/lib.rs index 0ef3e85c4..b039965d4 100644 --- a/ext/net/lib.rs +++ b/ext/net/lib.rs @@ -88,11 +88,9 @@ impl NetPermissions for deno_permissions::PermissionsContainer { /// Helper for checking unstable features. Used for sync ops. fn check_unstable(state: &OpState, api_name: &str) { - // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` - // once we phase out `check_or_exit_with_legacy_fallback` state .feature_checker - .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, api_name); + .check_or_exit(UNSTABLE_FEATURE_NAME, api_name); } pub fn get_declaration() -> PathBuf { diff --git a/ext/net/ops.rs b/ext/net/ops.rs index 67d32fe03..f2735eda9 100644 --- a/ext/net/ops.rs +++ b/ext/net/ops.rs @@ -1063,12 +1063,9 @@ mod tests { } ); - let mut feature_checker = deno_core::FeatureChecker::default(); - feature_checker.enable_legacy_unstable(); - let mut runtime = JsRuntime::new(RuntimeOptions { extensions: vec![test_ext::init_ops()], - feature_checker: Some(Arc::new(feature_checker)), + feature_checker: Some(Arc::new(Default::default())), ..Default::default() }); -- cgit v1.2.3