Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
250127b
Refactor root of yarn monorepo from code to the git root. And NX agen…
kasperpeulen Nov 18, 2025
ec6d354
Fix distribution config
kasperpeulen Nov 27, 2025
3b0a2d7
Fix pretty docs
kasperpeulen Nov 27, 2025
7733316
Fix check
kasperpeulen Nov 27, 2025
69fbe0c
Clean up last things
kasperpeulen Nov 27, 2025
fbc2af4
Make sure the settings.json is deleted before the onboarding test.
kasperpeulen Nov 27, 2025
ac61afb
Update scripts/run-registry.ts
kasperpeulen Nov 27, 2025
ec1bd5d
Fix lint
kasperpeulen Nov 28, 2025
81a8497
Merge remote-tracking branch 'origin/kasper/yarn-monorepo-refactor' i…
kasperpeulen Nov 28, 2025
69106f4
Fix
kasperpeulen Nov 28, 2025
f35970d
Fix
kasperpeulen Nov 28, 2025
d80cf75
Fix
kasperpeulen Nov 28, 2025
c31e808
Merge remote-tracking branch 'origin/next' into kasper/yarn-monorepo-…
kasperpeulen Nov 28, 2025
ae1ebf8
Fix
kasperpeulen Nov 28, 2025
f04dd28
Cleanup
kasperpeulen Nov 28, 2025
d58d659
Make ports backwards compatible for local dev
kasperpeulen Nov 28, 2025
4446340
Remove TODOs
kasperpeulen Nov 28, 2025
5dd20f9
Revert
kasperpeulen Nov 28, 2025
7c89c17
Fix
kasperpeulen Nov 28, 2025
6e6a31c
Fix
kasperpeulen Nov 28, 2025
02e22fa
Fix
kasperpeulen Nov 28, 2025
40cdf8b
Fix
kasperpeulen Nov 28, 2025
39a4409
Fix
kasperpeulen Nov 28, 2025
b4b8b24
Fix
kasperpeulen Nov 28, 2025
729408e
Only move sandboxes to cache when NX is used
kasperpeulen Nov 28, 2025
b9a60d1
Fix build
kasperpeulen Nov 28, 2025
c7244fa
Fix
kasperpeulen Nov 28, 2025
73841fd
Fix
kasperpeulen Nov 28, 2025
a4f5eda
Fix
kasperpeulen Nov 28, 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
80 changes: 53 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,16 @@ jobs:
clone_options: --depth 1 --verbose
- attach_workspace:
at: .
- run:
background: true
command: |
cd code
yarn local-registry --open
name: Verdaccio
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: yarn task --task bench --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) --no-link --start-from=never --junit
Expand All @@ -199,10 +205,11 @@ jobs:
clone_options: --depth 1 --verbose
- restore_cache:
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
name: Restore Yarn cache
- run:
command: |
yarn
yarn task --task compile --start-from=auto --no-link --debug
git diff --exit-code
yarn dedupe --check
Expand All @@ -216,12 +223,13 @@ jobs:
- store_artifacts:
path: code/bench/esbuild-metafiles
- save_cache:
key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
name: Save Yarn cache
paths:
- ~/.yarn/berry/cache
- persist_to_workspace:
paths:
- node_modules
- code/node_modules
- code/addons
- scripts/node_modules
Expand All @@ -247,10 +255,11 @@ jobs:
workflow-name: << pipeline.parameters.workflow >>
- restore_cache:
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
name: Restore Yarn cache
- run:
command: |
yarn
yarn task --task compile --start-from=auto --no-link --debug
name: Compile
- run:
Expand All @@ -276,10 +285,16 @@ jobs:
clone_options: --depth 1 --verbose
- attach_workspace:
at: .
- run:
background: true
command: |
cd code
yarn local-registry --open
name: Verdaccio
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: yarn task --task check-sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) --no-link --start-from=never --junit
Expand Down Expand Up @@ -307,7 +322,7 @@ jobs:
path: test-results
chromatic-sandboxes:
executor:
class: medium
class: medium+
name: sb_node_22_browsers
parallelism: << parameters.parallelism >>
parameters:
Expand All @@ -317,13 +332,19 @@ jobs:
- checkout
- attach_workspace:
at: .
- run:
background: true
command: |
cd code
yarn local-registry --open
name: Verdaccio
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
STORYBOOK_SANDBOX_ROOT=./sandbox yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit
command: STORYBOOK_SANDBOX_ROOT=./sandbox yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit
name: Running Chromatic
- report-workflow-on-failure:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)
Expand Down Expand Up @@ -370,7 +391,7 @@ jobs:
if [[ $TEMPLATE != bench/* ]]; then
yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE
fi
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
cd $(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
environment:
STORYBOOK_TELEMETRY_DEBUG: 1
STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log
Expand All @@ -396,10 +417,16 @@ jobs:
clone_options: --depth 1 --verbose
- attach_workspace:
at: .
- run:
background: true
command: |
cd code
yarn local-registry --open
name: Verdaccio
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: |
Expand All @@ -426,10 +453,16 @@ jobs:
clone_options: --depth 1 --verbose
- attach_workspace:
at: .
- run:
background: true
command: |
cd code
yarn local-registry --open
name: Verdaccio
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: |
Expand Down Expand Up @@ -527,22 +560,21 @@ jobs:
- cancel-workflow-on-failure
pretty-docs:
executor:
class: medium
class: medium+
name: sb_node_22_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: --depth 1 --verbose
- restore_cache:
keys:
- prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
name: Restore Yarn cache
- run:
command: |
cd scripts
yarn install
name: Install
command: |
yarn install
name: Install
- save_cache:
key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
name: Save Yarn cache
paths:
- ~/.yarn/berry/cache
Expand Down Expand Up @@ -779,12 +811,6 @@ jobs:
command: yarn install
name: Install code dependencies
shell: bash.exe
working_directory: code
- run:
command: yarn install
name: Install script dependencies
shell: bash.exe
working_directory: scripts
- when:
condition:
equal:
Expand Down Expand Up @@ -959,7 +985,7 @@ jobs:
name: Storybook init for features
test-portable-stories:
executor:
class: medium
class: medium+
name: sb_playwright
parameters:
directory:
Expand Down Expand Up @@ -1028,7 +1054,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- start-event-collector
- run:
Expand Down Expand Up @@ -1100,7 +1126,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- start-event-collector
- run:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/bench-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running Bench
command: yarn task --task bench --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) --no-link --start-from=never --junit
Expand Down
4 changes: 2 additions & 2 deletions .circleci/src/jobs/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
- run:
name: Compile
command: |
Expand All @@ -25,7 +25,7 @@ steps:
path: code/bench/esbuild-metafiles
- save_cache:
name: Save Yarn cache
key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- persist_to_workspace:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/check-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Type check Sandboxes
command: yarn task --task check-sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) --no-link --start-from=never --junit
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
- run:
name: Compile
command: |
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/chromatic-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running Chromatic
command: yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/create-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ steps:
if [[ $TEMPLATE != bench/* ]]; then
yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE
fi
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
cd $(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
environment:
STORYBOOK_TELEMETRY_DEBUG: 1
STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log'
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/e2e-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running E2E Tests
# TEST_FILES should include all relevant test files, in this case we use the default playwright pattern
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/e2e-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running E2E Tests
# TEST_FILES should include all relevant test files, in this case we use the default playwright pattern
Expand Down
4 changes: 2 additions & 2 deletions .circleci/src/jobs/pretty-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ steps:
- restore_cache:
name: Restore Yarn cache
keys:
- prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
- run:
name: Install
command: |
cd scripts
yarn install
- save_cache:
name: Save Yarn cache
key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- run:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/test-runner-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- start-event-collector
- run:
name: Running Test Runner
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/vitest-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- start-event-collector
- run:
name: Running story tests in Vitest
Expand Down
2 changes: 1 addition & 1 deletion .cursor/environment.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"snapshot": "snapshot-20250521-0222c8bd-0a11-48ab-a2a8-380203843e05",
"install": "cd /workspace/scripts && yarn && cd ../code && yarn && yarn task --task=compile --start-from=compile",
"install": "yarn && yarn task --task=compile --start-from=compile",
"start": "cd /workspace/code && yarn test",
"terminals": []
}
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
STORYBOOK_DISABLE_TELEMETRY=true
IN_STORYBOOK_SANDBOX=true
STORYBOOK_SANDBOX_ROOT=../storybook-sandboxes
5 changes: 2 additions & 3 deletions .github/actions/setup-node-and-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ runs:
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
key: yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1-${{ hashFiles('yarn.lock') }}
yarn-v1

- name: Install script dependencies
Expand Down
Loading