1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix: delete old Deno 1.x headers file when loading cache (#25283)

This commit is contained in:
David Sherret 2024-08-28 19:47:15 -04:00 committed by GitHub
parent 37501aa323
commit 3afa3db4d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 6 deletions

8
Cargo.lock generated
View file

@ -1347,9 +1347,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_cache_dir" name = "deno_cache_dir"
version = "0.11.0" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "405790fa1fa5f05c2e7dca817f820dc1c950ea846f47212ed6d670a3023cb4fe" checksum = "6df43311cb7703fa3242c282823a850e4c8d0c06b9527d8209b55bd695452ea5"
dependencies = [ dependencies = [
"deno_media_type", "deno_media_type",
"indexmap", "indexmap",
@ -2010,9 +2010,9 @@ dependencies = [
[[package]] [[package]]
name = "deno_semver" name = "deno_semver"
version = "0.5.12" version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eef522937758930b9d6897631fa94bc69bcbbe78613c939ab2054ca96191afbd" checksum = "6657fecb9ac6a7a71f552c95e8cc492466a75f5660224577e2226bcf30db9768"
dependencies = [ dependencies = [
"monch", "monch",
"once_cell", "once_cell",

View file

@ -52,7 +52,7 @@ deno_lockfile = "=0.23.0"
deno_media_type = { version = "0.1.4", features = ["module_specifier"] } deno_media_type = { version = "0.1.4", features = ["module_specifier"] }
deno_permissions = { version = "0.26.0", path = "./runtime/permissions" } deno_permissions = { version = "0.26.0", path = "./runtime/permissions" }
deno_runtime = { version = "0.175.0", path = "./runtime" } deno_runtime = { version = "0.175.0", path = "./runtime" }
deno_semver = "=0.5.12" deno_semver = "=0.5.13"
deno_terminal = "0.2.0" deno_terminal = "0.2.0"
napi_sym = { version = "0.96.0", path = "./cli/napi/sym" } napi_sym = { version = "0.96.0", path = "./cli/napi/sym" }
test_util = { package = "test_server", path = "./tests/util/server" } test_util = { package = "test_server", path = "./tests/util/server" }
@ -103,7 +103,7 @@ chrono = { version = "0.4", default-features = false, features = ["std", "serde"
console_static_text = "=0.8.1" console_static_text = "=0.8.1"
data-encoding = "2.3.3" data-encoding = "2.3.3"
data-url = "=0.3.0" data-url = "=0.3.0"
deno_cache_dir = "=0.11.0" deno_cache_dir = "=0.11.1"
deno_package_json = { version = "=0.1.1", default-features = false } deno_package_json = { version = "=0.1.1", default-features = false }
dlopen2 = "0.6.1" dlopen2 = "0.6.1"
ecb = "=0.1.2" ecb = "=0.1.2"

4
cli/cache/mod.rs vendored
View file

@ -74,6 +74,10 @@ impl deno_cache_dir::DenoCacheEnv for RealDenoCacheEnv {
atomic_write_file_with_retries(path, bytes, CACHE_PERM) atomic_write_file_with_retries(path, bytes, CACHE_PERM)
} }
fn remove_file(&self, path: &Path) -> std::io::Result<()> {
std::fs::remove_file(path)
}
fn modified(&self, path: &Path) -> std::io::Result<Option<SystemTime>> { fn modified(&self, path: &Path) -> std::io::Result<Option<SystemTime>> {
match std::fs::metadata(path) { match std::fs::metadata(path) {
Ok(metadata) => Ok(Some( Ok(metadata) => Ok(Some(