mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
refactor: load bytes in deno_graph (#22212)
Upgrades deno_graph to 0.64 where deno_graph is now responsible for turning bytes into a string. This is in preparation for Wasm modules.
This commit is contained in:
parent
830d096b66
commit
4b7c6049ef
38 changed files with 325 additions and 637 deletions
|
@ -528,7 +528,7 @@ impl ModuleRegistry {
|
|||
);
|
||||
self.http_cache.set(specifier, headers_map, &[])?;
|
||||
}
|
||||
let file = fetch_result?;
|
||||
let file = fetch_result?.into_text_decoded()?;
|
||||
let config: RegistryConfigurationJson = serde_json::from_str(&file.source)?;
|
||||
validate_config(&config)?;
|
||||
Ok(config.registries)
|
||||
|
@ -610,6 +610,8 @@ impl ModuleRegistry {
|
|||
.file_fetcher
|
||||
.fetch(&endpoint, PermissionsContainer::allow_all())
|
||||
.await
|
||||
.ok()?
|
||||
.into_text_decoded()
|
||||
.ok()?;
|
||||
let documentation: lsp::Documentation =
|
||||
serde_json::from_str(&file.source).ok()?;
|
||||
|
@ -974,6 +976,8 @@ impl ModuleRegistry {
|
|||
.file_fetcher
|
||||
.fetch(&specifier, PermissionsContainer::allow_all())
|
||||
.await
|
||||
.ok()?
|
||||
.into_text_decoded()
|
||||
.ok()?;
|
||||
serde_json::from_str(&file.source).ok()
|
||||
}
|
||||
|
@ -1037,6 +1041,8 @@ impl ModuleRegistry {
|
|||
specifier, err
|
||||
);
|
||||
})
|
||||
.ok()?
|
||||
.into_text_decoded()
|
||||
.ok()?;
|
||||
let items: VariableItems = serde_json::from_str(&file.source)
|
||||
.map_err(|err| {
|
||||
|
@ -1073,6 +1079,8 @@ impl ModuleRegistry {
|
|||
specifier, err
|
||||
);
|
||||
})
|
||||
.ok()?
|
||||
.into_text_decoded()
|
||||
.ok()?;
|
||||
let items: VariableItems = serde_json::from_str(&file.source)
|
||||
.map_err(|err| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue