diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-10-21 11:20:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 15:20:18 +0000 |
commit | bcfe279fba865763c87f9cd8d5a2d0b2cbf451be (patch) | |
tree | 68e4d1bc52e261df50279f9ecea14795d1c46f6c /cli/npm/resolvers/common.rs | |
parent | 0e1a71fec6fff5fe62d7e6b2bfffb7ab877d7b71 (diff) |
feat(unstable/npm): initial type checking of npm specifiers (#16332)
Diffstat (limited to 'cli/npm/resolvers/common.rs')
-rw-r--r-- | cli/npm/resolvers/common.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/npm/resolvers/common.rs b/cli/npm/resolvers/common.rs index b91deae9e..4981d5613 100644 --- a/cli/npm/resolvers/common.rs +++ b/cli/npm/resolvers/common.rs @@ -1,5 +1,6 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. +use std::collections::HashSet; use std::io::ErrorKind; use std::path::Path; use std::path::PathBuf; @@ -26,6 +27,7 @@ pub trait InnerNpmPackageResolver: Send + Sync { &self, name: &str, referrer: &ModuleSpecifier, + conditions: &[&str], ) -> Result<PathBuf, AnyError>; fn resolve_package_folder_from_specifier( @@ -40,6 +42,11 @@ pub trait InnerNpmPackageResolver: Send + Sync { packages: Vec<NpmPackageReq>, ) -> BoxFuture<'static, Result<(), AnyError>>; + fn set_package_reqs( + &self, + packages: HashSet<NpmPackageReq>, + ) -> BoxFuture<'static, Result<(), AnyError>>; + fn ensure_read_permission(&self, path: &Path) -> Result<(), AnyError>; fn snapshot(&self) -> NpmResolutionSnapshot; |