@next/codemod 15.0.4-canary.43 → 15.0.4-canary.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/upgrade.js +2 -0
- package/package.json +1 -1
package/bin/upgrade.js
CHANGED
|
@@ -66,6 +66,8 @@ async function loadHighestNPMVersionMatching(query) {
|
|
|
66
66
|
// npm-view returns an array if there are multiple versions matching the query.
|
|
67
67
|
if (Array.isArray(versionOrVersions)) {
|
|
68
68
|
// The last entry will be the latest version published.
|
|
69
|
+
// But we want the highest version.
|
|
70
|
+
versionOrVersions.sort(semver_1.compare);
|
|
69
71
|
return versionOrVersions[versionOrVersions.length - 1];
|
|
70
72
|
}
|
|
71
73
|
return versionOrVersions;
|