storybook-addon-vis changelog
4.3.5
Patch Changes
- #962
1847b46Thanks @unional! - Point the package readmes and thereview-image-snapshot-failuresskill at the documentation website. Each readme now has install, minimal configuration, an example, a version compatibility table, and links to the matching website pages. The skill links the “Reviewing Failures with Agents” page on the website instead of a source file. - Updated dependencies [
1847b46]:- vitest-plugin-vis@5.2.2
4.3.4
Patch Changes
- #947
25d682cThanks @unional! - IncludeCHANGELOG.mdin the published package. - Updated dependencies [
25d682c]:- vitest-plugin-vis@5.2.1
4.3.3
Patch Changes
-
#920
6c2e58eThanks @unional! - When an image snapshot mismatches, find the changed regions and write a review image.The failure message now lists the changed regions (
Changed:) and points to a review image (Review:). The review image (<name>.review.png, next to the diff) places the baseline, result, and diff crops of each region side by side, so a person or a coding agent can see what changed without opening the full images. The regions are also written to<name>.regions.jsonnext to the diff. 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.Set
reviewImage: falseinvis()ortoMatchImageSnapshot()to not write the review image.The Storybook Vis panel does not list the review image as a diff.
-
#926
013d9b6Thanks @unional! - Ship anllms.txtin each package so coding agents can find the entry points and documentation pages. 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.Each package is also an agent plugin for Claude Code, Cursor, Codex and Copilot CLI. It ships the
review-image-snapshot-failuresskill, which tells an agent to read the error message and the review image before it opens a full image. -
#946
65e4177Thanks @dub578! - Decode images intoImageDatawithcreateImageBitmapand close the bitmap after reading the pixels.new Image()+drawImageleft a full-size decode in Chromium’s image decode cache for every compared image, so renderer memory grew with each image snapshot comparison. -
Updated dependencies [
6c2e58e,013d9b6,65e4177]:- vitest-plugin-vis@5.2.0
4.3.2
Patch Changes
- #904
fd37087Thanks @unional! - Updatetype-plusto 8.0.0. - Updated dependencies [
fd37087]:- vitest-plugin-vis@5.1.8
4.3.1
Patch Changes
-
#889
b770cfeThanks @unional! - Fix auto snapshots hanging until the test timeout whensubjectmatches a hidden element.The
subjectselector was resolved withdocument.querySelector(), which returns the first match even when it is hidden. In Storybook, a selector such asbuttonmatched 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.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.bodyis still used. -
#890
affac03Thanks @unional! - Trim leading and trailing whitespace from test and suite names when building the snapshot path (#847).Storybook appends two spaces to the
describetitle it generates for a CSF Next story that usesstory.test(). Those spaces became two dashes in the snapshot folder name, so the snapshots landed under<story>--/.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. -
Updated dependencies [
b770cfe,affac03]:- vitest-plugin-vis@5.1.7
4.3.0
Minor Changes
-
#887
7bc7aeeThanks @unional! - Exportcdp, a proxy ofcdp()fromvitest/browserthat is safe to import from stories.Importing
vitest/browserdirectly in a story throws in a plain Storybook preview and blanks the story.cdploads it only during a Vitest browser run, like the existingpageandcommandsproxies, and session calls made before the import settles wait for it. Callingcdp()outside a Vitest browser run throws.CDP is available only with the Playwright provider on Chromium.
4.2.9
Patch Changes
-
#885
b674dfeThanks @unional! - Updatetype-plusto8.0.0-beta.12.type-plus8.0.0-beta.12 no longer exports the distributivePickandOmitfrom its root. The public types now useObjectPlus.PickandObjectPlus.Omit, which behave the same. -
Updated dependencies [
b674dfe]:- vitest-plugin-vis@5.1.6
4.2.8
Patch Changes
-
#870
5c2970cThanks @unional! - Pintype-plusto8.0.0-beta.10, exactly.Both packages already declared
type-plus: ^8.0.0-beta.10in the last published release (storybook-addon-vis@4.2.7,vitest-plugin-vis@5.1.4), so this is a range tightening, not a version move:type-plus8’stypescript >= 5.6.0peer already reaches consumers today, and this change does not alter what a fresh install resolves — it only forecloses later8.0.0-beta.xprereleases plus8.0.0and8.1.0.The version is pinned rather than caret-ranged.
^8.0.0-beta.10resolves to>=8.0.0-beta.10 <9.0.0-0, which admits every later 8.0.0 prerelease as well as8.0.0and8.1.0— and 8 is a prerelease line where breaking changes land between betas (beta.10 to beta.11 changedEqual’s signature and removedisType.f). An exact version makes each bump a reviewable PR instead of something a lockfile refresh can do silently. Move back to a caret when 8.0.0 is stable.type-plustypes leak into each package’s emitted declarations:storybook-addon-vis’sdist/exports/vitest-plugin.d.mtsimportsOmitfromtype-plus;vitest-plugin-vis’sdist/shared/commands.types.d.mtsanddist/server/testing/stubSuite.d.mtsimportPickandRecursivePartial. None of these symbols changed between 7 and 8, so no source change was needed. -
Updated dependencies [
5c2970c]:- vitest-plugin-vis@5.1.5
4.2.7
Patch Changes
-
#861
ee4464aThanks @unional! - Depend ontype-plus^8.0.0-beta.10— back on the 8.x line, as a range.The previous release moved both packages to
^7.6.2. That was the wrong fix. These packages belong on the 8.x line; what was actually broken was that the dependency was an exact pin (8.0.0-beta.8), so it could never resolve forward and consumers were stuck on a build with a real CJS packaging defect:8.0.0-beta.8declares"type": "module"but ships acjs/build with no{"type":"commonjs"}marker, sorequire()of these packages failed withReferenceError: exports is not defined in ES module scope.type-plus@8.0.0-beta.10ships thatcjs/package.jsonmarker and fixes it. The dependency is now the range^8.0.0-beta.10rather than a pin, so later 8.x betas and stable 8.x flow in on their own instead of freezing at one build.The root barrel of
8.0.0-beta.10is byte-identical to8.0.0-beta.8’s, so there is no API change between the two. The localMergealias invis_server_context.types.tsstays as-is; it is version-independent. -
Updated dependencies [
ee4464a]:- vitest-plugin-vis@5.1.4
4.2.6
Patch Changes
- Updated dependencies [
62026f5]:- vitest-plugin-vis@5.1.3
4.2.5
Patch Changes
-
#849
f450eadThanks @unional! - Wait for the vitest browser modules before using them.commandsandpageare backed by a dynamic import that nothing awaited, so a hook readingcommands.setupVisSuitebefore it settled gotundefinedand failed withcommands.setupVisSuite is not a function— inside a genuine vitest browser run. Command reads now return a function that waits for the import, and the addon’sbeforeAllawaits the module load before touchingpageor the current test. -
6697a67Thanks @unional! - Raise dependency floors to pull in security fixes.glob,rimraf,pathe,dedent,is-ci, andpixelmatchmove up within their existing major, which resolves the advisories reaching the runtime dependency tree throughbrace-expansionandtmp. No API change. -
#858
6f65e20Thanks @unional! - Depend on the stabletype-plusline instead of an 8.x prerelease.Both packages carried
"type-plus": "8.0.0-beta.8"as an exact pin in their runtimedependencies.type-plus@latestis deliberately7.6.2; the 8.x line is an unfinished major parked in prerelease. The exact pin forced every consumer to install that prerelease, and consumers that also depend on something else pinning a different 8.x beta resolved two copies oftype-plus. The pin now reads^7.6.2.The only type this needed that 7.x does not export from its root is
Merge, soMergeis now declared locally invis_server_context.types.ts. Emitted output is otherwise byte-for-byte identical to the build under8.0.0-beta.8: the sole difference indistis that one alias moving from an import into the file. No API change. -
Updated dependencies [
5364614,6697a67,6f65e20]:- vitest-plugin-vis@5.1.2
4.2.4
Patch Changes
-
#836
e135d00Thanks @unional! - Gate the auto-snapshot hooks on the Vitest browser global instead of a general test-environment check.beforeAllandbeforeEachguarded onisRunningInTest()from@repobuddy/test, which treats anyHeadlessChromeuser agent as a test run. Browsing Storybook with a headless browser — driving it with Playwright to debug a story, for example — therefore entered the snapshot setup path, where thevitest/browsercommand proxy is empty, and failed withcommands.setupVisSuite is not a functionso the preview never rendered.Both hooks now check
__vitest_browser__, the same signal the command proxy itself uses, so they run exactly when the Vitest commands they depend on are present. This also covers a non-browser Vitest run (jsdom or node), which passed the old guard and hit the same empty proxy.@repobuddy/testis no longer a runtime dependency of this package.
4.2.3
Patch Changes
-
ebdbc5bThanks @unional! - FixaddonVis(options)type to includestags: string[]. -
50d0be7Thanks @unional! - Skip vis suite setup when not running in test -
c5d1353Thanks @unional! - Should not addsnapshottag ifautois nottrue. -
f67866fThanks @unional! - FixdefineStorybookVisreturning afile://URL instead of a filesystem path.import.meta.resolvereturns afile://URL, whichpath.joincorrupts when appendingpreset— collapsingfile:///tofile:/. Storybook’s resolver then silently fails to findpreset.js, so the addon’sexperimental_serverChannelwas never registered and snapshot images never loaded. Wrapping the result withfileURLToPathproduces a plain filesystem path that resolves correctly. -
e4bf5b0Thanks @unional! - RegistertoMatchImageSnapshotat module load time so it is available in Storybook dev mode. -
Updated dependencies [
581c416]:- vitest-plugin-vis@5.1.1
4.2.2
Patch Changes
- #739
66599bcThanks @unional! - Make sure thevisAnnotation.beforeEachdo anything only when it is running in test.
4.2.1
Patch Changes
4.2.0
Minor Changes
-
4bead0aThanks @unional! - ExportvisAnnotationsfrom the main package index and moveexpect.extend({ toMatchImageSnapshot })from a module-level side effect to lazy initialization insidevisAnnotations.beforeEach().Previously, importing
storybook-addon-visorstorybook-addon-vis/vitest-setupwould immediately callexpect.extendas a side effect. Now the extension is deferred untilvisAnnotations.beforeEach()runs, ensuring it only executes whenstorybook/testis initialized.
4.1.0
Minor Changes
-
#723
69cde31Thanks @unional! - AddcreateMissingBaselinefor image matchers so a missing baseline can be written without-u/updateSnapshot: 'all', and supportvis.setup({ createMissingBaseline: true })defaults for auto snapshots (overridable per test). Document Storybook Vitest browser limitations forcreateMissingBaselineand theupdateSnapshotworkaround. -
#723
fc139fdThanks @unional! - Add opt-inshortenLongSnapshotPathstovis(): when enabled, if representative absolute snapshot paths under__baselines__(aftersnapshotRootDirandsnapshotSubpath) 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); legacytaskId-key.pngnames are unchanged. FixgetVisOptionto merge__defaultplugin options with the active Vitest project. StorybookvisProjectsmay setshortenLongSnapshotPathsfor the Vis panel (same semantics as Vitestvis()). ExportresolveSnapshotSubpathWithinLimitsfromvitest-plugin-vis/server-utils.vitest-plugin-vis/testingis browser-safe (fixtures only).getVisOptionandstubSuiteare available fromvitest-plugin-vis/testing/nodefor Node/Vitest project tests.
Patch Changes
4.0.0
Major Changes
-
#711
b4c34dcThanks @unional! - Remove deprecated setup APIs and align with Vitest 4.- BREAKING:
createVisis no longer re-exported fromvitest-plugin-vis/setup. Import it fromvitest-plugin-vis/setup-apiinstead. - BREAKING: Removed deprecated
vis.presets,vis.beforeAll, andvis.afterEachhelpers from the object returned bycreateVis. Usevis.setup()(andautoSnapshotMatcherwhere you need per-theme snapshots) instead. - BREAKING: Config preset
noneis renamed tocustom. - BREAKING: Removed the
vitest-plugin-vis/presets/enableentry point; use themanualorautopreset, orcustomwith your ownvitest.setup.ts. - BREAKING: Browser helpers now rely on Vitest 4’s
TestRunner.getCurrentTest/getCurrentSuite(viavitestinstead ofvitest/suite). Requires Vitest 4+ in browser projects.
- BREAKING:
Patch Changes
-
397cbe6Thanks @unional! - Remove usage of deprecatedIconButton. -
Updated dependencies [
b4c34dc]:- vitest-plugin-vis@5.0.0
3.1.5
Patch Changes
- Updated dependencies [
494a8c7]:- vitest-plugin-vis@4.2.2
3.1.4
Patch Changes
- Updated dependencies [
76faffe]:- vitest-plugin-vis@4.2.1
3.1.3
Patch Changes
- Updated dependencies [
ad87b83,d0c04d0,495d10c,ab4ca8a,7ceb998,1c54a56]:- vitest-plugin-vis@4.2.0
3.1.2
Patch Changes
- #533
015f203Thanks @unional! - Move React logic to the panel component. This avoids theinvalid hook callerror when using the panel with@storybook/addon-docsloaded in the same Storybook instance.
3.1.1
Patch Changes
- #530
70b24a5Thanks @unional! - Downgrade Storybook from 10.2.0 alpha to 10.1.10. 10.2.0 seems to still take a while to be released.
3.1.0
Minor Changes
- #496
bf7fcecThanks @unional! - Improve support for Storybook CSF Next. The setup is now done in.storybook/preview.tsinstead ofvitest.setup.ts.
Patch Changes
-
#496
557b809Thanks @unional! - Handle case whenstoryDataisundefined. -
Updated dependencies [
ea6b3b2]:- vitest-plugin-vis@4.1.0
3.0.1
Patch Changes
3.0.0
Major Changes
Minor Changes
Patch Changes
2.1.5
Patch Changes
-
#476
e14b67dThanks @unional! - Usejsx: reactinstead ofjsx: react-jsxto fix therecentlyCreatedOwnerStackserror when loading the addon panel. -
Updated dependencies [
0ebfe75]:- vitest-plugin-vis@3.5.1
2.1.4
Patch Changes
2.1.3
Patch Changes
- Updated dependencies [
147858a]:- vitest-plugin-vis@3.5.0
2.1.2
Patch Changes
- Updated dependencies [
fff3b67]:- vitest-plugin-vis@3.4.1
2.1.1
Patch Changes
- Updated dependencies [
30026e2]:- vitest-plugin-vis@3.4.0
2.1.0
Minor Changes
2.0.7
Patch Changes
cb735b9Thanks @unional! - Revert importingcreateVisfromvitest-plugin-vis/client-api.createVisimportsvitest, which cannot be imported in the client side.- Updated dependencies [
cb735b9]:- vitest-plugin-vis@3.3.2
2.0.6
Patch Changes
- Updated dependencies [
5b25658]:- vitest-plugin-vis@3.3.1
2.0.5
Patch Changes
2.0.4
Patch Changes
-
#314
9bf9224Thanks @unional! - Add@storybook/addon-vitestas peer dependency. -
Updated dependencies [
090e613,4fb0a22,150924d]:- vitest-plugin-vis@3.3.0
2.0.3
Patch Changes
- #308
d6e5979Thanks @unional! - Updatepreset.jsto ESM. This fix the issue when running in Node 22.12+ where ESM is enabled by default.
2.0.2
Patch Changes
2.0.1
Patch Changes
2.0.0
Major Changes
1.1.0
Minor Changes
Patch Changes
- Updated dependencies [
9ba3e59]:- vitest-plugin-vis@3.1.0
1.0.2
Patch Changes
1.0.1
Patch Changes
-
Updated dependencies [
9a25501]:- vitest-plugin-vis@3.0.1
1.0.0
Major Changes
-
#259
a7c2a49Thanks @unional! - Movestorybook-addon-vis/previewintostorybook-addon-vis/vitest-setup. -
#259
d8c2dacThanks @unional! - AddStorybook Vispanel to show the results of the visual tests.
Minor Changes
-
#259
36dcd4eThanks @unional! - RenameImageSnapshotIdOptionstoImageSnapshotKeyOptions. -
#259
ccb67afThanks @unional! - RemoveSnapshotMetafrom API.
Patch Changes
-
#259
29ea8dcThanks @unional! - RenamematchImageSnapshottomatchImageSnapshotAction(breaking). -
#259
fbaa75bThanks @unional! - UsehasImageSnapshotActionfromvitest-plugin-vis. -
f19d4c9- Depends onvitest-plugin-viswith version range^. -
Updated dependencies [
1d322c4,38734c5,14f57c5,7ff4a7b,b68f90a,6f74919,29ea8dc,594c9c9,34973ca,4c9bf36,aa957fc,899ce35,f3ef08c,abcedab,5539f6d,eb1eeee,4f9ce14,fb8603d,1b1c13a,11e52da,2f57b5b,ccb67af,31d9e29,577e42b,c3ec8f8,d7e7802,033f725,766c035,51b4855,755f18a,3c8eee0,f7ce143,ea3735f,6978c83]:- vitest-plugin-vis@3.0.0
0.19.4
Patch Changes
- Updated dependencies [
0b83a6e]:- vitest-plugin-vis@2.4.4
0.19.3
Patch Changes
- Updated dependencies [
57be521]:- vitest-plugin-vis@2.4.3
0.19.2
Patch Changes
- Updated dependencies [
349e021]:- vitest-plugin-vis@2.4.2
0.19.1
Patch Changes
- Updated dependencies [
e877872]:- vitest-plugin-vis@2.4.1
0.19.0
Minor Changes
- #238
51346e2Thanks @unional! - ExportsetAutoSnapshotOptionsandSnapshotMetawhich are useful understorybook-addon-vis/vitest-setup.
Patch Changes
0.18.8
Patch Changes
- Updated dependencies [
4b665f9]:- vitest-plugin-vis@2.3.3
0.18.7
Patch Changes
- Updated dependencies [
2a2b000]:- vitest-plugin-vis@2.3.2
0.18.6
Patch Changes
-
#227
b74a986Thanks @unional! - Adjustvitest-plugin-visusage -
Updated dependencies [
13ef2a5]:- vitest-plugin-vis@2.3.1
0.18.5
Patch Changes
- #225
4692f23Thanks @unional! - Workaround a Storybook 8.4 issue where thepreview.beforeEachis called after test instead of before. Because of that, thesetAutoSnapshotOptions()called within test is not honored. - Updated dependencies [
15bbbed,4692f23]:- vitest-plugin-vis@2.3.0
0.18.4
Patch Changes
- Updated dependencies [
13601ef]:- vitest-plugin-vis@2.2.0
0.18.3
Patch Changes
- Updated dependencies [
bbbc8e8]:- vitest-plugin-vis@2.1.1
0.18.2
Patch Changes
- Updated dependencies [
472acc9]:- vitest-plugin-vis@2.1.0
0.18.1
Patch Changes
0.18.0
Minor Changes
-
#204
020121fThanks @unional! - Change thecustomizeSnapshotIdto acceptcontextobject.This is a breaking change. Feature-wise, it is the same as before. We will enable better customization by passing
viewportto thecustomizeSnapshotIdfunction in the future. -
#204
76b09ccThanks @unional! - Add support to customizesnapshotRootDirwith a function. Deprecateplatformoption.
Patch Changes
0.17.11
Patch Changes
-
caa49e3Thanks @unional! - Remove extravitest-plugin.jsandvitest-plugin.d.ts. -
e753448Thanks @unional! - Remove extravitest-setup.jsfile.
0.17.10
Patch Changes
-
#195
d9ed547Thanks @unional! - Add Storybooktagsto snapshot options. -
Updated dependencies [
972db1b]:- vitest-plugin-vis@1.7.0
0.17.9
Patch Changes
- Updated dependencies [
be483d4]:- vitest-plugin-vis@1.6.5
0.17.8
Patch Changes
- Updated dependencies [
78b117f]:- vitest-plugin-vis@1.6.4
0.17.7
Patch Changes
0.17.6
Patch Changes
-
#185
c5296a1Thanks @unional! - Export more types to fix the inferred type cannot be named error. -
Updated dependencies [
c5296a1]:- vitest-plugin-vis@1.6.3
0.17.5
Patch Changes
- Updated dependencies [
49e8fbc]:- vitest-plugin-vis@1.6.2
0.17.4
Patch Changes
- Updated dependencies [
537cf83]:- vitest-plugin-vis@1.6.1
0.17.3
Patch Changes
-
#171
abd1c47Thanks @unional! - SupportsubjectDataTestIdindefineAutoSnapshotParam(). -
Updated dependencies [
5335011]:- vitest-plugin-vis@1.6.0
0.17.2
Patch Changes
- Updated dependencies [
611e0cc]:- vitest-plugin-vis@1.5.1
0.17.1
Patch Changes
-
#156
72959a6Thanks @unional! - Add top leveltypesfield topackage.jsonfor project not using ESM module resolution. -
#161
43fc2ceThanks @unional! - Change default timeout to 30s. The initial timeout of 1s was set by Vitest. It is causing tests to fail withTimeoutError, even when gettingLocatorlikegetByRole.This timeout will be removed in Vitest 3.
The underlying provider (
playwright) does not have a default timeout.Setting to 30s should be a good default for most cases.
It could still be too short for slow CI or when it is running scripts in parallel. That was the case for
storybook-test-runnerbut could be improved in Vitest browser mode.If timeout is still an issue, we can further default it to 60s or even 120s.
-
Updated dependencies [
72959a6,d2fdcbe,43fc2ce,995140f,a020417,ee4ef14]:- vitest-plugin-vis@1.5.0
0.17.0
Minor Changes
Patch Changes
- Updated dependencies [
da95b08]:- vitest-plugin-vis@1.4.0
0.16.4
Patch Changes
-
513d95cThanks @unional! - Add missing.d.tsfiles due totsupsetcleantotrueby default. -
Updated dependencies [
1b22d2d]:- vitest-plugin-vis@1.3.2
0.16.3
Patch Changes
- Updated dependencies [
3ebc865]:- vitest-plugin-vis@1.3.1
0.16.2
Patch Changes
-
#143
7ebf3aeThanks @unional! - UseImageSnapshotMatcherfromvitest-plugin-vis. -
#144
f642dbfThanks @unional! - UseimageSnapshotMatcherinstead ofmatchImageSnapshotto fix storybook loading issue. -
Updated dependencies [
2d4f1c0,78cc195,17510d3,f642dbf]:- vitest-plugin-vis@1.3.0
0.16.1
Patch Changes
0.16.0
Minor Changes
- #133
badf227Thanks @unional! - Update to usematchImageSnapshotfunction fromvitest-plugin-vis/clientwhich runs image comparison on the client side.
Patch Changes
0.15.7
Patch Changes
- Updated dependencies [
e242444]:- vitest-plugin-vis@1.0.5
0.15.6
Patch Changes
- Updated dependencies [
d695c4f]:- vitest-plugin-vis@1.0.4
0.15.5
Patch Changes
- Updated dependencies [
1068941]:- vitest-plugin-vis@1.0.3
0.15.4
Patch Changes
- Updated dependencies [
a8fcd75]:- vitest-plugin-vis@1.0.2
0.15.3
Patch Changes
7667febThanks @unional! - ExportToMatchImageSnapshotOptionstype to avoid Inferred type can’t be named error.
0.15.2
Patch Changes
0.15.1
Patch Changes
-
#115
eec65daThanks @unional! - ProxygetCurrentTest()fromvitest/suite.This is part of the work to fix #101.
-
Updated dependencies [
ae98ec4]:- vitest-plugin-vis@1.0.1
0.15.0
Minor Changes
-
#113
6283c1dThanks @unional! - RemovevisAnnotationsfromstorybook-addon-vismain export. UsevisAnnotationsfromstorybook-addon-vis/previewinstead:
Patch Changes
-
#113
3143283Thanks @unional! - Add/previewexport forvisAnnotations. -
#113
79d10d5Thanks @unional! - RemoveviteFinalsetup in/preset. You need to configure Vitest invitest.config.tsfor Vitest Browser Mode anyway. So getting the config to.storybook/main.tsis actually worst. -
#114
673b202Thanks @unional! - Remove extravisAnnotations.beforeAll(). This is handled byvitest-plugin-visand only need onvitest.beforeAll. -
#113
78f2776Thanks @unional! - Consolidate preview annotation in one place.
0.14.0
Minor Changes
-
#102
1c6830bThanks @unional! - exporttrimCommonFolder(). This is made available for customizing snapshot subpath. -
#102
c39daf0Thanks @unional! - create baseline snapshot on server. -
#102
03b1e6bThanks @unional! - Allow commands to work inwebdriverio. -
#102
fa4dd12Thanks @unional! - Rewritten to usevitest-plugin-vis, which performs the snapshot on the server side.The interface is greatly improved. The
page.imageSnapshot()is removed. Now you can performexpect(...).toMatchImageSnapshot()on regular element and locator.Please check the read me for the new API.
Patch Changes
-
#102
03b1e6bThanks @unional! - Change to useImageData(data, w, h, o)constructor instead ofImageData(w, h, o)asfirefoxdoes not support it. -
#102
cbd1b4cThanks @unional! - Fix update snapshot for basic afterEach -
#102
3b09bb1Thanks @unional! - Useconsole.error()instead ofconsole.info()when using not supportedpagemethod. -
#102
9534645Thanks @unional! - Plugin should not set browser. -
Updated dependencies [
03893ab]:- vitest-plugin-vis@1.0.0
0.13.0
Minor Changes
-
#88
0fcada9Thanks @unional! - Move the__results__and__diff_output__directory one level up to reduce nesting.Terminal window # fromv __vis__v darwin # snapshot generated on macos by CI˃ __diff_output__˃ __result__˃ linux # snapshot generated on linux by CI˃ __diff_output__˃ __result__v local # snapshot generated on local machine˃ __diff_output__˃ __result__v button.stories.tsxsnapshot-1.pngsnapshot-2.pngv button.stories.tsxsnapshot-1.pngsnapshot-2.png# tov __vis__˃ __diff_output__ # where the diff images are storedv button.stories.tsxsnapshot-1.pngsnapshot-2.png˃ __result__ # where the resulting snapshot of the current run are storedv button.stories.tsxsnapshot-1.pngsnapshot-2.png˃ darwin # snapshot generated on macos by CI˃ linux # snapshot generated on linux by CIv local # snapshot generated on local machinev button.stories.tsxsnapshot-1.pngsnapshot-2.png
0.12.1
Patch Changes
0.12.0
Minor Changes
-
#74
6707f9fThanks @unional! - Change default snapshot folder back to<project root>/__vis__. They are now stored in folder structure mimic the test/story file.This makes it much easier to review the snapshot results.
Also, it avoids the
EISDIRerror when running the tests and running the storybook at the same time.The
snapshotDiroption is renamed tosnapshotRootDir.A
customizeSnapshotSubpathis added to allow customizing the snapshot sub path.
Patch Changes
-
#77
d089502Thanks @unional! - Change failure message to use full path.This allows the user to easily access the file in their editor.
0.11.2
Patch Changes
0.11.1
Patch Changes
0.11.0
Minor Changes
-
ac4f759Thanks @unional! - Change snapshot folder to__vis__next to the story/test file. This avoids conflict when there are multiple story/test files with the same name in different folder.The
createVisConfig({ snapshotPath })is renamed tosnapshotDir.
0.10.2
Patch Changes
0.10.1
Patch Changes
0.10.0
Minor Changes
-
7974251Thanks @unional! - Add global timeout and match options -
55439aeThanks @unional! - Support globalcustomizeSnapshotId()config.
Patch Changes
0.9.1
Patch Changes
-
abd7a7fThanks @unional! - Moveexpect.extendsto module scope. It technically becomes a load time side effect which is not ideal, but at the same time avoids doing the extends on every test file. -
768396aThanks @unional! - Use exact type forstorybookPreviewVis.
0.9.0
Minor Changes
-
2db5b77Thanks @unional! - Remove the need of takingctxas argument forshouldTakeSnapshotand theafterEachhandler. -
#59
90153d3Thanks @unional! - Simplify setup invitest.setup.tswithcreateVisConfig(). -
#60
0eb677bThanks @unional! - Internalizeexpect.extends()forstorybookwithindefineVisPreview(). -
5a7777fThanks @unional! - RenamevisStorybookPreviewtostorybookPreviewVis
Patch Changes
-
#60
30adcefThanks @unional! - Fixplay()when running in storybook. -
f92a371Thanks @unional! - ChangeshouldTakeSnapshot(ctx)to acceptany. Check is done at runtime. This change allows the user to skip the type parameter inafterEachhook.// fromimport { StoryContext } from "@storybook/react";import { shouldTakeSnapshot } from "storybook-addon-vis/vitest-setup";import { afterEach } from "vitest";afterEach<{ story?: StoryContext }>(async (ctx) => {if (!shouldTakeSnapshot(ctx)) return;// ...});// toafterEach(async (ctx) => {if (!shouldTakeSnapshot(ctx)) return;// ...});
0.8.0
Minor Changes
-
79ccf83Thanks @unional! - RefactorconfigureSnapshotBeforeAll()intosetupVitestVis().// fromimport { configureSnapshotBeforeAll } from "storybook-addon-vis";import { beforeAll } from "vitest";beforeAll(configureSnapshotBeforeAll);// toimport { setupVitestVis } from "storybook-addon-vis";import { beforeAll } from "vitest";const vis = setupVitestVis();beforeAll(vis.beforeAll); -
#50
062991dThanks @unional! - RemoveconfigureSnapshotBeforeEach, no longer needed. -
#50
180562aThanks @unional! - The lastexpect().toMatchImageSnapshot()will be awaited automatically, making it easier to write.
0.7.0
Minor Changes
250611eThanks @unional! - Theparameters.snapshotis now honored byexpect(...).toMatchImageSnapshot()automatically. This applies to both automatic and manual snapshot testing.
Patch Changes
0.6.3
Patch Changes
0.6.2
Patch Changes
0.6.1
Patch Changes
-
18ac025Thanks @unional! - Enable code splitting to share state betweenstorybook-addon-visandstorybook-addon-vis/vitest-setup.We couldn’t reproduce the issue locally, but we believe this change will fix it.
0.6.0
Minor Changes
-
668c6d9Thanks @unional! - Addpage.hasImageSnapshot().Rename type
SnapshotCapturertoImageSnapshotAction. -
85e5a7bThanks @unional! - Addoptions.timeoutand default to 3000
Patch Changes
0.5.0
Minor Changes
0.4.1
Patch Changes
- #25
e251f43Thanks @unional! - Update snapshot failure message so that the messagepress u to update snapshotwill show.
0.4.0
Minor Changes
Patch Changes
0.3.0
Minor Changes
0.2.0
Minor Changes
-
f55bb95Thanks @unional! - ChangegetSnapshotPlatform()to returnlocalwhen not on CI. This is the best setup I have found so far to make the snapshot test work on both local and CI.Set default snapshot path with
getSnapshoPlatformfunction.
0.1.0
Minor Changes
-
1e03ebbThanks @unional! - Addcommands.getSnapshotPlatform(). -
0f61d50Thanks @unional! - Addcommande.isCIfor CI detection duringvitest.setup.ts
Patch Changes
⚠️ Pushed to main
- test: cover image resizer (@unional)
- fix: rename vite plugin name (@unional)
- fix: rename plugin (@unional)
- chore: remove extra files (@unional)
- chore: add verify script (@unional)
- chore: ignore snapshots/*/results and diff (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.15 (Tue Oct 29 2024)
⚠️ Pushed to main
- test: move tests to per platform (@unional)
- test: add test for image resizer (@unional)
- chore: remove prop-types (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.14 (Mon Oct 28 2024)
🐛 Bug Fix
- Add renovate.json #1 (@renovate[bot])
Authors: 1
v0.0.13 (Mon Oct 28 2024)
⚠️ Pushed to main
- feat: param support (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.12 (Mon Oct 28 2024)
⚠️ Pushed to main
Authors: 1
- Homa Wong (@unional)
v0.0.11 (Mon Oct 28 2024)
⚠️ Pushed to main
- docs: top readme link (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.10 (Mon Oct 28 2024)
⚠️ Pushed to main
- docs: update readme (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.9 (Mon Oct 28 2024)
⚠️ Pushed to main
- fix: avoid top-level await (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.8 (Mon Oct 28 2024)
🐛 Bug Fix
Authors: 1
- Homa Wong (@unional)
v0.0.7 (Mon Oct 28 2024)
⚠️ Pushed to main
Authors: 1
- Homa Wong (@unional)
v0.0.6 (Mon Oct 28 2024)
⚠️ Pushed to main
- test: use storybook/test (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.5 (Mon Oct 28 2024)
⚠️ Pushed to main
- fix: stub imagesnapshot result and handling in storybook (@unional)
- feat: invert vitest expect extend (@unional)
- feat: invert storybook export extend (@unional)
- chore: remove extra import (@unional)
- chore: comment out preset (@unional)
- refactor: move logic file (@unional)
- feat: invert vitest-setup (@unional)
- chore: remove building managea, preview, and preset (@unional)
- test: update filename (@unional)
- feat: add match options (@unional)
- feat: take snapshot in lowercase (@unional)
- feat: basig tag support (@unional)
- refactor: test image (@unional)
- fix: extend vitest expect only once (@unional)
- refactor: move page.extend to context (@unional)
- refactor: comment out
rootDir(@unional) - refactor: move (@unional)
- fix: remove extra exports (@unional)
- fix: create dest folder when not exist (@unional)
- chore: rename readme (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.4 (Sat Oct 26 2024)
⚠️ Pushed to main
Authors: 1
- Homa Wong (@unional)
v0.0.2 (Fri Oct 25 2024)
⚠️ Pushed to main
- feat: handle different size (@unional)
- feat: take snapshot on element (@unional)
- feat: add distribution (@unional)
- docs: misc update (@unional)
- feat: move default snapshot location (@unional)
Authors: 1
- Homa Wong (@unional)
v0.0.1 (Fri Oct 25 2024)
⚠️ Pushed to main
- feat: save diff (@unional)
- chore: remove story examples (@unional)
- feat: toMatchImageSnapshot (@unional)
- refactor: clean (@unional)
- chore: update git-graph config (@unional)
- feat: page.imageShapshot (@unional)
- chore: vscode extension (@unional)
- chore: vscode settings (@unional)
- chore: removt cjs build (@unional)
- feat: imageData conversion (@unional)
- chore: comment example code (@unional)
- test: indicate unit test (@unional)
- fix: stop example exports (@unional)
- chore: delete eject (@unional)
- chore: audit (@unional)
- feat: add context proxy (@unional)
- fix: use esnext and bundler config (@unional)
- chore: add commitlint and changesets (@unional)
- refactor: rename file (@unional)
- refactor: add biome (@unional)
- docs: add doc for delay (@unional)
- chore: @storybook/experimental-addon-test (@unional)
- feat: add params (@unional)
- add nra2 (@unional)
- project setup (@unional)
- Initial commit (@unional)
Authors: 1
- Homa Wong (@unional)