diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-03-07 13:59:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 14:59:57 +0100 |
commit | f0ec4fe1b89215ce9e62ebf47d8907dd6336f35e (patch) | |
tree | 0e74627f21ebba6393f7f48b5618435af5cd94ad /cli/args/mod.rs | |
parent | 588dd5e66961999cfafd4504444e685629a92173 (diff) |
fix(publish): silence warnings for sloppy imports and node builtins with env var (#22760)
An undocumented "DENO_DISABLE_PEDANTIC_NODE_WARNINGS" env
var can be used to silence warnings for sloppy imports and node builtins
without `node:` prefix.
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index af681104c..acdc96526 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -101,6 +101,12 @@ pub fn npm_registry_url() -> &'static Url { &NPM_REGISTRY_DEFAULT_URL } +pub static DENO_DISABLE_PEDANTIC_NODE_WARNINGS: Lazy<bool> = Lazy::new(|| { + std::env::var("DENO_DISABLE_PEDANTIC_NODE_WARNINGS") + .ok() + .is_some() +}); + pub fn jsr_url() -> &'static Url { static JSR_URL: Lazy<Url> = Lazy::new(|| { let env_var_name = "JSR_URL"; |