fix: sort package versions semantically in patch command (#9601)
This commit is contained in:
1 parent
b0ead519b3
commit
d385b71d9c
2 files changed
+7
No files matched your search
@@ -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