vitest-plugin-vis 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +745 -0
  2. package/package.json +3 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,745 @@
1
+ # vitest-plugin-vis
2
+
3
+ ## 5.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#947](https://github.com/repobuddy/visual-testing/pull/947) [`25d682c`](https://github.com/repobuddy/visual-testing/commit/25d682c8aa740a93b0e7a38a74d162b59d479b56) Thanks [@unional](https://github.com/unional)! - Include `CHANGELOG.md` in the published package.
8
+
9
+ ## 5.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#920](https://github.com/repobuddy/visual-testing/pull/920) [`6c2e58e`](https://github.com/repobuddy/visual-testing/commit/6c2e58e33effd2b74b0156677f5520c6e633ba46) Thanks [@unional](https://github.com/unional)! - When an image snapshot mismatches, find the changed regions and write a review image.
14
+
15
+ The failure message now lists the changed regions (`Changed:`) and points to a review image (`Review:`).
16
+ The review image (`<name>.review.png`, next to the diff) places the baseline, result, and diff crops of each region side by side,
17
+ so a person or a coding agent can see what changed without opening the full images.
18
+ The regions are also written to `<name>.regions.json` next to the diff.
19
+ The review image is skipped, and the message says why, when the image size changed, there are more than 5 regions, or the regions cover more than half of the image.
20
+
21
+ Set `reviewImage: false` in `vis()` or `toMatchImageSnapshot()` to not write the review image.
22
+
23
+ The Storybook Vis panel does not list the review image as a diff.
24
+
25
+ ### Patch Changes
26
+
27
+ - [#926](https://github.com/repobuddy/visual-testing/pull/926) [`013d9b6`](https://github.com/repobuddy/visual-testing/commit/013d9b619be2263bd44f0b4f10a9f9b6beaaa66b) Thanks [@unional](https://github.com/unional)! - Ship an `llms.txt` in each package so coding agents can find the entry points and documentation pages.
28
+ It points agents to the new "Reviewing Failures with Agents" page, which tells them to open the review image of a failed image snapshot first, and shows what each view costs in tokens.
29
+
30
+ Each package is also an agent plugin for Claude Code, Cursor, Codex and Copilot CLI.
31
+ It ships the `review-image-snapshot-failures` skill, which tells an agent to read the error message and the review image before it opens a full image.
32
+
33
+ - [#946](https://github.com/repobuddy/visual-testing/pull/946) [`65e4177`](https://github.com/repobuddy/visual-testing/commit/65e417723162b80d82a807194bd6336d3f575202) Thanks [@dub578](https://github.com/dub578)! - Decode images in `toImageData` with `createImageBitmap` and close the bitmap after reading the pixels.
34
+
35
+ `new Image()` + `drawImage` left a full-size decode in Chromium's image decode cache for every compared image,
36
+ so renderer memory grew with each image snapshot comparison.
37
+
38
+ ## 5.1.8
39
+
40
+ ### Patch Changes
41
+
42
+ - [#904](https://github.com/repobuddy/visual-testing/pull/904) [`fd37087`](https://github.com/repobuddy/visual-testing/commit/fd37087fea1b43eb6114d05cfda1fc9535dd00d5) Thanks [@unional](https://github.com/unional)! - Update `type-plus` to 8.0.0.
43
+
44
+ ## 5.1.7
45
+
46
+ ### Patch Changes
47
+
48
+ - [#889](https://github.com/repobuddy/visual-testing/pull/889) [`b770cfe`](https://github.com/repobuddy/visual-testing/commit/b770cfe37da3161c393d6414cea202fe33114b34) Thanks [@unional](https://github.com/unional)! - Fix auto snapshots hanging until the test timeout when `subject` matches a hidden element.
49
+
50
+ The `subject` selector was resolved with `document.querySelector()`, which returns the first match even when it is hidden. In Storybook, a selector such as `button` matched hidden buttons that Storybook adds to the document, so the screenshot waited for that element to become visible until the timeout. Auto snapshots now use the first visible match.
51
+
52
+ If the selector matches only hidden elements, the snapshot now fails right away with a "not visible" error instead of waiting until the timeout. If it matches nothing, `document.body` is still used.
53
+
54
+ - [#890](https://github.com/repobuddy/visual-testing/pull/890) [`affac03`](https://github.com/repobuddy/visual-testing/commit/affac0311460f56d3d1c951b6d178445a73fd790) Thanks [@unional](https://github.com/unional)! - Trim leading and trailing whitespace from test and suite names when building the snapshot path ([#847](https://github.com/repobuddy/visual-testing/issues/847)).
55
+
56
+ Storybook appends two spaces to the `describe` title it generates for a CSF Next story that uses `story.test()`. Those spaces became two dashes in the snapshot folder name, so the snapshots landed under `<story>--/`.
57
+
58
+ Snapshots of `story.test()` stories now land under `<story>/`. Move or regenerate the existing baselines from `<story>--/` to `<story>/`. Snapshot paths of plain stories and regular tests do not change.
59
+
60
+ ## 5.1.6
61
+
62
+ ### Patch Changes
63
+
64
+ - [#885](https://github.com/repobuddy/visual-testing/pull/885) [`b674dfe`](https://github.com/repobuddy/visual-testing/commit/b674dfe38412b252f0b6a5a79cbcce4183b17a8f) Thanks [@unional](https://github.com/unional)! - Update `type-plus` to `8.0.0-beta.12`.
65
+
66
+ `type-plus` 8.0.0-beta.12 no longer exports the distributive `Pick` and `Omit` from its root.
67
+ The public types now use `ObjectPlus.Pick` and `ObjectPlus.Omit`, which behave the same.
68
+
69
+ ## 5.1.5
70
+
71
+ ### Patch Changes
72
+
73
+ - [#870](https://github.com/repobuddy/visual-testing/pull/870) [`5c2970c`](https://github.com/repobuddy/visual-testing/commit/5c2970c8f2069512dc136ca9e5edd25def39f7db) Thanks [@unional](https://github.com/unional)! - Pin `type-plus` to `8.0.0-beta.10`, exactly.
74
+
75
+ Both packages already declared `type-plus: ^8.0.0-beta.10` in the last published release
76
+ (`storybook-addon-vis@4.2.7`, `vitest-plugin-vis@5.1.4`), so this is a range tightening,
77
+ not a version move: `type-plus` 8's `typescript >= 5.6.0` peer already reaches consumers
78
+ today, and this change does not alter what a fresh install resolves — it only forecloses
79
+ later `8.0.0-beta.x` prereleases plus `8.0.0` and `8.1.0`.
80
+
81
+ The version is pinned rather than caret-ranged. `^8.0.0-beta.10` resolves to
82
+ `>=8.0.0-beta.10 <9.0.0-0`, which admits every later 8.0.0 prerelease as well as `8.0.0`
83
+ and `8.1.0` — and 8 is a prerelease line where breaking changes land between betas
84
+ (beta.10 to beta.11 changed `Equal`'s signature and removed `isType.f`). An exact version
85
+ makes each bump a reviewable PR instead of something a lockfile refresh can do silently.
86
+ Move back to a caret when 8.0.0 is stable.
87
+
88
+ `type-plus` types leak into each package's emitted declarations:
89
+ `storybook-addon-vis`'s `dist/exports/vitest-plugin.d.mts` imports `Omit` from
90
+ `type-plus`; `vitest-plugin-vis`'s `dist/shared/commands.types.d.mts` and
91
+ `dist/server/testing/stubSuite.d.mts` import `Pick` and `RecursivePartial`. None of
92
+ these symbols changed between 7 and 8, so no source change was needed.
93
+
94
+ ## 5.1.4
95
+
96
+ ### Patch Changes
97
+
98
+ - [#861](https://github.com/repobuddy/visual-testing/pull/861) [`ee4464a`](https://github.com/repobuddy/visual-testing/commit/ee4464a4ef9e407d8e99c2abcf3387e0e1750b91) Thanks [@unional](https://github.com/unional)! - Depend on `type-plus` `^8.0.0-beta.10` — back on the 8.x line, as a range.
99
+
100
+ The previous release moved both packages to `^7.6.2`. That was the wrong fix.
101
+ These packages belong on the 8.x line; what was actually broken was that the
102
+ dependency was an *exact* pin (`8.0.0-beta.8`), so it could never resolve
103
+ forward and consumers were stuck on a build with a real CJS packaging defect:
104
+ `8.0.0-beta.8` declares `"type": "module"` but ships a `cjs/` build with no
105
+ `{"type":"commonjs"}` marker, so `require()` of these packages failed with
106
+ `ReferenceError: exports is not defined in ES module scope`.
107
+
108
+ `type-plus@8.0.0-beta.10` ships that `cjs/package.json` marker and fixes it. The
109
+ dependency is now the range `^8.0.0-beta.10` rather than a pin, so later 8.x
110
+ betas and stable 8.x flow in on their own instead of freezing at one build.
111
+
112
+ The root barrel of `8.0.0-beta.10` is byte-identical to `8.0.0-beta.8`'s, so
113
+ there is no API change between the two. The local `Merge` alias in
114
+ `vis_server_context.types.ts` stays as-is; it is version-independent.
115
+
116
+ ## 5.1.3
117
+
118
+ ### Patch Changes
119
+
120
+ - [#859](https://github.com/repobuddy/visual-testing/pull/859) [`62026f5`](https://github.com/repobuddy/visual-testing/commit/62026f5bca4718b34d53495e2934f62645a20d66) Thanks [@unional](https://github.com/unional)! - Stop the `server` proxy from throwing before the vitest browser module loads.
121
+
122
+ `server`'s `get` trap fell back to `(ctx?.server as any)[prop]`. The optional
123
+ chain guards `ctx`, but the property access straight after it does not, so any
124
+ read of `server.<prop>` before the dynamic `import('vitest/browser')` settled —
125
+ or outside a browser run, where it never settles — threw
126
+ `TypeError: Cannot read properties of undefined` instead of returning
127
+ `undefined`. The fallback is now optional too.
128
+
129
+ ## 5.1.2
130
+
131
+ ### Patch Changes
132
+
133
+ - [#851](https://github.com/repobuddy/visual-testing/pull/851) [`5364614`](https://github.com/repobuddy/visual-testing/commit/5364614b07e8301250922c190b621300e86ba4fd) Thanks [@unional](https://github.com/unional)! - Show snapshot paths in failure messages relative to the project root (`./__vis__/...`) instead of absolute.
134
+
135
+ Editors and terminals resolve the relative path just as well, and the output no longer leaks the local absolute path when a failure is pasted into a bug report. Paths outside the project root stay absolute. Filesystem operations are unaffected and still resolve to absolute paths.
136
+
137
+ - [`6697a67`](https://github.com/repobuddy/visual-testing/commit/6697a67b874c3943098af77539285f0b92a159ec) Thanks [@unional](https://github.com/unional)! - Raise dependency floors to pull in security fixes.
138
+
139
+ `glob`, `rimraf`, `pathe`, `dedent`, `is-ci`, and `pixelmatch` move up within
140
+ their existing major, which resolves the advisories reaching the runtime
141
+ dependency tree through `brace-expansion` and `tmp`. No API change.
142
+
143
+ - [#858](https://github.com/repobuddy/visual-testing/pull/858) [`6f65e20`](https://github.com/repobuddy/visual-testing/commit/6f65e206ab222bbf24f7acdf5e9f4df560d5d442) Thanks [@unional](https://github.com/unional)! - Depend on the stable `type-plus` line instead of an 8.x prerelease.
144
+
145
+ Both packages carried `"type-plus": "8.0.0-beta.8"` as an exact pin in their
146
+ runtime `dependencies`. `type-plus@latest` is deliberately `7.6.2`; the 8.x line
147
+ is an unfinished major parked in prerelease. The exact pin forced every consumer
148
+ to install that prerelease, and consumers that also depend on something else
149
+ pinning a different 8.x beta resolved two copies of `type-plus`. The pin now
150
+ reads `^7.6.2`.
151
+
152
+ The only type this needed that 7.x does not export from its root is `Merge`, so
153
+ `Merge` is now declared locally in `vis_server_context.types.ts`. Emitted output
154
+ is otherwise byte-for-byte identical to the build under `8.0.0-beta.8`: the sole
155
+ difference in `dist` is that one alias moving from an import into the file. No
156
+ API change.
157
+
158
+ ## 5.1.1
159
+
160
+ ### Patch Changes
161
+
162
+ - [`581c416`](https://github.com/repobuddy/visual-testing/commit/581c41605e12c06ad0ec4395c3a4f33dc411dc8f) Thanks [@unional](https://github.com/unional)! - Fix aggregate errors when multiple themes are used.
163
+
164
+ ## 5.1.0
165
+
166
+ ### Minor Changes
167
+
168
+ - [#723](https://github.com/repobuddy/visual-testing/pull/723) [`69cde31`](https://github.com/repobuddy/visual-testing/commit/69cde31906e8f4c4ae9a8f7c331ca434e1b7d758) Thanks [@unional](https://github.com/unional)! - Add `createMissingBaseline` for image matchers so a missing baseline can be written without `-u` / `updateSnapshot: 'all'`, and support `vis.setup({ createMissingBaseline: true })` defaults for auto snapshots (overridable per test). Document Storybook Vitest browser limitations for `createMissingBaseline` and the `updateSnapshot` workaround.
169
+
170
+ - [#723](https://github.com/repobuddy/visual-testing/pull/723) [`fc139fd`](https://github.com/repobuddy/visual-testing/commit/fc139fdca660e203b4126e0d3d791e7ed1eca867) Thanks [@unional](https://github.com/unional)! - Add opt-in `shortenLongSnapshotPaths` to `vis()`: when enabled, if representative **absolute** snapshot paths under `__baselines__` (after `snapshotRootDir` and `snapshotSubpath`) would exceed Windows-safe limits (250 characters or a path segment over 255), keep subpath directories and shorten only the final component to `{firstToken}-{hash12}{ext}` (tersify-style prefix); legacy `taskId-key.png` names are unchanged. Fix `getVisOption` to merge `__default` plugin options with the active Vitest project. Storybook `visProjects` may set `shortenLongSnapshotPaths` for the Vis panel (same semantics as Vitest `vis()`). Export `resolveSnapshotSubpathWithinLimits` from `vitest-plugin-vis/server-utils`. `vitest-plugin-vis/testing` is browser-safe (fixtures only). `getVisOption` and `stubSuite` are available from `vitest-plugin-vis/testing/node` for Node/Vitest project tests.
171
+
172
+ ## 5.0.0
173
+
174
+ ### Major Changes
175
+
176
+ - [#711](https://github.com/repobuddy/visual-testing/pull/711) [`b4c34dc`](https://github.com/repobuddy/visual-testing/commit/b4c34dc9ca71206901811074b92dfd57e7a636ba) Thanks [@unional](https://github.com/unional)! - Remove deprecated setup APIs and align with Vitest 4.
177
+
178
+ - **BREAKING:** `createVis` is no longer re-exported from `vitest-plugin-vis/setup`. Import it from `vitest-plugin-vis/setup-api` instead.
179
+ - **BREAKING:** Removed deprecated `vis.presets`, `vis.beforeAll`, and `vis.afterEach` helpers from the object returned by `createVis`. Use `vis.setup()` (and `autoSnapshotMatcher` where you need per-theme snapshots) instead.
180
+ - **BREAKING:** Config preset `none` is renamed to `custom`.
181
+ - **BREAKING:** Removed the `vitest-plugin-vis/presets/enable` entry point; use the `manual` or `auto` preset, or `custom` with your own `vitest.setup.ts`.
182
+ - **BREAKING:** Browser helpers now rely on Vitest 4’s `TestRunner.getCurrentTest` / `getCurrentSuite` (via `vitest` instead of `vitest/suite`). Requires Vitest 4+ in browser projects.
183
+
184
+ ## 4.2.2
185
+
186
+ ### Patch Changes
187
+
188
+ - [`494a8c7`](https://github.com/repobuddy/visual-testing/commit/494a8c70d032c76851d8f6a476480ebaab5a4a76) Thanks [@unional](https://github.com/unional)! - Drop an unnecessary Biome suppression from the Jest matcher module augmentation. Update Storybook-related dev dependencies for local development and remove `@storybook/addon-mdx-gfm` from the package Storybook config.
189
+
190
+ ## 4.2.1
191
+
192
+ ### Patch Changes
193
+
194
+ - [`76faffe`](https://github.com/repobuddy/visual-testing/commit/76faffefe67cd17bee0f5627f51d71e1fa1322ad) Thanks [@unional](https://github.com/unional)! - fix support for multiple browser instances when `test.name` is not set.
195
+
196
+ ## 4.2.0
197
+
198
+ ### Minor Changes
199
+
200
+ - [#577](https://github.com/repobuddy/visual-testing/pull/577) [`d0c04d0`](https://github.com/repobuddy/visual-testing/commit/d0c04d0aca1ec6c1deebc0a26d86f1986b1c07d1) Thanks [@unional](https://github.com/unional)! - Deprecate `vis.beforeAll.setup()`, `vis.afterEach.matchImageSnapshot()`, `vis.afterEach.matchPerTheme()` in `vitest-plugin-vis/setup`.
201
+
202
+ There is no known use case for these methods.
203
+ Reducing the API surface.
204
+
205
+ - [#672](https://github.com/repobuddy/visual-testing/pull/672) [`ab4ca8a`](https://github.com/repobuddy/visual-testing/commit/ab4ca8ac669b5d50d1e4d892fa6c5927b77e7f9d) Thanks [@unional](https://github.com/unional)! - Add `projectName` to the context of `snapshotRootDir` to allow users to customize the snapshot root directory based on the project name.
206
+ This in useful when you use multiple instances in a Vitest project.
207
+
208
+ The `projectName` is generated by Vitest (e.g. `vpv:pw (chromium)` where `vpv:pw` is the project name you defined and `chromium` is the browser name).
209
+
210
+ ```ts
211
+ export default defineConfig({
212
+ test: {
213
+ name: "vpv:pw",
214
+ browser: {
215
+ instances: [{ browser: "chromium" }],
216
+ },
217
+ },
218
+ });
219
+ ```
220
+
221
+ If you specify the instance name, the `projectName` will be the instance name.
222
+
223
+ The `projectName` will be `HD` in the following example.
224
+
225
+ ```ts
226
+ export default defineConfig({
227
+ test: {
228
+ name: "vpv:pw",
229
+ browser: {
230
+ instances: [{ browser: "chromium", name: "HD" }],
231
+ },
232
+ },
233
+ });
234
+ ```
235
+
236
+ Also added `rootDir` to the context of `snapshotRootDir` to make the snapshot root directory more transparent.
237
+
238
+ - [#577](https://github.com/repobuddy/visual-testing/pull/577) [`7ceb998`](https://github.com/repobuddy/visual-testing/commit/7ceb99899830a48ef99c2c3ea0b6d4b760be9df9) Thanks [@unional](https://github.com/unional)! - Deprecate `createVis` in `vitest-plugin-vis/setup`.
239
+ Added `vitest-plugin-vis/setup-api`.
240
+
241
+ - [#551](https://github.com/repobuddy/visual-testing/pull/551) [`1c54a56`](https://github.com/repobuddy/visual-testing/commit/1c54a56baa1136c49eccefe8d7cf0de0332441cf) Thanks [@unional](https://github.com/unional)! - Fail test when no baseline image is found.
242
+ This behavior is closer to the Visual Regression Test from Vitest.
243
+
244
+ The difference is that the baseline image is not created automatically.
245
+ You need to create it manually by running the test with the `updateSnapshot` option set to `all`.
246
+
247
+ This prevents you from accidentally committing a new snapshot or passing the tests when you running the tests for the second time.
248
+
249
+ Closes [#516](https://github.com/repobuddy/visual-testing/issues/516)
250
+
251
+ Since this change can break existing tests (even though correctly), we will release it as a minor version.
252
+
253
+ ### Patch Changes
254
+
255
+ - [#667](https://github.com/repobuddy/visual-testing/pull/667) [`ad87b83`](https://github.com/repobuddy/visual-testing/commit/ad87b8399a5a5d881aa030e47f4684760b1733a0) Thanks [@unional](https://github.com/unional)! - Fix retrying. Reported by @sinled.
256
+
257
+ - [#551](https://github.com/repobuddy/visual-testing/pull/551) [`495d10c`](https://github.com/repobuddy/visual-testing/commit/495d10cfa4c454b351a7c4f8ef33104829a0f560) Thanks [@unional](https://github.com/unional)! - Publish as unbundle to improve debuggability.
258
+
259
+ ## 4.1.0
260
+
261
+ ### Minor Changes
262
+
263
+ - [#496](https://github.com/repobuddy/visual-testing/pull/496) [`ea6b3b2`](https://github.com/repobuddy/visual-testing/commit/ea6b3b2d9b343975849fb21b5b39a4f4c97b9b98) Thanks [@unional](https://github.com/unional)! - Provide the `autoSnapshotMatcher` function to create a matcher for auto snapshot in Storybook.
264
+
265
+ ## 4.0.0
266
+
267
+ ### Major Changes
268
+
269
+ - [#467](https://github.com/repobuddy/visual-testing/pull/467) [`dcf08aa`](https://github.com/repobuddy/visual-testing/commit/dcf08aa537dd400dab80b642a74e61cfe1366b3b) Thanks [@unional](https://github.com/unional)! - Update to Vitest v4
270
+
271
+ ### Patch Changes
272
+
273
+ - [#467](https://github.com/repobuddy/visual-testing/pull/467) [`660c153`](https://github.com/repobuddy/visual-testing/commit/660c153c38086773d45b81d529910474a07a6d30) Thanks [@unional](https://github.com/unional)! - Build with `tsdown`
274
+
275
+ ## 3.5.1
276
+
277
+ ### Patch Changes
278
+
279
+ - [#472](https://github.com/repobuddy/visual-testing/pull/472) [`0ebfe75`](https://github.com/repobuddy/visual-testing/commit/0ebfe7578794d3f538392c5a20a65a814878f3bc) Thanks [@unional](https://github.com/unional)! - Replace starting ".." with "\_\_" in `trimCommonFolder` function.
280
+
281
+ This allows test project to reference tests in other projects within a monorepo.
282
+
283
+ ## 3.5.0
284
+
285
+ ### Minor Changes
286
+
287
+ - [#393](https://github.com/repobuddy/visual-testing/pull/393) [`147858a`](https://github.com/repobuddy/visual-testing/commit/147858aff23a1fca22ae2bb3a453c7a8b4eb9e02) Thanks [@unional](https://github.com/unional)! - Adjust types to work with `vite` v7.
288
+
289
+ ## 3.4.1
290
+
291
+ ### Patch Changes
292
+
293
+ - [`fff3b67`](https://github.com/repobuddy/visual-testing/commit/fff3b67613746f5ca48e3a7bfd988059ae8dd16b) Thanks [@unional](https://github.com/unional)! - Update `failureThreshold` JSDoc.
294
+
295
+ ## 3.4.0
296
+
297
+ ### Minor Changes
298
+
299
+ - [`30026e2`](https://github.com/repobuddy/visual-testing/commit/30026e2a1ac1aceed84cf35b5b13fcc565b39c25) Thanks [@unional](https://github.com/unional)! - Handle the case where the test config name is an object with a label.
300
+ Vitest 3.2.0 starts doing this when running in workspace/project mode.
301
+
302
+ ## 3.3.2
303
+
304
+ ### Patch Changes
305
+
306
+ - [`cb735b9`](https://github.com/repobuddy/visual-testing/commit/cb735b93422c254befd37a124785924502b99b5f) Thanks [@unional](https://github.com/unional)! - Revert the change of adding `createVis` from `vitest-plugin-vis/setup` to `vitest-plugin-vis/client-api`.
307
+ `createVis` imports `vitest`, which cannot be imported in the client side.
308
+
309
+ ## 3.3.1
310
+
311
+ ### Patch Changes
312
+
313
+ - [`5b25658`](https://github.com/repobuddy/visual-testing/commit/5b256581ea5b41816c72bbd25a1271da2c258bd1) Thanks [@unional](https://github.com/unional)! - Fix `vis().setup({ auto: ... })` type to accept sync and async function with no return value.
314
+
315
+ ## 3.3.0
316
+
317
+ ### Minor Changes
318
+
319
+ - [#314](https://github.com/repobuddy/visual-testing/pull/314) [`090e613`](https://github.com/repobuddy/visual-testing/commit/090e61305e31c264bfec84a34ca42b702642f37d) Thanks [@unional](https://github.com/unional)! - Deprecate `createVis` in `vitest-plugin-vis/setup`.
320
+ It is moved to `/client-api`.
321
+
322
+ - [#314](https://github.com/repobuddy/visual-testing/pull/314) [`150924d`](https://github.com/repobuddy/visual-testing/commit/150924d8ef44fb61002c1b58a1baf14277177a69) Thanks [@unional](https://github.com/unional)! - Deprecate preset `none`, replace it with `custom`.
323
+
324
+ ### Patch Changes
325
+
326
+ - [#314](https://github.com/repobuddy/visual-testing/pull/314) [`4fb0a22`](https://github.com/repobuddy/visual-testing/commit/4fb0a22f63ab16e27594598e21e2ab7426727d07) Thanks [@unional](https://github.com/unional)! - Allow `getSnapshotRootDir` to be called without specifying a snapshot root directory.
327
+
328
+ ## 3.2.0
329
+
330
+ ### Minor Changes
331
+
332
+ - [#303](https://github.com/repobuddy/visual-testing/pull/303) [`b697842`](https://github.com/repobuddy/visual-testing/commit/b6978423c581c97bea8761339a3bc9c50054c511) Thanks [@unional](https://github.com/unional)! - Export `getSnapshotRootDir()` under `/server-utils`
333
+
334
+ ## 3.1.0
335
+
336
+ ### Minor Changes
337
+
338
+ - [#289](https://github.com/repobuddy/visual-testing/pull/289) [`9ba3e59`](https://github.com/repobuddy/visual-testing/commit/9ba3e59dc6ecf4f2943200db6a51a07791ac5c6d) Thanks [@unional](https://github.com/unional)! - Export `matchPageImageSnapshotAction` and types in `/client-api`
339
+
340
+ ## 3.0.1
341
+
342
+ ### Patch Changes
343
+
344
+ - [`9a25501`](https://github.com/repobuddy/visual-testing/commit/9a255013ee3b5beb319da140648b5f4d44e59c8a) Thanks [@unional](https://github.com/unional)! - Fix `manual` preset to be the same as `enable` in v2.
345
+ Note `enable` is deprecated and will be removed in v4.
346
+
347
+ ## 3.0.0
348
+
349
+ ### Major Changes
350
+
351
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`1d322c4`](https://github.com/repobuddy/visual-testing/commit/1d322c439db6f6160dbc70a6710e00ed03e3ce19) Thanks [@unional](https://github.com/unional)! - Remove `parseImageSnapshotSubject` from the public API (breaking change).
352
+
353
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`38734c5`](https://github.com/repobuddy/visual-testing/commit/38734c508633168e73d87c264b3dabf44dd617b8) Thanks [@unional](https://github.com/unional)! - Remove the ability to customize `snapshotKey` with function.
354
+
355
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`14f57c5`](https://github.com/repobuddy/visual-testing/commit/14f57c5be3569d7620d7288b0fc9aba7a3a798b6) Thanks [@unional](https://github.com/unional)! - Remove `shouldTaeSnapshot()` from API.
356
+ The consumer don't need to know. Tell don't ask.
357
+
358
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`b68f90a`](https://github.com/repobuddy/visual-testing/commit/b68f90a74899bfed4fca3083696b955f35f5f11b) Thanks [@unional](https://github.com/unional)! - Update `customizeSnapshotSubpath` to `snapshotSubpath`.
359
+
360
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`29ea8dc`](https://github.com/repobuddy/visual-testing/commit/29ea8dc41c1fe64a15f35840617e629b12e4123b) Thanks [@unional](https://github.com/unional)! - Rename `matchImageSnapshot` to `matchImageSnapshotAction` (breaking).
361
+
362
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`4c9bf36`](https://github.com/repobuddy/visual-testing/commit/4c9bf365db466c159395996c56ca76b2112bef09) Thanks [@unional](https://github.com/unional)! - Move `/client` to `/client-api` to indicate that it's an API, not meant to be used directly (breaking).
363
+
364
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`899ce35`](https://github.com/repobuddy/visual-testing/commit/899ce35a89488bc1c00ed3771c2a4d51e042fee2) Thanks [@unional](https://github.com/unional)! - Change `imageSnapshotMatcher` to `matchImageSnapshot` (breaking change).
365
+
366
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`abcedab`](https://github.com/repobuddy/visual-testing/commit/abcedabc46860ddd5fc015be9ccd38e6959cc77a) Thanks [@unional](https://github.com/unional)! - Replace `subjectDataTestId` with `subject`.
367
+
368
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`4f9ce14`](https://github.com/repobuddy/visual-testing/commit/4f9ce14214531cd430c14a9e703a9652744864fe) Thanks [@unional](https://github.com/unional)! - Remove `matchImageSnapshot` command.
369
+
370
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`fb8603d`](https://github.com/repobuddy/visual-testing/commit/fb8603df43c71303b92f40ddfc6b9d42982b1dd2) Thanks [@unional](https://github.com/unional)! - Remove extra `/commands` export.
371
+
372
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`11e52da`](https://github.com/repobuddy/visual-testing/commit/11e52da2ebd7dc5d4d5d252942b7edbc40c81713) Thanks [@unional](https://github.com/unional)! - Rename `ImageSnapshotIdOptions` to `ImageSnapshotKeyOptions`
373
+
374
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`2f57b5b`](https://github.com/repobuddy/visual-testing/commit/2f57b5bf35f149b3058df5fd0b2e663387d26bf3) Thanks [@unional](https://github.com/unional)! - Improve `vis.presets.theme()` and `vis.afterEach.matchPerTheme()` type params to not depends on `SnapshotMeta`.
375
+
376
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`ccb67af`](https://github.com/repobuddy/visual-testing/commit/ccb67aff835baaefc883004fbada7a811425dbd3) Thanks [@unional](https://github.com/unional)! - Remove `SnapshotMeta` from API.
377
+
378
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`31d9e29`](https://github.com/repobuddy/visual-testing/commit/31d9e29186a2fb0caa2e4c26be002e248f1160de) Thanks [@unional](https://github.com/unional)! - Remove `isAutosnapshot` from commands signature.
379
+
380
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`d7e7802`](https://github.com/repobuddy/visual-testing/commit/d7e780233226f4d6bfea955819789a00687a1fe9) Thanks [@unional](https://github.com/unional)! - Remove the first argument from the `setAutoSnapshotOptions` function.
381
+
382
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`033f725`](https://github.com/repobuddy/visual-testing/commit/033f725ca44bb8e213e94b6b001e7d8657fc48d7) Thanks [@unional](https://github.com/unional)! - Remove `customizeSnapshotId`.
383
+
384
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`51b4855`](https://github.com/repobuddy/visual-testing/commit/51b48557f66447b302ad1a27a9482db42c4dc90d) Thanks [@unional](https://github.com/unional)! - Remove `toTaskId` from public API.
385
+
386
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`755f18a`](https://github.com/repobuddy/visual-testing/commit/755f18aba217a9d3beca842701b68f85873561e4) Thanks [@unional](https://github.com/unional)! - Remove `platform` support.
387
+
388
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`ea3735f`](https://github.com/repobuddy/visual-testing/commit/ea3735fbb88ecf93ef6f1b287871afe44a8185de) Thanks [@unional](https://github.com/unional)! - Remove server context from `/server-api`. It can't be used outside of Vitest.
389
+ Rename `/server-api` to `/server-utils` as it is not an API.
390
+
391
+ ### Minor Changes
392
+
393
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`7ff4a7b`](https://github.com/repobuddy/visual-testing/commit/7ff4a7b22e20c94b554b2c99e406b93343953d0f) Thanks [@unional](https://github.com/unional)! - Change `actions` to take `taskId` instead of `test`.
394
+ This allows the `taskId` to be built from other means, such as from Storybook runtime.
395
+
396
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`6f74919`](https://github.com/repobuddy/visual-testing/commit/6f74919691ac97dd9759447cc7feab58cf7f24d8) Thanks [@unional](https://github.com/unional)! - Add `loadImageSnapshotResultsAction`
397
+
398
+ - [#283](https://github.com/repobuddy/visual-testing/pull/283) [`594c9c9`](https://github.com/repobuddy/visual-testing/commit/594c9c9511ea74dde10329eeee64f51a257f92bd) Thanks [@unional](https://github.com/unional)! - Restrict `snapshotKey` to not accept dash `-`.
399
+
400
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`34973ca`](https://github.com/repobuddy/visual-testing/commit/34973ca0a017f35e58ce4e706da1a83a693ee6a9) Thanks [@unional](https://github.com/unional)! - Add `page.toMatchImageSnapshot`.
401
+
402
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`aa957fc`](https://github.com/repobuddy/visual-testing/commit/aa957fc3dcae07a43583e219b33b92a19de31f6b) Thanks [@unional](https://github.com/unional)! - Deprecate `MatchImageSnapshotCommand`.
403
+
404
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`f3ef08c`](https://github.com/repobuddy/visual-testing/commit/f3ef08cc57bdaa3a5d28d0588fde81d115e79150) Thanks [@unional](https://github.com/unional)! - Add image size diff message
405
+
406
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`5539f6d`](https://github.com/repobuddy/visual-testing/commit/5539f6d6d0d4d192b1a8318fa5c91543a46abd39) Thanks [@unional](https://github.com/unional)! - Support full page screenshots with `playwright`.
407
+
408
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`1b1c13a`](https://github.com/repobuddy/visual-testing/commit/1b1c13a986b708a8e1adc52cf05f52c46e937000) Thanks [@unional](https://github.com/unional)! - Pass options to page screenshot
409
+
410
+ - [#283](https://github.com/repobuddy/visual-testing/pull/283) [`577e42b`](https://github.com/repobuddy/visual-testing/commit/577e42b5321b50b183a71a23c54dfaa87d5ad7a5) Thanks [@unional](https://github.com/unional)! - Export `trimCommonFolder` under `/server-utils`
411
+
412
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`766c035`](https://github.com/repobuddy/visual-testing/commit/766c035e798334e44e6489de86f05f4809e7fb76) Thanks [@unional](https://github.com/unional)! - Adjust code to work with latest `webdriverio`.
413
+ It now expect file paths relative to the project root to save screenshots.
414
+
415
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`3c8eee0`](https://github.com/repobuddy/visual-testing/commit/3c8eee04308506040dafede505ab53736545c20d) Thanks [@unional](https://github.com/unional)! - Add `vis.setup()`.
416
+ Deprecate `vis.presets.enable()`, `vis.presets.manual()`, `vis.presets.auto()`, and `vis.presets.theme()`.
417
+
418
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`f7ce143`](https://github.com/repobuddy/visual-testing/commit/f7ce1438e435aaaac6449b7f138034bb34b598f3) Thanks [@unional](https://github.com/unional)! - Export types to `/config`.
419
+
420
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`6978c83`](https://github.com/repobuddy/visual-testing/commit/6978c8371b626e508044f422bbfe9c3694337565) Thanks [@unional](https://github.com/unional)! - Add `hasImageSnapshotAction` to contain the business logic.
421
+
422
+ ### Patch Changes
423
+
424
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`eb1eeee`](https://github.com/repobuddy/visual-testing/commit/eb1eeeeab6021ba5d58306519333d5099a173ee0) Thanks [@unional](https://github.com/unional)! - Adjust commands type.
425
+
426
+ - [#259](https://github.com/repobuddy/visual-testing/pull/259) [`c3ec8f8`](https://github.com/repobuddy/visual-testing/commit/c3ec8f8f538f9aa84f17e4749dc46563d1605ed0) Thanks [@unional](https://github.com/unional)! - Export missing `SnapshotTestMeta` type.
427
+
428
+ ## 2.4.4
429
+
430
+ ### Patch Changes
431
+
432
+ - [`0b83a6e`](https://github.com/repobuddy/visual-testing/commit/0b83a6e63fe7d7d770277dfd020443972ebbd9ad) - Sanitize suite ID to prevent invalid paths. (#270)
433
+ Thanks @jacob-noble for the contribution 🎉
434
+
435
+ ## 2.4.3
436
+
437
+ ### Patch Changes
438
+
439
+ - [#265](https://github.com/repobuddy/visual-testing/pull/265) [`57be521`](https://github.com/repobuddy/visual-testing/commit/57be5217c3c12a7313c724c144c9227a4f227a4c) Thanks [@unional](https://github.com/unional)! - Pass down options for `playwright`.
440
+
441
+ ## 2.4.2
442
+
443
+ ### Patch Changes
444
+
445
+ - [#251](https://github.com/repobuddy/visual-testing/pull/251) [`349e021`](https://github.com/repobuddy/visual-testing/commit/349e02112ced61af05cc37bfbafa28363485c223) Thanks [@unional](https://github.com/unional)! - Fix handling of server options introduced by workspace support.
446
+
447
+ ## 2.4.1
448
+
449
+ ### Patch Changes
450
+
451
+ - [#246](https://github.com/repobuddy/visual-testing/pull/246) [`e877872`](https://github.com/repobuddy/visual-testing/commit/e877872131ef2b14981cd8203b7f85f4141e4dd9) Thanks [@unional](https://github.com/unional)! - Fix workspace feature to work with multiple browser instances.
452
+
453
+ ## 2.4.0
454
+
455
+ ### Minor Changes
456
+
457
+ - [#240](https://github.com/repobuddy/storybook-addon-vis/pull/240) [`16c7886`](https://github.com/repobuddy/storybook-addon-vis/commit/16c78862fc5a14e7137fb3c7d3c60c9fe6ff674f) Thanks [@unional](https://github.com/unional)! - Fix relative path issue regarding workspace support.
458
+
459
+ - [#240](https://github.com/repobuddy/storybook-addon-vis/pull/240) [`2c7afe9`](https://github.com/repobuddy/storybook-addon-vis/commit/2c7afe9778b3ea60b0667b3bae5a0ac066995c65) Thanks [@unional](https://github.com/unional)! - Support monorepo workspace usage.
460
+
461
+ ## 2.3.3
462
+
463
+ ### Patch Changes
464
+
465
+ - [#230](https://github.com/repobuddy/storybook-addon-vis/pull/230) [`4b665f9`](https://github.com/repobuddy/storybook-addon-vis/commit/4b665f940fd8f290de99875d3b0b6332e3aed38a) Thanks [@unional](https://github.com/unional)! - Fix handling multiple projects running in a workspace.
466
+
467
+ ## 2.3.2
468
+
469
+ ### Patch Changes
470
+
471
+ - [`2a2b000`](https://github.com/repobuddy/storybook-addon-vis/commit/2a2b000e1e9acc85dd9e81e0c569623ef1eb0724) Thanks [@unional](https://github.com/unional)! - Remove extra import
472
+
473
+ ## 2.3.1
474
+
475
+ ### Patch Changes
476
+
477
+ - [#227](https://github.com/repobuddy/storybook-addon-vis/pull/227) [`13ef2a5`](https://github.com/repobuddy/storybook-addon-vis/commit/13ef2a53ca1a5e319b90e2c9d6a8f09945d87c0e) Thanks [@unional](https://github.com/unional)! - Fix handling of `isAutoSnapshot` handling on the server side.
478
+
479
+ ## 2.3.0
480
+
481
+ ### Minor Changes
482
+
483
+ - [#225](https://github.com/repobuddy/storybook-addon-vis/pull/225) [`15bbbed`](https://github.com/repobuddy/storybook-addon-vis/commit/15bbbedb717b57d94c334e26d99b59431f1f17e0) Thanks [@unional](https://github.com/unional)! - Add type param to `vis.presets.theme()` and `vis.afterEach.matchPerTheme()`.
484
+
485
+ - [#225](https://github.com/repobuddy/storybook-addon-vis/pull/225) [`4692f23`](https://github.com/repobuddy/storybook-addon-vis/commit/4692f2360737e03699646a68572f7456badd53b6) Thanks [@unional](https://github.com/unional)! - Add `isAutoSnapshot` prop to `customizeSnapshotId()`.
486
+
487
+ ## 2.2.0
488
+
489
+ ### Minor Changes
490
+
491
+ - [#223](https://github.com/repobuddy/storybook-addon-vis/pull/223) [`13601ef`](https://github.com/repobuddy/storybook-addon-vis/commit/13601ef5ecd4260eacf844f71dcf4ca941b88f6b) Thanks [@unional](https://github.com/unional)! - Add `vis.preset.enable()`.
492
+
493
+ ## 2.1.1
494
+
495
+ ### Patch Changes
496
+
497
+ - [#219](https://github.com/repobuddy/storybook-addon-vis/pull/219) [`bbbc8e8`](https://github.com/repobuddy/storybook-addon-vis/commit/bbbc8e89286c1dd39a67a267d64185ce5dc61908) Thanks [@unional](https://github.com/unional)! - Improve `setAutoSnapshotOptions()` to work in `beforeAll` hook without passing in the `suite` object.
498
+
499
+ ## 2.1.0
500
+
501
+ ### Minor Changes
502
+
503
+ - [#217](https://github.com/repobuddy/storybook-addon-vis/pull/217) [`472acc9`](https://github.com/repobuddy/storybook-addon-vis/commit/472acc9e5ea0e78b26343fa662fdfc82dc3aaf2a) Thanks [@unional](https://github.com/unional)! - Update `pixelmatch` to `7.1.0`.
504
+
505
+ ## 2.0.1
506
+
507
+ ### Patch Changes
508
+
509
+ - [#209](https://github.com/repobuddy/storybook-addon-vis/pull/209) [`a68f5c9`](https://github.com/repobuddy/storybook-addon-vis/commit/a68f5c9ea3786aa70dc03304236a67ef3fb333df) Thanks [@unional](https://github.com/unional)! - Avoid setting `setupFiles` in `vitest.config.ts` to undefined,
510
+ as Vite v5 does not support it.
511
+
512
+ - [`24621e0`](https://github.com/repobuddy/storybook-addon-vis/commit/24621e0683bebc08d112d93c99e58d28e0dffb67) Thanks [@unional](https://github.com/unional)! - Update `type-plus`.
513
+
514
+ ## 2.0.0
515
+
516
+ ### Major Changes
517
+
518
+ - [#204](https://github.com/repobuddy/storybook-addon-vis/pull/204) [`020121f`](https://github.com/repobuddy/storybook-addon-vis/commit/020121f04d08feaf071db0beb65236e79feb695d) Thanks [@unional](https://github.com/unional)! - Change the `customizeSnapshotId` to accept `context` object.
519
+
520
+ This is a breaking change.
521
+ Feature-wise, it is the same as before.
522
+ We will enable better customization by passing `viewport` to the `customizeSnapshotId` function in the future.
523
+
524
+ - [#204](https://github.com/repobuddy/storybook-addon-vis/pull/204) [`76b09cc`](https://github.com/repobuddy/storybook-addon-vis/commit/76b09cc00c5fc94026e2a5ab6283300325716675) Thanks [@unional](https://github.com/unional)! - Add support to customize `snapshotRootDir` with a function.
525
+ Deprecate `platform` option.
526
+
527
+ ## 1.7.0
528
+
529
+ ### Minor Changes
530
+
531
+ - [#195](https://github.com/repobuddy/storybook-addon-vis/pull/195) [`972db1b`](https://github.com/repobuddy/storybook-addon-vis/commit/972db1bb1f511d9073a2600afa030ff9c46e864f) Thanks [@unional](https://github.com/unional)! - Allow `setAutoSnapshotOptions` to specify additional properties.
532
+ Each theme in `vis.presets.theme()` and `vis.afterEach.matchPerTheme()` will receive the options.
533
+
534
+ ```ts
535
+ vis.presets.theme({
536
+ theme1(options) { ... }
537
+ })
538
+ ```
539
+
540
+ ## 1.6.5
541
+
542
+ ### Patch Changes
543
+
544
+ - [#190](https://github.com/repobuddy/storybook-addon-vis/pull/190) [`be483d4`](https://github.com/repobuddy/storybook-addon-vis/commit/be483d412358158c4016eba573bf035252f6cbb5) Thanks [@unional](https://github.com/unional)! - Support `customizeSnapshotId` option during theme auto snapshot.
545
+
546
+ ## 1.6.4
547
+
548
+ ### Patch Changes
549
+
550
+ - [#188](https://github.com/repobuddy/storybook-addon-vis/pull/188) [`78b117f`](https://github.com/repobuddy/storybook-addon-vis/commit/78b117fef0510c993aad33ff92114d9a786b41d8) Thanks [@unional](https://github.com/unional)! - Use bounded `expect`.
551
+
552
+ ## 1.6.3
553
+
554
+ ### Patch Changes
555
+
556
+ - [#185](https://github.com/repobuddy/storybook-addon-vis/pull/185) [`c5296a1`](https://github.com/repobuddy/storybook-addon-vis/commit/c5296a15933cb26bb1792701c691f7ca67c5a4ee) Thanks [@unional](https://github.com/unional)! - Export `AutoSnapshotOptions` under `/client`.
557
+
558
+ ## 1.6.2
559
+
560
+ ### Patch Changes
561
+
562
+ - [#183](https://github.com/repobuddy/storybook-addon-vis/pull/183) [`49e8fbc`](https://github.com/repobuddy/storybook-addon-vis/commit/49e8fbc60a9e9e07e700a5d61164cf954186ce2d) Thanks [@unional](https://github.com/unional)! - Export `AutoSnapshotOptions` to fix the inferred type cannot be named error.
563
+
564
+ ## 1.6.1
565
+
566
+ ### Patch Changes
567
+
568
+ - [#182](https://github.com/repobuddy/storybook-addon-vis/pull/182) [`537cf83`](https://github.com/repobuddy/storybook-addon-vis/commit/537cf83b7cd6120876f46fc4bd5d51391128cab4) Thanks [@unional](https://github.com/unional)! - Should not take snapshot when the test failed.
569
+ Ensure the theme is awaited before taking the snapshot.
570
+
571
+ ## 1.6.0
572
+
573
+ ### Minor Changes
574
+
575
+ - [#171](https://github.com/repobuddy/storybook-addon-vis/pull/171) [`5335011`](https://github.com/repobuddy/storybook-addon-vis/commit/5335011f32b59604cd0a3b653c04ac690b6ca5fa) Thanks [@unional](https://github.com/unional)! - Support default subject using `data-testid` attribute.
576
+
577
+ ## 1.5.1
578
+
579
+ ### Patch Changes
580
+
581
+ - [#166](https://github.com/repobuddy/storybook-addon-vis/pull/166) [`611e0cc`](https://github.com/repobuddy/storybook-addon-vis/commit/611e0cca505bfea0fe67ce10e45af2946a7cc578) Thanks [@unional](https://github.com/unional)! - Use `config.root` instead of `runner.root`.
582
+ `runner.root` is protected in Vitest v3.
583
+
584
+ ## 1.5.0
585
+
586
+ ### Minor Changes
587
+
588
+ - [#162](https://github.com/repobuddy/storybook-addon-vis/pull/162) [`995140f`](https://github.com/repobuddy/storybook-addon-vis/commit/995140f0bda8c389a24f143f744dabe6d682a8ce) Thanks [@unional](https://github.com/unional)! - Support customizing `platform` by @joekrump.
589
+
590
+ For example, with `vis({ platform: 'ci' })`,
591
+ Instead of saving the snapshots to `<root>/__vis__/{local or process.platform}`,
592
+ the snapshots will be saved to `<root>/__vis__/ci`.
593
+
594
+ ### Patch Changes
595
+
596
+ - [#156](https://github.com/repobuddy/storybook-addon-vis/pull/156) [`72959a6`](https://github.com/repobuddy/storybook-addon-vis/commit/72959a6bd2bea3d9c1cff652b8ff384c10e017f2) Thanks [@unional](https://github.com/unional)! - Add top level `types` field to `package.json` for project not using ESM module resolution.
597
+
598
+ - [#160](https://github.com/repobuddy/storybook-addon-vis/pull/160) [`d2fdcbe`](https://github.com/repobuddy/storybook-addon-vis/commit/d2fdcbe023917ea9dc85ac332dfd8b46f6936f20) Thanks [@unional](https://github.com/unional)! - Remove `expectToFail` from `VisOptions`.
599
+ It should not have that property.
600
+
601
+ - [#161](https://github.com/repobuddy/storybook-addon-vis/pull/161) [`43fc2ce`](https://github.com/repobuddy/storybook-addon-vis/commit/43fc2ce3385c0086de567816a1a1328ea4df336f) Thanks [@unional](https://github.com/unional)! - Change default timeout to 30s.
602
+ The initial timeout of 1s was set by Vitest.
603
+ It is causing tests to fail with `TimeoutError`,
604
+ even when getting `Locator` like `getByRole`.
605
+
606
+ This timeout will be removed in Vitest 3.
607
+
608
+ The underlying provider (`playwright`) does not have a default timeout.
609
+
610
+ Setting to 30s should be a good default for most cases.
611
+
612
+ It could still be too short for slow CI or when it is running scripts in parallel.
613
+ That was the case for `storybook-test-runner` but could be improved in Vitest browser mode.
614
+
615
+ If timeout is still an issue, we can further default it to 60s or even 120s.
616
+
617
+ - [#158](https://github.com/repobuddy/storybook-addon-vis/pull/158) [`a020417`](https://github.com/repobuddy/storybook-addon-vis/commit/a02041770b32ca52baa35326ff77a39fe4b249c2) Thanks [@unional](https://github.com/unional)! - Add a blank line to separate the theme error messages.
618
+
619
+ - [#160](https://github.com/repobuddy/storybook-addon-vis/pull/160) [`ee4ef14`](https://github.com/repobuddy/storybook-addon-vis/commit/ee4ef1492a0444bf1b24d2614c8365154038b351) Thanks [@unional](https://github.com/unional)! - Fix the global setting not being applied.
620
+
621
+ ## 1.4.0
622
+
623
+ ### Minor Changes
624
+
625
+ - [#150](https://github.com/repobuddy/storybook-addon-vis/pull/150) [`da95b08`](https://github.com/repobuddy/storybook-addon-vis/commit/da95b08e496d1f8a8b1663e55681510803e41082) Thanks [@unional](https://github.com/unional)! - Add `ssim` support.
626
+
627
+ ## 1.3.2
628
+
629
+ ### Patch Changes
630
+
631
+ - [`1b22d2d`](https://github.com/repobuddy/storybook-addon-vis/commit/1b22d2d290a1fb18156cda3b846a402ad51481a2) Thanks [@unional](https://github.com/unional)! - Misc update to error message
632
+
633
+ ## 1.3.1
634
+
635
+ ### Patch Changes
636
+
637
+ - [#145](https://github.com/repobuddy/storybook-addon-vis/pull/145) [`3ebc865`](https://github.com/repobuddy/storybook-addon-vis/commit/3ebc8655f3364a59de1d87930af53554dd9b4faa) Thanks [@unional](https://github.com/unional)! - Fix `expectToFail` during snapshot update.
638
+
639
+ ## 1.3.0
640
+
641
+ ### Minor Changes
642
+
643
+ - [#139](https://github.com/repobuddy/storybook-addon-vis/pull/139) [`17510d3`](https://github.com/repobuddy/storybook-addon-vis/commit/17510d32272730ebf4677ed2c4b177f636e75cc2) Thanks [@unional](https://github.com/unional)! - Add `expectToFail` support.
644
+ This is useful to test where the visual should be changed beyond the threshold.
645
+
646
+ - [#144](https://github.com/repobuddy/storybook-addon-vis/pull/144) [`f642dbf`](https://github.com/repobuddy/storybook-addon-vis/commit/f642dbfbb6a715ef14a944c50e656b79c926b5d4) Thanks [@unional](https://github.com/unional)! - Change `import { matchImageSnapshot } from 'vitest-plugin-vis/client'` to `import { imageSnapshotMatcher } from 'vitest-plugin-vis/client'`.
647
+
648
+ This is a bug in 1.2.0 because `matchImageSnapshot` is hard loading `@vitest/browser/context`, which causes storybook to fail to load.
649
+
650
+ ### Patch Changes
651
+
652
+ - [#144](https://github.com/repobuddy/storybook-addon-vis/pull/144) [`2d4f1c0`](https://github.com/repobuddy/storybook-addon-vis/commit/2d4f1c02394ca4fd8880452a98399c825e686ee5) Thanks [@unional](https://github.com/unional)! - Extends `expect` and `page` in presets.
653
+
654
+ - [#144](https://github.com/repobuddy/storybook-addon-vis/pull/144) [`78cc195`](https://github.com/repobuddy/storybook-addon-vis/commit/78cc195e1ae9afe2fe102e0e916cffff406e0ebd) Thanks [@unional](https://github.com/unional)! - Augment `expect` and `page` in main so that consumer can load the types:
655
+
656
+ ```json
657
+ {
658
+ "compilerOptions": {
659
+ "types": ["vitest-plugin-vis"]
660
+ }
661
+ }
662
+ ```
663
+
664
+ ## 1.2.0
665
+
666
+ ### Minor Changes
667
+
668
+ - [#137](https://github.com/repobuddy/storybook-addon-vis/pull/137) [`e4bef32`](https://github.com/repobuddy/storybook-addon-vis/commit/e4bef32a897015f5f84407610ef184eb3872f424) Thanks [@unional](https://github.com/unional)! - Assert `context.testPath` on `setupVisSuite` command.
669
+
670
+ Add `stubBrowserCommandContext` to `/testing`.
671
+
672
+ ### Patch Changes
673
+
674
+ - [#137](https://github.com/repobuddy/storybook-addon-vis/pull/137) [`e0fec8e`](https://github.com/repobuddy/storybook-addon-vis/commit/e0fec8edf7c082bf31b10ea6040b216836740ab2) Thanks [@unional](https://github.com/unional)! - Remove import of `vitest-browser-react` in the presets.
675
+ The plugin is not React specific.
676
+
677
+ - [#137](https://github.com/repobuddy/storybook-addon-vis/pull/137) [`a3e3c89`](https://github.com/repobuddy/storybook-addon-vis/commit/a3e3c89341183a8ced5339290cc74d172b78f82d) Thanks [@unional](https://github.com/unional)! - Update `writeImageSnapshot` signature.
678
+
679
+ - [#137](https://github.com/repobuddy/storybook-addon-vis/pull/137) [`eaa3bbe`](https://github.com/repobuddy/storybook-addon-vis/commit/eaa3bbe91076d42b7eb8b773c404b2e62d6c4930) Thanks [@unional](https://github.com/unional)! - Improve `testPath` assertion message.
680
+
681
+ ## 1.1.0
682
+
683
+ ### Minor Changes
684
+
685
+ - [`0360253`](https://github.com/repobuddy/storybook-addon-vis/commit/03602536b5ebf67b7d898f95d6511e5b05da96a9) Thanks [@unional](https://github.com/unional)! - Deprecate `toTaskId`.
686
+
687
+ - [#133](https://github.com/repobuddy/storybook-addon-vis/pull/133) [`badf227`](https://github.com/repobuddy/storybook-addon-vis/commit/badf2273828ad883763e1e328b4e180c07b4960a) Thanks [@unional](https://github.com/unional)! - Perform image comparison on the client side.
688
+ This is similar to `storybook-addon-vis@0.13.0`, but the image taking is still done on the server side.
689
+
690
+ Try to address the issue of the slower image comparison on the server side.
691
+
692
+ Export `matchImageSnapshot` function on the client side.
693
+ Mark `parseImageSnapshotSubject` as deprecated as it is not needed anymore.
694
+
695
+ ### Patch Changes
696
+
697
+ - [#136](https://github.com/repobuddy/storybook-addon-vis/pull/136) [`176d28f`](https://github.com/repobuddy/storybook-addon-vis/commit/176d28fc459cb0823f3fda94ad4e3372690dbd8d) Thanks [@unional](https://github.com/unional)! - Update error message during threshold conversion.
698
+
699
+ - [#135](https://github.com/repobuddy/storybook-addon-vis/pull/135) [`6912ad7`](https://github.com/repobuddy/storybook-addon-vis/commit/6912ad73041f7e46757f0f364dcaa6594a35ce9d) Thanks [@unional](https://github.com/unional)! - Improve options message.
700
+
701
+ ## 1.0.5
702
+
703
+ ### Patch Changes
704
+
705
+ - [#130](https://github.com/repobuddy/storybook-addon-vis/pull/130) [`e242444`](https://github.com/repobuddy/storybook-addon-vis/commit/e242444908766274014b5fc94afaf31392627c88) Thanks [@unional](https://github.com/unional)! - Add update snapshot back to the server implementation.
706
+
707
+ ## 1.0.4
708
+
709
+ ### Patch Changes
710
+
711
+ - [#128](https://github.com/repobuddy/storybook-addon-vis/pull/128) [`d695c4f`](https://github.com/repobuddy/storybook-addon-vis/commit/d695c4fb0b0be80ce53e38884fcb7a6340a8e52d) Thanks [@unional](https://github.com/unional)! - Avoid buffer conversion.
712
+
713
+ ## 1.0.3
714
+
715
+ ### Patch Changes
716
+
717
+ - [#125](https://github.com/repobuddy/storybook-addon-vis/pull/125) [`1068941`](https://github.com/repobuddy/storybook-addon-vis/commit/1068941b1495966cb3ee15a53dd5937e37365373) Thanks [@unional](https://github.com/unional)! - Try to improve the performance of the plugin by skipping the rescale step and not checking the CRC of the image.
718
+
719
+ This should be safe because the image is generated by the browser, or it is a base64 string (not 100% sure on this), and the CRC is not used for anything.
720
+
721
+ If not performance improvement is seen, we can revert this change.
722
+
723
+ ## 1.0.2
724
+
725
+ ### Patch Changes
726
+
727
+ - [#123](https://github.com/repobuddy/storybook-addon-vis/pull/123) [`a8fcd75`](https://github.com/repobuddy/storybook-addon-vis/commit/a8fcd75a056cb5b16006c52190453f19e41ab182) Thanks [@unional](https://github.com/unional)! - Avoid resizing images when not necessary.
728
+
729
+ ## 1.0.1
730
+
731
+ ### Patch Changes
732
+
733
+ - [#117](https://github.com/repobuddy/storybook-addon-vis/pull/117) [`ae98ec4`](https://github.com/repobuddy/storybook-addon-vis/commit/ae98ec47df104c80723892345946aebb65cb361c) Thanks [@unional](https://github.com/unional)! - Proxy `vitest/suite`.
734
+
735
+ This fix the warning message `Module "util" has been externalized for browser compatibility.` when it is loaded in the browser.
736
+
737
+ Fixes [#101](https://github.com/repobuddy/storybook-addon-vis/issues/101).
738
+
739
+ ## 1.0.0
740
+
741
+ ### Major Changes
742
+
743
+ - [#102](https://github.com/repobuddy/storybook-addon-vis/pull/102) [`03893ab`](https://github.com/repobuddy/storybook-addon-vis/commit/03893ab4efae5f2d243bad67f40bc5cb4ad4d623) Thanks [@unional](https://github.com/unional)! - Initial Release.
744
+
745
+ [`vitest-plugin-vis`](https://www.npmjs.com/package/vitest-plugin-vis) is a visual testing plugin for [Vitest](https://vitest.dev/), running on [Vitest Browser Mode](https://vitest.dev/guide/browser/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest-plugin-vis",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "Vitest visual testing plugin",
5
5
  "keywords": [
6
6
  "image-snapshot",
@@ -51,7 +51,8 @@
51
51
  ".cursor-plugin",
52
52
  ".codex-plugin",
53
53
  "skills",
54
- "!**/*.{spec,test,unit,accept,integrate,system,perf,stress}.*"
54
+ "!**/*.{spec,test,unit,accept,integrate,system,perf,stress}.*",
55
+ "CHANGELOG.md"
55
56
  ],
56
57
  "dependencies": {
57
58
  "dedent": "^1.7.2",