diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-05 12:44:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 16:44:24 +0000 |
commit | a6c47ee74023f6ef683988cabc8caa95406e3c99 (patch) | |
tree | 74026c558a175b9cf6f881ec7229499878dd6a1a /runtime/build.rs | |
parent | 5270c43e412cc636cd9923182169d166d181f78a (diff) |
refactor(ext/node): combine `deno_node::Fs` with `deno_fs::FileSystem` (#18991)
Diffstat (limited to 'runtime/build.rs')
-rw-r--r-- | runtime/build.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/build.rs b/runtime/build.rs index d096df7db..4f49ba681 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -273,6 +273,7 @@ mod startup_snapshot { pub fn create_runtime_snapshot(snapshot_path: PathBuf) { // NOTE(bartlomieju): ordering is important here, keep it in sync with // `runtime/worker.rs`, `runtime/web_worker.rs` and `cli/build.rs`! + let fs = std::sync::Arc::new(deno_fs::RealFs); let extensions: Vec<Extension> = vec![ deno_webidl::deno_webidl::init_ops_and_esm(), deno_console::deno_console::init_ops_and_esm(), @@ -309,14 +310,11 @@ mod startup_snapshot { deno_napi::deno_napi::init_ops_and_esm::<Permissions>(), deno_http::deno_http::init_ops_and_esm(), deno_io::deno_io::init_ops_and_esm(Default::default()), - deno_fs::deno_fs::init_ops_and_esm::<Permissions>( - false, - std::sync::Arc::new(deno_fs::RealFs), - ), + deno_fs::deno_fs::init_ops_and_esm::<Permissions>(false, fs.clone()), 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::init_ops_and_esm::<Permissions>(None, None), + deno_node::deno_node::init_ops_and_esm::<Permissions>(None, fs), #[cfg(not(feature = "snapshot_from_snapshot"))] runtime_main::init_ops_and_esm(), ]; |