1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

chore: use semver compatible version (#5678)

## About the changes
Replicate the change made to respect semver
This commit is contained in:
Gastón Fournier 2023-12-19 12:47:03 +01:00 committed by GitHub
parent 8e09f08a05
commit 061bd7ef32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "unleash-server", "name": "unleash-server",
"description": "Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.", "description": "Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.",
"version": "5.7.0-main", "version": "5.7.0+main",
"keywords": ["unleash", "feature toggle", "feature", "toggle"], "keywords": ["unleash", "feature toggle", "feature", "toggle"],
"files": [ "files": [
"dist", "dist",

View File

@ -47,7 +47,10 @@ test('should serve the OpenAPI spec with a `version` property', async () => {
.expect((res) => { .expect((res) => {
const { version } = res.body.info; const { version } = res.body.info;
// ensure there's no whitespace or leading `v` // ensure there's no whitespace or leading `v`
expect(semver.clean(version)).toStrictEqual(version); // clean removes +anything modifier from the version
expect(version).toMatch(
new RegExp(`^${semver.clean(version) ?? 'invalid semver'}`),
);
// ensure the version listed is valid semver // ensure the version listed is valid semver
expect(semver.parse(version, { loose: false })).toBeTruthy(); expect(semver.parse(version, { loose: false })).toBeTruthy();