mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Return [] when no versions are published
This commit is contained in:
+4
-1
@@ -116,10 +116,13 @@ function getNextBetaVersion(packageJson) {
|
||||
function getPublishedVersions(packageJson, version, tag) {
|
||||
const versionsProcess = cp.spawnSync('npm', ['view', packageJson.name, 'versions', '--json']);
|
||||
const versionsJson = JSON.parse(versionsProcess.stdout);
|
||||
if (!versions || versions.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if (tag) {
|
||||
return versionsJson.filter(v => !v.search(new RegExp(`${version}-${tag}.[0-9]+`)));
|
||||
}
|
||||
return versionsJson ?? [];
|
||||
return versionsJson;
|
||||
}
|
||||
|
||||
function getChangedFilesInCommit(commit) {
|
||||
|
||||
Reference in New Issue
Block a user