Skip to content

Commit

Permalink
fix(visualizer): fix publish script (Issue #1270) (#1391)
Browse files Browse the repository at this point in the history
  • Loading branch information
denys-kolomiitsev authored May 16, 2024
1 parent 2807715 commit 34c7b86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/publish-lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,17 @@ function getDevVersion(potentialVersion) {

result = [];
} else {
console.log('CODE', JSON.parse(e.stdout).error.code);
throw new Error(`Could not get versions from registry.`);
}
}

if(!result){
throw new Error(`Could not get version.`);
}

if( !Array.isArray(result) && typeof result === 'string'){
result = [result];
}
const lastVersionToIncrement = result
.filter((ver) => ver.startsWith(mainPackageJson.version))
.map((ver) => ver.match(/\d+$/)?.[0])
Expand Down

0 comments on commit 34c7b86

Please sign in to comment.