mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-28 02:53:15 -04:00
fix(package-requester): update resolution when package is updated
ref #3188
This commit is contained in:
5
.changeset/silly-poets-tan.md
Normal file
5
.changeset/silly-poets-tan.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
---
|
||||
|
||||
`requestPackage()` should always return the resolution of the updated package.
|
||||
@@ -162,16 +162,14 @@ async function resolveAndFetch (
|
||||
options.currentResolution['integrity'] !== resolveResult.resolution['integrity'] // eslint-disable-line @typescript-eslint/dot-notation
|
||||
)
|
||||
|
||||
if (!skipResolution || forceFetch) {
|
||||
updated = pkgId !== resolveResult.id || !resolution || forceFetch
|
||||
// Keep the lockfile resolution when possible
|
||||
// to keep the original shasum.
|
||||
if (updated) {
|
||||
resolution = resolveResult.resolution
|
||||
}
|
||||
pkgId = resolveResult.id
|
||||
normalizedPref = resolveResult.normalizedPref
|
||||
updated = pkgId !== resolveResult.id || !resolution || forceFetch
|
||||
// Keep the lockfile resolution when possible
|
||||
// to keep the original shasum.
|
||||
if (updated) {
|
||||
resolution = resolveResult.resolution
|
||||
}
|
||||
pkgId = resolveResult.id
|
||||
normalizedPref = resolveResult.normalizedPref
|
||||
}
|
||||
|
||||
const id = pkgId as string
|
||||
|
||||
Reference in New Issue
Block a user