cli
cli copied to clipboard
feat: show proxy environment variables in npm config list
Fixes #4170
Description
This PR makes pm config list display proxy-related environment variables when they are set.
Changes
- Modified lib/commands/config.js to display HTTP_PROXY, HTTPS_PROXY, NO_PROXY and their lowercase variants when set
- Added test case in est/lib/commands/config.js to verify the new behavior
- Environment variables appear in a new ; environment-related config section
Motivation
As reported in #4170, pm config list was not showing environment variables like HTTP_PROXY, NOPROXY, etc., even though these variables affect how npm runs. This made it difficult for users to see what proxy settings their environment has and could lead to mistakes.
Testing
Manual testing confirms:
- When proxy environment variables are set, they appear in the output
- When they are not set, the section doesn't appear
- Both uppercase and lowercase variants are shown when present
The new test case verifies that environment variables are displayed correctly.