From c3cba7f22c49ca3a3f58df44d8ea4c85d8510bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 9 Mar 2023 08:10:54 -0400 Subject: refactor(core): Extension::builder_with_deps (#18093) Prerequisite for https://github.com/denoland/deno/pull/18080 --- runtime/build.rs | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'runtime') diff --git a/runtime/build.rs b/runtime/build.rs index 5bf694cec..d9f428e9b 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -204,8 +204,9 @@ mod startup_snapshot { snapshot_path: PathBuf, maybe_additional_extension: Option, ) { - let runtime_extension = Extension::builder("runtime") - .dependencies(vec![ + let runtime_extension = Extension::builder_with_deps( + "runtime", + &[ "deno_webidl", "deno_console", "deno_url", @@ -227,26 +228,27 @@ mod startup_snapshot { "deno_flash", "deno_io", "deno_fs", - ]) - .esm(include_js_files!( - dir "js", - "01_errors.js", - "01_version.ts", - "06_util.js", - "10_permissions.js", - "11_workers.js", - "13_buffer.js", - "30_os.js", - "40_fs_events.js", - "40_http.js", - "40_process.js", - "40_signals.js", - "40_tty.js", - "41_prompt.js", - "90_deno_ns.js", - "98_global_scope.js", - )) - .build(); + ], + ) + .esm(include_js_files!( + dir "js", + "01_errors.js", + "01_version.ts", + "06_util.js", + "10_permissions.js", + "11_workers.js", + "13_buffer.js", + "30_os.js", + "40_fs_events.js", + "40_http.js", + "40_process.js", + "40_signals.js", + "40_tty.js", + "41_prompt.js", + "90_deno_ns.js", + "98_global_scope.js", + )) + .build(); let mut extensions_with_js: Vec = vec![ deno_webidl::init(), -- cgit v1.2.3