deno
876a9606 - fix(cache): skip checksums for cached 404 entries (#35526)

Commit
148 days ago
fix(cache): skip checksums for cached 404 entries (#35526) Closes #35525. ## What changed Cached 404 entries are now recognized before applying a content checksum in the file fetcher cache path. The checksum is still applied to real cached file bodies, but synthetic not-found metadata entries report `NotFound` instead of trying to validate an empty body against a JSR package manifest checksum. ## Why JSR packages can contain dependency probes for extensionless Node built-ins such as `crypto`, `fs`, or `path`. Those URLs are cached as 404 metadata entries. On a later run, the module graph can provide a package-manifest checksum for the missing JSR subpath, which previously caused the cached 404's empty body to fail integrity validation with `Expected: package-manifest-missing-checksum`. ## Validation - `cargo fmt -p deno_cache_dir` - `cargo test -p deno_cache_dir test_fetch_not_found_is_negatively_cached` - `cargo test -p deno_cache_dir` - `./tools/lint.js` - End-to-end: first and second `cargo run --quiet --bin deno -- cache jsr:@ts-morph/ts-morph@28.0.0` with the same temporary `DENO_DIR` both exited 0
Author
Parents
Loading