refactor: do not use deno_fs::FileSystem everywhere (#27508)

This changes the cli to mostly use `std::fs` via `sys_traits` instead of
the implemention of `deno_fs::FileSystem`.
This commit is contained in:
David Sherret 2024-12-31 11:29:07 -05:00 committed by GitHub
parent 1cd36009b0
commit 4638caa740
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 1304 additions and 1437 deletions

View file

@ -18,7 +18,6 @@ use deno_core::unsync::sync::AtomicFlag;
use deno_path_util::get_atomic_path;
use deno_runtime::code_cache::CodeCache;
use deno_runtime::code_cache::CodeCacheType;
use deno_runtime::deno_fs::FsSysTraitsAdapter;
use crate::cache::FastInsecureHasher;
use crate::worker::CliCodeCache;
@ -191,7 +190,7 @@ impl FirstRunCodeCacheStrategy {
) {
let count = cache_data.len();
let temp_file =
get_atomic_path(&FsSysTraitsAdapter::new_real(), &self.file_path);
get_atomic_path(&sys_traits::impls::RealSys, &self.file_path);
match serialize(&temp_file, self.cache_key, cache_data) {
Ok(()) => {
if let Err(err) = std::fs::rename(&temp_file, &self.file_path) {