summaryrefslogtreecommitdiff
path: root/ext/node/lib.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-09-05 12:36:35 +0200
committerGitHub <noreply@github.com>2022-09-05 12:36:35 +0200
commit264ad49e18161a29cf8831dff2e4bcbcea59d086 (patch)
tree6208eee3ad7bfabcc1a9885043cd8ba08b0a7618 /ext/node/lib.rs
parent16dbf4adc390c9fb7656372b42811c1929e755dd (diff)
refactor: cleanup Node compatibility code (#15766)
- move errors related to Node compat from cli/node/errors.rs to "ext/node" crate - remove dependency on "node_resolver" crate - make some of structures private to the "cli/node" module
Diffstat (limited to 'ext/node/lib.rs')
-rw-r--r--ext/node/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/node/lib.rs b/ext/node/lib.rs
index 6f3173470..99df93be5 100644
--- a/ext/node/lib.rs
+++ b/ext/node/lib.rs
@@ -11,6 +11,10 @@ use std::path::Path;
use std::path::PathBuf;
use std::rc::Rc;
+pub mod errors;
+mod package_json;
+mod resolution;
+
pub use package_json::PackageJson;
pub use resolution::get_closest_package_json;
pub use resolution::get_package_scope_config;
@@ -42,10 +46,6 @@ pub trait DenoDirNpmResolver {
fn ensure_read_permission(&self, path: &Path) -> Result<(), AnyError>;
}
-mod errors;
-mod package_json;
-mod resolution;
-
pub const MODULE_ES_SHIM: &str = include_str!("./module_es_shim.js");
struct Unstable(pub bool);