fix: sort package versions semantically in patch command (#9601)

This commit is contained in:
Azat S. authored and GitHub committed 2025-06-04 11:23:18 +02:00
1 parent b0ead519b3
commit d385b71d9c
2 files changed
+7

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-patching": patch
"pnpm": patch
---
Sort versions printed by `pnpm patch` using semantic versioning rules.
@@ -105,6 +105,7 @@ export async function getVersionsFromLockfile (dep: ParseWantedDependencyResult,
}
})
.filter(({ name }) => name === pkgName)
.sort((v1, v2) => semver.compare(v1.version, v2.version))
return {
versions,