[BUG] $npm_package_dependencies_* are no longer set in v7
Open
Nobody has claimed this yet.
Bug
Priority 2
Release 7.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Current Behavior:
Any $npm_package_dependencies_* variables defined in v6, are no longer set in v7.
Expected Behavior:
$npm_package_dependencies_* variables should list the values from package.json
Steps To Reproduce:
- Define a script to list env variables:
"scripts": {
"env": "env"
},
- List them:
npm run env | grep -i npm_package | sort
- Notice that in v7, several
npm_package_*variables are present, but not any ofnpm_package_dependencies_* - Notice that in v6, all of them are present.
Environment:
OS: Ubuntu 20.10
Node: v15.12.0
npm: 7.8.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. First reproduce the npm v6 versus v7 behavior with the provided env script and package.json dependency variables; then trace the npm CLI code that constructs script environment variables. Done means dependency-related npm_package_* variables are again populated consistently with package.json and the reproduction output passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100