refactor(npm): extract out some npm fs resolution code from the cli (#27607)

Moves the npm fs resolvers into the deno_resolution crate.

This does not entirely move things out, but is a step in that direction.
This commit is contained in:
David Sherret 2025-01-09 12:10:07 -05:00 committed by GitHub
parent ce0968ef3a
commit 093f3ba565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 312 additions and 213 deletions

View file

@ -11,6 +11,7 @@ use dashmap::DashMap;
use deno_core::error::AnyError;
use deno_core::serde_json;
use deno_core::url::Url;
use deno_error::JsErrorBox;
use deno_npm::npm_rc::ResolvedNpmRc;
use deno_npm::registry::NpmPackageInfo;
use deno_resolver::npm::ByonmInNpmPackageChecker;
@ -100,7 +101,7 @@ impl deno_npm_cache::NpmCacheHttpClient for CliNpmCacheHttpClient {
};
deno_npm_cache::DownloadError {
status_code,
error: err.into(),
error: JsErrorBox::from_err(err),
}
})
}