Fix Version parser regexp

This commit is contained in:
garronej 2022-10-11 18:33:32 +02:00
parent a75bdd36de
commit 3d848cb9e7

View file

@ -11,7 +11,7 @@ export namespace NpmModuleVersion {
export function parse(versionStr: string): NpmModuleVersion {
const match = versionStr.match(/^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-rc.([0-9]+))?/);
const match = versionStr.match(/^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-rc.([0-9]+))?$/);
if (!match) {
throw new Error(`${versionStr} is not a valid NPM version`);