Revert "fix(release): false positive npm dist-tag add" (#26495)

Reverts nrwl/nx#26494
This commit is contained in:
James Henry 2024-06-10 21:14:40 +04:00 committed by GitHub
parent c764a62060
commit b54f5c3648
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,12 +110,7 @@ export default async function runExecutor(
};
}
// 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)) {
if (resultJson.versions.includes(currentVersion)) {
try {
if (!isDryRun) {
execSync(npmDistTagAddCommandSegments.join(' '), {