diff options
Diffstat (limited to 'cli/compat/mod.rs')
-rw-r--r-- | cli/compat/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/compat/mod.rs b/cli/compat/mod.rs index e133368d2..3f3743d97 100644 --- a/cli/compat/mod.rs +++ b/cli/compat/mod.rs @@ -14,7 +14,7 @@ use once_cell::sync::Lazy; use std::sync::Arc; pub use esm_resolver::check_if_should_use_esm_loader; -pub(crate) use esm_resolver::NodeEsmResolver; +pub use esm_resolver::NodeEsmResolver; // TODO(bartlomieju): this needs to be bumped manually for // each release, a better mechanism is preferable, but it's a quick and dirty @@ -77,20 +77,20 @@ static NODE_COMPAT_URL: Lazy<String> = Lazy::new(|| { static GLOBAL_URL_STR: Lazy<String> = Lazy::new(|| format!("{}node/global.ts", NODE_COMPAT_URL.as_str())); -pub(crate) static GLOBAL_URL: Lazy<Url> = +pub static GLOBAL_URL: Lazy<Url> = Lazy::new(|| Url::parse(&GLOBAL_URL_STR).unwrap()); static MODULE_URL_STR: Lazy<String> = Lazy::new(|| format!("{}node/module.ts", NODE_COMPAT_URL.as_str())); -pub(crate) static MODULE_URL: Lazy<Url> = +pub static MODULE_URL: Lazy<Url> = Lazy::new(|| Url::parse(&MODULE_URL_STR).unwrap()); static COMPAT_IMPORT_URL: Lazy<Url> = Lazy::new(|| Url::parse("flags:compat").unwrap()); /// Provide imports into a module graph when the compat flag is true. -pub(crate) fn get_node_imports() -> Vec<(Url, Vec<String>)> { +pub fn get_node_imports() -> Vec<(Url, Vec<String>)> { vec![(COMPAT_IMPORT_URL.clone(), vec![GLOBAL_URL_STR.clone()])] } @@ -104,7 +104,7 @@ fn try_resolve_builtin_module(specifier: &str) -> Option<Url> { } } -pub(crate) fn load_cjs_module( +pub fn load_cjs_module( js_runtime: &mut JsRuntime, module: &str, main: bool, @@ -123,7 +123,7 @@ pub(crate) fn load_cjs_module( Ok(()) } -pub(crate) fn add_global_require( +pub fn add_global_require( js_runtime: &mut JsRuntime, main_module: &str, ) -> Result<(), AnyError> { |