mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979)
Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
This commit is contained in:
parent
cd8f5f53f7
commit
448fe67b7a
141 changed files with 1163 additions and 493 deletions
2
cli/cache/mod.rs
vendored
2
cli/cache/mod.rs
vendored
|
@ -228,7 +228,7 @@ impl Loader for FetchCacher {
|
|||
LoaderCacheSetting::Reload => {
|
||||
if matches!(file_fetcher.cache_setting(), CacheSetting::Only) {
|
||||
return Err(deno_core::anyhow::anyhow!(
|
||||
"Failed to resolve version constraint. Try running again without --cached-only"
|
||||
"Could not resolve version constraint using only cached data. Try running again without --cached-only"
|
||||
));
|
||||
}
|
||||
Some(CacheSetting::ReloadAll)
|
||||
|
|
6
cli/cache/module_info.rs
vendored
6
cli/cache/module_info.rs
vendored
|
@ -150,8 +150,9 @@ pub struct ModuleInfoCacheModuleAnalyzer<'a> {
|
|||
parser: &'a dyn ModuleParser,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait(?Send)]
|
||||
impl<'a> deno_graph::ModuleAnalyzer for ModuleInfoCacheModuleAnalyzer<'a> {
|
||||
fn analyze(
|
||||
async fn analyze(
|
||||
&self,
|
||||
specifier: &ModuleSpecifier,
|
||||
source: Arc<str>,
|
||||
|
@ -176,8 +177,9 @@ impl<'a> deno_graph::ModuleAnalyzer for ModuleInfoCacheModuleAnalyzer<'a> {
|
|||
}
|
||||
|
||||
// otherwise, get the module info from the parsed source cache
|
||||
// todo(23858): take advantage of this being async
|
||||
let analyzer = ParserModuleAnalyzer::new(self.parser);
|
||||
let module_info = analyzer.analyze(specifier, source, media_type)?;
|
||||
let module_info = analyzer.analyze(specifier, source, media_type).await?;
|
||||
|
||||
// then attempt to cache it
|
||||
if let Err(err) = self.module_info_cache.set_module_info(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue