From 6233c0aff0dc9e58b02dfc9499048385bbf836c6 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 23 Feb 2023 12:33:23 -0500 Subject: fix(npm): support bare specifiers in package.json having a path (#17903) For example `import * as test from "package/path.js"` --- cli/lsp/documents.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cli/lsp') 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>, + maybe_package_json_deps: Option<&BTreeMap>, ) -> 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::>(); hasher.write_hashable(&deps); } hasher.finish() -- cgit v1.2.3