Skip to content

Comments

fix(types): bench.reporters no longer gives type errors when passing file name string paths#9695

Merged
hi-ogawa merged 1 commit intovitest-dev:mainfrom
Bertie690:bench-fix
Feb 19, 2026
Merged

fix(types): bench.reporters no longer gives type errors when passing file name string paths#9695
hi-ogawa merged 1 commit intovitest-dev:mainfrom
Bertie690:bench-fix

Conversation

@Bertie690
Copy link
Contributor

@Bertie690 Bertie690 commented Feb 18, 2026

Description

Fixes a oneline typing error inside vitest/node that caused TypeScript to produce type errors complain about bench.reporters not accepting arbitrary strings for reporter file paths. Vitest processes them just fine, but the type was overly restrictive and led to type errors that contradicted existing docs.

Fixes #9692

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
    • Should I add a type test that creates a config with a string benchmark file?
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

N/A - this is fixing a type bug

Documentation

N/A - this is fixing a bug

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@hi-ogawa hi-ogawa merged commit 093c8f6 into vitest-dev:main Feb 19, 2026
15 of 16 checks passed
@Bertie690 Bertie690 deleted the bench-fix branch February 19, 2026 07: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.

Vitest config benchmark.reporters has incorrect type; forbids passing arbitrary file paths

2 participants