fix: disable install scripts in benchmarks for consistent measurement#78
Merged
darcyclarke merged 1 commit intomainfrom Mar 18, 2026
Merged
fix: disable install scripts in benchmarks for consistent measurement#78darcyclarke merged 1 commit intomainfrom
darcyclarke merged 1 commit intomainfrom
Conversation
Add --ignore-scripts to package managers that run lifecycle scripts by default, so benchmarks measure dependency resolution + linking only — not arbitrary postinstall work (downloading binaries, native builds, etc). Changes per package manager: npm: added --ignore-scripts (runs scripts by default) yarn classic: added --ignore-scripts (runs scripts by default) yarn berry: no change (scripts disabled by default since v2) zpm (yarn 6): no change (inherits berry default) pnpm v10+: no change (scripts blocked by default, needs approve-builds) vlt: no change (doesn't run scripts by default) bun: added --ignore-scripts (runs scripts by default) deno: removed --allow-scripts (scripts disabled by default) Also added --ignore-scripts to the registry benchmark npm install command (scripts/registry/common.sh).
07e9637 to
2ce033a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Some package managers run lifecycle scripts (preinstall/install/postinstall) during
installby default. This means benchmarks are measuring arbitrary postinstall work — downloading platform-specific binaries (esbuild), running native builds, downloading browser binaries (@playwright/test) — rather than just dependency resolution and linking.This adds noise, increases variance, and isn't what we're trying to measure.
Research
--ignore-scripts--ignore-scriptsapprove-buildsrequired)--ignore-scripts--allow-scriptsenables)--allow-scriptsChanges
scripts/variations/common.sh: Added--ignore-scriptsto npm, yarn classic, bun; removed--allow-scriptsfrom denoscripts/registry/common.sh: Added--ignore-scriptsto the registry benchmark npm install commandNote: This will change benchmark numbers since postinstall work is no longer included. The new numbers more accurately reflect what each PM is actually doing (resolving + linking).