summaryrefslogtreecommitdiff
path: root/cli/lsp/npm.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-01-31 22:15:22 -0500
committerGitHub <noreply@github.com>2024-02-01 03:15:22 +0000
commit4b7c6049ef9d40394eb823859c82cbf8d293430d (patch)
tree61e6de7c69c9d00faeef0ff7e6c223224a53de9e /cli/lsp/npm.rs
parent830d096b66696ad9f4e67b3ed8460fb1ff7a9170 (diff)
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.
Diffstat (limited to 'cli/lsp/npm.rs')
-rw-r--r--cli/lsp/npm.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/lsp/npm.rs b/cli/lsp/npm.rs
index c730c7990..613b7897e 100644
--- a/cli/lsp/npm.rs
+++ b/cli/lsp/npm.rs
@@ -62,7 +62,8 @@ impl NpmSearchApi for CliNpmSearchApi {
let file = self
.file_fetcher
.fetch(&search_url, PermissionsContainer::allow_all())
- .await?;
+ .await?
+ .into_text_decoded()?;
let names = Arc::new(parse_npm_search_response(&file.source)?);
self
.search_cache
@@ -88,7 +89,8 @@ impl NpmSearchApi for CliNpmSearchApi {
.file_fetcher
.fetch(&info_url, PermissionsContainer::allow_all())
.await?;
- let info = Arc::new(serde_json::from_str::<NpmPackageInfo>(&file.source)?);
+ let info =
+ Arc::new(serde_json::from_slice::<NpmPackageInfo>(&file.source)?);
self
.info_cache
.lock()