Open jimaek opened 10 years ago
Good news; semver
v4 (not released yet) will ignore pre-releases in carrot-matching. So some of the code could be stolen/patched there.
Nice
What would the advantage of not including pre releases be?
They are not needed on a CDN. More https://github.com/jsdelivr/jsdelivr/pull/1692
There are some exceptions, but usually pre-releases are only current for a week or so, & meant for temporary testing a new release.
OTOH, major version 0.y.z really are beta versions also. From SemVer:
How do I know when to release 1.0.0? If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you're worrying a lot about backwards compatibility, you should probably already be 1.0.0.
Often not treated as such, but I usually don't proactively host 0.xxx versions unless they seem stable & usable.
One way to add it is to insert a check here
if ( [A-Za-z\-].test(version) ) {
logger.warn('Possible non-production release', { name: metadata.name, version: version } );
}
Note this only warns. Which is OK since it seems that all PRs are visually verified. If we are confident after days/months of usage this rejects the right versions, then it can be bumped to rejection.
@jimaek If you don't want to warn for any versions that use a dash (3.2.0-1), then that rule can be easily removed.
Lets wait for @aleksandara and see what he thinks.
The bot should have an option to disable publishing of alpha-, beta- or rc-* releases