mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: upgrade deno_core (#25674)
No functional changes, just removes dead code.
This commit is contained in:
parent
01b5dfd9ea
commit
aaf2bf4bfb
10 changed files with 15 additions and 44 deletions
12
Cargo.lock
generated
12
Cargo.lock
generated
|
@ -1405,9 +1405,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deno_core"
|
name = "deno_core"
|
||||||
version = "0.308.0"
|
version = "0.309.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "62fc8250fa9da059cc05b18328319a9048c73e4889ca929cc60877a8a1bfc4d4"
|
checksum = "eaecc78e8903d1b5d95c7fb01a14eb342b9e63484763a304fd30a8f48861f9df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bincode",
|
"bincode",
|
||||||
|
@ -1887,9 +1887,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deno_ops"
|
name = "deno_ops"
|
||||||
version = "0.184.0"
|
version = "0.185.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "24a465b7d691ad7cae41e8f51bd954b1e3ffd201b84dc30de2c16cf91034946e"
|
checksum = "2d817c00b3f30bef495c84080b5ed327ed68d6d2636b5ed8b730d00a06221dc1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-rules",
|
"proc-macro-rules",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
@ -6257,9 +6257,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_v8"
|
name = "serde_v8"
|
||||||
version = "0.217.0"
|
version = "0.218.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "467c0a7bfc67cd918f1f7ab7a5ab70a9e744e466ff428cd728ff2c03bc77874c"
|
checksum = "134add6f9dc7a226912468f7c427a476583ab362e094f04ff3a9fa79f2df97c7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"num-bigint",
|
"num-bigint",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
@ -45,7 +45,7 @@ repository = "https://github.com/denoland/deno"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
deno_ast = { version = "=0.42.0", features = ["transpiling"] }
|
deno_ast = { version = "=0.42.0", features = ["transpiling"] }
|
||||||
deno_core = { version = "0.308.0" }
|
deno_core = { version = "0.309.0" }
|
||||||
|
|
||||||
deno_bench_util = { version = "0.162.0", path = "./bench_util" }
|
deno_bench_util = { version = "0.162.0", path = "./bench_util" }
|
||||||
deno_lockfile = "=0.23.1"
|
deno_lockfile = "=0.23.1"
|
||||||
|
|
|
@ -726,7 +726,6 @@ impl CliFactory {
|
||||||
let cli_options = self.cli_options()?;
|
let cli_options = self.cli_options()?;
|
||||||
let mut checker = FeatureChecker::default();
|
let mut checker = FeatureChecker::default();
|
||||||
checker.set_exit_cb(Box::new(crate::unstable_exit_cb));
|
checker.set_exit_cb(Box::new(crate::unstable_exit_cb));
|
||||||
checker.set_warn_cb(Box::new(crate::unstable_warn_cb));
|
|
||||||
let unstable_features = cli_options.unstable_features();
|
let unstable_features = cli_options.unstable_features();
|
||||||
for granular_flag in crate::UNSTABLE_GRANULAR_FLAGS {
|
for granular_flag in crate::UNSTABLE_GRANULAR_FLAGS {
|
||||||
if unstable_features.contains(&granular_flag.name.to_string()) {
|
if unstable_features.contains(&granular_flag.name.to_string()) {
|
||||||
|
|
12
cli/main.rs
12
cli/main.rs
|
@ -417,18 +417,6 @@ pub(crate) fn unstable_exit_cb(feature: &str, api_name: &str) {
|
||||||
std::process::exit(70);
|
std::process::exit(70);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(bartlomieju): remove when `--unstable` flag is removed.
|
|
||||||
#[allow(clippy::print_stderr)]
|
|
||||||
pub(crate) fn unstable_warn_cb(feature: &str, api_name: &str) {
|
|
||||||
eprintln!(
|
|
||||||
"⚠️ {}",
|
|
||||||
colors::yellow(format!(
|
|
||||||
"The `{}` API was used with `--unstable` flag. The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-{}` instead.\nLearn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags",
|
|
||||||
api_name, feature
|
|
||||||
))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
setup_panic_hook();
|
setup_panic_hook();
|
||||||
|
|
||||||
|
|
|
@ -50,12 +50,9 @@ pub fn op_broadcast_subscribe<BC>(
|
||||||
where
|
where
|
||||||
BC: BroadcastChannel + 'static,
|
BC: BroadcastChannel + 'static,
|
||||||
{
|
{
|
||||||
// TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
|
state
|
||||||
// once we phase out `check_or_exit_with_legacy_fallback`
|
.feature_checker
|
||||||
state.feature_checker.check_or_exit_with_legacy_fallback(
|
.check_or_exit(UNSTABLE_FEATURE_NAME, "BroadcastChannel");
|
||||||
UNSTABLE_FEATURE_NAME,
|
|
||||||
"BroadcastChannel",
|
|
||||||
);
|
|
||||||
let bc = state.borrow::<BC>();
|
let bc = state.borrow::<BC>();
|
||||||
let resource = bc.subscribe()?;
|
let resource = bc.subscribe()?;
|
||||||
Ok(state.resource_table.add(resource))
|
Ok(state.resource_table.add(resource))
|
||||||
|
|
|
@ -62,11 +62,9 @@ where
|
||||||
{
|
{
|
||||||
let cron_handler = {
|
let cron_handler = {
|
||||||
let state = state.borrow();
|
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
|
state
|
||||||
.feature_checker
|
.feature_checker
|
||||||
.check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, "Deno.cron");
|
.check_or_exit(UNSTABLE_FEATURE_NAME, "Deno.cron");
|
||||||
state.borrow::<Rc<C>>().clone()
|
state.borrow::<Rc<C>>().clone()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -129,11 +129,9 @@ where
|
||||||
{
|
{
|
||||||
let handler = {
|
let handler = {
|
||||||
let state = state.borrow();
|
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
|
state
|
||||||
.feature_checker
|
.feature_checker
|
||||||
.check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, "Deno.openKv");
|
.check_or_exit(UNSTABLE_FEATURE_NAME, "Deno.openKv");
|
||||||
state.borrow::<Rc<DBH>>().clone()
|
state.borrow::<Rc<DBH>>().clone()
|
||||||
};
|
};
|
||||||
let db = handler.open(state.clone(), path).await?;
|
let db = handler.open(state.clone(), path).await?;
|
||||||
|
|
|
@ -88,11 +88,9 @@ impl NetPermissions for deno_permissions::PermissionsContainer {
|
||||||
|
|
||||||
/// Helper for checking unstable features. Used for sync ops.
|
/// Helper for checking unstable features. Used for sync ops.
|
||||||
fn check_unstable(state: &OpState, api_name: &str) {
|
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
|
state
|
||||||
.feature_checker
|
.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 {
|
pub fn get_declaration() -> PathBuf {
|
||||||
|
|
|
@ -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 {
|
let mut runtime = JsRuntime::new(RuntimeOptions {
|
||||||
extensions: vec![test_ext::init_ops()],
|
extensions: vec![test_ext::init_ops()],
|
||||||
feature_checker: Some(Arc::new(feature_checker)),
|
feature_checker: Some(Arc::new(Default::default())),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,7 @@ use deno_core::OpState;
|
||||||
|
|
||||||
/// Helper for checking unstable features. Used for sync ops.
|
/// Helper for checking unstable features. Used for sync ops.
|
||||||
pub fn check_unstable(state: &OpState, feature: &str, api_name: &str) {
|
pub fn check_unstable(state: &OpState, feature: &str, api_name: &str) {
|
||||||
// TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
|
state.feature_checker.check_or_exit(feature, api_name);
|
||||||
// once we phase out `check_or_exit_with_legacy_fallback`
|
|
||||||
state
|
|
||||||
.feature_checker
|
|
||||||
.check_or_exit_with_legacy_fallback(feature, api_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TestingFeaturesEnabled(pub bool);
|
pub struct TestingFeaturesEnabled(pub bool);
|
||||||
|
|
Loading…
Reference in a new issue