Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
23ff7c3
chore: add reproduction for #9305 (#9327)
sheremet-va Dec 23, 2025
5d84eeb
fix(browser): log `ErrorEvent.message` when unhandled `ErrorEvent.err…
hi-ogawa Dec 23, 2025
7b10ab4
fix(typecheck): improve error message when tsc outputs help text (#9214)
Ujjwaljain16 Dec 23, 2025
b2ec724
fix: improve asymmetric matcher diff readability by unwrapping contai…
Copilot Dec 26, 2025
9e2636b
chore(github): add "documentation" issue template (#9346)
sheremet-va Dec 26, 2025
b094053
fix(coverage): remove unnecessary `istanbul-lib-source-maps` usage (#…
AriPerkkio Dec 26, 2025
2dd3dd8
fix: improve runner error when importing outside of test context (#9335)
sheremet-va Dec 27, 2025
a8a8836
fix(pool): validate environment options when reusing the worker (#9349)
sheremet-va Dec 27, 2025
1246e03
chore: use viteOverrides instead of the cli options (#8144)
sheremet-va Dec 27, 2025
1500654
fix(browser): support `fileParallelism` on an instance (#9328)
sheremet-va Dec 27, 2025
96dd814
chore(deps): update dependency vitest-sonar-reporter to v3 (#9355)
renovate[bot] Dec 29, 2025
34946d1
chore(deps): update tj-actions/changed-files action to v47 (#9356)
renovate[bot] Dec 29, 2025
966936c
chore(deps): update dessant/lock-threads action to v6 (#9360)
renovate[bot] Dec 29, 2025
245542b
chore: remove @testing-library/react from browser tests (#9358)
sheremet-va Dec 29, 2025
200dadb
fix(pool): handle worker start failures gracefully (#9337)
AriPerkkio Dec 29, 2025
7c05a5c
chore: remove zustand (#9359)
sheremet-va Dec 29, 2025
d3e2ebe
chore(deps): update testing-library monorepo (major) (#9357)
renovate[bot] Dec 29, 2025
620b6bd
chore(deps): update dependency vue-tsc to v3 (#9361)
renovate[bot] Dec 29, 2025
acfbe8a
chore: lock prs after 14 days too
sheremet-va Dec 29, 2025
e6a3f8c
fix: replace crypto.randomUUID to allow insecure environments (fix #9…
plusgut Dec 29, 2025
9321caa
Merge branch 'main' of https://github.com/vitest-dev/vitest into rebrand
mdong1909 Dec 30, 2025
5a143b9
update og for stylized e
mdong1909 Dec 30, 2025
31c50f4
fix: update theme color and copyright year in config
mdong1909 Dec 30, 2025
62129c1
feat: add logo-without-border-vite.svg and update config to use it
mdong1909 Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: Bug description
placeholder: I am doing ... What I expect is ... What actually happening is ...
validations:
required: true
- type: textarea
Expand Down Expand Up @@ -41,6 +41,7 @@ body:
- npm
- yarn
- pnpm
- bun
validations:
required: true
- type: checkboxes
Expand Down
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 📚 Documentation
description: Suggest a change or new page to be added to vitest.dev
labels: [documentation]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this issue!
- type: checkboxes
id: documentation_is
attributes:
label: Documentation is
options:
- label: Missing
- label: Outdated
- label: Confusing
- label: Not sure?
- type: textarea
id: description
attributes:
label: Explain in Detail
description: A clear and concise description of your suggestion. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: The description of ... page is not clear. I thought it meant ... but it wasn't.
validations:
required: true
- type: textarea
id: suggestion
attributes:
label: Your Suggestion for Changes
validations:
required: true
- type: input
id: reproduction
attributes:
label: Reproduction
description: If you have a reproduction, please provide a link via [vitest.new](https://vitest.new/) or a link to a repo that can reproduce the problem you ran into.
placeholder: Reproduction URL
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@a284dc1814e3fd07f2e34267fc8f81227ed29fb8 # v45.0.9
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
with:
files: |
docs/**
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/lock-closed-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ jobs:
if: github.repository == 'vitest-dev/vitest'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
- uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: '14'
# issue-comment: |
# This issue has been locked since it has been closed for more than 14 days.
#
# If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vitejs.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions).
pr-inactive-days: '14'
issue-lock-reason: ''
process-only: issues
pr-lock-reason: ''
process-only: issues,prs
12 changes: 7 additions & 5 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import {
groupIconMdPlugin,
groupIconVitePlugin,
localIconLoader,
} from 'vitepress-plugin-group-icons'
import llmstxt from 'vitepress-plugin-llms'
import { version } from '../../package.json'
Expand Down Expand Up @@ -48,7 +49,7 @@ export default ({ mode }: { mode: string }) => {
},
},
head: [
['meta', { name: 'theme-color', content: '#729b1a' }],
['meta', { name: 'theme-color', content: '#22FF84' }],
['link', { rel: 'icon', href: '/logo-without-border.svg', type: 'image/svg+xml' }],
['meta', { name: 'author', content: `${teamMembers.map(c => c.name).join(', ')} and ${vitestName} contributors` }],
['meta', { name: 'keywords', content: 'vitest, vite, test, coverage, snapshot, react, vue, preact, svelte, solid, lit, marko, ruby, cypress, puppeteer, jsdom, happy-dom, test-runner, jest, typescript, esm, tinyspy, node' }],
Expand All @@ -69,16 +70,17 @@ export default ({ mode }: { mode: string }) => {
groupIconVitePlugin({
customIcon: {
'CLI': 'vscode-icons:file-type-shell',
'vitest.shims': 'vscode-icons:file-type-vitest',
'vitest.config': 'vscode-icons:file-type-vitest',
'vitest.workspace': 'vscode-icons:file-type-vitest',
'vitest.shims': localIconLoader(import.meta.url, '../public/logo-without-border.svg'),
'vitest.config': localIconLoader(import.meta.url, '../public/logo-without-border.svg'),
'vitest.workspace': localIconLoader(import.meta.url, '../public/logo-without-border.svg'),
'.spec.ts': 'vscode-icons:file-type-testts',
'.test.ts': 'vscode-icons:file-type-testts',
'.spec.js': 'vscode-icons:file-type-testjs',
'.test.js': 'vscode-icons:file-type-testjs',
'marko': 'vscode-icons:file-type-marko',
'qwik': 'logos:qwik-icon',
'next': '',
'vite.config': localIconLoader(import.meta.url, '../public/logo-without-border-vite.svg'),
},
}),
llmstxt(),
Expand Down Expand Up @@ -143,7 +145,7 @@ export default ({ mode }: { mode: string }) => {
],

footer: {
copyright: `© 2025 VoidZero Inc. and Vitest contributors.`,
copyright: `© ${new Date().getFullYear()} VoidZero Inc. and Vitest contributors.`,
nav: [
{
title: 'Vitest',
Expand Down
130 changes: 130 additions & 0 deletions docs/public/logo-without-border-vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/public/og.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/projects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^13.4.0",
"@testing-library/react": "^16.3.1",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^19.2.7",
"@vitejs/plugin-react": "^5.1.1",
Expand Down
6 changes: 5 additions & 1 deletion packages/browser/src/client/public/error-catcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ function catchWindowErrors(errorEvent, prop, cb) {
cb(e)
}
else {
console.error(e[prop])
// `ErrorEvent` doesn't necessary have `ErrotEvent.error` defined
// but some has `ErrorEvent.message` defined, e.g. ResizeObserver error.
// https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/error
// https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#observation_errors
console.error(e.message ? new Error(e.message) : e)
}
}
const addEventListener = window.addEventListener.bind(window)
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/client/public/esm-client-injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

const { evaluatedModules } = __vitest_worker__
const moduleId = crypto.randomUUID()
const moduleId = `${Math.random()}`
const viteModule = evaluatedModules.ensureModule(moduleId, moduleId)

viteModule.evaluated = false
Expand Down
2 changes: 0 additions & 2 deletions packages/coverage-v8/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"ast-v8-to-istanbul": "^0.3.8",
"istanbul-lib-coverage": "catalog:",
"istanbul-lib-report": "catalog:",
"istanbul-lib-source-maps": "catalog:",
"istanbul-reports": "catalog:",
"magicast": "catalog:",
"obug": "catalog:",
Expand All @@ -69,7 +68,6 @@
"devDependencies": {
"@types/istanbul-lib-coverage": "catalog:",
"@types/istanbul-lib-report": "catalog:",
"@types/istanbul-lib-source-maps": "catalog:",
"@types/istanbul-reports": "catalog:",
"@vitest/browser": "workspace:*",
"pathe": "catalog:",
Expand Down
15 changes: 4 additions & 11 deletions packages/coverage-v8/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { mergeProcessCovs } from '@bcoe/v8-coverage'
import astV8ToIstanbul from 'ast-v8-to-istanbul'
import libCoverage from 'istanbul-lib-coverage'
import libReport from 'istanbul-lib-report'
import libSourceMaps from 'istanbul-lib-source-maps'
import reports from 'istanbul-reports'
import { parseModule } from 'magicast'
import { createDebug } from 'obug'
Expand Down Expand Up @@ -61,16 +60,15 @@ export class V8CoverageProvider extends BaseCoverageProvider<ResolvedCoverageOpt
})
},
onFinished: async (project, environment) => {
// Source maps can change based on projectName and transform mode.
// Coverage transform re-uses source maps so we need to separate transforms from each other.
const converted = await this.convertCoverage(
merged,
project,
environment,
)

// Source maps can change based on projectName and transform mode.
// Coverage transform re-uses source maps so we need to separate transforms from each other.
const transformedCoverage = await transformCoverage(converted)
coverageMap.merge(transformedCoverage)
coverageMap.merge(converted)

merged = { result: [] }
},
Expand All @@ -83,7 +81,7 @@ export class V8CoverageProvider extends BaseCoverageProvider<ResolvedCoverageOpt
const coveredFiles = coverageMap.files()
const untestedCoverage = await this.getCoverageMapForUncoveredFiles(coveredFiles)

coverageMap.merge(await transformCoverage(untestedCoverage))
coverageMap.merge(untestedCoverage)
}

coverageMap.filter((filename) => {
Expand Down Expand Up @@ -458,11 +456,6 @@ export class V8CoverageProvider extends BaseCoverageProvider<ResolvedCoverageOpt
}
}

async function transformCoverage(coverageMap: CoverageMap) {
const sourceMapStore = libSourceMaps.createSourceMapStore()
return await sourceMapStore.transformCoverage(coverageMap)
}

/**
* Find the function with highest `endOffset` to determine the length of the file
*/
Expand Down
Loading
Loading