diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-02-23 10:58:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 10:58:10 -0500 |
commit | 344317ec501fa124f0c74b44035fa4516999dce6 (patch) | |
tree | 3a0e4ca3d83b1a47a0903f08648ef1b896b32195 /cli/npm/cache.rs | |
parent | 214bdbbc2b09ab3f56f0ffe1ad5930d48ec0c76f (diff) |
feat(npm): support bare specifiers from package.json in more subcommands and language server (#17891)
Diffstat (limited to 'cli/npm/cache.rs')
-rw-r--r-- | cli/npm/cache.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs index 9f58bcd0d..1bc2f8487 100644 --- a/cli/npm/cache.rs +++ b/cli/npm/cache.rs @@ -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 |