mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-30 10:38:13 -05:00
fix: sort package versions semantically in patch command (#9601)
This commit is contained in:
6
.changeset/little-taxes-tie.md
Normal file
6
.changeset/little-taxes-tie.md
Normal 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,
|
||||
|
||||
Reference in New Issue
Block a user