You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common problem today is that linting (in CI jobs) need to install a ton of dependencies that aren't needed. If we could have a linting group, we could install only select dependencies needed to run linting.
One can imagine similar groups for tests, deployment and staging.
Open-questions
It could make sense to use dependencies as the default group (basically changing it's name), but that would be a breaking change.
Alternative solutions
One could also allow specifying an alternative package file when calling npm install, for example npm install --package-file=linting-package.json (prior art).
The text was updated successfully, but these errors were encountered:
I'd suggest that NPM adopted named dependency groups.
It could work like this:
dependencies
-> production group [existing group]devDependencies
-> dev group [existing group]lintingDependencies
-> linting group [example]The general pattern would be this:
These groups could then be used with install, e.g.
npm install only=linting
ornpm install only=dev,test
.Prior Art
Bundler (a Ruby package manager) has support for groups:
https://bundler.io/guides/groups.html
Use-case
A common problem today is that linting (in CI jobs) need to install a ton of dependencies that aren't needed. If we could have a linting group, we could install only select dependencies needed to run linting.
One can imagine similar groups for tests, deployment and staging.
Open-questions
dependencies
as the default group (basically changing it's name), but that would be a breaking change.Alternative solutions
One could also allow specifying an alternative package file when calling npm install, for example
npm install --package-file=linting-package.json
(prior art).The text was updated successfully, but these errors were encountered: