Skip to content

Commit

Permalink
fix(release): false positive npm dist-tag add (#26496)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored Jun 10, 2024
1 parent b54f5c3 commit 29af58f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ export default async function runExecutor(
};
}

if (resultJson.versions.includes(currentVersion)) {
// If only one version of a package exists in the registry, versions will be a string instead of an array.
const versions = Array.isArray(resultJson.versions)
? resultJson.versions
: [resultJson.versions];

if (versions.includes(currentVersion)) {
try {
if (!isDryRun) {
execSync(npmDistTagAddCommandSegments.join(' '), {
Expand Down

0 comments on commit 29af58f

Please sign in to comment.