Enables postinstall scripts for pnpm #6902
Merged
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the problem this PR addresses?
It came to me that since pnpm no longer runs postinstall scripts by default, the benchmark was a little skewed since Yarn (and npm) do. The benchmarks are intended to compare apples to apples, so either postinstalls should be disabled in Yarn / npm as well, or they should be enabled in pnpm. I think it makes more sense to enable them, as it can uncover bugs that would otherwise be hidden away.
How did you fix it?
Enabled the postinstall scripts in the package manager benchmarks.
To be fair it probably doesn't change much, if anything - the full cold Gatsby benchmark shows around 2 seconds of removed install time around Feb 3rd 2025 which I think is caused by the lack of postinstall, although I'm not certain, but that's about it. Pnpm remains really fast, kudos!
Curiously the same change occurs in the "Recurrent calls" benchmark which probably shouldn't need to run postinstall scripts. Does pnpm have a bug causing it to rebuild postinstall scripts when they aren't needed?
Checklist