diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-03-05 01:17:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 01:17:39 +0000 |
commit | d9fa2dd5505a773ac2c8eb6ca2a8bbd237aca35d (patch) | |
tree | ec5b0008f8095d3c03e6af31685ed99569163dd9 /cli | |
parent | 0022c35a237773b50a771b0fef48cac734f7a9d6 (diff) |
chore: upgrade deno_core (#22699)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/build.rs | 1 | ||||
-rw-r--r-- | cli/js.rs | 2 | ||||
-rw-r--r-- | cli/lsp/tsc.rs | 4 | ||||
-rw-r--r-- | cli/tsc/mod.rs | 4 | ||||
-rw-r--r-- | cli/worker.rs | 9 |
5 files changed, 9 insertions, 11 deletions
diff --git a/cli/build.rs b/cli/build.rs index 0a599b03b..8dc3dcb75 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -276,6 +276,7 @@ mod ts { build_libs, path_dts, )], + extension_transpiler: None, with_runtime_cb: None, skip_op_registration: false, }, @@ -29,7 +29,7 @@ mod tests { ..Default::default() }); js_runtime - .execute_script_static( + .execute_script( "<anon>", r#" if (!(bootstrap.mainRuntime && bootstrap.workerRuntime)) { diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 138640d7f..ce848c210 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4186,7 +4186,7 @@ fn start_tsc(runtime: &mut JsRuntime, debug: bool) -> Result<(), AnyError> { let init_config = json!({ "debug": debug }); let init_src = format!("globalThis.serverInit({init_config});"); - runtime.execute_script(located_script_name!(), init_src.into())?; + runtime.execute_script(located_script_name!(), init_src)?; Ok(()) } @@ -4564,7 +4564,7 @@ fn request( "globalThis.serverRequest({id}, \"{}\", {});", request.method, &request.args ); - runtime.execute_script(located_script_name!(), request_src.into())?; + runtime.execute_script(located_script_name!(), request_src)?; let op_state = runtime.op_state(); let mut op_state = op_state.borrow_mut(); diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index e2e11e440..4961d1ed9 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -848,7 +848,7 @@ pub fn exec(request: Request) -> Result<Response, AnyError> { "rootNames": root_names, "localOnly": request.check_mode == TypeCheckMode::Local, }); - let exec_source = format!("globalThis.exec({request_value})").into(); + let exec_source = format!("globalThis.exec({request_value})"); let mut runtime = JsRuntime::new(RuntimeOptions { startup_snapshot: Some(compiler_snapshot()), @@ -1007,7 +1007,7 @@ mod tests { ..Default::default() }); js_runtime - .execute_script_static( + .execute_script( "<anon>", r#" if (!(globalThis.exec)) { diff --git a/cli/worker.rs b/cli/worker.rs index 302303f28..47658e594 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -397,10 +397,7 @@ impl CliMainWorker { name: &'static str, source_code: &'static str, ) -> Result<v8::Global<v8::Value>, AnyError> { - self - .worker - .js_runtime - .execute_script_static(name, source_code) + self.worker.js_runtime.execute_script(name, source_code) } } @@ -656,9 +653,9 @@ impl CliMainWorkerFactory { if self.shared.subcommand.needs_test() { macro_rules! test_file { ($($file:literal),*) => { - $(worker.js_runtime.lazy_load_es_module_from_code( + $(worker.js_runtime.lazy_load_es_module_with_code( concat!("ext:cli/", $file), - deno_core::FastString::StaticAscii(include_str!(concat!("js/", $file))), + deno_core::ascii_str_include!(concat!("js/", $file)), )?;)* } } |