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
Using a flag or a config file, restrict the available semver ranges when running np.
Is the feature request related to a problem?
In a shared repo, there may be different understandings of what is and isn't a major release. Once published, it can be difficult (not to mention bad practice) to roll back if done in error. It would be ideal to have a passive means of preventing accidental publication of a version that is otherwise reserved for changes of a particular nature.
Possible implementation
Add a versions key to np-config which could function as a whitelist...
"versions": ["patch", "minor"]
Select semver increment or specify new version (Use arrow keys)
patch 0.0.1
minor 0.1.0
...or a blacklist:
"versions": ["major", "premajor"]
Select semver increment or specify new version (Use arrow keys)
patch 0.0.1
minor 0.1.0
prepatch 0.0.1-0
preminor 0.1.0-0
prerelease 0.0.1-0
Alternatives
Create flags such as --no-major or --versions patch, minor to include in an npm script.
The text was updated successfully, but these errors were encountered:
I think there's a better non-technical solution to this: Don't give people publish access if you cannot trust them to do the right thing. Even if we were to add this, there would be nothing stopping them from just running npm version major && npm publish.
Description
Using a flag or a config file, restrict the available semver ranges when running
np
.Is the feature request related to a problem?
In a shared repo, there may be different understandings of what is and isn't a major release. Once published, it can be difficult (not to mention bad practice) to roll back if done in error. It would be ideal to have a passive means of preventing accidental publication of a version that is otherwise reserved for changes of a particular nature.
Possible implementation
Add a
versions
key to np-config which could function as a whitelist......or a blacklist:
Alternatives
Create flags such as
--no-major
or--versions patch, minor
to include in an npm script.The text was updated successfully, but these errors were encountered: