Skip to content

fix: disable install scripts in benchmarks for consistent measurement#78

Merged
darcyclarke merged 1 commit intomainfrom
fix/ignore-install-scripts
Mar 18, 2026
Merged

fix: disable install scripts in benchmarks for consistent measurement#78
darcyclarke merged 1 commit intomainfrom
fix/ignore-install-scripts

Conversation

@vltbaudbot
Copy link
Contributor

Problem

Some package managers run lifecycle scripts (preinstall/install/postinstall) during install by 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

Package Manager Runs scripts by default? Flag Action
npm (v11) YES --ignore-scripts ✅ Added
yarn classic (v1) YES --ignore-scripts ✅ Added
yarn berry (v4) No (since v2) No change
zpm (yarn v6) No (inherits berry) No change
pnpm (v10+) No (approve-builds required) No change
vlt No No change
bun YES --ignore-scripts ✅ Added
deno No (--allow-scripts enables) ✅ Removed --allow-scripts

Changes

  • scripts/variations/common.sh: Added --ignore-scripts to npm, yarn classic, bun; removed --allow-scripts from deno
  • scripts/registry/common.sh: Added --ignore-scripts to the registry benchmark npm install command

Note: 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).

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).
@vltbaudbot vltbaudbot force-pushed the fix/ignore-install-scripts branch from 07e9637 to 2ce033a Compare March 17, 2026 19:17
@darcyclarke darcyclarke merged commit 3dc2cdc into main Mar 18, 2026
45 checks passed
@darcyclarke darcyclarke deleted the fix/ignore-install-scripts branch March 18, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants