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) --- ext/node/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/node/lib.rs') diff --git a/ext/node/lib.rs b/ext/node/lib.rs index 5178d81f7..d9e5dcdbd 100644 --- a/ext/node/lib.rs +++ b/ext/node/lib.rs @@ -28,6 +28,7 @@ pub use resolution::package_imports_resolve; pub use resolution::package_resolve; pub use resolution::NodeModuleKind; pub use resolution::DEFAULT_CONDITIONS; +pub use resolution::TYPES_CONDITIONS; pub trait NodePermissions { fn check_read(&mut self, path: &Path) -> Result<(), AnyError>; @@ -38,6 +39,7 @@ pub trait RequireNpmResolver { &self, specifier: &str, referrer: &Path, + conditions: &[&str], ) -> Result; fn resolve_package_folder_from_path( @@ -304,6 +306,7 @@ fn op_require_resolve_deno_dir( .resolve_package_folder_from_package( &request, &PathBuf::from(parent_filename), + DEFAULT_CONDITIONS, ) .ok() .map(|p| p.to_string_lossy().to_string()) -- cgit v1.2.3