Repository navigation
Fix API benchmark host and npm selection - #160
Merged
Andrew Branch (andrewbranch) merged 1 commit intoOct 19, 2026
Merged
Conversation
Use installed Node hosts and their bundled npm CLI for API benchmarks, and preserve ESLint invocation failures when no results are produced. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b28632e4-ef28-4d35-9f4c-b1b5e54191b8
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes have regression coverage and no identified blocking issues.
No open issues 🎉
What changed in this PR
Makes API benchmarks use installed Node hosts and their bundled npm, avoiding ambient package-manager shims while preserving invocation errors.
Changes:
- Restricts API benchmarks to installed Node hosts and invokes their bundled npm.
- Preserves ESLint failures when no results file exists.
- Adds regression coverage and documents host requirements.
| File | Description |
|---|---|
| ts-perf/packages/commands/src/benchmark/runApiScenario.ts | Validates bundled npm and exposes its path. |
| ts-perf/packages/commands/src/benchmark/runApiScenario.test.ts | Tests host selection, npm dispatch, and failures. |
| ts-perf/packages/commands/src/benchmark/measure.ts | Filters API benchmarks to installed Node hosts. |
| scripts/src/__tests__/apiArtifact.test.ts | Tests ESLint output and failure handling. |
| README.md | Documents installed-host and bundled-npm behavior. |
| cases/api/utils.mjs | Runs bundled npm with the selected Node executable. |
| cases/api/eslint.mjs | Requires output before accepting exit status 1. |
Review effort: Balanced
Andrew Branch (andrewbranch)
marked this pull request as ready for review
October 19, 2026 23:31
Andrew Branch (andrewbranch)
requested a review
from Jake Bailey (jakebailey)
as a code owner
October 19, 2026 23:31
Jake Bailey (jakebailey)
approved these changes
Oct 19, 2026
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.
API benchmarks can select both an installed Node host and ambient Node when their versions match. In build 169490, the duplicate run picked up an ambient Corepack npm shim, which rejected the consumer's pnpm package declaration; ESLint then masked the invocation failure with a missing
results.jsonerror.Use the existing installed-Node host filter for API benchmarks only, and invoke the selected host's bundled npm CLI with that Node executable. This preserves the upstream
npm runworkloads and arguments without relying on ambient package-manager shims. ESLint now accepts exit status 1 only when its output file exists, otherwise preserving the original invocation failure. Other benchmark kinds, executable placeholder expansion, and predictable-mode rejection are unchanged.