mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-08 15:08:27 -05:00
fix: don't rebuild unmodified deps on repeat install (#7270)
close #7268
This commit is contained in:
6
.changeset/slimy-eyes-type.md
Normal file
6
.changeset/slimy-eyes-type.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/build-modules": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Fixed a regression that was shipped with pnpm v8.10.0. Dependencies that were already built should not be rebuilt on repeat install. This issue was introduced via the changes related to [supportedArchitectures](https://github.com/pnpm/pnpm/pull/7214). Related issue [#7268](https://github.com/pnpm/pnpm/issues/7268).
|
||||
@@ -100,8 +100,9 @@ async function buildDependency (
|
||||
builtHoistedDeps?: Record<string, DeferredPromise<void>>
|
||||
warn: (message: string) => void
|
||||
}
|
||||
) {
|
||||
): Promise<void> {
|
||||
const depNode = depGraph[depPath]
|
||||
if (!depNode.filesIndexFile) return
|
||||
if (opts.builtHoistedDeps) {
|
||||
if (opts.builtHoistedDeps[depNode.depPath]) {
|
||||
await opts.builtHoistedDeps[depNode.depPath].promise
|
||||
@@ -135,12 +136,10 @@ async function buildDependency (
|
||||
patchFileHash: depNode.patchFile?.hash,
|
||||
isBuilt: hasSideEffects,
|
||||
})
|
||||
if (depNode.filesIndexFile) {
|
||||
await opts.storeController.upload(depNode.dir, {
|
||||
sideEffectsCacheKey,
|
||||
filesIndexFile: depNode.filesIndexFile,
|
||||
})
|
||||
}
|
||||
await opts.storeController.upload(depNode.dir, {
|
||||
sideEffectsCacheKey,
|
||||
filesIndexFile: depNode.filesIndexFile,
|
||||
})
|
||||
} catch (err: any) { // eslint-disable-line
|
||||
if (err.statusCode === 403) {
|
||||
logger.warn({
|
||||
|
||||
Reference in New Issue
Block a user