summaryrefslogtreecommitdiff
path: root/ext/node/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r--ext/node/lib.rs3
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())