Support version tags that don't start with v for semantic versioning (#303)

* Fixes #242

* Update semver version

* Update husky

* Update husky pre-commit hook

* Update dependencies

* Update dependencies

* Remove git add since changes will be automatically added

* Restore git add

* Update dependencies

* Update test
This commit is contained in:
David Finol
2022-01-02 15:31:48 -06:00
committed by GitHub
parent a3e783f430
commit c45cd78d0d
9 changed files with 1719 additions and 1134 deletions

View File

@@ -128,6 +128,13 @@ describe('Versioning', () => {
},
);
test.each(['1.1-1-g12345678', '0.1-2-g12345678', '0.0-500-gA9B6C3D0-dirty'])(
'accepts valid semantic versions without v-prefix %s',
(description) => {
expect(Versioning.descriptionRegex1.test(description)).toBeTruthy();
},
);
test.each(['v0', 'v0.1', 'v0.1.2', 'v0.1-2', 'v0.1-2-g'])('does not like %s', (description) => {
expect(Versioning.descriptionRegex1.test(description)).toBeFalsy();
// Also never expect without the v to work for any of these cases.