summaryrefslogtreecommitdiff
path: root/cli/lsp/documents.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-02-23 12:33:23 -0500
committerGitHub <noreply@github.com>2023-02-23 17:33:23 +0000
commit6233c0aff0dc9e58b02dfc9499048385bbf836c6 (patch)
treeb6f09c73bbaca669e22b5f5c6f30961a87f78be5 /cli/lsp/documents.rs
parent344317ec501fa124f0c74b44035fa4516999dce6 (diff)
fix(npm): support bare specifiers in package.json having a path (#17903)
For example `import * as test from "package/path.js"`
Diffstat (limited to 'cli/lsp/documents.rs')
-rw-r--r--cli/lsp/documents.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs
index 98c3b715a..88efc8074 100644
--- a/cli/lsp/documents.rs
+++ b/cli/lsp/documents.rs
@@ -1170,7 +1170,7 @@ impl Documents {
fn calculate_resolver_config_hash(
maybe_import_map: Option<&import_map::ImportMap>,
maybe_jsx_config: Option<&JsxImportSourceConfig>,
- maybe_package_json_deps: Option<&HashMap<String, NpmPackageReq>>,
+ maybe_package_json_deps: Option<&BTreeMap<String, NpmPackageReq>>,
) -> u64 {
let mut hasher = FastInsecureHasher::default();
if let Some(import_map) = maybe_import_map {
@@ -1181,7 +1181,6 @@ impl Documents {
hasher.write_hashable(&jsx_config);
}
if let Some(deps) = maybe_package_json_deps {
- let deps = deps.iter().collect::<BTreeMap<_, _>>();
hasher.write_hashable(&deps);
}
hasher.finish()