In current package.json setups there is a "script" entry that has certain lifecycle events defined. These are things like "install" and "publish". The context for these is not very discrete. For example, if I have an "install" script defined in my package.json that will be run when I type npm install, but it will ALSO be ran when that same package is installed as a dependency.
Folks can currently disable all scripts, but this does not allow for the ones defined in my root package.json to still run. We need a way to separate "user/project" level context from "dependency" context.
A solution has been wanted for quite some time, and I think the interop group here is the right place to figure it out.
Consideration: the current "scripts" lifecycle, especially for packages being installed, is something that is quite possibly unable to ever change. It's been like this for too long.
In current package.json setups there is a "script" entry that has certain lifecycle events defined. These are things like "install" and "publish". The context for these is not very discrete. For example, if I have an "install" script defined in my package.json that will be run when I type
npm install, but it will ALSO be ran when that same package is installed as a dependency.Folks can currently disable all scripts, but this does not allow for the ones defined in my root package.json to still run. We need a way to separate "user/project" level context from "dependency" context.
A solution has been wanted for quite some time, and I think the interop group here is the right place to figure it out.
Consideration: the current "scripts" lifecycle, especially for packages being installed, is something that is quite possibly unable to ever change. It's been like this for too long.