Skip to content

Commit aeb4112

Browse files
authored
chore: update storybook (#11936)
1 parent 520b12e commit aeb4112

File tree

4 files changed

+424
-919
lines changed

4 files changed

+424
-919
lines changed

.github/workflows/ci.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,8 @@ jobs:
516516
NODE_OPTIONS: "--max_old_space_size=4096"
517517
STORYBOOK: true
518518
with:
519-
buildScriptName: "storybook:build"
519+
# Do a fast, testing build for change previews
520+
buildScriptName: "storybook:ci"
520521
exitOnceUploaded: true
521522
# This will prevent CI from failing when Chromatic detects visual changes
522523
exitZeroOnChanges: true
@@ -530,6 +531,8 @@ jobs:
530531
# Run TurboSnap to trace file dependencies to related stories
531532
# and tell chromatic to only take snapshots of relevent stories
532533
onlyChanged: true
534+
# Avoid uploading single files, because that's very slow
535+
zip: true
533536

534537
# This is a separate step for mainline only that auto accepts and changes
535538
# instead of holding CI up. Since we squash/merge, this is defensive to
@@ -547,13 +550,16 @@ jobs:
547550
autoAcceptChanges: true
548551
# This will prevent CI from failing when Chromatic detects visual changes
549552
exitZeroOnChanges: true
553+
# Do a full build with documentation for mainline builds
550554
buildScriptName: "storybook:build"
551555
projectToken: 695c25b6cb65
552556
workingDir: "./site"
553557
storybookBaseDir: "./site"
554558
# Run TurboSnap to trace file dependencies to related stories
555559
# and tell chromatic to only take snapshots of relevent stories
556560
onlyChanged: true
561+
# Avoid uploading single files, because that's very slow
562+
zip: true
557563

558564
offlinedocs:
559565
name: offlinedocs
@@ -726,7 +732,7 @@ jobs:
726732
727733
# Define specific tags
728734
tags=("$tag" "main" "latest")
729-
735+
730736
# Create and push a multi-arch manifest for each tag
731737
# we are adding `latest` tag and keeping `main` for backward
732738
# compatibality

site/package.json

+14-13
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
"gen:provisioner": "protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./e2e/ --ts_proto_opt=outputJsonMethods=false,outputEncodeMethods=encode-no-creation,outputClientImpl=false,nestJs=false,outputPartialMethods=false,fileSuffix=Generated,suffix=hey -I ../provisionersdk/proto ../provisionersdk/proto/provisioner.proto && pnpm exec prettier --ignore-path '/dev/null' --cache --write './e2e/provisionerGenerated.ts'",
2121
"storybook": "STORYBOOK=true storybook dev -p 6006",
2222
"storybook:build": "storybook build",
23+
"storybook:ci": "storybook build --test",
2324
"test": "jest --selectProjects test",
2425
"test:ci": "jest --selectProjects test --silent",
2526
"test:coverage": "jest --selectProjects test --collectCoverage",
2627
"test:watch": "jest --selectProjects test --watch",
28+
"test:storybook": "test-storybook",
2729
"stats": "STATS=true pnpm build && npx http-server ./stats -p 8081 -c-1",
2830
"deadcode": "ts-prune | grep -v \".stories\\|.config\\|e2e\\|__mocks__\\|used in module\\|testHelpers\\|typesGenerated\" || echo \"No deadcode found.\""
2931
},
@@ -94,17 +96,16 @@
9496
"devDependencies": {
9597
"@octokit/types": "12.3.0",
9698
"@playwright/test": "1.39.0",
97-
"@storybook/addon-actions": "7.5.2",
98-
"@storybook/addon-essentials": "7.5.2",
99-
"@storybook/addon-interactions": "7.6.10",
100-
"@storybook/addon-links": "7.5.2",
101-
"@storybook/addon-mdx-gfm": "7.5.2",
102-
"@storybook/addon-themes": "7.6.4",
103-
"@storybook/jest": "0.2.3",
104-
"@storybook/preview-api": "7.6.9",
105-
"@storybook/react": "7.5.2",
106-
"@storybook/react-vite": "7.5.2",
107-
"@storybook/testing-library": "0.2.2",
99+
"@storybook/addon-actions": "7.6.11",
100+
"@storybook/addon-essentials": "7.6.11",
101+
"@storybook/addon-interactions": "7.6.11",
102+
"@storybook/addon-links": "7.6.11",
103+
"@storybook/addon-mdx-gfm": "7.6.11",
104+
"@storybook/addon-themes": "7.6.11",
105+
"@storybook/preview-api": "7.6.11",
106+
"@storybook/react": "7.6.11",
107+
"@storybook/react-vite": "7.6.11",
108+
"@storybook/test": "7.6.11",
108109
"@swc/core": "1.3.38",
109110
"@swc/jest": "0.2.24",
110111
"@testing-library/jest-dom": "6.1.2",
@@ -132,7 +133,7 @@
132133
"@typescript-eslint/eslint-plugin": "6.9.1",
133134
"@typescript-eslint/parser": "6.9.1",
134135
"@vitejs/plugin-react": "4.1.0",
135-
"chromatic": "9.0.0",
136+
"chromatic": "10.6.1",
136137
"eslint": "8.52.0",
137138
"eslint-config-prettier": "9.0.0",
138139
"eslint-import-resolver-typescript": "3.6.0",
@@ -161,7 +162,7 @@
161162
"protobufjs": "7.2.4",
162163
"rxjs": "7.8.1",
163164
"ssh2": "1.14.0",
164-
"storybook": "7.5.2",
165+
"storybook": "7.6.11",
165166
"storybook-addon-react-router-v6": "2.0.0",
166167
"storybook-react-context": "0.6.0",
167168
"ts-node": "10.9.1",

0 commit comments

Comments
 (0)