Skip to content

fix(types): make public declarations self-contained - #11141

Merged
sheremet-va merged 1 commit into
vitest-dev:mainfrom
ZoeySigel:fix/public-type-declarations
Sep 4, 2026
Merged

sheremet-va merged 1 commit into
vitest-dev:mainfrom
ZoeySigel:fix/public-type-declarations

Conversation

@ZoeySigel

Copy link
Copy Markdown
Contributor

Summary

  • remove the accidental @vitest/expect import from the public config declaration
  • expose MarkOptions and BrowserTraceEntryKind through the core browser types
  • re-export the browser trace types from vitest/browser

Closes #11140

Tests

  • pnpm lint:fix
  • pnpm --filter @vitest/browser build:node
  • pnpm --filter @vitest/test-integration-dts-config test
  • pnpm --filter @vitest/test-integration-dts-browser-playwright test
  • verified the packed package in an isolated TypeScript consumer without @vitest/expect or a browser provider

AI disclosure

This change was prepared with assistance from OpenAI Codex GPT 5.6sol and manually reviewed before submission.

@sheremet-va

Copy link
Copy Markdown
Member

LGTM, thanks

@sheremet-va
sheremet-va merged commit 455466c into vitest-dev:main Sep 4, 2026
30 checks passed
@ZoeySigel
ZoeySigel deleted the fix/public-type-declarations branch September 5, 2026 02:06
scrollDynasty added a commit to scrollDynasty/BrowserMesh that referenced this pull request Sep 7, 2026
Dependabot raised vitest to 5.0.0 but left @vitest/coverage-v8 on ^4.1.10,
which pins peer vitest@4.1.11 exactly. Every CI job failed at `npm ci` with
ERESOLVE before running a single check.

Bump @vitest/coverage-v8 to ^5.0.0 alongside it, and move vitest.config.ts to
its own tsconfig with skipLibCheck. Vitest 5.0.0 ships three declaration files
that do not compile under this project's settings - a stale `@vitest/expect`
type import and an unexported `MarkOptions`, both vitest-dev/vitest#11140,
fixed by vitest-dev/vitest#11141 but unreleased; plus a `benchmark.provider`
optionality clash under exactOptionalPropertyTypes. Confining skipLibCheck to
the one file that imports `vitest/config` keeps src, tests and scripts on the
strict, full-library check.

All 245 tests pass on Vitest 5 and coverage stays above every threshold.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5.0.0: shipped .d.ts files (config.d.ts @vitest/expect, browser MarkOptions) fail type-checking without skipLibCheck

2 participants