1 parent
65df252783
commit
eb1947576f
2 files changed
+11
-1
No files matched your search
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Fix aliased dependencies resolution on repeat install with existing lockfile [#7957](https://github.com/pnpm/pnpm/issues/7957).
|
||||
@@ -1139,7 +1139,11 @@ async function resolveDependency (
|
||||
}
|
||||
try {
|
||||
if (!options.update && currentPkg.version && currentPkg.pkgId?.endsWith(`@${currentPkg.version}`)) {
|
||||
wantedDependency.pref = currentPkg.version
|
||||
if (semver.validRange(wantedDependency.pref)) {
|
||||
wantedDependency.pref = currentPkg.version
|
||||
} else if (wantedDependency.pref.startsWith('npm:')) {
|
||||
wantedDependency.pref = `${wantedDependency.pref.substring(0, wantedDependency.pref.lastIndexOf('@') + 1)}${currentPkg.version}`
|
||||
}
|
||||
}
|
||||
pkgResponse = await ctx.storeController.requestPackage(wantedDependency, {
|
||||
alwaysTryWorkspacePackages: ctx.linkWorkspacePackagesDepth >= options.currentDepth,
|
||||
|
||||
Reference in new issue
Block a user