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 /ext/node/lib.rs | |
parent | 0e1a71fec6fff5fe62d7e6b2bfffb7ab877d7b71 (diff) |
feat(unstable/npm): initial type checking of npm specifiers (#16332)
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r-- | ext/node/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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<PathBuf, AnyError>; 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()) |