From cd53ab5427811bddbed1c30d3733e1df87bb23f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 20 Mar 2023 14:05:13 -0400 Subject: refactor(ext/node): untangle dependencies between js files (#18284) Moving some code around in `ext/node` is it's a bit better well defined and makes it possible for others to embed it. I expect to see no difference in startup perf with this change. --- runtime/build.rs | 3 +-- runtime/web_worker.rs | 3 +-- runtime/worker.rs | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'runtime') diff --git a/runtime/build.rs b/runtime/build.rs index e655856b5..346dbe439 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -296,8 +296,7 @@ mod startup_snapshot { runtime::init_ops_and_esm(), // FIXME(bartlomieju): these extensions are specified last, because they // depend on `runtime`, even though it should be other way around - deno_node::deno_node_loading::init_ops_and_esm::(None), - deno_node::deno_node::init_ops_and_esm(), + deno_node::deno_node::init_ops_and_esm::(None), #[cfg(not(feature = "snapshot_from_snapshot"))] runtime_main::init_ops_and_esm(), ]; diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 1a8d02a1d..c6fbb8370 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -435,10 +435,9 @@ impl WebWorker { deno_io::deno_io::init_ops(Some(options.stdio)), deno_fs::deno_fs::init_ops::(unstable), deno_flash::deno_flash::init_ops::(unstable), - deno_node::deno_node_loading::init_ops::( + deno_node::deno_node::init_ops::( options.npm_resolver, ), - deno_node::deno_node::init_ops(), // Runtime ops that are always initialized for WebWorkers ops::web_worker::deno_web_worker::init_ops(), ops::runtime::deno_runtime::init_ops(main_module.clone()), diff --git a/runtime/worker.rs b/runtime/worker.rs index ed3478ff0..a995861c5 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -257,10 +257,9 @@ impl MainWorker { deno_io::deno_io::init_ops(Some(options.stdio)), deno_fs::deno_fs::init_ops::(unstable), deno_flash::deno_flash::init_ops::(unstable), - deno_node::deno_node_loading::init_ops::( + deno_node::deno_node::init_ops::( options.npm_resolver, ), - deno_node::deno_node::init_ops(), // Ops from this crate ops::runtime::deno_runtime::init_ops(main_module.clone()), ops::worker_host::deno_worker_host::init_ops( -- cgit v1.2.3