Open
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_name
andprocess.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"