From 826e42a5b5880c974ae019a7a21aade6a718062c Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 1 Nov 2024 12:27:00 -0400 Subject: fix: improved support for cjs and cts modules (#26558) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cts support * better cjs/cts type checking * deno compile cjs/cts support * More efficient detect cjs (going towards stabilization) * Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only done after loading * Support `import x = require(...);` Co-authored-by: Bartek IwaƄczuk --- cli/tools/test/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/tools/test/mod.rs') diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index e81abad0b..fa849614f 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -631,7 +631,7 @@ async fn configure_main_worker( "Deno[Deno.internal].core.setLeakTracingEnabled(true);", )?; } - let res = worker.execute_side_module_possibly_with_npm().await; + let res = worker.execute_side_module().await; let mut worker = worker.into_main_worker(); match res { Ok(()) => Ok(()), -- cgit v1.2.3 From 4e899d48cffa95617266dd8f9aef54603a87ad82 Mon Sep 17 00:00:00 2001 From: snek Date: Thu, 14 Nov 2024 13:16:28 +0100 Subject: fix: otel resiliency (#26857) Improving the breadth of collected data, and ensuring that the collected data is more likely to be successfully reported. - Use `log` crate in more places - Hook up `log` crate to otel - Switch to process-wide otel processors - Handle places that use `process::exit` Also adds a more robust testing framework, with a deterministic tracing setting. Refs: https://github.com/denoland/deno/issues/26852 --- cli/tools/test/mod.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cli/tools/test/mod.rs') diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index fa849614f..966b0d285 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -1357,6 +1357,7 @@ pub async fn report_tests( if let Err(err) = reporter.flush_report(&elapsed, &tests, &test_steps) { eprint!("Test reporter failed to flush: {}", err) } + #[allow(clippy::disallowed_methods)] std::process::exit(130); } } @@ -1642,6 +1643,7 @@ pub async fn run_tests_with_watch( loop { signal::ctrl_c().await.unwrap(); if !HAS_TEST_RUN_SIGINT_HANDLER.load(Ordering::Relaxed) { + #[allow(clippy::disallowed_methods)] std::process::exit(130); } } -- cgit v1.2.3 From abf06eb87f10ebed93b39948213dccfe086bd0fa Mon Sep 17 00:00:00 2001 From: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:59:31 +0200 Subject: feat(watch): log which file changed on HMR or watch change (#25801) Closes #25504 --- cli/tools/test/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/tools/test/mod.rs') diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index 966b0d285..6357ebcae 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -1661,6 +1661,7 @@ pub async fn run_tests_with_watch( ), move |flags, watcher_communicator, changed_paths| { let test_flags = test_flags.clone(); + watcher_communicator.show_path_changed(changed_paths.clone()); Ok(async move { let factory = CliFactory::from_flags_for_watcher( flags, -- cgit v1.2.3