diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-10-28 16:19:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 16:19:55 -0400 |
commit | edaceecec771cf0395639175b5a21d20530f6080 (patch) | |
tree | 8c9708d095a8ed7c9e897869a68f9d2c9b4d7ffd /cli/npm/resolution.rs | |
parent | 2c674dcd20aeb19d694e03d969f5792d1581e87a (diff) |
feat: support npm specifiers in `deno info` for display text output only (#16470)
Diffstat (limited to 'cli/npm/resolution.rs')
-rw-r--r-- | cli/npm/resolution.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/npm/resolution.rs b/cli/npm/resolution.rs index 7cd4df124..28a42bc33 100644 --- a/cli/npm/resolution.rs +++ b/cli/npm/resolution.rs @@ -697,6 +697,13 @@ impl NpmResolution { Ok(snapshot) } + pub fn resolve_package_from_id( + &self, + id: &NpmPackageId, + ) -> Option<NpmResolutionPackage> { + self.snapshot.read().package_from_id(id).cloned() + } + pub fn resolve_package_from_package( &self, name: &str, |