From 13d5c6420e3fe7f34e7c02a96922fe8db381503e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 23 Jan 2024 22:56:56 +0100 Subject: [PATCH] chore: upgrade deno_core to 0.249.0 (#22058) --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- cli/tsc/mod.rs | 33 +++++++++++++++++++-------------- runtime/ops/os/mod.rs | 32 ++++++++++++++++++++++---------- 4 files changed, 50 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e46621346f..879ae2cc40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1196,9 +1196,9 @@ dependencies = [ [[package]] name = "deno_core" -version = "0.248.0" +version = "0.249.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "974d075b6647aa6cca14ea75c3833f8996b1c3e487adcde490977f21ac14e27e" +checksum = "02ed91e4f3a224de2a6d73211a5462e66c4394472873506a58e2c5377cf7105f" dependencies = [ "anyhow", "bit-set", @@ -1646,9 +1646,9 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.124.0" +version = "0.125.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1bc46bc85a26530e196a5f675dab6e06fb86b9104dc6fdc31cfc9ae1832d911" +checksum = "adc649e55c4fcd40b247dd1abdff2681e3b5c6331a6ab8d7900d885cd486a7c3" dependencies = [ "proc-macro-rules", "proc-macro2", @@ -5350,9 +5350,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.157.0" +version = "0.158.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8853e607c700ade0acb853aafda7e4cc1f752f4ebb35b0e2ecbf42e784e6d0e0" +checksum = "3035399dd0135f3c1a02e5fedd72d1c417dd3cd3107789ef9e3a4f657de4dd1d" dependencies = [ "bytes", "derive_more", @@ -7074,7 +7074,7 @@ dependencies = [ "codespan-reporting", "log", "naga", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "profiling", "raw-window-handle", "ron", @@ -7115,7 +7115,7 @@ dependencies = [ "naga", "objc", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "profiling", "range-alloc", "raw-window-handle", diff --git a/Cargo.toml b/Cargo.toml index 7486370898..48137ad074 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "0.32.0", features = ["transpiling"] } -deno_core = { version = "0.248.0" } +deno_core = { version = "0.249.0" } deno_runtime = { version = "0.140.0", path = "./runtime" } napi_sym = { version = "0.62.0", path = "./cli/napi/sym" } diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index 4c7101d5cb..db5d80a1f6 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -115,7 +115,17 @@ pub fn get_types_declaration_file_text() -> String { } fn get_asset_texts_from_new_runtime() -> Result, AnyError> { - deno_core::extension!(deno_cli_tsc, ops_fn = deno_ops); + deno_core::extension!( + deno_cli_tsc, + ops = [ + op_create_hash, + op_emit, + op_is_node_file, + op_load, + op_resolve, + op_respond, + ] + ); // the assets are stored within the typescript isolate, so take them out of there let mut runtime = JsRuntime::new(RuntimeOptions { @@ -805,7 +815,14 @@ pub fn exec(request: Request) -> Result { .collect(); deno_core::extension!(deno_cli_tsc, - ops_fn = deno_ops, + ops = [ + op_create_hash, + op_emit, + op_is_node_file, + op_load, + op_resolve, + op_respond, + ], options = { request: Request, root_map: HashMap, @@ -865,18 +882,6 @@ pub fn exec(request: Request) -> Result { } } -deno_core::ops!( - deno_ops, - [ - op_create_hash, - op_emit, - op_is_node_file, - op_load, - op_resolve, - op_respond, - ] -); - #[cfg(test)] mod tests { use super::Diagnostic; diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs index 7260308d53..de9792a454 100644 --- a/runtime/ops/os/mod.rs +++ b/runtime/ops/os/mod.rs @@ -17,9 +17,9 @@ use std::env; mod sys_info; -deno_core::ops!( - deno_ops, - [ +deno_core::extension!( + deno_os, + ops = [ op_env, op_exec_path, op_exit, @@ -36,12 +36,7 @@ deno_core::ops!( op_system_memory_info, op_uid, op_runtime_memory_usage, - ] -); - -deno_core::extension!( - deno_os, - ops_fn = deno_ops, + ], options = { exit_code: ExitCode, }, @@ -52,7 +47,24 @@ deno_core::extension!( deno_core::extension!( deno_os_worker, - ops_fn = deno_ops, + ops = [ + op_env, + op_exec_path, + op_exit, + op_delete_env, + op_get_env, + op_gid, + op_hostname, + op_loadavg, + op_network_interfaces, + op_os_release, + op_os_uptime, + op_set_env, + op_set_exit_code, + op_system_memory_info, + op_uid, + op_runtime_memory_usage, + ], middleware = |op| match op.name { "op_exit" | "op_set_exit_code" => op.with_implementation_from(&deno_core::op_void_sync::DECL),