mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Fix Version parser regexp
This commit is contained in:
parent
a75bdd36de
commit
3d848cb9e7
1 changed files with 1 additions and 1 deletions
|
|
@ -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`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue