feat(npm): support bare specifiers from package.json in more subcommands and language server (#17891)

This commit is contained in:
David Sherret 2023-02-23 10:58:10 -05:00 committed by GitHub
parent 214bdbbc2b
commit 344317ec50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 472 additions and 95 deletions

View file

@ -179,6 +179,10 @@ impl ReadonlyNpmCache {
Self::new(dir.npm_folder_path())
}
pub fn root_dir_url(&self) -> &Url {
&self.root_dir_url
}
pub fn package_folder_for_id(
&self,
folder_id: &NpmPackageCacheFolderId,
@ -345,6 +349,10 @@ impl NpmCache {
&self.cache_setting
}
pub fn root_dir_url(&self) -> &Url {
self.readonly.root_dir_url()
}
/// Checks if the cache should be used for the provided name and version.
/// NOTE: Subsequent calls for the same package will always return `true`
/// to ensure a package is only downloaded once per run of the CLI. This