diff --git a/Cargo.lock b/Cargo.lock index a0d623938b..9ebf1c5edf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -769,7 +769,7 @@ dependencies = [ [[package]] name = "deno" -version = "1.23.2" +version = "1.23.3" dependencies = [ "atty", "base64 0.13.0", @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "deno_bench_util" -version = "0.53.0" +version = "0.54.0" dependencies = [ "bencher", "deno_core", @@ -897,7 +897,7 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" -version = "0.53.0" +version = "0.54.0" dependencies = [ "async-trait", "deno_core", @@ -907,14 +907,14 @@ dependencies = [ [[package]] name = "deno_console" -version = "0.59.0" +version = "0.60.0" dependencies = [ "deno_core", ] [[package]] name = "deno_core" -version = "0.141.0" +version = "0.142.0" dependencies = [ "anyhow", "deno_ast", @@ -937,7 +937,7 @@ dependencies = [ [[package]] name = "deno_crypto" -version = "0.73.0" +version = "0.74.0" dependencies = [ "aes", "aes-gcm", @@ -1000,7 +1000,7 @@ dependencies = [ [[package]] name = "deno_fetch" -version = "0.82.0" +version = "0.83.0" dependencies = [ "bytes", "data-url", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "deno_ffi" -version = "0.46.0" +version = "0.47.0" dependencies = [ "deno_core", "dlopen", @@ -1051,7 +1051,7 @@ dependencies = [ [[package]] name = "deno_http" -version = "0.53.0" +version = "0.54.0" dependencies = [ "async-compression", "base64 0.13.0", @@ -1092,7 +1092,7 @@ dependencies = [ [[package]] name = "deno_net" -version = "0.51.0" +version = "0.52.0" dependencies = [ "deno_core", "deno_tls", @@ -1106,7 +1106,7 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.19.0" +version = "0.20.0" dependencies = [ "once_cell", "proc-macro-crate", @@ -1118,7 +1118,7 @@ dependencies = [ [[package]] name = "deno_runtime" -version = "0.67.0" +version = "0.68.0" dependencies = [ "atty", "deno_broadcast_channel", @@ -1178,7 +1178,7 @@ dependencies = [ [[package]] name = "deno_tls" -version = "0.46.0" +version = "0.47.0" dependencies = [ "deno_core", "once_cell", @@ -1192,7 +1192,7 @@ dependencies = [ [[package]] name = "deno_url" -version = "0.59.0" +version = "0.60.0" dependencies = [ "deno_bench_util", "deno_core", @@ -1204,7 +1204,7 @@ dependencies = [ [[package]] name = "deno_web" -version = "0.90.0" +version = "0.91.0" dependencies = [ "async-trait", "base64-simd", @@ -1221,7 +1221,7 @@ dependencies = [ [[package]] name = "deno_webgpu" -version = "0.60.0" +version = "0.61.0" dependencies = [ "deno_core", "serde", @@ -1232,14 +1232,14 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.59.0" +version = "0.60.0" dependencies = [ "deno_core", ] [[package]] name = "deno_websocket" -version = "0.64.0" +version = "0.65.0" dependencies = [ "deno_core", "deno_tls", @@ -1253,7 +1253,7 @@ dependencies = [ [[package]] name = "deno_webstorage" -version = "0.54.0" +version = "0.55.0" dependencies = [ "deno_core", "deno_web", @@ -3073,18 +3073,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "78203e83c48cffbe01e4a2d35d566ca4de445d79a85372fc64e378bfc812a260" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "710faf75e1b33345361201d36d04e98ac1ed8909151a017ed384700836104c74" dependencies = [ "proc-macro2 1.0.39", "quote 1.0.18", @@ -3828,7 +3828,7 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.52.0" +version = "0.53.0" dependencies = [ "bencher", "bytes", diff --git a/Releases.md b/Releases.md index 8166ca725d..1d1a175d0e 100644 --- a/Releases.md +++ b/Releases.md @@ -6,6 +6,20 @@ https://github.com/denoland/deno/releases We also have one-line install commands at: https://github.com/denoland/deno_install +### 1.23.3 / 2022.07.05 + +- Revert "refactor(snapshots): to their own crate (#14794)" (#15076) +- fix(cli): handle collecting a directory with file:// (#15002) +- fix(core): handle exception from Wasm termination (#15014) +- fix(core): remove unsafe in OpsTracker (#15025) +- fix(dts): stop default export type behavior (#14977) +- fix: update to TypeScript 4.7.4 (#15022) +- perf(ext/http): lazy load headers (#15055) +- perf(ext/http): remove accept_encoding interior mutability (#15070) +- perf(ext/http): simplify op_http_accept (#15067) +- perf(ops): fast path for SMI return values (#15033) +- perf(serde_v8): avoid extra is_array_buffer_view check (#15056) + ### 1.23.2 / 2022.06.30 - feat(unstable/ffi): thread safe callbacks (#14942) diff --git a/bench_util/Cargo.toml b/bench_util/Cargo.toml index 0b45bf82b7..e15ff7fbe8 100644 --- a/bench_util/Cargo.toml +++ b/bench_util/Cargo.toml @@ -1,7 +1,7 @@ # Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. [package] name = "deno_bench_util" -version = "0.53.0" +version = "0.54.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -15,7 +15,7 @@ path = "lib.rs" [dependencies] bencher = "0.1" -deno_core = { version = "0.141.0", path = "../core" } +deno_core = { version = "0.142.0", path = "../core" } once_cell = "1.10.0" tokio = { version = "1.19", features = ["full"] } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 094b2ce01f..41e2be4ca7 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno" -version = "1.23.2" +version = "1.23.3" authors = ["the Deno authors"] default-run = "deno" edition = "2021" @@ -25,17 +25,17 @@ harness = false path = "./bench/lsp_bench_standalone.rs" [build-dependencies] -deno_broadcast_channel = { version = "0.53.0", path = "../ext/broadcast_channel" } -deno_console = { version = "0.59.0", path = "../ext/console" } -deno_core = { version = "0.141.0", path = "../core" } -deno_crypto = { version = "0.73.0", path = "../ext/crypto" } -deno_fetch = { version = "0.82.0", path = "../ext/fetch" } -deno_net = { version = "0.51.0", path = "../ext/net" } -deno_url = { version = "0.59.0", path = "../ext/url" } -deno_web = { version = "0.90.0", path = "../ext/web" } -deno_webgpu = { version = "0.60.0", path = "../ext/webgpu" } -deno_websocket = { version = "0.64.0", path = "../ext/websocket" } -deno_webstorage = { version = "0.54.0", path = "../ext/webstorage" } +deno_broadcast_channel = { version = "0.54.0", path = "../ext/broadcast_channel" } +deno_console = { version = "0.60.0", path = "../ext/console" } +deno_core = { version = "0.142.0", path = "../core" } +deno_crypto = { version = "0.74.0", path = "../ext/crypto" } +deno_fetch = { version = "0.83.0", path = "../ext/fetch" } +deno_net = { version = "0.52.0", path = "../ext/net" } +deno_url = { version = "0.60.0", path = "../ext/url" } +deno_web = { version = "0.91.0", path = "../ext/web" } +deno_webgpu = { version = "0.61.0", path = "../ext/webgpu" } +deno_websocket = { version = "0.65.0", path = "../ext/websocket" } +deno_webstorage = { version = "0.55.0", path = "../ext/webstorage" } regex = "=1.5.6" serde = { version = "=1.0.136", features = ["derive"] } zstd = '=0.11.1' @@ -46,12 +46,12 @@ winres = "=0.1.12" [dependencies] deno_ast = { version = "0.16.0", features = ["bundler", "cjs", "codegen", "dep_graph", "module_specifier", "proposal", "react", "sourcemap", "transforms", "transpiling", "typescript", "view", "visit"] } -deno_core = { version = "0.141.0", path = "../core" } +deno_core = { version = "0.142.0", path = "../core" } deno_doc = "0.36.0" deno_emit = "0.3.0" deno_graph = "0.28.0" deno_lint = { version = "0.31.0", features = ["docs"] } -deno_runtime = { version = "0.67.0", path = "../runtime" } +deno_runtime = { version = "0.68.0", path = "../runtime" } deno_task_shell = "0.4.0" atty = "=0.2.14" @@ -82,7 +82,7 @@ notify = "=5.0.0-pre.15" once_cell = "=1.12.0" os_pipe = "=1.0.1" percent-encoding = "=2.1.0" -pin-project = "=1.0.10" +pin-project = "1.0.11" # don't pin because they yank crates from cargo rand = { version = "=0.8.5", features = ["small_rng"] } regex = "=1.5.6" ring = "=0.16.20" @@ -110,7 +110,7 @@ winapi = { version = "=0.3.9", features = ["knownfolders", "mswsock", "objbase", [dev-dependencies] csv = "1.1.6" -deno_bench_util = { version = "0.53.0", path = "../bench_util" } +deno_bench_util = { version = "0.54.0", path = "../bench_util" } dotenv = "0.15.0" flaky_test = "=0.1.0" google-storage1 = "3.1.0" diff --git a/cli/compat/mod.rs b/cli/compat/mod.rs index e0d04134f9..d3ffc9700d 100644 --- a/cli/compat/mod.rs +++ b/cli/compat/mod.rs @@ -17,7 +17,7 @@ pub use esm_resolver::NodeEsmResolver; // WARNING: Ensure this is the only deno_std version reference as this // is automatically updated by the version bump workflow. -pub(crate) static STD_URL_STR: &str = "https://deno.land/std@0.146.0/"; +pub(crate) static STD_URL_STR: &str = "https://deno.land/std@0.147.0/"; static SUPPORTED_MODULES: &[&str] = &[ "assert", diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs index 366eedd6de..d487b1396e 100644 --- a/cli/lsp/testing/execution.rs +++ b/cli/lsp/testing/execution.rs @@ -225,12 +225,6 @@ async fn test_specifier( worker.js_runtime.resolve_value(test_result).await?; - loop { - if !worker.dispatch_beforeunload_event(&located_script_name!())? { - break; - } - worker.run_event_loop(false).await?; - } worker.dispatch_unload_event(&located_script_name!())?; } diff --git a/cli/main.rs b/cli/main.rs index 18eb58ff51..7c11042d63 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -592,13 +592,7 @@ async fn eval_command( } worker.execute_main_module(&main_module).await?; worker.dispatch_load_event(&located_script_name!())?; - loop { - worker.run_event_loop(false).await?; - - if !worker.dispatch_beforeunload_event(&located_script_name!())? { - break; - } - } + worker.run_event_loop(false).await?; worker.dispatch_unload_event(&located_script_name!())?; Ok(0) } @@ -906,12 +900,7 @@ async fn run_from_stdin(flags: Flags) -> Result { } worker.execute_main_module(&main_module).await?; worker.dispatch_load_event(&located_script_name!())?; - loop { - worker.run_event_loop(false).await?; - if !worker.dispatch_beforeunload_event(&located_script_name!())? { - break; - } - } + worker.run_event_loop(false).await?; worker.dispatch_unload_event(&located_script_name!())?; Ok(worker.get_exit_code()) } @@ -950,15 +939,7 @@ async fn run_with_watch(flags: Flags, script: String) -> Result { self.worker.dispatch_load_event(&located_script_name!())?; self.pending_unload = true; - let result = loop { - let result = self.worker.run_event_loop(false).await; - if !self - .worker - .dispatch_beforeunload_event(&located_script_name!())? - { - break result; - } - }; + let result = self.worker.run_event_loop(false).await; self.pending_unload = false; if let Err(err) = result { @@ -1108,16 +1089,9 @@ async fn run_command( } worker.dispatch_load_event(&located_script_name!())?; - - loop { - worker - .run_event_loop(maybe_coverage_collector.is_none()) - .await?; - if !worker.dispatch_beforeunload_event(&located_script_name!())? { - break; - } - } - + worker + .run_event_loop(maybe_coverage_collector.is_none()) + .await?; worker.dispatch_unload_event(&located_script_name!())?; if let Some(coverage_collector) = maybe_coverage_collector.as_mut() { diff --git a/cli/standalone.rs b/cli/standalone.rs index cd5390d2de..13c42ba08f 100644 --- a/cli/standalone.rs +++ b/cli/standalone.rs @@ -311,14 +311,7 @@ pub async fn run( ); worker.execute_main_module(main_module).await?; worker.dispatch_load_event(&located_script_name!())?; - - loop { - worker.run_event_loop(false).await?; - if !worker.dispatch_beforeunload_event(&located_script_name!())? { - break; - } - } - + worker.run_event_loop(true).await?; worker.dispatch_unload_event(&located_script_name!())?; std::process::exit(0); } diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 1cd1db0ef6..bd27cd8ddb 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -249,12 +249,6 @@ itest!(webstorage_serialization { output: "webstorage/serialization.ts.out", }); -// tests the beforeunload event -itest!(beforeunload_event { - args: "run before_unload.js", - output: "before_unload.js.out", -}); - // tests to ensure that when `--location` is set, all code shares the same // localStorage cache based on the origin of the location URL. #[test] diff --git a/cli/tools/bench.rs b/cli/tools/bench.rs index 3946435dfd..ba40f93482 100644 --- a/cli/tools/bench.rs +++ b/cli/tools/bench.rs @@ -402,12 +402,6 @@ async fn bench_specifier( worker.js_runtime.resolve_value(bench_result).await?; - loop { - if !worker.dispatch_beforeunload_event(&located_script_name!())? { - break; - } - worker.run_event_loop(false).await?; - } worker.dispatch_unload_event(&located_script_name!())?; Ok(()) diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 5586026ccc..333d14f2e0 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -816,13 +816,6 @@ async fn test_specifier( worker.js_runtime.resolve_value(test_result).await?; - loop { - if !worker.dispatch_beforeunload_event(&located_script_name!())? { - break; - } - worker.run_event_loop(false).await?; - } - worker.dispatch_unload_event(&located_script_name!())?; if let Some(coverage_collector) = maybe_coverage_collector.as_mut() { diff --git a/core/01_core.js b/core/01_core.js index 1563003274..9337c02314 100644 --- a/core/01_core.js +++ b/core/01_core.js @@ -267,7 +267,6 @@ destructureError: opSync.bind(null, "op_destructure_error"), terminate: opSync.bind(null, "op_terminate"), opNames: opSync.bind(null, "op_op_names"), - eventLoopHasMoreWork: opSync.bind(null, "op_event_loop_has_more_work"), }); ObjectAssign(globalThis.__bootstrap, { core }); diff --git a/core/Cargo.toml b/core/Cargo.toml index 4788ed1cad..06072da697 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,7 +1,7 @@ # Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. [package] name = "deno_core" -version = "0.141.0" +version = "0.142.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,17 +14,17 @@ path = "lib.rs" [dependencies] anyhow = "1.0.57" -deno_ops = { path = "../ops", version = "0.19.0" } +deno_ops = { path = "../ops", version = "0.20.0" } futures = "0.3.21" indexmap = "1.8.1" libc = "0.2.126" log = "0.4.16" once_cell = "1.10.0" parking_lot = "0.12.0" -pin-project = "1.0.10" +pin-project = "1.0.11" serde = { version = "1.0.136", features = ["derive"] } serde_json = { version = "1.0.79", features = ["preserve_order"] } -serde_v8 = { version = "0.52.0", path = "../serde_v8" } +serde_v8 = { version = "0.53.0", path = "../serde_v8" } sourcemap = "=6.0.1" url = { version = "2.2.2", features = ["serde"] } v8 = "0.44.3" diff --git a/core/ops_builtin_v8.rs b/core/ops_builtin_v8.rs index 4bc80faa55..7f0c58212b 100644 --- a/core/ops_builtin_v8.rs +++ b/core/ops_builtin_v8.rs @@ -47,7 +47,6 @@ pub(crate) fn init_builtins_v8() -> Vec { op_op_names::decl(), op_apply_source_map::decl(), op_set_format_exception_callback::decl(), - op_event_loop_has_more_work::decl(), ] } @@ -787,26 +786,3 @@ fn op_set_format_exception_callback<'a>( let old = old.map(|v| v8::Local::new(scope, v)); Ok(old.map(|v| from_v8(scope, v.into()).unwrap())) } - -#[op(v8)] -fn op_event_loop_has_more_work(scope: &mut v8::HandleScope) -> bool { - let state_rc = JsRuntime::state(scope); - let module_map_rc = JsRuntime::module_map(scope); - let state = state_rc.borrow_mut(); - let module_map = module_map_rc.borrow(); - - let has_pending_refed_ops = state.pending_ops.len() > state.unrefed_ops.len(); - let has_pending_dyn_imports = module_map.has_pending_dynamic_imports(); - let has_pending_dyn_module_evaluation = - !state.pending_dyn_mod_evaluate.is_empty(); - let has_pending_module_evaluation = state.pending_mod_evaluate.is_some(); - let has_pending_background_tasks = scope.has_pending_background_tasks(); - let has_tick_scheduled = state.has_tick_scheduled; - - has_pending_refed_ops - || has_pending_dyn_imports - || has_pending_dyn_module_evaluation - || has_pending_module_evaluation - || has_pending_background_tasks - || has_tick_scheduled -} diff --git a/core/runtime.rs b/core/runtime.rs index 4a2f59f488..26538d1c16 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -90,14 +90,14 @@ pub struct JsRuntime { event_loop_middlewares: Vec>, } -pub(crate) struct DynImportModEvaluate { +struct DynImportModEvaluate { load_id: ModuleLoadId, module_id: ModuleId, promise: v8::Global, module: v8::Global, } -pub(crate) struct ModEvaluate { +struct ModEvaluate { promise: v8::Global, sender: oneshot::Sender>, } @@ -158,8 +158,8 @@ pub(crate) struct JsRuntimeState { pub(crate) js_wasm_streaming_cb: Option>, pub(crate) pending_promise_exceptions: HashMap, v8::Global>, - pub(crate) pending_dyn_mod_evaluate: Vec, - pub(crate) pending_mod_evaluate: Option, + pending_dyn_mod_evaluate: Vec, + pending_mod_evaluate: Option, /// A counter used to delay our dynamic import deadlock detection by one spin /// of the event loop. dyn_module_evaluate_idle_counter: u32, @@ -1027,30 +1027,6 @@ Pending dynamic modules:\n".to_string(); Poll::Pending } - - pub fn event_loop_has_work(&mut self) -> bool { - let state_rc = Self::state(self.v8_isolate()); - let module_map_rc = Self::module_map(self.v8_isolate()); - let state = state_rc.borrow_mut(); - let module_map = module_map_rc.borrow(); - - let has_pending_refed_ops = - state.pending_ops.len() > state.unrefed_ops.len(); - let has_pending_dyn_imports = module_map.has_pending_dynamic_imports(); - let has_pending_dyn_module_evaluation = - !state.pending_dyn_mod_evaluate.is_empty(); - let has_pending_module_evaluation = state.pending_mod_evaluate.is_some(); - let has_pending_background_tasks = - self.v8_isolate().has_pending_background_tasks(); - let has_tick_scheduled = state.has_tick_scheduled; - - has_pending_refed_ops - || has_pending_dyn_imports - || has_pending_dyn_module_evaluation - || has_pending_module_evaluation - || has_pending_background_tasks - || has_tick_scheduled - } } extern "C" fn near_heap_limit_callback( diff --git a/ext/broadcast_channel/Cargo.toml b/ext/broadcast_channel/Cargo.toml index 20001c46d4..8943f70e95 100644 --- a/ext/broadcast_channel/Cargo.toml +++ b/ext/broadcast_channel/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_broadcast_channel" -version = "0.53.0" +version = "0.54.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -15,6 +15,6 @@ path = "lib.rs" [dependencies] async-trait = "0.1" -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } tokio = { version = "1.17", features = ["full"] } uuid = { version = "1.0.0", features = ["v4"] } diff --git a/ext/console/Cargo.toml b/ext/console/Cargo.toml index 77b0f333c5..27a74c03f6 100644 --- a/ext/console/Cargo.toml +++ b/ext/console/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_console" -version = "0.59.0" +version = "0.60.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,4 +14,4 @@ description = "Implementation of Console API for Deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } diff --git a/ext/crypto/Cargo.toml b/ext/crypto/Cargo.toml index bf399d76f2..11506d0660 100644 --- a/ext/crypto/Cargo.toml +++ b/ext/crypto/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_crypto" -version = "0.73.0" +version = "0.74.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -17,15 +17,15 @@ path = "lib.rs" aes = "0.8.1" # TODO(@littledivy): Move to stable release # https://github.com/RustCrypto/AEADs/issues/411 -aes-gcm = "0.10.0-pre" +aes-gcm = "=0.10.0-pre" aes-kw = { version = "0.2.1", features = ["alloc"] } base64 = "0.13.0" block-modes = "0.9.1" cbc = { version = "0.1.2", features = ["alloc"] } const-oid = "0.9.0" ctr = "0.9.1" -deno_core = { version = "0.141.0", path = "../../core" } -deno_web = { version = "0.90.0", path = "../web" } +deno_core = { version = "0.142.0", path = "../../core" } +deno_web = { version = "0.91.0", path = "../web" } elliptic-curve = { version = "0.12.1", features = ["std", "pem"] } num-traits = "0.2.14" once_cell = "1.10.0" diff --git a/ext/fetch/Cargo.toml b/ext/fetch/Cargo.toml index d8acebb1ae..6d78cf2ac9 100644 --- a/ext/fetch/Cargo.toml +++ b/ext/fetch/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_fetch" -version = "0.82.0" +version = "0.83.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -16,8 +16,8 @@ path = "lib.rs" [dependencies] bytes = "1.1.0" data-url = "0.1.1" -deno_core = { version = "0.141.0", path = "../../core" } -deno_tls = { version = "0.46.0", path = "../tls" } +deno_core = { version = "0.142.0", path = "../../core" } +deno_tls = { version = "0.47.0", path = "../tls" } dyn-clone = "1" http = "0.2.6" reqwest = { version = "0.11.11", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] } diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml index 41d2836a8d..964d937238 100644 --- a/ext/ffi/Cargo.toml +++ b/ext/ffi/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_ffi" -version = "0.46.0" +version = "0.47.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,7 +14,7 @@ description = "Dynamic library ffi for deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } dlopen = "0.1.8" libffi = "3.0.0" serde = { version = "1.0.129", features = ["derive"] } diff --git a/ext/http/Cargo.toml b/ext/http/Cargo.toml index 14cf5a9e23..84d1d716de 100644 --- a/ext/http/Cargo.toml +++ b/ext/http/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_http" -version = "0.53.0" +version = "0.54.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -23,8 +23,8 @@ base64 = "0.13.0" brotli = "3.3.4" bytes = "1" cache_control = "0.2.0" -deno_core = { version = "0.141.0", path = "../../core" } -deno_websocket = { version = "0.64.0", path = "../websocket" } +deno_core = { version = "0.142.0", path = "../../core" } +deno_websocket = { version = "0.65.0", path = "../websocket" } flate2 = "1.0.23" fly-accept-encoding = "0.2.0" hyper = { version = "0.14.18", features = ["server", "stream", "http1", "http2", "runtime"] } diff --git a/ext/net/Cargo.toml b/ext/net/Cargo.toml index 5f1f948292..34ac37dd69 100644 --- a/ext/net/Cargo.toml +++ b/ext/net/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_net" -version = "0.51.0" +version = "0.52.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,8 +14,8 @@ description = "Networking for Deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } -deno_tls = { version = "0.46.0", path = "../tls" } +deno_core = { version = "0.142.0", path = "../../core" } +deno_tls = { version = "0.47.0", path = "../tls" } log = "0.4.16" serde = { version = "1.0.136", features = ["derive"] } socket2 = "0.4.4" diff --git a/ext/tls/Cargo.toml b/ext/tls/Cargo.toml index 422ee0020e..5b17b610b3 100644 --- a/ext/tls/Cargo.toml +++ b/ext/tls/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_tls" -version = "0.46.0" +version = "0.47.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,7 +14,7 @@ description = "TLS for Deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } once_cell = "1.10.0" rustls = { version = "0.20.5", features = ["dangerous_configuration"] } rustls-native-certs = "0.6.2" diff --git a/ext/url/Cargo.toml b/ext/url/Cargo.toml index 829d87da6a..63f98e6920 100644 --- a/ext/url/Cargo.toml +++ b/ext/url/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_url" -version = "0.59.0" +version = "0.60.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,14 +14,14 @@ description = "URL API implementation for Deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } serde = { version = "1.0.136", features = ["derive"] } serde_repr = "0.1.7" urlpattern = "0.2.0" [dev-dependencies] -deno_bench_util = { version = "0.53.0", path = "../../bench_util" } -deno_webidl = { version = "0.59.0", path = "../webidl" } +deno_bench_util = { version = "0.54.0", path = "../../bench_util" } +deno_webidl = { version = "0.60.0", path = "../webidl" } [[bench]] name = "url_ops" diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml index 20f592d221..805f9945f3 100644 --- a/ext/web/Cargo.toml +++ b/ext/web/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_web" -version = "0.90.0" +version = "0.91.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -16,7 +16,7 @@ path = "lib.rs" [dependencies] async-trait = "0.1.51" base64-simd = "0.6.2" -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } encoding_rs = "0.8.31" flate2 = "1" serde = "1.0.136" @@ -24,9 +24,9 @@ tokio = { version = "1.17", features = ["full"] } uuid = { version = "1.0.0", features = ["v4", "serde"] } [dev-dependencies] -deno_bench_util = { version = "0.53.0", path = "../../bench_util" } -deno_url = { version = "0.59.0", path = "../url" } -deno_webidl = { version = "0.59.0", path = "../webidl" } +deno_bench_util = { version = "0.54.0", path = "../../bench_util" } +deno_url = { version = "0.60.0", path = "../url" } +deno_webidl = { version = "0.60.0", path = "../webidl" } [[bench]] name = "encoding" diff --git a/ext/webgpu/Cargo.toml b/ext/webgpu/Cargo.toml index bbf17aa851..3a67af9b5a 100644 --- a/ext/webgpu/Cargo.toml +++ b/ext/webgpu/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webgpu" -version = "0.60.0" +version = "0.61.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -11,7 +11,7 @@ repository = "https://github.com/gfx-rs/wgpu" description = "WebGPU implementation for Deno" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } serde = { version = "1.0", features = ["derive"] } tokio = { version = "1.17", features = ["full"] } wgpu-core = { version = "0.12", features = ["trace", "replay", "serde"] } diff --git a/ext/webidl/Cargo.toml b/ext/webidl/Cargo.toml index 41518e643e..eca98d81d7 100644 --- a/ext/webidl/Cargo.toml +++ b/ext/webidl/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webidl" -version = "0.59.0" +version = "0.60.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,4 +14,4 @@ description = "WebIDL implementation for Deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } +deno_core = { version = "0.142.0", path = "../../core" } diff --git a/ext/websocket/Cargo.toml b/ext/websocket/Cargo.toml index 082b95f031..4f37f4cd17 100644 --- a/ext/websocket/Cargo.toml +++ b/ext/websocket/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_websocket" -version = "0.64.0" +version = "0.65.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,8 +14,8 @@ description = "Implementation of WebSocket API for Deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } -deno_tls = { version = "0.46.0", path = "../tls" } +deno_core = { version = "0.142.0", path = "../../core" } +deno_tls = { version = "0.47.0", path = "../tls" } http = "0.2.6" hyper = { version = "0.14.18" } serde = { version = "1.0.136", features = ["derive"] } diff --git a/ext/webstorage/Cargo.toml b/ext/webstorage/Cargo.toml index a830ca091e..98c3ca3e68 100644 --- a/ext/webstorage/Cargo.toml +++ b/ext/webstorage/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_webstorage" -version = "0.54.0" +version = "0.55.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -14,7 +14,7 @@ description = "Implementation of WebStorage API for Deno" path = "lib.rs" [dependencies] -deno_core = { version = "0.141.0", path = "../../core" } -deno_web = { version = "0.90.0", path = "../web" } +deno_core = { version = "0.142.0", path = "../../core" } +deno_web = { version = "0.91.0", path = "../web" } rusqlite = { version = "0.27.0", features = ["unlock_notify", "bundled"] } serde = { version = "1.0.136", features = ["derive"] } diff --git a/ops/Cargo.toml b/ops/Cargo.toml index ba0949a2a1..e486efc77d 100644 --- a/ops/Cargo.toml +++ b/ops/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deno_ops" -version = "0.19.0" +version = "0.20.0" edition = "2021" license = "MIT" readme = "README.md" diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index fe50f9f1cc..d06e453006 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "deno_runtime" -version = "0.67.0" +version = "0.68.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" @@ -22,21 +22,21 @@ name = "hello_runtime" path = "examples/hello_runtime.rs" [build-dependencies] -deno_broadcast_channel = { version = "0.53.0", path = "../ext/broadcast_channel" } -deno_console = { version = "0.59.0", path = "../ext/console" } -deno_core = { version = "0.141.0", path = "../core" } -deno_crypto = { version = "0.73.0", path = "../ext/crypto" } -deno_fetch = { version = "0.82.0", path = "../ext/fetch" } -deno_ffi = { version = "0.46.0", path = "../ext/ffi" } -deno_http = { version = "0.53.0", path = "../ext/http" } -deno_net = { version = "0.51.0", path = "../ext/net" } -deno_tls = { version = "0.46.0", path = "../ext/tls" } -deno_url = { version = "0.59.0", path = "../ext/url" } -deno_web = { version = "0.90.0", path = "../ext/web" } -deno_webgpu = { version = "0.60.0", path = "../ext/webgpu" } -deno_webidl = { version = "0.59.0", path = "../ext/webidl" } -deno_websocket = { version = "0.64.0", path = "../ext/websocket" } -deno_webstorage = { version = "0.54.0", path = "../ext/webstorage" } +deno_broadcast_channel = { version = "0.54.0", path = "../ext/broadcast_channel" } +deno_console = { version = "0.60.0", path = "../ext/console" } +deno_core = { version = "0.142.0", path = "../core" } +deno_crypto = { version = "0.74.0", path = "../ext/crypto" } +deno_fetch = { version = "0.83.0", path = "../ext/fetch" } +deno_ffi = { version = "0.47.0", path = "../ext/ffi" } +deno_http = { version = "0.54.0", path = "../ext/http" } +deno_net = { version = "0.52.0", path = "../ext/net" } +deno_tls = { version = "0.47.0", path = "../ext/tls" } +deno_url = { version = "0.60.0", path = "../ext/url" } +deno_web = { version = "0.91.0", path = "../ext/web" } +deno_webgpu = { version = "0.61.0", path = "../ext/webgpu" } +deno_webidl = { version = "0.60.0", path = "../ext/webidl" } +deno_websocket = { version = "0.65.0", path = "../ext/websocket" } +deno_webstorage = { version = "0.55.0", path = "../ext/webstorage" } lzzzz = '1.0' @@ -45,21 +45,21 @@ winres = "0.1.11" winapi = "0.3.9" [dependencies] -deno_broadcast_channel = { version = "0.53.0", path = "../ext/broadcast_channel" } -deno_console = { version = "0.59.0", path = "../ext/console" } -deno_core = { version = "0.141.0", path = "../core" } -deno_crypto = { version = "0.73.0", path = "../ext/crypto" } -deno_fetch = { version = "0.82.0", path = "../ext/fetch" } -deno_ffi = { version = "0.46.0", path = "../ext/ffi" } -deno_http = { version = "0.53.0", path = "../ext/http" } -deno_net = { version = "0.51.0", path = "../ext/net" } -deno_tls = { version = "0.46.0", path = "../ext/tls" } -deno_url = { version = "0.59.0", path = "../ext/url" } -deno_web = { version = "0.90.0", path = "../ext/web" } -deno_webgpu = { version = "0.60.0", path = "../ext/webgpu" } -deno_webidl = { version = "0.59.0", path = "../ext/webidl" } -deno_websocket = { version = "0.64.0", path = "../ext/websocket" } -deno_webstorage = { version = "0.54.0", path = "../ext/webstorage" } +deno_broadcast_channel = { version = "0.54.0", path = "../ext/broadcast_channel" } +deno_console = { version = "0.60.0", path = "../ext/console" } +deno_core = { version = "0.142.0", path = "../core" } +deno_crypto = { version = "0.74.0", path = "../ext/crypto" } +deno_fetch = { version = "0.83.0", path = "../ext/fetch" } +deno_ffi = { version = "0.47.0", path = "../ext/ffi" } +deno_http = { version = "0.54.0", path = "../ext/http" } +deno_net = { version = "0.52.0", path = "../ext/net" } +deno_tls = { version = "0.47.0", path = "../ext/tls" } +deno_url = { version = "0.60.0", path = "../ext/url" } +deno_web = { version = "0.91.0", path = "../ext/web" } +deno_webgpu = { version = "0.61.0", path = "../ext/webgpu" } +deno_webidl = { version = "0.60.0", path = "../ext/webidl" } +deno_websocket = { version = "0.65.0", path = "../ext/websocket" } +deno_webstorage = { version = "0.55.0", path = "../ext/webstorage" } atty = "0.2.14" dlopen = "0.1.8" diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index c13faa9362..1d046d1618 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -583,7 +583,6 @@ delete Intl.v8BreakIterator; defineEventHandler(window, "error"); defineEventHandler(window, "load"); - defineEventHandler(window, "beforeunload"); defineEventHandler(window, "unload"); const isUnloadDispatched = SymbolFor("isUnloadDispatched"); // Stores the flag for checking whether unload is dispatched or not. diff --git a/runtime/worker.rs b/runtime/worker.rs index 5100f42da1..f2b22ce507 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -368,24 +368,6 @@ impl MainWorker { "dispatchEvent(new Event('unload'))", ) } - - /// Dispatches "beforeunload" event to the JavaScript runtime. Returns a boolean - /// indicating if the event was prevented and thus event loop should continue - /// running. - pub fn dispatch_beforeunload_event( - &mut self, - script_name: &str, - ) -> Result { - let value = self.js_runtime.execute_script( - script_name, - // NOTE(@bartlomieju): not using `globalThis` here, because user might delete - // it. Instead we're using global `dispatchEvent` function which will - // used a saved reference to global scope. - "dispatchEvent(new Event('beforeunload', { cancelable: true }));", - )?; - let local_value = value.open(&mut self.js_runtime.handle_scope()); - Ok(local_value.is_false()) - } } #[cfg(test)] diff --git a/serde_v8/Cargo.toml b/serde_v8/Cargo.toml index 7794e7ff73..7afa9c3cdc 100644 --- a/serde_v8/Cargo.toml +++ b/serde_v8/Cargo.toml @@ -1,7 +1,7 @@ # Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. [package] name = "serde_v8" -version = "0.52.0" +version = "0.53.0" authors = ["the Deno authors"] edition = "2021" license = "MIT" diff --git a/tools/release/04_post_publish.ts b/tools/release/04_post_publish.ts index 75bc19925d..4555b445ed 100755 --- a/tools/release/04_post_publish.ts +++ b/tools/release/04_post_publish.ts @@ -55,7 +55,8 @@ async function forwardReleaseCommitToMain() { await repo.runCommand([ "git", "cherry-pick", - "-Xpatience", + "--strategy-option", + "theirs", releaseCommitHash, ]); await repo.gitPush("origin", newBranchName);