diff --git a/src/command/start.ts b/src/command/start.ts index 53d738b..c9afe0f 100644 --- a/src/command/start.ts +++ b/src/command/start.ts @@ -105,7 +105,7 @@ export class Start extends RootCommand implements LeafCommand { this.beeVersion = stripCommit(this.beeVersion) const supportedBeeVersion = PackageJson.engines.supportedBee - if (!semver.satisfies(this.beeVersion, supportedBeeVersion)) { + if (!semver.satisfies(this.beeVersion, supportedBeeVersion, { includePrerelease: true })) { throw new Error( `Unsupported Bee version!\nThis version of Bee Factory supports versions: ${supportedBeeVersion}, but you have requested start of ${this.beeVersion}`, ) diff --git a/src/utils/config-sources.ts b/src/utils/config-sources.ts index 5d1b939..9eb6ddc 100644 --- a/src/utils/config-sources.ts +++ b/src/utils/config-sources.ts @@ -3,7 +3,7 @@ import * as path from 'path' import { promisify } from 'util' const readFile = promisify(readFileCb) -const VERSION_REGEX = /^\d\.\d\.\d(-\w+)*$/ +const VERSION_REGEX = /^\d+\.\d+\.\d+(-\w+)*$/ export function stripCommit(version: string): string { if (version === 'latest') {