fix(bump:deps): Use 'dev' dist-tag instead of 'next' (#22266)
This commit is contained in:
Родитель
c8e16500ff
Коммит
1bc4134643
|
@ -735,16 +735,16 @@ async function findDepUpdates(
|
|||
// Get the new version for each package based on the update type
|
||||
for (const pkgName of dependencies) {
|
||||
let latest: string;
|
||||
let next: string;
|
||||
let dev: string;
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
[latest, next] = await Promise.all([
|
||||
[latest, dev] = await Promise.all([
|
||||
latestVersion(pkgName, {
|
||||
version: "latest",
|
||||
}),
|
||||
latestVersion(pkgName, {
|
||||
version: "next",
|
||||
version: "dev",
|
||||
}),
|
||||
]);
|
||||
} catch (error: unknown) {
|
||||
|
@ -752,12 +752,12 @@ async function findDepUpdates(
|
|||
continue;
|
||||
}
|
||||
|
||||
// If we're allowing pre-release, use the next tagged version. Warn if it is lower than the latest.
|
||||
// If we're allowing pre-release, use the version that has the 'dev' dist-tag in npm. Warn if it is lower than the 'latest'.
|
||||
if (prerelease) {
|
||||
dependencyVersionMap[pkgName] = next;
|
||||
if (semver.gt(latest, next)) {
|
||||
dependencyVersionMap[pkgName] = dev;
|
||||
if (semver.gt(latest, dev)) {
|
||||
log?.warning(
|
||||
`The latest dist-tag is version ${latest}, which is greater than the next dist-tag version, ${next}. Is this expected?`,
|
||||
`The 'latest' dist-tag is version ${latest}, which is greater than the 'dev' dist-tag version, ${dev}. Is this expected?`,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче