[BUG] package.json vars documentation seems outdated
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 711
- Forks
- 4.2k
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 3
Description
What / Why
Apparently many package.json vars have been removed since v6 (reference). But docs are still pointing to them here:
You can access these variables in your code with
process.env.npm_package_nameandprocess.env.npm_package_version, and so on for other fields.
and here:
Objects are flattened following this format, so if you had
{"scripts":{"install":"foo.js"}}in yourpackage.json, then you'd see this in the script:
process.env.npm_package_scripts_install === "foo.js"
References
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
Start with the two linked npm scripts documentation sections and compare their package.json variable claims with npm/cli issue #2609. Revise the passages so they match supported behavior; done means the examples and wording no longer describe removed variables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100