diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-05-23 22:26:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-23 23:26:23 +0200 |
commit | 959739f609dddacde3bbe9ecede2f409214fb34c (patch) | |
tree | 04d1776efbd3561205829f78288d26b6e14c3429 /cli/lsp/language_server.rs | |
parent | 5de30c53239ac74843725d981afc0bb8c45bdf16 (diff) |
FUTURE: initial support for .npmrc file (#23560)
This commit adds initial support for ".npmrc" files.
Currently we only discover ".npmrc" files next to "package.json" files
and discovering these files in user home dir is left for a follow up.
This pass supports "_authToken" and "_auth" configuration
for providing authentication.
LSP support has been left for a follow up PR.
Towards https://github.com/denoland/deno/issues/16105
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r-- | cli/lsp/language_server.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 17ed02cd6..8f37d8b9c 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -83,6 +83,7 @@ use super::tsc::ChangeKind; use super::tsc::GetCompletionDetailsArgs; use super::tsc::TsServer; use super::urls; +use crate::args::create_default_npmrc; use crate::args::get_root_cert_store; use crate::args::CaData; use crate::args::CacheSetting; @@ -3318,6 +3319,9 @@ impl Inner { config_data.and_then(|d| d.config_file.as_deref().cloned()), config_data.and_then(|d| d.lockfile.clone()), config_data.and_then(|d| d.package_json.as_deref().cloned()), + config_data + .and_then(|d| d.npmrc.clone()) + .unwrap_or_else(create_default_npmrc), force_global_cache, )?; |