refactor: move denort to separate crate (#27688)

This slightly degrades the performance of CJS export analysis on
subsequent runs because I changed it to no longer cache in the DENO_DIR
with this PR (denort now properly has no idea about the DENO_DIR). We'll
have to change it to embed this data in the binary and that will also
allow us to get rid of swc in denort (will do that in a follow-up PR).
This commit is contained in:
David Sherret 2025-01-17 15:39:29 -05:00 committed by GitHub
parent 054075730c
commit 57dd66ec3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
112 changed files with 5696 additions and 5500 deletions

View file

@ -14,6 +14,7 @@ use deno_core::error::CoreError;
use deno_core::futures::Future;
use deno_core::futures::FutureExt;
use deno_core::parking_lot::Mutex;
use deno_lib::util::result::any_and_jserrorbox_downcast_ref;
use deno_runtime::fmt_errors::format_js_error;
use log::info;
use notify::event::Event as NotifyEvent;
@ -82,13 +83,11 @@ where
{
let result = watch_future.await;
if let Err(err) = result {
let error_string =
match crate::util::result::any_and_jserrorbox_downcast_ref::<CoreError>(
&err,
) {
Some(CoreError::Js(e)) => format_js_error(e),
_ => format!("{err:?}"),
};
let error_string = match any_and_jserrorbox_downcast_ref::<CoreError>(&err)
{
Some(CoreError::Js(e)) => format_js_error(e),
_ => format!("{err:?}"),
};
log::error!(
"{}: {}",
colors::red_bold("error"),