Skip to content

Conversation

@MaxBlack-dev
Copy link
Contributor

Description

Standardizes all environment variable references in documentation to use uppercase naming convention (NPM_CONFIG_) instead of lowercase (npm_config_).

Changes

  • Changed npm_config_binroot to NPM_CONFIG_BINROOT in scripts.md
  • Changed npm_config_prefix to NPM_CONFIG_PREFIX in npm.md (2 instances)
  • Changed npm_config_ to NPM_CONFIG_ in npm.md
  • Changed npm_config_key to NPM_CONFIG_KEY in npm.md

Fixes

Closes #4891

Rationale

The documentation had inconsistent casing for environment variables - some references used uppercase (NPM_CONFIG_USERCONFIG) while others used lowercase (npm_config_prefix). Following the standard convention, environment variables should always be referenced in uppercase. While npm internally converts both to lowercase, using uppercase in documentation follows the de-facto standard and avoids confusion.

Type of Change

Documentation update

@MaxBlack-dev MaxBlack-dev requested a review from a team as a code owner November 19, 2025 23:19
@owlstronaut owlstronaut merged commit 17e154c into npm:latest Nov 25, 2025
8 checks passed
@github-actions github-actions bot mentioned this pull request Nov 25, 2025
@ryenus
Copy link

ryenus commented Nov 26, 2025

Wow, finally, thank you @MaxBlack-dev so much for this! 🎉

BTW, I vaguely remember to have seen someone mentioned that when both the lowercase and uppercase environment variables exist, like having both npm_config_userconfig and NPM_CONFIG_USERCONFIG set, then one of the two would take precedence due to the way things have been implemented. I might be wrong though, I wonder if there's any plan to clarify that part as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] npm_config_userconfig vs NPM_CONFIG_USERCONFIG when referred as environment variable

3 participants