mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
console semver fix for commits on master branch (#1131)
This commit is contained in:
parent
db1f6c1a39
commit
7f56da9f28
@ -1,3 +1 @@
|
||||
const SERVER_CONSOLE_MODE = 'server';
|
||||
|
||||
export { SERVER_CONSOLE_MODE };
|
||||
export const SERVER_CONSOLE_MODE = 'server';
|
||||
|
@ -16,12 +16,15 @@ const componentsSemver = {
|
||||
|
||||
const getPreRelease = version => {
|
||||
const prerelease = semver.prerelease(version);
|
||||
if (!prerelease) {
|
||||
return '';
|
||||
}
|
||||
if (prerelease.length === 1) {
|
||||
const regex = /(alpha|beta)(\d+)/gm;
|
||||
const str = prerelease[0];
|
||||
const m = regex.exec(str);
|
||||
if (m.length < 3) {
|
||||
return [];
|
||||
return '';
|
||||
}
|
||||
return m.slice(1, 3);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user