diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-30 00:07:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 04:07:57 +0000 |
commit | 2d3b596cf5b676aff127da04f21f758149e3580d (patch) | |
tree | a44b429810c78078180a8e51c59f4336090f084d | |
parent | 556012320ecf546aaf5f7ac84d75c29593af758e (diff) |
feat: do not require `DENO_FUTURE=1` for npmrc support (#24043)
-rw-r--r-- | cli/args/mod.rs | 4 | ||||
-rw-r--r-- | tests/integration/lsp_tests.rs | 1 | ||||
-rw-r--r-- | tests/specs/npm/npmrc/__test__.jsonc | 28 |
3 files changed, 18 insertions, 15 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index fe9c27928..766ddf52d 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -558,10 +558,6 @@ pub fn discover_npmrc( maybe_package_json_path: Option<PathBuf>, maybe_deno_json_path: Option<PathBuf>, ) -> Result<(Arc<ResolvedNpmRc>, Option<PathBuf>), AnyError> { - if !*DENO_FUTURE { - return Ok((create_default_npmrc(), None)); - } - const NPMRC_NAME: &str = ".npmrc"; fn get_env_var(var_name: &str) -> Option<String> { diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs index 51507b0a6..ee3b06d37 100644 --- a/tests/integration/lsp_tests.rs +++ b/tests/integration/lsp_tests.rs @@ -8866,7 +8866,6 @@ fn lsp_npmrc() { .use_http_server() .use_temp_cwd() .add_npm_env_vars() - .env("DENO_FUTURE", "1") .build(); let temp_dir = context.temp_dir(); temp_dir.write( diff --git a/tests/specs/npm/npmrc/__test__.jsonc b/tests/specs/npm/npmrc/__test__.jsonc index 44298ed2f..106842d2b 100644 --- a/tests/specs/npm/npmrc/__test__.jsonc +++ b/tests/specs/npm/npmrc/__test__.jsonc @@ -1,13 +1,21 @@ { - "envs": { - "DENO_FUTURE": "1" - }, "tempDir": true, - "steps": [{ - "args": "install", - "output": "install.out" - }, { - "args": "run -A main.js", - "output": "main.out" - }] + "tests": { + "deno_install": { + "envs": { + "DENO_FUTURE": "1" + }, + "steps": [{ + "args": "install", + "output": "install.out" + }, { + "args": "run -A main.js", + "output": "main.out" + }] + }, + "run_node_modules_dir": { + "args": "run --node-modules-dir -A --quiet main.js", + "output": "main.out" + } + } } |