Skip to content

Commit

Permalink
feat: do not require DENO_FUTURE=1 for npmrc support (denoland#24043)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored May 30, 2024
1 parent 5560123 commit 2d3b596
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
4 changes: 0 additions & 4 deletions cli/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
1 change: 0 additions & 1 deletion tests/integration/lsp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
28 changes: 18 additions & 10 deletions tests/specs/npm/npmrc/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -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"
}
}
}

0 comments on commit 2d3b596

Please sign in to comment.