From bcfe279fba865763c87f9cd8d5a2d0b2cbf451be Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 21 Oct 2022 11:20:18 -0400 Subject: feat(unstable/npm): initial type checking of npm specifiers (#16332) --- cli/npm/resolvers/common.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/npm/resolvers/common.rs') 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; fn resolve_package_folder_from_specifier( @@ -40,6 +42,11 @@ pub trait InnerNpmPackageResolver: Send + Sync { packages: Vec, ) -> BoxFuture<'static, Result<(), AnyError>>; + fn set_package_reqs( + &self, + packages: HashSet, + ) -> BoxFuture<'static, Result<(), AnyError>>; + fn ensure_read_permission(&self, path: &Path) -> Result<(), AnyError>; fn snapshot(&self) -> NpmResolutionSnapshot; -- cgit v1.2.3