renovate
9c3365aaca
chore: bump up vitest monorepo to v3 (major) ( #9739 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@vitest/browser](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/browser#readme ) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/browser )) | [`2.1.8` -> `3.0.2`](https://renovatebot.com/diffs/npm/@vitest%2fbrowser/2.1.8/3.0.2 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
| [@vitest/coverage-istanbul](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme ) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul )) | [`2.1.8` -> `3.0.2`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/2.1.8/3.0.2 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
| [@vitest/ui](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/ui#readme ) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui )) | [`2.1.8` -> `3.0.2`](https://renovatebot.com/diffs/npm/@vitest%2fui/2.1.8/3.0.2 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
| [vitest](https://redirect.github.com/vitest-dev/vitest ) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest )) | [`^2.1.8` -> `^3.0.0`](https://renovatebot.com/diffs/npm/vitest/2.1.8/3.0.2 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
| [vitest](https://redirect.github.com/vitest-dev/vitest ) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest )) | [`2.1.8` -> `3.0.2`](https://renovatebot.com/diffs/npm/vitest/2.1.8/3.0.2 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>vitest-dev/vitest (@​vitest/browser)</summary>
### [`v3.0.2`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v3.0.2 )
[Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v3.0.1...v3.0.2 )
##### 🐞 Bug Fixes
- Don't await an empty timeout after every test - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7281 ](https://redirect.github.com/vitest-dev/vitest/issues/7281 ) [<samp>(ef1aa)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ef1aa893 )
- **expect**: Fix `expect().resolves/rejects` chain typings - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7273 ](https://redirect.github.com/vitest-dev/vitest/issues/7273 ) [<samp>(fa415)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fa415059 )
##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v3.0.1...v3.0.2 )
### [`v3.0.1`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v3.0.1 )
[Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v3.0.0...v3.0.1 )
##### 🐞 Bug Fixes
- Revert "fix: re-apply default conditions if using vite 6 or later ([https://github.com/vitest-dev/vitest/issues/7071 ](https://redirect.github.com/vitest-dev/vitest/issues/7071 ))" - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7071 ](https://redirect.github.com/vitest-dev/vitest/issues/7071 ) and [https://github.com/vitest-dev/vitest/issues/7271 ](https://redirect.github.com/vitest-dev/vitest/issues/7271 ) [<samp>(755ec)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/755ecdfa )
- **deps**: Update all non-major dependencies - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7147 ](https://redirect.github.com/vitest-dev/vitest/issues/7147 ) [<samp>(537fa)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/537fa5ed )
##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v3.0.0...v3.0.1 )
### [`v3.0.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v3.0.0 )
[Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v2.1.8...v3.0.0 )
Vitest 3 is here! There are a few breaking changes, but we expect the migration to be smooth. This release page lists all changes made to the project during the beta. For the migration guide, please refer to the [documentation](https://vitest.dev/guide/migration.html#migrating-to-vitest-2-0 ).
##### 🚨 Breaking Changes
- `spy.mockReset` changes - by [@​Lordfirespeed](https://redirect.github.com/Lordfirespeed ) in [https://github.com/vitest-dev/vitest/issues/6426 ](https://redirect.github.com/vitest-dev/vitest/issues/6426 ) [<samp>(db7a8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/db7a8888 )
- Pass down context to test hooks - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7034 ](https://redirect.github.com/vitest-dev/vitest/issues/7034 ) [<samp>(82c2e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/82c2e244 )
- Support Vite 6 - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7026 ](https://redirect.github.com/vitest-dev/vitest/issues/7026 ) [<samp>(7abe8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7abe854c )
- **coverage**: Always exclude test files - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7254 ](https://redirect.github.com/vitest-dev/vitest/issues/7254 ) [<samp>(b5268)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b5268965 )
- **deps**: Update fake-timers to v14.0.0 - by [@​xxzefgh](https://redirect.github.com/xxzefgh ) and [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7097 ](https://redirect.github.com/vitest-dev/vitest/issues/7097 ) [<samp>(c98b4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c98b4b1c )
- **expect**: Check more properties for error equality - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) and [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/5876 ](https://redirect.github.com/vitest-dev/vitest/issues/5876 ) [<samp>(10023)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/100230e9 )
- **runner**: Support `describe(..., { shuffle: boolean })` and inherit from parent suite - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6670 ](https://redirect.github.com/vitest-dev/vitest/issues/6670 ) [<samp>(aa1da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/aa1dac3d )
- **snapshot**: Reset snapshot state for `retry` and `repeats` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6817 ](https://redirect.github.com/vitest-dev/vitest/issues/6817 ) [<samp>(e8ce9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e8ce94cf )
- **spy**: SpyOn reuses mock if method is already spyed on - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) and [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6464 ](https://redirect.github.com/vitest-dev/vitest/issues/6464 ) [<samp>(b3e43)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b3e43d04 )
- **vitest**: Don't expose default toFake config - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6288 ](https://redirect.github.com/vitest-dev/vitest/issues/6288 ) [<samp>(e3144)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e3144fd8 )
##### 🚀 Features
- Support inline `diff` options and support `printBasicPrototype` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ), [@​sheremet-va](https://redirect.github.com/sheremet-va ) and **Michał Grzegorzewski** in [https://github.com/vitest-dev/vitest/issues/6740 ](https://redirect.github.com/vitest-dev/vitest/issues/6740 ) [<samp>(39186)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/391860f7 )
- Allow a custom note when calling `ctx.skip()` dynamically - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6805 ](https://redirect.github.com/vitest-dev/vitest/issues/6805 ) [<samp>(697c3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/697c35c5 )
- Allow inline workspace configuration - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6923 ](https://redirect.github.com/vitest-dev/vitest/issues/6923 ) [<samp>(562e1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/562e1b14 )
- Provide the current project to the global setup - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6942 ](https://redirect.github.com/vitest-dev/vitest/issues/6942 ) [<samp>(a5bbc)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a5bbc0a9 )
- Print project name as a label - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6925 ](https://redirect.github.com/vitest-dev/vitest/issues/6925 ) [<samp>(a3bef)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a3bef598 )
- Print a deprecation warning if suite or test uses object as the third argument - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7031 ](https://redirect.github.com/vitest-dev/vitest/issues/7031 ) [<samp>(407f1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/407f10e4 )
- Expose versions from `vitest/node` entry point and statically on Vitest - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7029 ](https://redirect.github.com/vitest-dev/vitest/issues/7029 ) [<samp>(be8d4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/be8d479b )
- `diff.printBasicPrototype: false` by default - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7043 ](https://redirect.github.com/vitest-dev/vitest/issues/7043 ) [<samp>(2b5c5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2b5c5201 )
- Prepare the Vitest API to be stable - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6962 ](https://redirect.github.com/vitest-dev/vitest/issues/6962 ) [<samp>(9a1b5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9a1b5012 )
- Support Vite v6 in mocker package - by [@​cexbrayat](https://redirect.github.com/cexbrayat ) in [https://github.com/vitest-dev/vitest/issues/7058 ](https://redirect.github.com/vitest-dev/vitest/issues/7058 ) [<samp>(96f47)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/96f47d37 )
- Allow multi-browser configuration - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6975 ](https://redirect.github.com/vitest-dev/vitest/issues/6975 ) [<samp>(78b62)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/78b62ffe )
- Add resolved project names to the reporter API - by [@​userquin](https://redirect.github.com/userquin ) in [https://github.com/vitest-dev/vitest/issues/7213 ](https://redirect.github.com/vitest-dev/vitest/issues/7213 ) [<samp>(91758)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/91758360 )
- Introduce the new reporter API - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) and [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7069 ](https://redirect.github.com/vitest-dev/vitest/issues/7069 ) [<samp>(76662)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/766624ab )
- Add `describe.for` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7253 ](https://redirect.github.com/vitest-dev/vitest/issues/7253 ) [<samp>(0ad28)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0ad2860b )
- **api**:
- Add onBrowserInit event - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7255 ](https://redirect.github.com/vitest-dev/vitest/issues/7255 ) [<samp>(80ce0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/80ce0e1c )
- **browser**:
- Support `actionTimeout` as playwright provider options - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6984 ](https://redirect.github.com/vitest-dev/vitest/issues/6984 ) [<samp>(e2c29)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e2c29eaf )
- Support clipboard api `userEvent.copy, cut, paste` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6769 ](https://redirect.github.com/vitest-dev/vitest/issues/6769 ) [<samp>(843a6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/843a621e )
- Implement locator.nth() - by [@​xeger](https://redirect.github.com/xeger ) and [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7137 ](https://redirect.github.com/vitest-dev/vitest/issues/7137 ) [<samp>(38458)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/38458ea6 )
- **cli**:
- Support excluding projects with `--project=!pattern` - by [@​haines](https://redirect.github.com/haines ) in [https://github.com/vitest-dev/vitest/issues/6924 ](https://redirect.github.com/vitest-dev/vitest/issues/6924 ) [<samp>(ebfe9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ebfe942c )
- Support specifying a line number when filtering tests - by [@​mzhubail](https://redirect.github.com/mzhubail ) and [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6411 ](https://redirect.github.com/vitest-dev/vitest/issues/6411 ) [<samp>(4d94b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4d94b956 )
- Support location filters for suites - by [@​mzhubail](https://redirect.github.com/mzhubail ) in [https://github.com/vitest-dev/vitest/issues/7048 ](https://redirect.github.com/vitest-dev/vitest/issues/7048 ) [<samp>(751e2)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/751e2dce )
- **coverage**:
- `thresholds` to support maximum uncovered items - by [@​jonahkagan](https://redirect.github.com/jonahkagan ) in [https://github.com/vitest-dev/vitest/issues/7061 ](https://redirect.github.com/vitest-dev/vitest/issues/7061 ) [<samp>(bde98)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/bde98b6d )
- **expect**:
- Add `toHaveBeenCalledExactlyOnceWith` expect matcher - by [@​jacoberdman2147](https://redirect.github.com/jacoberdman2147 ) and [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6894 ](https://redirect.github.com/vitest-dev/vitest/issues/6894 ) [<samp>(ff662)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ff66206a )
- Add `toHaveBeenCalledAfter` and `toHaveBeenCalledBefore` utility - by [@​Barbapapazes](https://redirect.github.com/Barbapapazes ) and [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6056 ](https://redirect.github.com/vitest-dev/vitest/issues/6056 ) [<samp>(85e6f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/85e6f99f )
- Add `toSatisfy` asymmetric matcher - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7022 ](https://redirect.github.com/vitest-dev/vitest/issues/7022 ) [<samp>(f691a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f691ad76 )
- Add `toBeOneOf` matcher - by [@​zirkelc](https://redirect.github.com/zirkelc ) and [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6974 ](https://redirect.github.com/vitest-dev/vitest/issues/6974 ) [<samp>(3d742)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3d742b2b )
- **reporter**:
- Add support for function type to classname option in the junit reporter - by [@​jpleclerc](https://redirect.github.com/jpleclerc ), **Jean-Philippe Leclerc** and [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6839 ](https://redirect.github.com/vitest-dev/vitest/issues/6839 ) [<samp>(dc238)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/dc238e92 )
- **reporters**:
- `summary` option for `verbose` and `default` reporters - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/6893 ](https://redirect.github.com/vitest-dev/vitest/issues/6893 ) [<samp>(511b7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/511b73c7 )
- **runner**:
- Test context can inject values from the config's `provide` - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6813 ](https://redirect.github.com/vitest-dev/vitest/issues/6813 ) [<samp>(85c64)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/85c64e35 )
- Add "queued" state - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) and [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/6931 ](https://redirect.github.com/vitest-dev/vitest/issues/6931 ) [<samp>(5f8d2)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5f8d2091 )
- **snapshot**:
- Provide `config` to `resolveSnapshotPath` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6800 ](https://redirect.github.com/vitest-dev/vitest/issues/6800 ) [<samp>(746d8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/746d8986 )
- **ui**:
- Allow run individual tests/suites from the UI - by [@​userquin](https://redirect.github.com/userquin ) in [https://github.com/vitest-dev/vitest/issues/6641 ](https://redirect.github.com/vitest-dev/vitest/issues/6641 ) [<samp>(d9cc8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d9cc81dd )
- Make clicking on a test in the UI open the report section and scroll to the test failure if applicable - by [@​jacoberdman2147](https://redirect.github.com/jacoberdman2147 ) in [https://github.com/vitest-dev/vitest/issues/6900 ](https://redirect.github.com/vitest-dev/vitest/issues/6900 ) [<samp>(1bf27)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1bf27f0d )
- Allow hide/show node_modules in module graph tab - by [@​userquin](https://redirect.github.com/userquin ) in [https://github.com/vitest-dev/vitest/issues/7217 ](https://redirect.github.com/vitest-dev/vitest/issues/7217 ) [<samp>(50cf6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/50cf61b8 )
- **vitest**:
- Include `coverageMap` in json report - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6606 ](https://redirect.github.com/vitest-dev/vitest/issues/6606 ) [<samp>(9c8f7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9c8f7e3e )
- Add `onTestsRerun` method to global setup context - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6803 ](https://redirect.github.com/vitest-dev/vitest/issues/6803 ) [<samp>(e26e0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e26e066c )
##### 🐞 Bug Fixes
- Misc fix for vite 6 ecosystem ci - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6867 ](https://redirect.github.com/vitest-dev/vitest/issues/6867 ) [<samp>(80f8b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/80f8bbf4 )
- Respect `cacheDir` when optimizer is enabled - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6910 ](https://redirect.github.com/vitest-dev/vitest/issues/6910 ) [<samp>(0b08b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b08bc11 )
- Reset runningPromise after `finally` in case there is an error to avoid it getting stuck - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6951 ](https://redirect.github.com/vitest-dev/vitest/issues/6951 ) [<samp>(02194)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/021944cd )
- Revert support for Vite 6 - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) [<samp>(fbe5c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fbe5c39d )
- Support Node 21 - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) [<samp>(92f7a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/92f7a2ad )
- Don't use `Custom` type internally - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7032 ](https://redirect.github.com/vitest-dev/vitest/issues/7032 ) [<samp>(7957f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7957f912 )
- Persist cli filters as watch mode file filter - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6955 ](https://redirect.github.com/vitest-dev/vitest/issues/6955 ) [<samp>(cc703)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cc703362 )
- Don't use dim color for succeeded tests - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7059 ](https://redirect.github.com/vitest-dev/vitest/issues/7059 ) [<samp>(8a6f5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8a6f5f16 )
- Fix missing chai types - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7149 ](https://redirect.github.com/vitest-dev/vitest/issues/7149 ) [<samp>(6a09c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6a09cc3b )
- `cancelCurrentRun` awaits `runningPromise` - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7168 ](https://redirect.github.com/vitest-dev/vitest/issues/7168 ) [<samp>(1dbf5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1dbf5140 )
- Add Locator typings for nth, first and last. - by [@​xeger](https://redirect.github.com/xeger ) in [https://github.com/vitest-dev/vitest/issues/7176 ](https://redirect.github.com/vitest-dev/vitest/issues/7176 ) [<samp>(d262e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d262e059 )
- Batch console logs by microtask - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7183 ](https://redirect.github.com/vitest-dev/vitest/issues/7183 ) [<samp>(53d1d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/53d1d5f5 )
- Allow `getMockImplementation` to return "once" implementation - by [@​chaptergy](https://redirect.github.com/chaptergy ) in [https://github.com/vitest-dev/vitest/issues/7033 ](https://redirect.github.com/vitest-dev/vitest/issues/7033 ) [<samp>(39125)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3912554b )
- `capturePrintError` logger duplicate event handlers - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7197 ](https://redirect.github.com/vitest-dev/vitest/issues/7197 ) [<samp>(e89c3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e89c3693 )
- Allow slots in vitest-browser-vue - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7120 ](https://redirect.github.com/vitest-dev/vitest/issues/7120 ) [<samp>(2319f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2319f849 )
- Reset root workspace project on restart - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7238 ](https://redirect.github.com/vitest-dev/vitest/issues/7238 ) [<samp>(6e518)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6e51843a )
- Cleanup `vitest/reporters` entrypoint - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7241 ](https://redirect.github.com/vitest-dev/vitest/issues/7241 ) [<samp>(aec0b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/aec0b530 )
- Colors on `forks` pool - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7090 ](https://redirect.github.com/vitest-dev/vitest/issues/7090 ) [<samp>(8cab9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8cab9601 )
- Export `VitestRunner` type from `vitest/runners` - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7240 ](https://redirect.github.com/vitest-dev/vitest/issues/7240 ) [<samp>(9b218)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9b218854 )
- Return test fn result to runner - by [@​wmertens](https://redirect.github.com/wmertens ) in [https://github.com/vitest-dev/vitest/issues/7239 ](https://redirect.github.com/vitest-dev/vitest/issues/7239 ) [<samp>(48645)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/48645bf4 )
- Re-apply default conditions if using vite 6 or later - by [@​thebanjomatic](https://redirect.github.com/thebanjomatic ), **thebanjomatic** and [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7071 ](https://redirect.github.com/vitest-dev/vitest/issues/7071 ) [<samp>(84287)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/84287fc2 )
- Prevent infinite loop on prettyDOM calls - by [@​tsirlucas](https://redirect.github.com/tsirlucas ) in [https://github.com/vitest-dev/vitest/issues/7250 ](https://redirect.github.com/vitest-dev/vitest/issues/7250 ) [<samp>(a3a46)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a3a46a53 )
- **api**:
- Don't report events during `vitest list` - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7257 ](https://redirect.github.com/vitest-dev/vitest/issues/7257 ) [<samp>(1c2b2)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1c2b210d )
- **benchmark**:
- Disable type testing while benchmarking - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7068 ](https://redirect.github.com/vitest-dev/vitest/issues/7068 ) [<samp>(4e603)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4e60333d )
- Rewrite reporter without `log-update` - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7019 ](https://redirect.github.com/vitest-dev/vitest/issues/7019 ) [<samp>(6d23f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6d23f4b1 )
- **browser**:
- Improve source maps when `vi.mock` is present - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6810 ](https://redirect.github.com/vitest-dev/vitest/issues/6810 ) [<samp>(8d179)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8d179afc )
- Explain TypeScript support in docs and add asymmetric matchers to types - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/6934 ](https://redirect.github.com/vitest-dev/vitest/issues/6934 ) [<samp>(ac1a7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac1a7fdc )
- Fix matchers.d.ts - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6995 ](https://redirect.github.com/vitest-dev/vitest/issues/6995 ) [<samp>(a485b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a485b32b )
- Fix user event state on preview provider - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7041 ](https://redirect.github.com/vitest-dev/vitest/issues/7041 ) [<samp>(8e944)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8e94427e )
- Fix provider options types - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7115 ](https://redirect.github.com/vitest-dev/vitest/issues/7115 ) [<samp>(579bd)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/579bda97 )
- Only use locator.element on last expect.element attempt - by [@​tsirlucas](https://redirect.github.com/tsirlucas ) in [https://github.com/vitest-dev/vitest/issues/7139 ](https://redirect.github.com/vitest-dev/vitest/issues/7139 ) and [https://github.com/vitest-dev/vitest/issues/7152 ](https://redirect.github.com/vitest-dev/vitest/issues/7152 ) [<samp>(847d3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/847d3221 )
- Use correct project when filtering `entries` in the browser mode - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7167 ](https://redirect.github.com/vitest-dev/vitest/issues/7167 ) [<samp>(423d6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/423d6345 )
- Fix `console.time` with fake timers - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7207 ](https://redirect.github.com/vitest-dev/vitest/issues/7207 ) [<samp>(903f3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/903f3b9b )
- Add instance validation to resolve coverage error - by [@​DevJoaoLopes](https://redirect.github.com/DevJoaoLopes ) and [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7231 ](https://redirect.github.com/vitest-dev/vitest/issues/7231 ) [<samp>(1e791)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1e7915b5 )
- **coverage**:
- Exclude browser mode iframe results - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/6905 ](https://redirect.github.com/vitest-dev/vitest/issues/6905 ) [<samp>(e04a1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e04a1368 )
- Correct coverage when `isolate: false` is used - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/6957 ](https://redirect.github.com/vitest-dev/vitest/issues/6957 ) [<samp>(426ce)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/426ce6d8 )
- Prevent crash when v8 incorrectly merges static_initializer's - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7150 ](https://redirect.github.com/vitest-dev/vitest/issues/7150 ) [<samp>(cb6db)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cb6db13e )
- **deps**:
- Update all non-major dependencies - in [https://github.com/vitest-dev/vitest/issues/7085 ](https://redirect.github.com/vitest-dev/vitest/issues/7085 ) [<samp>(8cc92)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8cc92c2f )
- Update all non-major dependencies - in [https://github.com/vitest-dev/vitest/issues/7116 ](https://redirect.github.com/vitest-dev/vitest/issues/7116 ) [<samp>(de5ce)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/de5ce3d9 )
- Update dependency pathe to v2 - in [https://github.com/vitest-dev/vitest/issues/7181 ](https://redirect.github.com/vitest-dev/vitest/issues/7181 ) [<samp>(74dbe)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/74dbe03f )
- **diff**:
- Truncate to avoid crash on diff large objects - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7133 ](https://redirect.github.com/vitest-dev/vitest/issues/7133 ) [<samp>(2a9d6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2a9d67a2 )
- **junit**:
- Fix testsuites time to be sum of all testsuite items - by [@​saitonakamura](https://redirect.github.com/saitonakamura ) in [https://github.com/vitest-dev/vitest/issues/6985 ](https://redirect.github.com/vitest-dev/vitest/issues/6985 ) [<samp>(ca37a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ca37a06a )
- **pretty-format**:
- Support react 19 - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6909 ](https://redirect.github.com/vitest-dev/vitest/issues/6909 ) [<samp>(bd29b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/bd29bcc7 )
- **reporters**:
- Write buffered stdout/stderr on process exit - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/6932 ](https://redirect.github.com/vitest-dev/vitest/issues/6932 ) [<samp>(80cde)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/80cde2a0 )
- Rewrite `dot` reporter without `log-update` - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/6943 ](https://redirect.github.com/vitest-dev/vitest/issues/6943 ) [<samp>(be969)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/be969cfb )
- Check `--hideSkippedTests` in base reporter - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/6988 ](https://redirect.github.com/vitest-dev/vitest/issues/6988 ) [<samp>(721a5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/721a5b84 )
- Show `retry` and `repeats` counts - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) and [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7004 ](https://redirect.github.com/vitest-dev/vitest/issues/7004 ) [<samp>(3496a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3496a015 )
- **runner**:
- Long synchronous tasks does not time out - by [@​ferdodo](https://redirect.github.com/ferdodo ) and [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/2920 ](https://redirect.github.com/vitest-dev/vitest/issues/2920 ) and [https://github.com/vitest-dev/vitest/issues/6944 ](https://redirect.github.com/vitest-dev/vitest/issues/6944 ) [<samp>(2fb58)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2fb585ae )
- Mark tests of `describe.todo` as `'todo'` - by [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7171 ](https://redirect.github.com/vitest-dev/vitest/issues/7171 ) [<samp>(1d458)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1d458955 )
- **snapshot**:
- Fix "obsolete" message on snapshot update re-run - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7129 ](https://redirect.github.com/vitest-dev/vitest/issues/7129 ) [<samp>(c2beb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c2beb8ca )
- Preserve white space of `toMatchFileSnapshot` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7156 ](https://redirect.github.com/vitest-dev/vitest/issues/7156 ) [<samp>(a437b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a437b656 )
- Fix obsoleteness check of `toMatchSnapshot("...")` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7126 ](https://redirect.github.com/vitest-dev/vitest/issues/7126 ) [<samp>(ac9ba)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac9ba151 )
- **typecheck**:
- Fix typecheck collect on Vite 6 - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6972 ](https://redirect.github.com/vitest-dev/vitest/issues/6972 ) [<samp>(7b35d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7b35d13a )
- Use unique temp and tsbuildinfo file for each tsconfig file - by [@​masnormen](https://redirect.github.com/masnormen ) in [https://github.com/vitest-dev/vitest/issues/7107 ](https://redirect.github.com/vitest-dev/vitest/issues/7107 ) and [https://github.com/vitest-dev/vitest/issues/7112 ](https://redirect.github.com/vitest-dev/vitest/issues/7112 ) [<samp>(61b30)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/61b30162 )
- Fix error test case mapping for `@ts-expect-error` - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7125 ](https://redirect.github.com/vitest-dev/vitest/issues/7125 ) [<samp>(27d34)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/27d340aa )
- **types**:
- Make parameters non-nullable for Playwright options - by [@​apple-yagi](https://redirect.github.com/apple-yagi ) in [https://github.com/vitest-dev/vitest/issues/6989 ](https://redirect.github.com/vitest-dev/vitest/issues/6989 ) [<samp>(fe2a1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fe2a187f )
- **ui**:
- Wrong module graph when generating html.meta.json.gz in browser mode - by [@​userquin](https://redirect.github.com/userquin ) in [https://github.com/vitest-dev/vitest/issues/7214 ](https://redirect.github.com/vitest-dev/vitest/issues/7214 ) [<samp>(dccdd)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/dccdd550 )
- Add errors and draft state (\*) to the code editor - by [@​userquin](https://redirect.github.com/userquin ) in [https://github.com/vitest-dev/vitest/issues/7044 ](https://redirect.github.com/vitest-dev/vitest/issues/7044 ) [<samp>(faca4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/faca4de8 )
- **vite-node**:
- Fix error stack on Windows - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/6786 ](https://redirect.github.com/vitest-dev/vitest/issues/6786 ) [<samp>(bf7b3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/bf7b36ac )
- Properly normalize file url import - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7087 ](https://redirect.github.com/vitest-dev/vitest/issues/7087 ) [<samp>(31675)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/31675e3b )
- Fix mandatory node prefix - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa ) in [https://github.com/vitest-dev/vitest/issues/7179 ](https://redirect.github.com/vitest-dev/vitest/issues/7179 ) [<samp>(b6284)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b6284642 )
- **watch**:
- Don't indicate exit when no matching files - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) and [@​AriPerkkio](https://redirect.github.com/AriPerkkio ) in [https://github.com/vitest-dev/vitest/issues/7246 ](https://redirect.github.com/vitest-dev/vitest/issues/7246 ) [<samp>(003c0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/003c0bef )
- **workspace**:
- `extends: true` correctly inherits all root config properties - by [@​sheremet-va](https://redirect.github.com/sheremet-va ) in [https://github.com/vitest-dev/vitest/issues/7232 ](https://redirect.github.com/vitest-dev/vitest/issues/7232 ) [<samp>(798c0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/798c0da2 )
##### [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v2.1.8...v3.0.0 )
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-01-18 16:27:22 +00:00
fundon
7436c139ab
fix(core): improve doc title and icon display ( #9755 )
...
Closes: [AF-2132](https://linear.app/affine-design/issue/AF-2132/优化-emoji-title-和-icon-显示 )
2025-01-18 17:29:15 +08:00
zzj3720
95c0f59d96
refactor(editor): remove database-service ( #9769 )
...
close: BS-2426
2025-01-18 05:36:15 +00:00
L-Sun
ad814a0f4f
feat(editor): add sidebar service ( #9761 )
2025-01-17 23:42:50 +08:00
L-Sun
d8727c2001
fix(editor): close embed edit modal on editor unmount ( #9765 )
...
Close [BS-2436](https://linear.app/affine-design/issue/BS-2436/should-close-embed-card-edit-modal-after-editor-unmount )
### What Changes:
- fix(editor): close embed edit modal on editor unmount
- test(editor): add test to embed edit modal when switching mode
2025-01-17 11:53:09 +00:00
donteatfriedrice
df910d7013
feat(editor): add affine inline footnote ( #9745 )
...
[BS-2369](https://linear.app/affine-design/issue/BS-2369/新增-affinetextattribute-footnote ) [BS-2370](https://linear.app/affine-design/issue/BS-2370/支持-footnote-自定义渲染行内内容 ) [BS-2372](https://linear.app/affine-design/issue/BS-2372/提供-footnoteconfigextension ) [BS-2375](https://linear.app/affine-design/issue/BS-2375/footnote-自定义渲染-popup )
### Add new AffineTextAttribute: footnote
```
/**
* FootNote is used to reference a doc, attachment or url.
*/
export interface AffineTextAttributes {
...
footnote?: {
label: string; // label of the footnote
reference: {
type: 'doc' | 'attachment' | 'url'; // type of reference
docId?: string; // the id of the reference doc
url?: string; // the url of the reference network resource
blobId?: string; // the id of the reference attachment
fileName?: string; // the name of the reference attachment
fileType?: string; // the type of the reference attachment
}
} | null
}
```
### FootNoteNodeConfigProvider Extension
#### FootNoteNodeConfig Type Definition
```
type FootNoteNodeRenderer = (
footnote: FootNote,
std: BlockStdScope
) => TemplateResult<1>;
type FootNotePopupRenderer = (
footnote: FootNote,
std: BlockStdScope,
abortController: AbortController
) => TemplateResult<1>;
export interface FootNoteNodeConfig {
customNodeRenderer?: FootNoteNodeRenderer;
customPopupRenderer?: FootNotePopupRenderer;
interactive?: boolean;
hidePopup?: boolean;
}
```
#### FootNoteNodeConfigProvider Class
```
export class FootNoteNodeConfigProvider {
private _customNodeRenderer?: FootNoteNodeRenderer;
private _customPopupRenderer?: FootNotePopupRenderer;
private _hidePopup: boolean;
private _interactive: boolean;
get customNodeRenderer() {
return this._customNodeRenderer;
}
get customPopupRenderer() {
return this._customPopupRenderer;
}
get doc() {
return this.std.store;
}
get hidePopup() {
return this._hidePopup;
}
get interactive() {
return this._interactive;
}
constructor(
config: FootNoteNodeConfig,
readonly std: BlockStdScope
) {
this._customNodeRenderer = config.customNodeRenderer;
this._customPopupRenderer = config.customPopupRenderer;
this._hidePopup = config.hidePopup ?? false;
this._interactive = config.interactive ?? true;
}
setCustomNodeRenderer(renderer: FootNoteNodeRenderer) {
this._customNodeRenderer = renderer;
}
setCustomPopupRenderer(renderer: FootNotePopupRenderer) {
this._customPopupRenderer = renderer;
}
setHidePopup(hidePopup: boolean) {
this._hidePopup = hidePopup;
}
setInteractive(interactive: boolean) {
this._interactive = interactive;
}
}
```
#### FootNoteNodeConfigProvider Extension
```
export const FootNoteNodeConfigIdentifier =
createIdentifier<FootNoteNodeConfigProvider>('AffineFootNoteNodeConfig');
export function FootNoteNodeConfigExtension(
config: FootNoteNodeConfig
): ExtensionType {
return {
setup: di => {
di.addImpl(
FootNoteNodeConfigIdentifier,
provider =>
new FootNoteNodeConfigProvider(config, provider.get(StdIdentifier))
);
},
};
}
```
The footnote node can be extended by this extension.
### FootnoteInlineSpec
```
export const FootNoteInlineSpecExtension = InlineSpecExtension(
'footnote',
provider => {
const std = provider.get(StdIdentifier);
const config =
provider.getOptional(FootNoteNodeConfigIdentifier) ?? undefined;
return {
name: 'footnote',
schema: FootNoteSchema.optional().nullable().catch(undefined),
match: delta => {
return !!delta.attributes?.footnote;
},
renderer: ({ delta }) => {
return html`<affine-footnote-node
.delta=${delta}
.std=${std}
.config=${config}
></affine-footnote-node>`;
},
embed: true,
};
}
);
```
2025-01-17 09:38:43 +00:00
CatsJuice
7d1d167858
chore: bump theme ( #9732 )
2025-01-17 09:22:15 +00:00
zzj3720
aa21ac6d64
refactor(editor): move database selection into the corresponding view ( #9752 )
2025-01-17 09:03:13 +00:00
doouding
b350dd1580
fix: legacy e2e test debug ( #9746 )
2025-01-17 04:26:59 +00:00
L-Sun
c2149f218b
refactor(editor): enable toc dragging in page mode ( #9736 )
...
Related [BS-2322](https://linear.app/affine-design/issue/BS-2322/toc-排序坏掉部分的修复 )
2025-01-16 17:53:28 +00:00
EYHN
a2ffdb4047
feat(core): new worker workspace engine ( #9257 )
2025-01-16 16:22:18 +00:00
pengx17
7dc470e7ea
feat(core): add new bs dnd adapter ( #9717 )
2025-01-16 13:54:50 +00:00
doouding
99717196c5
refactor: rewrite blocksuite dnd ( #9595 )
...
### Changed
- Refactored BlockSuite drag-and-drop using @atlaskit/pragmatic-drag-and-drop/element/adapter.
- Updated block dragging to use the new drag-and-drop infrastructure.
### BlockSuite DND API
Access the BlockSuite drag-and-drop API via `std.dnd`. This is a lightweight wrapper around pragmatic-drag-and-drop, offering convenient generic types and more intuitive option names.
#### Drag payload structure
There's some constrain about drag payload. The whole drag payload looks like this:
```typescript
type DragPayload = {
entity: {
type: string
},
from: {
at: 'blocksuite',
docId: string
}
}
```
- The `from` field is auto-generated—no need for manual handling.
- The `entity` field is customizable, but it must include a `type`.
All drag-and-drop methods accept a generic type for entity, ensuring more accurate payloads in event handlers.
```typescript
type BlockEntity = {
type: 'blocks',
blockIds: string[]
}
dnd.draggable<BlockEntity>({
element: someElement,
setDragData: () => {
// the return type must satisfy the generic type
// in this case, it's BlockEntity
return {
type: 'blocks',
blockIds: []
}
}
});
dnd.monitor<BlockEntity>({
// the arguments is same for other event handler
onDrag({ source }) {
// the type of this is BlockEntity
source.data.entity
}
})
```
#### Drop payload
When hover on droppable target. You can set drop payload as well. All drag-and-drop methods accept a second generic type for drop payload.
The drop payload is customizable. Additionally, the DND system will add an `edge` field to the final payload object, indicating the nearest edge of the drop target relative to the current drag position.
```typescript
type DropPayload = {
blockId: string;
}
dnd.dropTarget<BlockEntity, DropPayload>({
getData() {
// the type should be DropPayload
return {
blockId: 'someId'
}
}
});
dnd.monitor<BlockEntity, DropPayload>({
// drag over on drop target
onDrag({ location }) {
const target = location.current.dropTargets[0];
// the type is DropPayload
target.data;
// retrieve the nearest edge of the drop target relative to the current drop position.
target.data.edge;
}
})
```
2025-01-16 12:36:58 +00:00
renovate
908afe19ee
chore: bump up file-type version to v20 ( #9731 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [file-type](https://redirect.github.com/sindresorhus/file-type ) | [`^19.6.0` -> `^20.0.0`](https://renovatebot.com/diffs/npm/file-type/19.6.0/20.0.0 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
| [file-type](https://redirect.github.com/sindresorhus/file-type ) | [`^19.5.0` -> `^20.0.0`](https://renovatebot.com/diffs/npm/file-type/19.6.0/20.0.0 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>sindresorhus/file-type (file-type)</summary>
### [`v20.0.0`](https://redirect.github.com/sindresorhus/file-type/releases/tag/v20.0.0 )
[Compare Source](https://redirect.github.com/sindresorhus/file-type/compare/v19.6.0...v20.0.0 )
##### Breaking
- Drop MIME-type and extension enumeration in types ([#​693](https://redirect.github.com/sindresorhus/file-type/issues/693 )) [`0ff11c6`](https://redirect.github.com/sindresorhus/file-type/commit/0ff11c6 )
- Remove `NodeFileTypeParser` in favor of using `FileTypeParser` on all platforms ([#​707](https://redirect.github.com/sindresorhus/file-type/issues/707 )) [`ff8eed8`](https://redirect.github.com/sindresorhus/file-type/commit/ff8eed8 )
##### Improvements
- Give API access to `FileTypeParser#detectors` ([#​704](https://redirect.github.com/sindresorhus/file-type/issues/704 )) [`7e72bbc`](https://redirect.github.com/sindresorhus/file-type/commit/7e72bbc )
- Improve Nikon RAW NEF (Tiff) format detection ([#​670](https://redirect.github.com/sindresorhus/file-type/issues/670 )) [`cf6fc1e`](https://redirect.github.com/sindresorhus/file-type/commit/cf6fc1e )
- Add support for Java archive (`.jar`) ([#​719](https://redirect.github.com/sindresorhus/file-type/issues/719 )) [`8651809`](https://redirect.github.com/sindresorhus/file-type/commit/8651809 )
- Add support for MSOffice macro-enabled docs and templates ([#​720](https://redirect.github.com/sindresorhus/file-type/issues/720 )) [`7fe5667`](https://redirect.github.com/sindresorhus/file-type/commit/7fe5667 )
- Add support for OpenDocument graphics and templates ([#​718](https://redirect.github.com/sindresorhus/file-type/issues/718 )) [`4db407d`](https://redirect.github.com/sindresorhus/file-type/commit/4db407d )
- Add support for Microsoft Excel template with macros (.xltm) ([#​714](https://redirect.github.com/sindresorhus/file-type/issues/714 )) [`1fe621a`](https://redirect.github.com/sindresorhus/file-type/commit/1fe621a )
- Add support for Microsoft Word template (.dotx) ([#​713](https://redirect.github.com/sindresorhus/file-type/issues/713 )) [`643ef78`](https://redirect.github.com/sindresorhus/file-type/commit/643ef78 )
- Add support for Microsoft Excel template (`.xltx`) ([#​712](https://redirect.github.com/sindresorhus/file-type/issues/712 )) [`0dab3e0`](https://redirect.github.com/sindresorhus/file-type/commit/0dab3e0 )
- Add support for Microsoft PowerPoint template ( `.potx`) ([#​710](https://redirect.github.com/sindresorhus/file-type/issues/710 )) [`f978619`](https://redirect.github.com/sindresorhus/file-type/commit/f978619 )
- Add support for ZIP decompression using `@tokenizer/inflate` ([#​695](https://redirect.github.com/sindresorhus/file-type/issues/695 )) [`399b0f1`](https://redirect.github.com/sindresorhus/file-type/commit/399b0f1 )
- Add support for `.lz4` file format ([#​706](https://redirect.github.com/sindresorhus/file-type/issues/706 )) [`74acf94`](https://redirect.github.com/sindresorhus/file-type/commit/74acf94 )
- Add support for format `.drc`, Google's Draco 3D Data Compression ([#​702](https://redirect.github.com/sindresorhus/file-type/issues/702 )) [`e99257d`](https://redirect.github.com/sindresorhus/file-type/commit/e99257d )
##### Fixes
- Fix code sequence "File Type Box" detection ([#​705](https://redirect.github.com/sindresorhus/file-type/issues/705 )) [`7d4dd8d`](https://redirect.github.com/sindresorhus/file-type/commit/7d4dd8d )
***
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-01-16 10:08:14 +00:00
fundon
268e89911a
perf(editor): fix autoUpdate being continuously added when updating selections ( #9727 )
...
Since `updated` is triggered every time click or update the selection, `autoUpdate` will be continuously added.
Case: select text and `Shift+ArrowLeft/ArrowRight`
2025-01-16 09:05:10 +00:00
L-Sun
969ac30874
fix(editor): reactive heading icon ( #9729 )
...
Close [BS-2407](https://linear.app/affine-design/issue/BS-2407/[bug]-edgeless-里选中-title-后更改,hint-没有改变 )
2025-01-16 08:32:15 +00:00
doodlewind
509cdfd7bf
fix(editor): playground font inconsistency ( #9728 )
2025-01-16 08:16:13 +00:00
fundon
676f855564
fix(editor): stop paste-copy event bubbling on bookmark modal ( #9713 )
...
Closes: [BS-2402](https://linear.app/affine-design/issue/BS-2402/bookmark-没法粘贴修改标题,会跑到下一行 )
2025-01-16 06:34:09 +00:00
L-Sun
94c9717a35
feat(editor): edgeless page block toolbar ( #9707 )
...
Close [BS-2315](https://linear.app/affine-design/issue/BS-2315/page-block-header )
### What Changes
- Add header toolbar to page block (the first note in canvas)
- Add e2e tests
- Add some edgeless e2e test utils. **The package `@blocksuite/affine` was added to `"@affine-test/kit"`**
2025-01-15 12:04:44 +00:00
fundon
0b2d11e6b1
fix(editor): text highlighting ( #9708 )
2025-01-15 10:57:27 +00:00
fundon
7002289c58
fix(editor): avoid drag and drag over updating drag indicator at the same time ( #9656 )
...
* add a `dragging` signal to the file drop manager
* `drag over` logic should not be triggered when inside app
* avoid drag and drag over updating `drag indicator` at the same time
2025-01-15 08:10:08 +00:00
donteatfriedrice
4f421efb22
fix(editor): init default theme observer value according to data-theme ( #9698 )
2025-01-15 04:04:06 +00:00
zzj3720
ff295f383f
refactor(editor): enable the noUncheckedIndexedAccess rule for the block-database package ( #9691 )
...
close: BS-2269
2025-01-14 14:35:46 +00:00
donteatfriedrice
aa2a8fbf9b
fix(editor): adapters panel type ( #9690 )
2025-01-14 11:02:00 +00:00
Yifeng Wang
777eea124d
fix(editor): migrate basic playground examples ( #9669 )
2025-01-13 23:33:10 +08:00
zzj3720
80f8944188
fix(editor): should not update table selection after table is destroyed ( #9665 )
2025-01-13 10:43:02 +00:00
fundon
7e5e6031e8
chore(editor): update default colors of shape ( #9633 )
...
Closes: [PD-2176](https://linear.app/affine-design/issue/PD-2176/edgeless-shape默认颜色调整 )
* updates shape's text color to the `#000000ff` and custom button should be selected by default in color picker
* updates shape background default color palette to `medium`
<img width="727" alt="Screenshot 2025-01-13 at 11 07 14" src="https://github.com/user-attachments/assets/81962741-0dbc-4990-8eec-db5e48624305 " />
<img width="444" alt="Screenshot 2025-01-13 at 11 07 09" src="https://github.com/user-attachments/assets/2d119e33-635e-4bd4-826f-e3094c8a3fa2 " />
<img width="764" alt="Screenshot 2025-01-13 at 11 08 14" src="https://github.com/user-attachments/assets/09f5c778-0e25-4972-8529-8d8323c27594 " />
2025-01-13 10:19:58 +00:00
zzj3720
810e656174
fix(editor): add shift middleware for tag select panel ( #9664 )
...
fix: BS-1749
2025-01-13 09:05:05 +00:00
Brooooooklyn
e72371d15c
style: use typescript resolver for eslint import plugin ( #9662 )
2025-01-13 05:56:29 +00:00
donteatfriedrice
5c4e87ddb5
feat(editor): support text highlight html adapter ( #9632 )
...
[BS-2061](https://linear.app/affine-design/issue/BS-2061/html-adapter-支持-text-highlight-样式 )
2025-01-13 02:20:58 +00:00
Saul-Mirone
5b9256712e
chore(editor): remove unused awareness slot ( #9640 )
2025-01-11 04:27:45 +00:00
Mirone
446b31b621
refactor(editor): rename job to transformer ( #9639 )
2025-01-11 12:04:07 +08:00
fundon
9fa35ed490
fix(editor): drag indicator flickering ( #9636 )
2025-01-11 03:15:07 +00:00
zzj3720
c016f8e37e
feat(editor): support linked-doc in rich-text column ( #9634 )
...
close: BS-2345
2025-01-10 14:43:40 +00:00
zzj3720
cc08094b17
feat(editor): improve group title display for checkbox columns ( #9622 )
...
close: BS-1977
2025-01-10 14:01:12 +00:00
fundon
0b3dba614d
perf(editor): optimize the search for the closest element ( #9587 )
...
Closes: [BS-2275](https://linear.app/affine-design/issue/BS-2275/拖拽-indicator-查找优化 )
2025-01-10 08:21:10 +00:00
EYHN
18ff7500c8
fix(core): fix menu not close when click outside ( #9535 )
2025-01-10 08:04:49 +00:00
zzj3720
8e8058a44c
feat(editor): support pasting Excel data into database block ( #9618 )
...
close: BS-2338
2025-01-09 14:35:19 +00:00
Saul-Mirone
6feb4def2f
fix(editor): exisiting slice import should be move instead of add ( #9616 )
...
Closes: [BS-2339](https://linear.app/affine-design/issue/BS-2339/%E6%8B%96%E6%8B%BD%E9%87%8A%E6%94%BE%E5%90%8E%E7%9A%84%E4%BD%8D%E7%BD%AE%E4%B8%8D%E5%AF%B9 )
2025-01-09 12:14:54 +00:00
Saul-Mirone
126ab18967
feat(editor): selection as store extension ( #9605 )
2025-01-09 11:49:23 +00:00
zzj3720
b23e980250
fix(editor): prototype-polluting assignment ( #9606 )
2025-01-09 08:20:26 +00:00
pengx17
f78857bb11
feat(editor): add more open doc options to editor toolbar ( #9588 )
...
fix AF-2036, AF-2092
2025-01-09 08:04:21 +00:00
doodlewind
890a962196
chore(editor): fix playground vscode tsc warning ( #9603 )
2025-01-09 07:49:16 +00:00
zzj3720
f46a7a073a
fix(editor): component name for the mobile menu is incorrect ( #9604 )
2025-01-09 07:32:49 +00:00
Yifeng Wang
cac0b7fd66
refactor(editor): remove default entry ( #9600 )
2025-01-09 14:01:48 +08:00
Saul-Mirone
422bac6cbe
refactor(editor): remove readonly in awareness ( #9597 )
2025-01-09 05:15:35 +00:00
Saul-Mirone
d21ef47ae8
chore(editor): rename std.doc to std.store ( #9596 )
2025-01-09 04:16:28 +00:00
akumatus
58ce86533e
feat(core): support ai network search ( #9357 )
...
### What Changed?
- Add `PerplexityProvider` in backend.
- Update session prompt name if user toggle network search mode in chat panel.
- Add experimental flag for AI network search feature.
- Add unit tests and e2e tests.
Search results are streamed and appear word for word:
<div class='graphite__hidden'>
<div>🎥 Video uploaded on Graphite:</div>
<a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov ">
<img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov ">
</a>
</div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56f6ec7b-4b21-405f-9612-43e083f6fb84.mov ">录屏2024-12-27 18.58.40.mov</video>
Click the little globe icon to manually turn on/off Internet search:
<div class='graphite__hidden'>
<div>🎥 Video uploaded on Graphite:</div>
<a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov ">
<img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov ">
</a>
</div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/778f1406-bf29-498e-a90d-7dad813392d1.mov ">录屏2024-12-27 19.01.16.mov</video>
When there is an image, it will automatically switch to the openai model:
<div class='graphite__hidden'>
<div>🎥 Video uploaded on Graphite:</div>
<a href="https://app.graphite.dev/media/video/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov ">
<img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov ">
</a>
</div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/56431d8e-75e1-4d84-ab4a-b6636042cc6a.mov ">录屏2024-12-27 19.02.13.mov</video>
2025-01-09 04:00:59 +00:00
Yifeng Wang
4f10457815
refactor(editor): remove legacy console formatter ( #9599 )
2025-01-09 12:00:08 +08:00
doodlewind
e269cce141
refactor(editor): playground doc collection typing migration ( #9593 )
2025-01-09 03:07:43 +00:00