Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1292fa2
chore: rename 'workspace' to 'projects' in vitest configs
unional Nov 24, 2025
d9dd3ac
feat: vitest 4 upgrade interm
unional Nov 24, 2025
705d804
refactor: update vitest-plugin-vis to use ExtendedBrowserCommandContext
unional Nov 24, 2025
a54c8c8
test: remove image_data and image_resizer unit tests
unional Nov 24, 2025
b7b14cc
feat: support vitest 4
unional Nov 24, 2025
ec7bf6b
chore(deps): update vitest-browser-react to 2.0.2
unional Nov 24, 2025
f2a1428
test: await render in tests to ensure rendering is complete
unional Nov 24, 2025
1f0151a
Revert "test: remove image_data and image_resizer unit tests"
unional Nov 24, 2025
4bde649
fix: update import paths for testing constants
unional Nov 24, 2025
9a6e796
refactor: move testing utilities to server/testing directory
unional Nov 24, 2025
5077a08
refactor: update import path for stubUserConfig
unional Nov 24, 2025
fdace7e
feat: update to storybook 10
unional Nov 24, 2025
75d6776
chore: update storybook and vitest configurations
unional Nov 24, 2025
4b372ef
chore(deps): update @repobuddy/storybook to 2.1.2
unional Nov 24, 2025
cd62d88
chore(deps): migrate dependencies to catalog specifiers
unional Nov 24, 2025
55e063d
chore: add sb-csf-next project
unional Nov 24, 2025
e393e1e
test: update to CSF Next
unional Nov 24, 2025
9e81b0d
chore: add dark-mode
unional Nov 24, 2025
bc55290
chore: update vitest and storybook configurations for CSF Next
unional Nov 24, 2025
859e504
chore: lint
unional Nov 24, 2025
6f57401
chore(deps): move @storybook-community/storybook-dark-mode to catalog
unional Nov 24, 2025
71594fa
chore(deps): update @storybook-community/storybook-dark-mode to catal…
unional Nov 24, 2025
d3a2d0c
feat(testcases/sb-csf-next): add storybook-addon-vis support
unional Nov 24, 2025
23ed67e
refactor: update turbo and typescript configurations, add t:t command…
unional Nov 24, 2025
226b4bc
chore: add .nowhere to .gitignore
unional Nov 24, 2025
e21287a
refactor: move StorybookVisOptions to node and update imports
unional Nov 24, 2025
a108a9d
docs: add code formatting guidelines for markdown code snippets
unional Nov 24, 2025
62d538b
feat: introduce defineStorybookVis for simplified Storybook Visual Te…
unional Nov 24, 2025
ddcfa40
chore: remove tsconfig.project.json from storybook-addon-vis
unional Nov 24, 2025
49a9073
docs: add documentation for storybook-addon-vis, including overview, …
unional Nov 24, 2025
5e80b1e
fix: update getAbsolutePath function in storybook main files to retur…
unional Nov 24, 2025
d0a3edc
fix: unify getAbsolutePath function implementation across storybook m…
unional Nov 24, 2025
2e8237d
chore: rename testcase package to testcase-sb-csf-next
unional Nov 24, 2025
14d2370
fix: migrate vitest-plugin-vis to use tsdown for building
unional Nov 24, 2025
281cd4c
fix: reorder import statements in story_snapshot.stories.tsx files fo…
unional Nov 24, 2025
ff32c6f
chore: update tsconfig.json to include "jsx" compiler option
unional Nov 24, 2025
3303cf4
chore: update biome.jsonc to ignore additional files and directories
unional Nov 24, 2025
0540010
refactor: update vis setup in vitest.setup.ts to use new setup method
unional Nov 24, 2025
720bae3
chore: migrate storybook-addon-vis to use tsdown for building
unional Nov 24, 2025
36dc832
chore: clear biome check
unional Nov 24, 2025
5612ae0
chore: update tsdown config for storybook-addon-vis to disable minifi…
unional Nov 24, 2025
5042e7c
fix: update storybook-addon-vis to use react classic jsx runtime and …
unional Nov 24, 2025
39f31ef
chore: update package.json to reflect testcase package rename
unional Nov 24, 2025
1bdabf1
fix: update snapshot enabled logic to handle undefined case
unional Nov 24, 2025
7fa0401
chore: enable windows-latest in pull-request and release workflows
unional Nov 25, 2025
2370532
test: separate csf next and csf mix test case
unional Nov 26, 2025
8436b7a
core: add sb-csf-mix testcase to tsconfig.json
unional Nov 28, 2025
7a135c7
chore: update tsconfig options for storybook-addon-vis
unional Nov 28, 2025
537ed80
chore: update tsdown config for storybook-addon-vis to use tsconfig.b…
unional Nov 28, 2025
b534145
chore: update tsconfig options for vitest-plugin-vis
unional Nov 28, 2025
fa5ef48
chore: dedupe
unional Nov 28, 2025
bbb9d36
chore: apply patches to storybook and dependencies
unional Nov 28, 2025
d221c15
Remove tsconfig files and update storybook configuration
unional Nov 28, 2025
91c1805
Enable composite builds and configure storybook-addon-vis
unional Nov 28, 2025
67dab00
feat: extract setup options into a reusable type
unional Nov 28, 2025
1b2dfd0
docs: improve documentation for setAutoSnapshotOptions function
unional Nov 29, 2025
f8ca4a8
feat: add enable option to SnapshotMeta type
unional Nov 29, 2025
9a12106
fix: snapshot tag logic
unional Nov 29, 2025
43c2ae1
docs: simplify and reorganize `storybook-addon-vis` documentation
unional Nov 29, 2025
bd80194
docs: update vitest-plugin-vis config example for vitest v4
unional Nov 29, 2025
ddcdc2e
Merge branch 'main' into vp
unional Nov 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eager-impalas-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vitest-plugin-vis": major
---

Update to Vitest v4
5 changes: 5 additions & 0 deletions .changeset/soft-turkeys-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vitest-plugin-vis": patch
---

Build with `tsdown`
5 changes: 5 additions & 0 deletions .changeset/some-candles-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"storybook-addon-vis": major
---

Update to Storybook 10
5 changes: 5 additions & 0 deletions .changeset/stale-lines-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"storybook-addon-vis": minor
---

Add `defineStorybookVis()`
6 changes: 6 additions & 0 deletions .cursor/rules/cursor-rules.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ function badExample() {
6. Default rule type to `Agent Requested` and add the rule purpose to the `description`.

7. Update [master.mdc](mdc:.cursor/rules/master.mdc) to reference the new rule and describe its purpose

8. When writing code snippets in markdown, follow the same code formatting as in real code:
- Use proper indentation (spaces or tabs, consistent with project style)
- Maintain consistent spacing and line breaks
- Follow the same style guide as the actual codebase
- Code examples should be formatted exactly as they would appear in source files
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
os:
- ubuntu-latest
# - windows-latest
- windows-latest
node-version:
- 20
- 22
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
matrix:
os:
- ubuntu-latest
# - windows-latest
- windows-latest
node-version:
- 20
- 22
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ node_modules
vite*.timestamp*

# project
.nowhere
**/__screenshots__
**/__snapshots__/*/__diff_output__
**/__snapshots__/*/__results__
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
public-hoist-pattern[]=@changesets/config
2 changes: 2 additions & 0 deletions .vscode/ltex.dictionary.en-US.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ addon
pathe
Vis
async
addon-docs
Addon
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"testid",
"tsup",
"vite",
"vitejs",
"Vitest"
],
"editor.codeActionsOnSave": {
Expand Down Expand Up @@ -102,5 +103,6 @@
"typescript.preferences.importModuleSpecifierEnding": "js",
"typescript.preferences.includePackageJsonAutoImports": "on",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.tsserver.web.projectWideIntellisense.enabled": true
"typescript.tsserver.web.projectWideIntellisense.enabled": true,
"yaml.format.singleQuote": true
}
8 changes: 6 additions & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.6/schema.json",
"extends": ["@repobuddy/biome/recommended"],
"vcs": {
"enabled": true,
Expand All @@ -13,9 +13,13 @@
"**",
"!**/node_modules/",
"!**/.vscode/**/*.txt",
"!**/.dist",
"!**/esm",
"!**/*.code-workspace",
"!**/tailwind.css"
"!**/tailwind.css",
"!packages/storybook-addon-vis/.storybook/local-preset.cjs",
"!packages/storybook-addon-vis/manager.js",
"!packages/storybook-addon-vis/preset.js"
]
},
"formatter": {
Expand Down
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,29 @@
"clean:vis:local": "turbo clean:vis:local",
"coverage": "turbo coverage",
"cs": "changeset",
"knip": "knip --config .knip.jsonc",
"nuke": "turbo nuke && rimraf node_modules",
"release": "pnpm build && changeset publish",
"sav": "pnpm --filter=./packages/storybook-addon-vis",
"sc3": "pnpm --filter=testcase-sb-csf-3",
"scm": "pnpm --filter=testcase-sb-csf-mix",
"scn": "pnpm --filter=testcase-sb-csf-next",
"t:t": "turbo t:t",
"test": "turbo test",
"test:u": "turbo test -- -u",
"test:trv": "vitest run --project=testcase-react-vite-ts",
"test:u": "turbo test -- -u",
"trv": "pnpm --filter=testcase-react-vite-ts",
"tt": "pnpm --filter=testcase-themes",
"tv": "pnpm --filter=testcase-vpv",
"tw": "pnpm --filter=testcase-workspace",
"v": "turbo check coverage",
"verify": "turbo check test:type coverage testcase",
"verify:ci": "turbo check test:type coverage:u testcase:u --concurrency=1",
"verify": "turbo check t:t coverage testcase",
"verify:ci": "turbo check t:t coverage:u testcase:u --concurrency=1",
"version": "changeset version",
"sav": "pnpm --filter=./packages/storybook-addon-vis",
"vis": "pnpm --filter=./packages/storybook-addon-vis",
"vpv": "pnpm --filter=./packages/vitest-plugin-vis",
"w": "turbo w",
"w:trv": "vitest --project=testcase-react-vite-ts",
"knip": "knip --config .knip.jsonc"
"w:trv": "vitest --project=testcase-react-vite-ts"
},
"devDependencies": {
"@biomejs/biome": "2.3.6",
Expand All @@ -46,7 +50,7 @@
"playwright": "latest",
"rimraf": "^6.0.1",
"turbo": "^2.6.0",
"typescript": "^5.9.3",
"typescript": "catalog:",
"vitest": "catalog:",
"webdriverio": "^9.12.2"
},
Expand Down
45 changes: 22 additions & 23 deletions packages/storybook-addon-vis/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import { defineStorybookVis } from '#storybook-addon-vis/node'
import type { StorybookConfig } from '@storybook/react-vite'
import { dirname, join } from 'node:path'
import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)))
}

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
Expand All @@ -8,33 +18,22 @@ const config: StorybookConfig = {
getAbsolutePath('@storybook/addon-vitest'),
getAbsolutePath('storybook-addon-tag-badges'),
getAbsolutePath('@storybook-community/storybook-dark-mode'),
{
name: getAbsolutePath('storybook-addon-vis'),
options: {
visProjects: [
{
snapshotRootDir: '__vis__/linux',
},
{
snapshotRootDir: '__vis__/local',
},
],
},
},
defineStorybookVis({
visProjects: [
{
snapshotRootDir: '__vis__/linux',
},
{
snapshotRootDir: '__vis__/local',
},
],
}),
],
tags: {
internal: {
excludeFromSidebar: process.env.NODE_ENV === 'production',
},
},
framework: {
name: getAbsolutePath('@storybook/react-vite'),
options: {},
},
docs: {},
framework: getAbsolutePath('@storybook/react-vite'),
}
export default config

function getAbsolutePath(value: string) {
return dirname(require.resolve(join(value, 'package.json')))
}
4 changes: 2 additions & 2 deletions packages/storybook-addon-vis/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { brandTitle } from '@repobuddy/storybook/manager'
import { tagBadges } from '@repobuddy/storybook/storybook-addon-tag-badges'
import { addons } from 'storybook/internal/manager-api'
import { themes } from 'storybook/internal/theming'
import { addons } from 'storybook/manager-api'
import { themes } from 'storybook/theming'

addons.setConfig({
tagBadges,
Expand Down
1 change: 1 addition & 0 deletions packages/storybook-addon-vis/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const preview: Preview = {
},
},
docs: {
codePanel: true,
container: createDarkModeDocsContainer(),
},
options: {
Expand Down
69 changes: 37 additions & 32 deletions packages/storybook-addon-vis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,31 @@
},
"type": "module",
"imports": {
"#storybook-addon-vis/node": "./src/node.ts",
"#storybook-addon-vis/vitest-plugin": "./src/vitest-plugin.ts"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"import": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./matcher": {
"types": "./dist/matcher.d.ts",
"import": "./dist/matcher.js",
"require": "./dist/matcher.cjs"
"import": "./dist/matcher.js"
},
"./preset": "./dist/preset.cjs",
"./node": {
"types": "./dist/node.d.mts",
"import": "./dist/node.mjs"
},
"./preset": "./dist/preset.mjs",
"./vitest-setup": {
"types": "./dist/vitest-setup.d.ts",
"import": "./dist/vitest-setup.js",
"require": "./dist/vitest-setup.cjs"
"import": "./dist/vitest-setup.js"
},
"./vitest-plugin": {
"types": "./dist/vitest-plugin.d.ts",
"import": "./dist/vitest-plugin.js"
"types": "./dist/vitest-plugin.d.mts",
"import": "./dist/vitest-plugin.mjs"
},
"./package.json": "./package.json"
},
Expand All @@ -59,7 +61,7 @@
"!**/*.{spec,test,unit,accept,integrate,system,perf,stress,stories,study}.*"
],
"scripts": {
"build": "tsup --tsconfig tsconfig.tsup.json",
"build": "tsdown --tsconfig tsconfig.build.json",
"build:sb": "cross-env NODE_ENV=production storybook build",
"clean": "rimraf coverage dist esm --glob *.tsbuildinfo vitest.*.timestamp*",
"clean:vis:local": "rimraf __vis__/local",
Expand All @@ -72,11 +74,10 @@
"sb": "storybook dev -p 6006",
"sb:build": "cross-env NODE_ENV=production storybook build",
"t:n": "vitest run -c vitest.config.node.ts",
"t:wb": "cross-env BROWSER=firefox BROWSERPROVIDER=webdriverio vitest run",
"t:pw": "vitest run -c vitest.config.playwright.ts",
"t:t": "tsc --noEmit",
"t:wd": "cross-env BROWSER=firefox BROWSERPROVIDER=webdriverio vitest run",
"test": "vitest run",
"test:node": "vitest run -c vitest.config.node.ts",
"test:pw": "vitest run -c vitest.config.playwright.ts",
"test:type": "tsc --noEmit",
"test:u": "vitest run -u",
"v": "run-p build cov",
"w": "vitest",
Expand All @@ -93,18 +94,20 @@
"vitest-plugin-vis": "workspace:^"
},
"devDependencies": {
"@repobuddy/storybook": "^2.0.0",
"@storybook-community/storybook-dark-mode": "^6.0.8",
"@storybook/addon-docs": "^9.1.16",
"@storybook/addon-vitest": "9.1.16",
"@storybook/react-vite": "^9.1.16",
"@repobuddy/storybook": "^2.1.2",
"@storybook-community/storybook-dark-mode": "catalog:",
"@storybook/addon-docs": "^10.1.2",
"@storybook/addon-vitest": "^10.1.2",
"@storybook/react-vite": "^10.1.2",
"@tailwindcss/cli": "^4.1.7",
"@tailwindcss/vite": "^4.1.14",
"@testing-library/react": "^16.0.1",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.1",
"@vitejs/plugin-react": "^5.0.0",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "catalog:",
"@vitest/browser": "catalog:",
"@vitest/browser-playwright": "catalog:",
"@vitest/browser-webdriverio": "catalog:",
"@vitest/coverage-istanbul": "catalog:",
"@vitest/expect": "catalog:",
"boxen": "^8.0.1",
Expand All @@ -114,22 +117,22 @@
"playwright": "latest",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"storybook": "^9.1.16",
"storybook-addon-tag-badges": "^3.0.0",
"storybook": "^10.1.2",
"storybook-addon-tag-badges": "^3.0.2",
"tailwindcss": "^4.1.14",
"tsup": "^8.3.5",
"typescript": "^5.9.3",
"tsdown": "^0.16.6",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:",
"vitest-browser-react": "^1.0.0",
"vitest-browser-react": "catalog:",
"webdriverio": "latest",
"zx": "^8.0.0"
},
"peerDependencies": {
"@storybook/addon-vitest": "^9.1.10",
"@vitest/browser": "^2 || ^3",
"storybook": "^9.1.10",
"vitest": "^2 || ^3"
"@storybook/addon-vitest": "^10.1.2",
"@vitest/browser": "^4",
"storybook": "^10.1.2",
"vitest": "^4"
},
"publishConfig": {
"access": "public"
Expand All @@ -144,7 +147,9 @@
"src/manager.tsx"
],
"nodeEntries": [
"./src/preset.ts"
"./src/node.ts",
"./src/preset.ts",
"./src/vitest-plugin.ts"
]
},
"storybook": {
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook-addon-vis/preset.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './dist/preset.cjs'
export * from './dist/preset.mjs'
Loading