From d0b34456eba9c7c25d5e50cf334e9468454c5781 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 09:34:59 +0100 Subject: [PATCH 001/310] basic dynamic circleci config setup --- .../{config.yml => config.-generatedyml} | 0 .circleci/config.yaml | 28 +++++++++++++++++++ scripts/ci/generate.js | 3 ++ 3 files changed, 31 insertions(+) rename .circleci/{config.yml => config.-generatedyml} (100%) create mode 100644 .circleci/config.yaml create mode 100644 scripts/ci/generate.js diff --git a/.circleci/config.yml b/.circleci/config.-generatedyml similarity index 100% rename from .circleci/config.yml rename to .circleci/config.-generatedyml diff --git a/.circleci/config.yaml b/.circleci/config.yaml new file mode 100644 index 000000000000..3cc56de1b7da --- /dev/null +++ b/.circleci/config.yaml @@ -0,0 +1,28 @@ +version: 2.1 + +# https://circleci.com/docs/guides/orchestrate/dynamic-config/ +setup: true + +orbs: + git-shallow-clone: guitarrapc/git-shallow-clone@2.8.0 + continuation: circleci/continuation@2.0.1 + node: circleci/node@7.2.1 + +jobs: + generate-and-run-config: + executor: continuation/default + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --verbose' + - node/install: + node-version: '16.17' + - run: + name: Generate config + command: | + node ./scripts/ci/generate.js + - continuation/continue: + configuration_path: .circleci/config.generated.yml +workflows: + setup: + jobs: + - generate-and-run-config diff --git a/scripts/ci/generate.js b/scripts/ci/generate.js new file mode 100644 index 000000000000..3b3e13cf7ca0 --- /dev/null +++ b/scripts/ci/generate.js @@ -0,0 +1,3 @@ +console.log('Generating CircleCI config...'); +console.log('--------------------------------'); +console.log('NOT IMPLEMENTED YET'); From 93bc9b162541d92d77aacd64d1bf35d0c514574c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 10:05:31 +0100 Subject: [PATCH 002/310] add parameters, rename, correct node-versions --- ...fig.-generatedyml => config.generated.yml} | 0 .circleci/{config.yaml => config.yml} | 23 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) rename .circleci/{config.-generatedyml => config.generated.yml} (100%) rename .circleci/{config.yaml => config.yml} (54%) diff --git a/.circleci/config.-generatedyml b/.circleci/config.generated.yml similarity index 100% rename from .circleci/config.-generatedyml rename to .circleci/config.generated.yml diff --git a/.circleci/config.yaml b/.circleci/config.yml similarity index 54% rename from .circleci/config.yaml rename to .circleci/config.yml index 3cc56de1b7da..2d2eeaa3e923 100644 --- a/.circleci/config.yaml +++ b/.circleci/config.yml @@ -8,6 +8,26 @@ orbs: continuation: circleci/continuation@2.0.1 node: circleci/node@7.2.1 +parameters: + ghBaseBranch: + default: next + description: The name of the base branch (the target of the PR) + type: string + ghPrNumber: + default: '' + description: The PR number + type: string + workflow: + default: skipped + description: Which workflow to run + enum: + - normal + - merged + - daily + - skipped + - docs + type: enum + jobs: generate-and-run-config: executor: continuation/default @@ -15,13 +35,14 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - node/install: - node-version: '16.17' + node-version: '.nvmrc' - run: name: Generate config command: | node ./scripts/ci/generate.js - continuation/continue: configuration_path: .circleci/config.generated.yml + parameters: '{"ghBaseBranch": "{{ parameters.ghBaseBranch }}", "ghPrNumber": "{{ parameters.ghPrNumber }}", "workflow": "{{ parameters.workflow }}"}' workflows: setup: jobs: From 3dcfc4e14474c24dea736f3c80a56aa2170e97f0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 10:13:34 +0100 Subject: [PATCH 003/310] Update CircleCI config to streamline node installation step --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2d2eeaa3e923..93e411151082 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,12 +34,12 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - - node/install: - node-version: '.nvmrc' + - node/install - run: name: Generate config command: | node ./scripts/ci/generate.js + # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: configuration_path: .circleci/config.generated.yml parameters: '{"ghBaseBranch": "{{ parameters.ghBaseBranch }}", "ghPrNumber": "{{ parameters.ghPrNumber }}", "workflow": "{{ parameters.workflow }}"}' From 26ebcae1d07b90c2e179c10b5c88e924e6c4b9f0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 10:19:27 +0100 Subject: [PATCH 004/310] Update CircleCI config to use multiline parameters for better readability --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 93e411151082..62b5b64acbc1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,12 @@ jobs: # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: configuration_path: .circleci/config.generated.yml - parameters: '{"ghBaseBranch": "{{ parameters.ghBaseBranch }}", "ghPrNumber": "{{ parameters.ghPrNumber }}", "workflow": "{{ parameters.workflow }}"}' + parameters: |- + { + "ghBaseBranch": "<< pipeline.parameters.ghBaseBranch >>, + "ghPrNumber": "<< pipeline.parameters.ghPrNumber >>, + "workflow": "<< pipeline.parameters.workflow >>" + } workflows: setup: jobs: From 1a0422c075b1f30bfbeace70b919467c73691b1f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 10:46:13 +0100 Subject: [PATCH 005/310] Update CircleCI config to add conditional workflow execution based on pipeline parameters --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62b5b64acbc1..a6562cc60b46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,3 +52,7 @@ workflows: setup: jobs: - generate-and-run-config + when: + not-equal: + - skipped + - << pipeline.parameters.workflow >> From 6d96bfaceb97314df733669cffa399d8e68c33f9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 11:01:29 +0100 Subject: [PATCH 006/310] Refactor CircleCI config to simplify conditional workflow execution syntax --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a6562cc60b46..058375e10f04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,4 @@ workflows: setup: jobs: - generate-and-run-config - when: - not-equal: - - skipped - - << pipeline.parameters.workflow >> + when: << pipeline.parameters.workflow >> != 'skipped' From 1281a9c031fbe30c45bfb61207ed69e40c4e9bce Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 11:36:24 +0100 Subject: [PATCH 007/310] Add debug parameters to CircleCI config for better visibility --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 058375e10f04..0966d671e681 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,6 +32,12 @@ jobs: generate-and-run-config: executor: continuation/default steps: + - run: + name: Debug parameters + command: | + echo "ghBaseBranch: << pipeline.parameters.ghBaseBranch >>" + echo "ghPrNumber: << pipeline.parameters.ghPrNumber >>" + echo "workflow: << pipeline.parameters.workflow >>" - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - node/install From f0a05d84ac4fb06d9796b148b0f78c68b2706e9e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 11:37:58 +0100 Subject: [PATCH 008/310] Update CircleCI config to correct conditional workflow execution syntax --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0966d671e681..98ca9a2ff91f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,4 +58,4 @@ workflows: setup: jobs: - generate-and-run-config - when: << pipeline.parameters.workflow >> != 'skipped' + when: pipeline.parameters.workflow != 'skipped' From 88c9ecc614d70f9befcec00f26f58a171e3fba31 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 11:38:44 +0100 Subject: [PATCH 009/310] Fix CircleCI config to use double quotes for workflow condition --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98ca9a2ff91f..c69a2bd481a5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,4 +58,4 @@ workflows: setup: jobs: - generate-and-run-config - when: pipeline.parameters.workflow != 'skipped' + when: pipeline.parameters.workflow != "skipped" From c9c3bb7ce8a803d34b9fdc68a35c6750be29a78b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 11:51:45 +0100 Subject: [PATCH 010/310] Update CircleCI config to use single-line parameters for continuation job --- .circleci/config.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c69a2bd481a5..714d3a6bf1b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,6 +38,7 @@ jobs: echo "ghBaseBranch: << pipeline.parameters.ghBaseBranch >>" echo "ghPrNumber: << pipeline.parameters.ghPrNumber >>" echo "workflow: << pipeline.parameters.workflow >>" + - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - node/install @@ -45,15 +46,11 @@ jobs: name: Generate config command: | node ./scripts/ci/generate.js + # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: configuration_path: .circleci/config.generated.yml - parameters: |- - { - "ghBaseBranch": "<< pipeline.parameters.ghBaseBranch >>, - "ghPrNumber": "<< pipeline.parameters.ghPrNumber >>, - "workflow": "<< pipeline.parameters.workflow >>" - } + parameters: '{"ghBaseBranch": "<< pipeline.parameters.ghBaseBranch >>", "ghPrNumber": "<< pipeline.parameters.ghPrNumber >>", "workflow": "<< pipeline.parameters.workflow >>"}' workflows: setup: jobs: From 62ebad2c8478a5a024f04531f2a23ccede8cb1df Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 3 Nov 2025 11:53:42 +0100 Subject: [PATCH 011/310] Comment out parameters in CircleCI config for continuation job --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 714d3a6bf1b2..4c782be1c366 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,7 +50,7 @@ jobs: # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: configuration_path: .circleci/config.generated.yml - parameters: '{"ghBaseBranch": "<< pipeline.parameters.ghBaseBranch >>", "ghPrNumber": "<< pipeline.parameters.ghPrNumber >>", "workflow": "<< pipeline.parameters.workflow >>"}' + # parameters: '{"ghBaseBranch": "<< pipeline.parameters.ghBaseBranch >>", "ghPrNumber": "<< pipeline.parameters.ghPrNumber >>", "workflow": "<< pipeline.parameters.workflow >>"}' workflows: setup: jobs: From 244934dd70b864c73494163383acf32b2ac734fe Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 09:55:54 +0100 Subject: [PATCH 012/310] cleanup --- .circleci/config.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c782be1c366..03b12eb34cb7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,13 +32,6 @@ jobs: generate-and-run-config: executor: continuation/default steps: - - run: - name: Debug parameters - command: | - echo "ghBaseBranch: << pipeline.parameters.ghBaseBranch >>" - echo "ghPrNumber: << pipeline.parameters.ghPrNumber >>" - echo "workflow: << pipeline.parameters.workflow >>" - - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - node/install @@ -50,7 +43,6 @@ jobs: # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: configuration_path: .circleci/config.generated.yml - # parameters: '{"ghBaseBranch": "<< pipeline.parameters.ghBaseBranch >>", "ghPrNumber": "<< pipeline.parameters.ghPrNumber >>", "workflow": "<< pipeline.parameters.workflow >>"}' workflows: setup: jobs: From be8e5da4ac5ed6439518444c54e7459356b15291 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 11:39:24 +0100 Subject: [PATCH 013/310] generate circleci config-file based on JS data --- .circleci/config.generated.yml | 1343 ++++++++++++----------- scripts/ci/generate.js | 1862 +++++++++++++++++++++++++++++++- 2 files changed, 2532 insertions(+), 673 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 60a5b6db83f6..14f3b94d02ff 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1,14 +1,15 @@ +version: 2.1 commands: cancel-workflow-on-failure: description: Cancels the entire workflow in case the previous step has failed steps: - run: - command: | - echo "Canceling workflow as previous step resulted in failure." - echo "To execute all checks locally, please run yarn ci-tests" - curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" - name: Cancel current workflow - when: on_fail + command: | + echo "Canceling workflow as previous step resulted in failure." + echo "To execute all checks locally, please run yarn ci-tests" + curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" + name: Cancel current workflow + when: on_fail report-workflow-on-failure: description: Reports failures to discord parameters: @@ -19,25 +20,25 @@ commands: type: string steps: - run: - command: git fetch --unshallow - when: on_fail + command: git fetch --unshallow + when: on_fail - discord/status: - fail_only: true - failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) - only_for_branches: main,next,next-release,latest-release + fail_only: true + failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) + only_for_branches: main,next,next-release,latest-release start-event-collector: description: Starts the event collector steps: - run: - background: true - command: yarn jiti ./event-log-collector.ts - name: Start Event Collector - working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts + name: Start Event Collector + working_directory: scripts executors: sb_node_18_browsers: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: cimg/node:18.20.3-browsers parameters: class: @@ -55,7 +56,7 @@ executors: sb_node_22_browsers: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: cimg/node:22.15.0-browsers parameters: class: @@ -73,7 +74,7 @@ executors: sb_node_22_classic: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: cimg/node:22.15.0 parameters: class: @@ -91,7 +92,7 @@ executors: sb_playwright: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: mcr.microsoft.com/playwright:v1.52.0-noble parameters: class: @@ -113,55 +114,55 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - when: - condition: - and: - - << pipeline.parameters.ghBaseBranch >> - - << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - name: Benchmarking packages against base branch - working_directory: scripts + condition: + and: + - << pipeline.parameters.ghBaseBranch >> + - << pipeline.parameters.ghPrNumber >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload + name: Benchmarking packages against base branch + working_directory: scripts - when: - condition: - or: - - not: << pipeline.parameters.ghBaseBranch >> - - not: << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --upload - name: Uploading package benchmarks for branch - working_directory: scripts + condition: + or: + - not: << pipeline.parameters.ghBaseBranch >> + - not: << pipeline.parameters.ghPrNumber >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: yarn bench-packages --upload + name: Uploading package benchmarks for branch + working_directory: scripts - store_artifacts: - path: bench/packages/results.json + path: bench/packages/results.json - report-workflow-on-failure - cancel-workflow-on-failure bench-sandboxes: @@ -174,93 +175,93 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + 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 - name: Running Bench + command: yarn task --task bench --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) --no-link --start-from=never --junit + name: Running Bench - run: - command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> - name: Uploading results + command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> + name: Uploading results - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) build: executor: class: large name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache + keys: + - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - git diff --exit-code - yarn dedupe --check - name: Compile + command: | + yarn task --task compile --start-from=auto --no-link --debug + git diff --exit-code + yarn dedupe --check + name: Compile - run: - command: | - cd code - yarn local-registry --publish - name: Publish to Verdaccio + command: | + cd code + yarn local-registry --publish + name: Publish to Verdaccio - report-workflow-on-failure - store_artifacts: - path: code/bench/esbuild-metafiles + path: code/bench/esbuild-metafiles - save_cache: - key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache + key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Save Yarn cache + paths: + - ~/.yarn/berry/cache - persist_to_workspace: - paths: - - code/node_modules - - code/addons - - scripts/node_modules - - code/bench - - code/examples - - code/frameworks - - code/lib - - code/core - - code/builders - - code/renderers - - code/presets - - .verdaccio-cache - root: . + paths: + - code/node_modules + - code/addons + - scripts/node_modules + - code/bench + - code/examples + - code/frameworks + - code/lib + - code/core + - code/builders + - code/renderers + - code/presets + - .verdaccio-cache + root: . check: executor: class: large name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - nx/set-shas: - main-branch-name: next - workflow-name: << pipeline.parameters.workflow >> + main-branch-name: next + workflow-name: << pipeline.parameters.workflow >> - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache + keys: + - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - name: Compile + command: | + yarn task --task compile --start-from=auto --no-link --debug + name: Compile - run: - command: | - yarn task --task check --start-from=auto --no-link --debug - name: Check + command: | + yarn task --task check --start-from=auto --no-link --debug + name: Check - run: - command: | - git diff --exit-code - name: Ensure no changes pending + command: | + git diff --exit-code + name: Ensure no changes pending - report-workflow-on-failure - cancel-workflow-on-failure chromatic-internal-storybook: @@ -272,14 +273,14 @@ jobs: steps: - checkout - attach_workspace: - at: . + at: . - run: - command: yarn storybook:ui:chromatic - name: Running Chromatic - working_directory: code + command: yarn storybook:ui:chromatic + name: Running Chromatic + working_directory: code - report-workflow-on-failure - store_test_results: - path: test-results + path: test-results chromatic-sandboxes: executor: class: medium @@ -291,28 +292,28 @@ jobs: steps: - checkout - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + 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 - name: Running Chromatic + command: 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) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - store_test_results: - path: test-results + path: test-results coverage: executor: class: small name: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - codecov/upload - report-workflow-on-failure create-sandboxes: @@ -325,39 +326,39 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - # Enable corepack - sudo corepack enable + command: | + # Enable corepack + sudo corepack enable - # Verify yarn is working - which yarn - yarn --version - name: Setup Corepack + # Verify yarn is working + which yarn + yarn --version + name: Setup Corepack - start-event-collector - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit - 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 - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Create Sandboxes + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) + yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit + 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 + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Create Sandboxes - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - persist_to_workspace: - paths: - - sandbox/** - root: . + paths: + - sandbox/** + root: . - store_test_results: - path: test-results + path: test-results e2e-dev: executor: class: medium+ @@ -368,26 +369,26 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests + command: | + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + name: Running E2E Tests - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: code/playwright-results/ + destination: playwright + path: code/playwright-results/ e2e-production: executor: class: medium @@ -398,50 +399,50 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests + command: | + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + name: Running E2E Tests - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: code/playwright-results/ + destination: playwright + path: code/playwright-results/ e2e-ui: executor: class: medium name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn playwright-e2e + name: Run E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react/test-results/ + destination: playwright + path: test-storybooks/portable-stories-kitchen-sink/react/test-results/ - report-workflow-on-failure e2e-ui-vitest-3: executor: @@ -449,24 +450,24 @@ jobs: name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + command: yarn playwright-e2e + name: Run E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ + destination: playwright + path: test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ - report-workflow-on-failure knip: executor: @@ -474,14 +475,14 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - yarn knip --no-exit-code - name: Knip + command: | + cd code + yarn knip --no-exit-code + name: Knip - report-workflow-on-failure - cancel-workflow-on-failure lint: @@ -490,14 +491,14 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - yarn lint - name: Lint + command: | + cd code + yarn lint + name: Lint - report-workflow-on-failure - cancel-workflow-on-failure pretty-docs: @@ -506,50 +507,50 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - restore_cache: - keys: - - prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache + keys: + - prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache - run: - command: | - cd scripts - yarn install - name: Install + command: | + cd scripts + yarn install + name: Install - save_cache: - key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache + key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Save Yarn cache + paths: + - ~/.yarn/berry/cache - run: - command: | - cd scripts - yarn docs:prettier:check - name: Prettier + command: | + cd scripts + yarn docs:prettier:check + name: Prettier script-checks: executor: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd scripts - yarn get-template --check - name: Check parallelism count + command: | + cd scripts + yarn get-template --check + name: Check parallelism count - run: - command: | - cd scripts - yarn check - name: Type check + command: | + cd scripts + yarn check + name: Type check - run: - command: | - cd scripts - yarn test --coverage - name: Run tests + command: | + cd scripts + yarn test --coverage + name: Run tests - store_test_results: - path: scripts/junit.xml + path: scripts/junit.xml - report-workflow-on-failure - cancel-workflow-on-failure smoke-test-sandboxes: @@ -562,16 +563,16 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit - name: Smoke Testing Sandboxes + command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit + name: Smoke Testing Sandboxes - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) - store_test_results: - path: test-results + path: test-results stories-tests: executor: class: xlarge @@ -579,17 +580,17 @@ jobs: parallelism: 2 steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests + command: | + cd code + TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + name: Run tests - store_test_results: - path: test-results + path: test-results - report-workflow-on-failure - cancel-workflow-on-failure test-init-empty: @@ -603,165 +604,165 @@ jobs: type: string steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - when: - condition: - equal: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (NPM) + condition: + equal: + - npm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + npm run storybook -- --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (NPM) - when: - condition: - equal: - - yarn1 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npx storybook init --yes --package-manager yarn1 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Yarn 1) + condition: + equal: + - yarn1 + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npx storybook init --yes --package-manager yarn1 + yarn storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Yarn 1) - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Yarn 2) + condition: + equal: + - yarn2 + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + yarn set version berry + yarn config set registry http://localhost:6001 + yarn dlx storybook init --yes --package-manager yarn2 + yarn storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Yarn 2) - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (PNPM) + condition: + equal: + - pnpm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm i -g pnpm + pnpm config set registry http://localhost:6001 + pnpm dlx storybook init --yes --package-manager pnpm + pnpm run storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (PNPM) - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (--skip-install) + condition: + equal: + - react-vite-ts + - << parameters.template >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >>-no-install + cd empty-<< parameters.template >>-no-install + npx storybook init --yes --skip-install + npm install + npm run build-storybook + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (--skip-install) - report-workflow-on-failure test-init-features: executor: @@ -769,34 +770,34 @@ jobs: name: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio - run: - command: | - cd .. - mkdir features-1 - cd features-1 - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features dev docs test - npx vitest - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - name: Storybook init for features + command: | + cd .. + mkdir features-1 + cd features-1 + npm set registry http://localhost:6001 + npx create-storybook --yes --package-manager npm --features dev docs test + npx vitest + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + name: Storybook init for features test-portable-stories: executor: class: medium @@ -806,31 +807,31 @@ jobs: type: string steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn jest - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn jest + name: Run Jest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn vitest - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn vitest + name: Run Vitest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn playwright-ct - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn playwright-ct + name: Run Playwright CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn cypress - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn cypress + name: Run Cypress CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - report-workflow-on-failure test-runner-dev: executor: @@ -842,16 +843,16 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit - name: Running Test Runner in Dev mode + command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit + name: Running Test Runner in Dev mode - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) - store_test_results: - path: test-results + path: test-results test-runner-production: executor: class: medium+ @@ -862,28 +863,28 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - start-event-collector - run: - command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running Test Runner + command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Running Test Runner - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - name: Check Telemetry + command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) + name: Check Telemetry - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - store_test_results: - path: test-results + path: test-results unit-tests: executor: class: xlarge @@ -891,17 +892,17 @@ jobs: parallelism: 2 steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests + command: | + cd code + TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + name: Run tests - store_test_results: - path: test-results + path: test-results - report-workflow-on-failure - cancel-workflow-on-failure vitest-integration: @@ -914,28 +915,28 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - start-event-collector - run: - command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running story tests in Vitest + command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Running story tests in Vitest - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - name: Check Telemetry + command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) + name: Check Telemetry - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - store_test_results: - path: test-results + path: test-results orbs: browser-tools: circleci/browser-tools@1.4.1 codecov: codecov/codecov@3.2.4 @@ -962,89 +963,88 @@ parameters: - skipped - docs type: enum -version: 2.1 workflows: daily: jobs: - pretty-docs - build - lint: - requires: - - build + requires: + - build - knip: - requires: - - build + requires: + - build - bench-packages: - requires: - - build + requires: + - build - check - unit-tests: - requires: - - build + requires: + - build - stories-tests: - requires: - - build + requires: + - build - script-checks: - requires: - - build + requires: + - build - chromatic-internal-storybook: - requires: - - build + requires: + - build - create-sandboxes: - parallelism: 34 - requires: - - build + parallelism: 34 + requires: + - build - chromatic-sandboxes: - parallelism: 31 - requires: - - create-sandboxes + parallelism: 31 + requires: + - create-sandboxes - e2e-production: - parallelism: 7 - requires: - - create-sandboxes + parallelism: 7 + requires: + - create-sandboxes - e2e-dev: - parallelism: 28 - requires: - - create-sandboxes + parallelism: 28 + requires: + - create-sandboxes - test-runner-production: - parallelism: 29 - requires: - - create-sandboxes + parallelism: 29 + requires: + - create-sandboxes - vitest-integration: - parallelism: 11 - requires: - - create-sandboxes + parallelism: 11 + requires: + - create-sandboxes - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build - e2e-ui: - requires: - - build + requires: + - build - e2e-ui-vitest-3: - requires: - - build + requires: + - build - test-init-features: - requires: - - build + requires: + - build - test-init-empty: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build when: equal: - daily @@ -1061,73 +1061,73 @@ workflows: - pretty-docs - build - lint: - requires: - - build + requires: + - build - knip: - requires: - - build + requires: + - build - bench-packages: - requires: - - build + requires: + - build - check - unit-tests: - requires: - - build + requires: + - build - stories-tests: - requires: - - build + requires: + - build - script-checks: - requires: - - build + requires: + - build - chromatic-internal-storybook: - requires: - - build + requires: + - build - coverage: - requires: - - unit-tests + requires: + - unit-tests - create-sandboxes: - parallelism: 19 - requires: - - build + parallelism: 19 + requires: + - build - chromatic-sandboxes: - parallelism: 16 - requires: - - create-sandboxes + parallelism: 16 + requires: + - create-sandboxes - e2e-production: - parallelism: 6 - requires: - - create-sandboxes + parallelism: 6 + requires: + - create-sandboxes - e2e-dev: - parallelism: 14 - requires: - - create-sandboxes + parallelism: 14 + requires: + - create-sandboxes - test-runner-production: - parallelism: 14 - requires: - - create-sandboxes + parallelism: 14 + requires: + - create-sandboxes - vitest-integration: - parallelism: 6 - requires: - - create-sandboxes + parallelism: 6 + requires: + - create-sandboxes - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build - e2e-ui: - requires: - - build + requires: + - build - e2e-ui-vitest-3: - requires: - - build + requires: + - build - test-init-features: - requires: - - build + requires: + - build when: equal: - merged @@ -1137,75 +1137,74 @@ workflows: - pretty-docs - build - lint: - requires: - - build + requires: + - build - knip: - requires: - - build + requires: + - build - bench-packages: - requires: - - build + requires: + - build - check - unit-tests: - requires: - - build + requires: + - build - stories-tests: - requires: - - build + requires: + - build - script-checks: - requires: - - build + requires: + - build - chromatic-internal-storybook: - requires: - - build + requires: + - build - coverage: - requires: - - unit-tests + requires: + - unit-tests - create-sandboxes: - parallelism: 13 - requires: - - build + parallelism: 13 + requires: + - build - chromatic-sandboxes: - parallelism: 10 - requires: - - create-sandboxes + parallelism: 10 + requires: + - create-sandboxes - e2e-production: - parallelism: 6 - requires: - - create-sandboxes + parallelism: 6 + requires: + - create-sandboxes - e2e-dev: - parallelism: 8 - requires: - - create-sandboxes + parallelism: 8 + requires: + - create-sandboxes - test-runner-production: - parallelism: 8 - requires: - - create-sandboxes + parallelism: 8 + requires: + - create-sandboxes - vitest-integration: - parallelism: 5 - requires: - - create-sandboxes + parallelism: 5 + requires: + - create-sandboxes - e2e-ui: - requires: - - build + requires: + - build - e2e-ui-vitest-3: - requires: - - build + requires: + - build - test-init-features: - requires: - - build + requires: + - build - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build when: equal: - normal - << pipeline.parameters.workflow >> - diff --git a/scripts/ci/generate.js b/scripts/ci/generate.js index 3b3e13cf7ca0..edb14c20ccc2 100644 --- a/scripts/ci/generate.js +++ b/scripts/ci/generate.js @@ -1,3 +1,1863 @@ +import fs from 'fs/promises'; +import yml from 'yaml'; + console.log('Generating CircleCI config...'); console.log('--------------------------------'); -console.log('NOT IMPLEMENTED YET'); + +const executors = { + sb_node_18_browsers: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:18.20.3-browsers', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, + sb_node_22_browsers: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:22.15.0-browsers', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, + sb_node_22_classic: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:22.15.0', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, + sb_playwright: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'mcr.microsoft.com/playwright:v1.52.0-noble', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, +}; +const jobs = { + 'bench-packages': { + executor: { + class: 'small', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + when: { + condition: { + and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', + name: 'Benchmarking packages against base branch', + working_directory: 'scripts', + }, + }, + ], + }, + }, + { + when: { + condition: { + or: [ + { + not: '<< pipeline.parameters.ghBaseBranch >>', + }, + { + not: '<< pipeline.parameters.ghPrNumber >>', + }, + ], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: 'yarn bench-packages --upload', + name: 'Uploading package benchmarks for branch', + working_directory: 'scripts', + }, + }, + ], + }, + }, + { + store_artifacts: { + path: 'bench/packages/results.json', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'bench-sandboxes': { + executor: { + class: 'small', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + 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', + name: 'Running Bench', + }, + }, + { + run: { + command: + 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', + name: 'Uploading results', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', + }, + }, + ], + }, + build: { + executor: { + class: 'large', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + restore_cache: { + keys: [ + 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + ], + name: 'Restore Yarn cache', + }, + }, + { + run: { + command: + 'yarn task --task compile --start-from=auto --no-link --debug\ngit diff --exit-code\nyarn dedupe --check\n', + name: 'Compile', + }, + }, + { + run: { + command: 'cd code\nyarn local-registry --publish\n', + name: 'Publish to Verdaccio', + }, + }, + 'report-workflow-on-failure', + { + store_artifacts: { + path: 'code/bench/esbuild-metafiles', + }, + }, + { + save_cache: { + key: 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + name: 'Save Yarn cache', + paths: ['~/.yarn/berry/cache'], + }, + }, + { + persist_to_workspace: { + paths: [ + 'code/node_modules', + 'code/addons', + 'scripts/node_modules', + 'code/bench', + 'code/examples', + 'code/frameworks', + 'code/lib', + 'code/core', + 'code/builders', + 'code/renderers', + 'code/presets', + '.verdaccio-cache', + ], + root: '.', + }, + }, + ], + }, + check: { + executor: { + class: 'large', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + 'nx/set-shas': { + 'main-branch-name': 'next', + 'workflow-name': '<< pipeline.parameters.workflow >>', + }, + }, + { + restore_cache: { + keys: [ + 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + ], + name: 'Restore Yarn cache', + }, + }, + { + run: { + command: 'yarn task --task compile --start-from=auto --no-link --debug\n', + name: 'Compile', + }, + }, + { + run: { + command: 'yarn task --task check --start-from=auto --no-link --debug\n', + name: 'Check', + }, + }, + { + run: { + command: 'git diff --exit-code\n', + name: 'Ensure no changes pending', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'chromatic-internal-storybook': { + environment: { + NODE_OPTIONS: '--max_old_space_size=4096', + }, + executor: { + class: 'large', + name: 'sb_node_22_browsers', + }, + steps: [ + 'checkout', + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn storybook:ui:chromatic', + name: 'Running Chromatic', + working_directory: 'code', + }, + }, + 'report-workflow-on-failure', + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'chromatic-sandboxes': { + executor: { + class: 'medium', + name: 'sb_node_22_browsers', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + 'checkout', + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + 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', + name: 'Running Chromatic', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + coverage: { + executor: { + class: 'small', + name: 'sb_node_22_browsers', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + 'codecov/upload', + 'report-workflow-on-failure', + ], + }, + 'create-sandboxes': { + executor: { + class: 'large', + name: 'sb_node_22_browsers', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', + name: 'Setup Corepack', + }, + }, + 'start-event-collector', + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + }, + name: 'Create Sandboxes', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', + }, + }, + { + persist_to_workspace: { + paths: ['sandbox/**'], + root: '.', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'e2e-dev': { + executor: { + class: 'medium+', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + { + run: { + command: + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', + name: 'Running E2E Tests', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'code/playwright-results/', + }, + }, + ], + }, + 'e2e-production': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + { + run: { + command: + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', + name: 'Running E2E Tests', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'code/playwright-results/', + }, + }, + ], + }, + 'e2e-ui': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + name: 'Install dependencies', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + }, + }, + { + run: { + command: 'yarn playwright-e2e', + name: 'Run E2E tests', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', + }, + }, + 'report-workflow-on-failure', + ], + }, + 'e2e-ui-vitest-3': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + name: 'Install dependencies', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + }, + }, + { + run: { + command: 'yarn playwright-e2e', + name: 'Run E2E tests', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', + }, + }, + 'report-workflow-on-failure', + ], + }, + knip: { + executor: { + class: 'large', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'cd code\nyarn knip --no-exit-code\n', + name: 'Knip', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + lint: { + executor: { + class: 'medium+', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'cd code\nyarn lint\n', + name: 'Lint', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'pretty-docs': { + executor: { + 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" }}', + ], + name: 'Restore Yarn cache', + }, + }, + { + run: { + command: 'cd scripts\nyarn install\n', + name: 'Install', + }, + }, + { + save_cache: { + key: 'prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + name: 'Save Yarn cache', + paths: ['~/.yarn/berry/cache'], + }, + }, + { + run: { + command: 'cd scripts\nyarn docs:prettier:check\n', + name: 'Prettier', + }, + }, + ], + }, + 'script-checks': { + executor: 'sb_node_22_browsers', + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'cd scripts\nyarn get-template --check\n', + name: 'Check parallelism count', + }, + }, + { + run: { + command: 'cd scripts\nyarn check\n', + name: 'Type check', + }, + }, + { + run: { + command: 'cd scripts\nyarn test --coverage\n', + name: 'Run tests', + }, + }, + { + store_test_results: { + path: 'scripts/junit.xml', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'smoke-test-sandboxes': { + executor: { + class: 'medium', + name: 'sb_node_18_browsers', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', + name: 'Smoke Testing Sandboxes', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'stories-tests': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + parallelism: 2, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', + name: 'Run tests', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'test-init-empty': { + executor: { + class: 'small', + name: 'sb_node_22_browsers', + }, + parameters: { + packageManager: { + type: 'string', + }, + template: { + type: 'string', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + when: { + condition: { + equal: ['npm', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (NPM)', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['yarn1', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpx storybook init --yes --package-manager yarn1\nyarn storybook --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (Yarn 1)', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['yarn2', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (Yarn 2)', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['pnpm', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (PNPM)', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['react-vite-ts', '<< parameters.template >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (--skip-install)', + }, + }, + ], + }, + }, + 'report-workflow-on-failure', + ], + }, + 'test-init-features': { + executor: { + class: 'small', + name: 'sb_node_22_browsers', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features dev docs test\nnpx vitest\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, + name: 'Storybook init for features', + }, + }, + ], + }, + 'test-portable-stories': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + parameters: { + directory: { + type: 'string', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + name: 'Install dependencies', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn jest', + name: 'Run Jest tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn vitest', + name: 'Run Vitest tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn playwright-ct', + name: 'Run Playwright CT tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn cypress', + name: 'Run Cypress CT tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + 'report-workflow-on-failure', + ], + }, + 'test-runner-dev': { + executor: { + class: 'large', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', + name: 'Running Test Runner in Dev mode', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'test-runner-production': { + executor: { + class: 'medium+', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + 'start-event-collector', + { + run: { + command: + 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + }, + name: 'Running Test Runner', + }, + }, + { + run: { + command: + 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', + name: 'Check Telemetry', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'unit-tests': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + parallelism: 2, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', + name: 'Run tests', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'vitest-integration': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + 'start-event-collector', + { + run: { + command: + 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + }, + name: 'Running story tests in Vitest', + }, + }, + { + run: { + command: + 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', + name: 'Check Telemetry', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, +}; +const commands = { + 'cancel-workflow-on-failure': { + description: 'Cancels the entire workflow in case the previous step has failed', + steps: [ + { + run: { + command: + 'echo "Canceling workflow as previous step resulted in failure."\necho "To execute all checks locally, please run yarn ci-tests"\ncurl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"\n', + name: 'Cancel current workflow', + when: 'on_fail', + }, + }, + ], + }, + 'report-workflow-on-failure': { + description: 'Reports failures to discord', + parameters: { + template: { + default: 'none', + description: 'Which template to report in discord. Applicable for parallel sandbox jobs\n', + type: 'string', + }, + }, + steps: [ + { + run: { + command: 'git fetch --unshallow', + when: 'on_fail', + }, + }, + { + 'discord/status': { + fail_only: true, + failure_message: + '$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)', + only_for_branches: 'main,next,next-release,latest-release', + }, + }, + ], + }, + 'start-event-collector': { + description: 'Starts the event collector', + steps: [ + { + run: { + background: true, + command: 'yarn jiti ./event-log-collector.ts', + name: 'Start Event Collector', + working_directory: 'scripts', + }, + }, + ], + }, +}; +const orbs = { + 'browser-tools': 'circleci/browser-tools@1.4.1', + codecov: 'codecov/codecov@3.2.4', + discord: 'antonioned/discord@0.1.0', + 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', + node: 'circleci/node@5.2.0', + nx: 'nrwl/nx@1.6.2', +}; +const parameters = { + ghBaseBranch: { + default: 'next', + description: 'The name of the base branch (the target of the PR)', + type: 'string', + }, + ghPrNumber: { + default: '', + description: 'The PR number', + type: 'string', + }, + workflow: { + default: 'skipped', + description: 'Which workflow to run', + enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], + type: 'enum', + }, +}; +const workflows = { + daily: { + jobs: [ + 'pretty-docs', + 'build', + { + lint: { + requires: ['build'], + }, + }, + { + knip: { + requires: ['build'], + }, + }, + { + 'bench-packages': { + requires: ['build'], + }, + }, + 'check', + { + 'unit-tests': { + requires: ['build'], + }, + }, + { + 'stories-tests': { + requires: ['build'], + }, + }, + { + 'script-checks': { + requires: ['build'], + }, + }, + { + 'chromatic-internal-storybook': { + requires: ['build'], + }, + }, + { + 'create-sandboxes': { + parallelism: 34, + requires: ['build'], + }, + }, + { + 'chromatic-sandboxes': { + parallelism: 31, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-production': { + parallelism: 7, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-dev': { + parallelism: 28, + requires: ['create-sandboxes'], + }, + }, + { + 'test-runner-production': { + parallelism: 29, + requires: ['create-sandboxes'], + }, + }, + { + 'vitest-integration': { + parallelism: 11, + requires: ['create-sandboxes'], + }, + }, + { + 'test-portable-stories': { + matrix: { + parameters: { + directory: ['react', 'vue3', 'nextjs', 'svelte'], + }, + }, + requires: ['build'], + }, + }, + { + 'e2e-ui': { + requires: ['build'], + }, + }, + { + 'e2e-ui-vitest-3': { + requires: ['build'], + }, + }, + { + 'test-init-features': { + requires: ['build'], + }, + }, + { + 'test-init-empty': { + matrix: { + parameters: { + packageManager: ['npm'], + template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], + }, + }, + requires: ['build'], + }, + }, + ], + when: { + equal: ['daily', '<< pipeline.parameters.workflow >>'], + }, + }, + docs: { + jobs: ['pretty-docs'], + when: { + equal: ['docs', '<< pipeline.parameters.workflow >>'], + }, + }, + merged: { + jobs: [ + 'pretty-docs', + 'build', + { + lint: { + requires: ['build'], + }, + }, + { + knip: { + requires: ['build'], + }, + }, + { + 'bench-packages': { + requires: ['build'], + }, + }, + 'check', + { + 'unit-tests': { + requires: ['build'], + }, + }, + { + 'stories-tests': { + requires: ['build'], + }, + }, + { + 'script-checks': { + requires: ['build'], + }, + }, + { + 'chromatic-internal-storybook': { + requires: ['build'], + }, + }, + { + coverage: { + requires: ['unit-tests'], + }, + }, + { + 'create-sandboxes': { + parallelism: 19, + requires: ['build'], + }, + }, + { + 'chromatic-sandboxes': { + parallelism: 16, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-production': { + parallelism: 6, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-dev': { + parallelism: 14, + requires: ['create-sandboxes'], + }, + }, + { + 'test-runner-production': { + parallelism: 14, + requires: ['create-sandboxes'], + }, + }, + { + 'vitest-integration': { + parallelism: 6, + requires: ['create-sandboxes'], + }, + }, + { + 'test-portable-stories': { + matrix: { + parameters: { + directory: ['react', 'vue3', 'nextjs', 'svelte'], + }, + }, + requires: ['build'], + }, + }, + { + 'e2e-ui': { + requires: ['build'], + }, + }, + { + 'e2e-ui-vitest-3': { + requires: ['build'], + }, + }, + { + 'test-init-features': { + requires: ['build'], + }, + }, + ], + when: { + equal: ['merged', '<< pipeline.parameters.workflow >>'], + }, + }, + normal: { + jobs: [ + 'pretty-docs', + 'build', + { + lint: { + requires: ['build'], + }, + }, + { + knip: { + requires: ['build'], + }, + }, + { + 'bench-packages': { + requires: ['build'], + }, + }, + 'check', + { + 'unit-tests': { + requires: ['build'], + }, + }, + { + 'stories-tests': { + requires: ['build'], + }, + }, + { + 'script-checks': { + requires: ['build'], + }, + }, + { + 'chromatic-internal-storybook': { + requires: ['build'], + }, + }, + { + coverage: { + requires: ['unit-tests'], + }, + }, + { + 'create-sandboxes': { + parallelism: 13, + requires: ['build'], + }, + }, + { + 'chromatic-sandboxes': { + parallelism: 10, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-production': { + parallelism: 6, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-dev': { + parallelism: 8, + requires: ['create-sandboxes'], + }, + }, + { + 'test-runner-production': { + parallelism: 8, + requires: ['create-sandboxes'], + }, + }, + { + 'vitest-integration': { + parallelism: 5, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-ui': { + requires: ['build'], + }, + }, + { + 'e2e-ui-vitest-3': { + requires: ['build'], + }, + }, + { + 'test-init-features': { + requires: ['build'], + }, + }, + { + 'test-portable-stories': { + matrix: { + parameters: { + directory: ['react', 'vue3', 'nextjs', 'svelte'], + }, + }, + requires: ['build'], + }, + }, + ], + when: { + equal: ['normal', '<< pipeline.parameters.workflow >>'], + }, + }, +}; +const data = { + version: 2.1, + commands, + executors, + jobs, + orbs, + parameters, + workflows, +}; + +await fs.writeFile( + '../.circleci/config.generated.yml', + yml.stringify(data, null, { lineWidth: 1200, indent: 4 }) +); From 9419d5aec020fd5a458e64d8fd0d5bef5a30baca Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 13:41:45 +0100 Subject: [PATCH 014/310] Remove generated CircleCI configuration file --- .circleci/config.generated.yml | 1210 -------------------------------- 1 file changed, 1210 deletions(-) delete mode 100644 .circleci/config.generated.yml diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml deleted file mode 100644 index 14f3b94d02ff..000000000000 --- a/.circleci/config.generated.yml +++ /dev/null @@ -1,1210 +0,0 @@ -version: 2.1 -commands: - cancel-workflow-on-failure: - description: Cancels the entire workflow in case the previous step has failed - steps: - - run: - command: | - echo "Canceling workflow as previous step resulted in failure." - echo "To execute all checks locally, please run yarn ci-tests" - curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" - name: Cancel current workflow - when: on_fail - report-workflow-on-failure: - description: Reports failures to discord - parameters: - template: - default: none - description: | - Which template to report in discord. Applicable for parallel sandbox jobs - type: string - steps: - - run: - command: git fetch --unshallow - when: on_fail - - discord/status: - fail_only: true - failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) - only_for_branches: main,next,next-release,latest-release - start-event-collector: - description: Starts the event collector - steps: - - run: - background: true - command: yarn jiti ./event-log-collector.ts - name: Start Event Collector - working_directory: scripts -executors: - sb_node_18_browsers: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:18.20.3-browsers - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook - sb_node_22_browsers: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:22.15.0-browsers - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook - sb_node_22_classic: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:22.15.0 - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook - sb_playwright: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: mcr.microsoft.com/playwright:v1.52.0-noble - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook -jobs: - bench-packages: - executor: - class: small - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - when: - condition: - and: - - << pipeline.parameters.ghBaseBranch >> - - << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - name: Benchmarking packages against base branch - working_directory: scripts - - when: - condition: - or: - - not: << pipeline.parameters.ghBaseBranch >> - - not: << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --upload - name: Uploading package benchmarks for branch - working_directory: scripts - - store_artifacts: - path: bench/packages/results.json - - report-workflow-on-failure - - cancel-workflow-on-failure - bench-sandboxes: - executor: - class: small - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 - name: Running Bench - - run: - command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> - name: Uploading results - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - build: - executor: - class: large - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache - - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - git diff --exit-code - yarn dedupe --check - name: Compile - - run: - command: | - cd code - yarn local-registry --publish - name: Publish to Verdaccio - - report-workflow-on-failure - - store_artifacts: - path: code/bench/esbuild-metafiles - - save_cache: - key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache - - persist_to_workspace: - paths: - - code/node_modules - - code/addons - - scripts/node_modules - - code/bench - - code/examples - - code/frameworks - - code/lib - - code/core - - code/builders - - code/renderers - - code/presets - - .verdaccio-cache - root: . - check: - executor: - class: large - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - nx/set-shas: - main-branch-name: next - workflow-name: << pipeline.parameters.workflow >> - - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache - - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - name: Compile - - run: - command: | - yarn task --task check --start-from=auto --no-link --debug - name: Check - - run: - command: | - git diff --exit-code - name: Ensure no changes pending - - report-workflow-on-failure - - cancel-workflow-on-failure - chromatic-internal-storybook: - environment: - NODE_OPTIONS: --max_old_space_size=4096 - executor: - class: large - name: sb_node_22_browsers - steps: - - checkout - - attach_workspace: - at: . - - run: - command: yarn storybook:ui:chromatic - name: Running Chromatic - working_directory: code - - report-workflow-on-failure - - store_test_results: - path: test-results - chromatic-sandboxes: - executor: - class: medium - name: sb_node_22_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - checkout - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 - name: Running Chromatic - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - - store_test_results: - path: test-results - coverage: - executor: - class: small - name: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - codecov/upload - - report-workflow-on-failure - create-sandboxes: - executor: - class: large - name: sb_node_22_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - # Enable corepack - sudo corepack enable - - # Verify yarn is working - which yarn - yarn --version - name: Setup Corepack - - start-event-collector - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit - 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 - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Create Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - - persist_to_workspace: - paths: - - sandbox/** - root: . - - store_test_results: - path: test-results - e2e-dev: - executor: - class: medium+ - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: code/playwright-results/ - e2e-production: - executor: - class: medium - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: code/playwright-results/ - e2e-ui: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react - - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react/test-results/ - - report-workflow-on-failure - e2e-ui-vitest-3: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ - - report-workflow-on-failure - knip: - executor: - class: large - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - yarn knip --no-exit-code - name: Knip - - report-workflow-on-failure - - cancel-workflow-on-failure - lint: - executor: - class: medium+ - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - yarn lint - name: Lint - - report-workflow-on-failure - - cancel-workflow-on-failure - pretty-docs: - executor: - 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" }} - name: Restore Yarn cache - - run: - command: | - cd scripts - yarn install - name: Install - - save_cache: - key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache - - run: - command: | - cd scripts - yarn docs:prettier:check - name: Prettier - script-checks: - executor: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd scripts - yarn get-template --check - name: Check parallelism count - - run: - command: | - cd scripts - yarn check - name: Type check - - run: - command: | - cd scripts - yarn test --coverage - name: Run tests - - store_test_results: - path: scripts/junit.xml - - report-workflow-on-failure - - cancel-workflow-on-failure - smoke-test-sandboxes: - executor: - class: medium - name: sb_node_18_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit - name: Smoke Testing Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) - - store_test_results: - path: test-results - stories-tests: - executor: - class: xlarge - name: sb_playwright - parallelism: 2 - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests - - store_test_results: - path: test-results - - report-workflow-on-failure - - cancel-workflow-on-failure - test-init-empty: - executor: - class: small - name: sb_node_22_browsers - parameters: - packageManager: - type: string - template: - type: string - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - when: - condition: - equal: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (NPM) - - when: - condition: - equal: - - yarn1 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npx storybook init --yes --package-manager yarn1 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Yarn 1) - - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Yarn 2) - - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (PNPM) - - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (--skip-install) - - report-workflow-on-failure - test-init-features: - executor: - class: small - name: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir features-1 - cd features-1 - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features dev docs test - npx vitest - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - name: Storybook init for features - test-portable-stories: - executor: - class: medium - name: sb_playwright - parameters: - directory: - type: string - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn jest - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn vitest - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn playwright-ct - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn cypress - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - report-workflow-on-failure - test-runner-dev: - executor: - class: large - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit - name: Running Test Runner in Dev mode - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) - - store_test_results: - path: test-results - test-runner-production: - executor: - class: medium+ - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - start-event-collector - - run: - command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running Test Runner - - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - name: Check Telemetry - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - - store_test_results: - path: test-results - unit-tests: - executor: - class: xlarge - name: sb_playwright - parallelism: 2 - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests - - store_test_results: - path: test-results - - report-workflow-on-failure - - cancel-workflow-on-failure - vitest-integration: - executor: - class: xlarge - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - start-event-collector - - run: - command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running story tests in Vitest - - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - name: Check Telemetry - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - - store_test_results: - path: test-results -orbs: - browser-tools: circleci/browser-tools@1.4.1 - codecov: codecov/codecov@3.2.4 - discord: antonioned/discord@0.1.0 - git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 - node: circleci/node@5.2.0 - nx: nrwl/nx@1.6.2 -parameters: - ghBaseBranch: - default: next - description: The name of the base branch (the target of the PR) - type: string - ghPrNumber: - default: "" - description: The PR number - type: string - workflow: - default: skipped - description: Which workflow to run - enum: - - normal - - merged - - daily - - skipped - - docs - type: enum -workflows: - daily: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - create-sandboxes: - parallelism: 34 - requires: - - build - - chromatic-sandboxes: - parallelism: 31 - requires: - - create-sandboxes - - e2e-production: - parallelism: 7 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 28 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 29 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 11 - requires: - - create-sandboxes - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-init-empty: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build - when: - equal: - - daily - - << pipeline.parameters.workflow >> - docs: - jobs: - - pretty-docs - when: - equal: - - docs - - << pipeline.parameters.workflow >> - merged: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 19 - requires: - - build - - chromatic-sandboxes: - parallelism: 16 - requires: - - create-sandboxes - - e2e-production: - parallelism: 6 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 14 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 14 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 6 - requires: - - create-sandboxes - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - when: - equal: - - merged - - << pipeline.parameters.workflow >> - normal: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 13 - requires: - - build - - chromatic-sandboxes: - parallelism: 10 - requires: - - create-sandboxes - - e2e-production: - parallelism: 6 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 8 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 8 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 5 - requires: - - create-sandboxes - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - when: - equal: - - normal - - << pipeline.parameters.workflow >> From 4a60a99b92dfa1cdb1deb4103d47f08aee1a95dc Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 13:42:27 +0100 Subject: [PATCH 015/310] Add .circleci/*.generated.yml to .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cf774cdfcaab..09c878e2ee31 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,7 @@ tsconfig.vitest-temp.json test-storybooks/ember-cli/ember-output test-storybooks/angular-cli/addon-jest.testresults.json - +.circleci/*.generated.yml npm-shrinkwrap.json .tern-port .parcel-cache From 3c2ba6ee21fe54187aee29b8fa5ceb61e48e8929 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 13:44:06 +0100 Subject: [PATCH 016/310] Update CircleCI config to install dependencies in the scripts directory --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 03b12eb34cb7..c1b786ebedb8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,10 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - - node/install + - run: + name: Install dependencies + command: yarn install + working_directory: scripts - run: name: Generate config command: | From 06f20c99779d76a297b1b198e573301a359af988 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 13:46:30 +0100 Subject: [PATCH 017/310] Add CircleCI config to install Node.js before dependency installation --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c1b786ebedb8..3988e45b4069 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' + - node/install - run: name: Install dependencies command: yarn install From 7ab62c37d852cc6ebd94cfa4eb718d74553cf5b0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 13:48:55 +0100 Subject: [PATCH 018/310] Update CircleCI config to install Yarn during Node.js setup --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3988e45b4069..ad66c4da9893 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,8 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - - node/install + - node/install: + install-yarn: true - run: name: Install dependencies command: yarn install From f7b460c6ad5b79f456a95bc3c5c111640fa60c32 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 13:51:57 +0100 Subject: [PATCH 019/310] Refactor CircleCI config generation to use node:fs and node:path for improved path handling --- scripts/ci/generate.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/ci/generate.js b/scripts/ci/generate.js index edb14c20ccc2..ae09560cd638 100644 --- a/scripts/ci/generate.js +++ b/scripts/ci/generate.js @@ -1,9 +1,13 @@ -import fs from 'fs/promises'; +import fs from 'node:fs/promises'; +import { join } from 'node:path'; + import yml from 'yaml'; console.log('Generating CircleCI config...'); console.log('--------------------------------'); +const dirname = import.meta.dirname; + const executors = { sb_node_18_browsers: { docker: [ @@ -1858,6 +1862,6 @@ const data = { }; await fs.writeFile( - '../.circleci/config.generated.yml', + join(dirname, '../../.circleci/config.generated.yml'), yml.stringify(data, null, { lineWidth: 1200, indent: 4 }) ); From e874964796de54aa57c8f002330038ae4b269af6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 4 Nov 2025 13:56:59 +0100 Subject: [PATCH 020/310] Update CircleCI config to streamline dependency installation using node/install-packages --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ad66c4da9893..a9472a8fcaca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,10 +36,10 @@ jobs: clone_options: '--depth 1 --verbose' - node/install: install-yarn: true - - run: - name: Install dependencies - command: yarn install - working_directory: scripts + - node/install-packages: + app-dir: scripts + pkg-manager: yarn + - run: name: Generate config command: | From 4486872babc998693356f0c020fe67b1d2f38362 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 7 Nov 2025 14:29:33 +0100 Subject: [PATCH 021/310] work on dynamic script using api --- .circleci/config.yml | 2 +- scripts/ci/generate-dynamic.ts | 31 ++ scripts/ci/{generate.js => generate.ts} | 0 scripts/package.json | 2 + scripts/tmp.yml | 367 ++++++++++++++++++++++++ scripts/yarn.lock | 42 ++- 6 files changed, 442 insertions(+), 2 deletions(-) create mode 100644 scripts/ci/generate-dynamic.ts rename scripts/ci/{generate.js => generate.ts} (100%) create mode 100644 scripts/tmp.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index a9472a8fcaca..385c2ac9e049 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: - run: name: Generate config command: | - node ./scripts/ci/generate.js + jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: diff --git a/scripts/ci/generate-dynamic.ts b/scripts/ci/generate-dynamic.ts new file mode 100644 index 000000000000..5de83775b601 --- /dev/null +++ b/scripts/ci/generate-dynamic.ts @@ -0,0 +1,31 @@ +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; + +import a from '@ndelangen/circleci-config-parser'; +import { Config, Workflow, orb } from '@ndelangen/circleci-config-sdk'; +import { program } from 'commander'; +import yml from 'yaml'; + +program + .description('Generate CircleCI config') + .requiredOption('-w, --workflow ', 'Workflow to generate config for') + .parse(process.argv); + +const { workflow: workflowName } = program.opts(); + +const dirname = import.meta.dirname; + +console.log('Generating CircleCI config for workflow:', workflowName); +console.log('--------------------------------'); + +const templates = await import(join(dirname, '../../code/lib/cli-storybook/src/sandbox-templates')); +const orbyml = await readFile(join(dirname, '../tmp.yml'), 'utf-8'); +const orbData = yml.parse(orbyml); + +const config = new Config(); +config.importOrb( + new orb.OrbImport('git-shallow-clone', 'guitarrapc', 'git-shallow-clone', '2.8.0') +); +config.addWorkflow(new Workflow(workflowName)); + +console.log(config.stringify()); diff --git a/scripts/ci/generate.js b/scripts/ci/generate.ts similarity index 100% rename from scripts/ci/generate.js rename to scripts/ci/generate.ts diff --git a/scripts/package.json b/scripts/package.json index 5479bb0c69f1..35098a03bbc9 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -65,6 +65,8 @@ "@actions/core": "^1.11.1", "@fal-works/esbuild-plugin-global-externals": "^2.1.2", "@google-cloud/bigquery": "^6.2.1", + "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1", + "@ndelangen/circleci-config-sdk": "https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1", "@octokit/graphql": "^5.0.6", "@octokit/request": "^8.4.1", "@polka/parse": "^1.0.0-next.28", diff --git a/scripts/tmp.yml b/scripts/tmp.yml new file mode 100644 index 000000000000..af501cf2f3d0 --- /dev/null +++ b/scripts/tmp.yml @@ -0,0 +1,367 @@ +version: 2.1 +description: | + Provides git shallow clone instead of full clone. Supporting trigger for tag, pull_request and push, works on Alpine, Debian, Ubuntu, and macOS. + What's shallow clone? - see https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt Provied commands: - checkout - checkout_advanced + requirement: git +display: + source_url: https://github.com/guitarrapc/git-shallow-clone-orb +commands: + checkout: + description: | + Provides git shallow clone instead of full clone. This command is for simple usage when you don't need options for clone, fetch and tag fetch. + parameters: + depth: + default: 1 + description: | + Limit fetch depth to the specified number of commit from a remote branch history. Refer git fetch documentation for more information. + type: integer + fetch_depth: + default: 10 + description: | + Addtional fetch depth to the specified number of commit from a remote branch history. Pass more number then depth when you want to check futher commit history. + type: integer + keyscan_bitbucket: + default: false + description: | + Pass `true` to dynamically get ssh-rsa from `bitbucket.org`. + type: boolean + keyscan_github: + default: false + description: | + Pass `true` to dynamically get ssh-rsa from `github.com`. + type: boolean + no_tags: + default: false + description: | + true to add '--no-tags' when fetching. As git not offer tag depth, we only able to control fetch all tags or not. This enable you to stop fetch tags when you have vast numbers of tags during specified fetch depth. In other word, if you need tag then fetch specified tags manually when use 'without_tag: true'. + type: boolean + path: + default: . + description: | + Checkout directory (default: job working_directory) + type: string + steps: + - run: + command: | + #!/bin/sh + set -ex + + # Workaround old docker images with incorrect $HOME + # check https://github.com/docker/docker/issues/2968 for details + if [ "${HOME}" = "/" ]; then + export HOME=$(getent passwd $(id -un) | cut -d: -f6) + fi + + # known_hosts / id_rsa + export SSH_CONFIG_DIR=${SSH_CONFIG_DIR:-"${HOME}/.ssh"} + echo "Using SSH Config Dir '$SSH_CONFIG_DIR'" + git --version + + mkdir -p "$SSH_CONFIG_DIR" + chmod 0700 "$SSH_CONFIG_DIR" + + if [ -x "$(command -v ssh-keyscan)" ] && ([ "<< parameters.keyscan_github >>" == "true" ] || [ "<< parameters.keyscan_bitbucket >>" == "true" ]); then + if [ "<< parameters.keyscan_github >>" == "true" ]; then + ssh-keyscan -H github.com >> "$SSH_CONFIG_DIR/known_hosts" + fi + if [ "<< parameters.keyscan_bitbucket >>" == "true" ]; then + ssh-keyscan -H bitbucket.org >> "$SSH_CONFIG_DIR/known_hosts" + fi + fi + + # see: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints + if [ "<< parameters.keyscan_github >>" != "true" ]; then + echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl + github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= + github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= + ' >> "$SSH_CONFIG_DIR/known_hosts" + fi + + # see: https://bitbucket.org/blog/ssh-host-key-changes + if [ "<< parameters.keyscan_bitbucket >>" != "true" ]; then + echo 'bitbucket.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPIQmuzMBuKdWeF4+a2sjSSpBK0iqitSQ+5BM9KhpexuGt20JpTVM7u5BDZngncgrqDMbWdxMWWOGtZ9UgbqgZE= + bitbucket.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUO + bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQeJzhupRu0u0cdegZIa8e86EG2qOCsIsD1Xw0xSeiPDlCr7kq97NLmMbpKTX6Esc30NuoqEEHCuc7yWtwp8dI76EEEB1VqY9QJq6vk+aySyboD5QF61I/1WeTwu+deCbgKMGbUijeXhtfbxSxm6JwGrXrhBdofTsbKRUsrN1WoNgUa8uqN1Vx6WAJw1JHPhglEGGHea6QICwJOAr/6mrui/oB7pkaWKHj3z7d1IC4KWLtY47elvjbaTlkN04Kc/5LFEirorGYVbt15kAUlqGM65pk6ZBxtaO3+30LVlORZkxOh+LKL/BvbZ/iRNhItLqNyieoQj/uh/7Iv4uyH/cV/0b4WDSd3DptigWq84lJubb9t/DnZlrJazxyDCulTmKdOR7vs9gMTo+uoIrPSb8ScTtvw65+odKAlBj59dhnVp9zd7QUojOpXlL62Aw56U4oO+FALuevvMjiWeavKhJqlR7i5n9srYcrNV7ttmDw7kf/97P5zauIhxcjX+xHv4M= + ' >> "$SSH_CONFIG_DIR/known_hosts" + fi + + echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY= + ' >> "$SSH_CONFIG_DIR/known_hosts" + chmod 0600 "$SSH_CONFIG_DIR/known_hosts" + + rm -f "$SSH_CONFIG_DIR/id_rsa" + (umask 077; touch "$SSH_CONFIG_DIR/id_rsa") + printf "%s" "$CHECKOUT_KEY" > "$SSH_CONFIG_DIR/id_rsa" + chmod 0600 "$SSH_CONFIG_DIR/id_rsa" + if (: "${CHECKOUT_KEY_PUBLIC?}") 2>/dev/null; then + rm -f "$SSH_CONFIG_DIR/id_rsa.pub" + printf "%s" "$CHECKOUT_KEY_PUBLIC" > "$SSH_CONFIG_DIR/id_rsa.pub" + fi + + export GIT_SSH_COMMAND='ssh -i "$SSH_CONFIG_DIR/id_rsa" -o UserKnownHostsFile="$SSH_CONFIG_DIR/known_hosts"' + + # use git+ssh instead of https + git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true + git config --global gc.auto 0 || true + + # Define Tag args + if [ -n "$CIRCLE_TAG" ]; then + # only tags operation have default --tags. others will no tag options + clone_tag_args= + fetch_tag_args="--tags" + fi + if [ '<< parameters.no_tags >>' == 'true' ]; then + clone_tag_args="--no-tags" + fetch_tag_args="--no-tags" + fi + + # Checkout. SourceCaching? or not. + if [ -e "$HOME/project/<< parameters.path >>/.git" ]; then + echo 'Fetching into existing repository' + existing_repo='true' + cd "$HOME/project/<< parameters.path >>" + git remote set-url origin "$CIRCLE_REPOSITORY_URL" || true + else + echo 'Cloning git repository' + existing_repo='false' + mkdir -p "$HOME/project/<< parameters.path >>" + cd "$HOME/project/<< parameters.path >>" + git clone ${clone_tag_args} --depth << parameters.depth >> $CIRCLE_REPOSITORY_URL . + fi + + # NOTE: Original checkout fetch only if SourceCaching, but we fetch always for depth selection. + echo 'Fetching from remote repository' + if [ -n "$CIRCLE_TAG" ]; then + git fetch ${fetch_tag_args} --depth << parameters.fetch_depth >> --force --tags origin "+refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}" + elif echo $CIRCLE_BRANCH | grep -E ^pull\/[0-9]+/head$ > /dev/null; then + # pull request called from api. Input should be `pull/123/head` see detail for https://github.com/guitarrapc/git-shallow-clone-orb/issues/34 + git fetch ${fetch_tag_args} --depth << parameters.fetch_depth >> --force origin "+refs/${CIRCLE_BRANCH}:remotes/origin/${CIRCLE_BRANCH}" + else + git fetch ${fetch_tag_args} --depth << parameters.fetch_depth >> --force origin +refs/heads/${CIRCLE_BRANCH}:refs/remotes/origin/${CIRCLE_BRANCH} + fi + + # Check the commit ID of the checked out code + if [ -n "$CIRCLE_TAG" ]; then + echo 'Checking out tag' + git checkout --force "$CIRCLE_TAG" + git reset --hard "$CIRCLE_SHA1" # move to triggered SHA + elif [ -n "$CIRCLE_BRANCH" ] && [ "$CIRCLE_BRANCH" != 'HEAD' ]; then + echo 'Checking out branch' + git checkout --force -B "$CIRCLE_BRANCH" + git reset --hard "$CIRCLE_SHA1" # move to triggered SHA + git --no-pager log --no-color -n 1 --format='HEAD is now at %h %s' + fi + name: Checkout code shallow + checkout_advanced: + description: | + Provides git shallow clone instead of full clone. This command is for advaned usage when you need options for clone, fetch and tag fetch. + parameters: + clone_options: + default: --depth 1 + description: | + git clone options you want to add such as '--depth 1 --verbose' and '--depth 1 --shallow-since "5 days ago"' + type: string + fetch_options: + default: --depth 10 + description: | + git fetch options you want to add such as '--depth 1 --verbose' and '--depth 1 --shallow-since "5 days ago"' you don't need set '--force' option as it already set by default. in case of tag, add '--no-tags' on this option and tag_fetch_options. + type: string + keyscan_bitbucket: + default: false + description: | + Pass `true` to dynamically get ssh-rsa from `bitbucket.org`. + type: boolean + keyscan_github: + default: false + description: | + Pass `true` to dynamically get ssh-rsa from `github.com`. + type: boolean + path: + default: . + description: | + Checkout directory (default: job working_directory) + type: string + tag_fetch_options: + default: --tags + description: | + This option apply when git operation is tag. Use 'fetch_options' instead if pr and other git operation. Additional git fetch options you want to add specifically for tags such as '--tags' or '--no-tags'. Default value is '--tags' + type: string + steps: + - run: + command: | + #!/bin/sh + set -ex + + # Workaround old docker images with incorrect $HOME + # check https://github.com/docker/docker/issues/2968 for details + if [ "${HOME}" = "/" ]; then + export HOME=$(getent passwd $(id -un) | cut -d: -f6) + fi + + # known_hosts / id_rsa + export SSH_CONFIG_DIR=${SSH_CONFIG_DIR:-"${HOME}/.ssh"} + echo "Using SSH Config Dir '$SSH_CONFIG_DIR'" + git --version + + mkdir -p "$SSH_CONFIG_DIR" + chmod 0700 "$SSH_CONFIG_DIR" + + if [ -x "$(command -v ssh-keyscan)" ] && ([ "<< parameters.keyscan_github >>" == "true" ] || [ "<< parameters.keyscan_bitbucket >>" == "true" ]); then + if [ "<< parameters.keyscan_github >>" == "true" ]; then + ssh-keyscan -H github.com >> "$SSH_CONFIG_DIR/known_hosts" + fi + if [ "<< parameters.keyscan_bitbucket >>" == "true" ]; then + ssh-keyscan -H bitbucket.org >> "$SSH_CONFIG_DIR/known_hosts" + fi + fi + + # see: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints + if [ "<< parameters.keyscan_github >>" != "true" ]; then + echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl + github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= + github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= + ' >> "$SSH_CONFIG_DIR/known_hosts" + fi + + # see: https://bitbucket.org/blog/ssh-host-key-changes + if [ "<< parameters.keyscan_bitbucket >>" != "true" ]; then + echo 'bitbucket.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPIQmuzMBuKdWeF4+a2sjSSpBK0iqitSQ+5BM9KhpexuGt20JpTVM7u5BDZngncgrqDMbWdxMWWOGtZ9UgbqgZE= + bitbucket.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUO + bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQeJzhupRu0u0cdegZIa8e86EG2qOCsIsD1Xw0xSeiPDlCr7kq97NLmMbpKTX6Esc30NuoqEEHCuc7yWtwp8dI76EEEB1VqY9QJq6vk+aySyboD5QF61I/1WeTwu+deCbgKMGbUijeXhtfbxSxm6JwGrXrhBdofTsbKRUsrN1WoNgUa8uqN1Vx6WAJw1JHPhglEGGHea6QICwJOAr/6mrui/oB7pkaWKHj3z7d1IC4KWLtY47elvjbaTlkN04Kc/5LFEirorGYVbt15kAUlqGM65pk6ZBxtaO3+30LVlORZkxOh+LKL/BvbZ/iRNhItLqNyieoQj/uh/7Iv4uyH/cV/0b4WDSd3DptigWq84lJubb9t/DnZlrJazxyDCulTmKdOR7vs9gMTo+uoIrPSb8ScTtvw65+odKAlBj59dhnVp9zd7QUojOpXlL62Aw56U4oO+FALuevvMjiWeavKhJqlR7i5n9srYcrNV7ttmDw7kf/97P5zauIhxcjX+xHv4M= + ' >> "$SSH_CONFIG_DIR/known_hosts" + fi + + echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY= + ' >> "$SSH_CONFIG_DIR/known_hosts" + chmod 0600 "$SSH_CONFIG_DIR/known_hosts" + + rm -f "$SSH_CONFIG_DIR/id_rsa" + (umask 077; touch "$SSH_CONFIG_DIR/id_rsa") + printf "%s" "$CHECKOUT_KEY" > "$SSH_CONFIG_DIR/id_rsa" + chmod 0600 "$SSH_CONFIG_DIR/id_rsa" + if (: "${CHECKOUT_KEY_PUBLIC?}") 2>/dev/null; then + rm -f "$SSH_CONFIG_DIR/id_rsa.pub" + printf "%s" "$CHECKOUT_KEY_PUBLIC" > "$SSH_CONFIG_DIR/id_rsa.pub" + fi + + # use git+ssh instead of https + git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true + git config --global gc.auto 0 || true + + # Checkout. SourceCaching? or not. + if [ -e "$HOME/project/<< parameters.path >>/.git" ]; then + echo 'Fetching into existing repository' + existing_repo='true' + cd "$HOME/project/<< parameters.path >>" + git remote set-url origin "$CIRCLE_REPOSITORY_URL" || true + else + echo 'Cloning git repository' + existing_repo='false' + mkdir -p "$HOME/project/<< parameters.path >>" + cd "$HOME/project/<< parameters.path >>" + git clone << parameters.clone_options >> $CIRCLE_REPOSITORY_URL . + fi + + # NOTE: Original checkout fetch only if SourceCaching, but we fetch always for depth selection. + echo 'Fetching from remote repository' + if [ -n "$CIRCLE_TAG" ]; then + git fetch << parameters.tag_fetch_options >> << parameters.fetch_options >> --force --tags origin "+refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}" + elif echo $CIRCLE_BRANCH | grep -E ^pull\/[0-9]+/head$ > /dev/null; then + # pull request called from api. Input should be `pull/123/head` see detail for https://github.com/guitarrapc/git-shallow-clone-orb/issues/34 + git fetch << parameters.tag_fetch_options >> << parameters.fetch_options >> --force origin "+refs/${CIRCLE_BRANCH}:remotes/origin/${CIRCLE_BRANCH}" + else + git fetch << parameters.fetch_options >> --force origin +refs/heads/${CIRCLE_BRANCH}:refs/remotes/origin/${CIRCLE_BRANCH} + fi + + # Check the commit ID of the checked out code + if [ -n "$CIRCLE_TAG" ]; then + echo 'Checking out tag' + git checkout --force "$CIRCLE_TAG" + git reset --hard "$CIRCLE_SHA1" # move to triggered SHA + elif [ -n "$CIRCLE_BRANCH" ] && [ "$CIRCLE_BRANCH" != 'HEAD' ]; then + echo 'Checking out branch' + git checkout --force -B "$CIRCLE_BRANCH" + git reset --hard "$CIRCLE_SHA1" # move to triggered SHA + git --no-pager log --no-color -n 1 --format='HEAD is now at %h %s' + fi + name: Checkout code shallow +examples: + checkout: + description: | + Simple git shallow clone instead of checkout. + You can change depth and fetch_depth, but I do recommend set fetch_depth larger than 1. + If you set fetch_depth 1, you will find build failed when new commit was pushed. + Default value of `fetch_depth` is 10 to cover re-build after several commit. + + # No options will clone depth 1 and fetch depth 10. + - git-shallow-clone/checkout + # Clone the repository to specific path `src`. + - git-shallow-clone/checkout: + path: src + # Set fetch_depth: 1 to minimize fetch time. + - git-shallow-clone/checkout: + fetch_depth: 1 + # Change depth:5 for some reason. + - git-shallow-clone/checkout: + depth: 5 + fetch_depth: 5 + # Enable ssh key scan for github.com and bitbucket.org. Omit this parameter use embedded known ssh key by default. + - git-shallow-clone/checkout: + keyscan_github: true + keyscan_bitbucket: true + # Skip tag fetch. + - git-shallow-clone/checkout: + no_tags: true + # Shallow clone then update submodules. + - git-shallow-clone/checkout + - run: git submodule update --init --recursive + usage: + version: "2.1" + orbs: + git-shallow-clone: guitarrapc/git-shallow-clone@x.y.z + workflows: + build: + jobs: + - git-shallow-clone/checkout + checkout_advanced: + description: | + Advanced git shallow clone instead of checkout with clone_options and fetch_options. + Make sure some options is exclusive each other, you should follow to official git documentation. + e.g. `--depth N` cannot use with `--shallow-since`. + + # No options will clone depth 1 and fetch depth 10. + - git-shallow-clone/checkout_advanced + # Clone the repository to specific path `src`. + - git-shallow-clone/checkout_advanced + path: src + # See verbose log on clone. + - git-shallow-clone/checkout_advanced + clone_options: '--depth 1 --verbose'. + # Use --shallow-since for clone timing, but not for fetch timing. + - git-shallow-clone/checkout_advanced + clone_options: '--shallow-since "5 days ago"' + # Use --shallow-since for fetch timing, but not for clone timing. + - git-shallow-clone/checkout_advanced + fetch_options: '--shallow-since "5 days ago"' + # Use --no-tags to skip tag fetch. + - git-shallow-clone/checkout_advanced + fetch_options: '--depth 10 --no-tags' + # Skip tag fetch. + - git-shallow-clone/checkout_advanced + fetch_options: '--depth 10 --no-tags' + tag_fetch_options: '--no-tags' + # Shallow clone then update submodules. + - git-shallow-clone/checkout_advanced + - run: git submodule update --init --recursive + usage: + version: "2.1" + orbs: + git-shallow-clone: guitarrapc/git-shallow-clone@x.y.z + workflows: + build: + jobs: + - git-shallow-clone/checkout_advanced: + clone_options: --shallow-since "5 days ago" + fetch_options: --shallow-since "5 days ago" + + diff --git a/scripts/yarn.lock b/scripts/yarn.lock index ca8f6df08380..b18e4ba5d5f1 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -824,6 +824,28 @@ __metadata: languageName: node linkType: hard +"@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1": + version: 0.0.0 + resolution: "@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1" + dependencies: + ajv: "npm:^8.17.1" + peerDependencies: + "@ndelangen/circleci-config-sdk": "*" + yaml: ^2.8.1 + checksum: 10c0/119ed6907dca17835f2f91c77bcead1562001d2d8d5524c4f251ad0b7be99d7191fc01e73ce2fd8ee8b2ddf172656d01c72ee3a18f44c00fe614f03ee64bdf97 + languageName: node + linkType: hard + +"@ndelangen/circleci-config-sdk@https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1": + version: 0.0.0 + resolution: "@ndelangen/circleci-config-sdk@https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1" + dependencies: + browser-or-node: "npm:^3.0.0" + yaml: "npm:^2.8.1" + checksum: 10c0/9ce4be4b12c271402f8956a4ab0644daad86e30da00ec821829997d154af82affa0d1533c28deeb7343a2788e28828f45e96b71e4e9704aa701da613d3796b84 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -1579,6 +1601,8 @@ __metadata: "@actions/core": "npm:^1.11.1" "@fal-works/esbuild-plugin-global-externals": "npm:^2.1.2" "@google-cloud/bigquery": "npm:^6.2.1" + "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1" + "@ndelangen/circleci-config-sdk": "https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1" "@octokit/graphql": "npm:^5.0.6" "@octokit/request": "npm:^8.4.1" "@polka/parse": "npm:^1.0.0-next.28" @@ -2857,7 +2881,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.2.0": +"ajv@npm:^8.17.1, ajv@npm:^8.2.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -3473,6 +3497,13 @@ __metadata: languageName: node linkType: hard +"browser-or-node@npm:^3.0.0": + version: 3.0.0 + resolution: "browser-or-node@npm:3.0.0" + checksum: 10c0/05db930e0a21bfffef74dbc4a27eaa12113e7f43a95f3b80a925f624212d701b86034cdfb5c422bdee061c4ae8442d294feee8996e6ae2555a8e46ea0b830b52 + languageName: node + linkType: hard + "browserify-zlib@npm:^0.1.4": version: 0.1.4 resolution: "browserify-zlib@npm:0.1.4" @@ -13238,6 +13269,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.8.1": + version: 2.8.1 + resolution: "yaml@npm:2.8.1" + bin: + yaml: bin.mjs + checksum: 10c0/7c587be00d9303d2ae1566e03bc5bc7fe978ba0d9bf39cc418c3139d37929dfcb93a230d9749f2cb578b6aa5d9ebebc322415e4b653cb83acd8bc0bc321707f3 + languageName: node + linkType: hard + "yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" From 8f14b088dbac47ded553fc94260be602c7befef1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 7 Nov 2025 16:28:34 +0100 Subject: [PATCH 022/310] wip --- scripts/ci/generate-dynamic.ts | 104 ++++++++-- scripts/package.json | 2 +- scripts/tmp.yml | 367 --------------------------------- scripts/yarn.lock | 8 +- 4 files changed, 97 insertions(+), 384 deletions(-) delete mode 100644 scripts/tmp.yml diff --git a/scripts/ci/generate-dynamic.ts b/scripts/ci/generate-dynamic.ts index 5de83775b601..296e90d7cce9 100644 --- a/scripts/ci/generate-dynamic.ts +++ b/scripts/ci/generate-dynamic.ts @@ -1,7 +1,7 @@ +import { exec } from 'node:child_process'; import { readFile } from 'node:fs/promises'; import { join } from 'node:path'; -import a from '@ndelangen/circleci-config-parser'; import { Config, Workflow, orb } from '@ndelangen/circleci-config-sdk'; import { program } from 'commander'; import yml from 'yaml'; @@ -15,17 +15,97 @@ const { workflow: workflowName } = program.opts(); const dirname = import.meta.dirname; -console.log('Generating CircleCI config for workflow:', workflowName); -console.log('--------------------------------'); +async function generateConfig() { + console.log('Generating CircleCI config for workflow:', workflowName); + console.log('--------------------------------'); -const templates = await import(join(dirname, '../../code/lib/cli-storybook/src/sandbox-templates')); -const orbyml = await readFile(join(dirname, '../tmp.yml'), 'utf-8'); -const orbData = yml.parse(orbyml); + const templates = await import( + join(dirname, '../../code/lib/cli-storybook/src/sandbox-templates') + ); + const orbyml = await readFile(join(dirname, '../tmp.yml'), 'utf-8'); + const orbData = yml.parse(orbyml); -const config = new Config(); -config.importOrb( - new orb.OrbImport('git-shallow-clone', 'guitarrapc', 'git-shallow-clone', '2.8.0') -); -config.addWorkflow(new Workflow(workflowName)); + console.log(orbData); -console.log(config.stringify()); + const config = new Config(); + config.importOrb( + new orb.OrbImport('git-shallow-clone', 'guitarrapc', 'git-shallow-clone', '2.8.0') + ); + config.addWorkflow(new Workflow(workflowName)); + + console.log(config.stringify()); +} + +async function getOrbs() { + const orbs = { + 'browser-tools': 'circleci/browser-tools@1.4.1', + codecov: 'codecov/codecov@3.2.4', + discord: 'antonioned/discord@0.1.0', + 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', + node: 'circleci/node@5.2.0', + nx: 'nrwl/nx@1.6.2', + }; + + return Promise.all( + Object.entries(orbs).map(async ([alias, reference]) => { + const text = await new Promise((resolve, reject) => { + const child = exec(`circleci orb source ${reference}`); + let output = ''; + child.stdout.on('data', (data) => { + output += data.toString(); + }); + child.on('close', () => { + resolve(output); + }); + child.on('error', (error) => { + reject(error); + }); + }); + + type P = Record< + string, + | { + default: Z; + description: string; + type: 'string'; + } + | { + default: Z; + enum: Z[]; + type: 'enum'; + } + >; + + const data = yml.parse(text) as { + version: number; + commands: Record< + string, + { + description: string; + parameters: P; + executors: Record< + string, + { + docker: { image: string }[]; + parameters: P; + } + >; + } + >; + }; + + return { + alias, + reference, + data, + }; + }) + ); +} + +const orbs = await getOrbs(); +console.log(orbs); + +async function convertOrb(input: Awaited>[0]) { + // +} diff --git a/scripts/package.json b/scripts/package.json index 35098a03bbc9..f11cc4b2c570 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -65,7 +65,7 @@ "@actions/core": "^1.11.1", "@fal-works/esbuild-plugin-global-externals": "^2.1.2", "@google-cloud/bigquery": "^6.2.1", - "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1", + "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd", "@ndelangen/circleci-config-sdk": "https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1", "@octokit/graphql": "^5.0.6", "@octokit/request": "^8.4.1", diff --git a/scripts/tmp.yml b/scripts/tmp.yml deleted file mode 100644 index af501cf2f3d0..000000000000 --- a/scripts/tmp.yml +++ /dev/null @@ -1,367 +0,0 @@ -version: 2.1 -description: | - Provides git shallow clone instead of full clone. Supporting trigger for tag, pull_request and push, works on Alpine, Debian, Ubuntu, and macOS. - What's shallow clone? - see https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt Provied commands: - checkout - checkout_advanced - requirement: git -display: - source_url: https://github.com/guitarrapc/git-shallow-clone-orb -commands: - checkout: - description: | - Provides git shallow clone instead of full clone. This command is for simple usage when you don't need options for clone, fetch and tag fetch. - parameters: - depth: - default: 1 - description: | - Limit fetch depth to the specified number of commit from a remote branch history. Refer git fetch documentation for more information. - type: integer - fetch_depth: - default: 10 - description: | - Addtional fetch depth to the specified number of commit from a remote branch history. Pass more number then depth when you want to check futher commit history. - type: integer - keyscan_bitbucket: - default: false - description: | - Pass `true` to dynamically get ssh-rsa from `bitbucket.org`. - type: boolean - keyscan_github: - default: false - description: | - Pass `true` to dynamically get ssh-rsa from `github.com`. - type: boolean - no_tags: - default: false - description: | - true to add '--no-tags' when fetching. As git not offer tag depth, we only able to control fetch all tags or not. This enable you to stop fetch tags when you have vast numbers of tags during specified fetch depth. In other word, if you need tag then fetch specified tags manually when use 'without_tag: true'. - type: boolean - path: - default: . - description: | - Checkout directory (default: job working_directory) - type: string - steps: - - run: - command: | - #!/bin/sh - set -ex - - # Workaround old docker images with incorrect $HOME - # check https://github.com/docker/docker/issues/2968 for details - if [ "${HOME}" = "/" ]; then - export HOME=$(getent passwd $(id -un) | cut -d: -f6) - fi - - # known_hosts / id_rsa - export SSH_CONFIG_DIR=${SSH_CONFIG_DIR:-"${HOME}/.ssh"} - echo "Using SSH Config Dir '$SSH_CONFIG_DIR'" - git --version - - mkdir -p "$SSH_CONFIG_DIR" - chmod 0700 "$SSH_CONFIG_DIR" - - if [ -x "$(command -v ssh-keyscan)" ] && ([ "<< parameters.keyscan_github >>" == "true" ] || [ "<< parameters.keyscan_bitbucket >>" == "true" ]); then - if [ "<< parameters.keyscan_github >>" == "true" ]; then - ssh-keyscan -H github.com >> "$SSH_CONFIG_DIR/known_hosts" - fi - if [ "<< parameters.keyscan_bitbucket >>" == "true" ]; then - ssh-keyscan -H bitbucket.org >> "$SSH_CONFIG_DIR/known_hosts" - fi - fi - - # see: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints - if [ "<< parameters.keyscan_github >>" != "true" ]; then - echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl - github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= - github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= - ' >> "$SSH_CONFIG_DIR/known_hosts" - fi - - # see: https://bitbucket.org/blog/ssh-host-key-changes - if [ "<< parameters.keyscan_bitbucket >>" != "true" ]; then - echo 'bitbucket.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPIQmuzMBuKdWeF4+a2sjSSpBK0iqitSQ+5BM9KhpexuGt20JpTVM7u5BDZngncgrqDMbWdxMWWOGtZ9UgbqgZE= - bitbucket.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUO - bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQeJzhupRu0u0cdegZIa8e86EG2qOCsIsD1Xw0xSeiPDlCr7kq97NLmMbpKTX6Esc30NuoqEEHCuc7yWtwp8dI76EEEB1VqY9QJq6vk+aySyboD5QF61I/1WeTwu+deCbgKMGbUijeXhtfbxSxm6JwGrXrhBdofTsbKRUsrN1WoNgUa8uqN1Vx6WAJw1JHPhglEGGHea6QICwJOAr/6mrui/oB7pkaWKHj3z7d1IC4KWLtY47elvjbaTlkN04Kc/5LFEirorGYVbt15kAUlqGM65pk6ZBxtaO3+30LVlORZkxOh+LKL/BvbZ/iRNhItLqNyieoQj/uh/7Iv4uyH/cV/0b4WDSd3DptigWq84lJubb9t/DnZlrJazxyDCulTmKdOR7vs9gMTo+uoIrPSb8ScTtvw65+odKAlBj59dhnVp9zd7QUojOpXlL62Aw56U4oO+FALuevvMjiWeavKhJqlR7i5n9srYcrNV7ttmDw7kf/97P5zauIhxcjX+xHv4M= - ' >> "$SSH_CONFIG_DIR/known_hosts" - fi - - echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY= - ' >> "$SSH_CONFIG_DIR/known_hosts" - chmod 0600 "$SSH_CONFIG_DIR/known_hosts" - - rm -f "$SSH_CONFIG_DIR/id_rsa" - (umask 077; touch "$SSH_CONFIG_DIR/id_rsa") - printf "%s" "$CHECKOUT_KEY" > "$SSH_CONFIG_DIR/id_rsa" - chmod 0600 "$SSH_CONFIG_DIR/id_rsa" - if (: "${CHECKOUT_KEY_PUBLIC?}") 2>/dev/null; then - rm -f "$SSH_CONFIG_DIR/id_rsa.pub" - printf "%s" "$CHECKOUT_KEY_PUBLIC" > "$SSH_CONFIG_DIR/id_rsa.pub" - fi - - export GIT_SSH_COMMAND='ssh -i "$SSH_CONFIG_DIR/id_rsa" -o UserKnownHostsFile="$SSH_CONFIG_DIR/known_hosts"' - - # use git+ssh instead of https - git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true - git config --global gc.auto 0 || true - - # Define Tag args - if [ -n "$CIRCLE_TAG" ]; then - # only tags operation have default --tags. others will no tag options - clone_tag_args= - fetch_tag_args="--tags" - fi - if [ '<< parameters.no_tags >>' == 'true' ]; then - clone_tag_args="--no-tags" - fetch_tag_args="--no-tags" - fi - - # Checkout. SourceCaching? or not. - if [ -e "$HOME/project/<< parameters.path >>/.git" ]; then - echo 'Fetching into existing repository' - existing_repo='true' - cd "$HOME/project/<< parameters.path >>" - git remote set-url origin "$CIRCLE_REPOSITORY_URL" || true - else - echo 'Cloning git repository' - existing_repo='false' - mkdir -p "$HOME/project/<< parameters.path >>" - cd "$HOME/project/<< parameters.path >>" - git clone ${clone_tag_args} --depth << parameters.depth >> $CIRCLE_REPOSITORY_URL . - fi - - # NOTE: Original checkout fetch only if SourceCaching, but we fetch always for depth selection. - echo 'Fetching from remote repository' - if [ -n "$CIRCLE_TAG" ]; then - git fetch ${fetch_tag_args} --depth << parameters.fetch_depth >> --force --tags origin "+refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}" - elif echo $CIRCLE_BRANCH | grep -E ^pull\/[0-9]+/head$ > /dev/null; then - # pull request called from api. Input should be `pull/123/head` see detail for https://github.com/guitarrapc/git-shallow-clone-orb/issues/34 - git fetch ${fetch_tag_args} --depth << parameters.fetch_depth >> --force origin "+refs/${CIRCLE_BRANCH}:remotes/origin/${CIRCLE_BRANCH}" - else - git fetch ${fetch_tag_args} --depth << parameters.fetch_depth >> --force origin +refs/heads/${CIRCLE_BRANCH}:refs/remotes/origin/${CIRCLE_BRANCH} - fi - - # Check the commit ID of the checked out code - if [ -n "$CIRCLE_TAG" ]; then - echo 'Checking out tag' - git checkout --force "$CIRCLE_TAG" - git reset --hard "$CIRCLE_SHA1" # move to triggered SHA - elif [ -n "$CIRCLE_BRANCH" ] && [ "$CIRCLE_BRANCH" != 'HEAD' ]; then - echo 'Checking out branch' - git checkout --force -B "$CIRCLE_BRANCH" - git reset --hard "$CIRCLE_SHA1" # move to triggered SHA - git --no-pager log --no-color -n 1 --format='HEAD is now at %h %s' - fi - name: Checkout code shallow - checkout_advanced: - description: | - Provides git shallow clone instead of full clone. This command is for advaned usage when you need options for clone, fetch and tag fetch. - parameters: - clone_options: - default: --depth 1 - description: | - git clone options you want to add such as '--depth 1 --verbose' and '--depth 1 --shallow-since "5 days ago"' - type: string - fetch_options: - default: --depth 10 - description: | - git fetch options you want to add such as '--depth 1 --verbose' and '--depth 1 --shallow-since "5 days ago"' you don't need set '--force' option as it already set by default. in case of tag, add '--no-tags' on this option and tag_fetch_options. - type: string - keyscan_bitbucket: - default: false - description: | - Pass `true` to dynamically get ssh-rsa from `bitbucket.org`. - type: boolean - keyscan_github: - default: false - description: | - Pass `true` to dynamically get ssh-rsa from `github.com`. - type: boolean - path: - default: . - description: | - Checkout directory (default: job working_directory) - type: string - tag_fetch_options: - default: --tags - description: | - This option apply when git operation is tag. Use 'fetch_options' instead if pr and other git operation. Additional git fetch options you want to add specifically for tags such as '--tags' or '--no-tags'. Default value is '--tags' - type: string - steps: - - run: - command: | - #!/bin/sh - set -ex - - # Workaround old docker images with incorrect $HOME - # check https://github.com/docker/docker/issues/2968 for details - if [ "${HOME}" = "/" ]; then - export HOME=$(getent passwd $(id -un) | cut -d: -f6) - fi - - # known_hosts / id_rsa - export SSH_CONFIG_DIR=${SSH_CONFIG_DIR:-"${HOME}/.ssh"} - echo "Using SSH Config Dir '$SSH_CONFIG_DIR'" - git --version - - mkdir -p "$SSH_CONFIG_DIR" - chmod 0700 "$SSH_CONFIG_DIR" - - if [ -x "$(command -v ssh-keyscan)" ] && ([ "<< parameters.keyscan_github >>" == "true" ] || [ "<< parameters.keyscan_bitbucket >>" == "true" ]); then - if [ "<< parameters.keyscan_github >>" == "true" ]; then - ssh-keyscan -H github.com >> "$SSH_CONFIG_DIR/known_hosts" - fi - if [ "<< parameters.keyscan_bitbucket >>" == "true" ]; then - ssh-keyscan -H bitbucket.org >> "$SSH_CONFIG_DIR/known_hosts" - fi - fi - - # see: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints - if [ "<< parameters.keyscan_github >>" != "true" ]; then - echo 'github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl - github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= - github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= - ' >> "$SSH_CONFIG_DIR/known_hosts" - fi - - # see: https://bitbucket.org/blog/ssh-host-key-changes - if [ "<< parameters.keyscan_bitbucket >>" != "true" ]; then - echo 'bitbucket.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPIQmuzMBuKdWeF4+a2sjSSpBK0iqitSQ+5BM9KhpexuGt20JpTVM7u5BDZngncgrqDMbWdxMWWOGtZ9UgbqgZE= - bitbucket.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUO - bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQeJzhupRu0u0cdegZIa8e86EG2qOCsIsD1Xw0xSeiPDlCr7kq97NLmMbpKTX6Esc30NuoqEEHCuc7yWtwp8dI76EEEB1VqY9QJq6vk+aySyboD5QF61I/1WeTwu+deCbgKMGbUijeXhtfbxSxm6JwGrXrhBdofTsbKRUsrN1WoNgUa8uqN1Vx6WAJw1JHPhglEGGHea6QICwJOAr/6mrui/oB7pkaWKHj3z7d1IC4KWLtY47elvjbaTlkN04Kc/5LFEirorGYVbt15kAUlqGM65pk6ZBxtaO3+30LVlORZkxOh+LKL/BvbZ/iRNhItLqNyieoQj/uh/7Iv4uyH/cV/0b4WDSd3DptigWq84lJubb9t/DnZlrJazxyDCulTmKdOR7vs9gMTo+uoIrPSb8ScTtvw65+odKAlBj59dhnVp9zd7QUojOpXlL62Aw56U4oO+FALuevvMjiWeavKhJqlR7i5n9srYcrNV7ttmDw7kf/97P5zauIhxcjX+xHv4M= - ' >> "$SSH_CONFIG_DIR/known_hosts" - fi - - echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY= - ' >> "$SSH_CONFIG_DIR/known_hosts" - chmod 0600 "$SSH_CONFIG_DIR/known_hosts" - - rm -f "$SSH_CONFIG_DIR/id_rsa" - (umask 077; touch "$SSH_CONFIG_DIR/id_rsa") - printf "%s" "$CHECKOUT_KEY" > "$SSH_CONFIG_DIR/id_rsa" - chmod 0600 "$SSH_CONFIG_DIR/id_rsa" - if (: "${CHECKOUT_KEY_PUBLIC?}") 2>/dev/null; then - rm -f "$SSH_CONFIG_DIR/id_rsa.pub" - printf "%s" "$CHECKOUT_KEY_PUBLIC" > "$SSH_CONFIG_DIR/id_rsa.pub" - fi - - # use git+ssh instead of https - git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true - git config --global gc.auto 0 || true - - # Checkout. SourceCaching? or not. - if [ -e "$HOME/project/<< parameters.path >>/.git" ]; then - echo 'Fetching into existing repository' - existing_repo='true' - cd "$HOME/project/<< parameters.path >>" - git remote set-url origin "$CIRCLE_REPOSITORY_URL" || true - else - echo 'Cloning git repository' - existing_repo='false' - mkdir -p "$HOME/project/<< parameters.path >>" - cd "$HOME/project/<< parameters.path >>" - git clone << parameters.clone_options >> $CIRCLE_REPOSITORY_URL . - fi - - # NOTE: Original checkout fetch only if SourceCaching, but we fetch always for depth selection. - echo 'Fetching from remote repository' - if [ -n "$CIRCLE_TAG" ]; then - git fetch << parameters.tag_fetch_options >> << parameters.fetch_options >> --force --tags origin "+refs/tags/${CIRCLE_TAG}:refs/tags/${CIRCLE_TAG}" - elif echo $CIRCLE_BRANCH | grep -E ^pull\/[0-9]+/head$ > /dev/null; then - # pull request called from api. Input should be `pull/123/head` see detail for https://github.com/guitarrapc/git-shallow-clone-orb/issues/34 - git fetch << parameters.tag_fetch_options >> << parameters.fetch_options >> --force origin "+refs/${CIRCLE_BRANCH}:remotes/origin/${CIRCLE_BRANCH}" - else - git fetch << parameters.fetch_options >> --force origin +refs/heads/${CIRCLE_BRANCH}:refs/remotes/origin/${CIRCLE_BRANCH} - fi - - # Check the commit ID of the checked out code - if [ -n "$CIRCLE_TAG" ]; then - echo 'Checking out tag' - git checkout --force "$CIRCLE_TAG" - git reset --hard "$CIRCLE_SHA1" # move to triggered SHA - elif [ -n "$CIRCLE_BRANCH" ] && [ "$CIRCLE_BRANCH" != 'HEAD' ]; then - echo 'Checking out branch' - git checkout --force -B "$CIRCLE_BRANCH" - git reset --hard "$CIRCLE_SHA1" # move to triggered SHA - git --no-pager log --no-color -n 1 --format='HEAD is now at %h %s' - fi - name: Checkout code shallow -examples: - checkout: - description: | - Simple git shallow clone instead of checkout. - You can change depth and fetch_depth, but I do recommend set fetch_depth larger than 1. - If you set fetch_depth 1, you will find build failed when new commit was pushed. - Default value of `fetch_depth` is 10 to cover re-build after several commit. - - # No options will clone depth 1 and fetch depth 10. - - git-shallow-clone/checkout - # Clone the repository to specific path `src`. - - git-shallow-clone/checkout: - path: src - # Set fetch_depth: 1 to minimize fetch time. - - git-shallow-clone/checkout: - fetch_depth: 1 - # Change depth:5 for some reason. - - git-shallow-clone/checkout: - depth: 5 - fetch_depth: 5 - # Enable ssh key scan for github.com and bitbucket.org. Omit this parameter use embedded known ssh key by default. - - git-shallow-clone/checkout: - keyscan_github: true - keyscan_bitbucket: true - # Skip tag fetch. - - git-shallow-clone/checkout: - no_tags: true - # Shallow clone then update submodules. - - git-shallow-clone/checkout - - run: git submodule update --init --recursive - usage: - version: "2.1" - orbs: - git-shallow-clone: guitarrapc/git-shallow-clone@x.y.z - workflows: - build: - jobs: - - git-shallow-clone/checkout - checkout_advanced: - description: | - Advanced git shallow clone instead of checkout with clone_options and fetch_options. - Make sure some options is exclusive each other, you should follow to official git documentation. - e.g. `--depth N` cannot use with `--shallow-since`. - - # No options will clone depth 1 and fetch depth 10. - - git-shallow-clone/checkout_advanced - # Clone the repository to specific path `src`. - - git-shallow-clone/checkout_advanced - path: src - # See verbose log on clone. - - git-shallow-clone/checkout_advanced - clone_options: '--depth 1 --verbose'. - # Use --shallow-since for clone timing, but not for fetch timing. - - git-shallow-clone/checkout_advanced - clone_options: '--shallow-since "5 days ago"' - # Use --shallow-since for fetch timing, but not for clone timing. - - git-shallow-clone/checkout_advanced - fetch_options: '--shallow-since "5 days ago"' - # Use --no-tags to skip tag fetch. - - git-shallow-clone/checkout_advanced - fetch_options: '--depth 10 --no-tags' - # Skip tag fetch. - - git-shallow-clone/checkout_advanced - fetch_options: '--depth 10 --no-tags' - tag_fetch_options: '--no-tags' - # Shallow clone then update submodules. - - git-shallow-clone/checkout_advanced - - run: git submodule update --init --recursive - usage: - version: "2.1" - orbs: - git-shallow-clone: guitarrapc/git-shallow-clone@x.y.z - workflows: - build: - jobs: - - git-shallow-clone/checkout_advanced: - clone_options: --shallow-since "5 days ago" - fetch_options: --shallow-since "5 days ago" - - diff --git a/scripts/yarn.lock b/scripts/yarn.lock index b18e4ba5d5f1..0bf523760d61 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -824,15 +824,15 @@ __metadata: languageName: node linkType: hard -"@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1": +"@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd": version: 0.0.0 - resolution: "@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1" + resolution: "@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd" dependencies: ajv: "npm:^8.17.1" peerDependencies: "@ndelangen/circleci-config-sdk": "*" yaml: ^2.8.1 - checksum: 10c0/119ed6907dca17835f2f91c77bcead1562001d2d8d5524c4f251ad0b7be99d7191fc01e73ce2fd8ee8b2ddf172656d01c72ee3a18f44c00fe614f03ee64bdf97 + checksum: 10c0/e7e7820df5d9d155de8ef07672907995d1a85d936bb8419c7037d61c8605210786018e9c81479be2caac6c90d3de298dfc83b99925a990c35e5c92ac7618dee2 languageName: node linkType: hard @@ -1601,7 +1601,7 @@ __metadata: "@actions/core": "npm:^1.11.1" "@fal-works/esbuild-plugin-global-externals": "npm:^2.1.2" "@google-cloud/bigquery": "npm:^6.2.1" - "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@1" + "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd" "@ndelangen/circleci-config-sdk": "https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1" "@octokit/graphql": "npm:^5.0.6" "@octokit/request": "npm:^8.4.1" From c9ce190674e2831bc28c13bfc72ae1a306c6dbb4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 10 Nov 2025 10:15:54 +0100 Subject: [PATCH 023/310] wip --- scripts/ci/generate-new.ts | 114 +++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 scripts/ci/generate-new.ts diff --git a/scripts/ci/generate-new.ts b/scripts/ci/generate-new.ts new file mode 100644 index 000000000000..3f71b105870a --- /dev/null +++ b/scripts/ci/generate-new.ts @@ -0,0 +1,114 @@ +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; + +import { program } from 'commander'; +import yml from 'yaml'; + +program + .description('Generate CircleCI config') + .requiredOption('-w, --workflow ', 'Workflow to generate config for') + .parse(process.argv); + +const { workflow: workflowName } = program.opts(); + +const dirname = import.meta.dirname; + +console.log('Generating CircleCI config for workflow:', workflowName); +console.log('--------------------------------'); + +const templates = await import(join(dirname, '../../code/lib/cli-storybook/src/sandbox-templates')); + +const jobs = {} as const; + +const data = { + version: 2.1, + commands: { + 'cancel-workflow-on-failure': { + description: 'Cancels the entire workflow in case the previous step has failed', + steps: [ + { + run: { + command: + 'echo "Canceling workflow as previous step resulted in failure."\necho "To execute all checks locally, please run yarn ci-tests"\ncurl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"\n', + name: 'Cancel current workflow', + when: 'on_fail', + }, + }, + ], + }, + 'report-workflow-on-failure': { + description: 'Reports failures to discord', + parameters: { + template: { + default: 'none', + description: + 'Which template to report in discord. Applicable for parallel sandbox jobs\n', + type: 'string', + }, + }, + steps: [ + { + run: { + command: 'git fetch --unshallow', + when: 'on_fail', + }, + }, + { + 'discord/status': { + fail_only: true, + failure_message: + '$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)', + only_for_branches: 'main,next,next-release,latest-release', + }, + }, + ], + }, + 'start-event-collector': { + description: 'Starts the event collector', + steps: [ + { + run: { + background: true, + command: 'yarn jiti ./event-log-collector.ts', + name: 'Start Event Collector', + working_directory: 'scripts', + }, + }, + ], + }, + }, + executors: {}, + jobs, + orbs: { + 'browser-tools': 'circleci/browser-tools@1.4.1', + codecov: 'codecov/codecov@3.2.4', + discord: 'antonioned/discord@0.1.0', + 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', + node: 'circleci/node@5.2.0', + nx: 'nrwl/nx@1.6.2', + }, + parameters: { + ghBaseBranch: { + default: 'next', + description: 'The name of the base branch (the target of the PR)', + type: 'string', + }, + ghPrNumber: { + default: '', + description: 'The PR number', + type: 'string', + }, + // this has no impact, but must be present until we have implemented change-detection + workflow: { + default: 'normal', + description: 'Which workflow to run', + enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], + type: 'enum', + }, + }, + workflows: { + sandboxes: { + jobs: [], + }, + }, +}; From 7e115e56a29d649f743d2291db82a7caefa66d18 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 21 Nov 2025 15:17:32 +0100 Subject: [PATCH 024/310] Add CircleCI configuration files and scripts for CI workflow generation --- .circleci/config.generated.json | 2322 +++++++++++++++++++++++++++++++ .circleci/config.generated.yml | 1693 +++++++++++----------- .circleci/config.original.yml | 1436 +++++++++++++++++++ scripts/ci/data.js | 2154 ++++++++++++++++++++++++++++ scripts/ci/generate.ts | 1862 +------------------------ 5 files changed, 6768 insertions(+), 2699 deletions(-) create mode 100644 .circleci/config.generated.json create mode 100644 .circleci/config.original.yml create mode 100644 scripts/ci/data.js diff --git a/.circleci/config.generated.json b/.circleci/config.generated.json new file mode 100644 index 000000000000..7d2549cb30c8 --- /dev/null +++ b/.circleci/config.generated.json @@ -0,0 +1,2322 @@ +{ + "commands": { + "cancel-workflow-on-failure": { + "description": "Cancels the entire workflow in case the previous step has failed", + "steps": [ + { + "run": { + "command": "echo \"Canceling workflow as previous step resulted in failure.\"\necho \"To execute all checks locally, please run yarn ci-tests\"\ncurl -X POST --header \"Content-Type: application/json\" \"https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}\"\n", + "name": "Cancel current workflow", + "when": "on_fail" + } + } + ] + }, + "report-workflow-on-failure": { + "description": "Reports failures to discord", + "parameters": { + "template": { + "default": "none", + "description": "Which template to report in discord. Applicable for parallel sandbox jobs\n", + "type": "string" + } + }, + "steps": [ + { + "run": { + "command": "git fetch --unshallow", + "when": "on_fail" + } + }, + { + "discord/status": { + "fail_only": true, + "failure_message": "$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)", + "only_for_branches": "main,next,next-release,latest-release" + } + } + ] + }, + "start-event-collector": { + "description": "Starts the event collector", + "steps": [ + { + "run": { + "background": true, + "command": "yarn jiti ./event-log-collector.ts", + "name": "Start Event Collector", + "working_directory": "scripts" + } + } + ] + } + }, + "executors": { + "sb_node_18_browsers": { + "docker": [ + { + "environment": { + "NODE_OPTIONS": "--max_old_space_size=6144" + }, + "image": "cimg/node:18.20.3-browsers" + } + ], + "parameters": { + "class": { + "default": "small", + "description": "The Resource class", + "enum": [ + "small", + "medium", + "medium+", + "large", + "xlarge" + ], + "type": "enum" + } + }, + "resource_class": "<>", + "working_directory": "/tmp/storybook" + }, + "sb_node_22_browsers": { + "docker": [ + { + "environment": { + "NODE_OPTIONS": "--max_old_space_size=6144" + }, + "image": "cimg/node:22.15.0-browsers" + } + ], + "parameters": { + "class": { + "default": "small", + "description": "The Resource class", + "enum": [ + "small", + "medium", + "medium+", + "large", + "xlarge" + ], + "type": "enum" + } + }, + "resource_class": "<>", + "working_directory": "/tmp/storybook" + }, + "sb_node_22_classic": { + "docker": [ + { + "environment": { + "NODE_OPTIONS": "--max_old_space_size=6144" + }, + "image": "cimg/node:22.15.0" + } + ], + "parameters": { + "class": { + "default": "small", + "description": "The Resource class", + "enum": [ + "small", + "medium", + "medium+", + "large", + "xlarge" + ], + "type": "enum" + } + }, + "resource_class": "<>", + "working_directory": "/tmp/storybook" + }, + "sb_playwright": { + "docker": [ + { + "environment": { + "NODE_OPTIONS": "--max_old_space_size=6144" + }, + "image": "mcr.microsoft.com/playwright:v1.52.0-noble" + } + ], + "parameters": { + "class": { + "default": "small", + "description": "The Resource class", + "enum": [ + "small", + "medium", + "medium+", + "large", + "xlarge" + ], + "type": "enum" + } + }, + "resource_class": "<>", + "working_directory": "/tmp/storybook" + } + }, + "jobs": { + "bench-packages": { + "executor": { + "class": "small", + "name": "sb_node_22_classic" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "when": { + "condition": { + "and": [ + "<< pipeline.parameters.ghBaseBranch >>", + "<< pipeline.parameters.ghPrNumber >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio" + } + }, + { + "run": { + "command": "yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload", + "name": "Benchmarking packages against base branch", + "working_directory": "scripts" + } + } + ] + } + }, + { + "when": { + "condition": { + "or": [ + { + "not": "<< pipeline.parameters.ghBaseBranch >>" + }, + { + "not": "<< pipeline.parameters.ghPrNumber >>" + } + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio" + } + }, + { + "run": { + "command": "yarn bench-packages --upload", + "name": "Uploading package benchmarks for branch", + "working_directory": "scripts" + } + } + ] + } + }, + { + "store_artifacts": { + "path": "bench/packages/results.json" + } + }, + "report-workflow-on-failure", + "cancel-workflow-on-failure" + ] + }, + "bench-sandboxes": { + "executor": { + "class": "small", + "name": "sb_playwright" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", + "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", + "name": "Running Bench" + } + }, + { + "run": { + "command": "yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>", + "name": "Uploading results" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)" + } + } + ] + }, + "build": { + "executor": { + "class": "large", + "name": "sb_node_22_classic" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "restore_cache": { + "keys": [ + "build-yarn-2-cache-v5--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}" + ], + "name": "Restore Yarn cache" + } + }, + { + "run": { + "command": "yarn task --task compile --start-from=auto --no-link --debug\ngit diff --exit-code\nyarn dedupe --check\n", + "name": "Compile" + } + }, + { + "run": { + "command": "cd code\nyarn local-registry --publish\n", + "name": "Publish to Verdaccio" + } + }, + "report-workflow-on-failure", + { + "store_artifacts": { + "path": "code/bench/esbuild-metafiles" + } + }, + { + "save_cache": { + "key": "build-yarn-2-cache-v5--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}", + "name": "Save Yarn cache", + "paths": [ + "~/.yarn/berry/cache" + ] + } + }, + { + "persist_to_workspace": { + "paths": [ + "code/node_modules", + "code/addons", + "scripts/node_modules", + "code/bench", + "code/examples", + "code/frameworks", + "code/lib", + "code/core", + "code/builders", + "code/renderers", + "code/presets", + ".verdaccio-cache" + ], + "root": "." + } + } + ] + }, + "check": { + "executor": { + "class": "large", + "name": "sb_node_22_classic" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "nx/set-shas": { + "main-branch-name": "next", + "workflow-name": "<< pipeline.parameters.workflow >>" + } + }, + { + "restore_cache": { + "keys": [ + "build-yarn-2-cache-v5--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}" + ], + "name": "Restore Yarn cache" + } + }, + { + "run": { + "command": "yarn task --task compile --start-from=auto --no-link --debug\n", + "name": "Compile" + } + }, + { + "run": { + "command": "yarn task --task check --start-from=auto --no-link --debug\n", + "name": "Check" + } + }, + { + "run": { + "command": "git diff --exit-code\n", + "name": "Ensure no changes pending" + } + }, + "report-workflow-on-failure", + "cancel-workflow-on-failure" + ] + }, + "check-sandboxes": { + "executor": { + "class": "medium", + "name": "sb_node_22_classic" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", + "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", + "name": "Type check Sandboxes" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + } + ] + }, + "chromatic-internal-storybook": { + "environment": { + "NODE_OPTIONS": "--max_old_space_size=4096" + }, + "executor": { + "class": "large", + "name": "sb_node_22_browsers" + }, + "steps": [ + "checkout", + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "yarn storybook:ui:chromatic", + "name": "Running Chromatic", + "working_directory": "code" + } + }, + "report-workflow-on-failure", + { + "store_test_results": { + "path": "test-results" + } + } + ] + }, + "chromatic-sandboxes": { + "executor": { + "class": "medium", + "name": "sb_node_22_browsers" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + "checkout", + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", + "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", + "name": "Running Chromatic" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + } + ] + }, + "coverage": { + "executor": { + "class": "small", + "name": "sb_node_22_browsers" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + "codecov/upload", + "report-workflow-on-failure" + ] + }, + "create-sandboxes": { + "executor": { + "class": "large", + "name": "sb_node_22_browsers" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n", + "name": "Setup Corepack" + } + }, + "start-event-collector", + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n", + "environment": { + "STORYBOOK_TELEMETRY_DEBUG": 1, + "STORYBOOK_TELEMETRY_URL": "http://localhost:6007/event-log" + }, + "name": "Create Sandboxes" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)" + } + }, + { + "persist_to_workspace": { + "paths": [ + "sandbox/**" + ], + "root": "." + } + }, + { + "store_test_results": { + "path": "test-results" + } + } + ] + }, + "e2e-dev": { + "executor": { + "class": "medium+", + "name": "sb_playwright" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", + "name": "Install sandbox dependencies" + } + }, + { + "run": { + "command": "TEST_FILES=$(circleci tests glob \"code/e2e-tests/*.{test,spec}.{ts,js,mjs}\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit\" --verbose --index=0 --total=1\n", + "name": "Running E2E Tests" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + }, + { + "store_artifacts": { + "destination": "playwright", + "path": "code/playwright-results/" + } + } + ] + }, + "e2e-production": { + "executor": { + "class": "medium", + "name": "sb_playwright" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", + "name": "Install sandbox dependencies" + } + }, + { + "run": { + "command": "TEST_FILES=$(circleci tests glob \"code/e2e-tests/*.{test,spec}.{ts,js,mjs}\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit\" --verbose --index=0 --total=1\n", + "name": "Running E2E Tests" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + }, + { + "store_artifacts": { + "destination": "playwright", + "path": "code/playwright-results/" + } + } + ] + }, + "e2e-ui": { + "executor": { + "class": "medium", + "name": "sb_playwright" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "yarn install --no-immutable", + "environment": { + "YARN_ENABLE_IMMUTABLE_INSTALLS": false + }, + "name": "Install dependencies", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/react" + } + }, + { + "run": { + "command": "yarn playwright-e2e", + "name": "Run E2E tests", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/react" + } + }, + { + "store_test_results": { + "path": "test-results" + } + }, + { + "store_artifacts": { + "destination": "playwright", + "path": "test-storybooks/portable-stories-kitchen-sink/react/test-results/" + } + }, + "report-workflow-on-failure" + ] + }, + "e2e-ui-vitest-3": { + "executor": { + "class": "medium", + "name": "sb_playwright" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "yarn install --no-immutable", + "environment": { + "YARN_ENABLE_IMMUTABLE_INSTALLS": false + }, + "name": "Install dependencies", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/react-vitest-3" + } + }, + { + "run": { + "command": "yarn playwright-e2e", + "name": "Run E2E tests", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/react-vitest-3" + } + }, + { + "store_test_results": { + "path": "test-results" + } + }, + { + "store_artifacts": { + "destination": "playwright", + "path": "test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/" + } + }, + "report-workflow-on-failure" + ] + }, + "knip": { + "executor": { + "class": "large", + "name": "sb_node_22_classic" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "cd code\nyarn knip --no-exit-code\n", + "name": "Knip" + } + }, + "report-workflow-on-failure", + "cancel-workflow-on-failure" + ] + }, + "lint": { + "executor": { + "class": "medium+", + "name": "sb_node_22_classic" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "cd code\nyarn lint\n", + "name": "Lint" + } + }, + "report-workflow-on-failure", + "cancel-workflow-on-failure" + ] + }, + "pretty-docs": { + "executor": { + "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\" }}" + ], + "name": "Restore Yarn cache" + } + }, + { + "run": { + "command": "cd scripts\nyarn install\n", + "name": "Install" + } + }, + { + "save_cache": { + "key": "prettydocs-yarn-2-cache-v8--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}", + "name": "Save Yarn cache", + "paths": [ + "~/.yarn/berry/cache" + ] + } + }, + { + "run": { + "command": "cd scripts\nyarn docs:prettier:check\n", + "name": "Prettier" + } + } + ] + }, + "script-checks": { + "executor": "sb_node_22_browsers", + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "cd scripts\nyarn get-template --check\n", + "name": "Check parallelism count" + } + }, + { + "run": { + "command": "cd scripts\nyarn check\n", + "name": "Type check" + } + }, + { + "run": { + "command": "cd scripts\nyarn test --coverage\n", + "name": "Run tests" + } + }, + { + "store_test_results": { + "path": "scripts/junit.xml" + } + }, + "report-workflow-on-failure", + "cancel-workflow-on-failure" + ] + }, + "smoke-test-sandboxes": { + "executor": { + "class": "medium", + "name": "sb_node_18_browsers" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit", + "name": "Smoke Testing Sandboxes" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + } + ] + }, + "stories-tests": { + "executor": { + "class": "xlarge", + "name": "sb_playwright" + }, + "parallelism": 2, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "cd code\nTEST_FILES=$(circleci tests glob \"**/*.{stories}.{ts,tsx,js,jsx,cjs}\" | sed \"/^e2e-tests\\//d\" | sed \"/^node_modules\\//d\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml\" --verbose\n", + "name": "Run tests" + } + }, + { + "store_test_results": { + "path": "test-results" + } + }, + "report-workflow-on-failure", + "cancel-workflow-on-failure" + ] + }, + "test-init-empty": { + "executor": { + "class": "small", + "name": "sb_node_22_browsers" + }, + "parameters": { + "packageManager": { + "type": "string" + }, + "template": { + "type": "string" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "when": { + "condition": { + "equal": [ + "npm", + "<< parameters.packageManager >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (NPM)" + } + } + ] + } + }, + { + "when": { + "condition": { + "equal": [ + "yarn2", + "<< parameters.packageManager >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (Yarn 2)" + } + } + ] + } + }, + { + "when": { + "condition": { + "equal": [ + "pnpm", + "<< parameters.packageManager >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (PNPM)" + } + } + ] + } + }, + { + "when": { + "condition": { + "equal": [ + "react-vite-ts", + "<< parameters.template >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (--skip-install)" + } + } + ] + } + }, + "report-workflow-on-failure" + ] + }, + "test-init-empty-windows": { + "executor": "win/default", + "parameters": { + "packageManager": { + "type": "string" + }, + "template": { + "type": "string" + } + }, + "steps": [ + "checkout", + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n", + "name": "Setup Node & Yarn on Windows", + "shell": "bash.exe" + } + }, + { + "run": { + "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": [ + "npm", + "<< parameters.packageManager >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (Windows NPM)", + "shell": "bash.exe" + } + } + ] + } + }, + { + "when": { + "condition": { + "equal": [ + "yarn2", + "<< parameters.packageManager >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (Windows Yarn 2)", + "shell": "bash.exe" + } + } + ] + } + }, + { + "when": { + "condition": { + "equal": [ + "pnpm", + "<< parameters.packageManager >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (Windows PNPM)", + "shell": "bash.exe" + } + } + ] + } + }, + { + "when": { + "condition": { + "equal": [ + "react-vite-ts", + "<< parameters.template >>" + ] + }, + "steps": [ + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio", + "shell": "bash.exe" + } + }, + { + "run": { + "command": "cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" + }, + "name": "Storybook init from empty directory (Windows --skip-install)", + "shell": "bash.exe" + } + } + ] + } + } + ] + }, + "test-init-features": { + "executor": { + "class": "small", + "name": "sb_node_22_browsers" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "background": true, + "command": "cd code\nyarn local-registry --open\n", + "name": "Verdaccio" + } + }, + { + "run": { + "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", + "name": "Wait on Verdaccio" + } + }, + { + "run": { + "command": "cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n", + "environment": { + "IN_STORYBOOK_SANDBOX": true, + "STORYBOOK_DISABLE_TELEMETRY": true, + "STORYBOOK_INIT_EMPTY_TYPE": "react-vite-ts" + }, + "name": "Storybook init for features" + } + } + ] + }, + "test-portable-stories": { + "executor": { + "class": "medium", + "name": "sb_playwright" + }, + "parameters": { + "directory": { + "type": "string" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "yarn install --no-immutable", + "environment": { + "YARN_ENABLE_IMMUTABLE_INSTALLS": false + }, + "name": "Install dependencies", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" + } + }, + { + "run": { + "command": "yarn jest", + "name": "Run Jest tests", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" + } + }, + { + "run": { + "command": "yarn vitest", + "name": "Run Vitest tests", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" + } + }, + { + "run": { + "command": "yarn playwright-ct", + "name": "Run Playwright CT tests", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" + } + }, + { + "run": { + "command": "yarn cypress", + "name": "Run Cypress CT tests", + "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" + } + }, + "report-workflow-on-failure" + ] + }, + "test-runner-dev": { + "executor": { + "class": "large", + "name": "sb_playwright" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit", + "name": "Running Test Runner in Dev mode" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + } + ] + }, + "test-runner-production": { + "executor": { + "class": "medium+", + "name": "sb_playwright" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", + "name": "Install sandbox dependencies" + } + }, + "start-event-collector", + { + "run": { + "command": "yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit", + "environment": { + "STORYBOOK_TELEMETRY_DEBUG": 1, + "STORYBOOK_TELEMETRY_URL": "http://localhost:6007/event-log" + }, + "name": "Running Test Runner" + } + }, + { + "run": { + "command": "yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)", + "name": "Check Telemetry" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + } + ] + }, + "test-yarn-pnp": { + "executor": { + "class": "medium", + "name": "sb_playwright" + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "yarn install --no-immutable", + "environment": { + "YARN_ENABLE_IMMUTABLE_INSTALLS": false + }, + "name": "Install dependencies", + "working_directory": "test-storybooks/yarn-pnp" + } + }, + { + "run": { + "command": "yarn storybook --smoke-test", + "name": "Run Storybook smoke test", + "working_directory": "test-storybooks/yarn-pnp" + } + }, + "report-workflow-on-failure" + ] + }, + "unit-tests": { + "executor": { + "class": "xlarge", + "name": "sb_playwright" + }, + "parallelism": 2, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "cd code\nTEST_FILES=$(circleci tests glob \"**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}\" | sed \"/^e2e-tests\\//d\" | sed \"/^node_modules\\//d\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml\" --verbose\n", + "name": "Run tests" + } + }, + { + "store_test_results": { + "path": "test-results" + } + }, + "report-workflow-on-failure", + "cancel-workflow-on-failure" + ] + }, + "vitest-integration": { + "executor": { + "class": "xlarge", + "name": "sb_playwright" + }, + "parallelism": "<< parameters.parallelism >>", + "parameters": { + "parallelism": { + "type": "integer" + } + }, + "steps": [ + { + "git-shallow-clone/checkout_advanced": { + "clone_options": "--depth 1 --verbose" + } + }, + { + "attach_workspace": { + "at": "." + } + }, + { + "run": { + "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", + "name": "Install sandbox dependencies" + } + }, + "start-event-collector", + { + "run": { + "command": "yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit", + "environment": { + "STORYBOOK_TELEMETRY_DEBUG": 1, + "STORYBOOK_TELEMETRY_URL": "http://localhost:6007/event-log" + }, + "name": "Running story tests in Vitest" + } + }, + { + "run": { + "command": "yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)", + "name": "Check Telemetry" + } + }, + { + "report-workflow-on-failure": { + "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)" + } + }, + { + "store_test_results": { + "path": "test-results" + } + } + ] + } + }, + "orbs": { + "browser-tools": "circleci/browser-tools@1.4.1", + "codecov": "codecov/codecov@3.2.4", + "discord": "antonioned/discord@0.1.0", + "git-shallow-clone": "guitarrapc/git-shallow-clone@2.5.0", + "node": "circleci/node@5.2.0", + "nx": "nrwl/nx@1.6.2", + "win": "circleci/windows@5.0.0" + }, + "parameters": { + "ghBaseBranch": { + "default": "next", + "description": "The name of the base branch (the target of the PR)", + "type": "string" + }, + "ghPrNumber": { + "default": "", + "description": "The PR number", + "type": "string" + }, + "workflow": { + "default": "skipped", + "description": "Which workflow to run", + "enum": [ + "normal", + "merged", + "daily", + "skipped", + "docs" + ], + "type": "enum" + } + }, + "version": 2.1, + "workflows": { + "daily": { + "jobs": [ + "pretty-docs", + "build", + { + "lint": { + "requires": [ + "build" + ] + } + }, + { + "knip": { + "requires": [ + "build" + ] + } + }, + { + "bench-packages": { + "requires": [ + "build" + ] + } + }, + "check", + { + "unit-tests": { + "requires": [ + "build" + ] + } + }, + { + "stories-tests": { + "requires": [ + "build" + ] + } + }, + { + "script-checks": { + "requires": [ + "build" + ] + } + }, + { + "chromatic-internal-storybook": { + "requires": [ + "build" + ] + } + }, + { + "create-sandboxes": { + "parallelism": 38, + "requires": [ + "build" + ] + } + }, + { + "check-sandboxes": { + "parallelism": 1, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "chromatic-sandboxes": { + "parallelism": 35, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "e2e-production": { + "parallelism": 7, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "e2e-dev": { + "parallelism": 28, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "test-runner-production": { + "parallelism": 33, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "vitest-integration": { + "parallelism": 13, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "test-portable-stories": { + "matrix": { + "parameters": { + "directory": [ + "react", + "vue3", + "nextjs", + "svelte" + ] + } + }, + "requires": [ + "build" + ] + } + }, + { + "test-yarn-pnp": { + "requires": [ + "build" + ] + } + }, + { + "e2e-ui": { + "requires": [ + "build" + ] + } + }, + { + "e2e-ui-vitest-3": { + "requires": [ + "build" + ] + } + }, + { + "test-init-features": { + "requires": [ + "build" + ] + } + }, + { + "test-init-empty": { + "matrix": { + "parameters": { + "packageManager": [ + "npm" + ], + "template": [ + "react-vite-ts", + "nextjs-ts", + "vue-vite-ts", + "lit-vite-ts" + ] + } + }, + "requires": [ + "build" + ] + } + }, + { + "test-init-empty-windows": { + "matrix": { + "parameters": { + "packageManager": [ + "npm" + ], + "template": [ + "react-vite-ts", + "nextjs-ts", + "vue-vite-ts", + "lit-vite-ts" + ] + } + }, + "requires": [ + "build" + ] + } + } + ], + "when": { + "equal": [ + "daily", + "<< pipeline.parameters.workflow >>" + ] + } + }, + "docs": { + "jobs": [ + "pretty-docs" + ], + "when": { + "equal": [ + "docs", + "<< pipeline.parameters.workflow >>" + ] + } + }, + "merged": { + "jobs": [ + "pretty-docs", + "build", + { + "lint": { + "requires": [ + "build" + ] + } + }, + { + "knip": { + "requires": [ + "build" + ] + } + }, + { + "bench-packages": { + "requires": [ + "build" + ] + } + }, + "check", + { + "unit-tests": { + "requires": [ + "build" + ] + } + }, + { + "stories-tests": { + "requires": [ + "build" + ] + } + }, + { + "script-checks": { + "requires": [ + "build" + ] + } + }, + { + "chromatic-internal-storybook": { + "requires": [ + "build" + ] + } + }, + { + "coverage": { + "requires": [ + "unit-tests" + ] + } + }, + { + "create-sandboxes": { + "parallelism": 21, + "requires": [ + "build" + ] + } + }, + { + "chromatic-sandboxes": { + "parallelism": 18, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "e2e-production": { + "parallelism": 6, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "e2e-dev": { + "parallelism": 14, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "test-runner-production": { + "parallelism": 16, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "vitest-integration": { + "parallelism": 7, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "check-sandboxes": { + "parallelism": 1, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "test-portable-stories": { + "matrix": { + "parameters": { + "directory": [ + "react", + "vue3", + "nextjs", + "svelte" + ] + } + }, + "requires": [ + "build" + ] + } + }, + { + "test-yarn-pnp": { + "requires": [ + "build" + ] + } + }, + { + "e2e-ui": { + "requires": [ + "build" + ] + } + }, + { + "e2e-ui-vitest-3": { + "requires": [ + "build" + ] + } + }, + { + "test-init-features": { + "requires": [ + "build" + ] + } + }, + { + "test-init-empty-windows": { + "matrix": { + "parameters": { + "packageManager": [ + "npm" + ], + "template": [ + "react-vite-ts", + "nextjs-ts", + "vue-vite-ts", + "lit-vite-ts" + ] + } + }, + "requires": [ + "build" + ] + } + } + ], + "when": { + "equal": [ + "merged", + "<< pipeline.parameters.workflow >>" + ] + } + }, + "normal": { + "jobs": [ + "pretty-docs", + "build", + { + "lint": { + "requires": [ + "build" + ] + } + }, + { + "knip": { + "requires": [ + "build" + ] + } + }, + { + "bench-packages": { + "requires": [ + "build" + ] + } + }, + "check", + { + "unit-tests": { + "requires": [ + "build" + ] + } + }, + { + "stories-tests": { + "requires": [ + "build" + ] + } + }, + { + "script-checks": { + "requires": [ + "build" + ] + } + }, + { + "chromatic-internal-storybook": { + "requires": [ + "build" + ] + } + }, + { + "coverage": { + "requires": [ + "unit-tests" + ] + } + }, + { + "create-sandboxes": { + "parallelism": 14, + "requires": [ + "build" + ] + } + }, + { + "chromatic-sandboxes": { + "parallelism": 11, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "e2e-production": { + "parallelism": 6, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "e2e-dev": { + "parallelism": 8, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "test-runner-production": { + "parallelism": 9, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "vitest-integration": { + "parallelism": 5, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "check-sandboxes": { + "parallelism": 1, + "requires": [ + "create-sandboxes" + ] + } + }, + { + "test-yarn-pnp": { + "requires": [ + "build" + ] + } + }, + { + "e2e-ui": { + "requires": [ + "build" + ] + } + }, + { + "e2e-ui-vitest-3": { + "requires": [ + "build" + ] + } + }, + { + "test-init-features": { + "requires": [ + "build" + ] + } + }, + { + "test-portable-stories": { + "matrix": { + "parameters": { + "directory": [ + "react", + "vue3", + "nextjs", + "svelte" + ] + } + }, + "requires": [ + "build" + ] + } + } + ], + "when": { + "equal": [ + "normal", + "<< pipeline.parameters.workflow >>" + ] + } + } + } +} \ No newline at end of file diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 2cc4eda78dc1..7d252e53e551 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -3,12 +3,12 @@ commands: description: Cancels the entire workflow in case the previous step has failed steps: - run: - command: | - echo "Canceling workflow as previous step resulted in failure." - echo "To execute all checks locally, please run yarn ci-tests" - curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" - name: Cancel current workflow - when: on_fail + command: | + echo "Canceling workflow as previous step resulted in failure." + echo "To execute all checks locally, please run yarn ci-tests" + curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" + name: Cancel current workflow + when: on_fail report-workflow-on-failure: description: Reports failures to discord parameters: @@ -19,25 +19,25 @@ commands: type: string steps: - run: - command: git fetch --unshallow - when: on_fail + command: git fetch --unshallow + when: on_fail - discord/status: - fail_only: true - failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) - only_for_branches: main,next,next-release,latest-release + fail_only: true + failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) + only_for_branches: main,next,next-release,latest-release start-event-collector: description: Starts the event collector steps: - run: - background: true - command: yarn jiti ./event-log-collector.ts - name: Start Event Collector - working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts + name: Start Event Collector + working_directory: scripts executors: sb_node_18_browsers: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: cimg/node:18.20.3-browsers parameters: class: @@ -55,7 +55,7 @@ executors: sb_node_22_browsers: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: cimg/node:22.15.0-browsers parameters: class: @@ -73,7 +73,7 @@ executors: sb_node_22_classic: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: cimg/node:22.15.0 parameters: class: @@ -91,7 +91,7 @@ executors: sb_playwright: docker: - environment: - NODE_OPTIONS: --max_old_space_size=6144 + NODE_OPTIONS: --max_old_space_size=6144 image: mcr.microsoft.com/playwright:v1.52.0-noble parameters: class: @@ -113,55 +113,55 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - when: - condition: - and: - - << pipeline.parameters.ghBaseBranch >> - - << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - name: Benchmarking packages against base branch - working_directory: scripts + condition: + and: + - << pipeline.parameters.ghBaseBranch >> + - << pipeline.parameters.ghPrNumber >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload + name: Benchmarking packages against base branch + working_directory: scripts - when: - condition: - or: - - not: << pipeline.parameters.ghBaseBranch >> - - not: << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --upload - name: Uploading package benchmarks for branch - working_directory: scripts + condition: + or: + - not: << pipeline.parameters.ghBaseBranch >> + - not: << pipeline.parameters.ghPrNumber >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: yarn bench-packages --upload + name: Uploading package benchmarks for branch + working_directory: scripts - store_artifacts: - path: bench/packages/results.json + path: bench/packages/results.json - report-workflow-on-failure - cancel-workflow-on-failure bench-sandboxes: @@ -174,93 +174,93 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + 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 - name: Running Bench + command: yarn task --task bench --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) --no-link --start-from=never --junit + name: Running Bench - run: - command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> - name: Uploading results + command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> + name: Uploading results - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) build: executor: class: large name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache + keys: + - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - git diff --exit-code - yarn dedupe --check - name: Compile + command: | + yarn task --task compile --start-from=auto --no-link --debug + git diff --exit-code + yarn dedupe --check + name: Compile - run: - command: | - cd code - yarn local-registry --publish - name: Publish to Verdaccio + command: | + cd code + yarn local-registry --publish + name: Publish to Verdaccio - report-workflow-on-failure - store_artifacts: - path: code/bench/esbuild-metafiles + path: code/bench/esbuild-metafiles - save_cache: - key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache + key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Save Yarn cache + paths: + - ~/.yarn/berry/cache - persist_to_workspace: - paths: - - code/node_modules - - code/addons - - scripts/node_modules - - code/bench - - code/examples - - code/frameworks - - code/lib - - code/core - - code/builders - - code/renderers - - code/presets - - .verdaccio-cache - root: . + paths: + - code/node_modules + - code/addons + - scripts/node_modules + - code/bench + - code/examples + - code/frameworks + - code/lib + - code/core + - code/builders + - code/renderers + - code/presets + - .verdaccio-cache + root: . check: executor: class: large name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - nx/set-shas: - main-branch-name: next - workflow-name: << pipeline.parameters.workflow >> + main-branch-name: next + workflow-name: << pipeline.parameters.workflow >> - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache + keys: + - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - name: Compile + command: | + yarn task --task compile --start-from=auto --no-link --debug + name: Compile - run: - command: | - yarn task --task check --start-from=auto --no-link --debug - name: Check + command: | + yarn task --task check --start-from=auto --no-link --debug + name: Check - run: - command: | - git diff --exit-code - name: Ensure no changes pending + command: | + git diff --exit-code + name: Ensure no changes pending - report-workflow-on-failure - cancel-workflow-on-failure check-sandboxes: @@ -273,21 +273,21 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + 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 - 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 + name: Type check Sandboxes - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - store_test_results: - path: test-results + path: test-results chromatic-internal-storybook: environment: NODE_OPTIONS: --max_old_space_size=4096 @@ -297,14 +297,14 @@ jobs: steps: - checkout - attach_workspace: - at: . + at: . - run: - command: yarn storybook:ui:chromatic - name: Running Chromatic - working_directory: code + command: yarn storybook:ui:chromatic + name: Running Chromatic + working_directory: code - report-workflow-on-failure - store_test_results: - path: test-results + path: test-results chromatic-sandboxes: executor: class: medium @@ -316,28 +316,28 @@ jobs: steps: - checkout - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + 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 - name: Running Chromatic + command: 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) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - store_test_results: - path: test-results + path: test-results coverage: executor: class: small name: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - codecov/upload - report-workflow-on-failure create-sandboxes: @@ -350,39 +350,39 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - # Enable corepack - sudo corepack enable + command: | + # Enable corepack + sudo corepack enable - # Verify yarn is working - which yarn - yarn --version - name: Setup Corepack + # Verify yarn is working + which yarn + yarn --version + name: Setup Corepack - start-event-collector - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit - 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 - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Create Sandboxes + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) + yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit + 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 + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Create Sandboxes - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - persist_to_workspace: - paths: - - sandbox/** - root: . + paths: + - sandbox/** + root: . - store_test_results: - path: test-results + path: test-results e2e-dev: executor: class: medium+ @@ -393,26 +393,26 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests + command: | + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + name: Running E2E Tests - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: code/playwright-results/ + destination: playwright + path: code/playwright-results/ e2e-production: executor: class: medium @@ -423,50 +423,50 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests + command: | + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + name: Running E2E Tests - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: code/playwright-results/ + destination: playwright + path: code/playwright-results/ e2e-ui: executor: class: medium name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn playwright-e2e + name: Run E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react/test-results/ + destination: playwright + path: test-storybooks/portable-stories-kitchen-sink/react/test-results/ - report-workflow-on-failure e2e-ui-vitest-3: executor: @@ -474,24 +474,24 @@ jobs: name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + command: yarn playwright-e2e + name: Run E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - store_test_results: - path: test-results + path: test-results - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ + destination: playwright + path: test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ - report-workflow-on-failure knip: executor: @@ -499,14 +499,14 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - yarn knip --no-exit-code - name: Knip + command: | + cd code + yarn knip --no-exit-code + name: Knip - report-workflow-on-failure - cancel-workflow-on-failure lint: @@ -515,14 +515,14 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - yarn lint - name: Lint + command: | + cd code + yarn lint + name: Lint - report-workflow-on-failure - cancel-workflow-on-failure pretty-docs: @@ -531,50 +531,50 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - restore_cache: - keys: - - prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache + keys: + - prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache - run: - command: | - cd scripts - yarn install - name: Install + command: | + cd scripts + yarn install + name: Install - save_cache: - key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache + key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Save Yarn cache + paths: + - ~/.yarn/berry/cache - run: - command: | - cd scripts - yarn docs:prettier:check - name: Prettier + command: | + cd scripts + yarn docs:prettier:check + name: Prettier script-checks: executor: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd scripts - yarn get-template --check - name: Check parallelism count + command: | + cd scripts + yarn get-template --check + name: Check parallelism count - run: - command: | - cd scripts - yarn check - name: Type check + command: | + cd scripts + yarn check + name: Type check - run: - command: | - cd scripts - yarn test --coverage - name: Run tests + command: | + cd scripts + yarn test --coverage + name: Run tests - store_test_results: - path: scripts/junit.xml + path: scripts/junit.xml - report-workflow-on-failure - cancel-workflow-on-failure smoke-test-sandboxes: @@ -587,16 +587,16 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit - name: Smoke Testing Sandboxes + command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit + name: Smoke Testing Sandboxes - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) - store_test_results: - path: test-results + path: test-results stories-tests: executor: class: xlarge @@ -604,17 +604,17 @@ jobs: parallelism: 2 steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests + command: | + cd code + TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + name: Run tests - store_test_results: - path: test-results + path: test-results - report-workflow-on-failure - cancel-workflow-on-failure test-init-empty: @@ -628,135 +628,135 @@ jobs: type: string steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - when: - condition: - equal: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (NPM) + condition: + equal: + - npm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + npm run storybook -- --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (NPM) - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Yarn 2) + condition: + equal: + - yarn2 + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + yarn set version berry + yarn config set registry http://localhost:6001 + yarn dlx storybook init --yes --package-manager yarn2 + yarn storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Yarn 2) - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (PNPM) + condition: + equal: + - pnpm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm i -g pnpm + pnpm config set registry http://localhost:6001 + pnpm dlx storybook init --yes --package-manager pnpm + pnpm run storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (PNPM) - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (--skip-install) + condition: + equal: + - react-vite-ts + - << parameters.template >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >>-no-install + cd empty-<< parameters.template >>-no-install + npx storybook init --yes --skip-install + npm install + npm run build-storybook + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (--skip-install) - report-workflow-on-failure test-init-empty-windows: executor: win/default @@ -768,195 +768,195 @@ jobs: steps: - checkout - attach_workspace: - at: . + at: . - run: - command: | - choco install nodejs-lts --version=22.11.0 -y - corepack enable - name: Setup Node & Yarn on Windows - shell: bash.exe + command: | + choco install nodejs-lts --version=22.11.0 -y + corepack enable + name: Setup Node & Yarn on Windows + shell: bash.exe - run: - command: yarn install - name: Install code dependencies - shell: bash.exe - working_directory: code + 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 + command: yarn install + name: Install script dependencies + shell: bash.exe + working_directory: scripts - when: - condition: - equal: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows NPM) - shell: bash.exe + condition: + equal: + - npm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + npm run storybook -- --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows NPM) + shell: bash.exe - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows Yarn 2) - shell: bash.exe + condition: + equal: + - yarn2 + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + yarn set version berry + yarn config set registry http://localhost:6001 + yarn dlx storybook init --yes --package-manager yarn2 + yarn storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows Yarn 2) + shell: bash.exe - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows PNPM) - shell: bash.exe + condition: + equal: + - pnpm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm i -g pnpm + pnpm config set registry http://localhost:6001 + pnpm dlx storybook init --yes --package-manager pnpm + pnpm run storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows PNPM) + shell: bash.exe - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows --skip-install) - shell: bash.exe + condition: + equal: + - react-vite-ts + - << parameters.template >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >>-no-install + cd empty-<< parameters.template >>-no-install + npx storybook init --yes --skip-install + npm install + npm run build-storybook + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows --skip-install) + shell: bash.exe test-init-features: executor: class: small name: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio - run: - command: | - cd .. - mkdir features-1 - cd features-1 - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug - npx vitest - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - name: Storybook init for features + command: | + cd .. + mkdir features-1 + cd features-1 + npm set registry http://localhost:6001 + npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug + npx vitest + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + name: Storybook init for features test-portable-stories: executor: class: medium @@ -966,31 +966,31 @@ jobs: type: string steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn jest - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn jest + name: Run Jest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn vitest - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn vitest + name: Run Vitest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn playwright-ct - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn playwright-ct + name: Run Playwright CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - run: - command: yarn cypress - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + command: yarn cypress + name: Run Cypress CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - report-workflow-on-failure test-runner-dev: executor: @@ -1002,16 +1002,16 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit - name: Running Test Runner in Dev mode + command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit + name: Running Test Runner in Dev mode - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) - store_test_results: - path: test-results + path: test-results test-runner-production: executor: class: medium+ @@ -1022,47 +1022,47 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - start-event-collector - run: - command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running Test Runner + command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Running Test Runner - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - name: Check Telemetry + command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) + name: Check Telemetry - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - store_test_results: - path: test-results + path: test-results test-yarn-pnp: executor: class: medium name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/yarn-pnp + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/yarn-pnp - run: - command: yarn storybook --smoke-test - name: Run Storybook smoke test - working_directory: test-storybooks/yarn-pnp + command: yarn storybook --smoke-test + name: Run Storybook smoke test + working_directory: test-storybooks/yarn-pnp - report-workflow-on-failure unit-tests: executor: @@ -1071,17 +1071,17 @@ jobs: parallelism: 2 steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests + command: | + cd code + TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + name: Run tests - store_test_results: - path: test-results + path: test-results - report-workflow-on-failure - cancel-workflow-on-failure vitest-integration: @@ -1094,28 +1094,28 @@ jobs: type: integer steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 --verbose - attach_workspace: - at: . + at: . - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 + name: Install sandbox dependencies - start-event-collector - run: - command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running story tests in Vitest + command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Running story tests in Vitest - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - name: Check Telemetry + command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) + name: Check Telemetry - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - store_test_results: - path: test-results + path: test-results orbs: browser-tools: circleci/browser-tools@1.4.1 codecov: codecov/codecov@3.2.4 @@ -1150,101 +1150,101 @@ workflows: - pretty-docs - build - lint: - requires: - - build + requires: + - build - knip: - requires: - - build + requires: + - build - bench-packages: - requires: - - build + requires: + - build - check - unit-tests: - requires: - - build + requires: + - build - stories-tests: - requires: - - build + requires: + - build - script-checks: - requires: - - build + requires: + - build - chromatic-internal-storybook: - requires: - - build + requires: + - build - create-sandboxes: - parallelism: 38 - requires: - - build + parallelism: 38 + requires: + - build - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes + parallelism: 1 + requires: + - create-sandboxes - chromatic-sandboxes: - parallelism: 35 - requires: - - create-sandboxes + parallelism: 35 + requires: + - create-sandboxes - e2e-production: - parallelism: 7 - requires: - - create-sandboxes + parallelism: 7 + requires: + - create-sandboxes - e2e-dev: - parallelism: 28 - requires: - - create-sandboxes + parallelism: 28 + requires: + - create-sandboxes - test-runner-production: - parallelism: 33 - requires: - - create-sandboxes + parallelism: 33 + requires: + - create-sandboxes - vitest-integration: - parallelism: 13 - requires: - - create-sandboxes + parallelism: 13 + requires: + - create-sandboxes - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build - test-yarn-pnp: - requires: - - build + requires: + - build - e2e-ui: - requires: - - build + requires: + - build - e2e-ui-vitest-3: - requires: - - build + requires: + - build - test-init-features: - requires: - - build + requires: + - build - test-init-empty: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build - test-init-empty-windows: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build when: equal: - daily @@ -1261,92 +1261,92 @@ workflows: - pretty-docs - build - lint: - requires: - - build + requires: + - build - knip: - requires: - - build + requires: + - build - bench-packages: - requires: - - build + requires: + - build - check - unit-tests: - requires: - - build + requires: + - build - stories-tests: - requires: - - build + requires: + - build - script-checks: - requires: - - build + requires: + - build - chromatic-internal-storybook: - requires: - - build + requires: + - build - coverage: - requires: - - unit-tests + requires: + - unit-tests - create-sandboxes: - parallelism: 21 - requires: - - build + parallelism: 21 + requires: + - build - chromatic-sandboxes: - parallelism: 18 - requires: - - create-sandboxes + parallelism: 18 + requires: + - create-sandboxes - e2e-production: - parallelism: 6 - requires: - - create-sandboxes + parallelism: 6 + requires: + - create-sandboxes - e2e-dev: - parallelism: 14 - requires: - - create-sandboxes + parallelism: 14 + requires: + - create-sandboxes - test-runner-production: - parallelism: 16 - requires: - - create-sandboxes + parallelism: 16 + requires: + - create-sandboxes - vitest-integration: - parallelism: 7 - requires: - - create-sandboxes + parallelism: 7 + requires: + - create-sandboxes - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes + parallelism: 1 + requires: + - create-sandboxes - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build - test-yarn-pnp: - requires: - - build + requires: + - build - e2e-ui: - requires: - - build + requires: + - build - e2e-ui-vitest-3: - requires: - - build + requires: + - build - test-init-features: - requires: - - build + requires: + - build - test-init-empty-windows: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build when: equal: - merged @@ -1356,82 +1356,81 @@ workflows: - pretty-docs - build - lint: - requires: - - build + requires: + - build - knip: - requires: - - build + requires: + - build - bench-packages: - requires: - - build + requires: + - build - check - unit-tests: - requires: - - build + requires: + - build - stories-tests: - requires: - - build + requires: + - build - script-checks: - requires: - - build + requires: + - build - chromatic-internal-storybook: - requires: - - build + requires: + - build - coverage: - requires: - - unit-tests + requires: + - unit-tests - create-sandboxes: - parallelism: 14 - requires: - - build + parallelism: 14 + requires: + - build - chromatic-sandboxes: - parallelism: 11 - requires: - - create-sandboxes + parallelism: 11 + requires: + - create-sandboxes - e2e-production: - parallelism: 6 - requires: - - create-sandboxes + parallelism: 6 + requires: + - create-sandboxes - e2e-dev: - parallelism: 8 - requires: - - create-sandboxes + parallelism: 8 + requires: + - create-sandboxes - test-runner-production: - parallelism: 9 - requires: - - create-sandboxes + parallelism: 9 + requires: + - create-sandboxes - vitest-integration: - parallelism: 5 - requires: - - create-sandboxes + parallelism: 5 + requires: + - create-sandboxes - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes + parallelism: 1 + requires: + - create-sandboxes - test-yarn-pnp: - requires: - - build + requires: + - build - e2e-ui: - requires: - - build + requires: + - build - e2e-ui-vitest-3: - requires: - - build + requires: + - build - test-init-features: - requires: - - build + requires: + - build - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build when: equal: - normal - << pipeline.parameters.workflow >> - diff --git a/.circleci/config.original.yml b/.circleci/config.original.yml new file mode 100644 index 000000000000..5419d3532a68 --- /dev/null +++ b/.circleci/config.original.yml @@ -0,0 +1,1436 @@ +commands: + cancel-workflow-on-failure: + description: Cancels the entire workflow in case the previous step has failed + steps: + - run: + command: | + echo "Canceling workflow as previous step resulted in failure." + echo "To execute all checks locally, please run yarn ci-tests" + curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" + name: Cancel current workflow + when: on_fail + report-workflow-on-failure: + description: Reports failures to discord + parameters: + template: + default: none + description: | + Which template to report in discord. Applicable for parallel sandbox jobs + type: string + steps: + - run: + command: git fetch --unshallow + when: on_fail + - discord/status: + fail_only: true + failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) + only_for_branches: main,next,next-release,latest-release + start-event-collector: + description: Starts the event collector + steps: + - run: + background: true + command: yarn jiti ./event-log-collector.ts + name: Start Event Collector + working_directory: scripts +executors: + sb_node_18_browsers: + docker: + - environment: + NODE_OPTIONS: --max_old_space_size=6144 + image: cimg/node:18.20.3-browsers + parameters: + class: + default: small + description: The Resource class + enum: + - small + - medium + - medium+ + - large + - xlarge + type: enum + resource_class: <> + working_directory: /tmp/storybook + sb_node_22_browsers: + docker: + - environment: + NODE_OPTIONS: --max_old_space_size=6144 + image: cimg/node:22.15.0-browsers + parameters: + class: + default: small + description: The Resource class + enum: + - small + - medium + - medium+ + - large + - xlarge + type: enum + resource_class: <> + working_directory: /tmp/storybook + sb_node_22_classic: + docker: + - environment: + NODE_OPTIONS: --max_old_space_size=6144 + image: cimg/node:22.15.0 + parameters: + class: + default: small + description: The Resource class + enum: + - small + - medium + - medium+ + - large + - xlarge + type: enum + resource_class: <> + working_directory: /tmp/storybook + sb_playwright: + docker: + - environment: + NODE_OPTIONS: --max_old_space_size=6144 + image: mcr.microsoft.com/playwright:v1.52.0-noble + parameters: + class: + default: small + description: The Resource class + enum: + - small + - medium + - medium+ + - large + - xlarge + type: enum + resource_class: <> + working_directory: /tmp/storybook +jobs: + bench-packages: + executor: + class: small + name: sb_node_22_classic + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - when: + condition: + and: + - << pipeline.parameters.ghBaseBranch >> + - << pipeline.parameters.ghPrNumber >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload + name: Benchmarking packages against base branch + working_directory: scripts + - when: + condition: + or: + - not: << pipeline.parameters.ghBaseBranch >> + - not: << pipeline.parameters.ghPrNumber >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: yarn bench-packages --upload + name: Uploading package benchmarks for branch + working_directory: scripts + - store_artifacts: + path: bench/packages/results.json + - report-workflow-on-failure + - cancel-workflow-on-failure + bench-sandboxes: + executor: + class: small + name: sb_playwright + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + 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 + name: Running Bench + - run: + command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> + name: Uploading results + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) + build: + executor: + class: large + name: sb_node_22_classic + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - restore_cache: + keys: + - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache + - run: + command: | + yarn task --task compile --start-from=auto --no-link --debug + git diff --exit-code + yarn dedupe --check + name: Compile + - run: + command: | + cd code + yarn local-registry --publish + name: Publish to Verdaccio + - report-workflow-on-failure + - store_artifacts: + path: code/bench/esbuild-metafiles + - save_cache: + key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Save Yarn cache + paths: + - ~/.yarn/berry/cache + - persist_to_workspace: + paths: + - code/node_modules + - code/addons + - scripts/node_modules + - code/bench + - code/examples + - code/frameworks + - code/lib + - code/core + - code/builders + - code/renderers + - code/presets + - .verdaccio-cache + root: . + check: + executor: + class: large + name: sb_node_22_classic + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - nx/set-shas: + main-branch-name: next + workflow-name: << pipeline.parameters.workflow >> + - restore_cache: + keys: + - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Restore Yarn cache + - run: + command: | + yarn task --task compile --start-from=auto --no-link --debug + name: Compile + - run: + command: | + yarn task --task check --start-from=auto --no-link --debug + name: Check + - run: + command: | + git diff --exit-code + name: Ensure no changes pending + - report-workflow-on-failure + - cancel-workflow-on-failure + check-sandboxes: + executor: + class: medium + name: sb_node_22_classic + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + 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 + name: Type check Sandboxes + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) + - store_test_results: + path: test-results + chromatic-internal-storybook: + environment: + NODE_OPTIONS: --max_old_space_size=4096 + executor: + class: large + name: sb_node_22_browsers + steps: + - checkout + - attach_workspace: + at: . + - run: + command: yarn storybook:ui:chromatic + name: Running Chromatic + working_directory: code + - report-workflow-on-failure + - store_test_results: + path: test-results + chromatic-sandboxes: + executor: + class: medium + name: sb_node_22_browsers + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - checkout + - attach_workspace: + at: . + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + 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 + name: Running Chromatic + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) + - store_test_results: + path: test-results + coverage: + executor: + class: small + name: sb_node_22_browsers + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - codecov/upload + - report-workflow-on-failure + create-sandboxes: + executor: + class: large + name: sb_node_22_browsers + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + # Enable corepack + sudo corepack enable + + # Verify yarn is working + which yarn + yarn --version + name: Setup Corepack + - start-event-collector + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) + yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit + 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 + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Create Sandboxes + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) + - persist_to_workspace: + paths: + - sandbox/** + root: . + - store_test_results: + path: test-results + e2e-dev: + executor: + class: medium+ + name: sb_playwright + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + name: Install sandbox dependencies + - run: + command: | + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + name: Running E2E Tests + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) + - store_test_results: + path: test-results + - store_artifacts: + destination: playwright + path: code/playwright-results/ + e2e-production: + executor: + class: medium + name: sb_playwright + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + name: Install sandbox dependencies + - run: + command: | + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + name: Running E2E Tests + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) + - store_test_results: + path: test-results + - store_artifacts: + destination: playwright + path: code/playwright-results/ + e2e-ui: + executor: + class: medium + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react + - run: + command: yarn playwright-e2e + name: Run E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react + - store_test_results: + path: test-results + - store_artifacts: + destination: playwright + path: test-storybooks/portable-stories-kitchen-sink/react/test-results/ + - report-workflow-on-failure + e2e-ui-vitest-3: + executor: + class: medium + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + - run: + command: yarn playwright-e2e + name: Run E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + - store_test_results: + path: test-results + - store_artifacts: + destination: playwright + path: test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ + - report-workflow-on-failure + knip: + executor: + class: large + name: sb_node_22_classic + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + cd code + yarn knip --no-exit-code + name: Knip + - report-workflow-on-failure + - cancel-workflow-on-failure + lint: + executor: + class: medium+ + name: sb_node_22_classic + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + cd code + yarn lint + name: Lint + - report-workflow-on-failure + - cancel-workflow-on-failure + pretty-docs: + executor: + 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" }} + name: Restore Yarn cache + - run: + command: | + cd scripts + yarn install + name: Install + - save_cache: + key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + name: Save Yarn cache + paths: + - ~/.yarn/berry/cache + - run: + command: | + cd scripts + yarn docs:prettier:check + name: Prettier + script-checks: + executor: sb_node_22_browsers + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + cd scripts + yarn get-template --check + name: Check parallelism count + - run: + command: | + cd scripts + yarn check + name: Type check + - run: + command: | + cd scripts + yarn test --coverage + name: Run tests + - store_test_results: + path: scripts/junit.xml + - report-workflow-on-failure + - cancel-workflow-on-failure + smoke-test-sandboxes: + executor: + class: medium + name: sb_node_18_browsers + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit + name: Smoke Testing Sandboxes + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) + - store_test_results: + path: test-results + stories-tests: + executor: + class: xlarge + name: sb_playwright + parallelism: 2 + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + cd code + TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + name: Run tests + - store_test_results: + path: test-results + - report-workflow-on-failure + - cancel-workflow-on-failure + test-init-empty: + executor: + class: small + name: sb_node_22_browsers + parameters: + packageManager: + type: string + template: + type: string + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - when: + condition: + equal: + - npm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + npm run storybook -- --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (NPM) + - when: + condition: + equal: + - yarn2 + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + yarn set version berry + yarn config set registry http://localhost:6001 + yarn dlx storybook init --yes --package-manager yarn2 + yarn storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Yarn 2) + - when: + condition: + equal: + - pnpm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm i -g pnpm + pnpm config set registry http://localhost:6001 + pnpm dlx storybook init --yes --package-manager pnpm + pnpm run storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (PNPM) + - when: + condition: + equal: + - react-vite-ts + - << parameters.template >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir empty-<< parameters.template >>-no-install + cd empty-<< parameters.template >>-no-install + npx storybook init --yes --skip-install + npm install + npm run build-storybook + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (--skip-install) + - report-workflow-on-failure + test-init-empty-windows: + executor: win/default + parameters: + packageManager: + type: string + template: + type: string + steps: + - checkout + - attach_workspace: + at: . + - run: + command: | + choco install nodejs-lts --version=22.11.0 -y + corepack enable + name: Setup Node & Yarn on Windows + shell: bash.exe + - run: + 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: + - npm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + npm run storybook -- --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows NPM) + shell: bash.exe + - when: + condition: + equal: + - yarn2 + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + yarn set version berry + yarn config set registry http://localhost:6001 + yarn dlx storybook init --yes --package-manager yarn2 + yarn storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows Yarn 2) + shell: bash.exe + - when: + condition: + equal: + - pnpm + - << parameters.packageManager >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >> + cd empty-<< parameters.template >> + npm i -g pnpm + pnpm config set registry http://localhost:6001 + pnpm dlx storybook init --yes --package-manager pnpm + pnpm run storybook --smoke-test + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows PNPM) + shell: bash.exe + - when: + condition: + equal: + - react-vite-ts + - << parameters.template >> + steps: + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + shell: bash.exe + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + shell: bash.exe + - run: + command: | + cd .. + mkdir empty-<< parameters.template >>-no-install + cd empty-<< parameters.template >>-no-install + npx storybook init --yes --skip-install + npm install + npm run build-storybook + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> + name: Storybook init from empty directory (Windows --skip-install) + shell: bash.exe + test-init-features: + executor: + class: small + name: sb_node_22_browsers + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + background: true + command: | + cd code + yarn local-registry --open + name: Verdaccio + - run: + command: | + cd code + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + - run: + command: | + cd .. + mkdir features-1 + cd features-1 + npm set registry http://localhost:6001 + npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug + npx vitest + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + name: Storybook init for features + test-portable-stories: + executor: + class: medium + name: sb_playwright + parameters: + directory: + type: string + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + - run: + command: yarn jest + name: Run Jest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + - run: + command: yarn vitest + name: Run Vitest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + - run: + command: yarn playwright-ct + name: Run Playwright CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + - run: + command: yarn cypress + name: Run Cypress CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> + - report-workflow-on-failure + test-runner-dev: + executor: + class: large + name: sb_playwright + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit + name: Running Test Runner in Dev mode + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) + - store_test_results: + path: test-results + test-runner-production: + executor: + class: medium+ + name: sb_playwright + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + name: Install sandbox dependencies + - start-event-collector + - run: + command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Running Test Runner + - run: + command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) + name: Check Telemetry + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) + - store_test_results: + path: test-results + test-yarn-pnp: + executor: + class: medium + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + name: Install dependencies + working_directory: test-storybooks/yarn-pnp + - run: + command: yarn storybook --smoke-test + name: Run Storybook smoke test + working_directory: test-storybooks/yarn-pnp + - report-workflow-on-failure + unit-tests: + executor: + class: xlarge + name: sb_playwright + parallelism: 2 + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + cd code + TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + name: Run tests + - store_test_results: + path: test-results + - report-workflow-on-failure + - cancel-workflow-on-failure + vitest-integration: + executor: + class: xlarge + name: sb_playwright + parallelism: << parameters.parallelism >> + parameters: + parallelism: + type: integer + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: | + TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) + cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn + name: Install sandbox dependencies + - start-event-collector + - run: + command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Running story tests in Vitest + - run: + command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) + name: Check Telemetry + - report-workflow-on-failure: + template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) + - store_test_results: + path: test-results +orbs: + browser-tools: circleci/browser-tools@1.4.1 + codecov: codecov/codecov@3.2.4 + discord: antonioned/discord@0.1.0 + git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 + node: circleci/node@5.2.0 + nx: nrwl/nx@1.6.2 + win: circleci/windows@5.0.0 +parameters: + ghBaseBranch: + default: next + description: The name of the base branch (the target of the PR) + type: string + ghPrNumber: + default: "" + description: The PR number + type: string + workflow: + default: skipped + description: Which workflow to run + enum: + - normal + - merged + - daily + - skipped + - docs + type: enum +version: 2.1 +workflows: + daily: + jobs: + - pretty-docs + - build + - lint: + requires: + - build + - knip: + requires: + - build + - bench-packages: + requires: + - build + - check + - unit-tests: + requires: + - build + - stories-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybook: + requires: + - build + - create-sandboxes: + parallelism: 38 + requires: + - build + - check-sandboxes: + parallelism: 1 + requires: + - create-sandboxes + - chromatic-sandboxes: + parallelism: 35 + requires: + - create-sandboxes + - e2e-production: + parallelism: 7 + requires: + - create-sandboxes + - e2e-dev: + parallelism: 28 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 33 + requires: + - create-sandboxes + - vitest-integration: + parallelism: 13 + requires: + - create-sandboxes + - test-portable-stories: + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build + - test-yarn-pnp: + requires: + - build + - e2e-ui: + requires: + - build + - e2e-ui-vitest-3: + requires: + - build + - test-init-features: + requires: + - build + - test-init-empty: + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build + - test-init-empty-windows: + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build + when: + equal: + - daily + - << pipeline.parameters.workflow >> + docs: + jobs: + - pretty-docs + when: + equal: + - docs + - << pipeline.parameters.workflow >> + merged: + jobs: + - pretty-docs + - build + - lint: + requires: + - build + - knip: + requires: + - build + - bench-packages: + requires: + - build + - check + - unit-tests: + requires: + - build + - stories-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybook: + requires: + - build + - coverage: + requires: + - unit-tests + - create-sandboxes: + parallelism: 21 + requires: + - build + - chromatic-sandboxes: + parallelism: 18 + requires: + - create-sandboxes + - e2e-production: + parallelism: 6 + requires: + - create-sandboxes + - e2e-dev: + parallelism: 14 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 16 + requires: + - create-sandboxes + - vitest-integration: + parallelism: 7 + requires: + - create-sandboxes + - check-sandboxes: + parallelism: 1 + requires: + - create-sandboxes + - test-portable-stories: + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build + - test-yarn-pnp: + requires: + - build + - e2e-ui: + requires: + - build + - e2e-ui-vitest-3: + requires: + - build + - test-init-features: + requires: + - build + - test-init-empty-windows: + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build + when: + equal: + - merged + - << pipeline.parameters.workflow >> + normal: + jobs: + - pretty-docs + - build + - lint: + requires: + - build + - knip: + requires: + - build + - bench-packages: + requires: + - build + - check + - unit-tests: + requires: + - build + - stories-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybook: + requires: + - build + - coverage: + requires: + - unit-tests + - create-sandboxes: + parallelism: 14 + requires: + - build + - chromatic-sandboxes: + parallelism: 11 + requires: + - create-sandboxes + - e2e-production: + parallelism: 6 + requires: + - create-sandboxes + - e2e-dev: + parallelism: 8 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 9 + requires: + - create-sandboxes + - vitest-integration: + parallelism: 5 + requires: + - create-sandboxes + - check-sandboxes: + parallelism: 1 + requires: + - create-sandboxes + - test-yarn-pnp: + requires: + - build + - e2e-ui: + requires: + - build + - e2e-ui-vitest-3: + requires: + - build + - test-init-features: + requires: + - build + - test-portable-stories: + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build + when: + equal: + - normal + - << pipeline.parameters.workflow >> diff --git a/scripts/ci/data.js b/scripts/ci/data.js new file mode 100644 index 000000000000..c185c941df03 --- /dev/null +++ b/scripts/ci/data.js @@ -0,0 +1,2154 @@ +const commands = { + 'cancel-workflow-on-failure': { + description: 'Cancels the entire workflow in case the previous step has failed', + steps: [ + { + run: { + command: + 'echo "Canceling workflow as previous step resulted in failure."\necho "To execute all checks locally, please run yarn ci-tests"\ncurl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"\n', + name: 'Cancel current workflow', + when: 'on_fail', + }, + }, + ], + }, + 'report-workflow-on-failure': { + description: 'Reports failures to discord', + parameters: { + template: { + default: 'none', + description: 'Which template to report in discord. Applicable for parallel sandbox jobs\n', + type: 'string', + }, + }, + steps: [ + { + run: { + command: 'git fetch --unshallow', + when: 'on_fail', + }, + }, + { + 'discord/status': { + fail_only: true, + failure_message: + '$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)', + only_for_branches: 'main,next,next-release,latest-release', + }, + }, + ], + }, + 'start-event-collector': { + description: 'Starts the event collector', + steps: [ + { + run: { + background: true, + command: 'yarn jiti ./event-log-collector.ts', + name: 'Start Event Collector', + working_directory: 'scripts', + }, + }, + ], + }, +}; +const executors = { + sb_node_18_browsers: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:18.20.3-browsers', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, + sb_node_22_browsers: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:22.15.0-browsers', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, + sb_node_22_classic: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:22.15.0', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, + sb_playwright: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'mcr.microsoft.com/playwright:v1.52.0-noble', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: '/tmp/storybook', + }, +}; +const jobs = { + 'bench-packages': { + executor: { + class: 'small', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + when: { + condition: { + and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', + name: 'Benchmarking packages against base branch', + working_directory: 'scripts', + }, + }, + ], + }, + }, + { + when: { + condition: { + or: [ + { + not: '<< pipeline.parameters.ghBaseBranch >>', + }, + { + not: '<< pipeline.parameters.ghPrNumber >>', + }, + ], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: 'yarn bench-packages --upload', + name: 'Uploading package benchmarks for branch', + working_directory: 'scripts', + }, + }, + ], + }, + }, + { + store_artifacts: { + path: 'bench/packages/results.json', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'bench-sandboxes': { + executor: { + class: 'small', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + 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', + name: 'Running Bench', + }, + }, + { + run: { + command: + 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', + name: 'Uploading results', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', + }, + }, + ], + }, + build: { + executor: { + class: 'large', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + restore_cache: { + keys: [ + 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + ], + name: 'Restore Yarn cache', + }, + }, + { + run: { + command: + 'yarn task --task compile --start-from=auto --no-link --debug\ngit diff --exit-code\nyarn dedupe --check\n', + name: 'Compile', + }, + }, + { + run: { + command: 'cd code\nyarn local-registry --publish\n', + name: 'Publish to Verdaccio', + }, + }, + 'report-workflow-on-failure', + { + store_artifacts: { + path: 'code/bench/esbuild-metafiles', + }, + }, + { + save_cache: { + key: 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + name: 'Save Yarn cache', + paths: ['~/.yarn/berry/cache'], + }, + }, + { + persist_to_workspace: { + paths: [ + 'code/node_modules', + 'code/addons', + 'scripts/node_modules', + 'code/bench', + 'code/examples', + 'code/frameworks', + 'code/lib', + 'code/core', + 'code/builders', + 'code/renderers', + 'code/presets', + '.verdaccio-cache', + ], + root: '.', + }, + }, + ], + }, + check: { + executor: { + class: 'large', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + 'nx/set-shas': { + 'main-branch-name': 'next', + 'workflow-name': '<< pipeline.parameters.workflow >>', + }, + }, + { + restore_cache: { + keys: [ + 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + ], + name: 'Restore Yarn cache', + }, + }, + { + run: { + command: 'yarn task --task compile --start-from=auto --no-link --debug\n', + name: 'Compile', + }, + }, + { + run: { + command: 'yarn task --task check --start-from=auto --no-link --debug\n', + name: 'Check', + }, + }, + { + run: { + command: 'git diff --exit-code\n', + name: 'Ensure no changes pending', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'check-sandboxes': { + executor: { + class: 'medium', + name: 'sb_node_22_classic', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + 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', + name: 'Type check Sandboxes', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'chromatic-internal-storybook': { + environment: { + NODE_OPTIONS: '--max_old_space_size=4096', + }, + executor: { + class: 'large', + name: 'sb_node_22_browsers', + }, + steps: [ + 'checkout', + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn storybook:ui:chromatic', + name: 'Running Chromatic', + working_directory: 'code', + }, + }, + 'report-workflow-on-failure', + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'chromatic-sandboxes': { + executor: { + class: 'medium', + name: 'sb_node_22_browsers', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + 'checkout', + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + 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', + name: 'Running Chromatic', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + coverage: { + executor: { + class: 'small', + name: 'sb_node_22_browsers', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + 'codecov/upload', + 'report-workflow-on-failure', + ], + }, + 'create-sandboxes': { + executor: { + class: 'large', + name: 'sb_node_22_browsers', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', + name: 'Setup Corepack', + }, + }, + 'start-event-collector', + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + }, + name: 'Create Sandboxes', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', + }, + }, + { + persist_to_workspace: { + paths: ['sandbox/**'], + root: '.', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'e2e-dev': { + executor: { + class: 'medium+', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + { + run: { + command: + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', + name: 'Running E2E Tests', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'code/playwright-results/', + }, + }, + ], + }, + 'e2e-production': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + { + run: { + command: + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', + name: 'Running E2E Tests', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'code/playwright-results/', + }, + }, + ], + }, + 'e2e-ui': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + name: 'Install dependencies', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + }, + }, + { + run: { + command: 'yarn playwright-e2e', + name: 'Run E2E tests', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', + }, + }, + 'report-workflow-on-failure', + ], + }, + 'e2e-ui-vitest-3': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + name: 'Install dependencies', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + }, + }, + { + run: { + command: 'yarn playwright-e2e', + name: 'Run E2E tests', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + { + store_artifacts: { + destination: 'playwright', + path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', + }, + }, + 'report-workflow-on-failure', + ], + }, + knip: { + executor: { + class: 'large', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'cd code\nyarn knip --no-exit-code\n', + name: 'Knip', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + lint: { + executor: { + class: 'medium+', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'cd code\nyarn lint\n', + name: 'Lint', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'pretty-docs': { + executor: { + 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" }}', + ], + name: 'Restore Yarn cache', + }, + }, + { + run: { + command: 'cd scripts\nyarn install\n', + name: 'Install', + }, + }, + { + save_cache: { + key: 'prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', + name: 'Save Yarn cache', + paths: ['~/.yarn/berry/cache'], + }, + }, + { + run: { + command: 'cd scripts\nyarn docs:prettier:check\n', + name: 'Prettier', + }, + }, + ], + }, + 'script-checks': { + executor: 'sb_node_22_browsers', + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'cd scripts\nyarn get-template --check\n', + name: 'Check parallelism count', + }, + }, + { + run: { + command: 'cd scripts\nyarn check\n', + name: 'Type check', + }, + }, + { + run: { + command: 'cd scripts\nyarn test --coverage\n', + name: 'Run tests', + }, + }, + { + store_test_results: { + path: 'scripts/junit.xml', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'smoke-test-sandboxes': { + executor: { + class: 'medium', + name: 'sb_node_18_browsers', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', + name: 'Smoke Testing Sandboxes', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'stories-tests': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + parallelism: 2, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', + name: 'Run tests', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'test-init-empty': { + executor: { + class: 'small', + name: 'sb_node_22_browsers', + }, + parameters: { + packageManager: { + type: 'string', + }, + template: { + type: 'string', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + when: { + condition: { + equal: ['npm', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (NPM)', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['yarn2', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (Yarn 2)', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['pnpm', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (PNPM)', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['react-vite-ts', '<< parameters.template >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (--skip-install)', + }, + }, + ], + }, + }, + 'report-workflow-on-failure', + ], + }, + 'test-init-empty-windows': { + executor: 'win/default', + parameters: { + packageManager: { + type: 'string', + }, + template: { + type: 'string', + }, + }, + steps: [ + 'checkout', + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n', + name: 'Setup Node & Yarn on Windows', + shell: 'bash.exe', + }, + }, + { + run: { + 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: ['npm', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (Windows NPM)', + shell: 'bash.exe', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['yarn2', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (Windows Yarn 2)', + shell: 'bash.exe', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['pnpm', '<< parameters.packageManager >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (Windows PNPM)', + shell: 'bash.exe', + }, + }, + ], + }, + }, + { + when: { + condition: { + equal: ['react-vite-ts', '<< parameters.template >>'], + }, + steps: [ + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + shell: 'bash.exe', + }, + }, + { + run: { + command: + 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + }, + name: 'Storybook init from empty directory (Windows --skip-install)', + shell: 'bash.exe', + }, + }, + ], + }, + }, + ], + }, + 'test-init-features': { + executor: { + class: 'small', + name: 'sb_node_22_browsers', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + background: true, + command: 'cd code\nyarn local-registry --open\n', + name: 'Verdaccio', + }, + }, + { + run: { + command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + name: 'Wait on Verdaccio', + }, + }, + { + run: { + command: + 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n', + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, + name: 'Storybook init for features', + }, + }, + ], + }, + 'test-portable-stories': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + parameters: { + directory: { + type: 'string', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + name: 'Install dependencies', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn jest', + name: 'Run Jest tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn vitest', + name: 'Run Vitest tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn playwright-ct', + name: 'Run Playwright CT tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + { + run: { + command: 'yarn cypress', + name: 'Run Cypress CT tests', + working_directory: + 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + }, + }, + 'report-workflow-on-failure', + ], + }, + 'test-runner-dev': { + executor: { + class: 'large', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', + name: 'Running Test Runner in Dev mode', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'test-runner-production': { + executor: { + class: 'medium+', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + 'start-event-collector', + { + run: { + command: + 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + }, + name: 'Running Test Runner', + }, + }, + { + run: { + command: + 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', + name: 'Check Telemetry', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, + 'test-yarn-pnp': { + executor: { + class: 'medium', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + name: 'Install dependencies', + working_directory: 'test-storybooks/yarn-pnp', + }, + }, + { + run: { + command: 'yarn storybook --smoke-test', + name: 'Run Storybook smoke test', + working_directory: 'test-storybooks/yarn-pnp', + }, + }, + 'report-workflow-on-failure', + ], + }, + 'unit-tests': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + parallelism: 2, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', + name: 'Run tests', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + 'vitest-integration': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + parallelism: '<< parameters.parallelism >>', + parameters: { + parallelism: { + type: 'integer', + }, + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: + 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + name: 'Install sandbox dependencies', + }, + }, + 'start-event-collector', + { + run: { + command: + 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + }, + name: 'Running story tests in Vitest', + }, + }, + { + run: { + command: + 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', + name: 'Check Telemetry', + }, + }, + { + 'report-workflow-on-failure': { + template: + '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', + }, + }, + { + store_test_results: { + path: 'test-results', + }, + }, + ], + }, +}; +const orbs = { + 'browser-tools': 'circleci/browser-tools@1.4.1', + codecov: 'codecov/codecov@3.2.4', + discord: 'antonioned/discord@0.1.0', + 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', + node: 'circleci/node@5.2.0', + nx: 'nrwl/nx@1.6.2', + win: 'circleci/windows@5.0.0', +}; +const parameters = { + ghBaseBranch: { + default: 'next', + description: 'The name of the base branch (the target of the PR)', + type: 'string', + }, + ghPrNumber: { + default: '', + description: 'The PR number', + type: 'string', + }, + workflow: { + default: 'skipped', + description: 'Which workflow to run', + enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], + type: 'enum', + }, +}; +const workflows = { + daily: { + jobs: [ + 'pretty-docs', + 'build', + { + lint: { + requires: ['build'], + }, + }, + { + knip: { + requires: ['build'], + }, + }, + { + 'bench-packages': { + requires: ['build'], + }, + }, + 'check', + { + 'unit-tests': { + requires: ['build'], + }, + }, + { + 'stories-tests': { + requires: ['build'], + }, + }, + { + 'script-checks': { + requires: ['build'], + }, + }, + { + 'chromatic-internal-storybook': { + requires: ['build'], + }, + }, + { + 'create-sandboxes': { + parallelism: 38, + requires: ['build'], + }, + }, + { + 'check-sandboxes': { + parallelism: 1, + requires: ['create-sandboxes'], + }, + }, + { + 'chromatic-sandboxes': { + parallelism: 35, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-production': { + parallelism: 7, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-dev': { + parallelism: 28, + requires: ['create-sandboxes'], + }, + }, + { + 'test-runner-production': { + parallelism: 33, + requires: ['create-sandboxes'], + }, + }, + { + 'vitest-integration': { + parallelism: 13, + requires: ['create-sandboxes'], + }, + }, + { + 'test-portable-stories': { + matrix: { + parameters: { + directory: ['react', 'vue3', 'nextjs', 'svelte'], + }, + }, + requires: ['build'], + }, + }, + { + 'test-yarn-pnp': { + requires: ['build'], + }, + }, + { + 'e2e-ui': { + requires: ['build'], + }, + }, + { + 'e2e-ui-vitest-3': { + requires: ['build'], + }, + }, + { + 'test-init-features': { + requires: ['build'], + }, + }, + { + 'test-init-empty': { + matrix: { + parameters: { + packageManager: ['npm'], + template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], + }, + }, + requires: ['build'], + }, + }, + { + 'test-init-empty-windows': { + matrix: { + parameters: { + packageManager: ['npm'], + template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], + }, + }, + requires: ['build'], + }, + }, + ], + when: { + equal: ['daily', '<< pipeline.parameters.workflow >>'], + }, + }, + docs: { + jobs: ['pretty-docs'], + when: { + equal: ['docs', '<< pipeline.parameters.workflow >>'], + }, + }, + merged: { + jobs: [ + 'pretty-docs', + 'build', + { + lint: { + requires: ['build'], + }, + }, + { + knip: { + requires: ['build'], + }, + }, + { + 'bench-packages': { + requires: ['build'], + }, + }, + 'check', + { + 'unit-tests': { + requires: ['build'], + }, + }, + { + 'stories-tests': { + requires: ['build'], + }, + }, + { + 'script-checks': { + requires: ['build'], + }, + }, + { + 'chromatic-internal-storybook': { + requires: ['build'], + }, + }, + { + coverage: { + requires: ['unit-tests'], + }, + }, + { + 'create-sandboxes': { + parallelism: 21, + requires: ['build'], + }, + }, + { + 'chromatic-sandboxes': { + parallelism: 18, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-production': { + parallelism: 6, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-dev': { + parallelism: 14, + requires: ['create-sandboxes'], + }, + }, + { + 'test-runner-production': { + parallelism: 16, + requires: ['create-sandboxes'], + }, + }, + { + 'vitest-integration': { + parallelism: 7, + requires: ['create-sandboxes'], + }, + }, + { + 'check-sandboxes': { + parallelism: 1, + requires: ['create-sandboxes'], + }, + }, + { + 'test-portable-stories': { + matrix: { + parameters: { + directory: ['react', 'vue3', 'nextjs', 'svelte'], + }, + }, + requires: ['build'], + }, + }, + { + 'test-yarn-pnp': { + requires: ['build'], + }, + }, + { + 'e2e-ui': { + requires: ['build'], + }, + }, + { + 'e2e-ui-vitest-3': { + requires: ['build'], + }, + }, + { + 'test-init-features': { + requires: ['build'], + }, + }, + { + 'test-init-empty-windows': { + matrix: { + parameters: { + packageManager: ['npm'], + template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], + }, + }, + requires: ['build'], + }, + }, + ], + when: { + equal: ['merged', '<< pipeline.parameters.workflow >>'], + }, + }, + normal: { + jobs: [ + 'pretty-docs', + 'build', + { + lint: { + requires: ['build'], + }, + }, + { + knip: { + requires: ['build'], + }, + }, + { + 'bench-packages': { + requires: ['build'], + }, + }, + 'check', + { + 'unit-tests': { + requires: ['build'], + }, + }, + { + 'stories-tests': { + requires: ['build'], + }, + }, + { + 'script-checks': { + requires: ['build'], + }, + }, + { + 'chromatic-internal-storybook': { + requires: ['build'], + }, + }, + { + coverage: { + requires: ['unit-tests'], + }, + }, + { + 'create-sandboxes': { + parallelism: 14, + requires: ['build'], + }, + }, + { + 'chromatic-sandboxes': { + parallelism: 11, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-production': { + parallelism: 6, + requires: ['create-sandboxes'], + }, + }, + { + 'e2e-dev': { + parallelism: 8, + requires: ['create-sandboxes'], + }, + }, + { + 'test-runner-production': { + parallelism: 9, + requires: ['create-sandboxes'], + }, + }, + { + 'vitest-integration': { + parallelism: 5, + requires: ['create-sandboxes'], + }, + }, + { + 'check-sandboxes': { + parallelism: 1, + requires: ['create-sandboxes'], + }, + }, + { + 'test-yarn-pnp': { + requires: ['build'], + }, + }, + { + 'e2e-ui': { + requires: ['build'], + }, + }, + { + 'e2e-ui-vitest-3': { + requires: ['build'], + }, + }, + { + 'test-init-features': { + requires: ['build'], + }, + }, + { + 'test-portable-stories': { + matrix: { + parameters: { + directory: ['react', 'vue3', 'nextjs', 'svelte'], + }, + }, + requires: ['build'], + }, + }, + ], + when: { + equal: ['normal', '<< pipeline.parameters.workflow >>'], + }, + }, +}; + +export const data = { + version: 2.1, + orbs, + commands, + executors, + parameters, + + jobs, + workflows, +}; diff --git a/scripts/ci/generate.ts b/scripts/ci/generate.ts index ae09560cd638..c37de5615b79 100644 --- a/scripts/ci/generate.ts +++ b/scripts/ci/generate.ts @@ -3,1863 +3,21 @@ import { join } from 'node:path'; import yml from 'yaml'; +import { data } from './data'; + console.log('Generating CircleCI config...'); console.log('--------------------------------'); const dirname = import.meta.dirname; -const executors = { - sb_node_18_browsers: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'cimg/node:18.20.3-browsers', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: '/tmp/storybook', - }, - sb_node_22_browsers: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'cimg/node:22.15.0-browsers', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: '/tmp/storybook', - }, - sb_node_22_classic: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'cimg/node:22.15.0', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: '/tmp/storybook', - }, - sb_playwright: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'mcr.microsoft.com/playwright:v1.52.0-noble', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: '/tmp/storybook', - }, -}; -const jobs = { - 'bench-packages': { - executor: { - class: 'small', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - when: { - condition: { - and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', - name: 'Benchmarking packages against base branch', - working_directory: 'scripts', - }, - }, - ], - }, - }, - { - when: { - condition: { - or: [ - { - not: '<< pipeline.parameters.ghBaseBranch >>', - }, - { - not: '<< pipeline.parameters.ghPrNumber >>', - }, - ], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: 'yarn bench-packages --upload', - name: 'Uploading package benchmarks for branch', - working_directory: 'scripts', - }, - }, - ], - }, - }, - { - store_artifacts: { - path: 'bench/packages/results.json', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'bench-sandboxes': { - executor: { - class: 'small', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - 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', - name: 'Running Bench', - }, - }, - { - run: { - command: - 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', - name: 'Uploading results', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', - }, - }, - ], - }, - build: { - executor: { - class: 'large', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - restore_cache: { - keys: [ - 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - ], - name: 'Restore Yarn cache', - }, - }, - { - run: { - command: - 'yarn task --task compile --start-from=auto --no-link --debug\ngit diff --exit-code\nyarn dedupe --check\n', - name: 'Compile', - }, - }, - { - run: { - command: 'cd code\nyarn local-registry --publish\n', - name: 'Publish to Verdaccio', - }, - }, - 'report-workflow-on-failure', - { - store_artifacts: { - path: 'code/bench/esbuild-metafiles', - }, - }, - { - save_cache: { - key: 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - name: 'Save Yarn cache', - paths: ['~/.yarn/berry/cache'], - }, - }, - { - persist_to_workspace: { - paths: [ - 'code/node_modules', - 'code/addons', - 'scripts/node_modules', - 'code/bench', - 'code/examples', - 'code/frameworks', - 'code/lib', - 'code/core', - 'code/builders', - 'code/renderers', - 'code/presets', - '.verdaccio-cache', - ], - root: '.', - }, - }, - ], - }, - check: { - executor: { - class: 'large', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - 'nx/set-shas': { - 'main-branch-name': 'next', - 'workflow-name': '<< pipeline.parameters.workflow >>', - }, - }, - { - restore_cache: { - keys: [ - 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - ], - name: 'Restore Yarn cache', - }, - }, - { - run: { - command: 'yarn task --task compile --start-from=auto --no-link --debug\n', - name: 'Compile', - }, - }, - { - run: { - command: 'yarn task --task check --start-from=auto --no-link --debug\n', - name: 'Check', - }, - }, - { - run: { - command: 'git diff --exit-code\n', - name: 'Ensure no changes pending', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'chromatic-internal-storybook': { - environment: { - NODE_OPTIONS: '--max_old_space_size=4096', - }, - executor: { - class: 'large', - name: 'sb_node_22_browsers', - }, - steps: [ - 'checkout', - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn storybook:ui:chromatic', - name: 'Running Chromatic', - working_directory: 'code', - }, - }, - 'report-workflow-on-failure', - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'chromatic-sandboxes': { - executor: { - class: 'medium', - name: 'sb_node_22_browsers', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - 'checkout', - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - 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', - name: 'Running Chromatic', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - coverage: { - executor: { - class: 'small', - name: 'sb_node_22_browsers', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - 'codecov/upload', - 'report-workflow-on-failure', - ], - }, - 'create-sandboxes': { - executor: { - class: 'large', - name: 'sb_node_22_browsers', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', - name: 'Setup Corepack', - }, - }, - 'start-event-collector', - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - }, - name: 'Create Sandboxes', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', - }, - }, - { - persist_to_workspace: { - paths: ['sandbox/**'], - root: '.', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'e2e-dev': { - executor: { - class: 'medium+', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - { - run: { - command: - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', - name: 'Running E2E Tests', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'code/playwright-results/', - }, - }, - ], - }, - 'e2e-production': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - { - run: { - command: - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', - name: 'Running E2E Tests', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'code/playwright-results/', - }, - }, - ], - }, - 'e2e-ui': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - name: 'Install dependencies', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', - }, - }, - { - run: { - command: 'yarn playwright-e2e', - name: 'Run E2E tests', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', - }, - }, - 'report-workflow-on-failure', - ], - }, - 'e2e-ui-vitest-3': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - name: 'Install dependencies', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - }, - }, - { - run: { - command: 'yarn playwright-e2e', - name: 'Run E2E tests', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', - }, - }, - 'report-workflow-on-failure', - ], - }, - knip: { - executor: { - class: 'large', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'cd code\nyarn knip --no-exit-code\n', - name: 'Knip', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - lint: { - executor: { - class: 'medium+', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'cd code\nyarn lint\n', - name: 'Lint', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'pretty-docs': { - executor: { - 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" }}', - ], - name: 'Restore Yarn cache', - }, - }, - { - run: { - command: 'cd scripts\nyarn install\n', - name: 'Install', - }, - }, - { - save_cache: { - key: 'prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - name: 'Save Yarn cache', - paths: ['~/.yarn/berry/cache'], - }, - }, - { - run: { - command: 'cd scripts\nyarn docs:prettier:check\n', - name: 'Prettier', - }, - }, - ], - }, - 'script-checks': { - executor: 'sb_node_22_browsers', - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'cd scripts\nyarn get-template --check\n', - name: 'Check parallelism count', - }, - }, - { - run: { - command: 'cd scripts\nyarn check\n', - name: 'Type check', - }, - }, - { - run: { - command: 'cd scripts\nyarn test --coverage\n', - name: 'Run tests', - }, - }, - { - store_test_results: { - path: 'scripts/junit.xml', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'smoke-test-sandboxes': { - executor: { - class: 'medium', - name: 'sb_node_18_browsers', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', - name: 'Smoke Testing Sandboxes', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'stories-tests': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - parallelism: 2, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', - name: 'Run tests', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'test-init-empty': { - executor: { - class: 'small', - name: 'sb_node_22_browsers', - }, - parameters: { - packageManager: { - type: 'string', - }, - template: { - type: 'string', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - when: { - condition: { - equal: ['npm', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (NPM)', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['yarn1', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpx storybook init --yes --package-manager yarn1\nyarn storybook --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (Yarn 1)', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['yarn2', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (Yarn 2)', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['pnpm', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (PNPM)', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['react-vite-ts', '<< parameters.template >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (--skip-install)', - }, - }, - ], - }, - }, - 'report-workflow-on-failure', - ], - }, - 'test-init-features': { - executor: { - class: 'small', - name: 'sb_node_22_browsers', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features dev docs test\nnpx vitest\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - }, - name: 'Storybook init for features', - }, - }, - ], - }, - 'test-portable-stories': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - parameters: { - directory: { - type: 'string', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - name: 'Install dependencies', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn jest', - name: 'Run Jest tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn vitest', - name: 'Run Vitest tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn playwright-ct', - name: 'Run Playwright CT tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn cypress', - name: 'Run Cypress CT tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - 'report-workflow-on-failure', - ], - }, - 'test-runner-dev': { - executor: { - class: 'large', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', - name: 'Running Test Runner in Dev mode', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'test-runner-production': { - executor: { - class: 'medium+', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - 'start-event-collector', - { - run: { - command: - 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - }, - name: 'Running Test Runner', - }, - }, - { - run: { - command: - 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', - name: 'Check Telemetry', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'unit-tests': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - parallelism: 2, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', - name: 'Run tests', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'vitest-integration': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - 'start-event-collector', - { - run: { - command: - 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - }, - name: 'Running story tests in Vitest', - }, - }, - { - run: { - command: - 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', - name: 'Check Telemetry', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, -}; -const commands = { - 'cancel-workflow-on-failure': { - description: 'Cancels the entire workflow in case the previous step has failed', - steps: [ - { - run: { - command: - 'echo "Canceling workflow as previous step resulted in failure."\necho "To execute all checks locally, please run yarn ci-tests"\ncurl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"\n', - name: 'Cancel current workflow', - when: 'on_fail', - }, - }, - ], - }, - 'report-workflow-on-failure': { - description: 'Reports failures to discord', - parameters: { - template: { - default: 'none', - description: 'Which template to report in discord. Applicable for parallel sandbox jobs\n', - type: 'string', - }, - }, - steps: [ - { - run: { - command: 'git fetch --unshallow', - when: 'on_fail', - }, - }, - { - 'discord/status': { - fail_only: true, - failure_message: - '$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)', - only_for_branches: 'main,next,next-release,latest-release', - }, - }, - ], - }, - 'start-event-collector': { - description: 'Starts the event collector', - steps: [ - { - run: { - background: true, - command: 'yarn jiti ./event-log-collector.ts', - name: 'Start Event Collector', - working_directory: 'scripts', - }, - }, - ], - }, -}; -const orbs = { - 'browser-tools': 'circleci/browser-tools@1.4.1', - codecov: 'codecov/codecov@3.2.4', - discord: 'antonioned/discord@0.1.0', - 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', - node: 'circleci/node@5.2.0', - nx: 'nrwl/nx@1.6.2', -}; -const parameters = { - ghBaseBranch: { - default: 'next', - description: 'The name of the base branch (the target of the PR)', - type: 'string', - }, - ghPrNumber: { - default: '', - description: 'The PR number', - type: 'string', - }, - workflow: { - default: 'skipped', - description: 'Which workflow to run', - enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], - type: 'enum', - }, -}; -const workflows = { - daily: { - jobs: [ - 'pretty-docs', - 'build', - { - lint: { - requires: ['build'], - }, - }, - { - knip: { - requires: ['build'], - }, - }, - { - 'bench-packages': { - requires: ['build'], - }, - }, - 'check', - { - 'unit-tests': { - requires: ['build'], - }, - }, - { - 'stories-tests': { - requires: ['build'], - }, - }, - { - 'script-checks': { - requires: ['build'], - }, - }, - { - 'chromatic-internal-storybook': { - requires: ['build'], - }, - }, - { - 'create-sandboxes': { - parallelism: 34, - requires: ['build'], - }, - }, - { - 'chromatic-sandboxes': { - parallelism: 31, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-production': { - parallelism: 7, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-dev': { - parallelism: 28, - requires: ['create-sandboxes'], - }, - }, - { - 'test-runner-production': { - parallelism: 29, - requires: ['create-sandboxes'], - }, - }, - { - 'vitest-integration': { - parallelism: 11, - requires: ['create-sandboxes'], - }, - }, - { - 'test-portable-stories': { - matrix: { - parameters: { - directory: ['react', 'vue3', 'nextjs', 'svelte'], - }, - }, - requires: ['build'], - }, - }, - { - 'e2e-ui': { - requires: ['build'], - }, - }, - { - 'e2e-ui-vitest-3': { - requires: ['build'], - }, - }, - { - 'test-init-features': { - requires: ['build'], - }, - }, - { - 'test-init-empty': { - matrix: { - parameters: { - packageManager: ['npm'], - template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], - }, - }, - requires: ['build'], - }, - }, - ], - when: { - equal: ['daily', '<< pipeline.parameters.workflow >>'], - }, - }, - docs: { - jobs: ['pretty-docs'], - when: { - equal: ['docs', '<< pipeline.parameters.workflow >>'], - }, - }, - merged: { - jobs: [ - 'pretty-docs', - 'build', - { - lint: { - requires: ['build'], - }, - }, - { - knip: { - requires: ['build'], - }, - }, - { - 'bench-packages': { - requires: ['build'], - }, - }, - 'check', - { - 'unit-tests': { - requires: ['build'], - }, - }, - { - 'stories-tests': { - requires: ['build'], - }, - }, - { - 'script-checks': { - requires: ['build'], - }, - }, - { - 'chromatic-internal-storybook': { - requires: ['build'], - }, - }, - { - coverage: { - requires: ['unit-tests'], - }, - }, - { - 'create-sandboxes': { - parallelism: 19, - requires: ['build'], - }, - }, - { - 'chromatic-sandboxes': { - parallelism: 16, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-production': { - parallelism: 6, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-dev': { - parallelism: 14, - requires: ['create-sandboxes'], - }, - }, - { - 'test-runner-production': { - parallelism: 14, - requires: ['create-sandboxes'], - }, - }, - { - 'vitest-integration': { - parallelism: 6, - requires: ['create-sandboxes'], - }, - }, - { - 'test-portable-stories': { - matrix: { - parameters: { - directory: ['react', 'vue3', 'nextjs', 'svelte'], - }, - }, - requires: ['build'], - }, - }, - { - 'e2e-ui': { - requires: ['build'], - }, - }, - { - 'e2e-ui-vitest-3': { - requires: ['build'], - }, - }, - { - 'test-init-features': { - requires: ['build'], - }, - }, - ], - when: { - equal: ['merged', '<< pipeline.parameters.workflow >>'], - }, - }, - normal: { - jobs: [ - 'pretty-docs', - 'build', - { - lint: { - requires: ['build'], - }, - }, - { - knip: { - requires: ['build'], - }, - }, - { - 'bench-packages': { - requires: ['build'], - }, - }, - 'check', - { - 'unit-tests': { - requires: ['build'], - }, - }, - { - 'stories-tests': { - requires: ['build'], - }, - }, - { - 'script-checks': { - requires: ['build'], - }, - }, - { - 'chromatic-internal-storybook': { - requires: ['build'], - }, - }, - { - coverage: { - requires: ['unit-tests'], - }, - }, - { - 'create-sandboxes': { - parallelism: 13, - requires: ['build'], - }, - }, - { - 'chromatic-sandboxes': { - parallelism: 10, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-production': { - parallelism: 6, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-dev': { - parallelism: 8, - requires: ['create-sandboxes'], - }, - }, - { - 'test-runner-production': { - parallelism: 8, - requires: ['create-sandboxes'], - }, - }, - { - 'vitest-integration': { - parallelism: 5, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-ui': { - requires: ['build'], - }, - }, - { - 'e2e-ui-vitest-3': { - requires: ['build'], - }, - }, - { - 'test-init-features': { - requires: ['build'], - }, - }, - { - 'test-portable-stories': { - matrix: { - parameters: { - directory: ['react', 'vue3', 'nextjs', 'svelte'], - }, - }, - requires: ['build'], - }, - }, - ], - when: { - equal: ['normal', '<< pipeline.parameters.workflow >>'], - }, - }, -}; -const data = { - version: 2.1, - commands, - executors, - jobs, - orbs, - parameters, - workflows, -}; +const existing = await yml.parse( + await fs.readFile(join(dirname, '../../.circleci/config.original.yml'), 'utf-8') +); + +await fs.writeFile( + join(dirname, '../../.circleci/config.generated.json'), + JSON.stringify(existing, null, 2) +); await fs.writeFile( join(dirname, '../../.circleci/config.generated.yml'), From da3223a00feafb1262ea2da83d800ddff86ee69b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 10:22:35 +0100 Subject: [PATCH 025/310] wip --- .circleci/config.generated.yml | 104 ++++++++++++++++++++++++--------- scripts/ci/data.js | 84 +++++++++++++++++++++++++- scripts/ci/generate.ts | 14 ++--- 3 files changed, 166 insertions(+), 36 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 7d252e53e551..44477a4d78e1 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1,3 +1,12 @@ +version: 2.1 +orbs: + browser-tools: circleci/browser-tools@1.4.1 + codecov: codecov/codecov@3.2.4 + discord: antonioned/discord@0.1.0 + git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 + node: circleci/node@5.2.0 + nx: nrwl/nx@1.6.2 + win: circleci/windows@5.0.0 commands: cancel-workflow-on-failure: description: Cancels the entire workflow in case the previous step has failed @@ -106,6 +115,25 @@ executors: type: enum resource_class: <> working_directory: /tmp/storybook +parameters: + ghBaseBranch: + default: next + description: The name of the base branch (the target of the PR) + type: string + ghPrNumber: + default: "" + description: The PR number + type: string + workflow: + default: skipped + description: Which workflow to run + enum: + - normal + - merged + - daily + - skipped + - docs + type: enum jobs: bench-packages: executor: @@ -1116,34 +1144,41 @@ jobs: template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - store_test_results: path: test-results -orbs: - browser-tools: circleci/browser-tools@1.4.1 - codecov: codecov/codecov@3.2.4 - discord: antonioned/discord@0.1.0 - git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 - node: circleci/node@5.2.0 - nx: nrwl/nx@1.6.2 - win: circleci/windows@5.0.0 -parameters: - ghBaseBranch: - default: next - description: The name of the base branch (the target of the PR) - type: string - ghPrNumber: - default: "" - description: The PR number - type: string - workflow: - default: skipped - description: Which workflow to run - enum: - - normal - - merged - - daily - - skipped - - docs - type: enum -version: 2.1 + sandboxes: + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + sandboxes-a-create: + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + sandboxes-a-e2e: + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + sandboxes-b-create: + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + sandboxes-b-e2e: + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose workflows: daily: jobs: @@ -1252,6 +1287,19 @@ workflows: docs: jobs: - pretty-docs + - sandboxes + - sandboxes-a-create: + requires: + - sandboxes + sandboxes-a-e2e: + requires: + - sandboxes-a-create + sandboxes-b-create: + requires: + - sandboxes + sandboxes-b-e2e: + requires: + - sandboxes-b-create when: equal: - docs diff --git a/scripts/ci/data.js b/scripts/ci/data.js index c185c941df03..35094c9b5c33 100644 --- a/scripts/ci/data.js +++ b/scripts/ci/data.js @@ -1711,6 +1711,71 @@ const jobs = { }, ], }, + sandboxes: { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + ], + }, + 'sandboxes-a-create': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + ], + }, + 'sandboxes-a-e2e': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + ], + }, + 'sandboxes-b-create': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + ], + }, + 'sandboxes-b-e2e': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + ], + }, }; const orbs = { 'browser-tools': 'circleci/browser-tools@1.4.1', @@ -1880,7 +1945,24 @@ const workflows = { }, }, docs: { - jobs: ['pretty-docs'], + jobs: [ + 'pretty-docs', + 'sandboxes', + { + 'sandboxes-a-create': { + requires: ['sandboxes'], + }, + 'sandboxes-a-e2e': { + requires: ['sandboxes-a-create'], + }, + 'sandboxes-b-create': { + requires: ['sandboxes'], + }, + 'sandboxes-b-e2e': { + requires: ['sandboxes-b-create'], + }, + }, + ], when: { equal: ['docs', '<< pipeline.parameters.workflow >>'], }, diff --git a/scripts/ci/generate.ts b/scripts/ci/generate.ts index c37de5615b79..5f5385fce356 100644 --- a/scripts/ci/generate.ts +++ b/scripts/ci/generate.ts @@ -10,14 +10,14 @@ console.log('--------------------------------'); const dirname = import.meta.dirname; -const existing = await yml.parse( - await fs.readFile(join(dirname, '../../.circleci/config.original.yml'), 'utf-8') -); +// const existing = await yml.parse( +// await fs.readFile(join(dirname, '../../.circleci/config.original.yml'), 'utf-8') +// ); -await fs.writeFile( - join(dirname, '../../.circleci/config.generated.json'), - JSON.stringify(existing, null, 2) -); +// await fs.writeFile( +// join(dirname, '../../.circleci/config.generated.json'), +// JSON.stringify(existing, null, 2) +// ); await fs.writeFile( join(dirname, '../../.circleci/config.generated.yml'), From e7b5993b20d0d3b2d4d0068d0db7a2aeeb4d7f80 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 10:25:03 +0100 Subject: [PATCH 026/310] Update CircleCI config to use yarn dlx for script execution --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 385c2ac9e049..fdfb9c2cd4ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: - run: name: Generate config command: | - jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> + yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: From fc44f3bece7ac97a36a2924fdd6e8e34bb2c8a7f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 10:28:17 +0100 Subject: [PATCH 027/310] Refactor CircleCI workflow configuration for improved readability and structure --- .circleci/config.generated.yml | 6 +++--- scripts/ci/data.js | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 44477a4d78e1..70f251879918 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1291,13 +1291,13 @@ workflows: - sandboxes-a-create: requires: - sandboxes - sandboxes-a-e2e: + - sandboxes-a-e2e: requires: - sandboxes-a-create - sandboxes-b-create: + - sandboxes-b-create: requires: - sandboxes - sandboxes-b-e2e: + - sandboxes-b-e2e: requires: - sandboxes-b-create when: diff --git a/scripts/ci/data.js b/scripts/ci/data.js index 35094c9b5c33..9fc7761572e8 100644 --- a/scripts/ci/data.js +++ b/scripts/ci/data.js @@ -1952,12 +1952,18 @@ const workflows = { 'sandboxes-a-create': { requires: ['sandboxes'], }, + }, + { 'sandboxes-a-e2e': { requires: ['sandboxes-a-create'], }, + }, + { 'sandboxes-b-create': { requires: ['sandboxes'], }, + }, + { 'sandboxes-b-e2e': { requires: ['sandboxes-b-create'], }, From 9abdebfea4231c87236aff0715584aae01b4a234 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 13:12:35 +0100 Subject: [PATCH 028/310] Enhance CircleCI configuration by adding build job dependency for sandboxes and introducing a new data script for CI commands and executors --- .circleci/config.generated.yml | 5 ++++- scripts/ci/{data.js => data.ts} | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) rename scripts/ci/{data.js => data.ts} (99%) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 70f251879918..41ebae7aaa73 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1287,7 +1287,10 @@ workflows: docs: jobs: - pretty-docs - - sandboxes + - build + - sandboxes: + requires: + - build - sandboxes-a-create: requires: - sandboxes diff --git a/scripts/ci/data.js b/scripts/ci/data.ts similarity index 99% rename from scripts/ci/data.js rename to scripts/ci/data.ts index 9fc7761572e8..b840587675c0 100644 --- a/scripts/ci/data.js +++ b/scripts/ci/data.ts @@ -1947,7 +1947,12 @@ const workflows = { docs: { jobs: [ 'pretty-docs', - 'sandboxes', + 'build', + { + sandboxes: { + requires: ['build'], + }, + }, { 'sandboxes-a-create': { requires: ['sandboxes'], From 0508104722db984ef899327371673f5e4899c31f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 13:44:53 +0100 Subject: [PATCH 029/310] Update CircleCI configuration to optimize executor classes and streamline CI steps, including version upgrades for Node.js and improved command execution. --- .circleci/config.generated.yml | 9 +++--- scripts/ci/data.ts | 53 ++++++++++++++++++++-------------- 2 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 41ebae7aaa73..9a2e5050bfbd 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1146,11 +1146,12 @@ jobs: path: test-results sandboxes: executor: - class: xlarge - name: sb_playwright + class: small + name: sb_node_22_classic steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + - run: + command: "" + name: Grouping sandboxes in CI graph sandboxes-a-create: executor: class: xlarge diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index b840587675c0..db0f099f18a1 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -281,7 +281,7 @@ const jobs = { }, build: { executor: { - class: 'large', + class: 'xlarge', name: 'sb_node_22_classic', }, steps: [ @@ -291,24 +291,41 @@ const jobs = { }, }, { - restore_cache: { - keys: [ - 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - ], - name: 'Restore Yarn cache', + 'node/install-packages': { + 'app-dir': 'code', + 'pkg-manager': 'yarn', + }, + }, + { + 'node/install-packages': { + 'app-dir': 'scripts', + 'pkg-manager': 'yarn', }, }, { run: { - command: - 'yarn task --task compile --start-from=auto --no-link --debug\ngit diff --exit-code\nyarn dedupe --check\n', + command: 'git diff --exit-code', + name: 'Check for changes', + }, + }, + { + run: { + command: 'yarn dedupe --check', + name: 'Check for dedupe', + }, + }, + { + run: { + command: 'yarn task --task compile --start-from=auto --no-link --debug', name: 'Compile', + working_directory: 'code', }, }, { run: { - command: 'cd code\nyarn local-registry --publish\n', + command: 'yarn local-registry --publish', name: 'Publish to Verdaccio', + working_directory: 'code', }, }, 'report-workflow-on-failure', @@ -317,13 +334,6 @@ const jobs = { path: 'code/bench/esbuild-metafiles', }, }, - { - save_cache: { - key: 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - name: 'Save Yarn cache', - paths: ['~/.yarn/berry/cache'], - }, - }, { persist_to_workspace: { paths: [ @@ -1713,13 +1723,14 @@ const jobs = { }, sandboxes: { executor: { - class: 'xlarge', - name: 'sb_playwright', + class: 'small', + name: 'sb_node_22_classic', }, steps: [ { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', + run: { + command: '', + name: 'Grouping sandboxes in CI graph', }, }, ], @@ -1782,7 +1793,7 @@ const orbs = { codecov: 'codecov/codecov@3.2.4', discord: 'antonioned/discord@0.1.0', 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', - node: 'circleci/node@5.2.0', + node: 'circleci/node@7.2.1', nx: 'nrwl/nx@1.6.2', win: 'circleci/windows@5.0.0', }; From 7914e512e5b87d49459f7f176bbb4fea63ab3322 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 14:08:42 +0100 Subject: [PATCH 030/310] Refactor CircleCI configuration to upgrade Node.js version, optimize executor classes, and enhance CI steps for type checking and change validation. --- .circleci/config.generated.yml | 63 +++++++++++++++------------------- scripts/ci/data.ts | 31 ++++++----------- 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 9a2e5050bfbd..3d44612f51c2 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -4,7 +4,7 @@ orbs: codecov: codecov/codecov@3.2.4 discord: antonioned/discord@0.1.0 git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 - node: circleci/node@5.2.0 + node: circleci/node@7.2.1 nx: nrwl/nx@1.6.2 win: circleci/windows@5.0.0 commands: @@ -220,34 +220,34 @@ jobs: template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) build: executor: - class: large + class: xlarge name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 --verbose - - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache + - node/install-packages: + app-dir: code + pkg-manager: yarn + - node/install-packages: + app-dir: scripts + pkg-manager: yarn - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - git diff --exit-code - yarn dedupe --check + command: git diff --exit-code + name: Check for changes + - run: + command: yarn dedupe --check + name: Check for dedupe + - run: + command: yarn task --task compile --start-from=auto --no-link --debug name: Compile + working_directory: code - run: - command: | - cd code - yarn local-registry --publish + command: yarn local-registry --publish name: Publish to Verdaccio + working_directory: code - report-workflow-on-failure - store_artifacts: path: code/bench/esbuild-metafiles - - save_cache: - key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache - persist_to_workspace: paths: - code/node_modules @@ -265,29 +265,21 @@ jobs: root: . check: executor: - class: large + class: xlarge name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 --verbose - - nx/set-shas: - main-branch-name: next - workflow-name: << pipeline.parameters.workflow >> - - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Restore Yarn cache - run: - command: | - yarn task --task compile --start-from=auto --no-link --debug - name: Compile + command: yarn task --task check --no-link + name: TypeCheck code + working_directory: code - run: - command: | - yarn task --task check --start-from=auto --no-link --debug - name: Check + command: yarn check + name: TypeCheck scripts + working_directory: scripts - run: - command: | - git diff --exit-code + command: git diff --exit-code name: Ensure no changes pending - report-workflow-on-failure - cancel-workflow-on-failure @@ -1150,7 +1142,7 @@ jobs: name: sb_node_22_classic steps: - run: - command: "" + command: echo "Grouping sandboxes in CI graph" name: Grouping sandboxes in CI graph sandboxes-a-create: executor: @@ -1289,6 +1281,7 @@ workflows: jobs: - pretty-docs - build + - check - sandboxes: requires: - build diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index db0f099f18a1..db3da280b20e 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -357,7 +357,7 @@ const jobs = { }, check: { executor: { - class: 'large', + class: 'xlarge', name: 'sb_node_22_classic', }, steps: [ @@ -366,35 +366,23 @@ const jobs = { clone_options: '--depth 1 --verbose', }, }, - { - 'nx/set-shas': { - 'main-branch-name': 'next', - 'workflow-name': '<< pipeline.parameters.workflow >>', - }, - }, - { - restore_cache: { - keys: [ - 'build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - ], - name: 'Restore Yarn cache', - }, - }, { run: { - command: 'yarn task --task compile --start-from=auto --no-link --debug\n', - name: 'Compile', + command: 'yarn task --task check --no-link', + name: 'TypeCheck code', + working_directory: 'code', }, }, { run: { - command: 'yarn task --task check --start-from=auto --no-link --debug\n', - name: 'Check', + command: 'yarn check', + name: 'TypeCheck scripts', + working_directory: 'scripts', }, }, { run: { - command: 'git diff --exit-code\n', + command: 'git diff --exit-code', name: 'Ensure no changes pending', }, }, @@ -1729,7 +1717,7 @@ const jobs = { steps: [ { run: { - command: '', + command: 'echo "Grouping sandboxes in CI graph"', name: 'Grouping sandboxes in CI graph', }, }, @@ -1959,6 +1947,7 @@ const workflows = { jobs: [ 'pretty-docs', 'build', + 'check', { sandboxes: { requires: ['build'], From f5a0800adb879830586c8ff4d071aa84a1caa1be Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 14:48:42 +0100 Subject: [PATCH 031/310] Update CircleCI configuration to establish a dependency for the 'check' job on the 'build' job, enhancing workflow execution order. --- .circleci/config.generated.yml | 4 +++- scripts/ci/data.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 3d44612f51c2..87e392fe7dc5 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1281,7 +1281,9 @@ workflows: jobs: - pretty-docs - build - - check + - check: + requires: + - build - sandboxes: requires: - build diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index db3da280b20e..2cf16f72ace4 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1947,7 +1947,11 @@ const workflows = { jobs: [ 'pretty-docs', 'build', - 'check', + { + check: { + requires: ['build'], + }, + }, { sandboxes: { requires: ['build'], From f95c36821bb2c21dd09974cca5677a1b1b0f49af Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 15:00:36 +0100 Subject: [PATCH 032/310] Refactor CircleCI configuration to replace Yarn cache steps with a streamlined node/install-packages command, enhancing script execution efficiency. --- .circleci/config.generated.yml | 25 ++++++++----------------- scripts/ci/data.ts | 27 ++++++++------------------- 2 files changed, 16 insertions(+), 36 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 87e392fe7dc5..47b545e7a4ef 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -262,6 +262,9 @@ jobs: - code/renderers - code/presets - .verdaccio-cache + - .yarn/code-install-state.gz + - .yarn/scripts-install-state.gz + - .yarn/root-install-state.gz root: . check: executor: @@ -552,25 +555,13 @@ jobs: 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" }} - name: Restore Yarn cache - - run: - command: | - cd scripts - yarn install - name: Install - - save_cache: - key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache + - node/install-packages: + app-dir: scripts + pkg-manager: yarn - run: - command: | - cd scripts - yarn docs:prettier:check + command: yarn docs:prettier:check name: Prettier + working_directory: scripts script-checks: executor: sb_node_22_browsers steps: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 2cf16f72ace4..51c192886491 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -349,6 +349,9 @@ const jobs = { 'code/renderers', 'code/presets', '.verdaccio-cache', + '.yarn/code-install-state.gz', + '.yarn/scripts-install-state.gz', + '.yarn/root-install-state.gz', ], root: '.', }, @@ -862,30 +865,16 @@ const jobs = { }, }, { - restore_cache: { - keys: [ - 'prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - ], - name: 'Restore Yarn cache', - }, - }, - { - run: { - command: 'cd scripts\nyarn install\n', - name: 'Install', - }, - }, - { - save_cache: { - key: 'prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}', - name: 'Save Yarn cache', - paths: ['~/.yarn/berry/cache'], + 'node/install-packages': { + 'app-dir': 'scripts', + 'pkg-manager': 'yarn', }, }, { run: { - command: 'cd scripts\nyarn docs:prettier:check\n', + command: 'yarn docs:prettier:check', name: 'Prettier', + working_directory: 'scripts', }, }, ], From 429b8091af59decc068c3f15e1e1cfed115d37cc Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 15:21:36 +0100 Subject: [PATCH 033/310] persist only dist, not whole package --- .circleci/config.generated.yml | 62 +++++++++++++++++++++++++++++----- scripts/ci/data.ts | 23 ++++++++----- 2 files changed, 67 insertions(+), 18 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 47b545e7a4ef..5243d6eac049 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -251,16 +251,60 @@ jobs: - persist_to_workspace: paths: - code/node_modules - - code/addons - scripts/node_modules - - code/bench - - code/examples - - code/frameworks - - code/lib - - code/core - - code/builders - - code/renderers - - code/presets + - code/core/dist + - code/addons/a11y/dist + - code/addons/docs/dist + - code/addons/links/dist + - code/addons/onboarding/dist + - code/addons/pseudo-states/dist + - code/addons/themes/dist + - code/addons/vitest/dist + - code/builders/builder-vite/dist + - code/builders/builder-webpack5/dist + - code/frameworks/angular/dist + - code/frameworks/ember/dist + - code/frameworks/html-vite/dist + - code/frameworks/nextjs/dist + - code/frameworks/nextjs-vite/dist + - code/frameworks/preact-vite/dist + - code/frameworks/react-native-web-vite/dist + - code/frameworks/react-vite/dist + - code/frameworks/react-webpack5/dist + - code/frameworks/server-webpack5/dist + - code/frameworks/svelte-vite/dist + - code/frameworks/sveltekit/dist + - code/frameworks/vue3-vite/dist + - code/frameworks/web-components-vite/dist + - code/lib/cli-storybook/dist + - code/lib/codemod/dist + - code/lib/core-webpack/dist + - code/lib/create-storybook/dist + - code/lib/csf-plugin/dist + - code/lib/eslint-plugin/dist + - code/lib/react-dom-shim/dist + - code/presets/create-react-app/dist + - code/presets/react-webpack/dist + - code/presets/server-webpack/dist + - code/renderers/html/dist + - code/renderers/preact/dist + - code/renderers/react/dist + - code/renderers/server/dist + - code/renderers/svelte/dist + - code/renderers/vue3/dist + - code/renderers/web-components/dist + - code/core/node_modules/human-signals/build/dist + - code/core/dist/core-server/utils/__mockdata__/src + - code/core/dist/core-server/utils/__search-files-tests__/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/minimal-config/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/some-config/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-nx/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-nx-workspace/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-options-styles/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/without-tsConfig/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src + - code/frameworks/angular/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src - .verdaccio-cache - .yarn/code-install-state.gz - .yarn/scripts-install-state.gz diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 51c192886491..514639738cc5 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1,3 +1,10 @@ +import { join } from 'node:path'; + +// eslint-disable-next-line depend/ban-dependencies +import glob from 'fast-glob'; + +const dirname = import.meta.dirname; + const commands = { 'cancel-workflow-on-failure': { description: 'Cancels the entire workflow in case the previous step has failed', @@ -338,16 +345,14 @@ const jobs = { persist_to_workspace: { paths: [ 'code/node_modules', - 'code/addons', 'scripts/node_modules', - 'code/bench', - 'code/examples', - 'code/frameworks', - 'code/lib', - 'code/core', - 'code/builders', - 'code/renderers', - 'code/presets', + ...glob + .sync('**/src', { + cwd: join(dirname, '../../code'), + onlyDirectories: true, + ignore: ['node_modules'], + }) + .map((p) => `code/${p.replace('src', 'dist')}`), '.verdaccio-cache', '.yarn/code-install-state.gz', '.yarn/scripts-install-state.gz', From 99dd8a5693a045a45e138c9fe1c7a5146689d8b3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 15:23:10 +0100 Subject: [PATCH 034/310] Add workspace attachment step in CircleCI configuration for improved job execution --- .circleci/config.generated.yml | 2 ++ scripts/ci/data.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 5243d6eac049..4c0dc312bf35 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -317,6 +317,8 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 --verbose + - attach_workspace: + at: . - run: command: yarn task --task check --no-link name: TypeCheck code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 514639738cc5..9aff6bb0217e 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -374,6 +374,11 @@ const jobs = { clone_options: '--depth 1 --verbose', }, }, + { + attach_workspace: { + at: '.', + }, + }, { run: { command: 'yarn task --task check --no-link', From b97fad07d7692cc68ddc991343cdf388faac2a8e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 15:58:19 +0100 Subject: [PATCH 035/310] Update CircleCI configuration to upgrade orbs and enhance caching strategy for improved CI performance --- .circleci/config.generated.yml | 63 +++++++++++++++++++++++++++++++--- scripts/ci/data.ts | 15 ++++---- 2 files changed, 67 insertions(+), 11 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 4c0dc312bf35..d6c2f0ba64ae 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1,12 +1,12 @@ version: 2.1 orbs: - browser-tools: circleci/browser-tools@1.4.1 - codecov: codecov/codecov@3.2.4 + browser-tools: circleci/browser-tools@2.3.2 + codecov: codecov/codecov@5.4.3 discord: antonioned/discord@0.1.0 - git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 + git-shallow-clone: guitarrapc/git-shallow-clone@2.8.0 node: circleci/node@7.2.1 - nx: nrwl/nx@1.6.2 - win: circleci/windows@5.0.0 + nx: nrwl/nx@1.7.0 + win: circleci/windows@5.1.1 commands: cancel-workflow-on-failure: description: Cancels the entire workflow in case the previous step has failed @@ -253,58 +253,111 @@ jobs: - code/node_modules - scripts/node_modules - code/core/dist + - code/core/node_modules - code/addons/a11y/dist + - code/addons/a11y/node_modules - code/addons/docs/dist + - code/addons/docs/node_modules - code/addons/links/dist + - code/addons/links/node_modules - code/addons/onboarding/dist + - code/addons/onboarding/node_modules - code/addons/pseudo-states/dist + - code/addons/pseudo-states/node_modules - code/addons/themes/dist + - code/addons/themes/node_modules - code/addons/vitest/dist + - code/addons/vitest/node_modules - code/builders/builder-vite/dist + - code/builders/builder-vite/node_modules - code/builders/builder-webpack5/dist + - code/builders/builder-webpack5/node_modules - code/frameworks/angular/dist + - code/frameworks/angular/node_modules - code/frameworks/ember/dist + - code/frameworks/ember/node_modules - code/frameworks/html-vite/dist + - code/frameworks/html-vite/node_modules - code/frameworks/nextjs/dist + - code/frameworks/nextjs/node_modules - code/frameworks/nextjs-vite/dist + - code/frameworks/nextjs-vite/node_modules - code/frameworks/preact-vite/dist + - code/frameworks/preact-vite/node_modules - code/frameworks/react-native-web-vite/dist + - code/frameworks/react-native-web-vite/node_modules - code/frameworks/react-vite/dist + - code/frameworks/react-vite/node_modules - code/frameworks/react-webpack5/dist + - code/frameworks/react-webpack5/node_modules - code/frameworks/server-webpack5/dist + - code/frameworks/server-webpack5/node_modules - code/frameworks/svelte-vite/dist + - code/frameworks/svelte-vite/node_modules - code/frameworks/sveltekit/dist + - code/frameworks/sveltekit/node_modules - code/frameworks/vue3-vite/dist + - code/frameworks/vue3-vite/node_modules - code/frameworks/web-components-vite/dist + - code/frameworks/web-components-vite/node_modules - code/lib/cli-storybook/dist + - code/lib/cli-storybook/node_modules - code/lib/codemod/dist + - code/lib/codemod/node_modules - code/lib/core-webpack/dist + - code/lib/core-webpack/node_modules - code/lib/create-storybook/dist + - code/lib/create-storybook/node_modules - code/lib/csf-plugin/dist + - code/lib/csf-plugin/node_modules - code/lib/eslint-plugin/dist + - code/lib/eslint-plugin/node_modules - code/lib/react-dom-shim/dist + - code/lib/react-dom-shim/node_modules - code/presets/create-react-app/dist + - code/presets/create-react-app/node_modules - code/presets/react-webpack/dist + - code/presets/react-webpack/node_modules - code/presets/server-webpack/dist + - code/presets/server-webpack/node_modules - code/renderers/html/dist + - code/renderers/html/node_modules - code/renderers/preact/dist + - code/renderers/preact/node_modules - code/renderers/react/dist + - code/renderers/react/node_modules - code/renderers/server/dist + - code/renderers/server/node_modules - code/renderers/svelte/dist + - code/renderers/svelte/node_modules - code/renderers/vue3/dist + - code/renderers/vue3/node_modules - code/renderers/web-components/dist + - code/renderers/web-components/node_modules - code/core/node_modules/human-signals/build/dist + - code/core/node_modules/human-signals/build/node_modules - code/core/dist/core-server/utils/__mockdata__/src + - code/core/node_modules/core-server/utils/__mockdata__/src - code/core/dist/core-server/utils/__search-files-tests__/src + - code/core/node_modules/core-server/utils/__search-files-tests__/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/minimal-config/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/minimal-config/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/some-config/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/some-config/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-angularBrowserTarget/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-nx/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-nx/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-nx-workspace/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-nx-workspace/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-options-styles/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-options-styles/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/without-tsConfig/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/without-tsConfig/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src - code/frameworks/angular/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src + - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src - .verdaccio-cache - .yarn/code-install-state.gz - .yarn/scripts-install-state.gz diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 9aff6bb0217e..0331b4e53461 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -352,7 +352,10 @@ const jobs = { onlyDirectories: true, ignore: ['node_modules'], }) - .map((p) => `code/${p.replace('src', 'dist')}`), + .flatMap((p) => [ + `code/${p.replace('src', 'dist')}`, + `code/${p.replace('src', 'node_modules')}`, + ]), '.verdaccio-cache', '.yarn/code-install-state.gz', '.yarn/scripts-install-state.gz', @@ -1776,13 +1779,13 @@ const jobs = { }, }; const orbs = { - 'browser-tools': 'circleci/browser-tools@1.4.1', - codecov: 'codecov/codecov@3.2.4', + 'browser-tools': 'circleci/browser-tools@2.3.2', + codecov: 'codecov/codecov@5.4.3', discord: 'antonioned/discord@0.1.0', - 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', + 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.8.0', node: 'circleci/node@7.2.1', - nx: 'nrwl/nx@1.6.2', - win: 'circleci/windows@5.0.0', + nx: 'nrwl/nx@1.7.0', + win: 'circleci/windows@5.1.1', }; const parameters = { ghBaseBranch: { From b112d1e29b17cf2e42c8b9659143c2549d4b1b03 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 16:12:46 +0100 Subject: [PATCH 036/310] Remove deprecated CircleCI configuration scripts for dynamic and new config generation, streamlining the CI setup process. --- scripts/ci/generate-dynamic.ts | 111 -------------------------------- scripts/ci/generate-new.ts | 114 --------------------------------- scripts/ci/generate.ts | 13 ++-- 3 files changed, 5 insertions(+), 233 deletions(-) delete mode 100644 scripts/ci/generate-dynamic.ts delete mode 100644 scripts/ci/generate-new.ts diff --git a/scripts/ci/generate-dynamic.ts b/scripts/ci/generate-dynamic.ts deleted file mode 100644 index 296e90d7cce9..000000000000 --- a/scripts/ci/generate-dynamic.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { exec } from 'node:child_process'; -import { readFile } from 'node:fs/promises'; -import { join } from 'node:path'; - -import { Config, Workflow, orb } from '@ndelangen/circleci-config-sdk'; -import { program } from 'commander'; -import yml from 'yaml'; - -program - .description('Generate CircleCI config') - .requiredOption('-w, --workflow ', 'Workflow to generate config for') - .parse(process.argv); - -const { workflow: workflowName } = program.opts(); - -const dirname = import.meta.dirname; - -async function generateConfig() { - console.log('Generating CircleCI config for workflow:', workflowName); - console.log('--------------------------------'); - - const templates = await import( - join(dirname, '../../code/lib/cli-storybook/src/sandbox-templates') - ); - const orbyml = await readFile(join(dirname, '../tmp.yml'), 'utf-8'); - const orbData = yml.parse(orbyml); - - console.log(orbData); - - const config = new Config(); - config.importOrb( - new orb.OrbImport('git-shallow-clone', 'guitarrapc', 'git-shallow-clone', '2.8.0') - ); - config.addWorkflow(new Workflow(workflowName)); - - console.log(config.stringify()); -} - -async function getOrbs() { - const orbs = { - 'browser-tools': 'circleci/browser-tools@1.4.1', - codecov: 'codecov/codecov@3.2.4', - discord: 'antonioned/discord@0.1.0', - 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', - node: 'circleci/node@5.2.0', - nx: 'nrwl/nx@1.6.2', - }; - - return Promise.all( - Object.entries(orbs).map(async ([alias, reference]) => { - const text = await new Promise((resolve, reject) => { - const child = exec(`circleci orb source ${reference}`); - let output = ''; - child.stdout.on('data', (data) => { - output += data.toString(); - }); - child.on('close', () => { - resolve(output); - }); - child.on('error', (error) => { - reject(error); - }); - }); - - type P = Record< - string, - | { - default: Z; - description: string; - type: 'string'; - } - | { - default: Z; - enum: Z[]; - type: 'enum'; - } - >; - - const data = yml.parse(text) as { - version: number; - commands: Record< - string, - { - description: string; - parameters: P; - executors: Record< - string, - { - docker: { image: string }[]; - parameters: P; - } - >; - } - >; - }; - - return { - alias, - reference, - data, - }; - }) - ); -} - -const orbs = await getOrbs(); -console.log(orbs); - -async function convertOrb(input: Awaited>[0]) { - // -} diff --git a/scripts/ci/generate-new.ts b/scripts/ci/generate-new.ts deleted file mode 100644 index 3f71b105870a..000000000000 --- a/scripts/ci/generate-new.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { readFile } from 'node:fs/promises'; -import { join } from 'node:path'; - -import { program } from 'commander'; -import yml from 'yaml'; - -program - .description('Generate CircleCI config') - .requiredOption('-w, --workflow ', 'Workflow to generate config for') - .parse(process.argv); - -const { workflow: workflowName } = program.opts(); - -const dirname = import.meta.dirname; - -console.log('Generating CircleCI config for workflow:', workflowName); -console.log('--------------------------------'); - -const templates = await import(join(dirname, '../../code/lib/cli-storybook/src/sandbox-templates')); - -const jobs = {} as const; - -const data = { - version: 2.1, - commands: { - 'cancel-workflow-on-failure': { - description: 'Cancels the entire workflow in case the previous step has failed', - steps: [ - { - run: { - command: - 'echo "Canceling workflow as previous step resulted in failure."\necho "To execute all checks locally, please run yarn ci-tests"\ncurl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"\n', - name: 'Cancel current workflow', - when: 'on_fail', - }, - }, - ], - }, - 'report-workflow-on-failure': { - description: 'Reports failures to discord', - parameters: { - template: { - default: 'none', - description: - 'Which template to report in discord. Applicable for parallel sandbox jobs\n', - type: 'string', - }, - }, - steps: [ - { - run: { - command: 'git fetch --unshallow', - when: 'on_fail', - }, - }, - { - 'discord/status': { - fail_only: true, - failure_message: - '$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)', - only_for_branches: 'main,next,next-release,latest-release', - }, - }, - ], - }, - 'start-event-collector': { - description: 'Starts the event collector', - steps: [ - { - run: { - background: true, - command: 'yarn jiti ./event-log-collector.ts', - name: 'Start Event Collector', - working_directory: 'scripts', - }, - }, - ], - }, - }, - executors: {}, - jobs, - orbs: { - 'browser-tools': 'circleci/browser-tools@1.4.1', - codecov: 'codecov/codecov@3.2.4', - discord: 'antonioned/discord@0.1.0', - 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.5.0', - node: 'circleci/node@5.2.0', - nx: 'nrwl/nx@1.6.2', - }, - parameters: { - ghBaseBranch: { - default: 'next', - description: 'The name of the base branch (the target of the PR)', - type: 'string', - }, - ghPrNumber: { - default: '', - description: 'The PR number', - type: 'string', - }, - // this has no impact, but must be present until we have implemented change-detection - workflow: { - default: 'normal', - description: 'Which workflow to run', - enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], - type: 'enum', - }, - }, - workflows: { - sandboxes: { - jobs: [], - }, - }, -}; diff --git a/scripts/ci/generate.ts b/scripts/ci/generate.ts index 5f5385fce356..35adae60c62f 100644 --- a/scripts/ci/generate.ts +++ b/scripts/ci/generate.ts @@ -1,6 +1,7 @@ import fs from 'node:fs/promises'; import { join } from 'node:path'; +import { program } from 'commander'; import yml from 'yaml'; import { data } from './data'; @@ -10,14 +11,10 @@ console.log('--------------------------------'); const dirname = import.meta.dirname; -// const existing = await yml.parse( -// await fs.readFile(join(dirname, '../../.circleci/config.original.yml'), 'utf-8') -// ); - -// await fs.writeFile( -// join(dirname, '../../.circleci/config.generated.json'), -// JSON.stringify(existing, null, 2) -// ); +program + .description('Generate CircleCI config') + .requiredOption('-w, --workflow ', 'Workflow to generate config for') + .parse(process.argv); await fs.writeFile( join(dirname, '../../.circleci/config.generated.yml'), From e519ac77b718adad3764795a17561ac7030ed359 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 17:07:17 +0100 Subject: [PATCH 037/310] Enhance CircleCI configuration by adding steps for creating sandboxes and running E2E tests, improving CI workflow and job execution. --- .circleci/config.generated.yml | 28 ++++++++++++++++++++ scripts/ci/data.ts | 48 ++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index d6c2f0ba64ae..488ad6d5d717 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1238,9 +1238,30 @@ jobs: executor: class: xlarge name: sb_playwright + name: react-vite/default-ts steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn local-registry --open + name: Verdaccio + background: true + working_directory: code + - run: + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + name: Wait on Verdaccio + working_directory: code + - run: + command: yarn task --task create-sandboxes --template react-vite/default-ts --no-link -s=never + name: Create sandbox + - persist_to_workspace: + paths: + - sandbox/react-vite-default-ts + root: . sandboxes-a-e2e: executor: class: xlarge @@ -1248,6 +1269,13 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + name: Running E2E Tests sandboxes-b-create: executor: class: xlarge diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 0331b4e53461..f565ee652986 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1730,12 +1730,46 @@ const jobs = { class: 'xlarge', name: 'sb_playwright', }, + name: 'react-vite/default-ts', steps: [ { 'git-shallow-clone/checkout_advanced': { clone_options: '--depth 1 --verbose', }, }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn local-registry --open', + name: 'Verdaccio', + background: true, + working_directory: 'code', + }, + }, + { + run: { + command: 'yarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002', + name: 'Wait on Verdaccio', + working_directory: 'code', + }, + }, + { + run: { + command: + 'yarn task --task create-sandboxes --template react-vite/default-ts --no-link -s=never', + name: 'Create sandbox', + }, + }, + { + persist_to_workspace: { + paths: ['sandbox/react-vite-default-ts'], + }, + root: '.', + }, ], }, 'sandboxes-a-e2e': { @@ -1749,6 +1783,20 @@ const jobs = { clone_options: '--depth 1 --verbose', }, }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: [ + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1', + ].join('\n'), + name: 'Running E2E Tests', + }, + }, ], }, 'sandboxes-b-create': { From 0e3846bdbe892e4ae55017c76476cec55d33e28e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 17:07:37 +0100 Subject: [PATCH 038/310] Refactor CircleCI configuration to update E2E test command template, improving test execution consistency and clarity. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 488ad6d5d717..f6441590885a 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1274,7 +1274,7 @@ jobs: - run: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s=never" --verbose --index=0 --total=1 name: Running E2E Tests sandboxes-b-create: executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index f565ee652986..69ab0774850d 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1792,7 +1792,7 @@ const jobs = { run: { command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s=never" --verbose --index=0 --total=1', ].join('\n'), name: 'Running E2E Tests', }, From 1982201c83c5a63c98a446bfc18e8f1dcfac0a63 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 17:15:52 +0100 Subject: [PATCH 039/310] Remove redundant name entry from CircleCI configuration and ensure consistent root path specification for workspace persistence. --- .circleci/config.generated.yml | 3 +-- scripts/ci/data.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index f6441590885a..ec6952d338de 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1238,7 +1238,6 @@ jobs: executor: class: xlarge name: sb_playwright - name: react-vite/default-ts steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 --verbose @@ -1261,7 +1260,7 @@ jobs: - persist_to_workspace: paths: - sandbox/react-vite-default-ts - root: . + root: . sandboxes-a-e2e: executor: class: xlarge diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 69ab0774850d..04ce7ed1436c 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1730,7 +1730,6 @@ const jobs = { class: 'xlarge', name: 'sb_playwright', }, - name: 'react-vite/default-ts', steps: [ { 'git-shallow-clone/checkout_advanced': { @@ -1767,8 +1766,8 @@ const jobs = { { persist_to_workspace: { paths: ['sandbox/react-vite-default-ts'], + root: '.', }, - root: '.', }, ], }, From e3b126579cb990a788e44e936e974783873485f4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 17:32:31 +0100 Subject: [PATCH 040/310] Add Corepack setup and event collector to CircleCI configuration, enhancing CI workflow and sandbox creation process. --- .circleci/config.generated.yml | 19 ++++++++++++++++++ scripts/ci/data.ts | 35 ++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index ec6952d338de..cbea9c8abb7c 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1254,6 +1254,25 @@ jobs: yarn wait-on tcp:127.0.0.1:6002 name: Wait on Verdaccio working_directory: code + - run: + command: |- + sudo corepack enable + which yarn + yarn --version + name: Setup Corepack + - run: + background: true + command: yarn jiti ./event-log-collector.ts + name: Start Event Collector + working_directory: scripts + - run: + command: yarn dlx wait-on tcp:http://localhost:6007 + - run: + command: yarn task --task sandbox --template react-vite/default-ts --no-link -s=never + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + name: Create Sandboxes - run: command: yarn task --task create-sandboxes --template react-vite/default-ts --no-link -s=never name: Create sandbox diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 04ce7ed1436c..22ad95996260 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1756,6 +1756,41 @@ const jobs = { working_directory: 'code', }, }, + { + run: { + command: [ + // + 'sudo corepack enable', + 'which yarn', + 'yarn --version', + ].join('\n'), + name: 'Setup Corepack', + }, + }, + { + run: { + background: true, + command: 'yarn jiti ./event-log-collector.ts', + name: 'Start Event Collector', + working_directory: 'scripts', + }, + }, + { + run: { + command: 'yarn dlx wait-on tcp:http://localhost:6007', + }, + }, + { + run: { + command: 'yarn task --task sandbox --template react-vite/default-ts --no-link -s=never', + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + }, + name: 'Create Sandboxes', + }, + }, + { run: { command: From d1bfcb737b2966a87e7da3049f114d5300971273 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 17:50:06 +0100 Subject: [PATCH 041/310] Update CircleCI configuration to change executor class and name for sandbox creation, optimizing resource allocation and improving CI job execution. --- .circleci/config.generated.yml | 4 ++-- scripts/ci/data.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index cbea9c8abb7c..fa645fd7aeff 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1236,8 +1236,8 @@ jobs: name: Grouping sandboxes in CI graph sandboxes-a-create: executor: - class: xlarge - name: sb_playwright + class: large + name: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 --verbose diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 22ad95996260..f5c823c5f993 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1727,8 +1727,8 @@ const jobs = { }, 'sandboxes-a-create': { executor: { - class: 'xlarge', - name: 'sb_playwright', + class: 'large', + name: 'sb_node_22_browsers', }, steps: [ { From acd1a69de7beadec5c7fc3e5eeb9fd81945b32b6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 18:31:50 +0100 Subject: [PATCH 042/310] Update CircleCI configuration to use 127.0.0.1 instead of localhost for network commands, ensuring consistent address resolution and improving reliability of CI jobs. --- .circleci/config.generated.yml | 4 ++-- scripts/ci/data.ts | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index fa645fd7aeff..d848aecdfb9d 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1266,12 +1266,12 @@ jobs: name: Start Event Collector working_directory: scripts - run: - command: yarn dlx wait-on tcp:http://localhost:6007 + command: yarn dlx wait-on tcp:127.0.0.1:6007 - run: command: yarn task --task sandbox --template react-vite/default-ts --no-link -s=never environment: STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log + STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log name: Create Sandboxes - run: command: yarn task --task create-sandboxes --template react-vite/default-ts --no-link -s=never diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index f5c823c5f993..43f8826d327b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1751,7 +1751,11 @@ const jobs = { }, { run: { - command: 'yarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002', + command: [ + // + 'yarn wait-on tcp:127.0.0.1:6001', + 'yarn wait-on tcp:127.0.0.1:6002', + ].join('\n'), name: 'Wait on Verdaccio', working_directory: 'code', }, @@ -1777,7 +1781,7 @@ const jobs = { }, { run: { - command: 'yarn dlx wait-on tcp:http://localhost:6007', + command: 'yarn dlx wait-on tcp:127.0.0.1:6007', }, }, { @@ -1785,7 +1789,7 @@ const jobs = { command: 'yarn task --task sandbox --template react-vite/default-ts --no-link -s=never', environment: { STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, name: 'Create Sandboxes', }, From 7e417834e63618ca0f60552f7b4cf91dac830f5e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 18:47:12 +0100 Subject: [PATCH 043/310] Refactor CircleCI configuration to remove unnecessary flags from sandbox creation command, streamlining the CI job execution process. --- .circleci/config.generated.yml | 5 +---- scripts/ci/data.ts | 10 +--------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index d848aecdfb9d..341710d43bfd 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1268,14 +1268,11 @@ jobs: - run: command: yarn dlx wait-on tcp:127.0.0.1:6007 - run: - command: yarn task --task sandbox --template react-vite/default-ts --no-link -s=never + command: yarn task --task sandbox --template react-vite/default-ts --no-link environment: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log name: Create Sandboxes - - run: - command: yarn task --task create-sandboxes --template react-vite/default-ts --no-link -s=never - name: Create sandbox - persist_to_workspace: paths: - sandbox/react-vite-default-ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 43f8826d327b..3e766f6cbc9a 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1786,7 +1786,7 @@ const jobs = { }, { run: { - command: 'yarn task --task sandbox --template react-vite/default-ts --no-link -s=never', + command: 'yarn task --task sandbox --template react-vite/default-ts --no-link', environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', @@ -1794,14 +1794,6 @@ const jobs = { name: 'Create Sandboxes', }, }, - - { - run: { - command: - 'yarn task --task create-sandboxes --template react-vite/default-ts --no-link -s=never', - name: 'Create sandbox', - }, - }, { persist_to_workspace: { paths: ['sandbox/react-vite-default-ts'], From 4b76adf2225ce4c5a03bd9b93d783b7c28124149 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 19:21:44 +0100 Subject: [PATCH 044/310] Update CircleCI configuration to include '-s=auto' flag in sandbox creation command, enhancing the CI job execution process. --- .circleci/config.generated.yml | 3 ++- scripts/ci/data.ts | 3 ++- scripts/task.ts | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 341710d43bfd..b874a023683e 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1268,11 +1268,12 @@ jobs: - run: command: yarn dlx wait-on tcp:127.0.0.1:6007 - run: - command: yarn task --task sandbox --template react-vite/default-ts --no-link + command: yarn task sandbox --template react-vite/default-ts --no-link environment: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log name: Create Sandboxes + working_directory: code - persist_to_workspace: paths: - sandbox/react-vite-default-ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3e766f6cbc9a..c09e2a314460 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1786,12 +1786,13 @@ const jobs = { }, { run: { - command: 'yarn task --task sandbox --template react-vite/default-ts --no-link', + command: 'yarn task sandbox --template react-vite/default-ts --no-link', environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, name: 'Create Sandboxes', + working_directory: 'code', }, }, { diff --git a/scripts/task.ts b/scripts/task.ts index 42a235448b70..09ae98abee36 100644 --- a/scripts/task.ts +++ b/scripts/task.ts @@ -125,6 +125,7 @@ export const options = createOptions({ values: [...(Object.keys(tasks) as TaskKey[]), 'never', 'auto'] as const, // This is prompted later based on information about what's ready promptType: false, + default: process.env.CI ? 'auto' : undefined, }, template: { type: 'string', @@ -371,6 +372,7 @@ async function run() { const allOptionValues = await getOptionsOrPrompt('yarn task', options); const { junit, startFrom, ...optionValues } = allOptionValues; + const taskKey = optionValues.task; if (!(taskKey in tasks)) { From ab614bf2005e55e330c7b8e0f7cd4a010f362c37 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 19:34:25 +0100 Subject: [PATCH 045/310] Update CircleCI configuration to consistently include '-s=auto' flag in sandbox creation command across all relevant scripts, improving CI job execution. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index b874a023683e..29d8405de894 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1268,7 +1268,7 @@ jobs: - run: command: yarn dlx wait-on tcp:127.0.0.1:6007 - run: - command: yarn task sandbox --template react-vite/default-ts --no-link + command: yarn task sandbox --template react-vite/default-ts --no-link -s=auto environment: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index c09e2a314460..b82ec3eb4beb 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1786,7 +1786,7 @@ const jobs = { }, { run: { - command: 'yarn task sandbox --template react-vite/default-ts --no-link', + command: 'yarn task sandbox --template react-vite/default-ts --no-link -s=auto', environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', From f6a4cb4db0f008bf597aea7e7010bd0c7dac457a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 19:45:32 +0100 Subject: [PATCH 046/310] Refactor CircleCI configuration to remove '=' from '-s=auto' and '-s=never' flags in sandbox and E2E test commands, improving command consistency. --- .circleci/config.generated.yml | 4 ++-- scripts/ci/data.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 29d8405de894..d75eb1bec018 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1268,7 +1268,7 @@ jobs: - run: command: yarn dlx wait-on tcp:127.0.0.1:6007 - run: - command: yarn task sandbox --template react-vite/default-ts --no-link -s=auto + command: yarn task sandbox --template react-vite/default-ts --no-link -s auto environment: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log @@ -1290,7 +1290,7 @@ jobs: - run: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s=never" --verbose --index=0 --total=1 + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests sandboxes-b-create: executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index b82ec3eb4beb..bf508f3a7d91 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1786,7 +1786,7 @@ const jobs = { }, { run: { - command: 'yarn task sandbox --template react-vite/default-ts --no-link -s=auto', + command: 'yarn task sandbox --template react-vite/default-ts --no-link -s auto', environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', @@ -1823,7 +1823,7 @@ const jobs = { run: { command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s=never" --verbose --index=0 --total=1', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', ].join('\n'), name: 'Running E2E Tests', }, From 659e38f4ec79b36fe33767da500e95c1611ce7f8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 20:04:44 +0100 Subject: [PATCH 047/310] Refactor yarn installation script to append to 'yarn.lock' and '.yarnrc.yml' files instead of using touch commands, improving file handling and command execution. --- scripts/utils/yarn.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/utils/yarn.ts b/scripts/utils/yarn.ts index 0f202d105d6f..fa0c0eba4c63 100644 --- a/scripts/utils/yarn.ts +++ b/scripts/utils/yarn.ts @@ -52,9 +52,10 @@ export const installYarn2 = async ({ cwd, dryRun, debug }: YarnOptions) => { // TODO: Remove in SB11 const pnpApiExists = await pathExists(join(cwd, '.pnp.cjs')); + await writeFile(join(cwd, 'yarn.lock'), '', { flag: 'a' }); + await writeFile(join(cwd, '.yarnrc.yml'), '', { flag: 'a' }); + const command = [ - touch('yarn.lock'), - touch('.yarnrc.yml'), `yarn set version berry`, // Use the global cache so we aren't re-caching dependencies each time we run sandbox @@ -67,7 +68,7 @@ export const installYarn2 = async ({ cwd, dryRun, debug }: YarnOptions) => { } await exec( - command, + command.join(' && '), { cwd }, { dryRun, From cf73c079d4d9948e40fd8c634f03c879af6bf63f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 20:27:41 +0100 Subject: [PATCH 048/310] wip --- scripts/utils/yarn.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/utils/yarn.ts b/scripts/utils/yarn.ts index fa0c0eba4c63..4de4d47ae8ca 100644 --- a/scripts/utils/yarn.ts +++ b/scripts/utils/yarn.ts @@ -5,7 +5,6 @@ import { join } from 'node:path'; import storybookVersions from '../../code/core/src/common/versions'; import type { TemplateKey } from '../get-template'; import { exec } from './exec'; -import touch from './touch'; export type YarnOptions = { cwd: string; @@ -49,17 +48,16 @@ export const addPackageResolutions = async ({ cwd, dryRun }: YarnOptions) => { export const installYarn2 = async ({ cwd, dryRun, debug }: YarnOptions) => { await rm(join(cwd, '.yarnrc.yml'), { force: true }).catch(() => {}); - // TODO: Remove in SB11 - const pnpApiExists = await pathExists(join(cwd, '.pnp.cjs')); - - await writeFile(join(cwd, 'yarn.lock'), '', { flag: 'a' }); - await writeFile(join(cwd, '.yarnrc.yml'), '', { flag: 'a' }); + const [pnpApiExists] = await Promise.all([ + // TODO: Remove in SB11 + pathExists(join(cwd, '.pnp.cjs')), + writeFile(join(cwd, 'yarn.lock'), ''), + writeFile(join(cwd, '.yarnrc.yml'), ''), + ]); const command = [ `yarn set version berry`, - - // Use the global cache so we aren't re-caching dependencies each time we run sandbox - `yarn config set enableGlobalCache true`, + `yarn config set enableGlobalCache true`, // Use the global cache so we aren't re-caching dependencies each time we run sandbox `yarn config set checksumBehavior ignore`, ]; From b21a9523e5862c946e022d33582537f6f1138947 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 20:53:38 +0100 Subject: [PATCH 049/310] Enhance yarn installation script to create the target directory before writing 'yarn.lock' and '.yarnrc.yml' files, improving file management and ensuring proper execution. --- scripts/utils/yarn.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/utils/yarn.ts b/scripts/utils/yarn.ts index 4de4d47ae8ca..2267e27c41c9 100644 --- a/scripts/utils/yarn.ts +++ b/scripts/utils/yarn.ts @@ -1,4 +1,4 @@ -import { access, readFile, rm, writeFile } from 'node:fs/promises'; +import { access, mkdir, readFile, rm, writeFile } from 'node:fs/promises'; import { join } from 'node:path'; // TODO -- should we generate this file a second time outside of CLI? @@ -51,8 +51,13 @@ export const installYarn2 = async ({ cwd, dryRun, debug }: YarnOptions) => { const [pnpApiExists] = await Promise.all([ // TODO: Remove in SB11 pathExists(join(cwd, '.pnp.cjs')), - writeFile(join(cwd, 'yarn.lock'), ''), - writeFile(join(cwd, '.yarnrc.yml'), ''), + mkdir(cwd, { recursive: true }).then(() => + Promise.all([ + // + writeFile(join(cwd, 'yarn.lock'), ''), + writeFile(join(cwd, '.yarnrc.yml'), ''), + ]) + ), ]); const command = [ From 3f7e2e05f867bec1709fcfe73a7f55088339a157 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 21:20:48 +0100 Subject: [PATCH 050/310] Refactor CircleCI configuration to start the event log collector in the background and update wait commands for improved server readiness checks, enhancing CI job execution. --- .circleci/config.generated.yml | 19 +++++++++---------- scripts/ci/data.ts | 34 +++++++++++++++------------------- scripts/utils/yarn.ts | 2 +- 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index d75eb1bec018..f2004d427791 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1248,11 +1248,17 @@ jobs: name: Verdaccio background: true working_directory: code + - run: + background: true + command: yarn jiti ./event-log-collector.ts + name: Start Event Collector + working_directory: scripts - run: command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio + yarn wait-on tcp:127.0.0.1:6007 + name: Wait on servers working_directory: code - run: command: |- @@ -1261,19 +1267,12 @@ jobs: yarn --version name: Setup Corepack - run: - background: true - command: yarn jiti ./event-log-collector.ts - name: Start Event Collector - working_directory: scripts - - run: - command: yarn dlx wait-on tcp:127.0.0.1:6007 - - run: - command: yarn task sandbox --template react-vite/default-ts --no-link -s auto + command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug environment: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log name: Create Sandboxes - working_directory: code + working_directory: . - persist_to_workspace: paths: - sandbox/react-vite-default-ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index bf508f3a7d91..6b67b949c699 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1749,14 +1749,22 @@ const jobs = { working_directory: 'code', }, }, + { + run: { + background: true, + command: 'yarn jiti ./event-log-collector.ts', + name: 'Start Event Collector', + working_directory: 'scripts', + }, + }, { run: { command: [ - // - 'yarn wait-on tcp:127.0.0.1:6001', - 'yarn wait-on tcp:127.0.0.1:6002', + 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio + 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy + 'yarn wait-on tcp:127.0.0.1:6007', // event collector ].join('\n'), - name: 'Wait on Verdaccio', + name: 'Wait on servers', working_directory: 'code', }, }, @@ -1773,26 +1781,14 @@ const jobs = { }, { run: { - background: true, - command: 'yarn jiti ./event-log-collector.ts', - name: 'Start Event Collector', - working_directory: 'scripts', - }, - }, - { - run: { - command: 'yarn dlx wait-on tcp:127.0.0.1:6007', - }, - }, - { - run: { - command: 'yarn task sandbox --template react-vite/default-ts --no-link -s auto', + command: + 'yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug', environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, name: 'Create Sandboxes', - working_directory: 'code', + working_directory: '.', }, }, { diff --git a/scripts/utils/yarn.ts b/scripts/utils/yarn.ts index 2267e27c41c9..e6493f68bf17 100644 --- a/scripts/utils/yarn.ts +++ b/scripts/utils/yarn.ts @@ -172,7 +172,7 @@ export const configureYarn2ForVerdaccio = async ({ } await exec( - command, + command.join(' && '), { cwd }, { dryRun, From a5531be785f923539c26006fb510ea8afa280520 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 21:29:21 +0100 Subject: [PATCH 051/310] Update CircleCI configuration to store log artifacts from sandbox creation, enhancing debugging capabilities and improving CI job monitoring. --- .circleci/config.generated.yml | 2 ++ scripts/ci/data.ts | 5 +++++ scripts/utils/cli-step.ts | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index f2004d427791..ef22357f969c 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1273,6 +1273,8 @@ jobs: STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log name: Create Sandboxes working_directory: . + - store_artifacts: + path: sandbox/react-vite-default-ts/*.log - persist_to_workspace: paths: - sandbox/react-vite-default-ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 6b67b949c699..42b580e4be1a 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1791,6 +1791,11 @@ const jobs = { working_directory: '.', }, }, + { + store_artifacts: { + path: 'sandbox/react-vite-default-ts/*.log', + }, + }, { persist_to_workspace: { paths: ['sandbox/react-vite-default-ts'], diff --git a/scripts/utils/cli-step.ts b/scripts/utils/cli-step.ts index 05b809b11cc5..6ce802e46c44 100644 --- a/scripts/utils/cli-step.ts +++ b/scripts/utils/cli-step.ts @@ -22,7 +22,7 @@ export type CLIStep = { export const steps = { repro: { - command: 'repro', + command: 'sandbox', description: 'Bootstrapping Template', icon: '👷', hasArgument: true, From 5152ddb03334521e226305c51104443950132fe9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 22:12:12 +0100 Subject: [PATCH 052/310] Add debug logging to sandbox creation and task execution for improved traceability --- .circleci/config.generated.yml | 1 - code/lib/cli-storybook/src/sandbox.ts | 1 + scripts/ci/data.ts | 1 - scripts/tasks/sandbox-parts.ts | 1 + 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index ef22357f969c..f9de8a4b35f3 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1272,7 +1272,6 @@ jobs: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log name: Create Sandboxes - working_directory: . - store_artifacts: path: sandbox/react-vite-default-ts/*.log - persist_to_workspace: diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index 9e4467f6260c..d2d302be1d0c 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -42,6 +42,7 @@ export const sandbox = async ({ let selectedConfig: Template | undefined = TEMPLATES[filterValue as TemplateKey]; let templateId: Choice | null = selectedConfig ? (filterValue as TemplateKey) : null; + console.log({ options, output: outputDirectory, filterValue, init, templateId, selectedConfig }); const { packageManager: pkgMgr } = options; const packageManager = JsPackageManagerFactory.getPackageManager({ diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 42b580e4be1a..5d72757776e1 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1788,7 +1788,6 @@ const jobs = { STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, name: 'Create Sandboxes', - working_directory: '.', }, }, { diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 98e3de51ab48..019dc11137f2 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -108,6 +108,7 @@ export const create: Task['run'] = async ({ key, template, sandboxDir }, { dryRu } await cp(srcDir, sandboxDir, { recursive: true }); } else { + console.log({ key, sandboxDir, parentDir, dryRun, debug }); await executeCLIStep(steps.repro, { argument: key, optionValues: { output: sandboxDir, init: false, debug }, From ef2df29074a11a22b2db4a765b66ba3f58c545a0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 22:45:52 +0100 Subject: [PATCH 053/310] Add loglevel option to sandbox creation and enhance logging in CLI steps for better debugging --- code/lib/cli-storybook/src/sandbox.ts | 1 + scripts/tasks/sandbox-parts.ts | 2 +- scripts/utils/cli-step.ts | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index d2d302be1d0c..7fd214807d42 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -200,6 +200,7 @@ export const sandbox = async ({ try { // Download the sandbox based on subfolder "after-storybook" and selected branch const gitPath = `storybookjs/sandboxes/tree/${branch}/${templateId}/${downloadType}`; + console.log({ gitPath, templateDestination }); spawnSync('npx', ['gitpick@4.12.4', gitPath, templateDestination, '-o']); // throw an error if templateDestination is an empty directory if ((await readdir(templateDestination)).length === 0) { diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 019dc11137f2..95062a304afe 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -111,7 +111,7 @@ export const create: Task['run'] = async ({ key, template, sandboxDir }, { dryRu console.log({ key, sandboxDir, parentDir, dryRun, debug }); await executeCLIStep(steps.repro, { argument: key, - optionValues: { output: sandboxDir, init: false, debug }, + optionValues: { output: sandboxDir, init: false, debug, loglevel: 'debug' }, cwd: parentDir, dryRun, debug, diff --git a/scripts/utils/cli-step.ts b/scripts/utils/cli-step.ts index 6ce802e46c44..b1b63b430fd1 100644 --- a/scripts/utils/cli-step.ts +++ b/scripts/utils/cli-step.ts @@ -30,6 +30,7 @@ export const steps = { output: { type: 'string' }, // TODO allow default values for strings branch: { type: 'string', values: ['main', 'next'] }, + loglevel: { type: 'string' }, init: { type: 'boolean', inverse: true }, debug: { type: 'boolean' }, }), @@ -123,6 +124,8 @@ export async function executeCLIStep( options.optionValues || {} ); + console.log({ command, options }); + await exec( command, { From cc9f5f0aedbb83bb7e8a5cf20357c1e666b2ac31 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 23:00:39 +0100 Subject: [PATCH 054/310] Improve debug logging in sandbox function by adding console outputs for isOutdated, isPrerelease, selectedConfig, selectedDirectory, and outputDirectoryName to enhance traceability during execution. --- code/lib/cli-storybook/src/sandbox.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index 7fd214807d42..752df30590d5 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -72,6 +72,8 @@ export const sandbox = async ({ prerelease: picocolors.yellow('This is a pre-release version.'), }; + console.log({ isOutdated, isPrerelease }); + logger.logBox( [messages.welcome] .concat(isOutdated && !isPrerelease ? [messages.notLatest] : []) @@ -83,6 +85,8 @@ export const sandbox = async ({ } ); + console.log({ selectedConfig }); + if (!selectedConfig) { const filterRegex = new RegExp(`^${filterValue || ''}`, 'i'); @@ -162,7 +166,11 @@ export const sandbox = async ({ } let selectedDirectory = outputDirectory; + const outputDirectoryName = outputDirectory || templateId; + + console.log({ selectedDirectory, outputDirectoryName }); + if (selectedDirectory && existsSync(`${selectedDirectory}`)) { logger.log(`⚠️ ${selectedDirectory} already exists! Overwriting...`); await rm(selectedDirectory, { recursive: true, force: true }); @@ -187,7 +195,7 @@ export const sandbox = async ({ ); selectedDirectory = directory; } - invariant(selectedDirectory); + // invariant(selectedDirectory); try { const templateDestination = isAbsolute(selectedDirectory) From 1ad7595fbfd2c41027cc4ae2f11562adece431c7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 23:12:53 +0100 Subject: [PATCH 055/310] Remove commented-out message logging in sandbox function to clean up code and improve readability. --- code/lib/cli-storybook/src/sandbox.ts | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index 752df30590d5..d4bd458d7a93 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -57,33 +57,33 @@ export const sandbox = async ({ const downloadType = !isOutdated && init ? 'after-storybook' : 'before-storybook'; const branch = isPrerelease ? 'next' : 'main'; - const messages = { - welcome: `Creating a Storybook ${picocolors.bold(currentVersion)} sandbox..`, - notLatest: picocolors.red(dedent` - This version is behind the latest release, which is: ${picocolors.bold(latestVersion)}! - You likely ran the init command through npx, which can use a locally cached version, to get the latest please run: - ${picocolors.bold('npx storybook@latest sandbox')} - - You may want to CTRL+C to stop, and run with the latest version instead. - `), - longInitTime: picocolors.yellow( - 'The creation of the sandbox will take longer, because we will need to run init.' - ), - prerelease: picocolors.yellow('This is a pre-release version.'), - }; + // const messages = { + // welcome: `Creating a Storybook ${picocolors.bold(currentVersion)} sandbox..`, + // notLatest: picocolors.red(dedent` + // This version is behind the latest release, which is: ${picocolors.bold(latestVersion)}! + // You likely ran the init command through npx, which can use a locally cached version, to get the latest please run: + // ${picocolors.bold('npx storybook@latest sandbox')} + + // You may want to CTRL+C to stop, and run with the latest version instead. + // `), + // longInitTime: picocolors.yellow( + // 'The creation of the sandbox will take longer, because we will need to run init.' + // ), + // prerelease: picocolors.yellow('This is a pre-release version.'), + // }; console.log({ isOutdated, isPrerelease }); - logger.logBox( - [messages.welcome] - .concat(isOutdated && !isPrerelease ? [messages.notLatest] : []) - .concat(init && (isOutdated || isPrerelease) ? [messages.longInitTime] : []) - .concat(isPrerelease ? [messages.prerelease] : []) - .join('\n'), - { - rounded: true, - } - ); + // logger.logBox( + // [messages.welcome] + // .concat(isOutdated && !isPrerelease ? [messages.notLatest] : []) + // .concat(init && (isOutdated || isPrerelease) ? [messages.longInitTime] : []) + // .concat(isPrerelease ? [messages.prerelease] : []) + // .join('\n'), + // { + // rounded: true, + // } + // ); console.log({ selectedConfig }); From 1cf84623e8e98fa0f6ffe782724744e26f791c5a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 23:27:04 +0100 Subject: [PATCH 056/310] Update logger behavior to skip logging in CI environment and modify CircleCI artifact path for improved log management. --- code/core/src/node-logger/logger/logger.ts | 3 +++ code/lib/cli-storybook/src/sandbox.ts | 26 +++++++++++----------- scripts/ci/data.ts | 3 ++- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/code/core/src/node-logger/logger/logger.ts b/code/core/src/node-logger/logger/logger.ts index a6faf8bb95a8..dd282c50da95 100644 --- a/code/core/src/node-logger/logger/logger.ts +++ b/code/core/src/node-logger/logger/logger.ts @@ -166,6 +166,9 @@ type BoxOptions = { } & clack.BoxOptions; export const logBox = (message: string, { title, ...options }: BoxOptions = {}) => { + if (process.env.CI) { + return; + } if (shouldLog('info')) { logTracker.addLog('info', message); if (isClackEnabled()) { diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index d4bd458d7a93..3a36676164a8 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -251,23 +251,23 @@ export const sandbox = async ({ `) : `Recreate your setup, then ${picocolors.yellow(`npx storybook@latest init`)}`; - logger.logBox( - dedent` - 🎉 Your Storybook reproduction project is ready to use! 🎉 + // logger.logBox( + // dedent` + // 🎉 Your Storybook reproduction project is ready to use! 🎉 - ${picocolors.yellow(`cd ${selectedDirectory}`)} - ${initMessage} + // ${picocolors.yellow(`cd ${selectedDirectory}`)} + // ${initMessage} - Once you've recreated the problem you're experiencing, please: + // Once you've recreated the problem you're experiencing, please: - 1. Document any additional steps in ${picocolors.cyan('README.md')} - 2. Publish the repository to github - 3. Link to the repro repository in your issue + // 1. Document any additional steps in ${picocolors.cyan('README.md')} + // 2. Publish the repository to github + // 3. Link to the repro repository in your issue - Having a clean repro helps us solve your issue faster! 🙏 - `.trim(), - { rounded: true } - ); + // Having a clean repro helps us solve your issue faster! 🙏 + // `.trim(), + // { rounded: true } + // ); } catch (error) { logger.error('🚨 Failed to create sandbox'); throw error; diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 5d72757776e1..3bd4f97d5c93 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1792,7 +1792,8 @@ const jobs = { }, { store_artifacts: { - path: 'sandbox/react-vite-default-ts/*.log', + path: 'sandbox/react-vite-default-ts/debug-storybook.log', + destination: 'logs', }, }, { From 5885206d0fe9e79a8939e84fea0e6a9237f0eed8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 25 Nov 2025 23:58:59 +0100 Subject: [PATCH 057/310] Update CircleCI configuration to change artifact path for logs and modify E2E test command to use 'build' instead of 'never', enhancing test execution and log management. --- .circleci/config.generated.yml | 15 +++++++++++++-- scripts/ci/data.ts | 21 ++++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index f9de8a4b35f3..e01c44b89913 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1273,7 +1273,8 @@ jobs: STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log name: Create Sandboxes - store_artifacts: - path: sandbox/react-vite-default-ts/*.log + path: sandbox/react-vite-default-ts/debug-storybook.log + destination: logs - persist_to_workspace: paths: - sandbox/react-vite-default-ts @@ -1287,10 +1288,20 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . + - run: + command: yarn task e2e-tests --template react-vite/default-ts --no-link -s build + name: Build storybook + - run: + command: yarn task serve --template react-vite/default-ts --no-link -s serve + background: true + name: Serve storybook + - run: + command: yarn wait-on tcp:127.0.0.1:8001 + name: Wait on storybook - run: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests sandboxes-b-create: executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3bd4f97d5c93..79f058d46216 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1820,11 +1820,30 @@ const jobs = { at: '.', }, }, + { + run: { + command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s build', + name: 'Build storybook', + }, + }, + { + run: { + command: 'yarn task serve --template react-vite/default-ts --no-link -s serve', + background: true, + name: 'Serve storybook', + }, + }, + { + run: { + command: 'yarn wait-on tcp:127.0.0.1:8001', + name: 'Wait on storybook', + }, + }, { run: { command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', ].join('\n'), name: 'Running E2E Tests', }, From 94f59b17b410bbd52e440dd1c53efa51a2b150b6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 26 Nov 2025 00:12:53 +0100 Subject: [PATCH 058/310] Refactor CircleCI configuration to update the build command for storybook, replacing 'e2e-tests' with 'build' for improved clarity and consistency in CI job execution. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index e01c44b89913..9a830c8d7ef8 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1289,7 +1289,7 @@ jobs: - attach_workspace: at: . - run: - command: yarn task e2e-tests --template react-vite/default-ts --no-link -s build + command: yarn task build --template react-vite/default-ts --no-link -s build name: Build storybook - run: command: yarn task serve --template react-vite/default-ts --no-link -s serve diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 79f058d46216..93bfa0559537 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1822,7 +1822,7 @@ const jobs = { }, { run: { - command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s build', + command: 'yarn task build --template react-vite/default-ts --no-link -s build', name: 'Build storybook', }, }, From 8ae97fe5e7dc10ef5f98878e16d8e8d466ba2205 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 26 Nov 2025 00:17:05 +0100 Subject: [PATCH 059/310] Update CircleCI configuration to set working directory for storybook wait command, ensuring consistent execution context across jobs. --- .circleci/config.generated.yml | 1 + scripts/ci/data.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 9a830c8d7ef8..7127cdbd68e0 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1298,6 +1298,7 @@ jobs: - run: command: yarn wait-on tcp:127.0.0.1:8001 name: Wait on storybook + working_directory: code - run: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 93bfa0559537..bb20c4843fe8 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1837,6 +1837,7 @@ const jobs = { run: { command: 'yarn wait-on tcp:127.0.0.1:8001', name: 'Wait on storybook', + working_directory: 'code', }, }, { From cb6125e394022579c6ccd4686089610596cda26b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 26 Nov 2025 09:25:18 +0100 Subject: [PATCH 060/310] Add 'sandboxes-a-dev' job to CircleCI configuration for running Storybook and E2E tests --- .circleci/config.generated.yml | 26 +++++++++++++++++++ scripts/ci/data.ts | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 7127cdbd68e0..376513db69ac 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1304,6 +1304,29 @@ jobs: TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests + sandboxes-a-dev: + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - run: + command: yarn task dev --template react-vite/default-ts --no-link -s dev + name: Run storybook + working_directory: code + background: true + - run: + command: yarn wait-on tcp:127.0.0.1:6006 + name: Wait on storybook + working_directory: code + - run: + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + name: Running E2E Tests sandboxes-b-create: executor: class: xlarge @@ -1439,6 +1462,9 @@ workflows: - sandboxes-a-e2e: requires: - sandboxes-a-create + - sandboxes-a-dev: + requires: + - sandboxes-a-create - sandboxes-b-create: requires: - sandboxes diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index bb20c4843fe8..adfb41195a2c 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1851,6 +1851,48 @@ const jobs = { }, ], }, + 'sandboxes-a-dev': { + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + run: { + command: 'yarn task dev --template react-vite/default-ts --no-link -s dev', + name: 'Run storybook', + working_directory: 'code', + background: true, + }, + }, + { + run: { + command: 'yarn wait-on tcp:127.0.0.1:6006', + name: 'Wait on storybook', + working_directory: 'code', + }, + }, + { + run: { + command: [ + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', + ].join('\n'), + name: 'Running E2E Tests', + }, + }, + ], + }, 'sandboxes-b-create': { executor: { class: 'xlarge', @@ -2069,6 +2111,11 @@ const workflows = { requires: ['sandboxes-a-create'], }, }, + { + 'sandboxes-a-dev': { + requires: ['sandboxes-a-create'], + }, + }, { 'sandboxes-b-create': { requires: ['sandboxes'], From 7665aee3c13a623d0a405d2f9c2787bfa6c4b449 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 26 Nov 2025 09:44:53 +0100 Subject: [PATCH 061/310] Update CircleCI configuration to modify E2E test command from 'e2e-tests' to 'e2e-tests-dev' for improved test execution consistency. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 376513db69ac..a4cc6fa932f1 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1325,7 +1325,7 @@ jobs: - run: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests sandboxes-b-create: executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index adfb41195a2c..60950debaae8 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1886,7 +1886,7 @@ const jobs = { run: { command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', ].join('\n'), name: 'Running E2E Tests', }, From dda8db0314e01a8147bd6b379de27395af510b86 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 26 Nov 2025 10:06:20 +0100 Subject: [PATCH 062/310] Refactor CircleCI configuration to rename 'sandboxes-a-e2e' job to 'sandboxes-a-build' for improved clarity and consistency in CI job execution. --- .circleci/config.generated.yml | 4 ++-- scripts/ci/data.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index a4cc6fa932f1..6c690a321026 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1279,7 +1279,7 @@ jobs: paths: - sandbox/react-vite-default-ts root: . - sandboxes-a-e2e: + sandboxes-a-build: executor: class: xlarge name: sb_playwright @@ -1459,7 +1459,7 @@ workflows: - sandboxes-a-create: requires: - sandboxes - - sandboxes-a-e2e: + - sandboxes-a-build: requires: - sandboxes-a-create - sandboxes-a-dev: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 60950debaae8..0d13b2e05ec2 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1804,7 +1804,7 @@ const jobs = { }, ], }, - 'sandboxes-a-e2e': { + 'sandboxes-a-build': { executor: { class: 'xlarge', name: 'sb_playwright', @@ -2107,7 +2107,7 @@ const workflows = { }, }, { - 'sandboxes-a-e2e': { + 'sandboxes-a-build': { requires: ['sandboxes-a-create'], }, }, From 5af0e28a224b959c07eb6249a7f41100ce05a27d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 26 Nov 2025 17:07:36 +0100 Subject: [PATCH 063/310] try out not storing top level node_modules for perf --- .circleci/config.generated.yml | 29 ++++++++++++++--- scripts/ci/data.ts | 58 +++++++++++++++++++++++++++++++--- 2 files changed, 77 insertions(+), 10 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 6c690a321026..50773e9ffba7 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -250,8 +250,6 @@ jobs: path: code/bench/esbuild-metafiles - persist_to_workspace: paths: - - code/node_modules - - scripts/node_modules - code/core/dist - code/core/node_modules - code/addons/a11y/dist @@ -359,9 +357,6 @@ jobs: - code/frameworks/angular/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src - code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src - .verdaccio-cache - - .yarn/code-install-state.gz - - .yarn/scripts-install-state.gz - - .yarn/root-install-state.gz root: . check: executor: @@ -372,6 +367,12 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . + - node/install-packages: + app-dir: code + pkg-manager: yarn + - node/install-packages: + app-dir: scripts + pkg-manager: yarn - run: command: yarn task --task check --no-link name: TypeCheck code @@ -1243,6 +1244,12 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . + - node/install-packages: + app-dir: code + pkg-manager: yarn + - node/install-packages: + app-dir: scripts + pkg-manager: yarn - run: command: yarn local-registry --open name: Verdaccio @@ -1288,6 +1295,12 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . + - node/install-packages: + app-dir: code + pkg-manager: yarn + - node/install-packages: + app-dir: scripts + pkg-manager: yarn - run: command: yarn task build --template react-vite/default-ts --no-link -s build name: Build storybook @@ -1313,6 +1326,12 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . + - node/install-packages: + app-dir: code + pkg-manager: yarn + - node/install-packages: + app-dir: scripts + pkg-manager: yarn - run: command: yarn task dev --template react-vite/default-ts --no-link -s dev name: Run storybook diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 0d13b2e05ec2..7bbd73f5e831 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -344,8 +344,8 @@ const jobs = { { persist_to_workspace: { paths: [ - 'code/node_modules', - 'scripts/node_modules', + // 'code/node_modules', + // 'scripts/node_modules', ...glob .sync('**/src', { cwd: join(dirname, '../../code'), @@ -357,9 +357,9 @@ const jobs = { `code/${p.replace('src', 'node_modules')}`, ]), '.verdaccio-cache', - '.yarn/code-install-state.gz', - '.yarn/scripts-install-state.gz', - '.yarn/root-install-state.gz', + // '.yarn/code-install-state.gz', + // '.yarn/scripts-install-state.gz', + // '.yarn/root-install-state.gz', ], root: '.', }, @@ -382,6 +382,18 @@ const jobs = { at: '.', }, }, + { + 'node/install-packages': { + 'app-dir': 'code', + 'pkg-manager': 'yarn', + }, + }, + { + 'node/install-packages': { + 'app-dir': 'scripts', + 'pkg-manager': 'yarn', + }, + }, { run: { command: 'yarn task --task check --no-link', @@ -1741,6 +1753,18 @@ const jobs = { at: '.', }, }, + { + 'node/install-packages': { + 'app-dir': 'code', + 'pkg-manager': 'yarn', + }, + }, + { + 'node/install-packages': { + 'app-dir': 'scripts', + 'pkg-manager': 'yarn', + }, + }, { run: { command: 'yarn local-registry --open', @@ -1820,6 +1844,18 @@ const jobs = { at: '.', }, }, + { + 'node/install-packages': { + 'app-dir': 'code', + 'pkg-manager': 'yarn', + }, + }, + { + 'node/install-packages': { + 'app-dir': 'scripts', + 'pkg-manager': 'yarn', + }, + }, { run: { command: 'yarn task build --template react-vite/default-ts --no-link -s build', @@ -1867,6 +1903,18 @@ const jobs = { at: '.', }, }, + { + 'node/install-packages': { + 'app-dir': 'code', + 'pkg-manager': 'yarn', + }, + }, + { + 'node/install-packages': { + 'app-dir': 'scripts', + 'pkg-manager': 'yarn', + }, + }, { run: { command: 'yarn task dev --template react-vite/default-ts --no-link -s dev', From d8ec8af86fbdf28e73b6242dbd28c0b28b53a405 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 13:44:40 +0100 Subject: [PATCH 064/310] Refactor CircleCI configuration to implement caching for node_modules and optimize package installation, enhancing build performance and consistency across jobs. --- .circleci/config.generated.yml | 50 ++++++++++++----------- scripts/ci/data.ts | 73 +++++++++++++++++----------------- 2 files changed, 63 insertions(+), 60 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 50773e9ffba7..f260929fafe5 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -231,6 +231,16 @@ jobs: - node/install-packages: app-dir: scripts pkg-manager: yarn + - save_cache: + paths: + - .yarn/code-install-state.gz + - .yarn/scripts-install-state.gz + - .yarn/root-install-state.gz + - code/node_modules + - scripts/node_modules + keys: + - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} + - node_modules- - run: command: git diff --exit-code name: Check for changes @@ -367,12 +377,10 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . - - node/install-packages: - app-dir: code - pkg-manager: yarn - - node/install-packages: - app-dir: scripts - pkg-manager: yarn + - restore_cache: + keys: + - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} + - node_modules- - run: command: yarn task --task check --no-link name: TypeCheck code @@ -1244,12 +1252,10 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . - - node/install-packages: - app-dir: code - pkg-manager: yarn - - node/install-packages: - app-dir: scripts - pkg-manager: yarn + - restore_cache: + keys: + - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} + - node_modules- - run: command: yarn local-registry --open name: Verdaccio @@ -1295,12 +1301,10 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . - - node/install-packages: - app-dir: code - pkg-manager: yarn - - node/install-packages: - app-dir: scripts - pkg-manager: yarn + - restore_cache: + keys: + - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} + - node_modules- - run: command: yarn task build --template react-vite/default-ts --no-link -s build name: Build storybook @@ -1326,12 +1330,10 @@ jobs: clone_options: --depth 1 --verbose - attach_workspace: at: . - - node/install-packages: - app-dir: code - pkg-manager: yarn - - node/install-packages: - app-dir: scripts - pkg-manager: yarn + - restore_cache: + keys: + - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} + - node_modules- - run: command: yarn task dev --template react-vite/default-ts --no-link -s dev name: Run storybook diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 7bbd73f5e831..d7d17d86edc7 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -309,6 +309,22 @@ const jobs = { 'pkg-manager': 'yarn', }, }, + { + save_cache: { + paths: [ + // + '.yarn/code-install-state.gz', + '.yarn/scripts-install-state.gz', + '.yarn/root-install-state.gz', + 'code/node_modules', + 'scripts/node_modules', + ], + keys: [ + 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', + 'node_modules-', + ], + }, + }, { run: { command: 'git diff --exit-code', @@ -383,15 +399,11 @@ const jobs = { }, }, { - 'node/install-packages': { - 'app-dir': 'code', - 'pkg-manager': 'yarn', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'pkg-manager': 'yarn', + restore_cache: { + keys: [ + 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', + 'node_modules-', + ], }, }, { @@ -1754,17 +1766,14 @@ const jobs = { }, }, { - 'node/install-packages': { - 'app-dir': 'code', - 'pkg-manager': 'yarn', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'pkg-manager': 'yarn', + restore_cache: { + keys: [ + 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', + 'node_modules-', + ], }, }, + { run: { command: 'yarn local-registry --open', @@ -1845,15 +1854,11 @@ const jobs = { }, }, { - 'node/install-packages': { - 'app-dir': 'code', - 'pkg-manager': 'yarn', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'pkg-manager': 'yarn', + restore_cache: { + keys: [ + 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', + 'node_modules-', + ], }, }, { @@ -1904,15 +1909,11 @@ const jobs = { }, }, { - 'node/install-packages': { - 'app-dir': 'code', - 'pkg-manager': 'yarn', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'pkg-manager': 'yarn', + restore_cache: { + keys: [ + 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', + 'node_modules-', + ], }, }, { From 05a4fa2457db3172b167e4246dd375408714698e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 13:48:10 +0100 Subject: [PATCH 065/310] Fix CircleCI configuration by changing 'keys' to 'key' for consistent caching setup in node_modules across jobs. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index f260929fafe5..57c76f1ffd46 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -238,7 +238,7 @@ jobs: - .yarn/root-install-state.gz - code/node_modules - scripts/node_modules - keys: + key: - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} - node_modules- - run: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index d7d17d86edc7..6c4d253299a0 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -319,7 +319,7 @@ const jobs = { 'code/node_modules', 'scripts/node_modules', ], - keys: [ + key: [ 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', 'node_modules-', ], From 62e0f415de6e9a17913533265d7b753261fbd115 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 14:00:57 +0100 Subject: [PATCH 066/310] Update CircleCI configuration to enhance caching key for node_modules by including checksums for .nvmrc and .yarnrc.yml, ensuring more consistent caching across jobs. --- .circleci/config.generated.yml | 4 +--- scripts/ci/data.ts | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 57c76f1ffd46..302bc1e7ef98 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -238,9 +238,7 @@ jobs: - .yarn/root-install-state.gz - code/node_modules - scripts/node_modules - key: - - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} - - node_modules- + key: node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }} - run: command: git diff --exit-code name: Check for changes diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 6c4d253299a0..8972f650e858 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -319,10 +319,7 @@ const jobs = { 'code/node_modules', 'scripts/node_modules', ], - key: [ - 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', - 'node_modules-', - ], + key: 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', }, }, { From d47cdfa3a4df403b0af8ef400024cb2b081633fa Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 14:40:20 +0100 Subject: [PATCH 067/310] Update CircleCI configuration to include architecture in caching keys for node_modules, ensuring more consistent caching across jobs and improving build performance. --- .circleci/config.generated.yml | 18 +++++++++--------- scripts/ci/data.ts | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 302bc1e7ef98..3141cebea0c4 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -238,7 +238,7 @@ jobs: - .yarn/root-install-state.gz - code/node_modules - scripts/node_modules - key: node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }} + key: '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' - run: command: git diff --exit-code name: Check for changes @@ -377,8 +377,8 @@ jobs: at: . - restore_cache: keys: - - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} - - node_modules- + - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' + - "{{ arch }}-node_modules-" - run: command: yarn task --task check --no-link name: TypeCheck code @@ -1252,8 +1252,8 @@ jobs: at: . - restore_cache: keys: - - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} - - node_modules- + - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' + - "{{ arch }}-node_modules-" - run: command: yarn local-registry --open name: Verdaccio @@ -1301,8 +1301,8 @@ jobs: at: . - restore_cache: keys: - - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} - - node_modules- + - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' + - "{{ arch }}-node_modules-" - run: command: yarn task build --template react-vite/default-ts --no-link -s build name: Build storybook @@ -1330,8 +1330,8 @@ jobs: at: . - restore_cache: keys: - - node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }} - - node_modules- + - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' + - "{{ arch }}-node_modules-" - run: command: yarn task dev --template react-vite/default-ts --no-link -s dev name: Run storybook diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 8972f650e858..ce699715dce5 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -319,7 +319,7 @@ const jobs = { 'code/node_modules', 'scripts/node_modules', ], - key: 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', + key: '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', }, }, { @@ -398,8 +398,8 @@ const jobs = { { restore_cache: { keys: [ - 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', - 'node_modules-', + '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', + '{{ arch }}-node_modules-', ], }, }, @@ -1765,8 +1765,8 @@ const jobs = { { restore_cache: { keys: [ - 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', - 'node_modules-', + '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', + '{{ arch }}-node_modules-', ], }, }, @@ -1853,8 +1853,8 @@ const jobs = { { restore_cache: { keys: [ - 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', - 'node_modules-', + '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', + '{{ arch }}-node_modules-', ], }, }, @@ -1908,8 +1908,8 @@ const jobs = { { restore_cache: { keys: [ - 'node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}', - 'node_modules-', + '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', + '{{ arch }}-node_modules-', ], }, }, From 1877dfccf1a28869b3bcbd216da61014a372b935 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 15:02:59 +0100 Subject: [PATCH 068/310] Update CircleCI configuration to enable cache-only lockfile for package installations in both code and scripts directories, improving caching efficiency and consistency across jobs. --- .circleci/config.generated.yml | 2 ++ .circleci/config.yml | 1 + scripts/ci/data.ts | 2 ++ 3 files changed, 5 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 3141cebea0c4..c4247c33b4bd 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -227,9 +227,11 @@ jobs: clone_options: --depth 1 --verbose - node/install-packages: app-dir: code + cache-only-lockfile: true pkg-manager: yarn - node/install-packages: app-dir: scripts + cache-only-lockfile: true pkg-manager: yarn - save_cache: paths: diff --git a/.circleci/config.yml b/.circleci/config.yml index fdfb9c2cd4ba..5d485019c139 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,6 +38,7 @@ jobs: install-yarn: true - node/install-packages: app-dir: scripts + cache-only-lockfile: false pkg-manager: yarn - run: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index ce699715dce5..d08c094b8bd3 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -300,12 +300,14 @@ const jobs = { { 'node/install-packages': { 'app-dir': 'code', + 'cache-only-lockfile': true, 'pkg-manager': 'yarn', }, }, { 'node/install-packages': { 'app-dir': 'scripts', + 'cache-only-lockfile': true, 'pkg-manager': 'yarn', }, }, From a712656550e5e4fb27e2d8c61e37e3dda9d30f82 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 16:25:05 +0100 Subject: [PATCH 069/310] Refactor CircleCI configuration to dynamically generate caching keys for node_modules based on the current platform, improving caching efficiency and consistency across jobs. --- .circleci/config.generated.yml | 23 +++++++++----------- scripts/ci/data.ts | 38 +++++++++++++++++++--------------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index c4247c33b4bd..fedfe5afff27 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -240,7 +240,7 @@ jobs: - .yarn/root-install-state.gz - code/node_modules - scripts/node_modules - key: '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' + key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "scripts/yarn.lock" }}/{{ checksum "code/yarn.lock" }} - run: command: git diff --exit-code name: Check for changes @@ -378,9 +378,12 @@ jobs: - attach_workspace: at: . - restore_cache: - keys: - - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' - - "{{ arch }}-node_modules-" + keys: &a1 + - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "scripts/yarn.lock" }}/{{ checksum "code/yarn.lock" }} + - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "scripts/yarn.lock" }} + - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - darwin-node_modules/{{ checksum ".nvmrc" }} + - darwin-node_modules - run: command: yarn task --task check --no-link name: TypeCheck code @@ -1253,9 +1256,7 @@ jobs: - attach_workspace: at: . - restore_cache: - keys: - - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' - - "{{ arch }}-node_modules-" + keys: *a1 - run: command: yarn local-registry --open name: Verdaccio @@ -1302,9 +1303,7 @@ jobs: - attach_workspace: at: . - restore_cache: - keys: - - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' - - "{{ arch }}-node_modules-" + keys: *a1 - run: command: yarn task build --template react-vite/default-ts --no-link -s build name: Build storybook @@ -1331,9 +1330,7 @@ jobs: - attach_workspace: at: . - restore_cache: - keys: - - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}' - - "{{ arch }}-node_modules-" + keys: *a1 - run: command: yarn task dev --template react-vite/default-ts --no-link -s dev name: Run storybook diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index d08c094b8bd3..324629ce5806 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1,5 +1,8 @@ +import os from 'node:os'; import { join } from 'node:path'; +const PLATFORM = os.platform(); + // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; @@ -141,6 +144,19 @@ const executors = { working_directory: '/tmp/storybook', }, }; +const cacheKeys = [ + `${PLATFORM}-node_modules`, + '{{ checksum ".nvmrc" }}', + '{{ checksum ".yarnrc.yml" }}', + '{{ checksum "scripts/yarn.lock" }}', + '{{ checksum "code/yarn.lock" }}', +].map((_, index, list) => { + const length = list.length; + return list.slice(0, length - index).join('/'); +}); + + + const jobs = { 'bench-packages': { executor: { @@ -321,7 +337,7 @@ const jobs = { 'code/node_modules', 'scripts/node_modules', ], - key: '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', + key: cacheKeys[0], }, }, { @@ -399,10 +415,7 @@ const jobs = { }, { restore_cache: { - keys: [ - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', - '{{ arch }}-node_modules-', - ], + keys: cacheKeys, }, }, { @@ -1766,10 +1779,7 @@ const jobs = { }, { restore_cache: { - keys: [ - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', - '{{ arch }}-node_modules-', - ], + keys: cacheKeys, }, }, @@ -1854,10 +1864,7 @@ const jobs = { }, { restore_cache: { - keys: [ - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', - '{{ arch }}-node_modules-', - ], + keys: cacheKeys, }, }, { @@ -1909,10 +1916,7 @@ const jobs = { }, { restore_cache: { - keys: [ - '{{ arch }}-node_modules-{{ checksum "code/yarn.lock" }}-{{ checksum "scripts/yarn.lock" }}--{{ checksum ".nvmrc" }}-{{ checksum ".yarnrc.yml" }}', - '{{ arch }}-node_modules-', - ], + keys: cacheKeys, }, }, { From 9e433a8177d59de2e1b79f2b78b5122da5e852ce Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 17:36:59 +0100 Subject: [PATCH 070/310] Refactor CircleCI configuration to define the build job using a dedicated function, improving readability and maintainability, while ensuring consistent caching keys for node_modules across jobs. --- scripts/ci/data.ts | 337 ++++++++++++++++++++++++--------------------- 1 file changed, 178 insertions(+), 159 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 324629ce5806..c05bb810a7a9 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1,11 +1,20 @@ import os from 'node:os'; import { join } from 'node:path'; -const PLATFORM = os.platform(); - // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; +const PLATFORM = os.platform(); +const CACHE_KEYS = [ + `${PLATFORM}-node_modules`, + '{{ checksum ".nvmrc" }}', + '{{ checksum ".yarnrc.yml" }}', + '{{ checksum "scripts/yarn.lock" }}', + '{{ checksum "code/yarn.lock" }}', +].map((_, index, list) => { + return list.slice(0, list.length - index).join('/'); +}); + const dirname = import.meta.dirname; const commands = { @@ -144,18 +153,122 @@ const executors = { working_directory: '/tmp/storybook', }, }; -const cacheKeys = [ - `${PLATFORM}-node_modules`, - '{{ checksum ".nvmrc" }}', - '{{ checksum ".yarnrc.yml" }}', - '{{ checksum "scripts/yarn.lock" }}', - '{{ checksum "code/yarn.lock" }}', -].map((_, index, list) => { - const length = list.length; - return list.slice(0, length - index).join('/'); -}); +type SomethingImplementation = { + executor: { + class: string; + name: string; + }; + steps: unknown[]; + parameters?: Record; + parallelism?: number; +}; +function defineJob( + name: K, + implementation: I +) { + return { + name, + implementation, + }; +} + +const build = defineJob('build', { + executor: { + class: 'xlarge', + name: 'sb_node_22_classic', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + 'node/install-packages': { + 'app-dir': 'code', + 'cache-only-lockfile': true, + 'pkg-manager': 'yarn', + }, + }, + { + 'node/install-packages': { + 'app-dir': 'scripts', + 'cache-only-lockfile': true, + 'pkg-manager': 'yarn', + }, + }, + { + save_cache: { + paths: [ + // + '.yarn/code-install-state.gz', + '.yarn/scripts-install-state.gz', + '.yarn/root-install-state.gz', + 'code/node_modules', + 'scripts/node_modules', + ], + key: CACHE_KEYS[0], + }, + }, + { + run: { + command: 'git diff --exit-code', + name: 'Check for changes', + }, + }, + { + run: { + command: 'yarn dedupe --check', + name: 'Check for dedupe', + }, + }, + { + run: { + command: 'yarn task --task compile --start-from=auto --no-link --debug', + name: 'Compile', + working_directory: 'code', + }, + }, + { + run: { + command: 'yarn local-registry --publish', + name: 'Publish to Verdaccio', + working_directory: 'code', + }, + }, + 'report-workflow-on-failure', + { + store_artifacts: { + path: 'code/bench/esbuild-metafiles', + }, + }, + { + persist_to_workspace: { + paths: [ + // 'code/node_modules', + // 'scripts/node_modules', + ...glob + .sync('**/src', { + cwd: join(dirname, '../../code'), + onlyDirectories: true, + ignore: ['node_modules'], + }) + .flatMap((p) => [ + `code/${p.replace('src', 'dist')}`, + `code/${p.replace('src', 'node_modules')}`, + ]), + '.verdaccio-cache', + // '.yarn/code-install-state.gz', + // '.yarn/scripts-install-state.gz', + // '.yarn/root-install-state.gz', + ], + root: '.', + }, + }, + ], +}); const jobs = { 'bench-packages': { @@ -302,101 +415,7 @@ const jobs = { }, ], }, - build: { - executor: { - class: 'xlarge', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'code', - 'cache-only-lockfile': true, - 'pkg-manager': 'yarn', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'cache-only-lockfile': true, - 'pkg-manager': 'yarn', - }, - }, - { - save_cache: { - paths: [ - // - '.yarn/code-install-state.gz', - '.yarn/scripts-install-state.gz', - '.yarn/root-install-state.gz', - 'code/node_modules', - 'scripts/node_modules', - ], - key: cacheKeys[0], - }, - }, - { - run: { - command: 'git diff --exit-code', - name: 'Check for changes', - }, - }, - { - run: { - command: 'yarn dedupe --check', - name: 'Check for dedupe', - }, - }, - { - run: { - command: 'yarn task --task compile --start-from=auto --no-link --debug', - name: 'Compile', - working_directory: 'code', - }, - }, - { - run: { - command: 'yarn local-registry --publish', - name: 'Publish to Verdaccio', - working_directory: 'code', - }, - }, - 'report-workflow-on-failure', - { - store_artifacts: { - path: 'code/bench/esbuild-metafiles', - }, - }, - { - persist_to_workspace: { - paths: [ - // 'code/node_modules', - // 'scripts/node_modules', - ...glob - .sync('**/src', { - cwd: join(dirname, '../../code'), - onlyDirectories: true, - ignore: ['node_modules'], - }) - .flatMap((p) => [ - `code/${p.replace('src', 'dist')}`, - `code/${p.replace('src', 'node_modules')}`, - ]), - '.verdaccio-cache', - // '.yarn/code-install-state.gz', - // '.yarn/scripts-install-state.gz', - // '.yarn/root-install-state.gz', - ], - root: '.', - }, - }, - ], - }, + [build.name]: build.implementation, check: { executor: { class: 'xlarge', @@ -415,7 +434,7 @@ const jobs = { }, { restore_cache: { - keys: cacheKeys, + keys: CACHE_KEYS, }, }, { @@ -1779,7 +1798,7 @@ const jobs = { }, { restore_cache: { - keys: cacheKeys, + keys: CACHE_KEYS, }, }, @@ -1864,7 +1883,7 @@ const jobs = { }, { restore_cache: { - keys: cacheKeys, + keys: CACHE_KEYS, }, }, { @@ -1916,7 +1935,7 @@ const jobs = { }, { restore_cache: { - keys: cacheKeys, + keys: CACHE_KEYS, }, }, { @@ -2003,47 +2022,47 @@ const workflows = { daily: { jobs: [ 'pretty-docs', - 'build', + build.name, { lint: { - requires: ['build'], + requires: [build.name], }, }, { knip: { - requires: ['build'], + requires: [build.name], }, }, { 'bench-packages': { - requires: ['build'], + requires: [build.name], }, }, 'check', { 'unit-tests': { - requires: ['build'], + requires: [build.name], }, }, { 'stories-tests': { - requires: ['build'], + requires: [build.name], }, }, { 'script-checks': { - requires: ['build'], + requires: [build.name], }, }, { 'chromatic-internal-storybook': { - requires: ['build'], + requires: [build.name], }, }, { 'create-sandboxes': { parallelism: 38, - requires: ['build'], + requires: [build.name], }, }, { @@ -2089,27 +2108,27 @@ const workflows = { directory: ['react', 'vue3', 'nextjs', 'svelte'], }, }, - requires: ['build'], + requires: [build.name], }, }, { 'test-yarn-pnp': { - requires: ['build'], + requires: [build.name], }, }, { 'e2e-ui': { - requires: ['build'], + requires: [build.name], }, }, { 'e2e-ui-vitest-3': { - requires: ['build'], + requires: [build.name], }, }, { 'test-init-features': { - requires: ['build'], + requires: [build.name], }, }, { @@ -2120,7 +2139,7 @@ const workflows = { template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], }, }, - requires: ['build'], + requires: [build.name], }, }, { @@ -2131,7 +2150,7 @@ const workflows = { template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], }, }, - requires: ['build'], + requires: [build.name], }, }, ], @@ -2142,15 +2161,15 @@ const workflows = { docs: { jobs: [ 'pretty-docs', - 'build', + build.name, { check: { - requires: ['build'], + requires: [build.name], }, }, { sandboxes: { - requires: ['build'], + requires: [build.name], }, }, { @@ -2186,41 +2205,41 @@ const workflows = { merged: { jobs: [ 'pretty-docs', - 'build', + build.name, { lint: { - requires: ['build'], + requires: [build.name], }, }, { knip: { - requires: ['build'], + requires: [build.name], }, }, { 'bench-packages': { - requires: ['build'], + requires: [build.name], }, }, 'check', { 'unit-tests': { - requires: ['build'], + requires: [build.name], }, }, { 'stories-tests': { - requires: ['build'], + requires: [build.name], }, }, { 'script-checks': { - requires: ['build'], + requires: [build.name], }, }, { 'chromatic-internal-storybook': { - requires: ['build'], + requires: [build.name], }, }, { @@ -2231,7 +2250,7 @@ const workflows = { { 'create-sandboxes': { parallelism: 21, - requires: ['build'], + requires: [build.name], }, }, { @@ -2277,27 +2296,27 @@ const workflows = { directory: ['react', 'vue3', 'nextjs', 'svelte'], }, }, - requires: ['build'], + requires: [build.name], }, }, { 'test-yarn-pnp': { - requires: ['build'], + requires: [build.name], }, }, { 'e2e-ui': { - requires: ['build'], + requires: [build.name], }, }, { 'e2e-ui-vitest-3': { - requires: ['build'], + requires: [build.name], }, }, { 'test-init-features': { - requires: ['build'], + requires: [build.name], }, }, { @@ -2308,7 +2327,7 @@ const workflows = { template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], }, }, - requires: ['build'], + requires: [build.name], }, }, ], @@ -2319,41 +2338,41 @@ const workflows = { normal: { jobs: [ 'pretty-docs', - 'build', + build.name, { lint: { - requires: ['build'], + requires: [build.name], }, }, { knip: { - requires: ['build'], + requires: [build.name], }, }, { 'bench-packages': { - requires: ['build'], + requires: [build.name], }, }, 'check', { 'unit-tests': { - requires: ['build'], + requires: [build.name], }, }, { 'stories-tests': { - requires: ['build'], + requires: [build.name], }, }, { 'script-checks': { - requires: ['build'], + requires: [build.name], }, }, { 'chromatic-internal-storybook': { - requires: ['build'], + requires: [build.name], }, }, { @@ -2364,7 +2383,7 @@ const workflows = { { 'create-sandboxes': { parallelism: 14, - requires: ['build'], + requires: [build.name], }, }, { @@ -2405,22 +2424,22 @@ const workflows = { }, { 'test-yarn-pnp': { - requires: ['build'], + requires: [build.name], }, }, { 'e2e-ui': { - requires: ['build'], + requires: [build.name], }, }, { 'e2e-ui-vitest-3': { - requires: ['build'], + requires: [build.name], }, }, { 'test-init-features': { - requires: ['build'], + requires: [build.name], }, }, { @@ -2430,7 +2449,7 @@ const workflows = { directory: ['react', 'vue3', 'nextjs', 'svelte'], }, }, - requires: ['build'], + requires: [build.name], }, }, ], From c246dc88f9c02e3853dce19931793fef3fe31cb9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 20:06:41 +0100 Subject: [PATCH 071/310] Refactor CircleCI configuration to define jobs for the react-vite/default-ts sandbox, improving clarity and maintainability by consolidating job definitions and removing obsolete sandboxes. --- .circleci/config.generated.yml | 47 +- scripts/ci/data.ts | 777 +++++++++++++++++++++------------ 2 files changed, 509 insertions(+), 315 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index fedfe5afff27..daaf263a6194 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1246,7 +1246,8 @@ jobs: - run: command: echo "Grouping sandboxes in CI graph" name: Grouping sandboxes in CI graph - sandboxes-a-create: + react-vite-default-ts-create: + name: react-vite/default-ts (create) executor: class: large name: sb_node_22_browsers @@ -1293,7 +1294,8 @@ jobs: paths: - sandbox/react-vite-default-ts root: . - sandboxes-a-build: + react-vite-default-ts-build: + name: react-vite/default-ts (build) executor: class: xlarge name: sb_playwright @@ -1320,7 +1322,8 @@ jobs: TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests - sandboxes-a-dev: + react-vite-default-ts-dev: + name: react-vite/default-ts (dev) executor: class: xlarge name: sb_playwright @@ -1345,20 +1348,6 @@ jobs: TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests - sandboxes-b-create: - executor: - class: xlarge - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - sandboxes-b-e2e: - executor: - class: xlarge - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose workflows: daily: jobs: @@ -1474,21 +1463,15 @@ workflows: - sandboxes: requires: - build - - sandboxes-a-create: - requires: - - sandboxes - - sandboxes-a-build: - requires: - - sandboxes-a-create - - sandboxes-a-dev: - requires: - - sandboxes-a-create - - sandboxes-b-create: - requires: - - sandboxes - - sandboxes-b-e2e: - requires: - - sandboxes-b-create + - - react-vite-default-ts-create: + requires: + - react-vite-default-ts-create + - react-vite-default-ts-build: + requires: + - react-vite-default-ts-create + - react-vite-default-ts-dev: + requires: + - react-vite-default-ts-create when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index c05bb810a7a9..06748e739cb9 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -166,11 +166,233 @@ type SomethingImplementation = { function defineJob( name: K, - implementation: I + implementation: I, + requires = [] as string[] ) { return { + id: name.toLowerCase().replace(/\//g, '-'), name, implementation, + requires, + }; +} + +function defineSandboxFlow(name: K) { + const id = name.toLowerCase().replace(/\//g, '-'); + const ids = { + create: `${id}-create`, + build: `${id}-build`, + dev: `${id}-dev`, + }; + const jobs = [ + defineJob( + ids.create, + { + name: `${name} (create)`, + executor: { + class: 'large', + name: 'sb_node_22_browsers', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + restore_cache: { + keys: CACHE_KEYS, + }, + }, + + { + run: { + command: 'yarn local-registry --open', + name: 'Verdaccio', + background: true, + working_directory: 'code', + }, + }, + { + run: { + background: true, + command: 'yarn jiti ./event-log-collector.ts', + name: 'Start Event Collector', + working_directory: 'scripts', + }, + }, + { + run: { + command: [ + 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio + 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy + 'yarn wait-on tcp:127.0.0.1:6007', // event collector + ].join('\n'), + name: 'Wait on servers', + working_directory: 'code', + }, + }, + { + run: { + command: [ + // + 'sudo corepack enable', + 'which yarn', + 'yarn --version', + ].join('\n'), + name: 'Setup Corepack', + }, + }, + { + run: { + command: `yarn task sandbox --template ${name} --no-link -s sandbox --debug`, + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', + }, + name: 'Create Sandboxes', + }, + }, + { + store_artifacts: { + path: `sandbox/${id}/debug-storybook.log`, + destination: 'logs', + }, + }, + { + persist_to_workspace: { + paths: [`sandbox/${id}`], + root: '.', + }, + }, + ], + }, + [ids.create] + ), + defineJob( + ids.build, + { + name: `${name} (build)`, + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + restore_cache: { + keys: CACHE_KEYS, + }, + }, + { + run: { + command: `yarn task build --template ${name} --no-link -s build`, + name: 'Build storybook', + }, + }, + { + run: { + command: `yarn task serve --template ${name} --no-link -s serve`, + background: true, + name: 'Serve storybook', + }, + }, + { + run: { + command: 'yarn wait-on tcp:127.0.0.1:8001', + name: 'Wait on storybook', + working_directory: 'code', + }, + }, + { + run: { + command: [ + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s never" --verbose --index=0 --total=1`, + ].join('\n'), + name: 'Running E2E Tests', + }, + }, + ], + }, + [ids.create] + ), + defineJob( + ids.dev, + { + name: `${name} (dev)`, + executor: { + class: 'xlarge', + name: 'sb_playwright', + }, + steps: [ + { + 'git-shallow-clone/checkout_advanced': { + clone_options: '--depth 1 --verbose', + }, + }, + { + attach_workspace: { + at: '.', + }, + }, + { + restore_cache: { + keys: CACHE_KEYS, + }, + }, + { + run: { + command: `yarn task dev --template ${name} --no-link -s dev`, + name: 'Run storybook', + working_directory: 'code', + background: true, + }, + }, + { + run: { + command: 'yarn wait-on tcp:127.0.0.1:6006', + name: 'Wait on storybook', + working_directory: 'code', + }, + }, + { + run: { + command: [ + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${name} --no-link -s never" --verbose --index=0 --total=1`, + ].join('\n'), + name: 'Running E2E Tests', + }, + }, + ], + }, + [ids.create] + ), + ]; + return { + jobs, + workflow: jobs.map((job) => { + return { + [job.id]: { + requires: job.requires, + }, + }; + }), }; } @@ -270,6 +492,8 @@ const build = defineJob('build', { ], }); +const sandboxes = ['react-vite/default-ts'].map(defineSandboxFlow); + const jobs = { 'bench-packages': { executor: { @@ -415,7 +639,7 @@ const jobs = { }, ], }, - [build.name]: build.implementation, + [build.id]: build.implementation, check: { executor: { class: 'xlarge', @@ -1780,216 +2004,227 @@ const jobs = { }, ], }, - 'sandboxes-a-create': { - executor: { - class: 'large', - name: 'sb_node_22_browsers', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - restore_cache: { - keys: CACHE_KEYS, - }, - }, + ...sandboxes.reduce( + (acc, sandbox) => { + for (const job of sandbox.jobs) { + acc[job.id] = job.implementation; + } - { - run: { - command: 'yarn local-registry --open', - name: 'Verdaccio', - background: true, - working_directory: 'code', - }, - }, - { - run: { - background: true, - command: 'yarn jiti ./event-log-collector.ts', - name: 'Start Event Collector', - working_directory: 'scripts', - }, - }, - { - run: { - command: [ - 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio - 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy - 'yarn wait-on tcp:127.0.0.1:6007', // event collector - ].join('\n'), - name: 'Wait on servers', - working_directory: 'code', - }, - }, - { - run: { - command: [ - // - 'sudo corepack enable', - 'which yarn', - 'yarn --version', - ].join('\n'), - name: 'Setup Corepack', - }, - }, - { - run: { - command: - 'yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug', - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', - }, - name: 'Create Sandboxes', - }, - }, - { - store_artifacts: { - path: 'sandbox/react-vite-default-ts/debug-storybook.log', - destination: 'logs', - }, - }, - { - persist_to_workspace: { - paths: ['sandbox/react-vite-default-ts'], - root: '.', - }, - }, - ], - }, - 'sandboxes-a-build': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - restore_cache: { - keys: CACHE_KEYS, - }, - }, - { - run: { - command: 'yarn task build --template react-vite/default-ts --no-link -s build', - name: 'Build storybook', - }, - }, - { - run: { - command: 'yarn task serve --template react-vite/default-ts --no-link -s serve', - background: true, - name: 'Serve storybook', - }, - }, - { - run: { - command: 'yarn wait-on tcp:127.0.0.1:8001', - name: 'Wait on storybook', - working_directory: 'code', - }, - }, - { - run: { - command: [ - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', - ].join('\n'), - name: 'Running E2E Tests', - }, - }, - ], - }, - 'sandboxes-a-dev': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - restore_cache: { - keys: CACHE_KEYS, - }, - }, - { - run: { - command: 'yarn task dev --template react-vite/default-ts --no-link -s dev', - name: 'Run storybook', - working_directory: 'code', - background: true, - }, - }, - { - run: { - command: 'yarn wait-on tcp:127.0.0.1:6006', - name: 'Wait on storybook', - working_directory: 'code', - }, - }, - { - run: { - command: [ - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', - ].join('\n'), - name: 'Running E2E Tests', - }, - }, - ], - }, - 'sandboxes-b-create': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - ], - }, - 'sandboxes-b-e2e': { - executor: { - class: 'xlarge', - name: 'sb_playwright', + return acc; }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - ], - }, + {} as Record + ), + + // 'sandboxes-a-create': { + // executor: { + // class: 'large', + // name: 'sb_node_22_browsers', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // restore_cache: { + // keys: CACHE_KEYS, + // }, + // }, + + // { + // run: { + // command: 'yarn local-registry --open', + // name: 'Verdaccio', + // background: true, + // working_directory: 'code', + // }, + // }, + // { + // run: { + // background: true, + // command: 'yarn jiti ./event-log-collector.ts', + // name: 'Start Event Collector', + // working_directory: 'scripts', + // }, + // }, + // { + // run: { + // command: [ + // 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio + // 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy + // 'yarn wait-on tcp:127.0.0.1:6007', // event collector + // ].join('\n'), + // name: 'Wait on servers', + // working_directory: 'code', + // }, + // }, + // { + // run: { + // command: [ + // // + // 'sudo corepack enable', + // 'which yarn', + // 'yarn --version', + // ].join('\n'), + // name: 'Setup Corepack', + // }, + // }, + // { + // run: { + // command: + // 'yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug', + // environment: { + // STORYBOOK_TELEMETRY_DEBUG: 1, + // STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', + // }, + // name: 'Create Sandboxes', + // }, + // }, + // { + // store_artifacts: { + // path: 'sandbox/react-vite-default-ts/debug-storybook.log', + // destination: 'logs', + // }, + // }, + // { + // persist_to_workspace: { + // paths: ['sandbox/react-vite-default-ts'], + // root: '.', + // }, + // }, + // ], + // }, + // 'sandboxes-a-build': { + // executor: { + // class: 'xlarge', + // name: 'sb_playwright', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // restore_cache: { + // keys: CACHE_KEYS, + // }, + // }, + // { + // run: { + // command: 'yarn task build --template react-vite/default-ts --no-link -s build', + // name: 'Build storybook', + // }, + // }, + // { + // run: { + // command: 'yarn task serve --template react-vite/default-ts --no-link -s serve', + // background: true, + // name: 'Serve storybook', + // }, + // }, + // { + // run: { + // command: 'yarn wait-on tcp:127.0.0.1:8001', + // name: 'Wait on storybook', + // working_directory: 'code', + // }, + // }, + // { + // run: { + // command: [ + // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + // 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', + // ].join('\n'), + // name: 'Running E2E Tests', + // }, + // }, + // ], + // }, + // 'sandboxes-a-dev': { + // executor: { + // class: 'xlarge', + // name: 'sb_playwright', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // restore_cache: { + // keys: CACHE_KEYS, + // }, + // }, + // { + // run: { + // command: 'yarn task dev --template react-vite/default-ts --no-link -s dev', + // name: 'Run storybook', + // working_directory: 'code', + // background: true, + // }, + // }, + // { + // run: { + // command: 'yarn wait-on tcp:127.0.0.1:6006', + // name: 'Wait on storybook', + // working_directory: 'code', + // }, + // }, + // { + // run: { + // command: [ + // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + // 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', + // ].join('\n'), + // name: 'Running E2E Tests', + // }, + // }, + // ], + // }, + // 'sandboxes-b-create': { + // executor: { + // class: 'xlarge', + // name: 'sb_playwright', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // ], + // }, + // 'sandboxes-b-e2e': { + // executor: { + // class: 'xlarge', + // name: 'sb_playwright', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // ], + // }, }; const orbs = { 'browser-tools': 'circleci/browser-tools@2.3.2', @@ -2022,47 +2257,47 @@ const workflows = { daily: { jobs: [ 'pretty-docs', - build.name, + build.id, { lint: { - requires: [build.name], + requires: [build.id], }, }, { knip: { - requires: [build.name], + requires: [build.id], }, }, { 'bench-packages': { - requires: [build.name], + requires: [build.id], }, }, 'check', { 'unit-tests': { - requires: [build.name], + requires: [build.id], }, }, { 'stories-tests': { - requires: [build.name], + requires: [build.id], }, }, { 'script-checks': { - requires: [build.name], + requires: [build.id], }, }, { 'chromatic-internal-storybook': { - requires: [build.name], + requires: [build.id], }, }, { 'create-sandboxes': { parallelism: 38, - requires: [build.name], + requires: [build.id], }, }, { @@ -2108,27 +2343,27 @@ const workflows = { directory: ['react', 'vue3', 'nextjs', 'svelte'], }, }, - requires: [build.name], + requires: [build.id], }, }, { 'test-yarn-pnp': { - requires: [build.name], + requires: [build.id], }, }, { 'e2e-ui': { - requires: [build.name], + requires: [build.id], }, }, { 'e2e-ui-vitest-3': { - requires: [build.name], + requires: [build.id], }, }, { 'test-init-features': { - requires: [build.name], + requires: [build.id], }, }, { @@ -2139,7 +2374,7 @@ const workflows = { template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], }, }, - requires: [build.name], + requires: [build.id], }, }, { @@ -2150,7 +2385,7 @@ const workflows = { template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], }, }, - requires: [build.name], + requires: [build.id], }, }, ], @@ -2161,42 +2396,18 @@ const workflows = { docs: { jobs: [ 'pretty-docs', - build.name, + build.id, { check: { - requires: [build.name], + requires: [build.id], }, }, { sandboxes: { - requires: [build.name], - }, - }, - { - 'sandboxes-a-create': { - requires: ['sandboxes'], - }, - }, - { - 'sandboxes-a-build': { - requires: ['sandboxes-a-create'], - }, - }, - { - 'sandboxes-a-dev': { - requires: ['sandboxes-a-create'], - }, - }, - { - 'sandboxes-b-create': { - requires: ['sandboxes'], - }, - }, - { - 'sandboxes-b-e2e': { - requires: ['sandboxes-b-create'], + requires: [build.id], }, }, + ...sandboxes.map((sandbox) => sandbox.workflow), ], when: { equal: ['docs', '<< pipeline.parameters.workflow >>'], @@ -2205,41 +2416,41 @@ const workflows = { merged: { jobs: [ 'pretty-docs', - build.name, + build.id, { lint: { - requires: [build.name], + requires: [build.id], }, }, { knip: { - requires: [build.name], + requires: [build.id], }, }, { 'bench-packages': { - requires: [build.name], + requires: [build.id], }, }, 'check', { 'unit-tests': { - requires: [build.name], + requires: [build.id], }, }, { 'stories-tests': { - requires: [build.name], + requires: [build.id], }, }, { 'script-checks': { - requires: [build.name], + requires: [build.id], }, }, { 'chromatic-internal-storybook': { - requires: [build.name], + requires: [build.id], }, }, { @@ -2250,7 +2461,7 @@ const workflows = { { 'create-sandboxes': { parallelism: 21, - requires: [build.name], + requires: [build.id], }, }, { @@ -2296,27 +2507,27 @@ const workflows = { directory: ['react', 'vue3', 'nextjs', 'svelte'], }, }, - requires: [build.name], + requires: [build.id], }, }, { 'test-yarn-pnp': { - requires: [build.name], + requires: [build.id], }, }, { 'e2e-ui': { - requires: [build.name], + requires: [build.id], }, }, { 'e2e-ui-vitest-3': { - requires: [build.name], + requires: [build.id], }, }, { 'test-init-features': { - requires: [build.name], + requires: [build.id], }, }, { @@ -2327,7 +2538,7 @@ const workflows = { template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], }, }, - requires: [build.name], + requires: [build.id], }, }, ], @@ -2338,41 +2549,41 @@ const workflows = { normal: { jobs: [ 'pretty-docs', - build.name, + build.id, { lint: { - requires: [build.name], + requires: [build.id], }, }, { knip: { - requires: [build.name], + requires: [build.id], }, }, { 'bench-packages': { - requires: [build.name], + requires: [build.id], }, }, 'check', { 'unit-tests': { - requires: [build.name], + requires: [build.id], }, }, { 'stories-tests': { - requires: [build.name], + requires: [build.id], }, }, { 'script-checks': { - requires: [build.name], + requires: [build.id], }, }, { 'chromatic-internal-storybook': { - requires: [build.name], + requires: [build.id], }, }, { @@ -2383,7 +2594,7 @@ const workflows = { { 'create-sandboxes': { parallelism: 14, - requires: [build.name], + requires: [build.id], }, }, { @@ -2424,22 +2635,22 @@ const workflows = { }, { 'test-yarn-pnp': { - requires: [build.name], + requires: [build.id], }, }, { 'e2e-ui': { - requires: [build.name], + requires: [build.id], }, }, { 'e2e-ui-vitest-3': { - requires: [build.name], + requires: [build.id], }, }, { 'test-init-features': { - requires: [build.name], + requires: [build.id], }, }, { @@ -2449,7 +2660,7 @@ const workflows = { directory: ['react', 'vue3', 'nextjs', 'svelte'], }, }, - requires: [build.name], + requires: [build.id], }, }, ], From 26f6b63d4649aa31daa25381b94f01eee6743c9e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 20:58:16 +0100 Subject: [PATCH 072/310] Refactor CircleCI configuration to streamline job definitions and enhance clarity by implementing a consistent naming convention for jobs, while removing obsolete configurations and improving maintainability. --- .circleci/config.generated.yml | 1219 +---------- scripts/ci/data.ts | 3700 ++++++++++++++++---------------- 2 files changed, 1872 insertions(+), 3047 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index daaf263a6194..539a6ec0769d 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -135,90 +135,8 @@ parameters: - docs type: enum jobs: - bench-packages: - executor: - class: small - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - when: - condition: - and: - - << pipeline.parameters.ghBaseBranch >> - - << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - name: Benchmarking packages against base branch - working_directory: scripts - - when: - condition: - or: - - not: << pipeline.parameters.ghBaseBranch >> - - not: << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --upload - name: Uploading package benchmarks for branch - working_directory: scripts - - store_artifacts: - path: bench/packages/results.json - - report-workflow-on-failure - - cancel-workflow-on-failure - bench-sandboxes: - executor: - class: small - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 - name: Running Bench - - run: - command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> - name: Uploading results - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) build: + description: build (create) executor: class: xlarge name: sb_node_22_classic @@ -397,268 +315,6 @@ jobs: name: Ensure no changes pending - report-workflow-on-failure - cancel-workflow-on-failure - check-sandboxes: - executor: - class: medium - name: sb_node_22_classic - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 - name: Type check Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - - store_test_results: - path: test-results - chromatic-internal-storybook: - environment: - NODE_OPTIONS: --max_old_space_size=4096 - executor: - class: large - name: sb_node_22_browsers - steps: - - checkout - - attach_workspace: - at: . - - run: - command: yarn storybook:ui:chromatic - name: Running Chromatic - working_directory: code - - report-workflow-on-failure - - store_test_results: - path: test-results - chromatic-sandboxes: - executor: - class: medium - name: sb_node_22_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - checkout - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 - name: Running Chromatic - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - - store_test_results: - path: test-results - coverage: - executor: - class: small - name: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - codecov/upload - - report-workflow-on-failure - create-sandboxes: - executor: - class: large - name: sb_node_22_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - # Enable corepack - sudo corepack enable - - # Verify yarn is working - which yarn - yarn --version - name: Setup Corepack - - start-event-collector - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit - 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 - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Create Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - - persist_to_workspace: - paths: - - sandbox/** - root: . - - store_test_results: - path: test-results - e2e-dev: - executor: - class: medium+ - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: code/playwright-results/ - e2e-production: - executor: - class: medium - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: code/playwright-results/ - e2e-ui: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react - - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react/test-results/ - - report-workflow-on-failure - e2e-ui-vitest-3: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - - store_test_results: - path: test-results - - store_artifacts: - destination: playwright - path: test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ - - report-workflow-on-failure - knip: - executor: - class: large - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - yarn knip --no-exit-code - name: Knip - - report-workflow-on-failure - - cancel-workflow-on-failure - lint: - executor: - class: medium+ - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - yarn lint - name: Lint - - report-workflow-on-failure - - cancel-workflow-on-failure pretty-docs: executor: class: medium @@ -673,571 +329,6 @@ jobs: command: yarn docs:prettier:check name: Prettier working_directory: scripts - script-checks: - executor: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd scripts - yarn get-template --check - name: Check parallelism count - - run: - command: | - cd scripts - yarn check - name: Type check - - run: - command: | - cd scripts - yarn test --coverage - name: Run tests - - store_test_results: - path: scripts/junit.xml - - report-workflow-on-failure - - cancel-workflow-on-failure - smoke-test-sandboxes: - executor: - class: medium - name: sb_node_18_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit - name: Smoke Testing Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) - - store_test_results: - path: test-results - stories-tests: - executor: - class: xlarge - name: sb_playwright - parallelism: 2 - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests - - store_test_results: - path: test-results - - report-workflow-on-failure - - cancel-workflow-on-failure - test-init-empty: - executor: - class: small - name: sb_node_22_browsers - parameters: - packageManager: - type: string - template: - type: string - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - when: - condition: - equal: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (NPM) - - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Yarn 2) - - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (PNPM) - - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (--skip-install) - - report-workflow-on-failure - test-init-empty-windows: - executor: win/default - parameters: - packageManager: - type: string - template: - type: string - steps: - - checkout - - attach_workspace: - at: . - - run: - command: | - choco install nodejs-lts --version=22.11.0 -y - corepack enable - name: Setup Node & Yarn on Windows - shell: bash.exe - - run: - 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: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows NPM) - shell: bash.exe - - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows Yarn 2) - shell: bash.exe - - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows PNPM) - shell: bash.exe - - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows --skip-install) - shell: bash.exe - test-init-features: - executor: - class: small - name: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir features-1 - cd features-1 - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug - npx vitest - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - name: Storybook init for features - test-portable-stories: - executor: - class: medium - name: sb_playwright - parameters: - directory: - type: string - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn jest - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn vitest - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn playwright-ct - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn cypress - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - report-workflow-on-failure - test-runner-dev: - executor: - class: large - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit - name: Running Test Runner in Dev mode - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) - - store_test_results: - path: test-results - test-runner-production: - executor: - class: medium+ - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - start-event-collector - - run: - command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running Test Runner - - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - name: Check Telemetry - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - - store_test_results: - path: test-results - test-yarn-pnp: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/yarn-pnp - - run: - command: yarn storybook --smoke-test - name: Run Storybook smoke test - working_directory: test-storybooks/yarn-pnp - - report-workflow-on-failure - unit-tests: - executor: - class: xlarge - name: sb_playwright - parallelism: 2 - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests - - store_test_results: - path: test-results - - report-workflow-on-failure - - cancel-workflow-on-failure - vitest-integration: - executor: - class: xlarge - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: . - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - start-event-collector - - run: - command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running story tests in Vitest - - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - name: Check Telemetry - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - - store_test_results: - path: test-results sandboxes: executor: class: small @@ -1246,8 +337,8 @@ jobs: - run: command: echo "Grouping sandboxes in CI graph" name: Grouping sandboxes in CI graph - react-vite-default-ts-create: - name: react-vite/default-ts (create) + react-vite-default-ts--create: + description: react-vite/default-ts (create) (create) executor: class: large name: sb_node_22_browsers @@ -1294,8 +385,8 @@ jobs: paths: - sandbox/react-vite-default-ts root: . - react-vite-default-ts-build: - name: react-vite/default-ts (build) + react-vite-default-ts--build: + description: react-vite/default-ts (build) (create) executor: class: xlarge name: sb_playwright @@ -1322,8 +413,8 @@ jobs: TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests - react-vite-default-ts-dev: - name: react-vite/default-ts (dev) + react-vite-default-ts--dev: + description: react-vite/default-ts (dev) (create) executor: class: xlarge name: sb_playwright @@ -1349,110 +440,6 @@ jobs: echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests workflows: - daily: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - create-sandboxes: - parallelism: 38 - requires: - - build - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - - chromatic-sandboxes: - parallelism: 35 - requires: - - create-sandboxes - - e2e-production: - parallelism: 7 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 28 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 33 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 13 - requires: - - create-sandboxes - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-init-empty: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build - - test-init-empty-windows: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build - when: - equal: - - daily - - << pipeline.parameters.workflow >> docs: jobs: - pretty-docs @@ -1463,194 +450,16 @@ workflows: - sandboxes: requires: - build - - - react-vite-default-ts-create: - requires: - - react-vite-default-ts-create - - react-vite-default-ts-build: - requires: - - react-vite-default-ts-create - - react-vite-default-ts-dev: - requires: - - react-vite-default-ts-create - when: - equal: - - docs - - << pipeline.parameters.workflow >> - merged: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 21 - requires: - - build - - chromatic-sandboxes: - parallelism: 18 + - react-vite-default-ts--create: requires: - - create-sandboxes - - e2e-production: - parallelism: 6 + - react-vite-default-ts--create + - react-vite-default-ts--build: requires: - - create-sandboxes - - e2e-dev: - parallelism: 14 + - react-vite-default-ts--create + - react-vite-default-ts--dev: requires: - - create-sandboxes - - test-runner-production: - parallelism: 16 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 7 - requires: - - create-sandboxes - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-init-empty-windows: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build + - react-vite-default-ts--create when: equal: - - merged - - << pipeline.parameters.workflow >> - normal: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 14 - requires: - - build - - chromatic-sandboxes: - parallelism: 11 - requires: - - create-sandboxes - - e2e-production: - parallelism: 6 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 8 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 9 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 5 - requires: - - create-sandboxes - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - when: - equal: - - normal + - docs - << pipeline.parameters.workflow >> diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 06748e739cb9..05d009eb4057 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -170,25 +170,41 @@ function defineJob( requires = [] as string[] ) { return { - id: name.toLowerCase().replace(/\//g, '-'), + id: toId(name), name, - implementation, + implementation: { + description: `${name} (create)`, + ...implementation, + }, requires, }; } +function toId(name: string) { + // replace all non-alphanumeric characters with a hyphen + // trim leading and trailing hyphens + return name + .toLowerCase() + .replace(/[^a-z0-9]/g, '-') + .replace(/^-+|-+$/g, ''); +} + function defineSandboxFlow(name: K) { - const id = name.toLowerCase().replace(/\//g, '-'); + const id = toId(name); + const names = { + create: `${name} (create)`, + build: `${name} (build)`, + dev: `${name} (dev)`, + }; const ids = { - create: `${id}-create`, - build: `${id}-build`, - dev: `${id}-dev`, + create: `${toId(names.create)}`, + build: `${toId(names.build)}`, + dev: `${toId(names.dev)}`, }; const jobs = [ defineJob( - ids.create, + names.create, { - name: `${name} (create)`, executor: { class: 'large', name: 'sb_node_22_browsers', @@ -275,9 +291,8 @@ function defineSandboxFlow(name: K) { [ids.create] ), defineJob( - ids.build, + names.build, { - name: `${name} (build)`, executor: { class: 'xlarge', name: 'sb_playwright', @@ -332,9 +347,8 @@ function defineSandboxFlow(name: K) { [ids.create] ), defineJob( - ids.dev, + names.dev, { - name: `${name} (dev)`, executor: { class: 'xlarge', name: 'sb_playwright', @@ -495,150 +509,150 @@ const build = defineJob('build', { const sandboxes = ['react-vite/default-ts'].map(defineSandboxFlow); const jobs = { - 'bench-packages': { - executor: { - class: 'small', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - when: { - condition: { - and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', - name: 'Benchmarking packages against base branch', - working_directory: 'scripts', - }, - }, - ], - }, - }, - { - when: { - condition: { - or: [ - { - not: '<< pipeline.parameters.ghBaseBranch >>', - }, - { - not: '<< pipeline.parameters.ghPrNumber >>', - }, - ], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: 'yarn bench-packages --upload', - name: 'Uploading package benchmarks for branch', - working_directory: 'scripts', - }, - }, - ], - }, - }, - { - store_artifacts: { - path: 'bench/packages/results.json', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'bench-sandboxes': { - executor: { - class: 'small', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - 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', - name: 'Running Bench', - }, - }, - { - run: { - command: - 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', - name: 'Uploading results', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', - }, - }, - ], - }, + // 'bench-packages': { + // executor: { + // class: 'small', + // name: 'sb_node_22_classic', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // when: { + // condition: { + // and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', + // name: 'Benchmarking packages against base branch', + // working_directory: 'scripts', + // }, + // }, + // ], + // }, + // }, + // { + // when: { + // condition: { + // or: [ + // { + // not: '<< pipeline.parameters.ghBaseBranch >>', + // }, + // { + // not: '<< pipeline.parameters.ghPrNumber >>', + // }, + // ], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // }, + // }, + // { + // run: { + // command: 'yarn bench-packages --upload', + // name: 'Uploading package benchmarks for branch', + // working_directory: 'scripts', + // }, + // }, + // ], + // }, + // }, + // { + // store_artifacts: { + // path: 'bench/packages/results.json', + // }, + // }, + // 'report-workflow-on-failure', + // 'cancel-workflow-on-failure', + // ], + // }, + // 'bench-sandboxes': { + // executor: { + // class: 'small', + // name: 'sb_playwright', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + // 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', + // name: 'Running Bench', + // }, + // }, + // { + // run: { + // command: + // 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', + // name: 'Uploading results', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', + // }, + // }, + // ], + // }, [build.id]: build.implementation, check: { executor: { @@ -685,1260 +699,470 @@ const jobs = { 'cancel-workflow-on-failure', ], }, - 'check-sandboxes': { - executor: { - class: 'medium', - name: 'sb_node_22_classic', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - 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', - name: 'Type check Sandboxes', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'chromatic-internal-storybook': { - environment: { - NODE_OPTIONS: '--max_old_space_size=4096', - }, - executor: { - class: 'large', - name: 'sb_node_22_browsers', - }, - steps: [ - 'checkout', - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn storybook:ui:chromatic', - name: 'Running Chromatic', - working_directory: 'code', - }, - }, - 'report-workflow-on-failure', - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'chromatic-sandboxes': { - executor: { - class: 'medium', - name: 'sb_node_22_browsers', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - 'checkout', - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - 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', - name: 'Running Chromatic', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - coverage: { - executor: { - class: 'small', - name: 'sb_node_22_browsers', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - 'codecov/upload', - 'report-workflow-on-failure', - ], - }, - 'create-sandboxes': { - executor: { - class: 'large', - name: 'sb_node_22_browsers', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', - name: 'Setup Corepack', - }, - }, - 'start-event-collector', - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - }, - name: 'Create Sandboxes', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', - }, - }, - { - persist_to_workspace: { - paths: ['sandbox/**'], - root: '.', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'e2e-dev': { - executor: { - class: 'medium+', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - { - run: { - command: - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', - name: 'Running E2E Tests', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'code/playwright-results/', - }, - }, - ], - }, - 'e2e-production': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - { - run: { - command: - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', - name: 'Running E2E Tests', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'code/playwright-results/', - }, - }, - ], - }, - 'e2e-ui': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - name: 'Install dependencies', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', - }, - }, - { - run: { - command: 'yarn playwright-e2e', - name: 'Run E2E tests', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', - }, - }, - 'report-workflow-on-failure', - ], - }, - 'e2e-ui-vitest-3': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - name: 'Install dependencies', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - }, - }, - { - run: { - command: 'yarn playwright-e2e', - name: 'Run E2E tests', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - { - store_artifacts: { - destination: 'playwright', - path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', - }, - }, - 'report-workflow-on-failure', - ], - }, - knip: { - executor: { - class: 'large', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'cd code\nyarn knip --no-exit-code\n', - name: 'Knip', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - lint: { - executor: { - class: 'medium+', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'cd code\nyarn lint\n', - name: 'Lint', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'pretty-docs': { - executor: { - class: 'medium', - name: 'sb_node_22_classic', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'pkg-manager': 'yarn', - }, - }, - { - run: { - command: 'yarn docs:prettier:check', - name: 'Prettier', - working_directory: 'scripts', - }, - }, - ], - }, - 'script-checks': { - executor: 'sb_node_22_browsers', - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'cd scripts\nyarn get-template --check\n', - name: 'Check parallelism count', - }, - }, - { - run: { - command: 'cd scripts\nyarn check\n', - name: 'Type check', - }, - }, - { - run: { - command: 'cd scripts\nyarn test --coverage\n', - name: 'Run tests', - }, - }, - { - store_test_results: { - path: 'scripts/junit.xml', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'smoke-test-sandboxes': { - executor: { - class: 'medium', - name: 'sb_node_18_browsers', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', - name: 'Smoke Testing Sandboxes', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'stories-tests': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - parallelism: 2, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', - name: 'Run tests', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'test-init-empty': { - executor: { - class: 'small', - name: 'sb_node_22_browsers', - }, - parameters: { - packageManager: { - type: 'string', - }, - template: { - type: 'string', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - when: { - condition: { - equal: ['npm', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (NPM)', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['yarn2', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (Yarn 2)', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['pnpm', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (PNPM)', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['react-vite-ts', '<< parameters.template >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (--skip-install)', - }, - }, - ], - }, - }, - 'report-workflow-on-failure', - ], - }, - 'test-init-empty-windows': { - executor: 'win/default', - parameters: { - packageManager: { - type: 'string', - }, - template: { - type: 'string', - }, - }, - steps: [ - 'checkout', - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n', - name: 'Setup Node & Yarn on Windows', - shell: 'bash.exe', - }, - }, - { - run: { - 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: ['npm', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (Windows NPM)', - shell: 'bash.exe', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['yarn2', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (Windows Yarn 2)', - shell: 'bash.exe', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['pnpm', '<< parameters.packageManager >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (Windows PNPM)', - shell: 'bash.exe', - }, - }, - ], - }, - }, - { - when: { - condition: { - equal: ['react-vite-ts', '<< parameters.template >>'], - }, - steps: [ - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - shell: 'bash.exe', - }, - }, - { - run: { - command: - 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - }, - name: 'Storybook init from empty directory (Windows --skip-install)', - shell: 'bash.exe', - }, - }, - ], - }, - }, - ], - }, - 'test-init-features': { - executor: { - class: 'small', - name: 'sb_node_22_browsers', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - background: true, - command: 'cd code\nyarn local-registry --open\n', - name: 'Verdaccio', - }, - }, - { - run: { - command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - name: 'Wait on Verdaccio', - }, - }, - { - run: { - command: - 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n', - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - }, - name: 'Storybook init for features', - }, - }, - ], - }, - 'test-portable-stories': { - executor: { - class: 'medium', - name: 'sb_playwright', - }, - parameters: { - directory: { - type: 'string', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - name: 'Install dependencies', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn jest', - name: 'Run Jest tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn vitest', - name: 'Run Vitest tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn playwright-ct', - name: 'Run Playwright CT tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - { - run: { - command: 'yarn cypress', - name: 'Run Cypress CT tests', - working_directory: - 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - }, - }, - 'report-workflow-on-failure', - ], - }, - 'test-runner-dev': { - executor: { - class: 'large', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', - name: 'Running Test Runner in Dev mode', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'test-runner-production': { - executor: { - class: 'medium+', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - 'start-event-collector', - { - run: { - command: - 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - }, - name: 'Running Test Runner', - }, - }, - { - run: { - command: - 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', - name: 'Check Telemetry', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - ], - }, - 'test-yarn-pnp': { + // 'check-sandboxes': { + // executor: { + // class: 'medium', + // name: 'sb_node_22_classic', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + // 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', + // name: 'Type check Sandboxes', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, + // 'chromatic-internal-storybook': { + // environment: { + // NODE_OPTIONS: '--max_old_space_size=4096', + // }, + // executor: { + // class: 'large', + // name: 'sb_node_22_browsers', + // }, + // steps: [ + // 'checkout', + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'yarn storybook:ui:chromatic', + // name: 'Running Chromatic', + // working_directory: 'code', + // }, + // }, + // 'report-workflow-on-failure', + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, + // 'chromatic-sandboxes': { + // executor: { + // class: 'medium', + // name: 'sb_node_22_browsers', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // 'checkout', + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + // 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', + // name: 'Running Chromatic', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, + // coverage: { + // executor: { + // class: 'small', + // name: 'sb_node_22_browsers', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // 'codecov/upload', + // 'report-workflow-on-failure', + // ], + // }, + // 'create-sandboxes': { + // executor: { + // class: 'large', + // name: 'sb_node_22_browsers', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', + // name: 'Setup Corepack', + // }, + // }, + // 'start-event-collector', + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', + // environment: { + // STORYBOOK_TELEMETRY_DEBUG: 1, + // STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + // }, + // name: 'Create Sandboxes', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', + // }, + // }, + // { + // persist_to_workspace: { + // paths: ['sandbox/**'], + // root: '.', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, + // 'e2e-dev': { + // executor: { + // class: 'medium+', + // name: 'sb_playwright', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + // name: 'Install sandbox dependencies', + // }, + // }, + // { + // run: { + // command: + // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', + // name: 'Running E2E Tests', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // { + // store_artifacts: { + // destination: 'playwright', + // path: 'code/playwright-results/', + // }, + // }, + // ], + // }, + // 'e2e-production': { + // executor: { + // class: 'medium', + // name: 'sb_playwright', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + // name: 'Install sandbox dependencies', + // }, + // }, + // { + // run: { + // command: + // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', + // name: 'Running E2E Tests', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // { + // store_artifacts: { + // destination: 'playwright', + // path: 'code/playwright-results/', + // }, + // }, + // ], + // }, + // 'e2e-ui': { + // executor: { + // class: 'medium', + // name: 'sb_playwright', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'yarn install --no-immutable', + // environment: { + // YARN_ENABLE_IMMUTABLE_INSTALLS: false, + // }, + // name: 'Install dependencies', + // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + // }, + // }, + // { + // run: { + // command: 'yarn playwright-e2e', + // name: 'Run E2E tests', + // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // { + // store_artifacts: { + // destination: 'playwright', + // path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', + // }, + // }, + // 'report-workflow-on-failure', + // ], + // }, + // 'e2e-ui-vitest-3': { + // executor: { + // class: 'medium', + // name: 'sb_playwright', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'yarn install --no-immutable', + // environment: { + // YARN_ENABLE_IMMUTABLE_INSTALLS: false, + // }, + // name: 'Install dependencies', + // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + // }, + // }, + // { + // run: { + // command: 'yarn playwright-e2e', + // name: 'Run E2E tests', + // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // { + // store_artifacts: { + // destination: 'playwright', + // path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', + // }, + // }, + // 'report-workflow-on-failure', + // ], + // }, + // knip: { + // executor: { + // class: 'large', + // name: 'sb_node_22_classic', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'cd code\nyarn knip --no-exit-code\n', + // name: 'Knip', + // }, + // }, + // 'report-workflow-on-failure', + // 'cancel-workflow-on-failure', + // ], + // }, + // lint: { + // executor: { + // class: 'medium+', + // name: 'sb_node_22_classic', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'cd code\nyarn lint\n', + // name: 'Lint', + // }, + // }, + // 'report-workflow-on-failure', + // 'cancel-workflow-on-failure', + // ], + // }, + 'pretty-docs': { executor: { class: 'medium', - name: 'sb_playwright', - }, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - name: 'Install dependencies', - working_directory: 'test-storybooks/yarn-pnp', - }, - }, - { - run: { - command: 'yarn storybook --smoke-test', - name: 'Run Storybook smoke test', - working_directory: 'test-storybooks/yarn-pnp', - }, - }, - 'report-workflow-on-failure', - ], - }, - 'unit-tests': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - parallelism: 2, - steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', - name: 'Run tests', - }, - }, - { - store_test_results: { - path: 'test-results', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - 'vitest-integration': { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - parallelism: '<< parameters.parallelism >>', - parameters: { - parallelism: { - type: 'integer', - }, + name: 'sb_node_22_classic', }, steps: [ { @@ -1947,49 +1171,839 @@ const jobs = { }, }, { - attach_workspace: { - at: '.', - }, - }, - { - run: { - command: - 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - name: 'Install sandbox dependencies', - }, - }, - 'start-event-collector', - { - run: { - command: - 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - }, - name: 'Running story tests in Vitest', + 'node/install-packages': { + 'app-dir': 'scripts', + 'pkg-manager': 'yarn', }, }, { run: { - command: - 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', - name: 'Check Telemetry', - }, - }, - { - 'report-workflow-on-failure': { - template: - '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', - }, - }, - { - store_test_results: { - path: 'test-results', + command: 'yarn docs:prettier:check', + name: 'Prettier', + working_directory: 'scripts', }, }, ], }, + // 'script-checks': { + // executor: 'sb_node_22_browsers', + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'cd scripts\nyarn get-template --check\n', + // name: 'Check parallelism count', + // }, + // }, + // { + // run: { + // command: 'cd scripts\nyarn check\n', + // name: 'Type check', + // }, + // }, + // { + // run: { + // command: 'cd scripts\nyarn test --coverage\n', + // name: 'Run tests', + // }, + // }, + // { + // store_test_results: { + // path: 'scripts/junit.xml', + // }, + // }, + // 'report-workflow-on-failure', + // 'cancel-workflow-on-failure', + // ], + // }, + // 'smoke-test-sandboxes': { + // executor: { + // class: 'medium', + // name: 'sb_node_18_browsers', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', + // name: 'Smoke Testing Sandboxes', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, + // 'stories-tests': { + // executor: { + // class: 'xlarge', + // name: 'sb_playwright', + // }, + // parallelism: 2, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', + // name: 'Run tests', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // 'report-workflow-on-failure', + // 'cancel-workflow-on-failure', + // ], + // }, + // 'test-init-empty': { + // executor: { + // class: 'small', + // name: 'sb_node_22_browsers', + // }, + // parameters: { + // packageManager: { + // type: 'string', + // }, + // template: { + // type: 'string', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // when: { + // condition: { + // equal: ['npm', '<< parameters.packageManager >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (NPM)', + // }, + // }, + // ], + // }, + // }, + // { + // when: { + // condition: { + // equal: ['yarn2', '<< parameters.packageManager >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (Yarn 2)', + // }, + // }, + // ], + // }, + // }, + // { + // when: { + // condition: { + // equal: ['pnpm', '<< parameters.packageManager >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (PNPM)', + // }, + // }, + // ], + // }, + // }, + // { + // when: { + // condition: { + // equal: ['react-vite-ts', '<< parameters.template >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (--skip-install)', + // }, + // }, + // ], + // }, + // }, + // 'report-workflow-on-failure', + // ], + // }, + // 'test-init-empty-windows': { + // executor: 'win/default', + // parameters: { + // packageManager: { + // type: 'string', + // }, + // template: { + // type: 'string', + // }, + // }, + // steps: [ + // 'checkout', + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n', + // name: 'Setup Node & Yarn on Windows', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // 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: ['npm', '<< parameters.packageManager >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (Windows NPM)', + // shell: 'bash.exe', + // }, + // }, + // ], + // }, + // }, + // { + // when: { + // condition: { + // equal: ['yarn2', '<< parameters.packageManager >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (Windows Yarn 2)', + // shell: 'bash.exe', + // }, + // }, + // ], + // }, + // }, + // { + // when: { + // condition: { + // equal: ['pnpm', '<< parameters.packageManager >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (Windows PNPM)', + // shell: 'bash.exe', + // }, + // }, + // ], + // }, + // }, + // { + // when: { + // condition: { + // equal: ['react-vite-ts', '<< parameters.template >>'], + // }, + // steps: [ + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', + // }, + // name: 'Storybook init from empty directory (Windows --skip-install)', + // shell: 'bash.exe', + // }, + // }, + // ], + // }, + // }, + // ], + // }, + // 'test-init-features': { + // executor: { + // class: 'small', + // name: 'sb_node_22_browsers', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // background: true, + // command: 'cd code\nyarn local-registry --open\n', + // name: 'Verdaccio', + // }, + // }, + // { + // run: { + // command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', + // name: 'Wait on Verdaccio', + // }, + // }, + // { + // run: { + // command: + // 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n', + // environment: { + // IN_STORYBOOK_SANDBOX: true, + // STORYBOOK_DISABLE_TELEMETRY: true, + // STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + // }, + // name: 'Storybook init for features', + // }, + // }, + // ], + // }, + // 'test-portable-stories': { + // executor: { + // class: 'medium', + // name: 'sb_playwright', + // }, + // parameters: { + // directory: { + // type: 'string', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'yarn install --no-immutable', + // environment: { + // YARN_ENABLE_IMMUTABLE_INSTALLS: false, + // }, + // name: 'Install dependencies', + // working_directory: + // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + // }, + // }, + // { + // run: { + // command: 'yarn jest', + // name: 'Run Jest tests', + // working_directory: + // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + // }, + // }, + // { + // run: { + // command: 'yarn vitest', + // name: 'Run Vitest tests', + // working_directory: + // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + // }, + // }, + // { + // run: { + // command: 'yarn playwright-ct', + // name: 'Run Playwright CT tests', + // working_directory: + // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + // }, + // }, + // { + // run: { + // command: 'yarn cypress', + // name: 'Run Cypress CT tests', + // working_directory: + // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', + // }, + // }, + // 'report-workflow-on-failure', + // ], + // }, + // 'test-runner-dev': { + // executor: { + // class: 'large', + // name: 'sb_playwright', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', + // name: 'Running Test Runner in Dev mode', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, + // 'test-runner-production': { + // executor: { + // class: 'medium+', + // name: 'sb_playwright', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + // name: 'Install sandbox dependencies', + // }, + // }, + // 'start-event-collector', + // { + // run: { + // command: + // 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', + // environment: { + // STORYBOOK_TELEMETRY_DEBUG: 1, + // STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + // }, + // name: 'Running Test Runner', + // }, + // }, + // { + // run: { + // command: + // 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', + // name: 'Check Telemetry', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, + // 'test-yarn-pnp': { + // executor: { + // class: 'medium', + // name: 'sb_playwright', + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: 'yarn install --no-immutable', + // environment: { + // YARN_ENABLE_IMMUTABLE_INSTALLS: false, + // }, + // name: 'Install dependencies', + // working_directory: 'test-storybooks/yarn-pnp', + // }, + // }, + // { + // run: { + // command: 'yarn storybook --smoke-test', + // name: 'Run Storybook smoke test', + // working_directory: 'test-storybooks/yarn-pnp', + // }, + // }, + // 'report-workflow-on-failure', + // ], + // }, + // 'unit-tests': { + // executor: { + // class: 'xlarge', + // name: 'sb_playwright', + // }, + // parallelism: 2, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', + // name: 'Run tests', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // 'report-workflow-on-failure', + // 'cancel-workflow-on-failure', + // ], + // }, + // 'vitest-integration': { + // executor: { + // class: 'xlarge', + // name: 'sb_playwright', + // }, + // parallelism: '<< parameters.parallelism >>', + // parameters: { + // parallelism: { + // type: 'integer', + // }, + // }, + // steps: [ + // { + // 'git-shallow-clone/checkout_advanced': { + // clone_options: '--depth 1 --verbose', + // }, + // }, + // { + // attach_workspace: { + // at: '.', + // }, + // }, + // { + // run: { + // command: + // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', + // name: 'Install sandbox dependencies', + // }, + // }, + // 'start-event-collector', + // { + // run: { + // command: + // 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', + // environment: { + // STORYBOOK_TELEMETRY_DEBUG: 1, + // STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', + // }, + // name: 'Running story tests in Vitest', + // }, + // }, + // { + // run: { + // command: + // 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', + // name: 'Check Telemetry', + // }, + // }, + // { + // 'report-workflow-on-failure': { + // template: + // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', + // }, + // }, + // { + // store_test_results: { + // path: 'test-results', + // }, + // }, + // ], + // }, sandboxes: { executor: { class: 'small', @@ -2226,6 +2240,8 @@ const jobs = { // ], // }, }; + +console.log(Object.keys(jobs)); const orbs = { 'browser-tools': 'circleci/browser-tools@2.3.2', codecov: 'codecov/codecov@5.4.3', @@ -2254,420 +2270,420 @@ const parameters = { }, }; const workflows = { - daily: { - jobs: [ - 'pretty-docs', - build.id, - { - lint: { - requires: [build.id], - }, - }, - { - knip: { - requires: [build.id], - }, - }, - { - 'bench-packages': { - requires: [build.id], - }, - }, - 'check', - { - 'unit-tests': { - requires: [build.id], - }, - }, - { - 'stories-tests': { - requires: [build.id], - }, - }, - { - 'script-checks': { - requires: [build.id], - }, - }, - { - 'chromatic-internal-storybook': { - requires: [build.id], - }, - }, - { - 'create-sandboxes': { - parallelism: 38, - requires: [build.id], - }, - }, - { - 'check-sandboxes': { - parallelism: 1, - requires: ['create-sandboxes'], - }, - }, - { - 'chromatic-sandboxes': { - parallelism: 35, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-production': { - parallelism: 7, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-dev': { - parallelism: 28, - requires: ['create-sandboxes'], - }, - }, - { - 'test-runner-production': { - parallelism: 33, - requires: ['create-sandboxes'], - }, - }, - { - 'vitest-integration': { - parallelism: 13, - requires: ['create-sandboxes'], - }, - }, - { - 'test-portable-stories': { - matrix: { - parameters: { - directory: ['react', 'vue3', 'nextjs', 'svelte'], - }, - }, - requires: [build.id], - }, - }, - { - 'test-yarn-pnp': { - requires: [build.id], - }, - }, - { - 'e2e-ui': { - requires: [build.id], - }, - }, - { - 'e2e-ui-vitest-3': { - requires: [build.id], - }, - }, - { - 'test-init-features': { - requires: [build.id], - }, - }, - { - 'test-init-empty': { - matrix: { - parameters: { - packageManager: ['npm'], - template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], - }, - }, - requires: [build.id], - }, - }, - { - 'test-init-empty-windows': { - matrix: { - parameters: { - packageManager: ['npm'], - template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], - }, - }, - requires: [build.id], - }, - }, - ], - when: { - equal: ['daily', '<< pipeline.parameters.workflow >>'], - }, - }, - docs: { - jobs: [ - 'pretty-docs', - build.id, - { - check: { - requires: [build.id], - }, - }, - { - sandboxes: { - requires: [build.id], - }, - }, - ...sandboxes.map((sandbox) => sandbox.workflow), - ], - when: { - equal: ['docs', '<< pipeline.parameters.workflow >>'], - }, - }, - merged: { - jobs: [ - 'pretty-docs', - build.id, - { - lint: { - requires: [build.id], - }, - }, - { - knip: { - requires: [build.id], - }, - }, - { - 'bench-packages': { - requires: [build.id], - }, - }, - 'check', - { - 'unit-tests': { - requires: [build.id], - }, - }, - { - 'stories-tests': { - requires: [build.id], - }, - }, - { - 'script-checks': { - requires: [build.id], - }, - }, - { - 'chromatic-internal-storybook': { - requires: [build.id], - }, - }, - { - coverage: { - requires: ['unit-tests'], - }, - }, - { - 'create-sandboxes': { - parallelism: 21, - requires: [build.id], - }, - }, - { - 'chromatic-sandboxes': { - parallelism: 18, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-production': { - parallelism: 6, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-dev': { - parallelism: 14, - requires: ['create-sandboxes'], - }, - }, - { - 'test-runner-production': { - parallelism: 16, - requires: ['create-sandboxes'], - }, - }, - { - 'vitest-integration': { - parallelism: 7, - requires: ['create-sandboxes'], - }, - }, - { - 'check-sandboxes': { - parallelism: 1, - requires: ['create-sandboxes'], - }, - }, - { - 'test-portable-stories': { - matrix: { - parameters: { - directory: ['react', 'vue3', 'nextjs', 'svelte'], - }, - }, - requires: [build.id], - }, - }, - { - 'test-yarn-pnp': { - requires: [build.id], - }, - }, - { - 'e2e-ui': { - requires: [build.id], - }, - }, - { - 'e2e-ui-vitest-3': { - requires: [build.id], - }, - }, - { - 'test-init-features': { - requires: [build.id], - }, - }, - { - 'test-init-empty-windows': { - matrix: { - parameters: { - packageManager: ['npm'], - template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], - }, - }, - requires: [build.id], - }, - }, - ], - when: { - equal: ['merged', '<< pipeline.parameters.workflow >>'], - }, - }, - normal: { + // daily: { + // jobs: [ + // 'pretty-docs', + // build.id, + // { + // lint: { + // requires: [build.id], + // }, + // }, + // { + // knip: { + // requires: [build.id], + // }, + // }, + // { + // 'bench-packages': { + // requires: [build.id], + // }, + // }, + // 'check', + // { + // 'unit-tests': { + // requires: [build.id], + // }, + // }, + // { + // 'stories-tests': { + // requires: [build.id], + // }, + // }, + // { + // 'script-checks': { + // requires: [build.id], + // }, + // }, + // { + // 'chromatic-internal-storybook': { + // requires: [build.id], + // }, + // }, + // { + // 'create-sandboxes': { + // parallelism: 38, + // requires: [build.id], + // }, + // }, + // { + // 'check-sandboxes': { + // parallelism: 1, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'chromatic-sandboxes': { + // parallelism: 35, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'e2e-production': { + // parallelism: 7, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'e2e-dev': { + // parallelism: 28, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'test-runner-production': { + // parallelism: 33, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'vitest-integration': { + // parallelism: 13, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'test-portable-stories': { + // matrix: { + // parameters: { + // directory: ['react', 'vue3', 'nextjs', 'svelte'], + // }, + // }, + // requires: [build.id], + // }, + // }, + // { + // 'test-yarn-pnp': { + // requires: [build.id], + // }, + // }, + // { + // 'e2e-ui': { + // requires: [build.id], + // }, + // }, + // { + // 'e2e-ui-vitest-3': { + // requires: [build.id], + // }, + // }, + // { + // 'test-init-features': { + // requires: [build.id], + // }, + // }, + // { + // 'test-init-empty': { + // matrix: { + // parameters: { + // packageManager: ['npm'], + // template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], + // }, + // }, + // requires: [build.id], + // }, + // }, + // { + // 'test-init-empty-windows': { + // matrix: { + // parameters: { + // packageManager: ['npm'], + // template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], + // }, + // }, + // requires: [build.id], + // }, + // }, + // ], + // when: { + // equal: ['daily', '<< pipeline.parameters.workflow >>'], + // }, + // }, + docs: { jobs: [ 'pretty-docs', build.id, { - lint: { - requires: [build.id], - }, - }, - { - knip: { - requires: [build.id], - }, - }, - { - 'bench-packages': { - requires: [build.id], - }, - }, - 'check', - { - 'unit-tests': { - requires: [build.id], - }, - }, - { - 'stories-tests': { - requires: [build.id], - }, - }, - { - 'script-checks': { - requires: [build.id], - }, - }, - { - 'chromatic-internal-storybook': { - requires: [build.id], - }, - }, - { - coverage: { - requires: ['unit-tests'], - }, - }, - { - 'create-sandboxes': { - parallelism: 14, - requires: [build.id], - }, - }, - { - 'chromatic-sandboxes': { - parallelism: 11, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-production': { - parallelism: 6, - requires: ['create-sandboxes'], - }, - }, - { - 'e2e-dev': { - parallelism: 8, - requires: ['create-sandboxes'], - }, - }, - { - 'test-runner-production': { - parallelism: 9, - requires: ['create-sandboxes'], - }, - }, - { - 'vitest-integration': { - parallelism: 5, - requires: ['create-sandboxes'], - }, - }, - { - 'check-sandboxes': { - parallelism: 1, - requires: ['create-sandboxes'], - }, - }, - { - 'test-yarn-pnp': { - requires: [build.id], - }, - }, - { - 'e2e-ui': { - requires: [build.id], - }, - }, - { - 'e2e-ui-vitest-3': { - requires: [build.id], - }, - }, - { - 'test-init-features': { + check: { requires: [build.id], }, }, { - 'test-portable-stories': { - matrix: { - parameters: { - directory: ['react', 'vue3', 'nextjs', 'svelte'], - }, - }, + sandboxes: { requires: [build.id], }, }, + ...sandboxes.flatMap((sandbox) => sandbox.workflow), ], when: { - equal: ['normal', '<< pipeline.parameters.workflow >>'], + equal: ['docs', '<< pipeline.parameters.workflow >>'], }, }, + // merged: { + // jobs: [ + // 'pretty-docs', + // build.id, + // { + // lint: { + // requires: [build.id], + // }, + // }, + // { + // knip: { + // requires: [build.id], + // }, + // }, + // { + // 'bench-packages': { + // requires: [build.id], + // }, + // }, + // 'check', + // { + // 'unit-tests': { + // requires: [build.id], + // }, + // }, + // { + // 'stories-tests': { + // requires: [build.id], + // }, + // }, + // { + // 'script-checks': { + // requires: [build.id], + // }, + // }, + // { + // 'chromatic-internal-storybook': { + // requires: [build.id], + // }, + // }, + // { + // coverage: { + // requires: ['unit-tests'], + // }, + // }, + // { + // 'create-sandboxes': { + // parallelism: 21, + // requires: [build.id], + // }, + // }, + // { + // 'chromatic-sandboxes': { + // parallelism: 18, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'e2e-production': { + // parallelism: 6, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'e2e-dev': { + // parallelism: 14, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'test-runner-production': { + // parallelism: 16, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'vitest-integration': { + // parallelism: 7, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'check-sandboxes': { + // parallelism: 1, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'test-portable-stories': { + // matrix: { + // parameters: { + // directory: ['react', 'vue3', 'nextjs', 'svelte'], + // }, + // }, + // requires: [build.id], + // }, + // }, + // { + // 'test-yarn-pnp': { + // requires: [build.id], + // }, + // }, + // { + // 'e2e-ui': { + // requires: [build.id], + // }, + // }, + // { + // 'e2e-ui-vitest-3': { + // requires: [build.id], + // }, + // }, + // { + // 'test-init-features': { + // requires: [build.id], + // }, + // }, + // { + // 'test-init-empty-windows': { + // matrix: { + // parameters: { + // packageManager: ['npm'], + // template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], + // }, + // }, + // requires: [build.id], + // }, + // }, + // ], + // when: { + // equal: ['merged', '<< pipeline.parameters.workflow >>'], + // }, + // }, + // normal: { + // jobs: [ + // 'pretty-docs', + // build.id, + // { + // lint: { + // requires: [build.id], + // }, + // }, + // { + // knip: { + // requires: [build.id], + // }, + // }, + // { + // 'bench-packages': { + // requires: [build.id], + // }, + // }, + // 'check', + // { + // 'unit-tests': { + // requires: [build.id], + // }, + // }, + // { + // 'stories-tests': { + // requires: [build.id], + // }, + // }, + // { + // 'script-checks': { + // requires: [build.id], + // }, + // }, + // { + // 'chromatic-internal-storybook': { + // requires: [build.id], + // }, + // }, + // { + // coverage: { + // requires: ['unit-tests'], + // }, + // }, + // { + // 'create-sandboxes': { + // parallelism: 14, + // requires: [build.id], + // }, + // }, + // { + // 'chromatic-sandboxes': { + // parallelism: 11, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'e2e-production': { + // parallelism: 6, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'e2e-dev': { + // parallelism: 8, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'test-runner-production': { + // parallelism: 9, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'vitest-integration': { + // parallelism: 5, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'check-sandboxes': { + // parallelism: 1, + // requires: ['create-sandboxes'], + // }, + // }, + // { + // 'test-yarn-pnp': { + // requires: [build.id], + // }, + // }, + // { + // 'e2e-ui': { + // requires: [build.id], + // }, + // }, + // { + // 'e2e-ui-vitest-3': { + // requires: [build.id], + // }, + // }, + // { + // 'test-init-features': { + // requires: [build.id], + // }, + // }, + // { + // 'test-portable-stories': { + // matrix: { + // parameters: { + // directory: ['react', 'vue3', 'nextjs', 'svelte'], + // }, + // }, + // requires: [build.id], + // }, + // }, + // ], + // when: { + // equal: ['normal', '<< pipeline.parameters.workflow >>'], + // }, + // }, }; export const data = { From 8feb11de45cdbba9e691580ea3b88963a2586ea2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 21:02:57 +0100 Subject: [PATCH 073/310] Update CircleCI configuration to replace job dependency from 'react-vite-default-ts--create' to 'sandboxes', enhancing clarity in workflow requirements and maintaining consistency in job definitions. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 539a6ec0769d..dab0b2a3dd4d 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -452,7 +452,7 @@ workflows: - build - react-vite-default-ts--create: requires: - - react-vite-default-ts--create + - sandboxes - react-vite-default-ts--build: requires: - react-vite-default-ts--create diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 05d009eb4057..8b5889213f7e 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -288,7 +288,7 @@ function defineSandboxFlow(name: K) { }, ], }, - [ids.create] + ['sandboxes'] ), defineJob( names.build, From 232d43ab8d4ae069951de3d42d80f9e1d8abaf57 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 21:18:12 +0100 Subject: [PATCH 074/310] Add support for react-vite/default-js sandbox in CircleCI configuration, enhancing CI workflows by defining create, build, and dev jobs for the new template, and updating sandbox definitions for improved clarity and maintainability. --- .circleci/config.generated.yml | 111 +++++++++++++++++++++++++++++++++ scripts/ci/data.ts | 6 +- 2 files changed, 116 insertions(+), 1 deletion(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index dab0b2a3dd4d..798a874a9b76 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -439,6 +439,108 @@ jobs: TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 name: Running E2E Tests + react-vite-default-js--create: + description: react-vite/default-js (create) (create) + executor: + class: large + name: sb_node_22_browsers + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - restore_cache: + keys: *a1 + - run: + command: yarn local-registry --open + name: Verdaccio + background: true + working_directory: code + - run: + background: true + command: yarn jiti ./event-log-collector.ts + name: Start Event Collector + working_directory: scripts + - run: + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + yarn wait-on tcp:127.0.0.1:6007 + name: Wait on servers + working_directory: code + - run: + command: |- + sudo corepack enable + which yarn + yarn --version + name: Setup Corepack + - run: + command: yarn task sandbox --template react-vite/default-js --no-link -s sandbox --debug + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log + name: Create Sandboxes + - store_artifacts: + path: sandbox/react-vite-default-js/debug-storybook.log + destination: logs + - persist_to_workspace: + paths: + - sandbox/react-vite-default-js + root: . + react-vite-default-js--build: + description: react-vite/default-js (build) (create) + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - restore_cache: + keys: *a1 + - run: + command: yarn task build --template react-vite/default-js --no-link -s build + name: Build storybook + - run: + command: yarn task serve --template react-vite/default-js --no-link -s serve + background: true + name: Serve storybook + - run: + command: yarn wait-on tcp:127.0.0.1:8001 + name: Wait on storybook + working_directory: code + - run: + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 + name: Running E2E Tests + react-vite-default-js--dev: + description: react-vite/default-js (dev) (create) + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 --verbose + - attach_workspace: + at: . + - restore_cache: + keys: *a1 + - run: + command: yarn task dev --template react-vite/default-js --no-link -s dev + name: Run storybook + working_directory: code + background: true + - run: + command: yarn wait-on tcp:127.0.0.1:6006 + name: Wait on storybook + working_directory: code + - run: + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 + name: Running E2E Tests workflows: docs: jobs: @@ -459,6 +561,15 @@ workflows: - react-vite-default-ts--dev: requires: - react-vite-default-ts--create + - react-vite-default-js--create: + requires: + - sandboxes + - react-vite-default-js--build: + requires: + - react-vite-default-js--create + - react-vite-default-js--dev: + requires: + - react-vite-default-js--create when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 8b5889213f7e..96b0e13c00b9 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -506,7 +506,11 @@ const build = defineJob('build', { ], }); -const sandboxes = ['react-vite/default-ts'].map(defineSandboxFlow); +const sandboxes = [ + // + 'react-vite/default-ts', + 'react-vite/default-js', +].map(defineSandboxFlow); const jobs = { // 'bench-packages': { From 1f797edc683948a507dfb16084e2f60fb0824bbf Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 23:24:53 +0100 Subject: [PATCH 075/310] Refactor CircleCI configuration to simplify job steps by introducing reusable functions for workspace attachment, cache management, and shallow cloning, enhancing maintainability and readability of the CI workflows. --- .circleci/config.generated.yml | 18 +-- scripts/ci/data.ts | 198 ++++++++++++++------------------- 2 files changed, 93 insertions(+), 123 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 798a874a9b76..9c12640abb8c 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -142,7 +142,7 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - node/install-packages: app-dir: code cache-only-lockfile: true @@ -292,7 +292,7 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - attach_workspace: at: . - restore_cache: @@ -321,7 +321,7 @@ jobs: name: sb_node_22_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - node/install-packages: app-dir: scripts pkg-manager: yarn @@ -344,7 +344,7 @@ jobs: name: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - attach_workspace: at: . - restore_cache: @@ -392,7 +392,7 @@ jobs: name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - attach_workspace: at: . - restore_cache: @@ -420,7 +420,7 @@ jobs: name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - attach_workspace: at: . - restore_cache: @@ -446,7 +446,7 @@ jobs: name: sb_node_22_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - attach_workspace: at: . - restore_cache: @@ -494,7 +494,7 @@ jobs: name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - attach_workspace: at: . - restore_cache: @@ -522,7 +522,7 @@ jobs: name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose + clone_options: --depth 1 - attach_workspace: at: . - restore_cache: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 96b0e13c00b9..a5bc36033402 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -17,6 +17,50 @@ const CACHE_KEYS = [ const dirname = import.meta.dirname; +const workspace = { + attach: () => { + return { + attach_workspace: { + at: '.', + }, + }; + }, + persist: (root: string, paths: string[]) => { + return { + persist_to_workspace: { + paths, + root, + }, + }; + }, +}; + +const cache = { + attach: (keys: string[]) => { + return { + restore_cache: { + keys, + }, + }; + }, + persist: (paths: string[], key: string) => { + return { + save_cache: { + paths, + key, + }, + }; + }, +}; + +function checkout(shallow: boolean = true) { + return { + 'git-shallow-clone/checkout_advanced': { + clone_options: shallow ? '--depth 1' : '', + }, + }; +} + const commands = { 'cancel-workflow-on-failure': { description: 'Cancels the entire workflow in case the previous step has failed', @@ -210,22 +254,9 @@ function defineSandboxFlow(name: K) { name: 'sb_node_22_browsers', }, steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - restore_cache: { - keys: CACHE_KEYS, - }, - }, - + checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), { run: { command: 'yarn local-registry --open', @@ -280,12 +311,7 @@ function defineSandboxFlow(name: K) { destination: 'logs', }, }, - { - persist_to_workspace: { - paths: [`sandbox/${id}`], - root: '.', - }, - }, + workspace.persist('.', [`sandbox/${id}`]), ], }, ['sandboxes'] @@ -298,21 +324,9 @@ function defineSandboxFlow(name: K) { name: 'sb_playwright', }, steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - restore_cache: { - keys: CACHE_KEYS, - }, - }, + checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), { run: { command: `yarn task build --template ${name} --no-link -s build`, @@ -354,21 +368,9 @@ function defineSandboxFlow(name: K) { name: 'sb_playwright', }, steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - restore_cache: { - keys: CACHE_KEYS, - }, - }, + checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), { run: { command: `yarn task dev --template ${name} --no-link -s dev`, @@ -416,11 +418,7 @@ const build = defineJob('build', { name: 'sb_node_22_classic', }, steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, + checkout(), { 'node/install-packages': { 'app-dir': 'code', @@ -435,19 +433,18 @@ const build = defineJob('build', { 'pkg-manager': 'yarn', }, }, - { - save_cache: { - paths: [ - // - '.yarn/code-install-state.gz', - '.yarn/scripts-install-state.gz', - '.yarn/root-install-state.gz', - 'code/node_modules', - 'scripts/node_modules', - ], - key: CACHE_KEYS[0], - }, - }, + + cache.persist( + [ + '.yarn/code-install-state.gz', + '.yarn/scripts-install-state.gz', + '.yarn/root-install-state.gz', + 'code/node_modules', + 'scripts/node_modules', + ], + CACHE_KEYS[0] + ), + { run: { command: 'git diff --exit-code', @@ -480,29 +477,19 @@ const build = defineJob('build', { path: 'code/bench/esbuild-metafiles', }, }, - { - persist_to_workspace: { - paths: [ - // 'code/node_modules', - // 'scripts/node_modules', - ...glob - .sync('**/src', { - cwd: join(dirname, '../../code'), - onlyDirectories: true, - ignore: ['node_modules'], - }) - .flatMap((p) => [ - `code/${p.replace('src', 'dist')}`, - `code/${p.replace('src', 'node_modules')}`, - ]), - '.verdaccio-cache', - // '.yarn/code-install-state.gz', - // '.yarn/scripts-install-state.gz', - // '.yarn/root-install-state.gz', - ], - root: '.', - }, - }, + workspace.persist('.', [ + ...glob + .sync('**/src', { + cwd: join(dirname, '../../code'), + onlyDirectories: true, + ignore: ['node_modules'], + }) + .flatMap((p) => [ + `code/${p.replace('src', 'dist')}`, + `code/${p.replace('src', 'node_modules')}`, + ]), + '.verdaccio-cache', + ]), ], }); @@ -664,21 +651,9 @@ const jobs = { name: 'sb_node_22_classic', }, steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, - { - attach_workspace: { - at: '.', - }, - }, - { - restore_cache: { - keys: CACHE_KEYS, - }, - }, + checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), { run: { command: 'yarn task --task check --no-link', @@ -1169,11 +1144,7 @@ const jobs = { name: 'sb_node_22_classic', }, steps: [ - { - 'git-shallow-clone/checkout_advanced': { - clone_options: '--depth 1 --verbose', - }, - }, + checkout(), { 'node/install-packages': { 'app-dir': 'scripts', @@ -2245,7 +2216,6 @@ const jobs = { // }, }; -console.log(Object.keys(jobs)); const orbs = { 'browser-tools': 'circleci/browser-tools@2.3.2', codecov: 'codecov/codecov@5.4.3', From a45469cfe409b5555eb5ad88e959238f4975f3c4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 27 Nov 2025 23:50:36 +0100 Subject: [PATCH 076/310] Refactor CircleCI configuration to improve job descriptions and streamline command execution, enhancing clarity and maintainability across various jobs for react-vite sandboxes. --- .circleci/config.generated.yml | 78 +++++++++++++++++----------------- scripts/ci/data.ts | 58 +++++++++++++------------ 2 files changed, 69 insertions(+), 67 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 9c12640abb8c..33cb799d7511 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -136,7 +136,7 @@ parameters: type: enum jobs: build: - description: build (create) + description: build executor: class: xlarge name: sb_node_22_classic @@ -338,7 +338,7 @@ jobs: command: echo "Grouping sandboxes in CI graph" name: Grouping sandboxes in CI graph react-vite-default-ts--create: - description: react-vite/default-ts (create) (create) + description: react-vite/default-ts (create) executor: class: large name: sb_node_22_browsers @@ -350,34 +350,34 @@ jobs: - restore_cache: keys: *a1 - run: - command: yarn local-registry --open name: Verdaccio - background: true working_directory: code - - run: background: true - command: yarn jiti ./event-log-collector.ts + command: yarn local-registry --open + - run: name: Start Event Collector working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts - run: + name: Wait on servers + working_directory: code command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 yarn wait-on tcp:127.0.0.1:6007 - name: Wait on servers - working_directory: code - run: + name: Setup Corepack command: |- sudo corepack enable which yarn yarn --version - name: Setup Corepack - run: + name: Create Sandboxes command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug environment: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - name: Create Sandboxes - store_artifacts: path: sandbox/react-vite-default-ts/debug-storybook.log destination: logs @@ -386,7 +386,7 @@ jobs: - sandbox/react-vite-default-ts root: . react-vite-default-ts--build: - description: react-vite/default-ts (build) (create) + description: react-vite/default-ts (build) executor: class: xlarge name: sb_playwright @@ -398,23 +398,23 @@ jobs: - restore_cache: keys: *a1 - run: - command: yarn task build --template react-vite/default-ts --no-link -s build name: Build storybook + command: yarn task build --template react-vite/default-ts --no-link -s build - run: - command: yarn task serve --template react-vite/default-ts --no-link -s serve - background: true name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-ts --no-link -s serve - run: - command: yarn wait-on tcp:127.0.0.1:8001 name: Wait on storybook working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 - run: + name: Running E2E Tests command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - name: Running E2E Tests react-vite-default-ts--dev: - description: react-vite/default-ts (dev) (create) + description: react-vite/default-ts (dev) executor: class: xlarge name: sb_playwright @@ -426,21 +426,21 @@ jobs: - restore_cache: keys: *a1 - run: - command: yarn task dev --template react-vite/default-ts --no-link -s dev name: Run storybook working_directory: code background: true + command: yarn task dev --template react-vite/default-ts --no-link -s dev - run: - command: yarn wait-on tcp:127.0.0.1:6006 name: Wait on storybook working_directory: code + command: yarn wait-on tcp:127.0.0.1:6006 - run: + name: Running E2E Tests command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - name: Running E2E Tests react-vite-default-js--create: - description: react-vite/default-js (create) (create) + description: react-vite/default-js (create) executor: class: large name: sb_node_22_browsers @@ -452,34 +452,34 @@ jobs: - restore_cache: keys: *a1 - run: - command: yarn local-registry --open name: Verdaccio - background: true working_directory: code - - run: background: true - command: yarn jiti ./event-log-collector.ts + command: yarn local-registry --open + - run: name: Start Event Collector working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts - run: + name: Wait on servers + working_directory: code command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 yarn wait-on tcp:127.0.0.1:6007 - name: Wait on servers - working_directory: code - run: + name: Setup Corepack command: |- sudo corepack enable which yarn yarn --version - name: Setup Corepack - run: + name: Create Sandboxes command: yarn task sandbox --template react-vite/default-js --no-link -s sandbox --debug environment: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - name: Create Sandboxes - store_artifacts: path: sandbox/react-vite-default-js/debug-storybook.log destination: logs @@ -488,7 +488,7 @@ jobs: - sandbox/react-vite-default-js root: . react-vite-default-js--build: - description: react-vite/default-js (build) (create) + description: react-vite/default-js (build) executor: class: xlarge name: sb_playwright @@ -500,23 +500,23 @@ jobs: - restore_cache: keys: *a1 - run: - command: yarn task build --template react-vite/default-js --no-link -s build name: Build storybook + command: yarn task build --template react-vite/default-js --no-link -s build - run: - command: yarn task serve --template react-vite/default-js --no-link -s serve - background: true name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-js --no-link -s serve - run: - command: yarn wait-on tcp:127.0.0.1:8001 name: Wait on storybook working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 - run: + name: Running E2E Tests command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 - name: Running E2E Tests react-vite-default-js--dev: - description: react-vite/default-js (dev) (create) + description: react-vite/default-js (dev) executor: class: xlarge name: sb_playwright @@ -528,19 +528,19 @@ jobs: - restore_cache: keys: *a1 - run: - command: yarn task dev --template react-vite/default-js --no-link -s dev name: Run storybook working_directory: code background: true + command: yarn task dev --template react-vite/default-js --no-link -s dev - run: - command: yarn wait-on tcp:127.0.0.1:6006 name: Wait on storybook working_directory: code + command: yarn wait-on tcp:127.0.0.1:6006 - run: + name: Running E2E Tests command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 - name: Running E2E Tests workflows: docs: jobs: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index a5bc36033402..a60e393ab412 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -53,6 +53,17 @@ const cache = { }, }; +const artifact = { + persist: (path: string, destination: string) => { + return { + store_artifacts: { + path, + destination, + }, + }; + }, +}; + function checkout(shallow: boolean = true) { return { 'git-shallow-clone/checkout_advanced': { @@ -217,7 +228,7 @@ function defineJob( id: toId(name), name, implementation: { - description: `${name} (create)`, + description: name, ...implementation, }, requires, @@ -259,58 +270,53 @@ function defineSandboxFlow(name: K) { cache.attach(CACHE_KEYS), { run: { - command: 'yarn local-registry --open', name: 'Verdaccio', - background: true, working_directory: 'code', + background: true, + command: 'yarn local-registry --open', }, }, { run: { - background: true, - command: 'yarn jiti ./event-log-collector.ts', name: 'Start Event Collector', working_directory: 'scripts', + background: true, + command: 'yarn jiti ./event-log-collector.ts', }, }, { run: { + name: 'Wait on servers', + working_directory: 'code', command: [ 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy 'yarn wait-on tcp:127.0.0.1:6007', // event collector ].join('\n'), - name: 'Wait on servers', - working_directory: 'code', }, }, { run: { + name: 'Setup Corepack', command: [ // 'sudo corepack enable', 'which yarn', 'yarn --version', ].join('\n'), - name: 'Setup Corepack', }, }, { run: { + name: 'Create Sandboxes', command: `yarn task sandbox --template ${name} --no-link -s sandbox --debug`, environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, - name: 'Create Sandboxes', - }, - }, - { - store_artifacts: { - path: `sandbox/${id}/debug-storybook.log`, - destination: 'logs', }, }, + artifact.persist(`sandbox/${id}/debug-storybook.log`, 'logs'), workspace.persist('.', [`sandbox/${id}`]), ], }, @@ -329,31 +335,31 @@ function defineSandboxFlow(name: K) { cache.attach(CACHE_KEYS), { run: { - command: `yarn task build --template ${name} --no-link -s build`, name: 'Build storybook', + command: `yarn task build --template ${name} --no-link -s build`, }, }, { run: { - command: `yarn task serve --template ${name} --no-link -s serve`, - background: true, name: 'Serve storybook', + background: true, + command: `yarn task serve --template ${name} --no-link -s serve`, }, }, { run: { - command: 'yarn wait-on tcp:127.0.0.1:8001', name: 'Wait on storybook', working_directory: 'code', + command: 'yarn wait-on tcp:127.0.0.1:8001', }, }, { run: { + name: 'Running E2E Tests', command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s never" --verbose --index=0 --total=1`, ].join('\n'), - name: 'Running E2E Tests', }, }, ], @@ -373,26 +379,26 @@ function defineSandboxFlow(name: K) { cache.attach(CACHE_KEYS), { run: { - command: `yarn task dev --template ${name} --no-link -s dev`, name: 'Run storybook', working_directory: 'code', background: true, + command: `yarn task dev --template ${name} --no-link -s dev`, }, }, { run: { - command: 'yarn wait-on tcp:127.0.0.1:6006', name: 'Wait on storybook', working_directory: 'code', + command: 'yarn wait-on tcp:127.0.0.1:6006', }, }, { run: { + name: 'Running E2E Tests', command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${name} --no-link -s never" --verbose --index=0 --total=1`, ].join('\n'), - name: 'Running E2E Tests', }, }, ], @@ -472,11 +478,7 @@ const build = defineJob('build', { }, }, 'report-workflow-on-failure', - { - store_artifacts: { - path: 'code/bench/esbuild-metafiles', - }, - }, + artifact.persist('code/bench/esbuild-metafiles'), workspace.persist('.', [ ...glob .sync('**/src', { From a9fbfc5b2306e858399127f0a350a73b3b52d2c8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 00:18:10 +0100 Subject: [PATCH 077/310] Refactor CircleCI configuration to introduce reusable functions for git operations and npm installations, enhancing maintainability and readability of job steps while ensuring consistent command execution across workflows. --- .circleci/config.generated.yml | 15 +- scripts/ci/data.ts | 770 ++++----------------------------- 2 files changed, 93 insertions(+), 692 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 33cb799d7511..d12095117265 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -143,14 +143,14 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - - node/install-packages: - app-dir: code - cache-only-lockfile: true - pkg-manager: yarn - node/install-packages: app-dir: scripts + pkg-manager: yarn cache-only-lockfile: true + - node/install-packages: + app-dir: code pkg-manager: yarn + cache-only-lockfile: true - save_cache: paths: - .yarn/code-install-state.gz @@ -160,11 +160,11 @@ jobs: - scripts/node_modules key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "scripts/yarn.lock" }}/{{ checksum "code/yarn.lock" }} - run: + name: Ensure no changes pending command: git diff --exit-code - name: Check for changes - run: - command: yarn dedupe --check name: Check for dedupe + command: yarn dedupe --check - run: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile @@ -176,6 +176,7 @@ jobs: - report-workflow-on-failure - store_artifacts: path: code/bench/esbuild-metafiles + destination: bench - persist_to_workspace: paths: - code/core/dist @@ -287,6 +288,7 @@ jobs: - .verdaccio-cache root: . check: + description: check executor: class: xlarge name: sb_node_22_classic @@ -325,6 +327,7 @@ jobs: - node/install-packages: app-dir: scripts pkg-manager: yarn + cache-only-lockfile: true - run: command: yarn docs:prettier:check name: Prettier diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index a60e393ab412..8825b3140238 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -64,13 +64,43 @@ const artifact = { }, }; -function checkout(shallow: boolean = true) { - return { - 'git-shallow-clone/checkout_advanced': { - clone_options: shallow ? '--depth 1' : '', - }, - }; -} +const git = { + checkout: (shallow: boolean = true) => { + return { + 'git-shallow-clone/checkout_advanced': { + clone_options: shallow ? '--depth 1' : '', + }, + }; + }, + check: () => { + return { + run: { + name: 'Ensure no changes pending', + command: 'git diff --exit-code', + }, + }; + }, +}; + +const npm = { + install: (appDir: string, pkgManager: string = 'yarn') => { + return { + 'node/install-packages': { + 'app-dir': appDir, + 'pkg-manager': pkgManager, + 'cache-only-lockfile': true, + }, + }; + }, + check: () => { + return { + run: { + name: 'Check for dedupe', + command: 'yarn dedupe --check', + }, + }; + }, +}; const commands = { 'cancel-workflow-on-failure': { @@ -265,7 +295,7 @@ function defineSandboxFlow(name: K) { name: 'sb_node_22_browsers', }, steps: [ - checkout(), + git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS), { @@ -330,7 +360,7 @@ function defineSandboxFlow(name: K) { name: 'sb_playwright', }, steps: [ - checkout(), + git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS), { @@ -374,7 +404,7 @@ function defineSandboxFlow(name: K) { name: 'sb_playwright', }, steps: [ - checkout(), + git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS), { @@ -424,22 +454,9 @@ const build = defineJob('build', { name: 'sb_node_22_classic', }, steps: [ - checkout(), - { - 'node/install-packages': { - 'app-dir': 'code', - 'cache-only-lockfile': true, - 'pkg-manager': 'yarn', - }, - }, - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'cache-only-lockfile': true, - 'pkg-manager': 'yarn', - }, - }, - + git.checkout(), + npm.install('scripts'), + npm.install('code'), cache.persist( [ '.yarn/code-install-state.gz', @@ -450,19 +467,8 @@ const build = defineJob('build', { ], CACHE_KEYS[0] ), - - { - run: { - command: 'git diff --exit-code', - name: 'Check for changes', - }, - }, - { - run: { - command: 'yarn dedupe --check', - name: 'Check for dedupe', - }, - }, + git.check(), + npm.check(), { run: { command: 'yarn task --task compile --start-from=auto --no-link --debug', @@ -478,7 +484,7 @@ const build = defineJob('build', { }, }, 'report-workflow-on-failure', - artifact.persist('code/bench/esbuild-metafiles'), + artifact.persist('code/bench/esbuild-metafiles', 'bench'), workspace.persist('.', [ ...glob .sync('**/src', { @@ -495,6 +501,40 @@ const build = defineJob('build', { ], }); +const check = defineJob('check', { + executor: { + class: 'xlarge', + name: 'sb_node_22_classic', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), + { + run: { + command: 'yarn task --task check --no-link', + name: 'TypeCheck code', + working_directory: 'code', + }, + }, + { + run: { + command: 'yarn check', + name: 'TypeCheck scripts', + working_directory: 'scripts', + }, + }, + { + run: { + command: 'git diff --exit-code', + name: 'Ensure no changes pending', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], +}); + const sandboxes = [ // 'react-vite/default-ts', @@ -647,39 +687,7 @@ const jobs = { // ], // }, [build.id]: build.implementation, - check: { - executor: { - class: 'xlarge', - name: 'sb_node_22_classic', - }, - steps: [ - checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS), - { - run: { - command: 'yarn task --task check --no-link', - name: 'TypeCheck code', - working_directory: 'code', - }, - }, - { - run: { - command: 'yarn check', - name: 'TypeCheck scripts', - working_directory: 'scripts', - }, - }, - { - run: { - command: 'git diff --exit-code', - name: 'Ensure no changes pending', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, + [check.id]: check.implementation, // 'check-sandboxes': { // executor: { // class: 'medium', @@ -1146,13 +1154,8 @@ const jobs = { name: 'sb_node_22_classic', }, steps: [ - checkout(), - { - 'node/install-packages': { - 'app-dir': 'scripts', - 'pkg-manager': 'yarn', - }, - }, + git.checkout(), + npm.install('scripts'), { run: { command: 'yarn docs:prettier:check', @@ -2005,217 +2008,6 @@ const jobs = { }, {} as Record ), - - // 'sandboxes-a-create': { - // executor: { - // class: 'large', - // name: 'sb_node_22_browsers', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // restore_cache: { - // keys: CACHE_KEYS, - // }, - // }, - - // { - // run: { - // command: 'yarn local-registry --open', - // name: 'Verdaccio', - // background: true, - // working_directory: 'code', - // }, - // }, - // { - // run: { - // background: true, - // command: 'yarn jiti ./event-log-collector.ts', - // name: 'Start Event Collector', - // working_directory: 'scripts', - // }, - // }, - // { - // run: { - // command: [ - // 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio - // 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy - // 'yarn wait-on tcp:127.0.0.1:6007', // event collector - // ].join('\n'), - // name: 'Wait on servers', - // working_directory: 'code', - // }, - // }, - // { - // run: { - // command: [ - // // - // 'sudo corepack enable', - // 'which yarn', - // 'yarn --version', - // ].join('\n'), - // name: 'Setup Corepack', - // }, - // }, - // { - // run: { - // command: - // 'yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug', - // environment: { - // STORYBOOK_TELEMETRY_DEBUG: 1, - // STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', - // }, - // name: 'Create Sandboxes', - // }, - // }, - // { - // store_artifacts: { - // path: 'sandbox/react-vite-default-ts/debug-storybook.log', - // destination: 'logs', - // }, - // }, - // { - // persist_to_workspace: { - // paths: ['sandbox/react-vite-default-ts'], - // root: '.', - // }, - // }, - // ], - // }, - // 'sandboxes-a-build': { - // executor: { - // class: 'xlarge', - // name: 'sb_playwright', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // restore_cache: { - // keys: CACHE_KEYS, - // }, - // }, - // { - // run: { - // command: 'yarn task build --template react-vite/default-ts --no-link -s build', - // name: 'Build storybook', - // }, - // }, - // { - // run: { - // command: 'yarn task serve --template react-vite/default-ts --no-link -s serve', - // background: true, - // name: 'Serve storybook', - // }, - // }, - // { - // run: { - // command: 'yarn wait-on tcp:127.0.0.1:8001', - // name: 'Wait on storybook', - // working_directory: 'code', - // }, - // }, - // { - // run: { - // command: [ - // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - // 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', - // ].join('\n'), - // name: 'Running E2E Tests', - // }, - // }, - // ], - // }, - // 'sandboxes-a-dev': { - // executor: { - // class: 'xlarge', - // name: 'sb_playwright', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // restore_cache: { - // keys: CACHE_KEYS, - // }, - // }, - // { - // run: { - // command: 'yarn task dev --template react-vite/default-ts --no-link -s dev', - // name: 'Run storybook', - // working_directory: 'code', - // background: true, - // }, - // }, - // { - // run: { - // command: 'yarn wait-on tcp:127.0.0.1:6006', - // name: 'Wait on storybook', - // working_directory: 'code', - // }, - // }, - // { - // run: { - // command: [ - // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - // 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1', - // ].join('\n'), - // name: 'Running E2E Tests', - // }, - // }, - // ], - // }, - // 'sandboxes-b-create': { - // executor: { - // class: 'xlarge', - // name: 'sb_playwright', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // ], - // }, - // 'sandboxes-b-e2e': { - // executor: { - // class: 'xlarge', - // name: 'sb_playwright', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // ], - // }, }; const orbs = { @@ -2246,151 +2038,12 @@ const parameters = { }, }; const workflows = { - // daily: { - // jobs: [ - // 'pretty-docs', - // build.id, - // { - // lint: { - // requires: [build.id], - // }, - // }, - // { - // knip: { - // requires: [build.id], - // }, - // }, - // { - // 'bench-packages': { - // requires: [build.id], - // }, - // }, - // 'check', - // { - // 'unit-tests': { - // requires: [build.id], - // }, - // }, - // { - // 'stories-tests': { - // requires: [build.id], - // }, - // }, - // { - // 'script-checks': { - // requires: [build.id], - // }, - // }, - // { - // 'chromatic-internal-storybook': { - // requires: [build.id], - // }, - // }, - // { - // 'create-sandboxes': { - // parallelism: 38, - // requires: [build.id], - // }, - // }, - // { - // 'check-sandboxes': { - // parallelism: 1, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'chromatic-sandboxes': { - // parallelism: 35, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'e2e-production': { - // parallelism: 7, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'e2e-dev': { - // parallelism: 28, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'test-runner-production': { - // parallelism: 33, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'vitest-integration': { - // parallelism: 13, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'test-portable-stories': { - // matrix: { - // parameters: { - // directory: ['react', 'vue3', 'nextjs', 'svelte'], - // }, - // }, - // requires: [build.id], - // }, - // }, - // { - // 'test-yarn-pnp': { - // requires: [build.id], - // }, - // }, - // { - // 'e2e-ui': { - // requires: [build.id], - // }, - // }, - // { - // 'e2e-ui-vitest-3': { - // requires: [build.id], - // }, - // }, - // { - // 'test-init-features': { - // requires: [build.id], - // }, - // }, - // { - // 'test-init-empty': { - // matrix: { - // parameters: { - // packageManager: ['npm'], - // template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], - // }, - // }, - // requires: [build.id], - // }, - // }, - // { - // 'test-init-empty-windows': { - // matrix: { - // parameters: { - // packageManager: ['npm'], - // template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], - // }, - // }, - // requires: [build.id], - // }, - // }, - // ], - // when: { - // equal: ['daily', '<< pipeline.parameters.workflow >>'], - // }, - // }, docs: { jobs: [ 'pretty-docs', build.id, { - check: { + [check.id]: { requires: [build.id], }, }, @@ -2405,261 +2058,6 @@ const workflows = { equal: ['docs', '<< pipeline.parameters.workflow >>'], }, }, - // merged: { - // jobs: [ - // 'pretty-docs', - // build.id, - // { - // lint: { - // requires: [build.id], - // }, - // }, - // { - // knip: { - // requires: [build.id], - // }, - // }, - // { - // 'bench-packages': { - // requires: [build.id], - // }, - // }, - // 'check', - // { - // 'unit-tests': { - // requires: [build.id], - // }, - // }, - // { - // 'stories-tests': { - // requires: [build.id], - // }, - // }, - // { - // 'script-checks': { - // requires: [build.id], - // }, - // }, - // { - // 'chromatic-internal-storybook': { - // requires: [build.id], - // }, - // }, - // { - // coverage: { - // requires: ['unit-tests'], - // }, - // }, - // { - // 'create-sandboxes': { - // parallelism: 21, - // requires: [build.id], - // }, - // }, - // { - // 'chromatic-sandboxes': { - // parallelism: 18, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'e2e-production': { - // parallelism: 6, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'e2e-dev': { - // parallelism: 14, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'test-runner-production': { - // parallelism: 16, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'vitest-integration': { - // parallelism: 7, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'check-sandboxes': { - // parallelism: 1, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'test-portable-stories': { - // matrix: { - // parameters: { - // directory: ['react', 'vue3', 'nextjs', 'svelte'], - // }, - // }, - // requires: [build.id], - // }, - // }, - // { - // 'test-yarn-pnp': { - // requires: [build.id], - // }, - // }, - // { - // 'e2e-ui': { - // requires: [build.id], - // }, - // }, - // { - // 'e2e-ui-vitest-3': { - // requires: [build.id], - // }, - // }, - // { - // 'test-init-features': { - // requires: [build.id], - // }, - // }, - // { - // 'test-init-empty-windows': { - // matrix: { - // parameters: { - // packageManager: ['npm'], - // template: ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'], - // }, - // }, - // requires: [build.id], - // }, - // }, - // ], - // when: { - // equal: ['merged', '<< pipeline.parameters.workflow >>'], - // }, - // }, - // normal: { - // jobs: [ - // 'pretty-docs', - // build.id, - // { - // lint: { - // requires: [build.id], - // }, - // }, - // { - // knip: { - // requires: [build.id], - // }, - // }, - // { - // 'bench-packages': { - // requires: [build.id], - // }, - // }, - // 'check', - // { - // 'unit-tests': { - // requires: [build.id], - // }, - // }, - // { - // 'stories-tests': { - // requires: [build.id], - // }, - // }, - // { - // 'script-checks': { - // requires: [build.id], - // }, - // }, - // { - // 'chromatic-internal-storybook': { - // requires: [build.id], - // }, - // }, - // { - // coverage: { - // requires: ['unit-tests'], - // }, - // }, - // { - // 'create-sandboxes': { - // parallelism: 14, - // requires: [build.id], - // }, - // }, - // { - // 'chromatic-sandboxes': { - // parallelism: 11, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'e2e-production': { - // parallelism: 6, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'e2e-dev': { - // parallelism: 8, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'test-runner-production': { - // parallelism: 9, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'vitest-integration': { - // parallelism: 5, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'check-sandboxes': { - // parallelism: 1, - // requires: ['create-sandboxes'], - // }, - // }, - // { - // 'test-yarn-pnp': { - // requires: [build.id], - // }, - // }, - // { - // 'e2e-ui': { - // requires: [build.id], - // }, - // }, - // { - // 'e2e-ui-vitest-3': { - // requires: [build.id], - // }, - // }, - // { - // 'test-init-features': { - // requires: [build.id], - // }, - // }, - // { - // 'test-portable-stories': { - // matrix: { - // parameters: { - // directory: ['react', 'vue3', 'nextjs', 'svelte'], - // }, - // }, - // requires: [build.id], - // }, - // }, - // ], - // when: { - // equal: ['normal', '<< pipeline.parameters.workflow >>'], - // }, - // }, }; export const data = { From dc540e40e017cc2500a6f3b07ce1ccfdff3e311d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 09:30:47 +0100 Subject: [PATCH 078/310] Enhance CircleCI configuration by introducing a dedicated unit-tests job, improving test execution clarity and maintainability. Refactor caching and workspace management into reusable functions, streamlining job steps and ensuring consistent command execution across workflows. --- .circleci/config.generated.yml | 46 ++++-- scripts/ci/data.ts | 273 ++++++++++----------------------- scripts/ci/utils.ts | 93 +++++++++++ 3 files changed, 208 insertions(+), 204 deletions(-) create mode 100644 scripts/ci/utils.ts diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index d12095117265..feb8e6f7c36e 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -305,16 +305,41 @@ jobs: - darwin-node_modules/{{ checksum ".nvmrc" }} - darwin-node_modules - run: - command: yarn task --task check --no-link name: TypeCheck code working_directory: code + command: yarn task --task check --no-link - run: - command: yarn check name: TypeCheck scripts working_directory: scripts + command: yarn check - run: + name: Ensure no changes pending command: git diff --exit-code + - report-workflow-on-failure + - cancel-workflow-on-failure + unit-tests: + description: unit-tests + executor: + class: xlarge + name: sb_node_22_classic + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: . + - restore_cache: + keys: *a1 + - run: + name: Run tests + working_directory: code + command: |- + TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + - store_test_results: + path: test-results + - run: name: Ensure no changes pending + command: git diff --exit-code - report-workflow-on-failure - cancel-workflow-on-failure pretty-docs: @@ -329,22 +354,16 @@ jobs: pkg-manager: yarn cache-only-lockfile: true - run: - command: yarn docs:prettier:check name: Prettier working_directory: scripts + command: yarn docs:prettier:check sandboxes: - executor: - class: small - name: sb_node_22_classic - steps: - - run: - command: echo "Grouping sandboxes in CI graph" - name: Grouping sandboxes in CI graph + type: no-op react-vite-default-ts--create: description: react-vite/default-ts (create) executor: - class: large name: sb_node_22_browsers + class: large steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -445,8 +464,8 @@ jobs: react-vite-default-js--create: description: react-vite/default-js (create) executor: - class: large name: sb_node_22_browsers + class: large steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -552,6 +571,9 @@ workflows: - check: requires: - build + - unit-tests: + requires: + - build - sandboxes: requires: - build diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 8825b3140238..dcd8bd81d8f6 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -4,6 +4,8 @@ import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; +import { artifact, cache, git, npm, toId, workspace } from './utils'; + const PLATFORM = os.platform(); const CACHE_KEYS = [ `${PLATFORM}-node_modules`, @@ -14,94 +16,16 @@ const CACHE_KEYS = [ ].map((_, index, list) => { return list.slice(0, list.length - index).join('/'); }); +const CACHE_PATHS = [ + '.yarn/code-install-state.gz', + '.yarn/scripts-install-state.gz', + '.yarn/root-install-state.gz', + 'code/node_modules', + 'scripts/node_modules', +]; const dirname = import.meta.dirname; -const workspace = { - attach: () => { - return { - attach_workspace: { - at: '.', - }, - }; - }, - persist: (root: string, paths: string[]) => { - return { - persist_to_workspace: { - paths, - root, - }, - }; - }, -}; - -const cache = { - attach: (keys: string[]) => { - return { - restore_cache: { - keys, - }, - }; - }, - persist: (paths: string[], key: string) => { - return { - save_cache: { - paths, - key, - }, - }; - }, -}; - -const artifact = { - persist: (path: string, destination: string) => { - return { - store_artifacts: { - path, - destination, - }, - }; - }, -}; - -const git = { - checkout: (shallow: boolean = true) => { - return { - 'git-shallow-clone/checkout_advanced': { - clone_options: shallow ? '--depth 1' : '', - }, - }; - }, - check: () => { - return { - run: { - name: 'Ensure no changes pending', - command: 'git diff --exit-code', - }, - }; - }, -}; - -const npm = { - install: (appDir: string, pkgManager: string = 'yarn') => { - return { - 'node/install-packages': { - 'app-dir': appDir, - 'pkg-manager': pkgManager, - 'cache-only-lockfile': true, - }, - }; - }, - check: () => { - return { - run: { - name: 'Check for dedupe', - command: 'yarn dedupe --check', - }, - }; - }, -}; - const commands = { 'cancel-workflow-on-failure': { description: 'Cancels the entire workflow in case the previous step has failed', @@ -265,15 +189,6 @@ function defineJob( }; } -function toId(name: string) { - // replace all non-alphanumeric characters with a hyphen - // trim leading and trailing hyphens - return name - .toLowerCase() - .replace(/[^a-z0-9]/g, '-') - .replace(/^-+|-+$/g, ''); -} - function defineSandboxFlow(name: K) { const id = toId(name); const names = { @@ -291,8 +206,8 @@ function defineSandboxFlow(name: K) { names.create, { executor: { - class: 'large', name: 'sb_node_22_browsers', + class: 'large', }, steps: [ git.checkout(), @@ -457,16 +372,7 @@ const build = defineJob('build', { git.checkout(), npm.install('scripts'), npm.install('code'), - cache.persist( - [ - '.yarn/code-install-state.gz', - '.yarn/scripts-install-state.gz', - '.yarn/root-install-state.gz', - 'code/node_modules', - 'scripts/node_modules', - ], - CACHE_KEYS[0] - ), + cache.persist(CACHE_PATHS, CACHE_KEYS[0]), git.check(), npm.check(), { @@ -512,24 +418,47 @@ const check = defineJob('check', { cache.attach(CACHE_KEYS), { run: { - command: 'yarn task --task check --no-link', name: 'TypeCheck code', working_directory: 'code', + command: 'yarn task --task check --no-link', }, }, { run: { - command: 'yarn check', name: 'TypeCheck scripts', working_directory: 'scripts', + command: 'yarn check', }, }, + git.check(), + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], +}); + +const unitTests = defineJob('unit-tests', { + executor: { + class: 'xlarge', + name: 'sb_node_22_classic', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), { run: { - command: 'git diff --exit-code', - name: 'Ensure no changes pending', + name: 'Run tests', + working_directory: 'code', + command: + 'TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + }, + }, + { + store_test_results: { + path: 'test-results', }, }, + git.check(), 'report-workflow-on-failure', 'cancel-workflow-on-failure', ], @@ -542,6 +471,41 @@ const sandboxes = [ ].map(defineSandboxFlow); const jobs = { + [build.id]: build.implementation, + [check.id]: check.implementation, + [unitTests.id]: unitTests.implementation, + 'pretty-docs': { + executor: { + class: 'medium', + name: 'sb_node_22_classic', + }, + steps: [ + git.checkout(), + npm.install('scripts'), + { + run: { + name: 'Prettier', + working_directory: 'scripts', + command: 'yarn docs:prettier:check', + }, + }, + ], + }, + + sandboxes: { + type: 'no-op', + }, + ...sandboxes.reduce( + (acc, sandbox) => { + for (const job of sandbox.jobs) { + acc[job.id] = job.implementation; + } + + return acc; + }, + {} as Record + ), + // 'bench-packages': { // executor: { // class: 'small', @@ -686,8 +650,7 @@ const jobs = { // }, // ], // }, - [build.id]: build.implementation, - [check.id]: check.implementation, + // 'check-sandboxes': { // executor: { // class: 'medium', @@ -1148,63 +1111,6 @@ const jobs = { // 'cancel-workflow-on-failure', // ], // }, - 'pretty-docs': { - executor: { - class: 'medium', - name: 'sb_node_22_classic', - }, - steps: [ - git.checkout(), - npm.install('scripts'), - { - run: { - command: 'yarn docs:prettier:check', - name: 'Prettier', - working_directory: 'scripts', - }, - }, - ], - }, - // 'script-checks': { - // executor: 'sb_node_22_browsers', - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'cd scripts\nyarn get-template --check\n', - // name: 'Check parallelism count', - // }, - // }, - // { - // run: { - // command: 'cd scripts\nyarn check\n', - // name: 'Type check', - // }, - // }, - // { - // run: { - // command: 'cd scripts\nyarn test --coverage\n', - // name: 'Run tests', - // }, - // }, - // { - // store_test_results: { - // path: 'scripts/junit.xml', - // }, - // }, - // 'report-workflow-on-failure', - // 'cancel-workflow-on-failure', - // ], - // }, // 'smoke-test-sandboxes': { // executor: { // class: 'medium', @@ -1984,30 +1890,6 @@ const jobs = { // }, // ], // }, - sandboxes: { - executor: { - class: 'small', - name: 'sb_node_22_classic', - }, - steps: [ - { - run: { - command: 'echo "Grouping sandboxes in CI graph"', - name: 'Grouping sandboxes in CI graph', - }, - }, - ], - }, - ...sandboxes.reduce( - (acc, sandbox) => { - for (const job of sandbox.jobs) { - acc[job.id] = job.implementation; - } - - return acc; - }, - {} as Record - ), }; const orbs = { @@ -2019,6 +1901,7 @@ const orbs = { nx: 'nrwl/nx@1.7.0', win: 'circleci/windows@5.1.1', }; + const parameters = { ghBaseBranch: { default: 'next', @@ -2037,6 +1920,7 @@ const parameters = { type: 'enum', }, }; + const workflows = { docs: { jobs: [ @@ -2047,6 +1931,11 @@ const workflows = { requires: [build.id], }, }, + { + [unitTests.id]: { + requires: [build.id], + }, + }, { sandboxes: { requires: [build.id], diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts new file mode 100644 index 000000000000..012a5f280e31 --- /dev/null +++ b/scripts/ci/utils.ts @@ -0,0 +1,93 @@ +export const workspace = { + attach: () => { + return { + attach_workspace: { + at: '.', + }, + }; + }, + persist: (root: string, paths: string[]) => { + return { + persist_to_workspace: { + paths, + root, + }, + }; + }, +}; + +export const cache = { + attach: (keys: string[]) => { + return { + restore_cache: { + keys, + }, + }; + }, + persist: (paths: string[], key: string) => { + return { + save_cache: { + paths, + key, + }, + }; + }, +}; + +export const artifact = { + persist: (path: string, destination: string) => { + return { + store_artifacts: { + path, + destination, + }, + }; + }, +}; + +export const git = { + checkout: (shallow: boolean = true) => { + return { + 'git-shallow-clone/checkout_advanced': { + clone_options: shallow ? '--depth 1' : '', + }, + }; + }, + check: () => { + return { + run: { + name: 'Ensure no changes pending', + command: 'git diff --exit-code', + }, + }; + }, +}; + +export const npm = { + install: (appDir: string, pkgManager: string = 'yarn') => { + return { + 'node/install-packages': { + 'app-dir': appDir, + 'pkg-manager': pkgManager, + 'cache-only-lockfile': true, + }, + }; + }, + check: () => { + return { + run: { + name: 'Check for dedupe', + command: 'yarn dedupe --check', + }, + }; + }, +}; + +export function toId(name: string) { + // replace all non-alphanumeric characters with a hyphen + // trim leading and trailing hyphens + return name + .toLowerCase() + .replace(/[^a-z0-9]/g, '-') + .replace(/^-+|-+$/g, ''); +} From e953d05bfe6cb5165101e5b87476d4ba3abaf974 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 14:05:37 +0100 Subject: [PATCH 079/310] Refactor CircleCI configuration to standardize working directory paths and update test file glob patterns, enhancing clarity and maintainability of CI workflows. Remove obsolete job definitions and streamline job steps for improved readability. --- .circleci/config.generated.yml | 119 +-- scripts/ci/data.ts | 1404 +------------------------------- scripts/ci/source.ts | 1384 +++++++++++++++++++++++++++++++ scripts/package.json | 10 +- scripts/yarn.lock | 364 ++++----- 5 files changed, 1544 insertions(+), 1737 deletions(-) create mode 100644 scripts/ci/source.ts diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index feb8e6f7c36e..5ab19299294c 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -138,8 +138,8 @@ jobs: build: description: build executor: - class: xlarge name: sb_node_22_classic + class: xlarge steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -320,8 +320,8 @@ jobs: unit-tests: description: unit-tests executor: - class: xlarge name: sb_node_22_classic + class: xlarge steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -333,7 +333,7 @@ jobs: name: Run tests working_directory: code command: |- - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - store_test_results: path: test-results @@ -344,8 +344,8 @@ jobs: - cancel-workflow-on-failure pretty-docs: executor: - class: medium name: sb_node_22_classic + class: medium steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -461,108 +461,6 @@ jobs: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - react-vite-default-js--create: - description: react-vite/default-js (create) - executor: - name: sb_node_22_browsers - class: large - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: . - - restore_cache: - keys: *a1 - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Start Event Collector - working_directory: scripts - background: true - command: yarn jiti ./event-log-collector.ts - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - yarn wait-on tcp:127.0.0.1:6007 - - run: - name: Setup Corepack - command: |- - sudo corepack enable - which yarn - yarn --version - - run: - name: Create Sandboxes - command: yarn task sandbox --template react-vite/default-js --no-link -s sandbox --debug - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - - store_artifacts: - path: sandbox/react-vite-default-js/debug-storybook.log - destination: logs - - persist_to_workspace: - paths: - - sandbox/react-vite-default-js - root: . - react-vite-default-js--build: - description: react-vite/default-js (build) - executor: - class: xlarge - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: . - - restore_cache: - keys: *a1 - - run: - name: Build storybook - command: yarn task build --template react-vite/default-js --no-link -s build - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-js --no-link -s serve - - run: - name: Wait on storybook - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 - react-vite-default-js--dev: - description: react-vite/default-js (dev) - executor: - class: xlarge - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: . - - restore_cache: - keys: *a1 - - run: - name: Run storybook - working_directory: code - background: true - command: yarn task dev --template react-vite/default-js --no-link -s dev - - run: - name: Wait on storybook - working_directory: code - command: yarn wait-on tcp:127.0.0.1:6006 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 workflows: docs: jobs: @@ -586,15 +484,6 @@ workflows: - react-vite-default-ts--dev: requires: - react-vite-default-ts--create - - react-vite-default-js--create: - requires: - - sandboxes - - react-vite-default-js--build: - requires: - - react-vite-default-js--create - - react-vite-default-js--dev: - requires: - - react-vite-default-js--create when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index dcd8bd81d8f6..ce2ca76635ab 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -23,6 +23,7 @@ const CACHE_PATHS = [ 'code/node_modules', 'scripts/node_modules', ]; +const MAIN_WORKING_DIR = '/tmp/storybook'; const dirname = import.meta.dirname; @@ -99,7 +100,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: '/tmp/storybook', + working_directory: MAIN_WORKING_DIR, }, sb_node_22_browsers: { docker: [ @@ -119,7 +120,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: '/tmp/storybook', + working_directory: MAIN_WORKING_DIR, }, sb_node_22_classic: { docker: [ @@ -139,7 +140,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: '/tmp/storybook', + working_directory: MAIN_WORKING_DIR, }, sb_playwright: { docker: [ @@ -159,7 +160,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: '/tmp/storybook', + working_directory: MAIN_WORKING_DIR, }, }; @@ -365,8 +366,8 @@ function defineSandboxFlow(name: K) { const build = defineJob('build', { executor: { - class: 'xlarge', name: 'sb_node_22_classic', + class: 'xlarge', }, steps: [ git.checkout(), @@ -438,8 +439,8 @@ const check = defineJob('check', { const unitTests = defineJob('unit-tests', { executor: { - class: 'xlarge', name: 'sb_node_22_classic', + class: 'xlarge', }, steps: [ git.checkout(), @@ -450,7 +451,7 @@ const unitTests = defineJob('unit-tests', { name: 'Run tests', working_directory: 'code', command: - 'TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', }, }, { @@ -467,7 +468,7 @@ const unitTests = defineJob('unit-tests', { const sandboxes = [ // 'react-vite/default-ts', - 'react-vite/default-js', + // 'react-vite/default-js', ].map(defineSandboxFlow); const jobs = { @@ -476,8 +477,8 @@ const jobs = { [unitTests.id]: unitTests.implementation, 'pretty-docs': { executor: { - class: 'medium', name: 'sb_node_22_classic', + class: 'medium', }, steps: [ git.checkout(), @@ -505,1391 +506,6 @@ const jobs = { }, {} as Record ), - - // 'bench-packages': { - // executor: { - // class: 'small', - // name: 'sb_node_22_classic', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // when: { - // condition: { - // and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', - // name: 'Benchmarking packages against base branch', - // working_directory: 'scripts', - // }, - // }, - // ], - // }, - // }, - // { - // when: { - // condition: { - // or: [ - // { - // not: '<< pipeline.parameters.ghBaseBranch >>', - // }, - // { - // not: '<< pipeline.parameters.ghPrNumber >>', - // }, - // ], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // }, - // }, - // { - // run: { - // command: 'yarn bench-packages --upload', - // name: 'Uploading package benchmarks for branch', - // working_directory: 'scripts', - // }, - // }, - // ], - // }, - // }, - // { - // store_artifacts: { - // path: 'bench/packages/results.json', - // }, - // }, - // 'report-workflow-on-failure', - // 'cancel-workflow-on-failure', - // ], - // }, - // 'bench-sandboxes': { - // executor: { - // class: 'small', - // name: 'sb_playwright', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - // 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', - // name: 'Running Bench', - // }, - // }, - // { - // run: { - // command: - // 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', - // name: 'Uploading results', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', - // }, - // }, - // ], - // }, - - // 'check-sandboxes': { - // executor: { - // class: 'medium', - // name: 'sb_node_22_classic', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - // 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', - // name: 'Type check Sandboxes', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, - // 'chromatic-internal-storybook': { - // environment: { - // NODE_OPTIONS: '--max_old_space_size=4096', - // }, - // executor: { - // class: 'large', - // name: 'sb_node_22_browsers', - // }, - // steps: [ - // 'checkout', - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'yarn storybook:ui:chromatic', - // name: 'Running Chromatic', - // working_directory: 'code', - // }, - // }, - // 'report-workflow-on-failure', - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, - // 'chromatic-sandboxes': { - // executor: { - // class: 'medium', - // name: 'sb_node_22_browsers', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // 'checkout', - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - // 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', - // name: 'Running Chromatic', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, - // coverage: { - // executor: { - // class: 'small', - // name: 'sb_node_22_browsers', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // 'codecov/upload', - // 'report-workflow-on-failure', - // ], - // }, - // 'create-sandboxes': { - // executor: { - // class: 'large', - // name: 'sb_node_22_browsers', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', - // name: 'Setup Corepack', - // }, - // }, - // 'start-event-collector', - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', - // environment: { - // STORYBOOK_TELEMETRY_DEBUG: 1, - // STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - // }, - // name: 'Create Sandboxes', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', - // }, - // }, - // { - // persist_to_workspace: { - // paths: ['sandbox/**'], - // root: '.', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, - // 'e2e-dev': { - // executor: { - // class: 'medium+', - // name: 'sb_playwright', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - // name: 'Install sandbox dependencies', - // }, - // }, - // { - // run: { - // command: - // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', - // name: 'Running E2E Tests', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // { - // store_artifacts: { - // destination: 'playwright', - // path: 'code/playwright-results/', - // }, - // }, - // ], - // }, - // 'e2e-production': { - // executor: { - // class: 'medium', - // name: 'sb_playwright', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - // name: 'Install sandbox dependencies', - // }, - // }, - // { - // run: { - // command: - // 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', - // name: 'Running E2E Tests', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // { - // store_artifacts: { - // destination: 'playwright', - // path: 'code/playwright-results/', - // }, - // }, - // ], - // }, - // 'e2e-ui': { - // executor: { - // class: 'medium', - // name: 'sb_playwright', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'yarn install --no-immutable', - // environment: { - // YARN_ENABLE_IMMUTABLE_INSTALLS: false, - // }, - // name: 'Install dependencies', - // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', - // }, - // }, - // { - // run: { - // command: 'yarn playwright-e2e', - // name: 'Run E2E tests', - // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // { - // store_artifacts: { - // destination: 'playwright', - // path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', - // }, - // }, - // 'report-workflow-on-failure', - // ], - // }, - // 'e2e-ui-vitest-3': { - // executor: { - // class: 'medium', - // name: 'sb_playwright', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'yarn install --no-immutable', - // environment: { - // YARN_ENABLE_IMMUTABLE_INSTALLS: false, - // }, - // name: 'Install dependencies', - // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - // }, - // }, - // { - // run: { - // command: 'yarn playwright-e2e', - // name: 'Run E2E tests', - // working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // { - // store_artifacts: { - // destination: 'playwright', - // path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', - // }, - // }, - // 'report-workflow-on-failure', - // ], - // }, - // knip: { - // executor: { - // class: 'large', - // name: 'sb_node_22_classic', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'cd code\nyarn knip --no-exit-code\n', - // name: 'Knip', - // }, - // }, - // 'report-workflow-on-failure', - // 'cancel-workflow-on-failure', - // ], - // }, - // lint: { - // executor: { - // class: 'medium+', - // name: 'sb_node_22_classic', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'cd code\nyarn lint\n', - // name: 'Lint', - // }, - // }, - // 'report-workflow-on-failure', - // 'cancel-workflow-on-failure', - // ], - // }, - // 'smoke-test-sandboxes': { - // executor: { - // class: 'medium', - // name: 'sb_node_18_browsers', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', - // name: 'Smoke Testing Sandboxes', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, - // 'stories-tests': { - // executor: { - // class: 'xlarge', - // name: 'sb_playwright', - // }, - // parallelism: 2, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', - // name: 'Run tests', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // 'report-workflow-on-failure', - // 'cancel-workflow-on-failure', - // ], - // }, - // 'test-init-empty': { - // executor: { - // class: 'small', - // name: 'sb_node_22_browsers', - // }, - // parameters: { - // packageManager: { - // type: 'string', - // }, - // template: { - // type: 'string', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // when: { - // condition: { - // equal: ['npm', '<< parameters.packageManager >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (NPM)', - // }, - // }, - // ], - // }, - // }, - // { - // when: { - // condition: { - // equal: ['yarn2', '<< parameters.packageManager >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (Yarn 2)', - // }, - // }, - // ], - // }, - // }, - // { - // when: { - // condition: { - // equal: ['pnpm', '<< parameters.packageManager >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (PNPM)', - // }, - // }, - // ], - // }, - // }, - // { - // when: { - // condition: { - // equal: ['react-vite-ts', '<< parameters.template >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (--skip-install)', - // }, - // }, - // ], - // }, - // }, - // 'report-workflow-on-failure', - // ], - // }, - // 'test-init-empty-windows': { - // executor: 'win/default', - // parameters: { - // packageManager: { - // type: 'string', - // }, - // template: { - // type: 'string', - // }, - // }, - // steps: [ - // 'checkout', - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n', - // name: 'Setup Node & Yarn on Windows', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // 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: ['npm', '<< parameters.packageManager >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (Windows NPM)', - // shell: 'bash.exe', - // }, - // }, - // ], - // }, - // }, - // { - // when: { - // condition: { - // equal: ['yarn2', '<< parameters.packageManager >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (Windows Yarn 2)', - // shell: 'bash.exe', - // }, - // }, - // ], - // }, - // }, - // { - // when: { - // condition: { - // equal: ['pnpm', '<< parameters.packageManager >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (Windows PNPM)', - // shell: 'bash.exe', - // }, - // }, - // ], - // }, - // }, - // { - // when: { - // condition: { - // equal: ['react-vite-ts', '<< parameters.template >>'], - // }, - // steps: [ - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', - // }, - // name: 'Storybook init from empty directory (Windows --skip-install)', - // shell: 'bash.exe', - // }, - // }, - // ], - // }, - // }, - // ], - // }, - // 'test-init-features': { - // executor: { - // class: 'small', - // name: 'sb_node_22_browsers', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // background: true, - // command: 'cd code\nyarn local-registry --open\n', - // name: 'Verdaccio', - // }, - // }, - // { - // run: { - // command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', - // name: 'Wait on Verdaccio', - // }, - // }, - // { - // run: { - // command: - // 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n', - // environment: { - // IN_STORYBOOK_SANDBOX: true, - // STORYBOOK_DISABLE_TELEMETRY: true, - // STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - // }, - // name: 'Storybook init for features', - // }, - // }, - // ], - // }, - // 'test-portable-stories': { - // executor: { - // class: 'medium', - // name: 'sb_playwright', - // }, - // parameters: { - // directory: { - // type: 'string', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'yarn install --no-immutable', - // environment: { - // YARN_ENABLE_IMMUTABLE_INSTALLS: false, - // }, - // name: 'Install dependencies', - // working_directory: - // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - // }, - // }, - // { - // run: { - // command: 'yarn jest', - // name: 'Run Jest tests', - // working_directory: - // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - // }, - // }, - // { - // run: { - // command: 'yarn vitest', - // name: 'Run Vitest tests', - // working_directory: - // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - // }, - // }, - // { - // run: { - // command: 'yarn playwright-ct', - // name: 'Run Playwright CT tests', - // working_directory: - // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - // }, - // }, - // { - // run: { - // command: 'yarn cypress', - // name: 'Run Cypress CT tests', - // working_directory: - // 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', - // }, - // }, - // 'report-workflow-on-failure', - // ], - // }, - // 'test-runner-dev': { - // executor: { - // class: 'large', - // name: 'sb_playwright', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', - // name: 'Running Test Runner in Dev mode', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, - // 'test-runner-production': { - // executor: { - // class: 'medium+', - // name: 'sb_playwright', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - // name: 'Install sandbox dependencies', - // }, - // }, - // 'start-event-collector', - // { - // run: { - // command: - // 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', - // environment: { - // STORYBOOK_TELEMETRY_DEBUG: 1, - // STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - // }, - // name: 'Running Test Runner', - // }, - // }, - // { - // run: { - // command: - // 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', - // name: 'Check Telemetry', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, - // 'test-yarn-pnp': { - // executor: { - // class: 'medium', - // name: 'sb_playwright', - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: 'yarn install --no-immutable', - // environment: { - // YARN_ENABLE_IMMUTABLE_INSTALLS: false, - // }, - // name: 'Install dependencies', - // working_directory: 'test-storybooks/yarn-pnp', - // }, - // }, - // { - // run: { - // command: 'yarn storybook --smoke-test', - // name: 'Run Storybook smoke test', - // working_directory: 'test-storybooks/yarn-pnp', - // }, - // }, - // 'report-workflow-on-failure', - // ], - // }, - // 'unit-tests': { - // executor: { - // class: 'xlarge', - // name: 'sb_playwright', - // }, - // parallelism: 2, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', - // name: 'Run tests', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // 'report-workflow-on-failure', - // 'cancel-workflow-on-failure', - // ], - // }, - // 'vitest-integration': { - // executor: { - // class: 'xlarge', - // name: 'sb_playwright', - // }, - // parallelism: '<< parameters.parallelism >>', - // parameters: { - // parallelism: { - // type: 'integer', - // }, - // }, - // steps: [ - // { - // 'git-shallow-clone/checkout_advanced': { - // clone_options: '--depth 1 --verbose', - // }, - // }, - // { - // attach_workspace: { - // at: '.', - // }, - // }, - // { - // run: { - // command: - // 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', - // name: 'Install sandbox dependencies', - // }, - // }, - // 'start-event-collector', - // { - // run: { - // command: - // 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', - // environment: { - // STORYBOOK_TELEMETRY_DEBUG: 1, - // STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', - // }, - // name: 'Running story tests in Vitest', - // }, - // }, - // { - // run: { - // command: - // 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', - // name: 'Check Telemetry', - // }, - // }, - // { - // 'report-workflow-on-failure': { - // template: - // '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', - // }, - // }, - // { - // store_test_results: { - // path: 'test-results', - // }, - // }, - // ], - // }, }; const orbs = { diff --git a/scripts/ci/source.ts b/scripts/ci/source.ts new file mode 100644 index 000000000000..887830ad776c --- /dev/null +++ b/scripts/ci/source.ts @@ -0,0 +1,1384 @@ +// 'bench-packages': { +// executor: { +// class: 'small', +// name: 'sb_node_22_classic', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// when: { +// condition: { +// and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', +// name: 'Benchmarking packages against base branch', +// working_directory: 'scripts', +// }, +// }, +// ], +// }, +// }, +// { +// when: { +// condition: { +// or: [ +// { +// not: '<< pipeline.parameters.ghBaseBranch >>', +// }, +// { +// not: '<< pipeline.parameters.ghPrNumber >>', +// }, +// ], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// }, +// }, +// { +// run: { +// command: 'yarn bench-packages --upload', +// name: 'Uploading package benchmarks for branch', +// working_directory: 'scripts', +// }, +// }, +// ], +// }, +// }, +// { +// store_artifacts: { +// path: 'bench/packages/results.json', +// }, +// }, +// 'report-workflow-on-failure', +// 'cancel-workflow-on-failure', +// ], +// }, +// 'bench-sandboxes': { +// executor: { +// class: 'small', +// name: 'sb_playwright', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', +// 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', +// name: 'Running Bench', +// }, +// }, +// { +// run: { +// command: +// 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', +// name: 'Uploading results', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', +// }, +// }, +// ], +// }, + +// 'check-sandboxes': { +// executor: { +// class: 'medium', +// name: 'sb_node_22_classic', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', +// 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', +// name: 'Type check Sandboxes', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, +// 'chromatic-internal-storybook': { +// environment: { +// NODE_OPTIONS: '--max_old_space_size=4096', +// }, +// executor: { +// class: 'large', +// name: 'sb_node_22_browsers', +// }, +// steps: [ +// 'checkout', +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'yarn storybook:ui:chromatic', +// name: 'Running Chromatic', +// working_directory: 'code', +// }, +// }, +// 'report-workflow-on-failure', +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, +// 'chromatic-sandboxes': { +// executor: { +// class: 'medium', +// name: 'sb_node_22_browsers', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// 'checkout', +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', +// 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', +// name: 'Running Chromatic', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, +// coverage: { +// executor: { +// class: 'small', +// name: 'sb_node_22_browsers', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// 'codecov/upload', +// 'report-workflow-on-failure', +// ], +// }, +// 'create-sandboxes': { +// executor: { +// class: 'large', +// name: 'sb_node_22_browsers', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', +// name: 'Setup Corepack', +// }, +// }, +// 'start-event-collector', +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', +// environment: { +// STORYBOOK_TELEMETRY_DEBUG: 1, +// STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', +// }, +// name: 'Create Sandboxes', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', +// }, +// }, +// { +// persist_to_workspace: { +// paths: ['sandbox/**'], +// root: '.', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, +// 'e2e-dev': { +// executor: { +// class: 'medium+', +// name: 'sb_playwright', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', +// name: 'Install sandbox dependencies', +// }, +// }, +// { +// run: { +// command: +// 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', +// name: 'Running E2E Tests', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// { +// store_artifacts: { +// destination: 'playwright', +// path: 'code/playwright-results/', +// }, +// }, +// ], +// }, +// 'e2e-production': { +// executor: { +// class: 'medium', +// name: 'sb_playwright', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', +// name: 'Install sandbox dependencies', +// }, +// }, +// { +// run: { +// command: +// 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', +// name: 'Running E2E Tests', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// { +// store_artifacts: { +// destination: 'playwright', +// path: 'code/playwright-results/', +// }, +// }, +// ], +// }, +// 'e2e-ui': { +// executor: { +// class: 'medium', +// name: 'sb_playwright', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'yarn install --no-immutable', +// environment: { +// YARN_ENABLE_IMMUTABLE_INSTALLS: false, +// }, +// name: 'Install dependencies', +// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', +// }, +// }, +// { +// run: { +// command: 'yarn playwright-e2e', +// name: 'Run E2E tests', +// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// { +// store_artifacts: { +// destination: 'playwright', +// path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', +// }, +// }, +// 'report-workflow-on-failure', +// ], +// }, +// 'e2e-ui-vitest-3': { +// executor: { +// class: 'medium', +// name: 'sb_playwright', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'yarn install --no-immutable', +// environment: { +// YARN_ENABLE_IMMUTABLE_INSTALLS: false, +// }, +// name: 'Install dependencies', +// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', +// }, +// }, +// { +// run: { +// command: 'yarn playwright-e2e', +// name: 'Run E2E tests', +// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// { +// store_artifacts: { +// destination: 'playwright', +// path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', +// }, +// }, +// 'report-workflow-on-failure', +// ], +// }, +// knip: { +// executor: { +// class: 'large', +// name: 'sb_node_22_classic', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'cd code\nyarn knip --no-exit-code\n', +// name: 'Knip', +// }, +// }, +// 'report-workflow-on-failure', +// 'cancel-workflow-on-failure', +// ], +// }, +// lint: { +// executor: { +// class: 'medium+', +// name: 'sb_node_22_classic', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'cd code\nyarn lint\n', +// name: 'Lint', +// }, +// }, +// 'report-workflow-on-failure', +// 'cancel-workflow-on-failure', +// ], +// }, +// 'smoke-test-sandboxes': { +// executor: { +// class: 'medium', +// name: 'sb_node_18_browsers', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', +// name: 'Smoke Testing Sandboxes', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, +// 'stories-tests': { +// executor: { +// class: 'xlarge', +// name: 'sb_playwright', +// }, +// parallelism: 2, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', +// name: 'Run tests', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// 'report-workflow-on-failure', +// 'cancel-workflow-on-failure', +// ], +// }, +// 'test-init-empty': { +// executor: { +// class: 'small', +// name: 'sb_node_22_browsers', +// }, +// parameters: { +// packageManager: { +// type: 'string', +// }, +// template: { +// type: 'string', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// when: { +// condition: { +// equal: ['npm', '<< parameters.packageManager >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (NPM)', +// }, +// }, +// ], +// }, +// }, +// { +// when: { +// condition: { +// equal: ['yarn2', '<< parameters.packageManager >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (Yarn 2)', +// }, +// }, +// ], +// }, +// }, +// { +// when: { +// condition: { +// equal: ['pnpm', '<< parameters.packageManager >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (PNPM)', +// }, +// }, +// ], +// }, +// }, +// { +// when: { +// condition: { +// equal: ['react-vite-ts', '<< parameters.template >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (--skip-install)', +// }, +// }, +// ], +// }, +// }, +// 'report-workflow-on-failure', +// ], +// }, +// 'test-init-empty-windows': { +// executor: 'win/default', +// parameters: { +// packageManager: { +// type: 'string', +// }, +// template: { +// type: 'string', +// }, +// }, +// steps: [ +// 'checkout', +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n', +// name: 'Setup Node & Yarn on Windows', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// 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: ['npm', '<< parameters.packageManager >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (Windows NPM)', +// shell: 'bash.exe', +// }, +// }, +// ], +// }, +// }, +// { +// when: { +// condition: { +// equal: ['yarn2', '<< parameters.packageManager >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (Windows Yarn 2)', +// shell: 'bash.exe', +// }, +// }, +// ], +// }, +// }, +// { +// when: { +// condition: { +// equal: ['pnpm', '<< parameters.packageManager >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (Windows PNPM)', +// shell: 'bash.exe', +// }, +// }, +// ], +// }, +// }, +// { +// when: { +// condition: { +// equal: ['react-vite-ts', '<< parameters.template >>'], +// }, +// steps: [ +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// shell: 'bash.exe', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', +// }, +// name: 'Storybook init from empty directory (Windows --skip-install)', +// shell: 'bash.exe', +// }, +// }, +// ], +// }, +// }, +// ], +// }, +// 'test-init-features': { +// executor: { +// class: 'small', +// name: 'sb_node_22_browsers', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// background: true, +// command: 'cd code\nyarn local-registry --open\n', +// name: 'Verdaccio', +// }, +// }, +// { +// run: { +// command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', +// name: 'Wait on Verdaccio', +// }, +// }, +// { +// run: { +// command: +// 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n', +// environment: { +// IN_STORYBOOK_SANDBOX: true, +// STORYBOOK_DISABLE_TELEMETRY: true, +// STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', +// }, +// name: 'Storybook init for features', +// }, +// }, +// ], +// }, +// 'test-portable-stories': { +// executor: { +// class: 'medium', +// name: 'sb_playwright', +// }, +// parameters: { +// directory: { +// type: 'string', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'yarn install --no-immutable', +// environment: { +// YARN_ENABLE_IMMUTABLE_INSTALLS: false, +// }, +// name: 'Install dependencies', +// working_directory: +// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', +// }, +// }, +// { +// run: { +// command: 'yarn jest', +// name: 'Run Jest tests', +// working_directory: +// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', +// }, +// }, +// { +// run: { +// command: 'yarn vitest', +// name: 'Run Vitest tests', +// working_directory: +// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', +// }, +// }, +// { +// run: { +// command: 'yarn playwright-ct', +// name: 'Run Playwright CT tests', +// working_directory: +// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', +// }, +// }, +// { +// run: { +// command: 'yarn cypress', +// name: 'Run Cypress CT tests', +// working_directory: +// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', +// }, +// }, +// 'report-workflow-on-failure', +// ], +// }, +// 'test-runner-dev': { +// executor: { +// class: 'large', +// name: 'sb_playwright', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', +// name: 'Running Test Runner in Dev mode', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, +// 'test-runner-production': { +// executor: { +// class: 'medium+', +// name: 'sb_playwright', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', +// name: 'Install sandbox dependencies', +// }, +// }, +// 'start-event-collector', +// { +// run: { +// command: +// 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', +// environment: { +// STORYBOOK_TELEMETRY_DEBUG: 1, +// STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', +// }, +// name: 'Running Test Runner', +// }, +// }, +// { +// run: { +// command: +// 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', +// name: 'Check Telemetry', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, +// 'test-yarn-pnp': { +// executor: { +// class: 'medium', +// name: 'sb_playwright', +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: 'yarn install --no-immutable', +// environment: { +// YARN_ENABLE_IMMUTABLE_INSTALLS: false, +// }, +// name: 'Install dependencies', +// working_directory: 'test-storybooks/yarn-pnp', +// }, +// }, +// { +// run: { +// command: 'yarn storybook --smoke-test', +// name: 'Run Storybook smoke test', +// working_directory: 'test-storybooks/yarn-pnp', +// }, +// }, +// 'report-workflow-on-failure', +// ], +// }, +// 'unit-tests': { +// executor: { +// class: 'xlarge', +// name: 'sb_playwright', +// }, +// parallelism: 2, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', +// name: 'Run tests', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// 'report-workflow-on-failure', +// 'cancel-workflow-on-failure', +// ], +// }, +// 'vitest-integration': { +// executor: { +// class: 'xlarge', +// name: 'sb_playwright', +// }, +// parallelism: '<< parameters.parallelism >>', +// parameters: { +// parallelism: { +// type: 'integer', +// }, +// }, +// steps: [ +// { +// 'git-shallow-clone/checkout_advanced': { +// clone_options: '--depth 1 --verbose', +// }, +// }, +// { +// attach_workspace: { +// at: '.', +// }, +// }, +// { +// run: { +// command: +// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', +// name: 'Install sandbox dependencies', +// }, +// }, +// 'start-event-collector', +// { +// run: { +// command: +// 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', +// environment: { +// STORYBOOK_TELEMETRY_DEBUG: 1, +// STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', +// }, +// name: 'Running story tests in Vitest', +// }, +// }, +// { +// run: { +// command: +// 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', +// name: 'Check Telemetry', +// }, +// }, +// { +// 'report-workflow-on-failure': { +// template: +// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', +// }, +// }, +// { +// store_test_results: { +// path: 'test-results', +// }, +// }, +// ], +// }, diff --git a/scripts/package.json b/scripts/package.json index 1d8b41d3296c..a3ca419c96cf 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -74,7 +74,7 @@ "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.2", - "@trivago/prettier-plugin-sort-imports": "^4.3.0", + "@trivago/prettier-plugin-sort-imports": "^6.0.0", "@types/cross-spawn": "^6.0.6", "@types/detect-port": "^1.3.5", "@types/ejs": "^3.1.5", @@ -151,12 +151,12 @@ "playwright": "1.52.0", "playwright-core": "1.52.0", "polka": "^1.0.0-next.28", - "prettier": "^3.6.2", - "prettier-plugin-brace-style": "^0.7.2", + "prettier": "^3.7.1", + "prettier-plugin-brace-style": "^0.8.1", "prettier-plugin-css-order": "^2.1.2", - "prettier-plugin-curly": "^0.3.2", + "prettier-plugin-curly": "^0.4.1", "prettier-plugin-jsdoc": "^1.5.0", - "prettier-plugin-merge": "^0.7.3", + "prettier-plugin-merge": "^0.8.0", "pretty-bytes": "^6.1.1", "pretty-hrtime": "^1.0.3", "pretty-ms": "^8.0.0", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 415db4cd2399..6c6fc2aff1eb 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -65,98 +65,59 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.24.2, @babel/code-frame@npm:^7.26.2": - version: 7.26.2 - resolution: "@babel/code-frame@npm:7.26.2" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.24.2, @babel/code-frame@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/code-frame@npm:7.27.1" dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.27.1" js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 - languageName: node - linkType: hard - -"@babel/generator@npm:7.17.7": - version: 7.17.7 - resolution: "@babel/generator@npm:7.17.7" - dependencies: - "@babel/types": "npm:^7.17.0" - jsesc: "npm:^2.5.1" - source-map: "npm:^0.5.0" - checksum: 10c0/8088453c4418e0ee6528506fbd5847bbdfd56327a0025ca9496a259261e162c594ffd08be0d63e74c32feced795616772f38acc5f5e493a86a45fd439fd9feb0 + picocolors: "npm:^1.1.1" + checksum: 10c0/5dd9a18baa5fce4741ba729acc3a3272c49c25cb8736c4b18e113099520e7ef7b545a4096a26d600e4416157e63e87d66db46aa3fbf0a5f2286da2705c12da00 languageName: node linkType: hard -"@babel/generator@npm:^7.23.0, @babel/generator@npm:^7.25.7, @babel/generator@npm:^7.26.8": - version: 7.26.8 - resolution: "@babel/generator@npm:7.26.8" +"@babel/generator@npm:^7.28.0, @babel/generator@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/generator@npm:7.28.5" dependencies: - "@babel/parser": "npm:^7.26.8" - "@babel/types": "npm:^7.26.8" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" + "@babel/parser": "npm:^7.28.5" + "@babel/types": "npm:^7.28.5" + "@jridgewell/gen-mapping": "npm:^0.3.12" + "@jridgewell/trace-mapping": "npm:^0.3.28" jsesc: "npm:^3.0.2" - checksum: 10c0/9467f197d285ac315d1fa419138d36a3bfd69ca4baf763e914acab12f5f38e5d231497f6528e80613b28e73bb28c66fcc50b250b1f277b1a4d38ac14b03e9674 + checksum: 10c0/9f219fe1d5431b6919f1a5c60db8d5d34fe546c0d8f5a8511b32f847569234ffc8032beb9e7404649a143f54e15224ecb53a3d11b6bb85c3203e573d91fca752 languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-environment-visitor@npm:7.22.20" - checksum: 10c0/e762c2d8f5d423af89bd7ae9abe35bd4836d2eb401af868a63bbb63220c513c783e25ef001019418560b3fdc6d9a6fb67e6c0b650bcdeb3a2ac44b5c3d2bdd94 +"@babel/helper-globals@npm:^7.28.0": + version: 7.28.0 + resolution: "@babel/helper-globals@npm:7.28.0" + checksum: 10c0/5a0cd0c0e8c764b5f27f2095e4243e8af6fa145daea2b41b53c0c1414fe6ff139e3640f4e2207ae2b3d2153a1abd346f901c26c290ee7cb3881dd922d4ee9232 languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.23.0": - version: 7.24.7 - resolution: "@babel/helper-function-name@npm:7.24.7" - dependencies: - "@babel/template": "npm:^7.24.7" - "@babel/types": "npm:^7.24.7" - checksum: 10c0/e5e41e6cf86bd0f8bf272cbb6e7c5ee0f3e9660414174435a46653efba4f2479ce03ce04abff2aa2ef9359cf057c79c06cb7b134a565ad9c0e8a50dcdc3b43c4 +"@babel/helper-string-parser@npm:^7.27.1": + version: 7.27.1 + resolution: "@babel/helper-string-parser@npm:7.27.1" + checksum: 10c0/8bda3448e07b5583727c103560bcf9c4c24b3c1051a4c516d4050ef69df37bb9a4734a585fe12725b8c2763de0a265aa1e909b485a4e3270b7cfd3e4dbe4b602 languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-hoist-variables@npm:7.22.5" - dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208 +"@babel/helper-validator-identifier@npm:^7.27.1, @babel/helper-validator-identifier@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/helper-validator-identifier@npm:7.28.5" + checksum: 10c0/42aaebed91f739a41f3d80b72752d1f95fd7c72394e8e4bd7cdd88817e0774d80a432451bcba17c2c642c257c483bf1d409dd4548883429ea9493a3bc4ab0847 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/helper-split-export-declaration@npm:7.22.6" +"@babel/parser@npm:^7.25.4, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/parser@npm:7.28.5" dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10c0/d83e4b623eaa9622c267d3c83583b72f3aac567dc393dda18e559d79187961cb29ae9c57b2664137fc3d19508370b12ec6a81d28af73a50e0846819cb21c6e44 - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-string-parser@npm:7.25.9" - checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-identifier@npm:7.25.9" - checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d - languageName: node - linkType: hard - -"@babel/parser@npm:^7.20.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.25.8, @babel/parser@npm:^7.26.8": - version: 7.26.8 - resolution: "@babel/parser@npm:7.26.8" - dependencies: - "@babel/types": "npm:^7.26.8" + "@babel/types": "npm:^7.28.5" bin: parser: ./bin/babel-parser.js - checksum: 10c0/da04f26bae732a5b6790775a736b58c7876c28e62203c5097f043fd7273ef6debe5bfd7a4e670a6819f4549b215c7b9762c6358e44797b3c4d733defc8290781 + checksum: 10c0/5bbe48bf2c79594ac02b490a41ffde7ef5aa22a9a88ad6bcc78432a6ba8a9d638d531d868bd1f104633f1f6bba9905746e15185b8276a3756c42b765d131b1ef languageName: node linkType: hard @@ -169,67 +130,39 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.24.7, @babel/template@npm:^7.26.8": - version: 7.26.8 - resolution: "@babel/template@npm:7.26.8" +"@babel/template@npm:^7.27.2": + version: 7.27.2 + resolution: "@babel/template@npm:7.27.2" dependencies: - "@babel/code-frame": "npm:^7.26.2" - "@babel/parser": "npm:^7.26.8" - "@babel/types": "npm:^7.26.8" - checksum: 10c0/90bc1085cbc090cbdd43af7b9dbb98e6bda96e55e0f565f17ebb8e97c2dfce866dc727ca02b8e08bd2662ba4fd3851907ba3c48618162c291221af17fb258213 - languageName: node - linkType: hard - -"@babel/traverse@npm:7.23.2": - version: 7.23.2 - resolution: "@babel/traverse@npm:7.23.2" - dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.0" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.0" - "@babel/types": "npm:^7.23.0" - debug: "npm:^4.1.0" - globals: "npm:^11.1.0" - checksum: 10c0/d096c7c4bab9262a2f658298a3c630ae4a15a10755bb257ae91d5ab3e3b2877438934859c8d34018b7727379fe6b26c4fa2efc81cf4c462a7fe00caf79fa02ff + "@babel/code-frame": "npm:^7.27.1" + "@babel/parser": "npm:^7.27.2" + "@babel/types": "npm:^7.27.1" + checksum: 10c0/ed9e9022651e463cc5f2cc21942f0e74544f1754d231add6348ff1b472985a3b3502041c0be62dc99ed2d12cfae0c51394bf827452b98a2f8769c03b87aadc81 languageName: node linkType: hard -"@babel/traverse@npm:^7.25.7": - version: 7.26.8 - resolution: "@babel/traverse@npm:7.26.8" +"@babel/traverse@npm:^7.28.0": + version: 7.28.5 + resolution: "@babel/traverse@npm:7.28.5" dependencies: - "@babel/code-frame": "npm:^7.26.2" - "@babel/generator": "npm:^7.26.8" - "@babel/parser": "npm:^7.26.8" - "@babel/template": "npm:^7.26.8" - "@babel/types": "npm:^7.26.8" + "@babel/code-frame": "npm:^7.27.1" + "@babel/generator": "npm:^7.28.5" + "@babel/helper-globals": "npm:^7.28.0" + "@babel/parser": "npm:^7.28.5" + "@babel/template": "npm:^7.27.2" + "@babel/types": "npm:^7.28.5" debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/0771d1ce0351628ad2e8dac56f0d59f706eb125c83fbcc039bde83088ba0a1477244ad5fb060802f90366cc4d7fa871e5009a292aef6205bcf83f2e01d1a0a5d + checksum: 10c0/f6c4a595993ae2b73f2d4cd9c062f2e232174d293edd4abe1d715bd6281da8d99e47c65857e8d0917d9384c65972f4acdebc6749a7c40a8fcc38b3c7fb3e706f languageName: node linkType: hard -"@babel/types@npm:7.17.0": - version: 7.17.0 - resolution: "@babel/types@npm:7.17.0" +"@babel/types@npm:^7.25.4, @babel/types@npm:^7.27.1, @babel/types@npm:^7.28.0, @babel/types@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/types@npm:7.28.5" dependencies: - "@babel/helper-validator-identifier": "npm:^7.16.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/ad09224272b40fedb00b262677d12b6838f5b5df5c47d67059ba1181bd4805439993393a8de32459dae137b536d60ebfcaf39ae84d8b3873f1e81cc75f5aeae8 - languageName: node - linkType: hard - -"@babel/types@npm:^7.17.0, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.4, @babel/types@npm:^7.26.8": - version: 7.26.8 - resolution: "@babel/types@npm:7.26.8" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/cd41ea47bb3d7baf2b3bf5e70e9c3a16f2eab699fab8575b2b31a7b1cb64166eb52c97124313863dde0581747bfc7a1810c838ad60b5b7ad1897d8004c7b95a9 + "@babel/helper-string-parser": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.28.5" + checksum: 10c0/a5a483d2100befbf125793640dec26b90b95fd233a94c19573325898a5ce1e52cdfa96e495c7dcc31b5eca5b66ce3e6d4a0f5a4a62daec271455959f208ab08a languageName: node linkType: hard @@ -710,14 +643,13 @@ __metadata: languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.5": - version: 0.3.5 - resolution: "@jridgewell/gen-mapping@npm:0.3.5" +"@jridgewell/gen-mapping@npm:^0.3.12, @jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.13 + resolution: "@jridgewell/gen-mapping@npm:0.3.13" dependencies: - "@jridgewell/set-array": "npm:^1.2.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/sourcemap-codec": "npm:^1.5.0" "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/1be4fd4a6b0f41337c4f5fdf4afc3bd19e39c3691924817108b82ffcb9c9e609c273f936932b9fba4b3a298ce2eb06d9bff4eb1cc3bd81c4f4ee1b4917e25feb + checksum: 10c0/9a7d65fb13bd9aec1fbab74cda08496839b7e2ceb31f5ab922b323e94d7c481ce0fc4fd7e12e2610915ed8af51178bdc61e168e92a8c8b8303b030b03489b13b languageName: node linkType: hard @@ -728,27 +660,20 @@ __metadata: languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.2.1": - version: 1.2.1 - resolution: "@jridgewell/set-array@npm:1.2.1" - checksum: 10c0/2a5aa7b4b5c3464c895c802d8ae3f3d2b92fcbe84ad12f8d0bfbb1f5ad006717e7577ee1fd2eac00c088abe486c7adb27976f45d2941ff6b0b92b2c3302c60f4 - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0": +"@jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0": version: 1.5.0 resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" checksum: 10c0/2eb864f276eb1096c3c11da3e9bb518f6d9fc0023c78344cdc037abadc725172c70314bdb360f2d4b7bffec7f5d657ce006816bc5d4ecb35e61b66132db00c18 languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": - version: 0.3.25 - resolution: "@jridgewell/trace-mapping@npm:0.3.25" +"@jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25, @jridgewell/trace-mapping@npm:^0.3.28": + version: 0.3.31 + resolution: "@jridgewell/trace-mapping@npm:0.3.31" dependencies: "@jridgewell/resolve-uri": "npm:^3.1.0" "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10c0/3d1ce6ebc69df9682a5a8896b414c6537e428a1d68b02fcc8363b04284a8ca0df04d0ee3013132252ab14f2527bc13bea6526a912ecb5658f0e39fd2860b4df4 + checksum: 10c0/4b30ec8cd56c5fd9a661f088230af01e0c1a3888d11ffb6b47639700f71225be21d1f7e168048d6d4f9449207b978a235c07c8f15c07705685d16dc06280e9d9 languageName: node linkType: hard @@ -1561,7 +1486,7 @@ __metadata: "@testing-library/jest-dom": "npm:^6.6.3" "@testing-library/react": "npm:^16.0.0" "@testing-library/user-event": "npm:^14.5.2" - "@trivago/prettier-plugin-sort-imports": "npm:^4.3.0" + "@trivago/prettier-plugin-sort-imports": "npm:^6.0.0" "@types/cross-spawn": "npm:^6.0.6" "@types/detect-port": "npm:^1.3.5" "@types/ejs": "npm:^3.1.5" @@ -1639,12 +1564,12 @@ __metadata: playwright: "npm:1.52.0" playwright-core: "npm:1.52.0" polka: "npm:^1.0.0-next.28" - prettier: "npm:^3.6.2" - prettier-plugin-brace-style: "npm:^0.7.2" + prettier: "npm:^3.7.1" + prettier-plugin-brace-style: "npm:^0.8.1" prettier-plugin-css-order: "npm:^2.1.2" - prettier-plugin-curly: "npm:^0.3.2" + prettier-plugin-curly: "npm:^0.4.1" prettier-plugin-jsdoc: "npm:^1.5.0" - prettier-plugin-merge: "npm:^0.7.3" + prettier-plugin-merge: "npm:^0.8.0" pretty-bytes: "npm:^6.1.1" pretty-hrtime: "npm:^1.0.3" pretty-ms: "npm:^8.0.0" @@ -1765,23 +1690,34 @@ __metadata: languageName: node linkType: hard -"@trivago/prettier-plugin-sort-imports@npm:^4.3.0": - version: 4.3.0 - resolution: "@trivago/prettier-plugin-sort-imports@npm:4.3.0" +"@trivago/prettier-plugin-sort-imports@npm:^6.0.0": + version: 6.0.0 + resolution: "@trivago/prettier-plugin-sort-imports@npm:6.0.0" dependencies: - "@babel/generator": "npm:7.17.7" - "@babel/parser": "npm:^7.20.5" - "@babel/traverse": "npm:7.23.2" - "@babel/types": "npm:7.17.0" - javascript-natural-sort: "npm:0.7.1" - lodash: "npm:^4.17.21" + "@babel/generator": "npm:^7.28.0" + "@babel/parser": "npm:^7.28.0" + "@babel/traverse": "npm:^7.28.0" + "@babel/types": "npm:^7.28.0" + javascript-natural-sort: "npm:^0.7.1" + lodash-es: "npm:^4.17.21" + minimatch: "npm:^9.0.0" + parse-imports-exports: "npm:^0.2.4" peerDependencies: "@vue/compiler-sfc": 3.x prettier: 2.x - 3.x + prettier-plugin-ember-template-tag: ">= 2.0.0" + prettier-plugin-svelte: 3.x + svelte: 4.x || 5.x peerDependenciesMeta: "@vue/compiler-sfc": optional: true - checksum: 10c0/42270fb9c89e54a3f8b6ac8c43e6d0e03350e2857e902cdad4de22c78ef1864da600525595311bc7e94e51c16c7dd3882c2e048a162fdab59761ffa893756aa2 + prettier-plugin-ember-template-tag: + optional: true + prettier-plugin-svelte: + optional: true + svelte: + optional: true + checksum: 10c0/f964257dd0678085087b38c4f53bfa2ea4210c579163f471bf27e85aac544a05d9c51fbde2ac6c1cb6d0994fb2f6714c88d425a826eded622795a63db60d119a languageName: node linkType: hard @@ -6509,13 +6445,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^11.1.0": - version: 11.12.0 - resolution: "globals@npm:11.12.0" - checksum: 10c0/758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1 - languageName: node - linkType: hard - "globals@npm:^13.19.0": version: 13.23.0 resolution: "globals@npm:13.23.0" @@ -7713,7 +7642,7 @@ __metadata: languageName: node linkType: hard -"javascript-natural-sort@npm:0.7.1": +"javascript-natural-sort@npm:^0.7.1": version: 0.7.1 resolution: "javascript-natural-sort@npm:0.7.1" checksum: 10c0/340f8ffc5d30fb516e06dc540e8fa9e0b93c865cf49d791fed3eac3bdc5fc71f0066fc81d44ec1433edc87caecaf9f13eec4a1fce8c5beafc709a71eaedae6fe @@ -7862,15 +7791,6 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:^2.5.1": - version: 2.5.2 - resolution: "jsesc@npm:2.5.2" - bin: - jsesc: bin/jsesc - checksum: 10c0/dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88 - languageName: node - linkType: hard - "jsesc@npm:^3.0.2": version: 3.1.0 resolution: "jsesc@npm:3.1.0" @@ -8987,12 +8907,12 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.4": - version: 9.0.4 - resolution: "minimatch@npm:9.0.4" +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" dependencies: brace-expansion: "npm:^2.0.1" - checksum: 10c0/2c16f21f50e64922864e560ff97c587d15fd491f65d92a677a344e970fe62aafdbeafe648965fa96d33c061b4d0eabfe0213466203dd793367e7f28658cf6414 + checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed languageName: node linkType: hard @@ -9831,6 +9751,15 @@ __metadata: languageName: node linkType: hard +"parse-imports-exports@npm:^0.2.4": + version: 0.2.4 + resolution: "parse-imports-exports@npm:0.2.4" + dependencies: + parse-statements: "npm:1.0.11" + checksum: 10c0/51b729037208abdf65c4a1f8e9ed06f4e7ccd907c17c668a64db54b37d95bb9e92081f8b16e4133e14102af3cb4e89870975b6ad661b4d654e9ec8f4fb5c77d6 + languageName: node + linkType: hard + "parse-json@npm:^5.0.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" @@ -9866,6 +9795,13 @@ __metadata: languageName: node linkType: hard +"parse-statements@npm:1.0.11": + version: 1.0.11 + resolution: "parse-statements@npm:1.0.11" + checksum: 10c0/48960e085019068a5f5242e875fd9d21ec87df2e291acf5ad4e4887b40eab6929a8c8d59542acb85a6497e870c5c6a24f5ab7f980ef5f907c14cc5f7984a93f3 + languageName: node + linkType: hard + "parseurl@npm:~1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" @@ -9994,7 +9930,7 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0, picocolors@npm:^1.1.1": +"picocolors@npm:^1.1.0, picocolors@npm:^1.1.1": version: 1.1.1 resolution: "picocolors@npm:1.1.1" checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 @@ -10259,11 +10195,13 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-brace-style@npm:^0.7.2": - version: 0.7.2 - resolution: "prettier-plugin-brace-style@npm:0.7.2" +"prettier-plugin-brace-style@npm:^0.8.1": + version: 0.8.1 + resolution: "prettier-plugin-brace-style@npm:0.8.1" + dependencies: + zod: "npm:3.22.4" peerDependencies: - prettier: ^2 || ^3 + prettier: ^3 prettier-plugin-astro: "*" prettier-plugin-svelte: "*" peerDependenciesMeta: @@ -10271,7 +10209,7 @@ __metadata: optional: true prettier-plugin-svelte: optional: true - checksum: 10c0/dbb8b24ed427a191a216abd671ff5daa8bf7bb2e95e1ecd1acb1cd917600188bd8cce46eabb0721c89aad48e577ecfe630eb5abc57527f20fd0e136426150c45 + checksum: 10c0/86ba481ef9e9da631bf8f14cca8c89401f95905791321f10cc4ac111d5968d43f571d38d01855c13aa4b2063151a6512320ab2baf13c4cc9a2aa3edcacaa09a5 languageName: node linkType: hard @@ -10288,16 +10226,12 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-curly@npm:^0.3.2": - version: 0.3.2 - resolution: "prettier-plugin-curly@npm:0.3.2" - dependencies: - "@babel/generator": "npm:^7.25.7" - "@babel/parser": "npm:^7.25.8" - "@babel/traverse": "npm:^7.25.7" +"prettier-plugin-curly@npm:^0.4.1": + version: 0.4.1 + resolution: "prettier-plugin-curly@npm:0.4.1" peerDependencies: - prettier: ^2 || ^3 - checksum: 10c0/4f81eca62d71bd616bdd832b240743a86c8720ddef0422bb958c677a48dec956c59124bdf8f079280160e862961d060b3e7506140ba59f70d571b8270e074121 + prettier: ^3 + checksum: 10c0/9fed1ddbf8cb1cfb2b15196e63031d91ceba7ac4dceff08ae53c23e1c6b2efc69865fd1038e2b5cd017a220c12efb21ba69eaaae6edadd7d507e078d99c363b2 languageName: node linkType: hard @@ -10314,23 +10248,23 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-merge@npm:^0.7.3": - version: 0.7.3 - resolution: "prettier-plugin-merge@npm:0.7.3" +"prettier-plugin-merge@npm:^0.8.0": + version: 0.8.0 + resolution: "prettier-plugin-merge@npm:0.8.0" dependencies: diff: "npm:5.1.0" peerDependencies: - prettier: ^2 || ^3 - checksum: 10c0/f467cdc0da3d400eb73c1004db3053c1b8ef5ca176a28c141568332cfa2d16b74e6f697f8a910b9d9cce166dab4dacac8550e03b310e31d9675db3c5644f3198 + prettier: ^3 + checksum: 10c0/5ddd85e943a2a0a47151a33a17f0a1df2370e54bab2079d19f2fb7c72c4bb743c0c9c28074190ca6a5a2b64ef0c4c3c7e697c1a90401e06744a6c271ec5d66cd languageName: node linkType: hard -"prettier@npm:*, prettier@npm:^3.6.2": - version: 3.6.2 - resolution: "prettier@npm:3.6.2" +"prettier@npm:*, prettier@npm:^3.7.1": + version: 3.7.1 + resolution: "prettier@npm:3.7.1" bin: prettier: bin/prettier.cjs - checksum: 10c0/488cb2f2b99ec13da1e50074912870217c11edaddedeadc649b1244c749d15ba94e846423d062e2c4c9ae683e2d65f754de28889ba06e697ac4f988d44f45812 + checksum: 10c0/a6610043ee0a64a3251a948bf82fad3e59d984a8e8dea206400cfa190585417e3343b32c1f6ae7d8f40798a9b4bd91affc08fa7795dd99a9dec5c9bccdf31500 languageName: node linkType: hard @@ -11692,13 +11626,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.5.0": - version: 0.5.7 - resolution: "source-map@npm:0.5.7" - checksum: 10c0/904e767bb9c494929be013017380cbba013637da1b28e5943b566031e29df04fba57edf3f093e0914be094648b577372bd8ad247fa98cfba9c600794cd16b599 - languageName: node - linkType: hard - "source-map@npm:^0.6.1, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -12357,13 +12284,6 @@ __metadata: languageName: node linkType: hard -"to-fast-properties@npm:^2.0.0": - version: 2.0.0 - resolution: "to-fast-properties@npm:2.0.0" - checksum: 10c0/b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7 - languageName: node - linkType: hard - "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -13490,16 +13410,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.7.0": - version: 2.7.0 - resolution: "yaml@npm:2.7.0" - bin: - yaml: bin.mjs - checksum: 10c0/886a7d2abbd70704b79f1d2d05fe9fb0aa63aefb86e1cb9991837dced65193d300f5554747a872b4b10ae9a12bc5d5327e4d04205f70336e863e35e89d8f4ea9 - languageName: node - linkType: hard - -"yaml@npm:^2.8.1": +"yaml@npm:^2.7.0, yaml@npm:^2.8.1": version: 2.8.1 resolution: "yaml@npm:2.8.1" bin: @@ -13571,6 +13482,13 @@ __metadata: languageName: node linkType: hard +"zod@npm:3.22.4": + version: 3.22.4 + resolution: "zod@npm:3.22.4" + checksum: 10c0/7578ab283dac0eee66a0ad0fc4a7f28c43e6745aadb3a529f59a4b851aa10872b3890398b3160f257f4b6817b4ce643debdda4fb21a2c040adda7862cab0a587 + languageName: node + linkType: hard + "zod@npm:^3.22.4, zod@npm:^3.23.8": version: 3.23.8 resolution: "zod@npm:3.23.8" From c97c54f739839220881703c40665a9dfde1f596f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 21:29:44 +0100 Subject: [PATCH 080/310] Update yarn.lock to include prettier@^3.7.1 and clean up CircleCI config by removing obsolete paths. Refactor CI job to enhance directory glob patterns for better clarity in build processes. --- .circleci/config.generated.yml | 24 ------------------------ scripts/ci/data.ts | 3 +-- yarn.lock | 11 +---------- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index a01b412d0b84..d8859e02378e 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -258,30 +258,6 @@ jobs: - /tmp/storybook/code/renderers/vue3/node_modules - /tmp/storybook/code/renderers/web-components/dist - /tmp/storybook/code/renderers/web-components/node_modules - - /tmp/storybook/code/core/node_modules/human-signals/build/dist - - /tmp/storybook/code/core/node_modules/human-signals/build/node_modules - - /tmp/storybook/code/core/dist/core-server/utils/__mockdata__/src - - /tmp/storybook/code/core/node_modules/core-server/utils/__mockdata__/src - - /tmp/storybook/code/core/dist/core-server/utils/__search-files-tests__/src - - /tmp/storybook/code/core/node_modules/core-server/utils/__search-files-tests__/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/minimal-config/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/minimal-config/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/some-config/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/some-config/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-angularBrowserTarget/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-nx/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-nx/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-nx-workspace/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-nx-workspace/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-options-styles/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-options-styles/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/without-tsConfig/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/without-tsConfig/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src - - /tmp/storybook/code/frameworks/angular/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src - - /tmp/storybook/code/frameworks/angular/node_modules/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src - /tmp/storybook/.verdaccio-cache root: /tmp check: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 093c2ac778dc..2bf5f89459f6 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -392,10 +392,9 @@ const build = defineJob('build', { artifact.persist(`${WORKING_DIR}/code/bench/esbuild-metafiles`, 'bench'), workspace.persist([ ...glob - .sync('**/src', { + .sync(['*/src', '*/*/src'], { cwd: join(dirname, '../../code'), onlyDirectories: true, - ignore: ['node_modules'], }) .flatMap((p) => [ `${WORKING_DIR}/code/${p.replace('src', 'dist')}`, diff --git a/yarn.lock b/yarn.lock index ff63cdf537d2..88253ce8a0fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25888,16 +25888,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:*, prettier@npm:^3.5.3, prettier@npm:^3.6.2": - version: 3.6.2 - resolution: "prettier@npm:3.6.2" - bin: - prettier: bin/prettier.cjs - checksum: 10c0/488cb2f2b99ec13da1e50074912870217c11edaddedeadc649b1244c749d15ba94e846423d062e2c4c9ae683e2d65f754de28889ba06e697ac4f988d44f45812 - languageName: node - linkType: hard - -"prettier@npm:^3.7.1": +"prettier@npm:*, prettier@npm:^3.5.3, prettier@npm:^3.6.2, prettier@npm:^3.7.1": version: 3.7.1 resolution: "prettier@npm:3.7.1" bin: From 6a3984090e6c86129d27c1cf1af61c0366f3b73c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 21:34:56 +0100 Subject: [PATCH 081/310] Enhance CircleCI configuration by adding daily, merged, and normal workflows with job dependencies. Update job parameters for improved build and testing processes. --- .circleci/config.original.yml | 294 +++++++++++++++++++++++++++++++++- .circleci/config.yml | 4 +- 2 files changed, 294 insertions(+), 4 deletions(-) diff --git a/.circleci/config.original.yml b/.circleci/config.original.yml index f327b5ad5035..271900a2c62e 100644 --- a/.circleci/config.original.yml +++ b/.circleci/config.original.yml @@ -1,5 +1,3 @@ -version: 2.1 - commands: cancel-workflow-on-failure: description: Cancels the entire workflow in case the previous step has failed @@ -1149,3 +1147,295 @@ parameters: - skipped - docs type: enum +version: 2.1 +workflows: + daily: + jobs: + - pretty-docs + - build + - lint: + requires: + - build + - knip: + requires: + - build + - bench-packages: + requires: + - build + - check + - unit-tests: + requires: + - build + - stories-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybook: + requires: + - build + - create-sandboxes: + parallelism: 39 + requires: + - build + - check-sandboxes: + parallelism: 1 + requires: + - create-sandboxes + - chromatic-sandboxes: + parallelism: 36 + requires: + - create-sandboxes + - e2e-production: + parallelism: 7 + requires: + - create-sandboxes + - e2e-dev: + parallelism: 28 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 34 + requires: + - create-sandboxes + - vitest-integration: + parallelism: 13 + requires: + - create-sandboxes + - test-portable-stories: + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build + - test-yarn-pnp: + requires: + - build + - e2e-ui: + requires: + - build + - e2e-ui-vitest-3: + requires: + - build + - test-init-features: + requires: + - build + - test-init-empty: + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build + - test-init-empty-windows: + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build + when: + equal: + - daily + - << pipeline.parameters.workflow >> + docs: + jobs: + - pretty-docs + when: + equal: + - docs + - << pipeline.parameters.workflow >> + merged: + jobs: + - pretty-docs + - build + - lint: + requires: + - build + - knip: + requires: + - build + - bench-packages: + requires: + - build + - check + - unit-tests: + requires: + - build + - stories-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybook: + requires: + - build + - coverage: + requires: + - unit-tests + - create-sandboxes: + parallelism: 22 + requires: + - build + - chromatic-sandboxes: + parallelism: 19 + requires: + - create-sandboxes + - e2e-production: + parallelism: 6 + requires: + - create-sandboxes + - e2e-dev: + parallelism: 14 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 17 + requires: + - create-sandboxes + - vitest-integration: + parallelism: 7 + requires: + - create-sandboxes + - check-sandboxes: + parallelism: 1 + requires: + - create-sandboxes + - test-portable-stories: + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build + - test-yarn-pnp: + requires: + - build + - e2e-ui: + requires: + - build + - e2e-ui-vitest-3: + requires: + - build + - test-init-features: + requires: + - build + - test-init-empty-windows: + matrix: + parameters: + packageManager: + - npm + template: + - react-vite-ts + - nextjs-ts + - vue-vite-ts + - lit-vite-ts + requires: + - build + when: + equal: + - merged + - << pipeline.parameters.workflow >> + normal: + jobs: + - pretty-docs + - build + - lint: + requires: + - build + - knip: + requires: + - build + - bench-packages: + requires: + - build + - check + - unit-tests: + requires: + - build + - stories-tests: + requires: + - build + - script-checks: + requires: + - build + - chromatic-internal-storybook: + requires: + - build + - coverage: + requires: + - unit-tests + - create-sandboxes: + parallelism: 14 + requires: + - build + - chromatic-sandboxes: + parallelism: 11 + requires: + - create-sandboxes + - e2e-production: + parallelism: 6 + requires: + - create-sandboxes + - e2e-dev: + parallelism: 8 + requires: + - create-sandboxes + - test-runner-production: + parallelism: 9 + requires: + - create-sandboxes + - vitest-integration: + parallelism: 5 + requires: + - create-sandboxes + - check-sandboxes: + parallelism: 1 + requires: + - create-sandboxes + - test-yarn-pnp: + requires: + - build + - e2e-ui: + requires: + - build + - e2e-ui-vitest-3: + requires: + - build + - test-init-features: + requires: + - build + - test-portable-stories: + matrix: + parameters: + directory: + - react + - vue3 + - nextjs + - svelte + requires: + - build + when: + equal: + - normal + - << pipeline.parameters.workflow >> + diff --git a/.circleci/config.yml b/.circleci/config.yml index 5d485019c139..166f5ae289c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,8 +37,8 @@ jobs: - node/install: install-yarn: true - node/install-packages: - app-dir: scripts - cache-only-lockfile: false + app-dir: . + cache-only-lockfile: true pkg-manager: yarn - run: From c68ee89a57238d1c54ad2c6078ff74fee19b616c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 21:45:36 +0100 Subject: [PATCH 082/310] Update dependencies across multiple packages, including upgrading prettier to ^3.7.1, updating @storybook/icons to ^2.0.1, and various other package version bumps for improved compatibility and performance. Clean up CircleCI configuration by removing verbose clone options. --- .circleci/config.yml | 2 +- code/addons/a11y/package.json | 2 +- code/addons/docs/package.json | 2 +- code/addons/onboarding/package.json | 2 +- code/addons/pseudo-states/package.json | 2 +- code/addons/themes/package.json | 2 +- code/addons/vitest/package.json | 12 +- code/builders/builder-vite/package.json | 4 +- code/builders/builder-webpack5/package.json | 2 +- code/core/package.json | 26 +- code/frameworks/angular/package.json | 2 +- code/frameworks/html-vite/package.json | 2 +- code/frameworks/nextjs-vite/package.json | 4 +- code/frameworks/nextjs/package.json | 30 +- code/frameworks/preact-vite/package.json | 2 +- .../react-native-web-vite/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/react-webpack5/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/frameworks/vue3-vite/package.json | 2 +- .../web-components-vite/package.json | 2 +- code/lib/cli-storybook/package.json | 6 +- code/lib/codemod/package.json | 2 +- code/lib/core-webpack/package.json | 2 +- code/lib/create-storybook/package.json | 4 +- code/lib/eslint-plugin/package.json | 14 +- code/package.json | 50 +- code/presets/create-react-app/package.json | 6 +- code/presets/react-webpack/package.json | 6 +- code/presets/server-webpack/package.json | 4 +- code/renderers/react/package.json | 2 +- code/renderers/server/package.json | 2 +- code/renderers/vue3/package.json | 2 +- code/renderers/web-components/package.json | 2 +- package.json | 2 +- scripts/package.json | 44 +- yarn.lock | 1880 ++++++++--------- 39 files changed, 1062 insertions(+), 1078 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 166f5ae289c8..418d23fe21e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ jobs: executor: continuation/default steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: '--depth 1' - node/install: install-yarn: true - node/install-packages: diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 07fa1b59e5b3..c87eeb253169 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -60,7 +60,7 @@ }, "devDependencies": { "@radix-ui/react-tabs": "1.0.4", - "@storybook/icons": "^2.0.0", + "@storybook/icons": "^2.0.1", "@testing-library/react": "^14.0.0", "execa": "^9.5.2", "react": "^18.2.0", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 30a87db1205e..b078d0b6966c 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -81,7 +81,7 @@ "dependencies": { "@mdx-js/react": "^3.0.0", "@storybook/csf-plugin": "workspace:*", - "@storybook/icons": "^2.0.0", + "@storybook/icons": "^2.0.1", "@storybook/react-dom-shim": "workspace:*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", diff --git a/code/addons/onboarding/package.json b/code/addons/onboarding/package.json index f17fddc11bea..cb008d299c52 100644 --- a/code/addons/onboarding/package.json +++ b/code/addons/onboarding/package.json @@ -48,7 +48,7 @@ ], "devDependencies": { "@neoconfetti/react": "^1.0.0", - "@storybook/icons": "^2.0.0", + "@storybook/icons": "^2.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-joyride": "^2.8.2", diff --git a/code/addons/pseudo-states/package.json b/code/addons/pseudo-states/package.json index e4044877c9aa..00e5f7deb4be 100644 --- a/code/addons/pseudo-states/package.json +++ b/code/addons/pseudo-states/package.json @@ -51,7 +51,7 @@ "!src/**/*" ], "devDependencies": { - "@storybook/icons": "^2.0.0", + "@storybook/icons": "^2.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", "typescript": "^5.8.3" diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index 131f4592b027..fef7c03c37ea 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -57,7 +57,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "@storybook/icons": "^2.0.0", + "@storybook/icons": "^2.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", "typescript": "^5.8.3" diff --git a/code/addons/vitest/package.json b/code/addons/vitest/package.json index 4c0d84a14a19..4bb44be184d6 100644 --- a/code/addons/vitest/package.json +++ b/code/addons/vitest/package.json @@ -69,15 +69,15 @@ ], "dependencies": { "@storybook/global": "^5.0.0", - "@storybook/icons": "^2.0.0" + "@storybook/icons": "^2.0.1" }, "devDependencies": { "@types/istanbul-lib-report": "^3.0.3", "@types/micromatch": "^4.0.0", - "@types/node": "^22.0.0", - "@types/semver": "^7", - "@vitest/browser-playwright": "^4.0.1", - "@vitest/runner": "^4.0.1", + "@types/node": "^22.19.1", + "@types/semver": "^7.7.1", + "@vitest/browser-playwright": "^4.0.14", + "@vitest/runner": "^4.0.14", "empathic": "^2.0.0", "es-toolkit": "^1.36.0", "istanbul-lib-report": "^3.0.1", @@ -86,7 +86,7 @@ "picocolors": "^1.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "semver": "^7.6.3", + "semver": "^7.7.3", "sirv": "^2.0.4", "slash": "^5.0.0", "tinyglobby": "^0.2.10", diff --git a/code/builders/builder-vite/package.json b/code/builders/builder-vite/package.json index 0f36f65bd227..254a8b82cdc0 100644 --- a/code/builders/builder-vite/package.json +++ b/code/builders/builder-vite/package.json @@ -51,10 +51,10 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "empathic": "^2.0.0", "es-module-lexer": "^1.5.0", - "glob": "^10.0.0", + "glob": "^10.5.0", "knitwork": "^1.1.0", "magic-string": "^0.30.0", "pathe": "^1.1.2", diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index e169efc3a968..9c313a461cef 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -69,7 +69,7 @@ "webpack-virtual-modules": "^0.6.0" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "@types/pretty-hrtime": "^1.0.0", "@types/webpack-hot-middleware": "^2.25.6", "pretty-hrtime": "^1.0.3", diff --git a/code/core/package.json b/code/core/package.json index 9e3f7770bb53..203c8d565656 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -195,24 +195,24 @@ ], "dependencies": { "@storybook/global": "^5.0.0", - "@storybook/icons": "^2.0.0", + "@storybook/icons": "^2.0.1", "@testing-library/jest-dom": "^6.6.3", "@testing-library/user-event": "^14.6.1", "@vitest/expect": "3.2.4", "@vitest/spy": "3.2.4", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", "recast": "^0.23.5", - "semver": "^7.6.2", + "semver": "^7.7.3", "use-sync-external-store": "^1.5.0", "ws": "^8.18.0" }, "devDependencies": { "@aw-web-design/x-default-browser": "1.4.126", - "@babel/core": "^7.26.9", - "@babel/generator": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.8", + "@babel/core": "^7.28.5", + "@babel/generator": "^7.28.5", + "@babel/parser": "^7.28.5", + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5", "@clack/prompts": "1.0.0-alpha.7", "@devtools-ds/object-inspector": "^1.1.2", "@discoveryjs/json-ext": "^0.5.3", @@ -244,14 +244,14 @@ "@types/diff": "^5.0.9", "@types/ejs": "^3.1.1", "@types/js-yaml": "^4.0.5", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "@types/npmlog": "^7.0.0", "@types/picomatch": "^2.3.0", "@types/prettier": "^3.0.0", "@types/pretty-hrtime": "^1.0.0", "@types/prompts": "^2.0.9", "@types/react-syntax-highlighter": "11.0.5", - "@types/semver": "^7.5.8", + "@types/semver": "^7.7.1", "@types/ws": "^8", "@vitest/utils": "^3.2.4", "@yarnpkg/fslib": "2.10.3", @@ -281,8 +281,8 @@ "flush-promises": "^1.0.2", "fuse.js": "^3.6.1", "get-npm-tarball-url": "^2.0.3", - "glob": "^10.0.0", - "globby": "^14.0.1", + "glob": "^10.5.0", + "globby": "^14.1.0", "jiti": "^2.4.2", "js-yaml": "^4.1.0", "jsdoc-type-pratt-parser": "^4.0.0", @@ -302,7 +302,7 @@ "picoquery": "^1.4.0", "polished": "^4.2.2", "polka": "^1.0.0-next.28", - "prettier": "^3.5.3", + "prettier": "^3.7.1", "pretty-hrtime": "^1.0.3", "qrcode.react": "^4.2.0", "react": "^18.2.0", @@ -334,7 +334,7 @@ "use-resize-observer": "^9.1.0", "watchpack": "^2.2.0", "wrap-ansi": "^9.0.2", - "zod": "^3.24.1" + "zod": "^3.25.76" }, "peerDependencies": { "prettier": "^2 || ^3" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index 532df38fad58..fe7bb0360d75 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -78,7 +78,7 @@ "@angular/platform-browser": "^19.1.1", "@angular/platform-browser-dynamic": "^19.1.1", "@storybook/core-webpack": "workspace:*", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "empathic": "^2.0.0", "rimraf": "^6.0.1", "typescript": "^5.8.3", diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index 7c00a537d759..d83bc4da6589 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -50,7 +50,7 @@ "@storybook/html": "workspace:*" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3" }, "peerDependencies": { diff --git a/code/frameworks/nextjs-vite/package.json b/code/frameworks/nextjs-vite/package.json index e2b16ba08366..b6b03acfb2ec 100644 --- a/code/frameworks/nextjs-vite/package.json +++ b/code/frameworks/nextjs-vite/package.json @@ -82,11 +82,11 @@ "vite-plugin-storybook-nextjs": "^3.1.0" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "lilconfig": "^3.0.0", "next": "^15.2.3", "postcss-load-config": "^6.0.1", - "semver": "^7.3.5", + "semver": "^7.7.3", "typescript": "^5.8.3" }, "peerDependencies": { diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 43e85dcd8907..89a04f789702 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -76,24 +76,24 @@ "!src/**/*" ], "dependencies": { - "@babel/core": "^7.24.4", + "@babel/core": "^7.28.5", "@babel/plugin-syntax-bigint": "^7.8.3", "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.24.1", - "@babel/plugin-transform-class-properties": "^7.24.1", - "@babel/plugin-transform-export-namespace-from": "^7.24.1", - "@babel/plugin-transform-numeric-separator": "^7.24.1", - "@babel/plugin-transform-object-rest-spread": "^7.24.1", - "@babel/plugin-transform-runtime": "^7.24.3", - "@babel/preset-env": "^7.24.4", - "@babel/preset-react": "^7.24.1", - "@babel/preset-typescript": "^7.24.1", - "@babel/runtime": "^7.24.4", + "@babel/plugin-syntax-import-assertions": "^7.27.1", + "@babel/plugin-transform-class-properties": "^7.27.1", + "@babel/plugin-transform-export-namespace-from": "^7.27.1", + "@babel/plugin-transform-numeric-separator": "^7.27.1", + "@babel/plugin-transform-object-rest-spread": "^7.28.4", + "@babel/plugin-transform-runtime": "^7.28.5", + "@babel/preset-env": "^7.28.5", + "@babel/preset-react": "^7.28.5", + "@babel/preset-typescript": "^7.28.5", + "@babel/runtime": "^7.28.4", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", "@storybook/builder-webpack5": "workspace:*", "@storybook/preset-react-webpack": "workspace:*", "@storybook/react": "workspace:*", - "@types/semver": "^7.3.4", + "@types/semver": "^7.7.1", "babel-loader": "^9.1.3", "css-loader": "^6.7.3", "image-size": "^2.0.2", @@ -104,19 +104,19 @@ "react-refresh": "^0.14.0", "resolve-url-loader": "^5.0.0", "sass-loader": "^16.0.5", - "semver": "^7.3.5", + "semver": "^7.7.3", "style-loader": "^3.3.1", "styled-jsx": "^5.1.6", "tsconfig-paths": "^4.0.0", "tsconfig-paths-webpack-plugin": "^4.0.1" }, "devDependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.28.5", "@types/babel__core": "^7", "@types/babel__plugin-transform-runtime": "^7", "@types/babel__preset-env": "^7", "@types/loader-utils": "^2.0.5", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "@types/react-refresh": "^0", "next": "^15.2.3", "typescript": "^5.8.3", diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 16ac5908d182..97508df6bdf7 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -51,7 +51,7 @@ "@storybook/preact": "workspace:*" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3", "vite": "^7.0.4" }, diff --git a/code/frameworks/react-native-web-vite/package.json b/code/frameworks/react-native-web-vite/package.json index 83ef56b70aaf..bdd4a31465ce 100644 --- a/code/frameworks/react-native-web-vite/package.json +++ b/code/frameworks/react-native-web-vite/package.json @@ -56,7 +56,7 @@ "vite-tsconfig-paths": "^5.1.4" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3" }, "peerDependencies": { diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index daa9c5f566c6..a163c2e0759c 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -60,7 +60,7 @@ "tsconfig-paths": "^4.2.0" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3", "vite": "^7.0.4" }, diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index 13fb01804ced..7fca23386a60 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -51,7 +51,7 @@ "@storybook/react": "workspace:*" }, "devDependencies": { - "@types/node": "^22.0.0" + "@types/node": "^22.19.1" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index e011de5abec5..05050484b901 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -49,7 +49,7 @@ "@storybook/server": "workspace:*" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3" }, "peerDependencies": { diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 691b541ac45f..5a3c91419373 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^6.2.0", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "svelte": "^5.39.5", "sveltedoc-parser": "^4.2.1", "typescript": "^5.8.3", diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index c3394f4ac2d7..7f8d77ac4b1e 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -60,7 +60,7 @@ "@storybook/svelte-vite": "workspace:*" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3", "vite": "^7.0.4" }, diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index a6c8352abe22..981dd5276657 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -55,7 +55,7 @@ "vue-docgen-api": "^4.75.1" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3", "vite": "^7.0.4" }, diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 2373a371d450..8f9b22241509 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -52,7 +52,7 @@ "@storybook/web-components": "workspace:*" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3" }, "peerDependencies": { diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 6f03076b24c8..0f51836878c7 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -38,7 +38,7 @@ ], "dependencies": { "@storybook/codemod": "workspace:*", - "@types/semver": "^7.3.4", + "@types/semver": "^7.7.1", "commander": "^14.0.1", "create-storybook": "workspace:*", "jscodeshift": "^0.15.1", @@ -52,11 +52,11 @@ "cross-spawn": "^7.0.6", "empathic": "^2.0.0", "envinfo": "^7.14.0", - "globby": "^14.0.1", + "globby": "^14.1.0", "leven": "^4.0.0", "p-limit": "^6.2.0", "picocolors": "^1.1.0", - "semver": "^7.7.2", + "semver": "^7.7.3", "slash": "^5.0.0", "tiny-invariant": "^1.3.3", "typescript": "^5.8.3" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 6ae1ae8815c2..2f0cdfbb468d 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -44,7 +44,7 @@ "cross-spawn": "^7.0.6", "es-toolkit": "^1.36.0", "jscodeshift": "^0.15.1", - "prettier": "^3.5.3", + "prettier": "^3.7.1", "storybook": "workspace:*", "tiny-invariant": "^1.3.1", "tinyglobby": "^0.2.13" diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 6d15a1a64a8d..9aa963d1df6d 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -39,7 +39,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3", "webpack": "5" }, diff --git a/code/lib/create-storybook/package.json b/code/lib/create-storybook/package.json index 95b985a6dd44..feae52561712 100644 --- a/code/lib/create-storybook/package.json +++ b/code/lib/create-storybook/package.json @@ -38,12 +38,12 @@ "!src/**/*" ], "dependencies": { - "semver": "^7.6.2", + "semver": "^7.7.3", "storybook": "workspace:*" }, "devDependencies": { "@types/prompts": "^2.0.9", - "@types/semver": "^7.3.4", + "@types/semver": "^7.7.1", "commander": "^14.0.1", "empathic": "^2.0.0", "picocolors": "^1.1.0", diff --git a/code/lib/eslint-plugin/package.json b/code/lib/eslint-plugin/package.json index eb24bd35541f..d3bc44c4ec8b 100644 --- a/code/lib/eslint-plugin/package.json +++ b/code/lib/eslint-plugin/package.json @@ -42,20 +42,20 @@ "prep": "jiti ../../../scripts/build/build-package.ts" }, "dependencies": { - "@typescript-eslint/utils": "^8.8.1" + "@typescript-eslint/utils": "^8.48.0" }, "devDependencies": { "@types/eslint": "^8.56.2", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "@types/prompts": "^2.0.9", - "@typescript-eslint/eslint-plugin": "^8.8.1", - "@typescript-eslint/parser": "^8.8.1", - "@typescript-eslint/rule-tester": "^8.8.1", + "@typescript-eslint/eslint-plugin": "^8.48.0", + "@typescript-eslint/parser": "^8.48.0", + "@typescript-eslint/rule-tester": "^8.48.0", "@vitest/coverage-v8": "^3.2.4", "eslint": "^8.57.1", - "eslint-plugin-eslint-plugin": "^6.2.0", + "eslint-plugin-eslint-plugin": "^6.5.0", "eslint-plugin-node": "^11.1.0", - "prettier": "^3.5.3", + "prettier": "^3.7.1", "prompts": "^2.4.0", "ts-dedent": "^2.0.0", "typescript": "^5.8.3" diff --git a/code/package.json b/code/package.json index b701f0bfdf81..649c76551922 100644 --- a/code/package.json +++ b/code/package.json @@ -74,10 +74,10 @@ "node >= 20" ], "dependencies": { - "@chromatic-com/storybook": "^4.1.2", + "@chromatic-com/storybook": "^4.1.3", "@playwright/test": "1.52.0", "@storybook/addon-a11y": "workspace:*", - "@storybook/addon-designs": "^11.0.1", + "@storybook/addon-designs": "^11.0.3", "@storybook/addon-docs": "workspace:*", "@storybook/addon-links": "workspace:*", "@storybook/addon-onboarding": "workspace:*", @@ -117,13 +117,13 @@ "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/lodash-es": "^4.17.12", "@types/mock-require": "^2.0.3", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "@types/react": "^18.0.37", "@types/react-dom": "^18.0.11", - "@typescript-eslint/eslint-plugin": "^8.8.1", - "@typescript-eslint/parser": "^8.8.1", - "@vitejs/plugin-react": "^4.3.2", - "@vitejs/plugin-vue": "^4.4.0", + "@typescript-eslint/eslint-plugin": "^8.48.0", + "@typescript-eslint/parser": "^8.48.0", + "@vitejs/plugin-react": "^4.7.0", + "@vitejs/plugin-vue": "^4.6.2", "@vitest/browser": "^3.2.4", "@vitest/coverage-istanbul": "^3.2.4", "@vitest/coverage-v8": "^3.2.4", @@ -135,36 +135,36 @@ "esbuild-loader": "^4.3.0", "eslint": "8.57.1", "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-prettier": "^9.1.0", - "eslint-import-resolver-typescript": "^3.6.1", + "eslint-config-prettier": "^9.1.2", + "eslint-import-resolver-typescript": "^3.10.1", "eslint-plugin-compat": "^6.0.2", - "eslint-plugin-depend": "^1.3.1", + "eslint-plugin-depend": "^1.4.0", "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-file-progress": "^1.4.0", + "eslint-plugin-file-progress": "^1.5.0", "eslint-plugin-html": "^6.2.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-json": "^4.0.0", - "eslint-plugin-json-files": "^4.1.0", - "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-json": "^4.0.1", + "eslint-plugin-json-files": "^4.4.2", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-local-rules": "portal:../scripts/eslint-plugin-local-rules", - "eslint-plugin-playwright": "^1.6.2", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "^7.34.2", + "eslint-plugin-playwright": "^1.8.3", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-storybook": "workspace:*", "github-release-from-changelog": "^2.1.1", - "happy-dom": "^17.4.4", + "happy-dom": "^17.6.3", "http-server": "^14.1.1", "husky": "^4.3.7", "jiti": "^2.4.2", - "lint-staged": "^13.2.2", + "lint-staged": "^13.3.0", "mock-require": "^3.0.3", - "prettier": "^3.5.3", - "prettier-plugin-brace-style": "^0.6.2", + "prettier": "^3.7.1", + "prettier-plugin-brace-style": "^0.8.1", "prettier-plugin-css-order": "^2.1.2", - "prettier-plugin-curly": "^0.2.2", - "prettier-plugin-jsdoc": "^1.3.0", - "prettier-plugin-merge": "^0.7.0", + "prettier-plugin-curly": "^0.4.1", + "prettier-plugin-jsdoc": "^1.7.0", + "prettier-plugin-merge": "^0.8.0", "process": "^0.11.10", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 027806da04d8..24e8cdb1adda 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -35,12 +35,12 @@ "dependencies": { "@pmmmwh/react-refresh-webpack-plugin": "^0.5.1", "@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0", - "@types/semver": "^7.5.6", + "@types/semver": "^7.7.1", "pnp-webpack-plugin": "^1.7.0", - "semver": "^7.5.4" + "semver": "^7.7.3" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3" }, "peerDependencies": { diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index b69ef509f395..f65de9e33cfe 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -40,16 +40,16 @@ "dependencies": { "@storybook/core-webpack": "workspace:*", "@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.0c3f3b7.0", - "@types/semver": "^7.3.4", + "@types/semver": "^7.7.1", "magic-string": "^0.30.5", "react-docgen": "^7.1.1", "resolve": "^1.22.8", - "semver": "^7.3.7", + "semver": "^7.7.3", "tsconfig-paths": "^4.2.0", "webpack": "5" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "empathic": "^2.0.0", "typescript": "^5.8.3" }, diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index b4f47c614db6..69b2cd9a3481 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -42,9 +42,9 @@ "yaml-loader": "^0.8.1" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "typescript": "^5.8.3", - "yaml": "^2.8.0" + "yaml": "^2.8.1" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index 59e453887c1c..3c580cafffb3 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -57,7 +57,7 @@ "@types/babel-plugin-react-docgen": "^4.2.3", "@types/escodegen": "^0.0.6", "@types/estree": "^1.0.6", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "acorn": "^7.4.1", "acorn-jsx": "^5.3.1", "acorn-walk": "^7.2.0", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 35e9219f74af..27f60b7bc9ef 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -43,7 +43,7 @@ "dependencies": { "@storybook/global": "^5.0.0", "ts-dedent": "^2.0.0", - "yaml": "^2.3.1" + "yaml": "^2.8.1" }, "devDependencies": { "typescript": "^5.8.3" diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index cc90f1786e8b..88d81095ab1a 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -53,7 +53,7 @@ }, "devDependencies": { "@testing-library/vue": "^8.0.0", - "@vitejs/plugin-vue": "^4.4.0", + "@vitejs/plugin-vue": "^4.6.2", "typescript": "^5.8.3", "vue": "^3.2.47", "vue-tsc": "latest" diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index 5bd5bb54c2d5..1ba87c4e565d 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@types/cross-spawn": "^6.0.6", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "@types/tmp": "^0.2.6", "cross-spawn": "^7.0.6", "lit": "2.3.1", diff --git a/package.json b/package.json index eebf55b32509..fb7c4b13d863 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,6 @@ "jiti": "^2.4.2", "kill-port": "^2.0.1", "nx": "^22.0.4", - "prettier": "^3.6.2" + "prettier": "^3.7.1" } } diff --git a/scripts/package.json b/scripts/package.json index c893be37ed22..a3d043afeb29 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -79,20 +79,20 @@ "@types/escodegen": "^0.0.6", "@types/http-server": "^0.12.4", "@types/jest": "^29.5.12", - "@types/node": "^22.0.0", + "@types/node": "^22.19.1", "@types/prettier": "^3.0.0", "@types/pretty-hrtime": "^1.0.3", "@types/prompts": "2.4.9", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@types/semver": "^7.7.0", + "@types/semver": "^7.7.1", "@types/serve-static": "^1.15.7", "@types/uuid": "^9.0.8", "@types/wait-on": "^5.3.4", "@types/window-size": "^1.1.4", - "@typescript-eslint/eslint-plugin": "^8.31.0", + "@typescript-eslint/eslint-plugin": "^8.48.0", "@typescript-eslint/experimental-utils": "^5.62.0", - "@typescript-eslint/parser": "^8.31.0", + "@typescript-eslint/parser": "^8.48.0", "@vitest/coverage-v8": "^3.2.4", "ansi-regex": "^6.0.1", "chromatic": "^11.28.2", @@ -109,35 +109,35 @@ "empathic": "^2.0.0", "es-toolkit": "^1.36.0", "esbuild": "^0.27.0", - "eslint": "^8.57.0", + "eslint": "^8.57.1", "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^9.1.2", "eslint-plugin-compat": "^6.0.2", "eslint-plugin-depend": "^1.4.0", "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-file-progress": "^1.4.0", + "eslint-plugin-file-progress": "^1.5.0", "eslint-plugin-html": "^6.2.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-json": "^4.0.0", - "eslint-plugin-json-files": "^4.1.0", - "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-json": "^4.0.1", + "eslint-plugin-json-files": "^4.4.2", + "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-local-rules": "portal:./eslint-plugin-local-rules", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "^7.34.2", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^4.6.2", "execa": "^6.1.0", "fast-folder-size": "^2.2.0", "fast-glob": "^3.3.2", "github-release-from-changelog": "^2.1.1", - "glob": "^10.4.5", - "globby": "^14.0.1", + "glob": "^10.5.0", + "globby": "^14.1.0", "http-server": "^14.1.1", "husky": "^4.3.7", "jiti": "^2.4.2", "json5": "^2.2.3", "junit-xml": "^1.2.0", "knip": "^5.51.0", - "lint-staged": "^15.5.1", + "lint-staged": "^15.5.2", "memoizerific": "^1.11.3", "minimatch": "^10.0.1", "node-gyp": "^9.3.1", @@ -153,7 +153,7 @@ "prettier-plugin-brace-style": "^0.8.1", "prettier-plugin-css-order": "^2.1.2", "prettier-plugin-curly": "^0.4.1", - "prettier-plugin-jsdoc": "^1.5.0", + "prettier-plugin-jsdoc": "^1.7.0", "prettier-plugin-merge": "^0.8.0", "pretty-bytes": "^6.1.1", "pretty-hrtime": "^1.0.3", @@ -165,7 +165,7 @@ "recast": "^0.23.9", "rollup": "^4.21.0", "rollup-plugin-dts": "^6.1.1", - "semver": "^7.6.2", + "semver": "^7.7.3", "serve-static": "^1.15.0", "simple-git": "^3.25.0", "slash": "^3.0.0", @@ -180,13 +180,13 @@ "vitest": "^3.2.4", "wait-on": "^8.0.3", "window-size": "^1.1.1", - "yaml": "^2.7.0", - "zod": "^3.23.8" + "yaml": "^2.8.1", + "zod": "^3.25.76" }, "optionalDependencies": { "@verdaccio/types": "^10.8.0", - "verdaccio": "^5.31.1", - "verdaccio-auth-memory": "^10.2.2" + "verdaccio": "^5.33.0", + "verdaccio-auth-memory": "^10.3.1" }, "packageManager": "yarn@4.10.3" } diff --git a/yarn.lock b/yarn.lock index 88253ce8a0fd..18ecc4f425dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -511,7 +511,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.12.0, @babel/core@npm:^7.18.9, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.4, @babel/core@npm:^7.26.9, @babel/core@npm:^7.28.0, @babel/core@npm:^7.28.5, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": +"@babel/core@npm:^7.12.0, @babel/core@npm:^7.18.9, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.9, @babel/core@npm:^7.28.0, @babel/core@npm:^7.28.5, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.5": version: 7.28.5 resolution: "@babel/core@npm:7.28.5" dependencies: @@ -558,7 +558,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.26.10, @babel/generator@npm:^7.26.9, @babel/generator@npm:^7.28.0, @babel/generator@npm:^7.28.5": +"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.26.10, @babel/generator@npm:^7.26.9, @babel/generator@npm:^7.28.0, @babel/generator@npm:^7.28.5": version: 7.28.5 resolution: "@babel/generator@npm:7.28.5" dependencies: @@ -790,7 +790,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.26.9, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.28.5, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.26.9, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.28.5, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": version: 7.28.5 resolution: "@babel/parser@npm:7.28.5" dependencies: @@ -964,7 +964,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-assertions@npm:^7.24.1, @babel/plugin-syntax-import-assertions@npm:^7.26.0, @babel/plugin-syntax-import-assertions@npm:^7.27.1": +"@babel/plugin-syntax-import-assertions@npm:^7.26.0, @babel/plugin-syntax-import-assertions@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-syntax-import-assertions@npm:7.27.1" dependencies: @@ -1127,7 +1127,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-properties@npm:^7.22.5, @babel/plugin-transform-class-properties@npm:^7.24.1, @babel/plugin-transform-class-properties@npm:^7.25.9, @babel/plugin-transform-class-properties@npm:^7.27.1": +"@babel/plugin-transform-class-properties@npm:^7.22.5, @babel/plugin-transform-class-properties@npm:^7.25.9, @babel/plugin-transform-class-properties@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-transform-class-properties@npm:7.27.1" dependencies: @@ -1260,7 +1260,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-export-namespace-from@npm:^7.24.1, @babel/plugin-transform-export-namespace-from@npm:^7.25.9, @babel/plugin-transform-export-namespace-from@npm:^7.27.1": +"@babel/plugin-transform-export-namespace-from@npm:^7.25.9, @babel/plugin-transform-export-namespace-from@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-transform-export-namespace-from@npm:7.27.1" dependencies: @@ -1436,7 +1436,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-numeric-separator@npm:^7.24.1, @babel/plugin-transform-numeric-separator@npm:^7.25.9, @babel/plugin-transform-numeric-separator@npm:^7.27.1": +"@babel/plugin-transform-numeric-separator@npm:^7.25.9, @babel/plugin-transform-numeric-separator@npm:^7.27.1": version: 7.27.1 resolution: "@babel/plugin-transform-numeric-separator@npm:7.27.1" dependencies: @@ -1458,7 +1458,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-rest-spread@npm:^7.24.1, @babel/plugin-transform-object-rest-spread@npm:^7.25.9, @babel/plugin-transform-object-rest-spread@npm:^7.28.4": +"@babel/plugin-transform-object-rest-spread@npm:^7.25.9, @babel/plugin-transform-object-rest-spread@npm:^7.28.4": version: 7.28.4 resolution: "@babel/plugin-transform-object-rest-spread@npm:7.28.4" dependencies: @@ -1676,7 +1676,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-runtime@npm:^7.13.9, @babel/plugin-transform-runtime@npm:^7.24.3": +"@babel/plugin-transform-runtime@npm:^7.13.9, @babel/plugin-transform-runtime@npm:^7.28.5": version: 7.28.5 resolution: "@babel/plugin-transform-runtime@npm:7.28.5" dependencies: @@ -1899,7 +1899,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.16.5, @babel/preset-env@npm:^7.24.4": +"@babel/preset-env@npm:^7.16.5, @babel/preset-env@npm:^7.28.5": version: 7.28.5 resolution: "@babel/preset-env@npm:7.28.5" dependencies: @@ -2005,7 +2005,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:^7.24.1": +"@babel/preset-react@npm:^7.28.5": version: 7.28.5 resolution: "@babel/preset-react@npm:7.28.5" dependencies: @@ -2021,7 +2021,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.23.0, @babel/preset-typescript@npm:^7.24.1": +"@babel/preset-typescript@npm:^7.23.0, @babel/preset-typescript@npm:^7.28.5": version: 7.28.5 resolution: "@babel/preset-typescript@npm:7.28.5" dependencies: @@ -2125,7 +2125,7 @@ __metadata: languageName: node linkType: hard -"@chromatic-com/storybook@npm:^4.1.2": +"@chromatic-com/storybook@npm:^4.1.3": version: 4.1.3 resolution: "@chromatic-com/storybook@npm:4.1.3" dependencies: @@ -2161,9 +2161,9 @@ __metadata: languageName: node linkType: hard -"@cypress/request@npm:3.0.1": - version: 3.0.1 - resolution: "@cypress/request@npm:3.0.1" +"@cypress/request@npm:3.0.6": + version: 3.0.6 + resolution: "@cypress/request@npm:3.0.6" dependencies: aws-sign2: "npm:~0.7.0" aws4: "npm:^1.8.0" @@ -2171,19 +2171,19 @@ __metadata: combined-stream: "npm:~1.0.6" extend: "npm:~3.0.2" forever-agent: "npm:~0.6.1" - form-data: "npm:~2.3.2" - http-signature: "npm:~1.3.6" + form-data: "npm:~4.0.0" + http-signature: "npm:~1.4.0" is-typedarray: "npm:~1.0.0" isstream: "npm:~0.1.2" json-stringify-safe: "npm:~5.0.1" mime-types: "npm:~2.1.19" performance-now: "npm:^2.1.0" - qs: "npm:6.10.4" + qs: "npm:6.13.0" safe-buffer: "npm:^5.1.2" - tough-cookie: "npm:^4.1.3" + tough-cookie: "npm:^5.0.0" tunnel-agent: "npm:^0.6.0" uuid: "npm:^8.3.2" - checksum: 10c0/8eb92a665e6549e2533f5169431addcaad0307f51a8c7f3b6b169eb79b4d673373784a527590a47b0a2905ad5f601b24ab2d1b31d184243235aba470ffc9c1f7 + checksum: 10c0/24671e655768ef09b099e93fdef5bab58f501a050ddb833d0bf13a44d146e5b3359d71658daecd183d2cb37a1e56cf8aed8a736e3730a23e2383263bd87b2305 languageName: node linkType: hard @@ -5214,10 +5214,10 @@ __metadata: languageName: node linkType: hard -"@pkgr/core@npm:^0.1.0": - version: 0.1.0 - resolution: "@pkgr/core@npm:0.1.0" - checksum: 10c0/8f4a0aa6cc1c445fec4f5f12157047e8a05e30b5c03441156f40203d6430f84d15135e8f1a6886e6c9800ff0e4a75d9d3419a43dbcd7490683f2882375a3b99a +"@pkgr/core@npm:^0.2.9": + version: 0.2.9 + resolution: "@pkgr/core@npm:0.2.9" + checksum: 10c0/ac8e4e8138b1a7a4ac6282873aef7389c352f1f8b577b4850778f5182e4a39a5241facbe48361fec817f56d02b51691b383010843fb08b34a8e8ea3614688fd5 languageName: node linkType: hard @@ -7776,6 +7776,13 @@ __metadata: languageName: node linkType: hard +"@rtsao/scc@npm:^1.1.0": + version: 1.1.0 + resolution: "@rtsao/scc@npm:1.1.0" + checksum: 10c0/b5bcfb0d87f7d1c1c7c0f7693f53b07866ed9fec4c34a97a8c948fb9a7c0082e416ce4d3b60beb4f5e167cbe04cdeefbf6771320f3ede059b9ce91188c409a5b + languageName: node + linkType: hard + "@sec-ant/readable-stream@npm:^0.4.1": version: 0.4.1 resolution: "@sec-ant/readable-stream@npm:0.4.1" @@ -7863,7 +7870,7 @@ __metadata: dependencies: "@radix-ui/react-tabs": "npm:1.0.4" "@storybook/global": "npm:^5.0.0" - "@storybook/icons": "npm:^2.0.0" + "@storybook/icons": "npm:^2.0.1" "@testing-library/react": "npm:^14.0.0" axe-core: "npm:^4.2.0" execa: "npm:^9.5.2" @@ -7877,9 +7884,9 @@ __metadata: languageName: unknown linkType: soft -"@storybook/addon-designs@npm:^11.0.1": - version: 11.0.1 - resolution: "@storybook/addon-designs@npm:11.0.1" +"@storybook/addon-designs@npm:^11.0.3": + version: 11.0.3 + resolution: "@storybook/addon-designs@npm:11.0.3" dependencies: "@figspec/react": "npm:^1.0.0" peerDependencies: @@ -7894,7 +7901,7 @@ __metadata: optional: true react-dom: optional: true - checksum: 10c0/69aca21c9be81345c91c782a72d7b2d90633581ef28be582836af1d9a7ddcc7515816391020b0ae947058bc59fd56c439a4b957a46ece6439cfbf8bfd1e0e2e7 + checksum: 10c0/ef023c6997368e3ae6f493feb53e3c157bfe685a6ffa2128a21e87d98bfb4fc6c1d44d1580c007b8302e1727f9721f36d67b85f846f100177b8eeb2091c8c2fc languageName: node linkType: hard @@ -7906,7 +7913,7 @@ __metadata: "@mdx-js/react": "npm:^3.0.0" "@rollup/pluginutils": "npm:^5.0.2" "@storybook/csf-plugin": "workspace:*" - "@storybook/icons": "npm:^2.0.0" + "@storybook/icons": "npm:^2.0.1" "@storybook/react-dom-shim": "workspace:*" "@types/color-convert": "npm:^2.0.0" "@types/react": "npm:^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" @@ -7951,7 +7958,7 @@ __metadata: resolution: "@storybook/addon-onboarding@workspace:code/addons/onboarding" dependencies: "@neoconfetti/react": "npm:^1.0.0" - "@storybook/icons": "npm:^2.0.0" + "@storybook/icons": "npm:^2.0.1" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" react-joyride: "npm:^2.8.2" @@ -7965,7 +7972,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/addon-themes@workspace:code/addons/themes" dependencies: - "@storybook/icons": "npm:^2.0.0" + "@storybook/icons": "npm:^2.0.1" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" ts-dedent: "npm:^2.0.0" @@ -7980,13 +7987,13 @@ __metadata: resolution: "@storybook/addon-vitest@workspace:code/addons/vitest" dependencies: "@storybook/global": "npm:^5.0.0" - "@storybook/icons": "npm:^2.0.0" + "@storybook/icons": "npm:^2.0.1" "@types/istanbul-lib-report": "npm:^3.0.3" "@types/micromatch": "npm:^4.0.0" - "@types/node": "npm:^22.0.0" - "@types/semver": "npm:^7" - "@vitest/browser-playwright": "npm:^4.0.1" - "@vitest/runner": "npm:^4.0.1" + "@types/node": "npm:^22.19.1" + "@types/semver": "npm:^7.7.1" + "@vitest/browser-playwright": "npm:^4.0.14" + "@vitest/runner": "npm:^4.0.14" empathic: "npm:^2.0.0" es-toolkit: "npm:^1.36.0" istanbul-lib-report: "npm:^3.0.1" @@ -7995,7 +8002,7 @@ __metadata: picocolors: "npm:^1.1.0" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" - semver: "npm:^7.6.3" + semver: "npm:^7.7.3" sirv: "npm:^2.0.4" slash: "npm:^5.0.0" tinyglobby: "npm:^0.2.10" @@ -8040,7 +8047,7 @@ __metadata: "@storybook/builder-webpack5": "workspace:*" "@storybook/core-webpack": "workspace:*" "@storybook/global": "npm:^5.0.0" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" empathic: "npm:^2.0.0" rimraf: "npm:^6.0.1" telejson: "npm:8.0.0" @@ -8105,11 +8112,11 @@ __metadata: resolution: "@storybook/builder-vite@workspace:code/builders/builder-vite" dependencies: "@storybook/csf-plugin": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@vitest/mocker": "npm:3.2.4" empathic: "npm:^2.0.0" es-module-lexer: "npm:^1.5.0" - glob: "npm:^10.0.0" + glob: "npm:^10.5.0" knitwork: "npm:^1.1.0" magic-string: "npm:^0.30.0" pathe: "npm:^1.1.2" @@ -8127,7 +8134,7 @@ __metadata: resolution: "@storybook/builder-webpack5@workspace:code/builders/builder-webpack5" dependencies: "@storybook/core-webpack": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@types/pretty-hrtime": "npm:^1.0.0" "@types/webpack-hot-middleware": "npm:^2.25.6" "@vitest/mocker": "npm:3.2.4" @@ -8164,19 +8171,19 @@ __metadata: "@storybook/codemod": "workspace:*" "@types/cross-spawn": "npm:^6.0.6" "@types/prompts": "npm:^2.0.9" - "@types/semver": "npm:^7.3.4" + "@types/semver": "npm:^7.7.1" commander: "npm:^14.0.1" comment-json: "npm:^4.2.5" create-storybook: "workspace:*" cross-spawn: "npm:^7.0.6" empathic: "npm:^2.0.0" envinfo: "npm:^7.14.0" - globby: "npm:^14.0.1" + globby: "npm:^14.1.0" jscodeshift: "npm:^0.15.1" leven: "npm:^4.0.0" p-limit: "npm:^6.2.0" picocolors: "npm:^1.1.0" - semver: "npm:^7.7.2" + semver: "npm:^7.7.3" slash: "npm:^5.0.0" storybook: "workspace:*" tiny-invariant: "npm:^1.3.3" @@ -8191,10 +8198,10 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/code@workspace:code" dependencies: - "@chromatic-com/storybook": "npm:^4.1.2" + "@chromatic-com/storybook": "npm:^4.1.3" "@playwright/test": "npm:1.52.0" "@storybook/addon-a11y": "workspace:*" - "@storybook/addon-designs": "npm:^11.0.1" + "@storybook/addon-designs": "npm:^11.0.3" "@storybook/addon-docs": "workspace:*" "@storybook/addon-links": "workspace:*" "@storybook/addon-onboarding": "workspace:*" @@ -8234,13 +8241,13 @@ __metadata: "@trivago/prettier-plugin-sort-imports": "npm:^4.3.0" "@types/lodash-es": "npm:^4.17.12" "@types/mock-require": "npm:^2.0.3" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@types/react": "npm:^18.0.37" "@types/react-dom": "npm:^18.0.11" - "@typescript-eslint/eslint-plugin": "npm:^8.8.1" - "@typescript-eslint/parser": "npm:^8.8.1" - "@vitejs/plugin-react": "npm:^4.3.2" - "@vitejs/plugin-vue": "npm:^4.4.0" + "@typescript-eslint/eslint-plugin": "npm:^8.48.0" + "@typescript-eslint/parser": "npm:^8.48.0" + "@vitejs/plugin-react": "npm:^4.7.0" + "@vitejs/plugin-vue": "npm:^4.6.2" "@vitest/browser": "npm:^3.2.4" "@vitest/coverage-istanbul": "npm:^3.2.4" "@vitest/coverage-v8": "npm:^3.2.4" @@ -8252,36 +8259,36 @@ __metadata: esbuild-loader: "npm:^4.3.0" eslint: "npm:8.57.1" eslint-config-airbnb-typescript: "npm:^18.0.0" - eslint-config-prettier: "npm:^9.1.0" - eslint-import-resolver-typescript: "npm:^3.6.1" + eslint-config-prettier: "npm:^9.1.2" + eslint-import-resolver-typescript: "npm:^3.10.1" eslint-plugin-compat: "npm:^6.0.2" - eslint-plugin-depend: "npm:^1.3.1" + eslint-plugin-depend: "npm:^1.4.0" eslint-plugin-eslint-comments: "npm:^3.2.0" - eslint-plugin-file-progress: "npm:^1.4.0" + eslint-plugin-file-progress: "npm:^1.5.0" eslint-plugin-html: "npm:^6.2.0" - eslint-plugin-import: "npm:^2.29.1" - eslint-plugin-json: "npm:^4.0.0" - eslint-plugin-json-files: "npm:^4.1.0" - eslint-plugin-jsx-a11y: "npm:^6.8.0" + eslint-plugin-import: "npm:^2.32.0" + eslint-plugin-json: "npm:^4.0.1" + eslint-plugin-json-files: "npm:^4.4.2" + eslint-plugin-jsx-a11y: "npm:^6.10.2" eslint-plugin-local-rules: "portal:../scripts/eslint-plugin-local-rules" - eslint-plugin-playwright: "npm:^1.6.2" - eslint-plugin-prettier: "npm:^5.1.3" - eslint-plugin-react: "npm:^7.34.2" + eslint-plugin-playwright: "npm:^1.8.3" + eslint-plugin-prettier: "npm:^5.5.4" + eslint-plugin-react: "npm:^7.37.5" eslint-plugin-react-hooks: "npm:^4.6.2" eslint-plugin-storybook: "workspace:*" github-release-from-changelog: "npm:^2.1.1" - happy-dom: "npm:^17.4.4" + happy-dom: "npm:^17.6.3" http-server: "npm:^14.1.1" husky: "npm:^4.3.7" jiti: "npm:^2.4.2" - lint-staged: "npm:^13.2.2" + lint-staged: "npm:^13.3.0" mock-require: "npm:^3.0.3" - prettier: "npm:^3.5.3" - prettier-plugin-brace-style: "npm:^0.6.2" + prettier: "npm:^3.7.1" + prettier-plugin-brace-style: "npm:^0.8.1" prettier-plugin-css-order: "npm:^2.1.2" - prettier-plugin-curly: "npm:^0.2.2" - prettier-plugin-jsdoc: "npm:^1.3.0" - prettier-plugin-merge: "npm:^0.7.0" + prettier-plugin-curly: "npm:^0.4.1" + prettier-plugin-jsdoc: "npm:^1.7.0" + prettier-plugin-merge: "npm:^0.8.0" process: "npm:^0.11.10" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" @@ -8327,7 +8334,7 @@ __metadata: cross-spawn: "npm:^7.0.6" es-toolkit: "npm:^1.36.0" jscodeshift: "npm:^0.15.1" - prettier: "npm:^3.5.3" + prettier: "npm:^3.7.1" storybook: "workspace:*" tiny-invariant: "npm:^1.3.1" tinyglobby: "npm:^0.2.13" @@ -8340,7 +8347,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/core-webpack@workspace:code/lib/core-webpack" dependencies: - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" ts-dedent: "npm:^2.0.0" typescript: "npm:^5.8.3" webpack: "npm:5" @@ -8416,7 +8423,7 @@ __metadata: dependencies: "@storybook/builder-vite": "workspace:*" "@storybook/html": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" typescript: "npm:^5.8.3" peerDependencies: storybook: "workspace:^" @@ -8435,7 +8442,7 @@ __metadata: languageName: unknown linkType: soft -"@storybook/icons@npm:^2.0.0": +"@storybook/icons@npm:^2.0.1": version: 2.0.1 resolution: "@storybook/icons@npm:2.0.1" peerDependencies: @@ -8452,11 +8459,11 @@ __metadata: "@storybook/builder-vite": "workspace:*" "@storybook/react": "workspace:*" "@storybook/react-vite": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" lilconfig: "npm:^3.0.0" next: "npm:^15.2.3" postcss-load-config: "npm:^6.0.1" - semver: "npm:^7.3.5" + semver: "npm:^7.7.3" styled-jsx: "npm:5.1.6" typescript: "npm:^5.8.3" vite-plugin-storybook-nextjs: "npm:^3.1.0" @@ -8476,20 +8483,20 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/nextjs@workspace:code/frameworks/nextjs" dependencies: - "@babel/core": "npm:^7.24.4" + "@babel/core": "npm:^7.28.5" "@babel/plugin-syntax-bigint": "npm:^7.8.3" "@babel/plugin-syntax-dynamic-import": "npm:^7.8.3" - "@babel/plugin-syntax-import-assertions": "npm:^7.24.1" - "@babel/plugin-transform-class-properties": "npm:^7.24.1" - "@babel/plugin-transform-export-namespace-from": "npm:^7.24.1" - "@babel/plugin-transform-numeric-separator": "npm:^7.24.1" - "@babel/plugin-transform-object-rest-spread": "npm:^7.24.1" - "@babel/plugin-transform-runtime": "npm:^7.24.3" - "@babel/preset-env": "npm:^7.24.4" - "@babel/preset-react": "npm:^7.24.1" - "@babel/preset-typescript": "npm:^7.24.1" - "@babel/runtime": "npm:^7.24.4" - "@babel/types": "npm:^7.24.0" + "@babel/plugin-syntax-import-assertions": "npm:^7.27.1" + "@babel/plugin-transform-class-properties": "npm:^7.27.1" + "@babel/plugin-transform-export-namespace-from": "npm:^7.27.1" + "@babel/plugin-transform-numeric-separator": "npm:^7.27.1" + "@babel/plugin-transform-object-rest-spread": "npm:^7.28.4" + "@babel/plugin-transform-runtime": "npm:^7.28.5" + "@babel/preset-env": "npm:^7.28.5" + "@babel/preset-react": "npm:^7.28.5" + "@babel/preset-typescript": "npm:^7.28.5" + "@babel/runtime": "npm:^7.28.4" + "@babel/types": "npm:^7.28.5" "@pmmmwh/react-refresh-webpack-plugin": "npm:^0.5.11" "@storybook/builder-webpack5": "workspace:*" "@storybook/preset-react-webpack": "workspace:*" @@ -8498,9 +8505,9 @@ __metadata: "@types/babel__plugin-transform-runtime": "npm:^7" "@types/babel__preset-env": "npm:^7" "@types/loader-utils": "npm:^2.0.5" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@types/react-refresh": "npm:^0" - "@types/semver": "npm:^7.3.4" + "@types/semver": "npm:^7.7.1" babel-loader: "npm:^9.1.3" css-loader: "npm:^6.7.3" image-size: "npm:^2.0.2" @@ -8512,7 +8519,7 @@ __metadata: react-refresh: "npm:^0.14.0" resolve-url-loader: "npm:^5.0.0" sass-loader: "npm:^16.0.5" - semver: "npm:^7.3.5" + semver: "npm:^7.7.3" style-loader: "npm:^3.3.1" styled-jsx: "npm:^5.1.6" tsconfig-paths: "npm:^4.0.0" @@ -8539,7 +8546,7 @@ __metadata: dependencies: "@storybook/builder-vite": "workspace:*" "@storybook/preact": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" typescript: "npm:^5.8.3" vite: "npm:^7.0.4" peerDependencies: @@ -8568,10 +8575,10 @@ __metadata: dependencies: "@pmmmwh/react-refresh-webpack-plugin": "npm:^0.5.1" "@storybook/react-docgen-typescript-plugin": "npm:1.0.6--canary.9.0c3f3b7.0" - "@types/node": "npm:^22.0.0" - "@types/semver": "npm:^7.5.6" + "@types/node": "npm:^22.19.1" + "@types/semver": "npm:^7.7.1" pnp-webpack-plugin: "npm:^1.7.0" - semver: "npm:^7.5.4" + semver: "npm:^7.7.3" typescript: "npm:^5.8.3" peerDependencies: react-scripts: ">=5.0.0" @@ -8585,13 +8592,13 @@ __metadata: dependencies: "@storybook/core-webpack": "workspace:*" "@storybook/react-docgen-typescript-plugin": "npm:1.0.6--canary.9.0c3f3b7.0" - "@types/node": "npm:^22.0.0" - "@types/semver": "npm:^7.3.4" + "@types/node": "npm:^22.19.1" + "@types/semver": "npm:^7.7.1" empathic: "npm:^2.0.0" magic-string: "npm:^0.30.5" react-docgen: "npm:^7.1.1" resolve: "npm:^1.22.8" - semver: "npm:^7.3.7" + semver: "npm:^7.7.3" tsconfig-paths: "npm:^4.2.0" typescript: "npm:^5.8.3" webpack: "npm:5" @@ -8610,11 +8617,11 @@ __metadata: resolution: "@storybook/preset-server-webpack@workspace:code/presets/server-webpack" dependencies: "@storybook/core-webpack": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" safe-identifier: "npm:^0.4.2" ts-dedent: "npm:^2.0.0" typescript: "npm:^5.8.3" - yaml: "npm:^2.8.0" + yaml: "npm:^2.8.1" yaml-loader: "npm:^0.8.1" peerDependencies: storybook: "workspace:^" @@ -8658,7 +8665,7 @@ __metadata: "@storybook/builder-vite": "workspace:*" "@storybook/react": "workspace:*" "@storybook/react-vite": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" typescript: "npm:^5.8.3" vite-plugin-rnw: "npm:^0.0.10" vite-tsconfig-paths: "npm:^5.1.4" @@ -8680,7 +8687,7 @@ __metadata: "@rollup/pluginutils": "npm:^5.0.2" "@storybook/builder-vite": "workspace:*" "@storybook/react": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" empathic: "npm:^2.0.0" magic-string: "npm:^0.30.0" react-docgen: "npm:^8.0.0" @@ -8703,7 +8710,7 @@ __metadata: "@storybook/builder-webpack5": "workspace:*" "@storybook/preset-react-webpack": "workspace:*" "@storybook/react": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -8724,7 +8731,7 @@ __metadata: "@types/babel-plugin-react-docgen": "npm:^4.2.3" "@types/escodegen": "npm:^0.0.6" "@types/estree": "npm:^1.0.6" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" acorn: "npm:^7.4.1" acorn-jsx: "npm:^5.3.1" acorn-walk: "npm:^7.2.0" @@ -8763,7 +8770,7 @@ __metadata: jiti: "npm:^2.4.2" kill-port: "npm:^2.0.1" nx: "npm:^22.0.4" - prettier: "npm:^3.6.2" + prettier: "npm:^3.7.1" languageName: unknown linkType: soft @@ -8790,20 +8797,20 @@ __metadata: "@types/escodegen": "npm:^0.0.6" "@types/http-server": "npm:^0.12.4" "@types/jest": "npm:^29.5.12" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@types/prettier": "npm:^3.0.0" "@types/pretty-hrtime": "npm:^1.0.3" "@types/prompts": "npm:2.4.9" "@types/react": "npm:^18.3.3" "@types/react-dom": "npm:^18.3.0" - "@types/semver": "npm:^7.7.0" + "@types/semver": "npm:^7.7.1" "@types/serve-static": "npm:^1.15.7" "@types/uuid": "npm:^9.0.8" "@types/wait-on": "npm:^5.3.4" "@types/window-size": "npm:^1.1.4" - "@typescript-eslint/eslint-plugin": "npm:^8.31.0" + "@typescript-eslint/eslint-plugin": "npm:^8.48.0" "@typescript-eslint/experimental-utils": "npm:^5.62.0" - "@typescript-eslint/parser": "npm:^8.31.0" + "@typescript-eslint/parser": "npm:^8.48.0" "@verdaccio/types": "npm:^10.8.0" "@vitest/coverage-v8": "npm:^3.2.4" ansi-regex: "npm:^6.0.1" @@ -8821,35 +8828,35 @@ __metadata: empathic: "npm:^2.0.0" es-toolkit: "npm:^1.36.0" esbuild: "npm:^0.27.0" - eslint: "npm:^8.57.0" + eslint: "npm:^8.57.1" eslint-config-airbnb-typescript: "npm:^18.0.0" - eslint-config-prettier: "npm:^9.1.0" + eslint-config-prettier: "npm:^9.1.2" eslint-plugin-compat: "npm:^6.0.2" eslint-plugin-depend: "npm:^1.4.0" eslint-plugin-eslint-comments: "npm:^3.2.0" - eslint-plugin-file-progress: "npm:^1.4.0" + eslint-plugin-file-progress: "npm:^1.5.0" eslint-plugin-html: "npm:^6.2.0" - eslint-plugin-import: "npm:^2.29.1" - eslint-plugin-json: "npm:^4.0.0" - eslint-plugin-json-files: "npm:^4.1.0" - eslint-plugin-jsx-a11y: "npm:^6.8.0" + eslint-plugin-import: "npm:^2.32.0" + eslint-plugin-json: "npm:^4.0.1" + eslint-plugin-json-files: "npm:^4.4.2" + eslint-plugin-jsx-a11y: "npm:^6.10.2" eslint-plugin-local-rules: "portal:./eslint-plugin-local-rules" - eslint-plugin-prettier: "npm:^5.1.3" - eslint-plugin-react: "npm:^7.34.2" + eslint-plugin-prettier: "npm:^5.5.4" + eslint-plugin-react: "npm:^7.37.5" eslint-plugin-react-hooks: "npm:^4.6.2" execa: "npm:^6.1.0" fast-folder-size: "npm:^2.2.0" fast-glob: "npm:^3.3.2" github-release-from-changelog: "npm:^2.1.1" - glob: "npm:^10.4.5" - globby: "npm:^14.0.1" + glob: "npm:^10.5.0" + globby: "npm:^14.1.0" http-server: "npm:^14.1.1" husky: "npm:^4.3.7" jiti: "npm:^2.4.2" json5: "npm:^2.2.3" junit-xml: "npm:^1.2.0" knip: "npm:^5.51.0" - lint-staged: "npm:^15.5.1" + lint-staged: "npm:^15.5.2" memoizerific: "npm:^1.11.3" minimatch: "npm:^10.0.1" node-gyp: "npm:^9.3.1" @@ -8865,7 +8872,7 @@ __metadata: prettier-plugin-brace-style: "npm:^0.8.1" prettier-plugin-css-order: "npm:^2.1.2" prettier-plugin-curly: "npm:^0.4.1" - prettier-plugin-jsdoc: "npm:^1.5.0" + prettier-plugin-jsdoc: "npm:^1.7.0" prettier-plugin-merge: "npm:^0.8.0" pretty-bytes: "npm:^6.1.1" pretty-hrtime: "npm:^1.0.3" @@ -8877,7 +8884,7 @@ __metadata: recast: "npm:^0.23.9" rollup: "npm:^4.21.0" rollup-plugin-dts: "npm:^6.1.1" - semver: "npm:^7.6.2" + semver: "npm:^7.7.3" serve-static: "npm:^1.15.0" simple-git: "npm:^3.25.0" slash: "npm:^3.0.0" @@ -8889,13 +8896,13 @@ __metadata: type-fest: "npm:~2.19" typescript: "npm:^5.9.3" uuid: "npm:^9.0.1" - verdaccio: "npm:^5.31.1" - verdaccio-auth-memory: "npm:^10.2.2" + verdaccio: "npm:^5.33.0" + verdaccio-auth-memory: "npm:^10.3.1" vitest: "npm:^3.2.4" wait-on: "npm:^8.0.3" window-size: "npm:^1.1.1" - yaml: "npm:^2.7.0" - zod: "npm:^3.23.8" + yaml: "npm:^2.8.1" + zod: "npm:^3.25.76" dependenciesMeta: "@verdaccio/types": optional: true @@ -8913,7 +8920,7 @@ __metadata: "@storybook/builder-webpack5": "workspace:*" "@storybook/preset-server-webpack": "workspace:*" "@storybook/server": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" typescript: "npm:^5.8.3" peerDependencies: storybook: "workspace:^" @@ -8927,7 +8934,7 @@ __metadata: "@storybook/global": "npm:^5.0.0" ts-dedent: "npm:^2.0.0" typescript: "npm:^5.8.3" - yaml: "npm:^2.3.1" + yaml: "npm:^2.8.1" peerDependencies: storybook: "workspace:^" languageName: unknown @@ -8940,7 +8947,7 @@ __metadata: "@storybook/builder-vite": "workspace:*" "@storybook/svelte": "workspace:*" "@sveltejs/vite-plugin-svelte": "npm:^6.2.0" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" magic-string: "npm:^0.30.0" svelte: "npm:^5.39.5" svelte2tsx: "npm:^0.7.44" @@ -8981,7 +8988,7 @@ __metadata: "@storybook/builder-vite": "workspace:*" "@storybook/svelte": "workspace:*" "@storybook/svelte-vite": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" typescript: "npm:^5.8.3" vite: "npm:^7.0.4" peerDependencies: @@ -8997,7 +9004,7 @@ __metadata: dependencies: "@storybook/builder-vite": "workspace:*" "@storybook/vue3": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" magic-string: "npm:^0.30.0" typescript: "npm:^5.8.3" vite: "npm:^7.0.4" @@ -9015,7 +9022,7 @@ __metadata: dependencies: "@storybook/global": "npm:^5.0.0" "@testing-library/vue": "npm:^8.0.0" - "@vitejs/plugin-vue": "npm:^4.4.0" + "@vitejs/plugin-vue": "npm:^4.6.2" type-fest: "npm:~2.19" typescript: "npm:^5.8.3" vue: "npm:^3.2.47" @@ -9033,7 +9040,7 @@ __metadata: dependencies: "@storybook/builder-vite": "workspace:*" "@storybook/web-components": "workspace:*" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" typescript: "npm:^5.8.3" peerDependencies: storybook: "workspace:^" @@ -9046,7 +9053,7 @@ __metadata: dependencies: "@storybook/global": "npm:^5.0.0" "@types/cross-spawn": "npm:^6.0.6" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@types/tmp": "npm:^0.2.6" cross-spawn: "npm:^7.0.6" lit: "npm:2.3.1" @@ -9879,7 +9886,7 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:*, @types/lodash@npm:^4.14.175": +"@types/lodash@npm:*": version: 4.17.20 resolution: "@types/lodash@npm:4.17.20" checksum: 10c0/98cdd0faae22cbb8079a01a3bb65aa8f8c41143367486c1cbf5adc83f16c9272a2a5d2c1f541f61d0d73da543c16ee1d21cf2ef86cb93cd0cc0ac3bced6dd88f @@ -10105,7 +10112,7 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7, @types/semver@npm:^7.3.12, @types/semver@npm:^7.3.4, @types/semver@npm:^7.5.6, @types/semver@npm:^7.5.8, @types/semver@npm:^7.7.0": +"@types/semver@npm:^7.3.12, @types/semver@npm:^7.7.1": version: 7.7.1 resolution: "@types/semver@npm:7.7.1" checksum: 10c0/c938aef3bf79a73f0f3f6037c16e2e759ff40c54122ddf0b2583703393d8d3127130823facb880e694caa324eb6845628186aac1997ee8b31dc2d18fafe26268 @@ -10309,24 +10316,24 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^8.31.0, @typescript-eslint/eslint-plugin@npm:^8.8.1": - version: 8.47.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.47.0" +"@typescript-eslint/eslint-plugin@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.48.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.47.0" - "@typescript-eslint/type-utils": "npm:8.47.0" - "@typescript-eslint/utils": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" + "@typescript-eslint/scope-manager": "npm:8.48.0" + "@typescript-eslint/type-utils": "npm:8.48.0" + "@typescript-eslint/utils": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" graphemer: "npm:^1.4.0" ignore: "npm:^7.0.0" natural-compare: "npm:^1.4.0" ts-api-utils: "npm:^2.1.0" peerDependencies: - "@typescript-eslint/parser": ^8.47.0 + "@typescript-eslint/parser": ^8.48.0 eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/abd35affd21bc199e5e274b8e91e4225a127edf9cbe5047c465f859d7e393d07556ea42b40004e769ed59b18cfe25ab30942c854e23026d4f78d350eb71de03e + checksum: 10c0/5f4f9ac3ace3f615bac428859026b70fb7fa236666cfe8856fed3add7e4ba73c7113264c2df7a9d68247b679dfcc21b0414488bda7b9b3de1c209b1807ed7842 languageName: node linkType: hard @@ -10341,49 +10348,49 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.47.0, @typescript-eslint/parser@npm:^8.31.0, @typescript-eslint/parser@npm:^8.8.1": - version: 8.47.0 - resolution: "@typescript-eslint/parser@npm:8.47.0" +"@typescript-eslint/parser@npm:8.48.0, @typescript-eslint/parser@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/parser@npm:8.48.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.47.0" - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/typescript-estree": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" + "@typescript-eslint/scope-manager": "npm:8.48.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/typescript-estree": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/8f8c9514ffe8c2fca9e2d1d3e9f9f8dd4cb55c14f0ef2f4f265a9180615ec98dc455d373893f76f86760f37e449fd0f4afda46c1211291b9736a05ba010912f2 + checksum: 10c0/180753e1dc55cd5174a236b738d3b0dd6dd6c131797cd417b3b3b8fac344168f3d21bd49eae6c0a075be29ed69b7bc74d97cadd917f1f4d4c113c29e76c1f9cd languageName: node linkType: hard -"@typescript-eslint/project-service@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/project-service@npm:8.47.0" +"@typescript-eslint/project-service@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/project-service@npm:8.48.0" dependencies: - "@typescript-eslint/tsconfig-utils": "npm:^8.47.0" - "@typescript-eslint/types": "npm:^8.47.0" + "@typescript-eslint/tsconfig-utils": "npm:^8.48.0" + "@typescript-eslint/types": "npm:^8.48.0" debug: "npm:^4.3.4" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/6d7ec78c63d672178727b2d79856b470bd99e90d387335decec026931caa94c6907afc4690b884ce1eaca65f2d8b8f070a5c6e70e47971dfeec34dfd022933b8 + checksum: 10c0/6e1d08312fe55a91ba37eb19131af91ad7834bafd15d1cddb83a1e35e5134382e10dc0b14531036ba1c075ce4cba627123625ed6f2e209fb3355f3dda25da0a1 languageName: node linkType: hard -"@typescript-eslint/rule-tester@npm:^8.8.1": - version: 8.47.0 - resolution: "@typescript-eslint/rule-tester@npm:8.47.0" +"@typescript-eslint/rule-tester@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/rule-tester@npm:8.48.0" dependencies: - "@typescript-eslint/parser": "npm:8.47.0" - "@typescript-eslint/typescript-estree": "npm:8.47.0" - "@typescript-eslint/utils": "npm:8.47.0" + "@typescript-eslint/parser": "npm:8.48.0" + "@typescript-eslint/typescript-estree": "npm:8.48.0" + "@typescript-eslint/utils": "npm:8.48.0" ajv: "npm:^6.12.6" json-stable-stringify-without-jsonify: "npm:^1.0.1" lodash.merge: "npm:4.6.2" semver: "npm:^7.6.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/73b4a6cbfc5b64c2719a3674e66afc989dd9e8606296457d6e6af19663c03ecde602466647d156e3b7960e7fecbee5abf0f3d2639336f38145ef4af7c4e0dedd + checksum: 10c0/16dec45697e06e9117388706f40142f2047b41a4bf3a3eb274fb16cd835479be34294ffd1dc91813374644dea883c2bf86a91c8ec59a6ae850403c6642f21b58 languageName: node linkType: hard @@ -10397,38 +10404,38 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/scope-manager@npm:8.47.0" +"@typescript-eslint/scope-manager@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/scope-manager@npm:8.48.0" dependencies: - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" - checksum: 10c0/2faa11e30724ca3a0648cdf83e0fc0fbdfcd89168fa0598d235a89604ee20c1f51ca2b70716f2bc0f1ea843de85976c0852de4549ba4649406d6b4acaf63f9c7 + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" + checksum: 10c0/0766e365901a8af9d9e41fa70464254aacf8b4d167734d88b6cdaa0235e86bfdffc57a3e39a20e105929b8df499d252090f64f81f86770f74626ca809afe54b6 languageName: node linkType: hard -"@typescript-eslint/tsconfig-utils@npm:8.47.0, @typescript-eslint/tsconfig-utils@npm:^8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/tsconfig-utils@npm:8.47.0" +"@typescript-eslint/tsconfig-utils@npm:8.48.0, @typescript-eslint/tsconfig-utils@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.48.0" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/d62b1840344912f916e590dad0cc5aa8816ce281ea9cac7485a28c4427ecbb88c52fa64b3d8cc520c7cab401ede8631e1b3176306cd3d496f756046e5d0c345f + checksum: 10c0/52e9ce8ffbaf32f3c6f4b8fa8af6e3901c430411e137a0baf650fcefdd8edf3dcc4569eba726a28424471d4d1d96b815aa4cf7b63aa7b67380efd6a8dd354222 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/type-utils@npm:8.47.0" +"@typescript-eslint/type-utils@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/type-utils@npm:8.48.0" dependencies: - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/typescript-estree": "npm:8.47.0" - "@typescript-eslint/utils": "npm:8.47.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/typescript-estree": "npm:8.48.0" + "@typescript-eslint/utils": "npm:8.48.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^2.1.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/68311ad455ed7e6c86e5a561b1a54383b35bc6fec37a642afca1d72ddd74a944f3f5bea5aa493e161c0422f8042da442596455e451ef9204b1fce13a84b256e6 + checksum: 10c0/72ab5c7d183b844e4870bfa5dfeb68e2e7ce5f3e1b33c06d5a8e70f0d0a012c9152ad15071d41ba3788266109804a9f4cdb85d664b11df8948bc930e29e0c244 languageName: node linkType: hard @@ -10439,10 +10446,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:8.47.0, @typescript-eslint/types@npm:^8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/types@npm:8.47.0" - checksum: 10c0/0d7f139b29f2581e905463c904b9aef37d8bc62f7b647cd3950d8b139a9fa6821faa5370f4975ccbbd2b2046a50629bd78729be390fb2663e6d103ecda22d794 +"@typescript-eslint/types@npm:8.48.0, @typescript-eslint/types@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/types@npm:8.48.0" + checksum: 10c0/865a8f4ae4a50aa8976f3d7e0f874f1a1c80227ec53ded68644d41011c729a489bb59f70683b29237ab945716ea0258e1d47387163379eab3edaaf5e5cc3b757 languageName: node linkType: hard @@ -10464,23 +10471,22 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.47.0" +"@typescript-eslint/typescript-estree@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.48.0" dependencies: - "@typescript-eslint/project-service": "npm:8.47.0" - "@typescript-eslint/tsconfig-utils": "npm:8.47.0" - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/visitor-keys": "npm:8.47.0" + "@typescript-eslint/project-service": "npm:8.48.0" + "@typescript-eslint/tsconfig-utils": "npm:8.48.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/visitor-keys": "npm:8.48.0" debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" minimatch: "npm:^9.0.4" semver: "npm:^7.6.0" + tinyglobby: "npm:^0.2.15" ts-api-utils: "npm:^2.1.0" peerDependencies: typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/b63e72f85382f9022a52c606738400d599a3d27318ec48bad21039758aa6d74050fb2462aa61bac1de8bd5951bc24f775d1dde74140433c60e2943e045c21649 + checksum: 10c0/f17dd35f7b82654fae9fe83c2eb650572464dbce0170d55b3ef94b99e9aae010f2cbadd436089c8e59eef97d41719ace3a2deb4ac3cdfac26d43b36f34df5590 languageName: node linkType: hard @@ -10502,18 +10508,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.47.0, @typescript-eslint/utils@npm:^8.8.1": - version: 8.47.0 - resolution: "@typescript-eslint/utils@npm:8.47.0" +"@typescript-eslint/utils@npm:8.48.0, @typescript-eslint/utils@npm:^8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/utils@npm:8.48.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.7.0" - "@typescript-eslint/scope-manager": "npm:8.47.0" - "@typescript-eslint/types": "npm:8.47.0" - "@typescript-eslint/typescript-estree": "npm:8.47.0" + "@typescript-eslint/scope-manager": "npm:8.48.0" + "@typescript-eslint/types": "npm:8.48.0" + "@typescript-eslint/typescript-estree": "npm:8.48.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/8774f4e5748bdcefad32b4d06aee589208f4e78500c6c39bd6819b9602fc4212ed69fd774ccd2ad847f87a6bc0092d4db51e440668e7512d366969ab038a74f5 + checksum: 10c0/56334312d1dc114a5c8b05dac4da191c40a416a5705fa76797ebdc9f6a96d35727fd0993cf8776f5c4411837e5fc2151bfa61d3eecc98b24f5a821a63a4d56f3 languageName: node linkType: hard @@ -10527,13 +10533,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.47.0": - version: 8.47.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.47.0" +"@typescript-eslint/visitor-keys@npm:8.48.0": + version: 8.48.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.48.0" dependencies: - "@typescript-eslint/types": "npm:8.47.0" + "@typescript-eslint/types": "npm:8.48.0" eslint-visitor-keys: "npm:^4.2.1" - checksum: 10c0/14aedfdb5bf9b4c310b4a64cb62af94f35515af44911bae266205138165b3a8dc2cd57db3255ec27531dfa3552ba79a700ec8d745b0d18bca220a7f9f437ad06 + checksum: 10c0/20ae9ec255a786de40cdba281b63f634a642dcc34d2a79c5ffc160109f7f6227c28ae2c64be32cbc53dc68dc398c3da715bfcce90422b5024f15f7124a3c1704 languageName: node linkType: hard @@ -10679,20 +10685,20 @@ __metadata: languageName: node linkType: hard -"@verdaccio/auth@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/auth@npm:7.0.0-next-7.16" +"@verdaccio/auth@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/auth@npm:8.0.0-next-8.1" dependencies: - "@verdaccio/config": "npm:7.0.0-next-7.16" - "@verdaccio/core": "npm:7.0.0-next-7.16" - "@verdaccio/loaders": "npm:7.0.0-next-7.16" - "@verdaccio/logger": "npm:7.0.0-next-7.16" - "@verdaccio/signature": "npm:7.0.0-next-7.5" - "@verdaccio/utils": "npm:7.0.0-next-7.16" - debug: "npm:4.3.4" + "@verdaccio/config": "npm:8.0.0-next-8.1" + "@verdaccio/core": "npm:8.0.0-next-8.1" + "@verdaccio/loaders": "npm:8.0.0-next-8.1" + "@verdaccio/logger": "npm:8.0.0-next-8.1" + "@verdaccio/signature": "npm:8.0.0-next-8.0" + "@verdaccio/utils": "npm:7.0.1-next-8.1" + debug: "npm:4.3.7" lodash: "npm:4.17.21" - verdaccio-htpasswd: "npm:12.0.0-next-7.16" - checksum: 10c0/49c431ef66af80ee840762238fe2465bbdf7332b5e9b4e107b38e6735554eb6acaba48ef06a34afb8a1c8e82d5284dbd5c8886e1ac845c9bb3ddc7453e5ed24d + verdaccio-htpasswd: "npm:13.0.0-next-8.1" + checksum: 10c0/d77549b8b27f07388028be7e0f380c33a80ed9c4b0cd9188230bd44ac2f7d18dc7d01e98ae47e36030e66d56c3a0c21728e573df32d4693591aac418ca7b2308 languageName: node linkType: hard @@ -10706,32 +10712,45 @@ __metadata: languageName: node linkType: hard -"@verdaccio/config@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/config@npm:7.0.0-next-7.16" +"@verdaccio/config@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/config@npm:8.0.0-next-8.1" dependencies: - "@verdaccio/core": "npm:7.0.0-next-7.16" - "@verdaccio/utils": "npm:7.0.0-next-7.16" - debug: "npm:4.3.4" + "@verdaccio/core": "npm:8.0.0-next-8.1" + "@verdaccio/utils": "npm:7.0.1-next-8.1" + debug: "npm:4.3.7" js-yaml: "npm:4.1.0" lodash: "npm:4.17.21" minimatch: "npm:7.4.6" - yup: "npm:0.32.11" - checksum: 10c0/434b39df4b988214f10ac78f13c3ef2fcd8d3c00acce464b81297f04cafea2492271c597cc5bc54562cba832de9422e06e9cdfa84668f7e1e34c7e84a0d6cdce + checksum: 10c0/571c7187594cf78b997fb28fa4adbcebbd77391528754d769cc075c2bced9e9b40f53c5cf9f3a5bd21290d47b09423ccde87e74a7b3865b1932b3b520d95495b + languageName: node + linkType: hard + +"@verdaccio/core@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/core@npm:8.0.0-next-8.1" + dependencies: + ajv: "npm:8.17.1" + core-js: "npm:3.37.1" + http-errors: "npm:2.0.0" + http-status-codes: "npm:2.3.0" + process-warning: "npm:1.0.0" + semver: "npm:7.6.3" + checksum: 10c0/7fd8985fd31335af7495239664c1aef843b3299824466384d8ee9eaeee430862a066d498662d5f38772a56dec4d5c4c862901996da0be753987d42d84b29b0b4 languageName: node linkType: hard -"@verdaccio/core@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/core@npm:7.0.0-next-7.16" +"@verdaccio/core@npm:8.0.0-next-8.21": + version: 8.0.0-next-8.21 + resolution: "@verdaccio/core@npm:8.0.0-next-8.21" dependencies: - ajv: "npm:8.12.0" - core-js: "npm:3.35.0" + ajv: "npm:8.17.1" http-errors: "npm:2.0.0" http-status-codes: "npm:2.3.0" + minimatch: "npm:7.4.6" process-warning: "npm:1.0.0" - semver: "npm:7.6.0" - checksum: 10c0/15980173cd5e9b57030711853778ab6b6c2129f87b7d6e7e83aab374e244adffc069211b5187299403249f3d3708667232ad4ecf0829ca0b5563d0ace5faee1c + semver: "npm:7.7.2" + checksum: 10c0/fc05d91633ff56d82e8b781e92af8500f263fa4eab1691a97cf24362be3c275ecf6ef330551b42b426886bfb4958994be49e380d85eba911101622d41524f2d6 languageName: node linkType: hard @@ -10744,23 +10763,23 @@ __metadata: languageName: node linkType: hard -"@verdaccio/file-locking@npm:12.0.0-next.1": - version: 12.0.0-next.1 - resolution: "@verdaccio/file-locking@npm:12.0.0-next.1" +"@verdaccio/file-locking@npm:13.0.0-next-8.0": + version: 13.0.0-next-8.0 + resolution: "@verdaccio/file-locking@npm:13.0.0-next-8.0" dependencies: lockfile: "npm:1.0.4" - checksum: 10c0/dfa2576c650264f236c45e8edeb7185014c59dd7747c36c40bbf38149b503915983a9813923cef5f93b5e0841b9ae73e5f50a7a4339916b2aab30d0553cb1694 + checksum: 10c0/c162a43f88796ff535da4752c3f6c7f42821dd406dfd159911a6b701e23b791e08f04acb082e32e33f084844d4a0bd1551d7e39f83641b87033eb86c81bec4ac languageName: node linkType: hard -"@verdaccio/loaders@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/loaders@npm:7.0.0-next-7.16" +"@verdaccio/loaders@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/loaders@npm:8.0.0-next-8.1" dependencies: - "@verdaccio/logger": "npm:7.0.0-next-7.16" - debug: "npm:4.3.4" + "@verdaccio/logger": "npm:8.0.0-next-8.1" + debug: "npm:4.3.7" lodash: "npm:4.17.21" - checksum: 10c0/759e4e714094ded3f95ad4a1f6598edb8d7e0fd14cbb0b734ef2ee4aecc9ed8f9cfd19f94bf7f285daa2dba94f35b059a430194dc65534ad539feb327fc869c8 + checksum: 10c0/87e1bdeefba777ff431743b6db748061eade43bd767cf21acd14d97724f31c6cf519c153e127ef58ce83366ed7168f323ae96e26a051688b1c1187554f68eae3 languageName: node linkType: hard @@ -10780,83 +10799,83 @@ __metadata: languageName: node linkType: hard -"@verdaccio/logger-7@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/logger-7@npm:7.0.0-next-7.16" +"@verdaccio/logger-7@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/logger-7@npm:8.0.0-next-8.1" dependencies: - "@verdaccio/logger-commons": "npm:7.0.0-next-7.16" + "@verdaccio/logger-commons": "npm:8.0.0-next-8.1" pino: "npm:7.11.0" - checksum: 10c0/ff6b350ce4b10140fabfeb606cf3e22ebba44799b8d21c1496b64e4e54d7591fa1bf957eb7b6afed194b11c485dcfbe785d748119cb3a21c0dfc33340fb81e03 + checksum: 10c0/a97b91d52221051697e9c66f29b13b424b9735015f6551ed7789e9c8f861059645368716541c7c453d4b042c99b96503925294354fa956b01328e695ebac9861 languageName: node linkType: hard -"@verdaccio/logger-commons@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/logger-commons@npm:7.0.0-next-7.16" +"@verdaccio/logger-commons@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/logger-commons@npm:8.0.0-next-8.1" dependencies: - "@verdaccio/core": "npm:7.0.0-next-7.16" - "@verdaccio/logger-prettify": "npm:7.0.0-next-7.3" + "@verdaccio/core": "npm:8.0.0-next-8.1" + "@verdaccio/logger-prettify": "npm:8.0.0-next-8.0" colorette: "npm:2.0.20" - debug: "npm:4.3.4" - checksum: 10c0/ddf14f8aa5f087766074873102bd886f561838edd99dd7aa68b0623fbb89d7cafbbdbaacbe4be97c83ed386e3e5b2fee6b4b4fb22dc9471698bb0c183b068073 + debug: "npm:4.3.7" + checksum: 10c0/f71c8191d3ef7799c23d57fd3945e1c90ca4e0b381b8d79fe37fee1a1d064c1ab89b25013eb101d06d51537926aee199f6caab06b2da0e0f24267c5bf13bc7d8 languageName: node linkType: hard -"@verdaccio/logger-prettify@npm:7.0.0-next-7.3": - version: 7.0.0-next-7.3 - resolution: "@verdaccio/logger-prettify@npm:7.0.0-next-7.3" +"@verdaccio/logger-prettify@npm:8.0.0-next-8.0": + version: 8.0.0-next-8.0 + resolution: "@verdaccio/logger-prettify@npm:8.0.0-next-8.0" dependencies: colorette: "npm:2.0.20" - dayjs: "npm:1.11.10" + dayjs: "npm:1.11.13" lodash: "npm:4.17.21" pino-abstract-transport: "npm:1.1.0" sonic-boom: "npm:3.8.0" - checksum: 10c0/d8f75dfb8f7536a5176722eae4871bdbc375999ce7357da6f875803f1a30923260fb12f8ece03f9e001acb85c0170d6b26877fb00b70ff4c87b3f50654055449 + checksum: 10c0/77d135c9291c7e78f4c66df1bb00df33180dbc3e1a59f7287fbe3b9caeef3abee38e1ebc0262d36a409f7b7c2e168544fb919b2276cc62758c08081aec86e670 languageName: node linkType: hard -"@verdaccio/logger@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/logger@npm:7.0.0-next-7.16" +"@verdaccio/logger@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/logger@npm:8.0.0-next-8.1" dependencies: - "@verdaccio/logger-commons": "npm:7.0.0-next-7.16" + "@verdaccio/logger-commons": "npm:8.0.0-next-8.1" pino: "npm:8.17.2" - checksum: 10c0/d95b4ca2e71e4982ee43c0d0ea3e32b876b1bbffe07abb0d83e25938f4cd439c61cb4d19327ca2c5fb277f13fc3b6b23380b20ea6d7588cbd03c9621ce67bf50 + checksum: 10c0/0bfe94413b133594cb7674f066b6b39ab394d379bc4808eee487e0e204950f3883f375b72e2126fbb3a4e64bdc4bb21b62784bea4da8c2a7fe15c0aefa164e07 languageName: node linkType: hard -"@verdaccio/middleware@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/middleware@npm:7.0.0-next-7.16" +"@verdaccio/middleware@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/middleware@npm:8.0.0-next-8.1" dependencies: - "@verdaccio/config": "npm:7.0.0-next-7.16" - "@verdaccio/core": "npm:7.0.0-next-7.16" - "@verdaccio/url": "npm:12.0.0-next-7.16" - "@verdaccio/utils": "npm:7.0.0-next-7.16" - debug: "npm:4.3.4" - express: "npm:4.19.2" + "@verdaccio/config": "npm:8.0.0-next-8.1" + "@verdaccio/core": "npm:8.0.0-next-8.1" + "@verdaccio/url": "npm:13.0.0-next-8.1" + "@verdaccio/utils": "npm:7.0.1-next-8.1" + debug: "npm:4.3.7" + express: "npm:4.21.0" express-rate-limit: "npm:5.5.1" lodash: "npm:4.17.21" lru-cache: "npm:7.18.3" mime: "npm:2.6.0" - checksum: 10c0/f5f9330c990ee0c8cc0989f743b1f07187dd01e8aea66f47f2ffa035126517a6c430457b6a2c6f678fd6b44cfa02460b4d242df352673ad0efe42ec49c9f2467 + checksum: 10c0/644e51c12114659f3efe634784af11f61ddde649a7118b026e588824cbe505d23b931e4af819e9570c0d0413cfe479230ba5430e67225c4d083c1c4276e374f4 languageName: node linkType: hard -"@verdaccio/search-indexer@npm:7.0.0-next-7.2": - version: 7.0.0-next-7.2 - resolution: "@verdaccio/search-indexer@npm:7.0.0-next-7.2" - checksum: 10c0/9eb65f6173eb017c521a2fe2120b01d386e28b0db14f862d00c4579d2d32906da48b89a4b5b1175336b068076f7df6903f2a456a07884c1eaad332c5f00d8edb +"@verdaccio/search-indexer@npm:8.0.0-next-8.0": + version: 8.0.0-next-8.0 + resolution: "@verdaccio/search-indexer@npm:8.0.0-next-8.0" + checksum: 10c0/b010a05e455d13fa5d7951c8ec050f5894822a712186bb5d0eff6b2e09b3804c9417f6482cece13910fd3643602143e7f792984ba70bc108265b8b19c2154627 languageName: node linkType: hard -"@verdaccio/signature@npm:7.0.0-next-7.5": - version: 7.0.0-next-7.5 - resolution: "@verdaccio/signature@npm:7.0.0-next-7.5" +"@verdaccio/signature@npm:8.0.0-next-8.0": + version: 8.0.0-next-8.0 + resolution: "@verdaccio/signature@npm:8.0.0-next-8.0" dependencies: - debug: "npm:4.3.4" + debug: "npm:4.3.7" jsonwebtoken: "npm:9.0.2" - checksum: 10c0/cf4c922cbddf4d5b34568f68c2dab80b785aac7116be1331a23cd96459843031787f718bab8330d49b9848685d0d832c23cbbed6d1553c57b770a981a98aab5f + checksum: 10c0/99223bcd6b8e0e8fa2262e60468b3472f26ff63831245df52e8f0d76c197ed70fcc1c58aee16f4faa869c0a93f2b3c818562a9689e6cf6738c0cac8d2c144448 languageName: node linkType: hard @@ -10867,18 +10886,18 @@ __metadata: languageName: node linkType: hard -"@verdaccio/tarball@npm:12.0.0-next-7.16": - version: 12.0.0-next-7.16 - resolution: "@verdaccio/tarball@npm:12.0.0-next-7.16" +"@verdaccio/tarball@npm:13.0.0-next-8.1": + version: 13.0.0-next-8.1 + resolution: "@verdaccio/tarball@npm:13.0.0-next-8.1" dependencies: - "@verdaccio/core": "npm:7.0.0-next-7.16" - "@verdaccio/url": "npm:12.0.0-next-7.16" - "@verdaccio/utils": "npm:7.0.0-next-7.16" - debug: "npm:4.3.4" + "@verdaccio/core": "npm:8.0.0-next-8.1" + "@verdaccio/url": "npm:13.0.0-next-8.1" + "@verdaccio/utils": "npm:7.0.1-next-8.1" + debug: "npm:4.3.7" gunzip-maybe: "npm:^1.4.2" lodash: "npm:4.17.21" tar-stream: "npm:^3.1.7" - checksum: 10c0/01e52d4ccaed8eb39614afa31bec6d2eb3021f337bfd34e68be8e5690bcbcbe3a90ac5b22ef1cc27694c5b95c3d1340498184297a994697b95e41bcd2bcba68b + checksum: 10c0/f7bf054cb63fa408a385c2e2af5e8e4ac7b7159a84cb10a847fe26124a8ba2e05394168a5a3efa873e842093c1c7c573f685549cff9217213d022e8f638fbcbb languageName: node linkType: hard @@ -10889,34 +10908,34 @@ __metadata: languageName: node linkType: hard -"@verdaccio/ui-theme@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/ui-theme@npm:7.0.0-next-7.16" - checksum: 10c0/1e407293d8d3efd1599dd69aa2c539593be6ebd2dccd4fdab0b9556c7c09c35960844d2e90092bfd31faf0611b06a4c85616b3c02f316b68254b968edde0e9ad +"@verdaccio/ui-theme@npm:8.0.0-next-8.1": + version: 8.0.0-next-8.1 + resolution: "@verdaccio/ui-theme@npm:8.0.0-next-8.1" + checksum: 10c0/93801a78a9a875108d86e2b2d45f88754b19daa15e9fec3bc409886684b196ce33b03f2c9bf5591fd1a72ab9f60484ffb3b8887e63632d87f0731cd7fde24494 languageName: node linkType: hard -"@verdaccio/url@npm:12.0.0-next-7.16": - version: 12.0.0-next-7.16 - resolution: "@verdaccio/url@npm:12.0.0-next-7.16" +"@verdaccio/url@npm:13.0.0-next-8.1": + version: 13.0.0-next-8.1 + resolution: "@verdaccio/url@npm:13.0.0-next-8.1" dependencies: - "@verdaccio/core": "npm:7.0.0-next-7.16" - debug: "npm:4.3.4" + "@verdaccio/core": "npm:8.0.0-next-8.1" + debug: "npm:4.3.7" lodash: "npm:4.17.21" - validator: "npm:13.11.0" - checksum: 10c0/ac734aa22a438d12b905813c9511cbb81fd675d250d2f25d612b5b6ef5df305fabf90cef89aa70e2dd910a3e59289bfd056d5fdd7344a8c9cdb9ce09b2bb3bd9 + validator: "npm:13.12.0" + checksum: 10c0/a7a0ff6cece76e5d96450ad27c3e39bad01f2d5056c92f758de51545caadd5134244db4a80424829c37e48156b075476696f13e8bad809fd3aab6a22aff7e563 languageName: node linkType: hard -"@verdaccio/utils@npm:7.0.0-next-7.16": - version: 7.0.0-next-7.16 - resolution: "@verdaccio/utils@npm:7.0.0-next-7.16" +"@verdaccio/utils@npm:7.0.1-next-8.1": + version: 7.0.1-next-8.1 + resolution: "@verdaccio/utils@npm:7.0.1-next-8.1" dependencies: - "@verdaccio/core": "npm:7.0.0-next-7.16" + "@verdaccio/core": "npm:8.0.0-next-8.1" lodash: "npm:4.17.21" minimatch: "npm:7.4.6" - semver: "npm:7.6.0" - checksum: 10c0/553db11151ef872dd4c6c3157af8c1858cf7a13020f2a58faeea9e43a93909aa216a32c3c0f9234c8818b6eae07fcc9f3269449f976a783e0e3c10fbc01a7bdc + semver: "npm:7.6.3" + checksum: 10c0/711c527ee97c74fac99bb76a4670a2bc02546ab5e973c4d9e313eab17fea958aea696a3e925b31d3c38a383922a2c2450251dd815792958489a3e5c632831bc2 languageName: node linkType: hard @@ -10929,7 +10948,7 @@ __metadata: languageName: node linkType: hard -"@vitejs/plugin-react@npm:^4.3.2": +"@vitejs/plugin-react@npm:^4.7.0": version: 4.7.0 resolution: "@vitejs/plugin-react@npm:4.7.0" dependencies: @@ -10961,7 +10980,7 @@ __metadata: languageName: node linkType: hard -"@vitejs/plugin-vue@npm:^4.4.0": +"@vitejs/plugin-vue@npm:^4.6.2": version: 4.6.2 resolution: "@vitejs/plugin-vue@npm:4.6.2" peerDependencies: @@ -10971,29 +10990,29 @@ __metadata: languageName: node linkType: hard -"@vitest/browser-playwright@npm:^4.0.1": - version: 4.0.10 - resolution: "@vitest/browser-playwright@npm:4.0.10" +"@vitest/browser-playwright@npm:^4.0.14": + version: 4.0.14 + resolution: "@vitest/browser-playwright@npm:4.0.14" dependencies: - "@vitest/browser": "npm:4.0.10" - "@vitest/mocker": "npm:4.0.10" + "@vitest/browser": "npm:4.0.14" + "@vitest/mocker": "npm:4.0.14" tinyrainbow: "npm:^3.0.3" peerDependencies: playwright: "*" - vitest: 4.0.10 + vitest: 4.0.14 peerDependenciesMeta: playwright: optional: false - checksum: 10c0/914228451e98d507b1b13e8bb465a1c345f88517a9d914d61c8732ecd1e147d6896db305d038f4b267f969ae270a14ea710834ee95a9d07ab42149fb0b84bf99 + checksum: 10c0/4f781884357f14e543a90d8426a579b23372ba29dda77af6290f1d3535646889ed833e4e4166d89a1c095b555427f3d7f83841a58bfe7ef8e26d6942a0d490fd languageName: node linkType: hard -"@vitest/browser@npm:4.0.10": - version: 4.0.10 - resolution: "@vitest/browser@npm:4.0.10" +"@vitest/browser@npm:4.0.14": + version: 4.0.14 + resolution: "@vitest/browser@npm:4.0.14" dependencies: - "@vitest/mocker": "npm:4.0.10" - "@vitest/utils": "npm:4.0.10" + "@vitest/mocker": "npm:4.0.14" + "@vitest/utils": "npm:4.0.14" magic-string: "npm:^0.30.21" pixelmatch: "npm:7.1.0" pngjs: "npm:^7.0.0" @@ -11001,8 +11020,8 @@ __metadata: tinyrainbow: "npm:^3.0.3" ws: "npm:^8.18.3" peerDependencies: - vitest: 4.0.10 - checksum: 10c0/cfb3bf85970b96c1addf745fc8e9a7b8944cb640081a8bffc2b2b98669a038cf92be9cf04547fbbe27294c87f2abe7657bfaf99ad60a27a18134aa8dbcee4558 + vitest: 4.0.14 + checksum: 10c0/6f741fbe1173b0620f27730c74eec2e92bcd584bf1d9075633563497196b747f5c7a21059f21ec4fbc37a4979aca4dd3b4572dbdebe0482b473fb55609b5af37 languageName: node linkType: hard @@ -11158,6 +11177,25 @@ __metadata: languageName: node linkType: hard +"@vitest/mocker@npm:4.0.14": + version: 4.0.14 + resolution: "@vitest/mocker@npm:4.0.14" + dependencies: + "@vitest/spy": "npm:4.0.14" + estree-walker: "npm:^3.0.3" + magic-string: "npm:^0.30.21" + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + checksum: 10c0/fba7366b26a7fe1222bb576ec807297270a2ad55d9db0d4849b4011364b182545326a8e9522a386e89d52afefa3bafbf456c57792ba9fa2fab4d84772e8c02ae + languageName: node + linkType: hard + "@vitest/pretty-format@npm:3.2.4, @vitest/pretty-format@npm:^3.2.4": version: 3.2.4 resolution: "@vitest/pretty-format@npm:3.2.4" @@ -11176,6 +11214,15 @@ __metadata: languageName: node linkType: hard +"@vitest/pretty-format@npm:4.0.14": + version: 4.0.14 + resolution: "@vitest/pretty-format@npm:4.0.14" + dependencies: + tinyrainbow: "npm:^3.0.3" + checksum: 10c0/ca03cbad86053a05eb3164b1794ada25767215e94f76fe069c0a0431629500a53b221610b186917bfbdebf6a28ac7d3945f78e1e18875230ea6dda685c6a18f3 + languageName: node + linkType: hard + "@vitest/runner@npm:3.2.4": version: 3.2.4 resolution: "@vitest/runner@npm:3.2.4" @@ -11187,7 +11234,7 @@ __metadata: languageName: node linkType: hard -"@vitest/runner@npm:4.0.10, @vitest/runner@npm:^4.0.1": +"@vitest/runner@npm:4.0.10": version: 4.0.10 resolution: "@vitest/runner@npm:4.0.10" dependencies: @@ -11197,6 +11244,16 @@ __metadata: languageName: node linkType: hard +"@vitest/runner@npm:^4.0.14": + version: 4.0.14 + resolution: "@vitest/runner@npm:4.0.14" + dependencies: + "@vitest/utils": "npm:4.0.14" + pathe: "npm:^2.0.3" + checksum: 10c0/97e49a99772fdc0b798d1ba5e8eabc76fa8846a7b5e41c7ac8a43cb0455d333fa37987b88bcbe344d7af51c967f06016c54fef70ded3a212479c71cd4d892d78 + languageName: node + linkType: hard + "@vitest/snapshot@npm:3.2.4": version: 3.2.4 resolution: "@vitest/snapshot@npm:3.2.4" @@ -11235,6 +11292,13 @@ __metadata: languageName: node linkType: hard +"@vitest/spy@npm:4.0.14": + version: 4.0.14 + resolution: "@vitest/spy@npm:4.0.14" + checksum: 10c0/46917fab9c9aaa3c4f815300ec8e21631a7f9cd4d74aac06bad29bb750d9e7a726cd26149c29ea16b1dc5197995faceff3efdcc41c49f402e9da8916dd410be3 + languageName: node + linkType: hard + "@vitest/utils@npm:3.2.4, @vitest/utils@npm:^3.2.4": version: 3.2.4 resolution: "@vitest/utils@npm:3.2.4" @@ -11256,6 +11320,16 @@ __metadata: languageName: node linkType: hard +"@vitest/utils@npm:4.0.14": + version: 4.0.14 + resolution: "@vitest/utils@npm:4.0.14" + dependencies: + "@vitest/pretty-format": "npm:4.0.14" + tinyrainbow: "npm:^3.0.3" + checksum: 10c0/be5432b4445bdb1b41d1ad1bffe9e2a297b7d1d9addef3cbf3782d66da4e80ec8a14e2396638172572e5a6e3527f34bae7f1b98cee00cbe1175b099a28073ecd + languageName: node + linkType: hard + "@volar/language-core@npm:2.4.15": version: 2.4.15 resolution: "@volar/language-core@npm:2.4.15" @@ -11719,7 +11793,7 @@ __metadata: languageName: node linkType: hard -"accepts@npm:~1.3.4, accepts@npm:~1.3.5, accepts@npm:~1.3.8": +"accepts@npm:~1.3.4, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" dependencies: @@ -11883,18 +11957,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.12.0": - version: 8.12.0 - resolution: "ajv@npm:8.12.0" - dependencies: - fast-deep-equal: "npm:^3.1.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - uri-js: "npm:^4.2.2" - checksum: 10c0/ac4f72adf727ee425e049bc9d8b31d4a57e1c90da8d28bcd23d60781b12fcd6fc3d68db5df16994c57b78b94eed7988f5a6b482fd376dc5b084125e20a0a622e - languageName: node - linkType: hard - "ajv@npm:8.17.1, ajv@npm:^8.0.0, ajv@npm:^8.17.1, ajv@npm:^8.2.0, ajv@npm:^8.9.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" @@ -12161,7 +12223,7 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.0.0, aria-query@npm:^5.3.0, aria-query@npm:^5.3.1": +"aria-query@npm:^5.0.0, aria-query@npm:^5.3.0, aria-query@npm:^5.3.1, aria-query@npm:^5.3.2": version: 5.3.2 resolution: "aria-query@npm:5.3.2" checksum: 10c0/003c7e3e2cff5540bf7a7893775fc614de82b0c5dde8ae823d47b7a28a9d4da1f7ed85f340bdb93d5649caa927755f0e31ecc7ab63edfdfc00c8ef07e505e03e @@ -12192,17 +12254,19 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.6, array-includes@npm:^3.1.7, array-includes@npm:^3.1.8": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" +"array-includes@npm:^3.1.6, array-includes@npm:^3.1.8, array-includes@npm:^3.1.9": + version: 3.1.9 + resolution: "array-includes@npm:3.1.9" dependencies: - call-bind: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 + es-abstract: "npm:^1.24.0" + es-object-atoms: "npm:^1.1.1" + get-intrinsic: "npm:^1.3.0" + is-string: "npm:^1.1.1" + math-intrinsics: "npm:^1.1.0" + checksum: 10c0/0235fa69078abeac05ac4250699c44996bc6f774a9cbe45db48674ce6bd142f09b327d31482ff75cf03344db4ea03eae23edb862d59378b484b47ed842574856 languageName: node linkType: hard @@ -12250,32 +12314,34 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.3 - resolution: "array.prototype.findlastindex@npm:1.2.3" +"array.prototype.findlastindex@npm:^1.2.6": + version: 1.2.6 + resolution: "array.prototype.findlastindex@npm:1.2.6" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.1" - checksum: 10c0/2c5c4d3f07512d6729f728f6260a314c00f2eb0a243123092661fa1bc65dce90234c3b483b5f978396eccef6f69c50f0bea248448aaf9cdfcd1cedad6217acbb + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.9" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.1.1" + es-shim-unscopables: "npm:^1.1.0" + checksum: 10c0/82559310d2e57ec5f8fc53d7df420e3abf0ba497935de0a5570586035478ba7d07618cb18e2d4ada2da514c8fb98a034aaf5c06caa0a57e2f7f4c4adedef5956 languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" +"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.3": + version: 1.3.3 + resolution: "array.prototype.flat@npm:1.3.3" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/a578ed836a786efbb6c2db0899ae80781b476200617f65a44846cb1ed8bd8b24c8821b83703375d8af639c689497b7b07277060024b9919db94ac3e10dc8a49b + call-bind: "npm:^1.0.8" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.5" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10c0/d90e04dfbc43bb96b3d2248576753d1fb2298d2d972e29ca7ad5ec621f0d9e16ff8074dae647eac4f31f4fb7d3f561a7ac005fb01a71f51705a13b5af06a7d8a languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.3.2": +"array.prototype.flatmap@npm:^1.3.2, array.prototype.flatmap@npm:^1.3.3": version: 1.3.3 resolution: "array.prototype.flatmap@npm:1.3.3" dependencies: @@ -12287,19 +12353,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.toreversed@npm:^1.1.2": - version: 1.1.2 - resolution: "array.prototype.toreversed@npm:1.1.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/2b7627ea85eae1e80ecce665a500cc0f3355ac83ee4a1a727562c7c2a1d5f1c0b4dd7b65c468ec6867207e452ba01256910a2c0b41486bfdd11acf875a7a3435 - languageName: node - linkType: hard - -"array.prototype.tosorted@npm:^1.1.3": +"array.prototype.tosorted@npm:^1.1.4": version: 1.1.4 resolution: "array.prototype.tosorted@npm:1.1.4" dependencies: @@ -12511,10 +12565,10 @@ __metadata: languageName: node linkType: hard -"async@npm:3.2.5": - version: 3.2.5 - resolution: "async@npm:3.2.5" - checksum: 10c0/1408287b26c6db67d45cb346e34892cee555b8b59e6c68e6f8c3e495cad5ca13b4f218180e871f3c2ca30df4ab52693b66f2f6ff43644760cab0b2198bda79c1 +"async@npm:3.2.6, async@npm:^3.2.3": + version: 3.2.6 + resolution: "async@npm:3.2.6" + checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 languageName: node linkType: hard @@ -12527,13 +12581,6 @@ __metadata: languageName: node linkType: hard -"async@npm:^3.2.3": - version: 3.2.6 - resolution: "async@npm:3.2.6" - checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 - languageName: node - linkType: hard - "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -12589,14 +12636,7 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:=4.7.0": - version: 4.7.0 - resolution: "axe-core@npm:4.7.0" - checksum: 10c0/89ac5712b5932ac7d23398b4cb5ba081c394a086e343acc68ba49c83472706e18e0799804e8388c779dcdacc465377deb29f2714241d3fbb389cf3a6b275c9ba - languageName: node - linkType: hard - -"axe-core@npm:^4.2.0, axe-core@npm:^4.4.2": +"axe-core@npm:^4.10.0, axe-core@npm:^4.2.0, axe-core@npm:^4.4.2": version: 4.11.0 resolution: "axe-core@npm:4.11.0" checksum: 10c0/7d7020a568a824c303711858c2fcfe56d001d27e46c0c2ff75dc31b436cfddfd4857a301e70536cc9e64829d25338f7fb782102d23497ebdc66801e9900fc895 @@ -12614,15 +12654,6 @@ __metadata: languageName: node linkType: hard -"axobject-query@npm:^3.2.1": - version: 3.2.1 - resolution: "axobject-query@npm:3.2.1" - dependencies: - dequal: "npm:^2.0.3" - checksum: 10c0/f7debc2012e456139b57d888c223f6d3cb4b61eb104164a85e3d346273dd6ef0bc9a04b6660ca9407704a14a8e05fa6b6eb9d55f44f348c7210de7ffb350c3a7 - languageName: node - linkType: hard - "axobject-query@npm:^4.1.0": version: 4.1.0 resolution: "axobject-query@npm:4.1.0" @@ -13015,26 +13046,6 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.2": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.5" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.11.0" - raw-body: "npm:2.5.2" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10c0/06f1438fff388a2e2354c96aa3ea8147b79bfcb1262dfcc2aae68ec13723d01d5781680657b74e9f83c808266d5baf52804032fbde2b7382b89bd8cdb273ace9 - languageName: node - linkType: hard - "body-parser@npm:1.20.3": version: 1.20.3 resolution: "body-parser@npm:1.20.3" @@ -13536,13 +13547,6 @@ __metadata: languageName: node linkType: hard -"bytes@npm:3.0.0": - version: 3.0.0 - resolution: "bytes@npm:3.0.0" - checksum: 10c0/91d42c38601c76460519ffef88371caacaea483a354c8e4b8808e7b027574436a5713337c003ea3de63ee4991c2a9a637884fdfe7f761760d746929d9e8fec60 - languageName: node - linkType: hard - "bytes@npm:3.1.2": version: 3.1.2 resolution: "bytes@npm:3.1.2" @@ -14083,14 +14087,14 @@ __metadata: languageName: node linkType: hard -"clipanion@npm:3.2.1": - version: 3.2.1 - resolution: "clipanion@npm:3.2.1" +"clipanion@npm:4.0.0-rc.4": + version: 4.0.0-rc.4 + resolution: "clipanion@npm:4.0.0-rc.4" dependencies: typanion: "npm:^3.8.0" peerDependencies: typanion: "*" - checksum: 10c0/6c148bd01ae645031aeb6e9a1a16f3ce07eb754cd9981c91edcab82b09e063b805ac41e4f36039d07602334b6dbba036b030d1807c12acd7f90778a696b7ac6e + checksum: 10c0/047b415b59a5e9777d00690fba563ccc850eca6bf27790a88d1deea3ecc8a89840ae9aed554ff284cc698a9f3f20256e43c25ff4a7c4c90a71e5e7d9dca61dd1 languageName: node linkType: hard @@ -14389,7 +14393,7 @@ __metadata: languageName: node linkType: hard -"compressible@npm:~2.0.16, compressible@npm:~2.0.18": +"compressible@npm:~2.0.18": version: 2.0.18 resolution: "compressible@npm:2.0.18" dependencies: @@ -14398,18 +14402,18 @@ __metadata: languageName: node linkType: hard -"compression@npm:1.7.4": - version: 1.7.4 - resolution: "compression@npm:1.7.4" +"compression@npm:1.7.5": + version: 1.7.5 + resolution: "compression@npm:1.7.5" dependencies: - accepts: "npm:~1.3.5" - bytes: "npm:3.0.0" - compressible: "npm:~2.0.16" + bytes: "npm:3.1.2" + compressible: "npm:~2.0.18" debug: "npm:2.6.9" + negotiator: "npm:~0.6.4" on-headers: "npm:~1.0.2" - safe-buffer: "npm:5.1.2" + safe-buffer: "npm:5.2.1" vary: "npm:~1.1.2" - checksum: 10c0/138db836202a406d8a14156a5564fb1700632a76b6e7d1546939472895a5304f2b23c80d7a22bf44c767e87a26e070dbc342ea63bb45ee9c863354fa5556bbbc + checksum: 10c0/35c9d2d57c86d8107eab5e637f2146fcefec8475a2ff3e162f5eb0982ff856d385fb5d8c9823c3d50e075f2d9304bc622dac3df27bfef0355309c0a5307861c5 languageName: node linkType: hard @@ -14610,10 +14614,10 @@ __metadata: languageName: node linkType: hard -"core-js@npm:3.35.0": - version: 3.35.0 - resolution: "core-js@npm:3.35.0" - checksum: 10c0/1d545ff4406f2afa5e681f44b45ed5f7f119d158b380234d5aa7787ce7e47fc7a635b98b74c28c766ba8191e3db8c2316ad6ab4ff1ddecbc3fd618413a52c29c +"core-js@npm:3.37.1": + version: 3.37.1 + resolution: "core-js@npm:3.37.1" + checksum: 10c0/440eb51a7a39128a320225fe349f870a3641b96c9ecd26470227db730ef8c161ea298eaea621db66ec0ff622a85299efb4e23afebf889c0a1748616102307675 languageName: node linkType: hard @@ -14751,13 +14755,13 @@ __metadata: resolution: "create-storybook@workspace:code/lib/create-storybook" dependencies: "@types/prompts": "npm:^2.0.9" - "@types/semver": "npm:^7.3.4" + "@types/semver": "npm:^7.7.1" commander: "npm:^14.0.1" empathic: "npm:^2.0.0" picocolors: "npm:^1.1.0" process-ancestry: "npm:^0.0.2" react: "npm:^18.2.0" - semver: "npm:^7.6.2" + semver: "npm:^7.7.3" storybook: "workspace:*" tiny-invariant: "npm:^1.3.1" ts-dedent: "npm:^2.0.0" @@ -15056,10 +15060,10 @@ __metadata: languageName: node linkType: hard -"dayjs@npm:1.11.10": - version: 1.11.10 - resolution: "dayjs@npm:1.11.10" - checksum: 10c0/4de9af50639d47df87f2e15fa36bb07e0f9ed1e9c52c6caa1482788ee9a384d668f1dbd00c54f82aaab163db07d61d2899384b8254da3a9184fc6deca080e2fe +"dayjs@npm:1.11.13": + version: 1.11.13 + resolution: "dayjs@npm:1.11.13" + checksum: 10c0/a3caf6ac8363c7dade9d1ee797848ddcf25c1ace68d9fe8678ecf8ba0675825430de5d793672ec87b24a69bf04a1544b176547b2539982275d5542a7955f35b7 languageName: node linkType: hard @@ -15079,7 +15083,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.3.7, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -15103,6 +15107,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:4.3.7": + version: 4.3.7 + resolution: "debug@npm:4.3.7" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b + languageName: node + linkType: hard + "debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" @@ -15334,7 +15350,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -15389,7 +15405,7 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.0, dequal@npm:^2.0.2, dequal@npm:^2.0.3": +"dequal@npm:^2.0.0, dequal@npm:^2.0.2": version: 2.0.3 resolution: "dequal@npm:2.0.3" checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888 @@ -16223,12 +16239,12 @@ __metadata: languageName: node linkType: hard -"envinfo@npm:7.13.0": - version: 7.13.0 - resolution: "envinfo@npm:7.13.0" +"envinfo@npm:7.14.0": + version: 7.14.0 + resolution: "envinfo@npm:7.14.0" bin: envinfo: dist/cli.js - checksum: 10c0/9c279213cbbb353b3171e8e333fd2ed564054abade08ab3d735fe136e10a0e14e0588e1ce77e6f01285f2462eaca945d64f0778be5ae3d9e82804943e36a4411 + checksum: 10c0/059a031eee101e056bd9cc5cbfe25c2fab433fe1780e86cf0a82d24a000c6931e327da6a8ffb3dce528a24f83f256e7efc0b36813113eff8fdc6839018efe327 languageName: node linkType: hard @@ -16291,26 +16307,26 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.9": - version: 1.23.9 - resolution: "es-abstract@npm:1.23.9" +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9, es-abstract@npm:^1.24.0": + version: 1.24.0 + resolution: "es-abstract@npm:1.24.0" dependencies: array-buffer-byte-length: "npm:^1.0.2" arraybuffer.prototype.slice: "npm:^1.0.4" available-typed-arrays: "npm:^1.0.7" call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" + call-bound: "npm:^1.0.4" data-view-buffer: "npm:^1.0.2" data-view-byte-length: "npm:^1.0.2" data-view-byte-offset: "npm:^1.0.1" es-define-property: "npm:^1.0.1" es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" + es-object-atoms: "npm:^1.1.1" es-set-tostringtag: "npm:^2.1.0" es-to-primitive: "npm:^1.3.0" function.prototype.name: "npm:^1.1.8" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.0" + get-intrinsic: "npm:^1.3.0" + get-proto: "npm:^1.0.1" get-symbol-description: "npm:^1.1.0" globalthis: "npm:^1.0.4" gopd: "npm:^1.2.0" @@ -16322,21 +16338,24 @@ __metadata: is-array-buffer: "npm:^3.0.5" is-callable: "npm:^1.2.7" is-data-view: "npm:^1.0.2" + is-negative-zero: "npm:^2.0.3" is-regex: "npm:^1.2.1" + is-set: "npm:^2.0.3" is-shared-array-buffer: "npm:^1.0.4" is-string: "npm:^1.1.1" is-typed-array: "npm:^1.1.15" - is-weakref: "npm:^1.1.0" + is-weakref: "npm:^1.1.1" math-intrinsics: "npm:^1.1.0" - object-inspect: "npm:^1.13.3" + object-inspect: "npm:^1.13.4" object-keys: "npm:^1.1.1" object.assign: "npm:^4.1.7" own-keys: "npm:^1.0.1" - regexp.prototype.flags: "npm:^1.5.3" + regexp.prototype.flags: "npm:^1.5.4" safe-array-concat: "npm:^1.1.3" safe-push-apply: "npm:^1.0.0" safe-regex-test: "npm:^1.1.0" set-proto: "npm:^1.0.0" + stop-iteration-iterator: "npm:^1.1.0" string.prototype.trim: "npm:^1.2.10" string.prototype.trimend: "npm:^1.0.9" string.prototype.trimstart: "npm:^1.0.8" @@ -16345,8 +16364,8 @@ __metadata: typed-array-byte-offset: "npm:^1.0.4" typed-array-length: "npm:^1.0.7" unbox-primitive: "npm:^1.1.0" - which-typed-array: "npm:^1.1.18" - checksum: 10c0/1de229c9e08fe13c17fe5abaec8221545dfcd57e51f64909599a6ae896df84b8fd2f7d16c60cb00d7bf495b9298ca3581aded19939d4b7276854a4b066f8422b + which-typed-array: "npm:^1.1.19" + checksum: 10c0/b256e897be32df5d382786ce8cce29a1dd8c97efbab77a26609bd70f2ed29fbcfc7a31758cb07488d532e7ccccdfca76c1118f2afe5a424cdc05ca007867c318 languageName: node linkType: hard @@ -16381,25 +16400,27 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.15, es-iterator-helpers@npm:^1.0.19": - version: 1.0.19 - resolution: "es-iterator-helpers@npm:1.0.19" +"es-iterator-helpers@npm:^1.2.1": + version: 1.2.1 + resolution: "es-iterator-helpers@npm:1.2.1" dependencies: - call-bind: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.3" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" + es-abstract: "npm:^1.23.6" es-errors: "npm:^1.3.0" es-set-tostringtag: "npm:^2.0.3" function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.3" + get-intrinsic: "npm:^1.2.6" + globalthis: "npm:^1.0.4" + gopd: "npm:^1.2.0" has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - iterator.prototype: "npm:^1.1.2" - safe-array-concat: "npm:^1.1.2" - checksum: 10c0/ae8f0241e383b3d197383b9842c48def7fce0255fb6ed049311b686ce295595d9e389b466f6a1b7d4e7bb92d82f5e716d6fae55e20c1040249bf976743b038c5 + has-proto: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + internal-slot: "npm:^1.1.0" + iterator.prototype: "npm:^1.1.4" + safe-array-concat: "npm:^1.1.3" + checksum: 10c0/97e3125ca472d82d8aceea11b790397648b52c26d8768ea1c1ee6309ef45a8755bb63225a43f3150c7591cffc17caf5752459f1e70d583b4184370a8f04ebd2f languageName: node linkType: hard @@ -16431,7 +16452,7 @@ __metadata: languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": +"es-shim-unscopables@npm:^1.0.2, es-shim-unscopables@npm:^1.1.0": version: 1.1.0 resolution: "es-shim-unscopables@npm:1.1.0" dependencies: @@ -16680,14 +16701,14 @@ __metadata: languageName: node linkType: hard -"eslint-config-prettier@npm:^9.1.0": - version: 9.1.0 - resolution: "eslint-config-prettier@npm:9.1.0" +"eslint-config-prettier@npm:^9.1.2": + version: 9.1.2 + resolution: "eslint-config-prettier@npm:9.1.2" peerDependencies: eslint: ">=7.0.0" bin: eslint-config-prettier: bin/cli.js - checksum: 10c0/6d332694b36bc9ac6fdb18d3ca2f6ac42afa2ad61f0493e89226950a7091e38981b66bac2b47ba39d15b73fff2cd32c78b850a9cf9eed9ca9a96bfb2f3a2f10d + checksum: 10c0/d2e9dc913b1677764a4732433d83d258f40820458c65d0274cb9e3eaf6559b39f2136446f310c05abed065a4b3c2e901807ccf583dff76c6227eaebf4132c39a languageName: node linkType: hard @@ -16702,7 +16723,7 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-typescript@npm:^3.6.1": +"eslint-import-resolver-typescript@npm:^3.10.1": version: 3.10.1 resolution: "eslint-import-resolver-typescript@npm:3.10.1" dependencies: @@ -16726,15 +16747,15 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.8.0": - version: 2.8.0 - resolution: "eslint-module-utils@npm:2.8.0" +"eslint-module-utils@npm:^2.12.1": + version: 2.12.1 + resolution: "eslint-module-utils@npm:2.12.1" dependencies: debug: "npm:^3.2.7" peerDependenciesMeta: eslint: optional: true - checksum: 10c0/c7a8d1a58d76ec8217a8fea49271ec8132d1b9390965a75f6a4ecbc9e5983d742195b46d2e4378231d2186801439fe1aa5700714b0bfd4eb17aac6e1b65309df + checksum: 10c0/6f4efbe7a91ae49bf67b4ab3644cb60bc5bd7db4cb5521de1b65be0847ffd3fb6bce0dd68f0995e1b312d137f768e2a1f842ee26fe73621afa05f850628fdc40 languageName: node linkType: hard @@ -16756,7 +16777,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-depend@npm:^1.3.1, eslint-plugin-depend@npm:^1.4.0": +"eslint-plugin-depend@npm:^1.4.0": version: 1.4.0 resolution: "eslint-plugin-depend@npm:1.4.0" dependencies: @@ -16791,7 +16812,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-eslint-plugin@npm:^6.2.0": +"eslint-plugin-eslint-plugin@npm:^6.5.0": version: 6.5.0 resolution: "eslint-plugin-eslint-plugin@npm:6.5.0" dependencies: @@ -16803,15 +16824,15 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-file-progress@npm:^1.4.0": - version: 1.4.0 - resolution: "eslint-plugin-file-progress@npm:1.4.0" +"eslint-plugin-file-progress@npm:^1.5.0": + version: 1.5.0 + resolution: "eslint-plugin-file-progress@npm:1.5.0" dependencies: - chalk: "npm:^4.1.2" - ora: "npm:^5.4.1" + nanospinner: "npm:^1.1.0" + picocolors: "npm:^1.0.1" peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/58e49349d6c20c139e3cde23529f6d266c6bd009c8a0245ad3375bb9089edce18edcdc391b5b53668156b5a536c4f0df2e8903534dbdd63225aae97ee0467ae6 + checksum: 10c0/7c5712d810102a4264998ebaba31a4a0d8a81693ec938b607fc48e837a65c3cd12a93e89de35a09326bd831133394b2ad9e8575ba22cfcda7d91a4fd2efa66b7 languageName: node linkType: hard @@ -16824,34 +16845,36 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-import@npm:^2.29.1": - version: 2.29.1 - resolution: "eslint-plugin-import@npm:2.29.1" +"eslint-plugin-import@npm:^2.32.0": + version: 2.32.0 + resolution: "eslint-plugin-import@npm:2.32.0" dependencies: - array-includes: "npm:^3.1.7" - array.prototype.findlastindex: "npm:^1.2.3" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" + "@rtsao/scc": "npm:^1.1.0" + array-includes: "npm:^3.1.9" + array.prototype.findlastindex: "npm:^1.2.6" + array.prototype.flat: "npm:^1.3.3" + array.prototype.flatmap: "npm:^1.3.3" debug: "npm:^3.2.7" doctrine: "npm:^2.1.0" eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.8.0" - hasown: "npm:^2.0.0" - is-core-module: "npm:^2.13.1" + eslint-module-utils: "npm:^2.12.1" + hasown: "npm:^2.0.2" + is-core-module: "npm:^2.16.1" is-glob: "npm:^4.0.3" minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.7" - object.groupby: "npm:^1.0.1" - object.values: "npm:^1.1.7" + object.fromentries: "npm:^2.0.8" + object.groupby: "npm:^1.0.3" + object.values: "npm:^1.2.1" semver: "npm:^6.3.1" + string.prototype.trimend: "npm:^1.0.9" tsconfig-paths: "npm:^3.15.0" peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 10c0/5f35dfbf4e8e67f741f396987de9504ad125c49f4144508a93282b4ea0127e052bde65ab6def1f31b6ace6d5d430be698333f75bdd7dca3bc14226c92a083196 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + checksum: 10c0/bfb1b8fc8800398e62ddfefbf3638d185286edfed26dfe00875cc2846d954491b4f5112457831588b757fa789384e1ae585f812614c4797f0499fa234fd4a48b languageName: node linkType: hard -"eslint-plugin-json-files@npm:^4.1.0": +"eslint-plugin-json-files@npm:^4.4.2": version: 4.4.2 resolution: "eslint-plugin-json-files@npm:4.4.2" dependencies: @@ -16867,39 +16890,38 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-json@npm:^4.0.0": - version: 4.0.0 - resolution: "eslint-plugin-json@npm:4.0.0" +"eslint-plugin-json@npm:^4.0.1": + version: 4.0.1 + resolution: "eslint-plugin-json@npm:4.0.1" dependencies: lodash: "npm:^4.17.21" vscode-json-languageservice: "npm:^4.1.6" - checksum: 10c0/01a0cfcf10c9f8cfac1b1e69177a693d028e457fccaa6d57db78a80305fb96bc3f2ca632652cd9ddcf12ddc4b82d04a73443fb590d7f4b1d460ab2d39b7a5f34 + checksum: 10c0/9eb37d8f306180b194073af91a62a24afac9a4b805c7e685524c792bb6550ad9362f84ee226553e9f5099a56238f0697ae8a85d4e39bb2e12fdccbccd77669e0 languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:^6.8.0": - version: 6.8.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.8.0" +"eslint-plugin-jsx-a11y@npm:^6.10.2": + version: 6.10.2 + resolution: "eslint-plugin-jsx-a11y@npm:6.10.2" dependencies: - "@babel/runtime": "npm:^7.23.2" - aria-query: "npm:^5.3.0" - array-includes: "npm:^3.1.7" + aria-query: "npm:^5.3.2" + array-includes: "npm:^3.1.8" array.prototype.flatmap: "npm:^1.3.2" ast-types-flow: "npm:^0.0.8" - axe-core: "npm:=4.7.0" - axobject-query: "npm:^3.2.1" + axe-core: "npm:^4.10.0" + axobject-query: "npm:^4.1.0" damerau-levenshtein: "npm:^1.0.8" emoji-regex: "npm:^9.2.2" - es-iterator-helpers: "npm:^1.0.15" - hasown: "npm:^2.0.0" + hasown: "npm:^2.0.2" jsx-ast-utils: "npm:^3.3.5" language-tags: "npm:^1.0.9" minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.7" - object.fromentries: "npm:^2.0.7" + object.fromentries: "npm:^2.0.8" + safe-regex-test: "npm:^1.0.3" + string.prototype.includes: "npm:^2.0.1" peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10c0/199b883e526e6f9d7c54cb3f094abc54f11a1ec816db5fb6cae3b938eb0e503acc10ccba91ca7451633a9d0b9abc0ea03601844a8aba5fe88c5e8897c9ac8f49 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 + checksum: 10c0/d93354e03b0cf66f018d5c50964e074dffe4ddf1f9b535fa020d19c4ae45f89c1a16e9391ca61ac3b19f7042c751ac0d361a056a65cbd1de24718a53ff8daa6e languageName: node linkType: hard @@ -16931,7 +16953,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-playwright@npm:^1.6.2": +"eslint-plugin-playwright@npm:^1.8.3": version: 1.8.3 resolution: "eslint-plugin-playwright@npm:1.8.3" dependencies: @@ -16946,23 +16968,23 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^5.1.3": - version: 5.1.3 - resolution: "eslint-plugin-prettier@npm:5.1.3" +"eslint-plugin-prettier@npm:^5.5.4": + version: 5.5.4 + resolution: "eslint-plugin-prettier@npm:5.5.4" dependencies: prettier-linter-helpers: "npm:^1.0.0" - synckit: "npm:^0.8.6" + synckit: "npm:^0.11.7" peerDependencies: "@types/eslint": ">=8.0.0" eslint: ">=8.0.0" - eslint-config-prettier: "*" + eslint-config-prettier: ">= 7.0.0 <10.0.0 || >=10.1.0" prettier: ">=3.0.0" peerDependenciesMeta: "@types/eslint": optional: true eslint-config-prettier: optional: true - checksum: 10c0/f45d5fc1fcfec6b0cf038a7a65ddd10a25df4fe3f9e1f6b7f0d5100e66f046a26a2492e69ee765dddf461b93c114cf2e1eb18d4970aafa6f385448985c136e09 + checksum: 10c0/5cc780e0ab002f838ad8057409e86de4ff8281aa2704a50fa8511abff87028060c2e45741bc9cbcbd498712e8d189de8026e70aed9e20e50fe5ba534ee5a8442 languageName: node linkType: hard @@ -16975,31 +16997,31 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:^7.34.2": - version: 7.34.2 - resolution: "eslint-plugin-react@npm:7.34.2" +"eslint-plugin-react@npm:^7.37.5": + version: 7.37.5 + resolution: "eslint-plugin-react@npm:7.37.5" dependencies: array-includes: "npm:^3.1.8" array.prototype.findlast: "npm:^1.2.5" - array.prototype.flatmap: "npm:^1.3.2" - array.prototype.toreversed: "npm:^1.1.2" - array.prototype.tosorted: "npm:^1.1.3" + array.prototype.flatmap: "npm:^1.3.3" + array.prototype.tosorted: "npm:^1.1.4" doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.0.19" + es-iterator-helpers: "npm:^1.2.1" estraverse: "npm:^5.3.0" + hasown: "npm:^2.0.2" jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.8" + object.entries: "npm:^1.1.9" object.fromentries: "npm:^2.0.8" - object.hasown: "npm:^1.1.4" - object.values: "npm:^1.2.0" + object.values: "npm:^1.2.1" prop-types: "npm:^15.8.1" resolve: "npm:^2.0.0-next.5" semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.11" + string.prototype.matchall: "npm:^4.0.12" + string.prototype.repeat: "npm:^1.0.0" peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10c0/37dc04424da8626f20a071466e7238d53ed111c53e5e5398d813ac2cf76a2078f00d91f7833fe5b2f0fc98f2688a75b36e78e9ada9f1068705d23c7031094316 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + checksum: 10c0/c850bfd556291d4d9234f5ca38db1436924a1013627c8ab1853f77cac73ec19b020e861e6c7b783436a48b6ffcdfba4547598235a37ad4611b6739f65fd8ad57 languageName: node linkType: hard @@ -17008,17 +17030,17 @@ __metadata: resolution: "eslint-plugin-storybook@workspace:code/lib/eslint-plugin" dependencies: "@types/eslint": "npm:^8.56.2" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@types/prompts": "npm:^2.0.9" - "@typescript-eslint/eslint-plugin": "npm:^8.8.1" - "@typescript-eslint/parser": "npm:^8.8.1" - "@typescript-eslint/rule-tester": "npm:^8.8.1" - "@typescript-eslint/utils": "npm:^8.8.1" + "@typescript-eslint/eslint-plugin": "npm:^8.48.0" + "@typescript-eslint/parser": "npm:^8.48.0" + "@typescript-eslint/rule-tester": "npm:^8.48.0" + "@typescript-eslint/utils": "npm:^8.48.0" "@vitest/coverage-v8": "npm:^3.2.4" eslint: "npm:^8.57.1" - eslint-plugin-eslint-plugin: "npm:^6.2.0" + eslint-plugin-eslint-plugin: "npm:^6.5.0" eslint-plugin-node: "npm:^11.1.0" - prettier: "npm:^3.5.3" + prettier: "npm:^3.7.1" prompts: "npm:^2.4.0" ts-dedent: "npm:^2.0.0" typescript: "npm:^5.8.3" @@ -17144,7 +17166,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:8.57.1, eslint@npm:^8.57.0, eslint@npm:^8.57.1": +"eslint@npm:8.57.1, eslint@npm:^8.57.1": version: 8.57.1 resolution: "eslint@npm:8.57.1" dependencies: @@ -17579,42 +17601,81 @@ __metadata: languageName: node linkType: hard -"express@npm:4.19.2": - version: 4.19.2 - resolution: "express@npm:4.19.2" +"express@npm:4.21.0": + version: 4.21.0 + resolution: "express@npm:4.21.0" dependencies: accepts: "npm:~1.3.8" array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.2" + body-parser: "npm:1.20.3" content-disposition: "npm:0.5.4" content-type: "npm:~1.0.4" cookie: "npm:0.6.0" cookie-signature: "npm:1.0.6" debug: "npm:2.6.9" depd: "npm:2.0.0" - encodeurl: "npm:~1.0.2" + encodeurl: "npm:~2.0.0" escape-html: "npm:~1.0.3" etag: "npm:~1.8.1" - finalhandler: "npm:1.2.0" + finalhandler: "npm:1.3.1" fresh: "npm:0.5.2" http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.1" + merge-descriptors: "npm:1.0.3" methods: "npm:~1.1.2" on-finished: "npm:2.4.1" parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.7" + path-to-regexp: "npm:0.1.10" proxy-addr: "npm:~2.0.7" - qs: "npm:6.11.0" + qs: "npm:6.13.0" range-parser: "npm:~1.2.1" safe-buffer: "npm:5.2.1" - send: "npm:0.18.0" - serve-static: "npm:1.15.0" + send: "npm:0.19.0" + serve-static: "npm:1.16.2" + setprototypeof: "npm:1.2.0" + statuses: "npm:2.0.1" + type-is: "npm:~1.6.18" + utils-merge: "npm:1.0.1" + vary: "npm:~1.1.2" + checksum: 10c0/4cf7ca328f3fdeb720f30ccb2ea7708bfa7d345f9cc460b64a82bf1b2c91e5b5852ba15a9a11b2a165d6089acf83457fc477dc904d59cd71ed34c7a91762c6cc + languageName: node + linkType: hard + +"express@npm:4.21.1": + version: 4.21.1 + resolution: "express@npm:4.21.1" + dependencies: + accepts: "npm:~1.3.8" + array-flatten: "npm:1.1.1" + body-parser: "npm:1.20.3" + content-disposition: "npm:0.5.4" + content-type: "npm:~1.0.4" + cookie: "npm:0.7.1" + cookie-signature: "npm:1.0.6" + debug: "npm:2.6.9" + depd: "npm:2.0.0" + encodeurl: "npm:~2.0.0" + escape-html: "npm:~1.0.3" + etag: "npm:~1.8.1" + finalhandler: "npm:1.3.1" + fresh: "npm:0.5.2" + http-errors: "npm:2.0.0" + merge-descriptors: "npm:1.0.3" + methods: "npm:~1.1.2" + on-finished: "npm:2.4.1" + parseurl: "npm:~1.3.3" + path-to-regexp: "npm:0.1.10" + proxy-addr: "npm:~2.0.7" + qs: "npm:6.13.0" + range-parser: "npm:~1.2.1" + safe-buffer: "npm:5.2.1" + send: "npm:0.19.0" + serve-static: "npm:1.16.2" setprototypeof: "npm:1.2.0" statuses: "npm:2.0.1" type-is: "npm:~1.6.18" utils-merge: "npm:1.0.1" vary: "npm:~1.1.2" - checksum: 10c0/e82e2662ea9971c1407aea9fc3c16d6b963e55e3830cd0ef5e00b533feda8b770af4e3be630488ef8a752d7c75c4fcefb15892868eeaafe7353cb9e3e269fdcb + checksum: 10c0/0c287867e5f6129d3def1edd9b63103a53c40d4dc8628839d4b6827e35eb8f0de5a4656f9d85f4457eba584f9871ebb2ad26c750b36bd75d9bbb8bcebdc4892c languageName: node linkType: hard @@ -17953,21 +18014,6 @@ __metadata: languageName: node linkType: hard -"finalhandler@npm:1.2.0": - version: 1.2.0 - resolution: "finalhandler@npm:1.2.0" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - statuses: "npm:2.0.1" - unpipe: "npm:~1.0.0" - checksum: 10c0/64b7e5ff2ad1fcb14931cd012651631b721ce657da24aedb5650ddde9378bf8e95daa451da43398123f5de161a81e79ff5affe4f9f2a6d2df4a813d6d3e254b7 - languageName: node - linkType: hard - "finalhandler@npm:1.3.1": version: 1.3.1 resolution: "finalhandler@npm:1.3.1" @@ -18252,7 +18298,7 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.4": +"form-data@npm:^4.0.4, form-data@npm:~4.0.0": version: 4.0.5 resolution: "form-data@npm:4.0.5" dependencies: @@ -18655,7 +18701,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7, get-intrinsic@npm:^1.3.0": +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7, get-intrinsic@npm:^1.3.0": version: 1.3.1 resolution: "get-intrinsic@npm:1.3.1" dependencies: @@ -18862,7 +18908,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1, glob@npm:^10.4.2, glob@npm:^10.4.5": +"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1, glob@npm:^10.4.2, glob@npm:^10.5.0": version: 10.5.0 resolution: "glob@npm:10.5.0" dependencies: @@ -18963,7 +19009,7 @@ __metadata: languageName: node linkType: hard -"globalthis@npm:^1.0.3, globalthis@npm:^1.0.4": +"globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" dependencies: @@ -19016,7 +19062,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^14.0.0, globby@npm:^14.0.1": +"globby@npm:^14.0.0, globby@npm:^14.1.0": version: 14.1.0 resolution: "globby@npm:14.1.0" dependencies: @@ -19207,7 +19253,7 @@ __metadata: languageName: node linkType: hard -"happy-dom@npm:^17.4.4": +"happy-dom@npm:^17.6.3": version: 17.6.3 resolution: "happy-dom@npm:17.6.3" dependencies: @@ -19282,7 +19328,7 @@ __metadata: languageName: node linkType: hard -"has-proto@npm:^1.0.3, has-proto@npm:^1.2.0": +"has-proto@npm:^1.2.0": version: 1.2.0 resolution: "has-proto@npm:1.2.0" dependencies: @@ -19847,14 +19893,14 @@ __metadata: languageName: node linkType: hard -"http-signature@npm:~1.3.6": - version: 1.3.6 - resolution: "http-signature@npm:1.3.6" +"http-signature@npm:~1.4.0": + version: 1.4.0 + resolution: "http-signature@npm:1.4.0" dependencies: assert-plus: "npm:^1.0.0" jsprim: "npm:^2.0.2" - sshpk: "npm:^1.14.1" - checksum: 10c0/f8d15d8c91a5a80805530e2f401a3f83ed55162058651d86ad00df294b159a54e001b5d00e04983f7542a55865aee02d2d83d68c8499137ff2bc142553d8dfc2 + sshpk: "npm:^1.18.0" + checksum: 10c0/b9806f5a9ed82a146589837d175c43b596b1cc8c9431665e83d47c152aa8a4629dd1b1e050f8f56e7f17f62cf97b58e888775093310441ddee5f105f28646b2b languageName: node linkType: hard @@ -20150,7 +20196,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.7, internal-slot@npm:^1.1.0": +"internal-slot@npm:^1.1.0": version: 1.1.0 resolution: "internal-slot@npm:1.1.0" dependencies: @@ -20344,7 +20390,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1, is-core-module@npm:^2.16.1": +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.16.1": version: 2.16.1 resolution: "is-core-module@npm:2.16.1" dependencies: @@ -20596,6 +20642,13 @@ __metadata: languageName: node linkType: hard +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: 10c0/bcdcf6b8b9714063ffcfa9929c575ac69bfdabb8f4574ff557dfc086df2836cf07e3906f5bbc4f2a5c12f8f3ba56af640c843cdfc74da8caed86c7c7d66fd08e + languageName: node + linkType: hard + "is-network-error@npm:^1.0.0": version: 1.3.0 resolution: "is-network-error@npm:1.3.0" @@ -20803,12 +20856,12 @@ __metadata: languageName: node linkType: hard -"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0": - version: 1.1.0 - resolution: "is-weakref@npm:1.1.0" +"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.1": + version: 1.1.1 + resolution: "is-weakref@npm:1.1.1" dependencies: - call-bound: "npm:^1.0.2" - checksum: 10c0/aa835f62e29cb60132ecb3ec7d11bd0f39ec7322325abe8412b805aef47153ec2daefdb21759b049711c674f49b13202a31d8d126bcdff7d8671c78babd4ae5b + call-bound: "npm:^1.0.3" + checksum: 10c0/8e0a9c07b0c780949a100e2cab2b5560a48ecd4c61726923c1a9b77b6ab0aa0046c9e7fb2206042296817045376dee2c8ab1dabe08c7c3dfbf195b01275a085b languageName: node linkType: hard @@ -20966,16 +21019,17 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.2": - version: 1.1.2 - resolution: "iterator.prototype@npm:1.1.2" +"iterator.prototype@npm:^1.1.4": + version: 1.1.5 + resolution: "iterator.prototype@npm:1.1.5" dependencies: - define-properties: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - reflect.getprototypeof: "npm:^1.0.4" - set-function-name: "npm:^2.0.1" - checksum: 10c0/a32151326095e916f306990d909f6bbf23e3221999a18ba686419535dcd1749b10ded505e89334b77dc4c7a58a8508978f0eb16c2c8573e6d412eb7eb894ea79 + define-data-property: "npm:^1.1.4" + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.6" + get-proto: "npm:^1.0.0" + has-symbols: "npm:^1.1.0" + set-function-name: "npm:^2.0.2" + checksum: 10c0/f7a262808e1b41049ab55f1e9c29af7ec1025a000d243b83edf34ce2416eedd56079b117fa59376bb4a724110690f13aa8427f2ee29a09eec63a7e72367626d0 languageName: node linkType: hard @@ -21837,7 +21891,7 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:^13.2.2": +"lint-staged@npm:^13.3.0": version: 13.3.0 resolution: "lint-staged@npm:13.3.0" dependencies: @@ -21857,9 +21911,9 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:^15.5.1": - version: 15.5.1 - resolution: "lint-staged@npm:15.5.1" +"lint-staged@npm:^15.5.2": + version: 15.5.2 + resolution: "lint-staged@npm:15.5.2" dependencies: chalk: "npm:^5.4.1" commander: "npm:^13.1.0" @@ -21873,7 +21927,7 @@ __metadata: yaml: "npm:^2.7.0" bin: lint-staged: bin/lint-staged.js - checksum: 10c0/86deddb08bf10428f2eb96c02326a9ee403360729225f0b12afb0c0f13c287a75daa01e179d86f64e3432576446d8643d204a47417296f9ef0aa56f1340ff2af + checksum: 10c0/618386254600ada3af3672486a9d082250108245e7c0863d9dfe0a21e7764e3b2eb6416b0f8970e548f4e9d368637331598b27df5a1306925feabbaf16a667e1 languageName: node linkType: hard @@ -22747,13 +22801,6 @@ __metadata: languageName: node linkType: hard -"merge-descriptors@npm:1.0.1": - version: 1.0.1 - resolution: "merge-descriptors@npm:1.0.1" - checksum: 10c0/b67d07bd44cfc45cebdec349bb6e1f7b077ee2fd5beb15d1f7af073849208cb6f144fe403e29a36571baf3f4e86469ac39acf13c318381e958e186b2766f54ec - languageName: node - linkType: hard - "merge-descriptors@npm:1.0.3": version: 1.0.3 resolution: "merge-descriptors@npm:1.0.3" @@ -23652,13 +23699,6 @@ __metadata: languageName: node linkType: hard -"nanoclone@npm:^0.2.1": - version: 0.2.1 - resolution: "nanoclone@npm:0.2.1" - checksum: 10c0/760b569ea841c9678fdf8d763c6d7bb093f0889150087f82d86c536a318b302939c82ce35cdaec999d0f687789d0d79d0f3f75a272d7a98dfac7a067c0b47053 - languageName: node - linkType: hard - "nanoid@npm:^3.3.11, nanoid@npm:^3.3.6, nanoid@npm:^3.3.8": version: 3.3.11 resolution: "nanoid@npm:3.3.11" @@ -23677,6 +23717,15 @@ __metadata: languageName: node linkType: hard +"nanospinner@npm:^1.1.0": + version: 1.2.2 + resolution: "nanospinner@npm:1.2.2" + dependencies: + picocolors: "npm:^1.1.1" + checksum: 10c0/07264f63816a8ec24d84ffe216a605cf11dffd8b098d4c5e6790437304b47e10ce4fc341de8dbcfc1b59aa42107f9949c89bcc201239eb61a80e14b6b1a20c90 + languageName: node + linkType: hard + "napi-postinstall@npm:^0.3.0": version: 0.3.4 resolution: "napi-postinstall@npm:0.3.4" @@ -24293,10 +24342,10 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.3": - version: 1.13.3 - resolution: "object-inspect@npm:1.13.3" - checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 +"object-inspect@npm:^1.13.3, object-inspect@npm:^1.13.4": + version: 1.13.4 + resolution: "object-inspect@npm:1.13.4" + checksum: 10c0/d7f8711e803b96ea3191c745d6f8056ce1f2496e530e6a19a0e92d89b0fa3c76d910c31f0aa270432db6bd3b2f85500a376a83aaba849a8d518c8845b3211692 languageName: node linkType: hard @@ -24331,18 +24380,19 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.5, object.entries@npm:^1.1.7, object.entries@npm:^1.1.8": - version: 1.1.8 - resolution: "object.entries@npm:1.1.8" +"object.entries@npm:^1.1.5, object.entries@npm:^1.1.9": + version: 1.1.9 + resolution: "object.entries@npm:1.1.9" dependencies: - call-bind: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/db9ea979d2956a3bc26c262da4a4d212d36f374652cc4c13efdd069c1a519c16571c137e2893d1c46e1cb0e15c88fd6419eaf410c945f329f09835487d7e65d3 + es-object-atoms: "npm:^1.1.1" + checksum: 10c0/d4b8c1e586650407da03370845f029aa14076caca4e4d4afadbc69cfb5b78035fd3ee7be417141abdb0258fa142e59b11923b4c44d8b1255b28f5ffcc50da7db languageName: node linkType: hard -"object.fromentries@npm:^2.0.7, object.fromentries@npm:^2.0.8": +"object.fromentries@npm:^2.0.8": version: 2.0.8 resolution: "object.fromentries@npm:2.0.8" dependencies: @@ -24354,30 +24404,18 @@ __metadata: languageName: node linkType: hard -"object.groupby@npm:^1.0.1": - version: 1.0.1 - resolution: "object.groupby@npm:1.0.1" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - checksum: 10c0/61e41fbf08cc04ed860363db9629eedeaa590fce243c0960e948fd7b11f78a9d4350065c339936d118a2dd8775d7259e26207340cc8ce688bec66cb615fec6fe - languageName: node - linkType: hard - -"object.hasown@npm:^1.1.4": - version: 1.1.4 - resolution: "object.hasown@npm:1.1.4" +"object.groupby@npm:^1.0.3": + version: 1.0.3 + resolution: "object.groupby@npm:1.0.3" dependencies: + call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/f23187b08d874ef1aea060118c8259eb7f99f93c15a50771d710569534119062b90e087b92952b2d0fb1bb8914d61fb0b43c57fb06f622aaad538fe6868ab987 + checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c languageName: node linkType: hard -"object.values@npm:^1.1.6, object.values@npm:^1.1.7, object.values@npm:^1.2.0": +"object.values@npm:^1.1.6, object.values@npm:^1.2.1": version: 1.2.1 resolution: "object.values@npm:1.2.1" dependencies: @@ -25130,6 +25168,13 @@ __metadata: languageName: node linkType: hard +"path-to-regexp@npm:0.1.10": + version: 0.1.10 + resolution: "path-to-regexp@npm:0.1.10" + checksum: 10c0/34196775b9113ca6df88e94c8d83ba82c0e1a2063dd33bfe2803a980da8d49b91db8104f49d5191b44ea780d46b8670ce2b7f4a5e349b0c48c6779b653f1afe4 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.12": version: 0.1.12 resolution: "path-to-regexp@npm:0.1.12" @@ -25137,13 +25182,6 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:0.1.7": - version: 0.1.7 - resolution: "path-to-regexp@npm:0.1.7" - checksum: 10c0/50a1ddb1af41a9e68bd67ca8e331a705899d16fb720a1ea3a41e310480948387daf603abb14d7b0826c58f10146d49050a1291ba6a82b78a382d1c02c0b8f905 - languageName: node - linkType: hard - "path-type@npm:^3.0.0": version: 3.0.0 resolution: "path-type@npm:3.0.0" @@ -25787,19 +25825,6 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-brace-style@npm:^0.6.2": - version: 0.6.2 - resolution: "prettier-plugin-brace-style@npm:0.6.2" - peerDependencies: - prettier: ^2 || ^3 - prettier-plugin-astro: "*" - peerDependenciesMeta: - prettier-plugin-astro: - optional: true - checksum: 10c0/cd64e2b6c01f267ec4a286f035cb26fcf5563c8ce9e46745c4150118bbc3e954ff7cc80d3753de4a5d880083eb82242be26abca21ed42cba9eb1b48aa80f2a9e - languageName: node - linkType: hard - "prettier-plugin-brace-style@npm:^0.8.1": version: 0.8.1 resolution: "prettier-plugin-brace-style@npm:0.8.1" @@ -25831,19 +25856,6 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-curly@npm:^0.2.2": - version: 0.2.2 - resolution: "prettier-plugin-curly@npm:0.2.2" - dependencies: - "@babel/generator": "npm:^7.23.6" - "@babel/parser": "npm:^7.22.5" - "@babel/traverse": "npm:^7.22.5" - peerDependencies: - prettier: ^2 || ^3 - checksum: 10c0/2354c0b22d16f4177b20028aff973c1630fd273001835ecc4af177805ebaa7ad165cf1238191d47393a31a62daba74336475fd724a8a84ec257c1c51530dad0f - languageName: node - linkType: hard - "prettier-plugin-curly@npm:^0.4.1": version: 0.4.1 resolution: "prettier-plugin-curly@npm:0.4.1" @@ -25853,27 +25865,17 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-jsdoc@npm:^1.3.0, prettier-plugin-jsdoc@npm:^1.5.0": - version: 1.5.0 - resolution: "prettier-plugin-jsdoc@npm:1.5.0" +"prettier-plugin-jsdoc@npm:^1.7.0": + version: 1.7.0 + resolution: "prettier-plugin-jsdoc@npm:1.7.0" dependencies: binary-searching: "npm:^2.0.5" comment-parser: "npm:^1.4.0" mdast-util-from-markdown: "npm:^2.0.0" + prettier-plugin-tailwindcss: "npm:^0.7.1" peerDependencies: prettier: ^3.0.0 - checksum: 10c0/574340657c87769e6b4dbbe08557136365f7e289514d9ecdec71a09f29e3192f68c09877eda77997c43fc64861d40ad8cf8dd3e741dddd104b570b0727dc9f7e - languageName: node - linkType: hard - -"prettier-plugin-merge@npm:^0.7.0": - version: 0.7.4 - resolution: "prettier-plugin-merge@npm:0.7.4" - dependencies: - diff: "npm:5.1.0" - peerDependencies: - prettier: ^2 || ^3 - checksum: 10c0/c27be2da703e3e503840295022f8917212f5d5e7af067e59918e323915823976e6bfd961b25035dd8aa5dc302f8212258d16f3bf986a78a9fce07bc35de1a688 + checksum: 10c0/bf28a72c135e88077fac95ce01c556caacadb1c07ff358e188e15d32232291d13b70a95495915df43ee28bba72c0a8d4a7b1b27320f5a75348028799fa0a843b languageName: node linkType: hard @@ -25888,7 +25890,65 @@ __metadata: languageName: node linkType: hard -"prettier@npm:*, prettier@npm:^3.5.3, prettier@npm:^3.6.2, prettier@npm:^3.7.1": +"prettier-plugin-tailwindcss@npm:^0.7.1": + version: 0.7.1 + resolution: "prettier-plugin-tailwindcss@npm:0.7.1" + peerDependencies: + "@ianvs/prettier-plugin-sort-imports": "*" + "@prettier/plugin-hermes": "*" + "@prettier/plugin-oxc": "*" + "@prettier/plugin-pug": "*" + "@shopify/prettier-plugin-liquid": "*" + "@trivago/prettier-plugin-sort-imports": "*" + "@zackad/prettier-plugin-twig": "*" + prettier: ^3.0 + prettier-plugin-astro: "*" + prettier-plugin-css-order: "*" + prettier-plugin-jsdoc: "*" + prettier-plugin-marko: "*" + prettier-plugin-multiline-arrays: "*" + prettier-plugin-organize-attributes: "*" + prettier-plugin-organize-imports: "*" + prettier-plugin-sort-imports: "*" + prettier-plugin-svelte: "*" + peerDependenciesMeta: + "@ianvs/prettier-plugin-sort-imports": + optional: true + "@prettier/plugin-hermes": + optional: true + "@prettier/plugin-oxc": + optional: true + "@prettier/plugin-pug": + optional: true + "@shopify/prettier-plugin-liquid": + optional: true + "@trivago/prettier-plugin-sort-imports": + optional: true + "@zackad/prettier-plugin-twig": + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-multiline-arrays: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-sort-imports: + optional: true + prettier-plugin-svelte: + optional: true + checksum: 10c0/915a0fdff68fd86f809719fef883a1eb314d2cdf0ef571d9547780d06815ad2158a30a101dd1476752c0975c370d3f1ca73643ced18bfa12647ca3f205a709e2 + languageName: node + linkType: hard + +"prettier@npm:*, prettier@npm:^3.7.1": version: 3.7.1 resolution: "prettier@npm:3.7.1" bin: @@ -26124,13 +26184,6 @@ __metadata: languageName: node linkType: hard -"property-expr@npm:^2.0.4": - version: 2.0.6 - resolution: "property-expr@npm:2.0.6" - checksum: 10c0/69b7da15038a1146d6447c69c445306f66a33c425271235bb20507f1846dbf9577a8f9dfafe8acbfcb66f924b270157f155248308f026a68758f35fc72265b3c - languageName: node - linkType: hard - "property-information@npm:^5.0.0": version: 5.6.0 resolution: "property-information@npm:5.6.0" @@ -26178,7 +26231,7 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.28, psl@npm:^1.1.33": +"psl@npm:^1.1.28": version: 1.15.0 resolution: "psl@npm:1.15.0" dependencies: @@ -26382,24 +26435,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.10.4": - version: 6.10.4 - resolution: "qs@npm:6.10.4" - dependencies: - side-channel: "npm:^1.0.4" - checksum: 10c0/7a8c9d77968aeccb769aedd7e047c0e0109dad0cfa57cab1ad906f4069fd58f361b80abd2de5854ba9a09b4c5d06d6a2c82108766f1f1527572fe6130deaa471 - languageName: node - linkType: hard - -"qs@npm:6.11.0": - version: 6.11.0 - resolution: "qs@npm:6.11.0" - dependencies: - side-channel: "npm:^1.0.4" - checksum: 10c0/4e4875e4d7c7c31c233d07a448e7e4650f456178b9dd3766b7cfa13158fdb24ecb8c4f059fa91e820dc6ab9f2d243721d071c9c0378892dcdad86e9e9a27c68f - languageName: node - linkType: hard - "qs@npm:6.13.0": version: 6.13.0 resolution: "qs@npm:6.13.0" @@ -26432,13 +26467,6 @@ __metadata: languageName: node linkType: hard -"querystringify@npm:^2.1.1": - version: 2.2.0 - resolution: "querystringify@npm:2.2.0" - checksum: 10c0/3258bc3dbdf322ff2663619afe5947c7926a6ef5fb78ad7d384602974c467fadfc8272af44f5eb8cddd0d011aae8fabf3a929a8eee4b86edcc0a21e6bd10f9aa - languageName: node - linkType: hard - "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -27243,7 +27271,7 @@ __metadata: languageName: node linkType: hard -"reflect.getprototypeof@npm:^1.0.4, reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": +"reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": version: 1.0.10 resolution: "reflect.getprototypeof@npm:1.0.10" dependencies: @@ -27300,7 +27328,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2, regexp.prototype.flags@npm:^1.5.3": +"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.3, regexp.prototype.flags@npm:^1.5.4": version: 1.5.4 resolution: "regexp.prototype.flags@npm:1.5.4" dependencies: @@ -28039,7 +28067,7 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.1.2, safe-array-concat@npm:^1.1.3": +"safe-array-concat@npm:^1.1.3": version: 1.1.3 resolution: "safe-array-concat@npm:1.1.3" dependencies: @@ -28083,7 +28111,7 @@ __metadata: languageName: node linkType: hard -"safe-regex-test@npm:^1.1.0": +"safe-regex-test@npm:^1.0.3, safe-regex-test@npm:^1.1.0": version: 1.1.0 resolution: "safe-regex-test@npm:1.1.0" dependencies: @@ -28306,32 +28334,30 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.6.0": - version: 7.6.0 - resolution: "semver@npm:7.6.0" - dependencies: - lru-cache: "npm:^6.0.0" +"semver@npm:7.6.3": + version: 7.6.3 + resolution: "semver@npm:7.6.3" bin: semver: bin/semver.js - checksum: 10c0/fbfe717094ace0aa8d6332d7ef5ce727259815bd8d8815700853f4faf23aacbd7192522f0dc5af6df52ef4fa85a355ebd2f5d39f554bd028200d6cf481ab9b53 + checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf languageName: node linkType: hard -"semver@npm:7.6.2": - version: 7.6.2 - resolution: "semver@npm:7.6.2" +"semver@npm:7.7.1": + version: 7.7.1 + resolution: "semver@npm:7.7.1" bin: semver: bin/semver.js - checksum: 10c0/97d3441e97ace8be4b1976433d1c32658f6afaff09f143e52c593bae7eef33de19e3e369c88bd985ce1042c6f441c80c6803078d1de2a9988080b66684cbb30c + checksum: 10c0/fd603a6fb9c399c6054015433051bdbe7b99a940a8fb44b85c2b524c4004b023d7928d47cb22154f8d054ea7ee8597f586605e05b52047f048278e4ac56ae958 languageName: node linkType: hard -"semver@npm:7.7.1": - version: 7.7.1 - resolution: "semver@npm:7.7.1" +"semver@npm:7.7.2": + version: 7.7.2 + resolution: "semver@npm:7.7.2" bin: semver: bin/semver.js - checksum: 10c0/fd603a6fb9c399c6054015433051bdbe7b99a940a8fb44b85c2b524c4004b023d7928d47cb22154f8d054ea7ee8597f586605e05b52047f048278e4ac56ae958 + checksum: 10c0/aca305edfbf2383c22571cb7714f48cadc7ac95371b4b52362fb8eeffdfbc0de0669368b82b2b15978f8848f01d7114da65697e56cd8c37b0dab8c58e543f9ea languageName: node linkType: hard @@ -28344,7 +28370,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.2.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3, semver@npm:^7.7.1, semver@npm:^7.7.2, semver@npm:^7.7.3": +"semver@npm:^7.0.0, semver@npm:^7.2.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3, semver@npm:^7.7.1, semver@npm:^7.7.3": version: 7.7.3 resolution: "semver@npm:7.7.3" bin: @@ -28353,27 +28379,6 @@ __metadata: languageName: node linkType: hard -"send@npm:0.18.0": - version: 0.18.0 - resolution: "send@npm:0.18.0" - dependencies: - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - mime: "npm:1.6.0" - ms: "npm:2.1.3" - on-finished: "npm:2.4.1" - range-parser: "npm:~1.2.1" - statuses: "npm:2.0.1" - checksum: 10c0/0eb134d6a51fc13bbcb976a1f4214ea1e33f242fae046efc311e80aff66c7a43603e26a79d9d06670283a13000e51be6e0a2cb80ff0942eaf9f1cd30b7ae736a - languageName: node - linkType: hard - "send@npm:0.19.0": version: 0.19.0 resolution: "send@npm:0.19.0" @@ -28419,18 +28424,6 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:1.15.0": - version: 1.15.0 - resolution: "serve-static@npm:1.15.0" - dependencies: - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - parseurl: "npm:~1.3.3" - send: "npm:0.18.0" - checksum: 10c0/fa9f0e21a540a28f301258dfe1e57bb4f81cd460d28f0e973860477dd4acef946a1f41748b5bd41c73b621bea2029569c935faa38578fd34cd42a9b4947088ba - languageName: node - linkType: hard - "serve-static@npm:1.16.2, serve-static@npm:^1.15.0": version: 1.16.2 resolution: "serve-static@npm:1.16.2" @@ -28464,7 +28457,7 @@ __metadata: languageName: node linkType: hard -"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": +"set-function-name@npm:^2.0.2": version: 2.0.2 resolution: "set-function-name@npm:2.0.2" dependencies: @@ -29148,7 +29141,7 @@ __metadata: languageName: node linkType: hard -"sshpk@npm:^1.14.1, sshpk@npm:^1.7.0": +"sshpk@npm:^1.18.0, sshpk@npm:^1.7.0": version: 1.18.0 resolution: "sshpk@npm:1.18.0" dependencies: @@ -29256,7 +29249,7 @@ __metadata: languageName: node linkType: hard -"stop-iteration-iterator@npm:^1.0.0": +"stop-iteration-iterator@npm:^1.0.0, stop-iteration-iterator@npm:^1.1.0": version: 1.1.0 resolution: "stop-iteration-iterator@npm:1.1.0" dependencies: @@ -29277,7 +29270,7 @@ __metadata: version: 0.0.0-use.local resolution: "storybook-addon-pseudo-states@workspace:code/addons/pseudo-states" dependencies: - "@storybook/icons": "npm:^2.0.0" + "@storybook/icons": "npm:^2.0.1" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" typescript: "npm:^5.8.3" @@ -29291,11 +29284,11 @@ __metadata: resolution: "storybook@workspace:code/core" dependencies: "@aw-web-design/x-default-browser": "npm:1.4.126" - "@babel/core": "npm:^7.26.9" - "@babel/generator": "npm:^7.26.9" - "@babel/parser": "npm:^7.26.9" - "@babel/traverse": "npm:^7.26.9" - "@babel/types": "npm:^7.26.8" + "@babel/core": "npm:^7.28.5" + "@babel/generator": "npm:^7.28.5" + "@babel/parser": "npm:^7.28.5" + "@babel/traverse": "npm:^7.28.5" + "@babel/types": "npm:^7.28.5" "@clack/prompts": "npm:1.0.0-alpha.7" "@devtools-ds/object-inspector": "npm:^1.1.2" "@discoveryjs/json-ext": "npm:^0.5.3" @@ -29320,7 +29313,7 @@ __metadata: "@rolldown/pluginutils": "npm:1.0.0-beta.18" "@storybook/docs-mdx": "npm:4.0.0-next.1" "@storybook/global": "npm:^5.0.0" - "@storybook/icons": "npm:^2.0.0" + "@storybook/icons": "npm:^2.0.1" "@tanstack/react-virtual": "npm:^3.3.0" "@testing-library/dom": "npm:^10.4.1" "@testing-library/jest-dom": "npm:^6.6.3" @@ -29331,14 +29324,14 @@ __metadata: "@types/diff": "npm:^5.0.9" "@types/ejs": "npm:^3.1.1" "@types/js-yaml": "npm:^4.0.5" - "@types/node": "npm:^22.0.0" + "@types/node": "npm:^22.19.1" "@types/npmlog": "npm:^7.0.0" "@types/picomatch": "npm:^2.3.0" "@types/prettier": "npm:^3.0.0" "@types/pretty-hrtime": "npm:^1.0.0" "@types/prompts": "npm:^2.0.9" "@types/react-syntax-highlighter": "npm:11.0.5" - "@types/semver": "npm:^7.5.8" + "@types/semver": "npm:^7.7.1" "@types/ws": "npm:^8" "@vitest/expect": "npm:3.2.4" "@vitest/spy": "npm:3.2.4" @@ -29370,8 +29363,8 @@ __metadata: flush-promises: "npm:^1.0.2" fuse.js: "npm:^3.6.1" get-npm-tarball-url: "npm:^2.0.3" - glob: "npm:^10.0.0" - globby: "npm:^14.0.1" + glob: "npm:^10.5.0" + globby: "npm:^14.1.0" jiti: "npm:^2.4.2" js-yaml: "npm:^4.1.0" jsdoc-type-pratt-parser: "npm:^4.0.0" @@ -29391,7 +29384,7 @@ __metadata: picoquery: "npm:^1.4.0" polished: "npm:^4.2.2" polka: "npm:^1.0.0-next.28" - prettier: "npm:^3.5.3" + prettier: "npm:^3.7.1" pretty-hrtime: "npm:^1.0.3" qrcode.react: "npm:^4.2.0" react: "npm:^18.2.0" @@ -29407,7 +29400,7 @@ __metadata: require-from-string: "npm:^2.0.2" resolve: "npm:^1.22.11" resolve.exports: "npm:^2.0.3" - semver: "npm:^7.6.2" + semver: "npm:^7.7.3" sirv: "npm:^2.0.4" slash: "npm:^5.0.0" source-map: "npm:^0.7.4" @@ -29427,7 +29420,7 @@ __metadata: watchpack: "npm:^2.2.0" wrap-ansi: "npm:^9.0.2" ws: "npm:^8.18.0" - zod: "npm:^3.24.1" + zod: "npm:^3.25.76" peerDependencies: prettier: ^2 || ^3 peerDependenciesMeta: @@ -29542,23 +29535,45 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.11": - version: 4.0.11 - resolution: "string.prototype.matchall@npm:4.0.11" +"string.prototype.includes@npm:^2.0.1": + version: 2.0.1 + resolution: "string.prototype.includes@npm:2.0.1" dependencies: call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" + es-abstract: "npm:^1.23.3" + checksum: 10c0/25ce9c9b49128352a2618fbe8758b46f945817a58a4420f4799419e40a8d28f116e176c7590d767d5327a61e75c8f32c86171063f48e389b9fdd325f1bd04ee5 + languageName: node + linkType: hard + +"string.prototype.matchall@npm:^4.0.12": + version: 4.0.12 + resolution: "string.prototype.matchall@npm:4.0.12" + dependencies: + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.3" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.6" es-errors: "npm:^1.3.0" es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - regexp.prototype.flags: "npm:^1.5.2" + get-intrinsic: "npm:^1.2.6" + gopd: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + internal-slot: "npm:^1.1.0" + regexp.prototype.flags: "npm:^1.5.3" set-function-name: "npm:^2.0.2" - side-channel: "npm:^1.0.6" - checksum: 10c0/915a2562ac9ab5e01b7be6fd8baa0b2b233a0a9aa975fcb2ec13cc26f08fb9a3e85d5abdaa533c99c6fc4c5b65b914eba3d80c4aff9792a4c9fed403f28f7d9d + side-channel: "npm:^1.1.0" + checksum: 10c0/1a53328ada73f4a77f1fdf1c79414700cf718d0a8ef6672af5603e709d26a24f2181208144aed7e858b1bcc1a0d08567a570abfb45567db4ae47637ed2c2f85c + languageName: node + linkType: hard + +"string.prototype.repeat@npm:^1.0.0": + version: 1.0.0 + resolution: "string.prototype.repeat@npm:1.0.0" + dependencies: + define-properties: "npm:^1.1.3" + es-abstract: "npm:^1.17.5" + checksum: 10c0/94c7978566cffa1327d470fd924366438af9b04b497c43a9805e476e2e908aa37a1fd34cc0911156c17556dab62159d12c7b92b3cc304c3e1281fe4c8e668f40 languageName: node linkType: hard @@ -29962,13 +29977,12 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.8.6": - version: 0.8.8 - resolution: "synckit@npm:0.8.8" +"synckit@npm:^0.11.7": + version: 0.11.11 + resolution: "synckit@npm:0.11.11" dependencies: - "@pkgr/core": "npm:^0.1.0" - tslib: "npm:^2.6.2" - checksum: 10c0/c3d3aa8e284f3f84f2f868b960c9f49239b364e35f6d20825a448449a3e9c8f49fe36cdd5196b30615682f007830d46f2ea354003954c7336723cb821e4b6519 + "@pkgr/core": "npm:^0.2.9" + checksum: 10c0/f0761495953d12d94a86edf6326b3a565496c72f9b94c02549b6961fb4d999f4ca316ce6b3eb8ed2e4bfc5056a8de65cda0bd03a233333a35221cd2fdc0e196b languageName: node linkType: hard @@ -30317,6 +30331,24 @@ __metadata: languageName: node linkType: hard +"tldts-core@npm:^6.1.86": + version: 6.1.86 + resolution: "tldts-core@npm:6.1.86" + checksum: 10c0/8133c29375f3f99f88fce5f4d62f6ecb9532b106f31e5423b27c1eb1b6e711bd41875184a456819ceaed5c8b94f43911b1ad57e25c6eb86e1fc201228ff7e2af + languageName: node + linkType: hard + +"tldts@npm:^6.1.32": + version: 6.1.86 + resolution: "tldts@npm:6.1.86" + dependencies: + tldts-core: "npm:^6.1.86" + bin: + tldts: bin/cli.js + checksum: 10c0/27ae7526d9d78cb97b2de3f4d102e0b4321d1ccff0648a7bb0e039ed54acbce86bacdcd9cd3c14310e519b457854e7bafbef1f529f58a1e217a737ced63f0940 + languageName: node + linkType: hard + "tmp@npm:0.0.28": version: 0.0.28 resolution: "tmp@npm:0.0.28" @@ -30390,13 +30422,6 @@ __metadata: languageName: node linkType: hard -"toposort@npm:^2.0.2": - version: 2.0.2 - resolution: "toposort@npm:2.0.2" - checksum: 10c0/ab9ca91fce4b972ccae9e2f539d755bf799a0c7eb60da07fd985fce0f14c159ed1e92305ff55697693b5bc13e300f5417db90e2593b127d421c9f6c440950222 - languageName: node - linkType: hard - "totalist@npm:^3.0.0": version: 3.0.1 resolution: "totalist@npm:3.0.1" @@ -30404,15 +30429,12 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^4.1.3": - version: 4.1.4 - resolution: "tough-cookie@npm:4.1.4" +"tough-cookie@npm:^5.0.0": + version: 5.1.2 + resolution: "tough-cookie@npm:5.1.2" dependencies: - psl: "npm:^1.1.33" - punycode: "npm:^2.1.1" - universalify: "npm:^0.2.0" - url-parse: "npm:^1.5.3" - checksum: 10c0/aca7ff96054f367d53d1e813e62ceb7dd2eda25d7752058a74d64b7266fd07be75908f3753a32ccf866a2f997604b414cfb1916d6e7f69bc64d9d9939b0d6c45 + tldts: "npm:^6.1.32" + checksum: 10c0/5f95023a47de0f30a902bba951664b359725597d8adeabc66a0b93a931c3af801e1e697dae4b8c21a012056c0ea88bd2bf4dfe66b2adcf8e2f42cd9796fe0626 languageName: node linkType: hard @@ -31055,13 +31077,6 @@ __metadata: languageName: node linkType: hard -"universalify@npm:^0.2.0": - version: 0.2.0 - resolution: "universalify@npm:0.2.0" - checksum: 10c0/cedbe4d4ca3967edf24c0800cfc161c5a15e240dac28e3ce575c689abc11f2c81ccc6532c8752af3b40f9120fb5e454abecd359e164f4f6aa44c29cd37e194fe - languageName: node - linkType: hard - "universalify@npm:^2.0.0": version: 2.0.1 resolution: "universalify@npm:2.0.1" @@ -31209,16 +31224,6 @@ __metadata: languageName: node linkType: hard -"url-parse@npm:^1.5.3": - version: 1.5.10 - resolution: "url-parse@npm:1.5.10" - dependencies: - querystringify: "npm:^2.1.1" - requires-port: "npm:^1.0.0" - checksum: 10c0/bd5aa9389f896974beb851c112f63b466505a04b4807cea2e5a3b7092f6fbb75316f0491ea84e44f66fed55f1b440df5195d7e3a8203f64fcefa19d182f5be87 - languageName: node - linkType: hard - "url@npm:^0.11.0": version: 0.11.4 resolution: "url@npm:0.11.4" @@ -31418,13 +31423,6 @@ __metadata: languageName: node linkType: hard -"validator@npm:13.11.0": - version: 13.11.0 - resolution: "validator@npm:13.11.0" - checksum: 10c0/0107da3add5a4ebc6391dac103c55f6d8ed055bbcc29a4c9cbf89eacfc39ba102a5618c470bdc33c6487d30847771a892134a8c791f06ef0962dd4b7a60ae0f5 - languageName: node - linkType: hard - "validator@npm:13.12.0": version: 13.12.0 resolution: "validator@npm:13.12.0" @@ -31439,70 +31437,71 @@ __metadata: languageName: node linkType: hard -"verdaccio-audit@npm:12.0.0-next-7.16": - version: 12.0.0-next-7.16 - resolution: "verdaccio-audit@npm:12.0.0-next-7.16" +"verdaccio-audit@npm:13.0.0-next-8.1": + version: 13.0.0-next-8.1 + resolution: "verdaccio-audit@npm:13.0.0-next-8.1" dependencies: - "@verdaccio/config": "npm:7.0.0-next-7.16" - "@verdaccio/core": "npm:7.0.0-next-7.16" - express: "npm:4.19.2" + "@verdaccio/config": "npm:8.0.0-next-8.1" + "@verdaccio/core": "npm:8.0.0-next-8.1" + express: "npm:4.21.0" https-proxy-agent: "npm:5.0.1" node-fetch: "npm:cjs" - checksum: 10c0/9584d9093922a99cb0d6da35393cd66ea4f68ca7ed8181af7628416d0f6be479a9eb705b0ab65918d21e1e4df5032b8d55001087539caa8bdb2728fcf303d24f + checksum: 10c0/ddb54a8a01f75a45971fdde9e14f6d1e378331eab0643dab0d6dd661fec14279e03ba038e2334fa5ea5ca09fcd6f85633c19d3cc54ac3467d364b90d963dfefb languageName: node linkType: hard -"verdaccio-auth-memory@npm:^10.2.2": - version: 10.2.2 - resolution: "verdaccio-auth-memory@npm:10.2.2" +"verdaccio-auth-memory@npm:^10.3.1": + version: 10.3.1 + resolution: "verdaccio-auth-memory@npm:10.3.1" dependencies: - "@verdaccio/commons-api": "npm:10.2.0" - checksum: 10c0/12d11719b6b4fb661af1daf3feb1b95ef6f0c26b214864d74c6378dfa74bff3642896759447c7f8be725dda41ebc5a4f6cc1562e0710038f26a32f195e0d12b7 + "@verdaccio/core": "npm:8.0.0-next-8.21" + debug: "npm:4.3.4" + checksum: 10c0/5a1a1bec3135f33c18722bd97d2f96de3715b11bb389d606cdf2abea20a4ead9ec4ff01aac259b8392bc6bd58efff96c4ed5e4e54bb6e561ede6670e5c2d764d languageName: node linkType: hard -"verdaccio-htpasswd@npm:12.0.0-next-7.16": - version: 12.0.0-next-7.16 - resolution: "verdaccio-htpasswd@npm:12.0.0-next-7.16" +"verdaccio-htpasswd@npm:13.0.0-next-8.1": + version: 13.0.0-next-8.1 + resolution: "verdaccio-htpasswd@npm:13.0.0-next-8.1" dependencies: - "@verdaccio/core": "npm:7.0.0-next-7.16" - "@verdaccio/file-locking": "npm:12.0.0-next.1" + "@verdaccio/core": "npm:8.0.0-next-8.1" + "@verdaccio/file-locking": "npm:13.0.0-next-8.0" apache-md5: "npm:1.1.8" bcryptjs: "npm:2.4.3" - core-js: "npm:3.35.0" - debug: "npm:4.3.4" + core-js: "npm:3.37.1" + debug: "npm:4.3.7" http-errors: "npm:2.0.0" unix-crypt-td-js: "npm:1.1.4" - checksum: 10c0/f17166a9a8ab95ddb7e1e1cd228dbe247e0b4d13c4bfc73c2a998f8f05bcd48d310920d6347a329a5feb2c33e73f4bb0550c2a2e842d46d62943a036915ca268 + checksum: 10c0/327e02a544e2552ed87c34a56dfe8513c72f834bba5538343421dde7ef404e518e2f84bfa6eb87dc9b56c44f0d6665fbd1ebbe4b5ee92ee8e0864782be0e8f37 languageName: node linkType: hard -"verdaccio@npm:^5.31.1": - version: 5.31.1 - resolution: "verdaccio@npm:5.31.1" +"verdaccio@npm:^5.33.0": + version: 5.33.0 + resolution: "verdaccio@npm:5.33.0" dependencies: - "@cypress/request": "npm:3.0.1" - "@verdaccio/auth": "npm:7.0.0-next-7.16" - "@verdaccio/config": "npm:7.0.0-next-7.16" - "@verdaccio/core": "npm:7.0.0-next-7.16" + "@cypress/request": "npm:3.0.6" + "@verdaccio/auth": "npm:8.0.0-next-8.1" + "@verdaccio/config": "npm:8.0.0-next-8.1" + "@verdaccio/core": "npm:8.0.0-next-8.1" "@verdaccio/local-storage-legacy": "npm:11.0.2" - "@verdaccio/logger-7": "npm:7.0.0-next-7.16" - "@verdaccio/middleware": "npm:7.0.0-next-7.16" - "@verdaccio/search-indexer": "npm:7.0.0-next-7.2" - "@verdaccio/signature": "npm:7.0.0-next-7.5" + "@verdaccio/logger-7": "npm:8.0.0-next-8.1" + "@verdaccio/middleware": "npm:8.0.0-next-8.1" + "@verdaccio/search-indexer": "npm:8.0.0-next-8.0" + "@verdaccio/signature": "npm:8.0.0-next-8.0" "@verdaccio/streams": "npm:10.2.1" - "@verdaccio/tarball": "npm:12.0.0-next-7.16" - "@verdaccio/ui-theme": "npm:7.0.0-next-7.16" - "@verdaccio/url": "npm:12.0.0-next-7.16" - "@verdaccio/utils": "npm:7.0.0-next-7.16" + "@verdaccio/tarball": "npm:13.0.0-next-8.1" + "@verdaccio/ui-theme": "npm:8.0.0-next-8.1" + "@verdaccio/url": "npm:13.0.0-next-8.1" + "@verdaccio/utils": "npm:7.0.1-next-8.1" JSONStream: "npm:1.3.5" - async: "npm:3.2.5" - clipanion: "npm:3.2.1" - compression: "npm:1.7.4" + async: "npm:3.2.6" + clipanion: "npm:4.0.0-rc.4" + compression: "npm:1.7.5" cors: "npm:2.8.5" - debug: "npm:^4.3.4" - envinfo: "npm:7.13.0" - express: "npm:4.19.2" + debug: "npm:^4.3.7" + envinfo: "npm:7.14.0" + express: "npm:4.21.1" express-rate-limit: "npm:5.5.1" fast-safe-stringify: "npm:2.1.1" handlebars: "npm:4.7.8" @@ -31515,13 +31514,13 @@ __metadata: mkdirp: "npm:1.0.4" mv: "npm:2.1.1" pkginfo: "npm:0.4.1" - semver: "npm:7.6.2" + semver: "npm:7.6.3" validator: "npm:13.12.0" - verdaccio-audit: "npm:12.0.0-next-7.16" - verdaccio-htpasswd: "npm:12.0.0-next-7.16" + verdaccio-audit: "npm:13.0.0-next-8.1" + verdaccio-htpasswd: "npm:13.0.0-next-8.1" bin: verdaccio: bin/verdaccio - checksum: 10c0/77509f113d6c084f61b6c3ae4d78843ee7fb34c66450702f09c278e4164723783657f542febf83653a1f9fbe5648f1bcff47c3ceb475544ffafec5c2bb6fa140 + checksum: 10c0/c0cc76cc8197db52a2b929a334edfcbd71cfd3a39789ede294e13cb586d7fb4ac5b0655247aaa413ea0b4363d6190eed6f00b79bdd6af3190737f87df20d6c82 languageName: node linkType: hard @@ -32568,7 +32567,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18, which-typed-array@npm:^1.1.2": +"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.19, which-typed-array@npm:^1.1.2": version: 1.1.19 resolution: "which-typed-array@npm:1.1.19" dependencies: @@ -32881,7 +32880,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.0.0, yaml@npm:^2.3.1, yaml@npm:^2.6.0, yaml@npm:^2.7.0, yaml@npm:^2.8.0, yaml@npm:^2.8.1": +"yaml@npm:^2.0.0, yaml@npm:^2.6.0, yaml@npm:^2.7.0, yaml@npm:^2.8.1": version: 2.8.1 resolution: "yaml@npm:2.8.1" bin: @@ -33001,21 +33000,6 @@ __metadata: languageName: node linkType: hard -"yup@npm:0.32.11": - version: 0.32.11 - resolution: "yup@npm:0.32.11" - dependencies: - "@babel/runtime": "npm:^7.15.4" - "@types/lodash": "npm:^4.14.175" - lodash: "npm:^4.17.21" - lodash-es: "npm:^4.17.21" - nanoclone: "npm:^0.2.1" - property-expr: "npm:^2.0.4" - toposort: "npm:^2.0.2" - checksum: 10c0/f0802798dc64b49f313886b983a9bea5f283e2094ee2aa1197587b84f50ac5b5d03af99857c313139e63dc02558fac3aaa343503bdbffa96f70006b39d1f59c9 - languageName: node - linkType: hard - "zimmerframe@npm:^1.1.2": version: 1.1.4 resolution: "zimmerframe@npm:1.1.4" @@ -33039,7 +33023,7 @@ __metadata: languageName: node linkType: hard -"zod@npm:^3.22.4, zod@npm:^3.23.8, zod@npm:^3.24.1": +"zod@npm:^3.22.4, zod@npm:^3.25.76": version: 3.25.76 resolution: "zod@npm:3.25.76" checksum: 10c0/5718ec35e3c40b600316c5b4c5e4976f7fee68151bc8f8d90ec18a469be9571f072e1bbaace10f1e85cf8892ea12d90821b200e980ab46916a6166a4260a983c From 320457fd5c9321f89e46f3ea53f4c2f68534915f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 21:51:31 +0100 Subject: [PATCH 083/310] Refactor CircleCI configuration by simplifying node installation steps and updating the command for generating config to use npx instead of yarn. This change enhances clarity and reduces verbosity in the CI setup. --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 418d23fe21e4..859dbc55f33a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,17 +34,17 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1' - - node/install: - install-yarn: true - - node/install-packages: - app-dir: . - cache-only-lockfile: true - pkg-manager: yarn + - node/install + # - node/install: + # install-yarn: true + # - node/install-packages: + # cache-only-lockfile: true + # pkg-manager: yarn - run: name: Generate config command: | - yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> + npx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> # https://circleci.com/developer/orbs/orb/circleci/continuation - continuation/continue: From 703f39487c9551ac94a0955894e910b8e8f5ef4b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 21:53:40 +0100 Subject: [PATCH 084/310] Refactor CircleCI configuration to update executor settings and streamline node installation steps. The command for generating config has been modified to use yarn dlx for improved clarity and efficiency in the CI process. --- .circleci/config.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 859dbc55f33a..47c63004464b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,25 +30,21 @@ parameters: jobs: generate-and-run-config: - executor: continuation/default + executor: + name: node/default + class: medium steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1' - - node/install - # - node/install: - # install-yarn: true - # - node/install-packages: - # cache-only-lockfile: true - # pkg-manager: yarn - + - node/install: + install-yarn: true + - node/install-packages: + cache-only-lockfile: true + pkg-manager: yarn - run: name: Generate config command: | - npx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> - - # https://circleci.com/developer/orbs/orb/circleci/continuation - - continuation/continue: - configuration_path: .circleci/config.generated.yml + yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1' workflows: setup: jobs: From 40ecf23171940f386c355672841572f15cdb0d27 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 21:54:43 +0100 Subject: [PATCH 085/310] Update CircleCI configuration to correct resource_class syntax for executor settings, enhancing clarity in the CI setup. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 47c63004464b..ab58c5bf44ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ jobs: generate-and-run-config: executor: name: node/default - class: medium + resource_class: medium steps: - node/install: install-yarn: true From 8da688e621cf60e743cc836cdf53747e8dffd385 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 21:58:04 +0100 Subject: [PATCH 086/310] Update CircleCI configuration to include app directory specification for package installation and remove redundant shallow clone step, improving clarity and efficiency in the CI process. --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab58c5bf44ce..2953d80cdf5f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,15 +36,16 @@ jobs: steps: - node/install: install-yarn: true + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1' - node/install-packages: + app-dir: . cache-only-lockfile: true pkg-manager: yarn - run: name: Generate config command: | yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1' workflows: setup: jobs: From bc2ffbc1bb72b22ac54ea5bf10ad58bac5323f64 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:11:18 +0100 Subject: [PATCH 087/310] Update CircleCI configuration to switch from Yarn to PNPM for package installation, enhancing consistency in the CI process and streamlining the command for generating configuration. --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2953d80cdf5f..4e2e1b51a4e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,17 +35,17 @@ jobs: resource_class: medium steps: - node/install: - install-yarn: true + install-pnpm: true - git-shallow-clone/checkout_advanced: clone_options: '--depth 1' - node/install-packages: app-dir: . cache-only-lockfile: true - pkg-manager: yarn + pkg-manager: pnpm - run: name: Generate config command: | - yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> + pnpx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> workflows: setup: jobs: From 1ca923decfdc65fc72c98a983cea23fa8be171d1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:21:44 +0100 Subject: [PATCH 088/310] Add Corepack setup in CircleCI configuration to prepare PNPM --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e2e1b51a4e6..7994162f577b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,6 +42,10 @@ jobs: app-dir: . cache-only-lockfile: true pkg-manager: pnpm + - run: + name: Corepack + command: | + corepack prepare pnpm@latest --activate - run: name: Generate config command: | From 034e98dc25b24935b5f690d9e5fef81468378c1d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:24:14 +0100 Subject: [PATCH 089/310] Refactor CircleCI configuration to reinstate node package installation step after Corepack setup, ensuring proper package management with PNPM. --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7994162f577b..55a6800eddd8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,14 +38,14 @@ jobs: install-pnpm: true - git-shallow-clone/checkout_advanced: clone_options: '--depth 1' - - node/install-packages: - app-dir: . - cache-only-lockfile: true - pkg-manager: pnpm - run: name: Corepack command: | corepack prepare pnpm@latest --activate + - node/install-packages: + app-dir: . + cache-only-lockfile: true + pkg-manager: pnpm - run: name: Generate config command: | From e8b45d81eac2592328543472e15b2598cbd4ee01 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:28:58 +0100 Subject: [PATCH 090/310] Update CircleCI configuration to switch package manager from PNPM to Yarn, adjusting the resource class and command for generating configuration to enhance clarity and efficiency in the CI process. --- .circleci/config.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 55a6800eddd8..23f63f57d990 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,24 +32,20 @@ jobs: generate-and-run-config: executor: name: node/default - resource_class: medium + resource_class: medium+ steps: - node/install: - install-pnpm: true + install-yarn: true - git-shallow-clone/checkout_advanced: clone_options: '--depth 1' - - run: - name: Corepack - command: | - corepack prepare pnpm@latest --activate - node/install-packages: app-dir: . cache-only-lockfile: true - pkg-manager: pnpm + pkg-manager: yarn - run: name: Generate config command: | - pnpx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> + yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> workflows: setup: jobs: From 18c4d526aec42f4453516f615d129b9fe8a53023 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:38:42 +0100 Subject: [PATCH 091/310] Update CircleCI configuration to change executor to continuation/default and add continuation step for configuration generation, improving CI workflow management. --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23f63f57d990..ee836f104385 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,9 +30,7 @@ parameters: jobs: generate-and-run-config: - executor: - name: node/default - resource_class: medium+ + executor: continuation/default steps: - node/install: install-yarn: true @@ -46,6 +44,8 @@ jobs: name: Generate config command: | yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> + - continuation/continue: + configuration_path: .circleci/config.generated.yml workflows: setup: jobs: From 3756f4776d9e6e0c125d74a18a536603880845ac Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:40:24 +0100 Subject: [PATCH 092/310] Update CircleCI configuration to modify executor settings by adding resource_class for improved resource allocation during CI jobs. --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ee836f104385..b9deb0a106e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,9 @@ parameters: jobs: generate-and-run-config: - executor: continuation/default + executor: + name: continuation/default + resource_class: medium+ steps: - node/install: install-yarn: true From 9fce181d3bba34f51da7dfc2000a9ac5a52c5c6d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:45:45 +0100 Subject: [PATCH 093/310] Update CircleCI configuration to change executor from continuation/default to node/default, ensuring compatibility with the current CI environment. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b9deb0a106e4..70a9a489dbfc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ parameters: jobs: generate-and-run-config: executor: - name: continuation/default + name: node/default resource_class: medium+ steps: - node/install: From 7a47bd90edaa78f8d12c79d4f0f958b104c65707 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 22:52:50 +0100 Subject: [PATCH 094/310] Refactor CircleCI configuration to update working directories and paths, changing from /tmp to relative paths for improved clarity and consistency in CI jobs. --- .circleci/config.generated.yml | 222 ++++++++++++++++----------------- scripts/ci/utils.ts | 6 +- 2 files changed, 114 insertions(+), 114 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index d8859e02378e..42c852634ec8 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -60,7 +60,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: storybook sb_node_22_browsers: docker: - environment: @@ -78,7 +78,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: storybook sb_node_22_classic: docker: - environment: @@ -96,7 +96,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: storybook sb_playwright: docker: - environment: @@ -114,7 +114,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: storybook parameters: ghBaseBranch: default: next @@ -144,7 +144,7 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - node/install-packages: - app-dir: /tmp/storybook + app-dir: storybook pkg-manager: yarn cache-only-lockfile: true - save_cache: @@ -165,101 +165,101 @@ jobs: - run: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile - working_directory: /tmp/storybook/code + working_directory: storybook/code - run: command: yarn local-registry --publish name: Publish to Verdaccio - working_directory: /tmp/storybook/code + working_directory: storybook/code - report-workflow-on-failure - store_artifacts: - path: /tmp/storybook/code/bench/esbuild-metafiles + path: storybook/code/bench/esbuild-metafiles destination: bench - persist_to_workspace: paths: - - /tmp/storybook/code/core/dist - - /tmp/storybook/code/core/node_modules - - /tmp/storybook/code/addons/a11y/dist - - /tmp/storybook/code/addons/a11y/node_modules - - /tmp/storybook/code/addons/docs/dist - - /tmp/storybook/code/addons/docs/node_modules - - /tmp/storybook/code/addons/links/dist - - /tmp/storybook/code/addons/links/node_modules - - /tmp/storybook/code/addons/onboarding/dist - - /tmp/storybook/code/addons/onboarding/node_modules - - /tmp/storybook/code/addons/pseudo-states/dist - - /tmp/storybook/code/addons/pseudo-states/node_modules - - /tmp/storybook/code/addons/themes/dist - - /tmp/storybook/code/addons/themes/node_modules - - /tmp/storybook/code/addons/vitest/dist - - /tmp/storybook/code/addons/vitest/node_modules - - /tmp/storybook/code/builders/builder-vite/dist - - /tmp/storybook/code/builders/builder-vite/node_modules - - /tmp/storybook/code/builders/builder-webpack5/dist - - /tmp/storybook/code/builders/builder-webpack5/node_modules - - /tmp/storybook/code/frameworks/angular/dist - - /tmp/storybook/code/frameworks/angular/node_modules - - /tmp/storybook/code/frameworks/ember/dist - - /tmp/storybook/code/frameworks/ember/node_modules - - /tmp/storybook/code/frameworks/html-vite/dist - - /tmp/storybook/code/frameworks/html-vite/node_modules - - /tmp/storybook/code/frameworks/nextjs/dist - - /tmp/storybook/code/frameworks/nextjs/node_modules - - /tmp/storybook/code/frameworks/nextjs-vite/dist - - /tmp/storybook/code/frameworks/nextjs-vite/node_modules - - /tmp/storybook/code/frameworks/preact-vite/dist - - /tmp/storybook/code/frameworks/preact-vite/node_modules - - /tmp/storybook/code/frameworks/react-native-web-vite/dist - - /tmp/storybook/code/frameworks/react-native-web-vite/node_modules - - /tmp/storybook/code/frameworks/react-vite/dist - - /tmp/storybook/code/frameworks/react-vite/node_modules - - /tmp/storybook/code/frameworks/react-webpack5/dist - - /tmp/storybook/code/frameworks/react-webpack5/node_modules - - /tmp/storybook/code/frameworks/server-webpack5/dist - - /tmp/storybook/code/frameworks/server-webpack5/node_modules - - /tmp/storybook/code/frameworks/svelte-vite/dist - - /tmp/storybook/code/frameworks/svelte-vite/node_modules - - /tmp/storybook/code/frameworks/sveltekit/dist - - /tmp/storybook/code/frameworks/sveltekit/node_modules - - /tmp/storybook/code/frameworks/vue3-vite/dist - - /tmp/storybook/code/frameworks/vue3-vite/node_modules - - /tmp/storybook/code/frameworks/web-components-vite/dist - - /tmp/storybook/code/frameworks/web-components-vite/node_modules - - /tmp/storybook/code/lib/cli-storybook/dist - - /tmp/storybook/code/lib/cli-storybook/node_modules - - /tmp/storybook/code/lib/codemod/dist - - /tmp/storybook/code/lib/codemod/node_modules - - /tmp/storybook/code/lib/core-webpack/dist - - /tmp/storybook/code/lib/core-webpack/node_modules - - /tmp/storybook/code/lib/create-storybook/dist - - /tmp/storybook/code/lib/create-storybook/node_modules - - /tmp/storybook/code/lib/csf-plugin/dist - - /tmp/storybook/code/lib/csf-plugin/node_modules - - /tmp/storybook/code/lib/eslint-plugin/dist - - /tmp/storybook/code/lib/eslint-plugin/node_modules - - /tmp/storybook/code/lib/react-dom-shim/dist - - /tmp/storybook/code/lib/react-dom-shim/node_modules - - /tmp/storybook/code/presets/create-react-app/dist - - /tmp/storybook/code/presets/create-react-app/node_modules - - /tmp/storybook/code/presets/react-webpack/dist - - /tmp/storybook/code/presets/react-webpack/node_modules - - /tmp/storybook/code/presets/server-webpack/dist - - /tmp/storybook/code/presets/server-webpack/node_modules - - /tmp/storybook/code/renderers/html/dist - - /tmp/storybook/code/renderers/html/node_modules - - /tmp/storybook/code/renderers/preact/dist - - /tmp/storybook/code/renderers/preact/node_modules - - /tmp/storybook/code/renderers/react/dist - - /tmp/storybook/code/renderers/react/node_modules - - /tmp/storybook/code/renderers/server/dist - - /tmp/storybook/code/renderers/server/node_modules - - /tmp/storybook/code/renderers/svelte/dist - - /tmp/storybook/code/renderers/svelte/node_modules - - /tmp/storybook/code/renderers/vue3/dist - - /tmp/storybook/code/renderers/vue3/node_modules - - /tmp/storybook/code/renderers/web-components/dist - - /tmp/storybook/code/renderers/web-components/node_modules - - /tmp/storybook/.verdaccio-cache - root: /tmp + - storybook/code/core/dist + - storybook/code/core/node_modules + - storybook/code/addons/a11y/dist + - storybook/code/addons/a11y/node_modules + - storybook/code/addons/docs/dist + - storybook/code/addons/docs/node_modules + - storybook/code/addons/links/dist + - storybook/code/addons/links/node_modules + - storybook/code/addons/onboarding/dist + - storybook/code/addons/onboarding/node_modules + - storybook/code/addons/pseudo-states/dist + - storybook/code/addons/pseudo-states/node_modules + - storybook/code/addons/themes/dist + - storybook/code/addons/themes/node_modules + - storybook/code/addons/vitest/dist + - storybook/code/addons/vitest/node_modules + - storybook/code/builders/builder-vite/dist + - storybook/code/builders/builder-vite/node_modules + - storybook/code/builders/builder-webpack5/dist + - storybook/code/builders/builder-webpack5/node_modules + - storybook/code/frameworks/angular/dist + - storybook/code/frameworks/angular/node_modules + - storybook/code/frameworks/ember/dist + - storybook/code/frameworks/ember/node_modules + - storybook/code/frameworks/html-vite/dist + - storybook/code/frameworks/html-vite/node_modules + - storybook/code/frameworks/nextjs/dist + - storybook/code/frameworks/nextjs/node_modules + - storybook/code/frameworks/nextjs-vite/dist + - storybook/code/frameworks/nextjs-vite/node_modules + - storybook/code/frameworks/preact-vite/dist + - storybook/code/frameworks/preact-vite/node_modules + - storybook/code/frameworks/react-native-web-vite/dist + - storybook/code/frameworks/react-native-web-vite/node_modules + - storybook/code/frameworks/react-vite/dist + - storybook/code/frameworks/react-vite/node_modules + - storybook/code/frameworks/react-webpack5/dist + - storybook/code/frameworks/react-webpack5/node_modules + - storybook/code/frameworks/server-webpack5/dist + - storybook/code/frameworks/server-webpack5/node_modules + - storybook/code/frameworks/svelte-vite/dist + - storybook/code/frameworks/svelte-vite/node_modules + - storybook/code/frameworks/sveltekit/dist + - storybook/code/frameworks/sveltekit/node_modules + - storybook/code/frameworks/vue3-vite/dist + - storybook/code/frameworks/vue3-vite/node_modules + - storybook/code/frameworks/web-components-vite/dist + - storybook/code/frameworks/web-components-vite/node_modules + - storybook/code/lib/cli-storybook/dist + - storybook/code/lib/cli-storybook/node_modules + - storybook/code/lib/codemod/dist + - storybook/code/lib/codemod/node_modules + - storybook/code/lib/core-webpack/dist + - storybook/code/lib/core-webpack/node_modules + - storybook/code/lib/create-storybook/dist + - storybook/code/lib/create-storybook/node_modules + - storybook/code/lib/csf-plugin/dist + - storybook/code/lib/csf-plugin/node_modules + - storybook/code/lib/eslint-plugin/dist + - storybook/code/lib/eslint-plugin/node_modules + - storybook/code/lib/react-dom-shim/dist + - storybook/code/lib/react-dom-shim/node_modules + - storybook/code/presets/create-react-app/dist + - storybook/code/presets/create-react-app/node_modules + - storybook/code/presets/react-webpack/dist + - storybook/code/presets/react-webpack/node_modules + - storybook/code/presets/server-webpack/dist + - storybook/code/presets/server-webpack/node_modules + - storybook/code/renderers/html/dist + - storybook/code/renderers/html/node_modules + - storybook/code/renderers/preact/dist + - storybook/code/renderers/preact/node_modules + - storybook/code/renderers/react/dist + - storybook/code/renderers/react/node_modules + - storybook/code/renderers/server/dist + - storybook/code/renderers/server/node_modules + - storybook/code/renderers/svelte/dist + - storybook/code/renderers/svelte/node_modules + - storybook/code/renderers/vue3/dist + - storybook/code/renderers/vue3/node_modules + - storybook/code/renderers/web-components/dist + - storybook/code/renderers/web-components/node_modules + - storybook/.verdaccio-cache + root: / check: description: check executor: @@ -269,7 +269,7 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - attach_workspace: - at: /tmp + at: / - restore_cache: keys: &a1 - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -278,11 +278,11 @@ jobs: - darwin-node_modules - run: name: TypeCheck code - working_directory: /tmp/storybook/code + working_directory: storybook/code command: yarn task --task check --no-link - run: name: TypeCheck scripts - working_directory: /tmp/storybook/scripts + working_directory: storybook/scripts command: yarn check - run: name: Ensure no changes pending @@ -298,17 +298,17 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - attach_workspace: - at: /tmp + at: / - restore_cache: keys: *a1 - run: name: Run tests - working_directory: /tmp/storybook/code + working_directory: storybook/code command: |- TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - store_test_results: - path: /tmp/storybook/test-results + path: storybook/test-results - run: name: Ensure no changes pending command: git diff --exit-code @@ -322,12 +322,12 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - node/install-packages: - app-dir: /tmp/storybook + app-dir: storybook pkg-manager: yarn cache-only-lockfile: true - run: name: Prettier - working_directory: /tmp/storybook/scripts + working_directory: storybook/scripts command: yarn docs:prettier:check sandboxes: type: no-op @@ -340,22 +340,22 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - attach_workspace: - at: /tmp + at: / - restore_cache: keys: *a1 - run: name: Verdaccio - working_directory: /tmp/storybook/code + working_directory: storybook/code background: true command: yarn local-registry --open - run: name: Start Event Collector - working_directory: /tmp/storybook/scripts + working_directory: storybook/scripts background: true command: yarn jiti ./event-log-collector.ts - run: name: Wait on servers - working_directory: /tmp/storybook/code + working_directory: storybook/code command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 @@ -373,12 +373,12 @@ jobs: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - store_artifacts: - path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log + path: //storybook-sandboxes/react-vite-default-ts/debug-storybook.log destination: logs - persist_to_workspace: paths: - - /tmp/storybook-sandboxes/react-vite-default-ts - root: /tmp + - //storybook-sandboxes/react-vite-default-ts + root: / react-vite-default-ts--build: description: react-vite/default-ts (build) executor: @@ -388,7 +388,7 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - attach_workspace: - at: /tmp + at: / - restore_cache: keys: *a1 - run: @@ -400,12 +400,12 @@ jobs: command: yarn task serve --template react-vite/default-ts --no-link -s serve - run: name: Wait on storybook - working_directory: /tmp/storybook/code + working_directory: storybook/code command: yarn wait-on tcp:127.0.0.1:8001 - run: name: Running E2E Tests command: |- - TEST_FILES=$(circleci tests glob "/tmp/storybook/code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + TEST_FILES=$(circleci tests glob "storybook/code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 react-vite-default-ts--dev: description: react-vite/default-ts (dev) @@ -416,7 +416,7 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - attach_workspace: - at: /tmp + at: / - restore_cache: keys: *a1 - run: diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index d54ada15d008..6f361929cda4 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -1,6 +1,6 @@ -export const ROOT_DIR = '/tmp'; -export const WORKING_DIR = `${ROOT_DIR}/storybook`; -export const SANDBOX_DIR = `${ROOT_DIR}/storybook-sandboxes`; +export const ROOT_DIR = '/'; +export const WORKING_DIR = `storybook`; +export const SANDBOX_DIR = `storybook-sandboxes`; export const workspace = { attach: () => { From 65c63067ed154bbf20792e4a44a238b30bd704a0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 23:00:40 +0100 Subject: [PATCH 095/310] Update CircleCI configuration to set working_directory paths using ROOT_DIR for consistency across executors and CI jobs. --- .circleci/config.generated.yml | 15 +++++++++++---- scripts/ci/data.ts | 8 ++++---- scripts/ci/utils.ts | 1 + 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 42c852634ec8..2fc64556158a 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -60,7 +60,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: storybook + working_directory: /storybook sb_node_22_browsers: docker: - environment: @@ -78,7 +78,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: storybook + working_directory: /storybook sb_node_22_classic: docker: - environment: @@ -96,7 +96,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: storybook + working_directory: /storybook sb_playwright: docker: - environment: @@ -114,7 +114,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: storybook + working_directory: /storybook parameters: ghBaseBranch: default: next @@ -143,6 +143,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 + path: /storybook - node/install-packages: app-dir: storybook pkg-manager: yarn @@ -268,6 +269,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 + path: /storybook - attach_workspace: at: / - restore_cache: @@ -297,6 +299,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 + path: /storybook - attach_workspace: at: / - restore_cache: @@ -321,6 +324,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 + path: /storybook - node/install-packages: app-dir: storybook pkg-manager: yarn @@ -339,6 +343,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 + path: /storybook - attach_workspace: at: / - restore_cache: @@ -387,6 +392,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 + path: /storybook - attach_workspace: at: / - restore_cache: @@ -415,6 +421,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 + path: /storybook - attach_workspace: at: / - restore_cache: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 2bf5f89459f6..631e3bfb32e8 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -99,7 +99,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: WORKING_DIR, + working_directory: `${ROOT_DIR}${WORKING_DIR}`, }, sb_node_22_browsers: { docker: [ @@ -119,7 +119,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: WORKING_DIR, + working_directory: `${ROOT_DIR}${WORKING_DIR}`, }, sb_node_22_classic: { docker: [ @@ -139,7 +139,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: WORKING_DIR, + working_directory: `${ROOT_DIR}${WORKING_DIR}`, }, sb_playwright: { docker: [ @@ -159,7 +159,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: WORKING_DIR, + working_directory: `${ROOT_DIR}${WORKING_DIR}`, }, }; diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 6f361929cda4..f4c1bbbe3706 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -54,6 +54,7 @@ export const git = { return { 'git-shallow-clone/checkout_advanced': { clone_options: shallow ? '--depth 1' : '', + path: `${ROOT_DIR}${WORKING_DIR}`, }, }; }, From ae420eeb4a515afe10ef89a559b4415dc83db3ae Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 23:11:14 +0100 Subject: [PATCH 096/310] Update CircleCI configuration to change working_directory and path settings to use /tmp for improved isolation and consistency across CI jobs. --- .circleci/config.generated.yml | 40 +++++++++++++++++----------------- scripts/ci/data.ts | 24 ++++++++++++++------ scripts/ci/utils.ts | 4 ++-- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 2fc64556158a..1ddf6512f2b0 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -60,7 +60,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /storybook + working_directory: /tmp/storybook sb_node_22_browsers: docker: - environment: @@ -78,7 +78,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /storybook + working_directory: /tmp/storybook sb_node_22_classic: docker: - environment: @@ -96,7 +96,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /storybook + working_directory: /tmp/storybook sb_playwright: docker: - environment: @@ -114,7 +114,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /storybook + working_directory: /tmp/storybook parameters: ghBaseBranch: default: next @@ -143,7 +143,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /storybook + path: /tmp/storybook - node/install-packages: app-dir: storybook pkg-manager: yarn @@ -260,7 +260,7 @@ jobs: - storybook/code/renderers/web-components/dist - storybook/code/renderers/web-components/node_modules - storybook/.verdaccio-cache - root: / + root: /tmp check: description: check executor: @@ -269,9 +269,9 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /storybook + path: /tmp/storybook - attach_workspace: - at: / + at: /tmp - restore_cache: keys: &a1 - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -299,9 +299,9 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /storybook + path: /tmp/storybook - attach_workspace: - at: / + at: /tmp - restore_cache: keys: *a1 - run: @@ -324,7 +324,7 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /storybook + path: /tmp/storybook - node/install-packages: app-dir: storybook pkg-manager: yarn @@ -343,9 +343,9 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /storybook + path: /tmp/storybook - attach_workspace: - at: / + at: /tmp - restore_cache: keys: *a1 - run: @@ -378,12 +378,12 @@ jobs: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - store_artifacts: - path: //storybook-sandboxes/react-vite-default-ts/debug-storybook.log + path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log destination: logs - persist_to_workspace: paths: - - //storybook-sandboxes/react-vite-default-ts - root: / + - storybook-sandboxes/react-vite-default-ts + root: /tmp react-vite-default-ts--build: description: react-vite/default-ts (build) executor: @@ -392,9 +392,9 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /storybook + path: /tmp/storybook - attach_workspace: - at: / + at: /tmp - restore_cache: keys: *a1 - run: @@ -421,9 +421,9 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /storybook + path: /tmp/storybook - attach_workspace: - at: / + at: /tmp - restore_cache: keys: *a1 - run: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 631e3bfb32e8..4493303b0ecf 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -4,7 +4,17 @@ import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; -import { ROOT_DIR, WORKING_DIR, artifact, cache, git, npm, toId, workspace } from './utils'; +import { + ROOT_DIR, + SANDBOX_DIR, + WORKING_DIR, + artifact, + cache, + git, + npm, + toId, + workspace, +} from './utils'; const PLATFORM = os.platform(); const CACHE_KEYS = [ @@ -99,7 +109,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: `${ROOT_DIR}${WORKING_DIR}`, + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, }, sb_node_22_browsers: { docker: [ @@ -119,7 +129,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: `${ROOT_DIR}${WORKING_DIR}`, + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, }, sb_node_22_classic: { docker: [ @@ -139,7 +149,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: `${ROOT_DIR}${WORKING_DIR}`, + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, }, sb_playwright: { docker: [ @@ -159,7 +169,7 @@ const executors = { }, }, resource_class: '<>', - working_directory: `${ROOT_DIR}${WORKING_DIR}`, + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, }, }; @@ -261,8 +271,8 @@ function defineSandboxFlow(name: K) { }, }, }, - artifact.persist(`${ROOT_DIR}/storybook-sandboxes/${id}/debug-storybook.log`, 'logs'), - workspace.persist([`${ROOT_DIR}/storybook-sandboxes/${id}`]), + artifact.persist(`${ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), + workspace.persist([`${SANDBOX_DIR}/${id}`]), ], }, ['sandboxes'] diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index f4c1bbbe3706..5e4138b301e2 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -1,4 +1,4 @@ -export const ROOT_DIR = '/'; +export const ROOT_DIR = '/tmp'; export const WORKING_DIR = `storybook`; export const SANDBOX_DIR = `storybook-sandboxes`; @@ -54,7 +54,7 @@ export const git = { return { 'git-shallow-clone/checkout_advanced': { clone_options: shallow ? '--depth 1' : '', - path: `${ROOT_DIR}${WORKING_DIR}`, + path: `${ROOT_DIR}/${WORKING_DIR}`, }, }; }, From b65ef8e8549195dac803ebf286b766a60a1af2c4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 28 Nov 2025 23:21:07 +0100 Subject: [PATCH 097/310] Refactor CircleCI configuration to standardize working_directory and path settings, replacing specific directories with relative paths for improved clarity and consistency across CI jobs. --- .circleci/config.generated.yml | 19 ++++++------------- scripts/ci/data.ts | 12 ++++++------ scripts/ci/utils.ts | 1 - 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 1ddf6512f2b0..26ac5233052a 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -143,9 +143,8 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /tmp/storybook - node/install-packages: - app-dir: storybook + app-dir: . pkg-manager: yarn cache-only-lockfile: true - save_cache: @@ -166,14 +165,14 @@ jobs: - run: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile - working_directory: storybook/code + working_directory: code - run: command: yarn local-registry --publish name: Publish to Verdaccio - working_directory: storybook/code + working_directory: code - report-workflow-on-failure - store_artifacts: - path: storybook/code/bench/esbuild-metafiles + path: code/bench/esbuild-metafiles destination: bench - persist_to_workspace: paths: @@ -269,7 +268,6 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /tmp/storybook - attach_workspace: at: /tmp - restore_cache: @@ -299,7 +297,6 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /tmp/storybook - attach_workspace: at: /tmp - restore_cache: @@ -324,14 +321,13 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /tmp/storybook - node/install-packages: - app-dir: storybook + app-dir: . pkg-manager: yarn cache-only-lockfile: true - run: name: Prettier - working_directory: storybook/scripts + working_directory: scripts command: yarn docs:prettier:check sandboxes: type: no-op @@ -343,7 +339,6 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /tmp/storybook - attach_workspace: at: /tmp - restore_cache: @@ -392,7 +387,6 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /tmp/storybook - attach_workspace: at: /tmp - restore_cache: @@ -421,7 +415,6 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - path: /tmp/storybook - attach_workspace: at: /tmp - restore_cache: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 4493303b0ecf..de86335e768b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -380,7 +380,7 @@ const build = defineJob('build', { }, steps: [ git.checkout(), - npm.install(WORKING_DIR), + npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), git.check(), npm.check(), @@ -388,18 +388,18 @@ const build = defineJob('build', { run: { command: 'yarn task --task compile --start-from=auto --no-link --debug', name: 'Compile', - working_directory: `${WORKING_DIR}/code`, + working_directory: `code`, }, }, { run: { command: 'yarn local-registry --publish', name: 'Publish to Verdaccio', - working_directory: `${WORKING_DIR}/code`, + working_directory: `code`, }, }, 'report-workflow-on-failure', - artifact.persist(`${WORKING_DIR}/code/bench/esbuild-metafiles`, 'bench'), + artifact.persist(`code/bench/esbuild-metafiles`, 'bench'), workspace.persist([ ...glob .sync(['*/src', '*/*/src'], { @@ -489,11 +489,11 @@ const jobs = { }, steps: [ git.checkout(), - npm.install(WORKING_DIR), + npm.install('.'), { run: { name: 'Prettier', - working_directory: `${WORKING_DIR}/scripts`, + working_directory: `scripts`, command: 'yarn docs:prettier:check', }, }, diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 5e4138b301e2..61f81c64610a 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -54,7 +54,6 @@ export const git = { return { 'git-shallow-clone/checkout_advanced': { clone_options: shallow ? '--depth 1' : '', - path: `${ROOT_DIR}/${WORKING_DIR}`, }, }; }, From 952b8f3630c4268ac1a1cc0f5c03005a893cb675 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 01:01:29 +0100 Subject: [PATCH 098/310] Refactor CircleCI configuration to simplify working_directory paths by removing unnecessary prefixes, enhancing clarity and consistency across CI jobs. --- .circleci/config.generated.yml | 14 +++++++------- scripts/ci/data.ts | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 26ac5233052a..5a39cae193c2 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -278,11 +278,11 @@ jobs: - darwin-node_modules - run: name: TypeCheck code - working_directory: storybook/code + working_directory: code command: yarn task --task check --no-link - run: name: TypeCheck scripts - working_directory: storybook/scripts + working_directory: scripts command: yarn check - run: name: Ensure no changes pending @@ -317,7 +317,7 @@ jobs: pretty-docs: executor: name: sb_node_22_classic - class: medium + class: medium+ steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -345,17 +345,17 @@ jobs: keys: *a1 - run: name: Verdaccio - working_directory: storybook/code + working_directory: code background: true command: yarn local-registry --open - run: name: Start Event Collector - working_directory: storybook/scripts + working_directory: scripts background: true command: yarn jiti ./event-log-collector.ts - run: name: Wait on servers - working_directory: storybook/code + working_directory: code command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 @@ -400,7 +400,7 @@ jobs: command: yarn task serve --template react-vite/default-ts --no-link -s serve - run: name: Wait on storybook - working_directory: storybook/code + working_directory: code command: yarn wait-on tcp:127.0.0.1:8001 - run: name: Running E2E Tests diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index de86335e768b..3eaf27ab0a70 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -226,7 +226,7 @@ function defineSandboxFlow(name: K) { { run: { name: 'Verdaccio', - working_directory: `${WORKING_DIR}/code`, + working_directory: `code`, background: true, command: 'yarn local-registry --open', }, @@ -234,7 +234,7 @@ function defineSandboxFlow(name: K) { { run: { name: 'Start Event Collector', - working_directory: `${WORKING_DIR}/scripts`, + working_directory: `scripts`, background: true, command: 'yarn jiti ./event-log-collector.ts', }, @@ -242,7 +242,7 @@ function defineSandboxFlow(name: K) { { run: { name: 'Wait on servers', - working_directory: `${WORKING_DIR}/code`, + working_directory: `code`, command: [ 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy @@ -304,7 +304,7 @@ function defineSandboxFlow(name: K) { { run: { name: 'Wait on storybook', - working_directory: `${WORKING_DIR}/code`, + working_directory: `code`, command: 'yarn wait-on tcp:127.0.0.1:8001', }, }, @@ -427,14 +427,14 @@ const check = defineJob('check', { { run: { name: 'TypeCheck code', - working_directory: `${WORKING_DIR}/code`, + working_directory: `code`, command: 'yarn task --task check --no-link', }, }, { run: { name: 'TypeCheck scripts', - working_directory: `${WORKING_DIR}/scripts`, + working_directory: `scripts`, command: 'yarn check', }, }, @@ -485,7 +485,7 @@ const jobs = { 'pretty-docs': { executor: { name: 'sb_node_22_classic', - class: 'medium', + class: 'medium+', }, steps: [ git.checkout(), From ac8d78eb10c42c8b8543d7ae8128c5e00b211adb Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 21:23:24 +0100 Subject: [PATCH 099/310] Update package dependencies across the codebase to TypeScript 5.9.3 and various other packages, enhancing compatibility and performance. Adjust execa usage to utilize ResultPromise for improved type safety in command execution. --- code/addons/a11y/package.json | 4 +- code/addons/docs/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/onboarding/package.json | 2 +- code/addons/pseudo-states/package.json | 2 +- code/addons/themes/package.json | 2 +- code/addons/vitest/package.json | 2 +- code/builders/builder-webpack5/package.json | 2 +- code/core/package.json | 10 +- .../src/common/js-package-manager/BUNProxy.ts | 4 +- .../js-package-manager/JsPackageManager.ts | 12 +- .../JsPackageManagerFactory.ts | 18 +- .../src/common/js-package-manager/NPMProxy.ts | 4 +- .../common/js-package-manager/PNPMProxy.ts | 4 +- .../common/js-package-manager/Yarn1Proxy.ts | 4 +- .../common/js-package-manager/Yarn2Proxy.ts | 4 +- code/core/src/common/utils/command.ts | 30 +- code/frameworks/angular/package.json | 2 +- code/frameworks/ember/package.json | 2 +- code/frameworks/html-vite/package.json | 2 +- code/frameworks/nextjs-vite/package.json | 2 +- code/frameworks/nextjs/package.json | 2 +- code/frameworks/preact-vite/package.json | 2 +- .../react-native-web-vite/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/sveltekit/package.json | 2 +- code/frameworks/vue3-vite/package.json | 4 +- .../web-components-vite/package.json | 2 +- code/lib/cli-storybook/package.json | 4 +- code/lib/codemod/package.json | 2 +- code/lib/create-storybook/package.json | 2 +- code/lib/csf-plugin/package.json | 2 +- code/lib/eslint-plugin/package.json | 2 +- code/package.json | 36 +- code/presets/create-react-app/package.json | 2 +- code/presets/react-webpack/package.json | 2 +- code/presets/server-webpack/package.json | 2 +- package.json | 8 +- scripts/package.json | 24 +- yarn.lock | 1622 +++++++---------- 42 files changed, 812 insertions(+), 1032 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index c87eeb253169..adbc0ad97f6c 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -62,11 +62,11 @@ "@radix-ui/react-tabs": "1.0.4", "@storybook/icons": "^2.0.1", "@testing-library/react": "^14.0.0", - "execa": "^9.5.2", + "execa": "^9.6.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-resize-detector": "^7.1.2", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vitest-axe": "^0.1.0" }, "peerDependencies": { diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index b078d0b6966c..758bf3021c5a 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -105,7 +105,7 @@ "rehype-slug": "^6.0.0", "telejson": "8.0.0", "tocbot": "^4.20.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vite": "^7.0.4" }, "peerDependencies": { diff --git a/code/addons/links/package.json b/code/addons/links/package.json index d7eacb4eac34..ecf7730ec10a 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -53,7 +53,7 @@ "@storybook/global": "^5.0.0" }, "devDependencies": { - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", diff --git a/code/addons/onboarding/package.json b/code/addons/onboarding/package.json index cb008d299c52..b0238f723f3d 100644 --- a/code/addons/onboarding/package.json +++ b/code/addons/onboarding/package.json @@ -52,7 +52,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-joyride": "^2.8.2", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/addons/pseudo-states/package.json b/code/addons/pseudo-states/package.json index 00e5f7deb4be..a588e9b9d740 100644 --- a/code/addons/pseudo-states/package.json +++ b/code/addons/pseudo-states/package.json @@ -54,7 +54,7 @@ "@storybook/icons": "^2.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/addons/themes/package.json b/code/addons/themes/package.json index fef7c03c37ea..56b3dd68b42c 100644 --- a/code/addons/themes/package.json +++ b/code/addons/themes/package.json @@ -60,7 +60,7 @@ "@storybook/icons": "^2.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/addons/vitest/package.json b/code/addons/vitest/package.json index 4bb44be184d6..f0b8bd48beb4 100644 --- a/code/addons/vitest/package.json +++ b/code/addons/vitest/package.json @@ -92,7 +92,7 @@ "tinyglobby": "^0.2.10", "tree-kill": "^1.2.2", "ts-dedent": "^2.2.0", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vitest": "^4.0.1" }, "peerDependencies": { diff --git a/code/builders/builder-webpack5/package.json b/code/builders/builder-webpack5/package.json index 9c313a461cef..2c8ce85dcede 100644 --- a/code/builders/builder-webpack5/package.json +++ b/code/builders/builder-webpack5/package.json @@ -75,7 +75,7 @@ "pretty-hrtime": "^1.0.3", "sirv": "^2.0.4", "slash": "^5.0.0", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/core/package.json b/code/core/package.json index 203c8d565656..3517d3a8323e 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -201,6 +201,7 @@ "@vitest/expect": "3.2.4", "@vitest/spy": "3.2.4", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", + "execa": "^9.6.0", "recast": "^0.23.5", "semver": "^7.7.3", "use-sync-external-store": "^1.5.0", @@ -261,7 +262,7 @@ "bundle-require": "^5.1.0", "camelcase": "^8.0.0", "chai": "^5.1.1", - "commander": "^14.0.1", + "commander": "^14.0.2", "comment-parser": "^1.4.1", "copy-to-clipboard": "^3.3.1", "cross-spawn": "^7.0.6", @@ -275,15 +276,14 @@ "empathic": "^2.0.0", "es-toolkit": "^1.36.0", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", - "execa": "^8.0.1", "exsolve": "^1.0.7", "fetch-retry": "^6.0.0", "flush-promises": "^1.0.2", "fuse.js": "^3.6.1", - "get-npm-tarball-url": "^2.0.3", + "get-npm-tarball-url": "^2.1.0", "glob": "^10.5.0", "globby": "^14.1.0", - "jiti": "^2.4.2", + "jiti": "^2.6.1", "js-yaml": "^4.1.0", "jsdoc-type-pratt-parser": "^4.0.0", "launch-editor": "^2.11.1", @@ -295,7 +295,7 @@ "nanoid": "^4.0.2", "npmlog": "^7.0.0", "open": "^10.2.0", - "p-limit": "^6.2.0", + "p-limit": "^7.2.0", "package-manager-detector": "^1.1.0", "picocolors": "^1.1.0", "picomatch": "^2.3.0", diff --git a/code/core/src/common/js-package-manager/BUNProxy.ts b/code/core/src/common/js-package-manager/BUNProxy.ts index 19b6d6b2a620..d76ebfb657d3 100644 --- a/code/core/src/common/js-package-manager/BUNProxy.ts +++ b/code/core/src/common/js-package-manager/BUNProxy.ts @@ -6,7 +6,7 @@ import { FindPackageVersionsError } from 'storybook/internal/server-errors'; import * as find from 'empathic/find'; // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import sort from 'semver/functions/sort.js'; import type { ExecuteCommandOptions } from '../utils/command'; @@ -115,7 +115,7 @@ export class BUNProxy extends JsPackageManager { public runPackageCommand( options: Omit & { args: string[] } - ): ExecaChildProcess { + ): ResultPromise { // The following command is unsafe to use with `bun run` // because it will always favour a equally script named in the package.json instead of the installed binary. // so running `bun storybook automigrate` will run the diff --git a/code/core/src/common/js-package-manager/JsPackageManager.ts b/code/core/src/common/js-package-manager/JsPackageManager.ts index bd5bd4b542d6..0a113b490f2f 100644 --- a/code/core/src/common/js-package-manager/JsPackageManager.ts +++ b/code/core/src/common/js-package-manager/JsPackageManager.ts @@ -5,7 +5,7 @@ import { logger, prompt } from 'storybook/internal/node-logger'; import * as find from 'empathic/find'; // eslint-disable-next-line depend/ban-dependencies -import { type ExecaChildProcess } from 'execa'; +import { type ResultPromise } from 'execa'; // eslint-disable-next-line depend/ban-dependencies import { globSync } from 'glob'; import picocolors from 'picocolors'; @@ -269,7 +269,7 @@ export abstract class JsPackageManager { packageJsonInfo?: PackageJsonInfo; }, dependencies: string[] - ): Promise { + ): Promise { const { skipInstall, writeOutputToFile = true, @@ -570,13 +570,13 @@ export abstract class JsPackageManager { const resolutions = this.getResolutions(packageJson, versions); this.writePackageJson({ ...packageJson, ...resolutions }, operationDir); } - protected abstract runInstall(options?: { force?: boolean }): ExecaChildProcess; + protected abstract runInstall(options?: { force?: boolean }): ResultPromise; protected abstract runAddDeps( dependencies: string[], installAsDevDependencies: boolean, writeOutputToFile?: boolean - ): ExecaChildProcess; + ): ResultPromise; protected abstract getResolutions( packageJson: PackageJson, @@ -602,10 +602,10 @@ export abstract class JsPackageManager { args: string[], cwd?: string, stdio?: 'inherit' | 'pipe' | 'ignore' - ): ExecaChildProcess; + ): ResultPromise; public abstract runPackageCommand( options: Omit & { args: string[] } - ): ExecaChildProcess; + ): ResultPromise; public abstract findInstallations(pattern?: string[]): Promise; public abstract findInstallations( pattern?: string[], diff --git a/code/core/src/common/js-package-manager/JsPackageManagerFactory.ts b/code/core/src/common/js-package-manager/JsPackageManagerFactory.ts index dd1d8cd14d7d..a7dc0523f538 100644 --- a/code/core/src/common/js-package-manager/JsPackageManagerFactory.ts +++ b/code/core/src/common/js-package-manager/JsPackageManagerFactory.ts @@ -206,7 +206,9 @@ function hasNPM(cwd?: string) { command: 'npm', args: ['--version'], cwd, - env: process.env, + env: Object.fromEntries( + Object.entries(process.env).filter(([, value]) => value !== undefined) + ) as Record, }); return true; } catch (err) { @@ -220,7 +222,9 @@ function hasBun(cwd?: string) { command: 'bun', args: ['--version'], cwd, - env: process.env, + env: Object.fromEntries( + Object.entries(process.env).filter(([, value]) => value !== undefined) + ) as Record, }); return true; } catch (err) { @@ -234,7 +238,9 @@ function hasPNPM(cwd?: string) { command: 'pnpm', args: ['--version'], cwd, - env: process.env, + env: Object.fromEntries( + Object.entries(process.env).filter(([, value]) => value !== undefined) + ) as Record, }); return true; @@ -249,9 +255,9 @@ function getYarnVersion(cwd?: string): 1 | 2 | undefined { command: 'yarn', args: ['--version'], cwd, - env: { - ...process.env, - }, + env: Object.fromEntries( + Object.entries(process.env).filter(([, value]) => value !== undefined) + ) as Record, }); return /^1\.+/.test(yarnVersion.trim()) ? 1 : 2; } catch (err) { diff --git a/code/core/src/common/js-package-manager/NPMProxy.ts b/code/core/src/common/js-package-manager/NPMProxy.ts index 83d40eb46717..36b6f847f98d 100644 --- a/code/core/src/common/js-package-manager/NPMProxy.ts +++ b/code/core/src/common/js-package-manager/NPMProxy.ts @@ -7,7 +7,7 @@ import { FindPackageVersionsError } from 'storybook/internal/server-errors'; import * as find from 'empathic/find'; // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import sort from 'semver/functions/sort.js'; import type { ExecuteCommandOptions } from '../utils/command'; @@ -104,7 +104,7 @@ export class NPMProxy extends JsPackageManager { public runPackageCommand( options: Omit & { args: string[] } - ): ExecaChildProcess { + ): ResultPromise { return executeCommand({ command: 'npx', ...options, diff --git a/code/core/src/common/js-package-manager/PNPMProxy.ts b/code/core/src/common/js-package-manager/PNPMProxy.ts index b4c6119f0df8..1756bff55b43 100644 --- a/code/core/src/common/js-package-manager/PNPMProxy.ts +++ b/code/core/src/common/js-package-manager/PNPMProxy.ts @@ -7,7 +7,7 @@ import { FindPackageVersionsError } from 'storybook/internal/server-errors'; import * as find from 'empathic/find'; // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import type { ExecuteCommandOptions } from '../utils/command'; import { executeCommand } from '../utils/command'; @@ -80,7 +80,7 @@ export class PNPMProxy extends JsPackageManager { public runPackageCommand({ args, ...options - }: Omit & { args: string[] }): ExecaChildProcess { + }: Omit & { args: string[] }): ResultPromise { return executeCommand({ command: 'pnpm', args: ['exec', ...args], diff --git a/code/core/src/common/js-package-manager/Yarn1Proxy.ts b/code/core/src/common/js-package-manager/Yarn1Proxy.ts index 432b1a684d24..23cb1fcbfbdd 100644 --- a/code/core/src/common/js-package-manager/Yarn1Proxy.ts +++ b/code/core/src/common/js-package-manager/Yarn1Proxy.ts @@ -7,7 +7,7 @@ import { FindPackageVersionsError } from 'storybook/internal/server-errors'; import * as find from 'empathic/find'; // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import type { ExecuteCommandOptions } from '../utils/command'; import { executeCommand } from '../utils/command'; @@ -58,7 +58,7 @@ export class Yarn1Proxy extends JsPackageManager { public runPackageCommand({ args, ...options - }: Omit & { args: string[] }): ExecaChildProcess { + }: Omit & { args: string[] }): ResultPromise { const [command, ...rest] = args; return executeCommand({ command: `yarn`, diff --git a/code/core/src/common/js-package-manager/Yarn2Proxy.ts b/code/core/src/common/js-package-manager/Yarn2Proxy.ts index 71f09fedf3d7..0f32e69fe4c3 100644 --- a/code/core/src/common/js-package-manager/Yarn2Proxy.ts +++ b/code/core/src/common/js-package-manager/Yarn2Proxy.ts @@ -9,7 +9,7 @@ import { PosixFS, VirtualFS, ZipOpenFS } from '@yarnpkg/fslib'; import { getLibzipSync } from '@yarnpkg/libzip'; import * as find from 'empathic/find'; // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import { logger } from '../../node-logger'; import type { ExecuteCommandOptions } from '../utils/command'; @@ -101,7 +101,7 @@ export class Yarn2Proxy extends JsPackageManager { public runPackageCommand({ args, ...options - }: Omit & { args: string[] }): ExecaChildProcess { + }: Omit & { args: string[] }): ResultPromise { return executeCommand({ command: 'yarn', args: ['exec', ...args], diff --git a/code/core/src/common/utils/command.ts b/code/core/src/common/utils/command.ts index fb2d72c67b6a..089738f12081 100644 --- a/code/core/src/common/utils/command.ts +++ b/code/core/src/common/utils/command.ts @@ -2,9 +2,9 @@ import { logger, prompt } from 'storybook/internal/node-logger'; // eslint-disable-next-line depend/ban-dependencies import { - type CommonOptions, - type ExecaChildProcess, - type NodeOptions, + type Options, + type ResultPromise, + type SyncOptions, execa, execaCommandSync, execaNode, @@ -16,15 +16,22 @@ const COMMON_ENV_VARS = { NO_UPDATE_NOTIFIER: 'true', }; -export type ExecuteCommandOptions = CommonOptions<'utf8'> & { +export type ExecuteCommandOptions = Options & { command: string; args?: string[]; cwd?: string; ignoreError?: boolean; - env?: Record; + env?: Record; + signal?: AbortSignal; // Alias for cancelSignal (execa v9 uses cancelSignal) }; -function getExecaOptions({ stdio, cwd, env, ...execaOptions }: ExecuteCommandOptions) { +function getExecaOptions({ + stdio, + cwd, + env, + signal, + ...execaOptions +}: ExecuteCommandOptions): Options { return { cwd, stdio: stdio ?? prompt.getPreferredStdio(), @@ -34,11 +41,12 @@ function getExecaOptions({ stdio, cwd, env, ...execaOptions }: ExecuteCommandOpt ...COMMON_ENV_VARS, ...env, }, + ...(signal && { cancelSignal: signal }), // Map signal to cancelSignal for execa v9 ...execaOptions, }; } -export function executeCommand(options: ExecuteCommandOptions): ExecaChildProcess { +export function executeCommand(options: ExecuteCommandOptions): ResultPromise { const { command, args = [], ignoreError = false } = options; logger.debug(`Executing command: ${command} ${args.join(' ')}`); const execaProcess = execa(resolveCommand(command), args, getExecaOptions(options)); @@ -57,9 +65,9 @@ export function executeCommandSync(options: ExecuteCommandOptions): string { try { const commandResult = execaCommandSync( [resolveCommand(command), ...args].join(' '), - getExecaOptions(options) + getExecaOptions(options) as SyncOptions ); - return commandResult.stdout ?? ''; + return typeof commandResult.stdout === 'string' ? commandResult.stdout : ''; } catch (err) { if (!ignoreError) { throw err; @@ -75,8 +83,8 @@ export function executeNodeCommand({ }: { scriptPath: string; args?: string[]; - options?: NodeOptions; -}): ExecaChildProcess { + options?: Options; +}): ResultPromise { return execaNode(scriptPath, args, { ...options, }); diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index fe7bb0360d75..cea8f235ce6c 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -81,7 +81,7 @@ "@types/node": "^22.19.1", "empathic": "^2.0.0", "rimraf": "^6.0.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "webpack": "5", "zone.js": "^0.15.0" }, diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 60fc068cf796..b5186eb45a40 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -53,7 +53,7 @@ }, "devDependencies": { "ember-source": "~3.28.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json index d83bc4da6589..755559141948 100644 --- a/code/frameworks/html-vite/package.json +++ b/code/frameworks/html-vite/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/frameworks/nextjs-vite/package.json b/code/frameworks/nextjs-vite/package.json index b6b03acfb2ec..a5e4173fded2 100644 --- a/code/frameworks/nextjs-vite/package.json +++ b/code/frameworks/nextjs-vite/package.json @@ -87,7 +87,7 @@ "next": "^15.2.3", "postcss-load-config": "^6.0.1", "semver": "^7.7.3", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "next": "^14.1.0 || ^15.0.0 || ^16.0.0", diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 89a04f789702..51aa64e90cb9 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -119,7 +119,7 @@ "@types/node": "^22.19.1", "@types/react-refresh": "^0", "next": "^15.2.3", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "webpack": "^5.65.0" }, "peerDependencies": { diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json index 97508df6bdf7..fa132b445c0c 100644 --- a/code/frameworks/preact-vite/package.json +++ b/code/frameworks/preact-vite/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vite": "^7.0.4" }, "peerDependencies": { diff --git a/code/frameworks/react-native-web-vite/package.json b/code/frameworks/react-native-web-vite/package.json index bdd4a31465ce..452ef4264e51 100644 --- a/code/frameworks/react-native-web-vite/package.json +++ b/code/frameworks/react-native-web-vite/package.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index a163c2e0759c..262a3e23c78c 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -61,7 +61,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vite": "^7.0.4" }, "peerDependencies": { diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 05050484b901..cf55a09b83a0 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -50,7 +50,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 5a3c91419373..0e29e3290578 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -60,7 +60,7 @@ "@types/node": "^22.19.1", "svelte": "^5.39.5", "sveltedoc-parser": "^4.2.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vite": "^7.0.4" }, "peerDependencies": { diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json index 7f8d77ac4b1e..ade7ed141e69 100644 --- a/code/frameworks/sveltekit/package.json +++ b/code/frameworks/sveltekit/package.json @@ -61,7 +61,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vite": "^7.0.4" }, "peerDependencies": { diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index 981dd5276657..25db8fa050e0 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -50,13 +50,13 @@ "@storybook/builder-vite": "workspace:*", "@storybook/vue3": "workspace:*", "magic-string": "^0.30.0", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vue-component-meta": "^2.0.0", "vue-docgen-api": "^4.75.1" }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "vite": "^7.0.4" }, "peerDependencies": { diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 8f9b22241509..7d7055e69bb2 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -53,7 +53,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "storybook": "workspace:^" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 0f51836878c7..1a024aa05be9 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -39,7 +39,7 @@ "dependencies": { "@storybook/codemod": "workspace:*", "@types/semver": "^7.7.1", - "commander": "^14.0.1", + "commander": "^14.0.2", "create-storybook": "workspace:*", "jscodeshift": "^0.15.1", "storybook": "workspace:*", @@ -54,7 +54,7 @@ "envinfo": "^7.14.0", "globby": "^14.1.0", "leven": "^4.0.0", - "p-limit": "^6.2.0", + "p-limit": "^7.2.0", "picocolors": "^1.1.0", "semver": "^7.7.3", "slash": "^5.0.0", diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 2f0cdfbb468d..5bf32aa407b3 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -53,7 +53,7 @@ "@types/jscodeshift": "^0.11.10", "ansi-regex": "^6.0.1", "ts-dedent": "^2.2.0", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/create-storybook/package.json b/code/lib/create-storybook/package.json index feae52561712..039aa0296889 100644 --- a/code/lib/create-storybook/package.json +++ b/code/lib/create-storybook/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@types/prompts": "^2.0.9", "@types/semver": "^7.7.1", - "commander": "^14.0.1", + "commander": "^14.0.2", "empathic": "^2.0.0", "picocolors": "^1.1.0", "process-ancestry": "^0.0.2", diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index aab522361032..228414ccfb6a 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -40,7 +40,7 @@ "unplugin": "^2.3.5" }, "devDependencies": { - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "esbuild": "*", diff --git a/code/lib/eslint-plugin/package.json b/code/lib/eslint-plugin/package.json index d3bc44c4ec8b..cd70fa2ef3b0 100644 --- a/code/lib/eslint-plugin/package.json +++ b/code/lib/eslint-plugin/package.json @@ -58,7 +58,7 @@ "prettier": "^3.7.1", "prompts": "^2.4.0", "ts-dedent": "^2.0.0", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "eslint": ">=8", diff --git a/code/package.json b/code/package.json index 649c76551922..50f0764f895f 100644 --- a/code/package.json +++ b/code/package.json @@ -114,14 +114,11 @@ "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@testing-library/user-event": "patch:@testing-library/user-event@npm%3A14.6.1#~/.yarn/patches/@testing-library-user-event-npm-14.6.1-5da7e1d4e2.patch", - "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/lodash-es": "^4.17.12", "@types/mock-require": "^2.0.3", "@types/node": "^22.19.1", "@types/react": "^18.0.37", "@types/react-dom": "^18.0.11", - "@typescript-eslint/eslint-plugin": "^8.48.0", - "@typescript-eslint/parser": "^8.48.0", "@vitejs/plugin-react": "^4.7.0", "@vitejs/plugin-vue": "^4.6.2", "@vitest/browser": "^3.2.4", @@ -129,53 +126,24 @@ "@vitest/coverage-v8": "^3.2.4", "create-storybook": "workspace:*", "cross-env": "^7.0.3", - "danger": "^13.0.4", "es-toolkit": "^1.36.0", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", "esbuild-loader": "^4.3.0", - "eslint": "8.57.1", - "eslint-config-airbnb-typescript": "^18.0.0", - "eslint-config-prettier": "^9.1.2", - "eslint-import-resolver-typescript": "^3.10.1", - "eslint-plugin-compat": "^6.0.2", - "eslint-plugin-depend": "^1.4.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-file-progress": "^1.5.0", - "eslint-plugin-html": "^6.2.0", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-json": "^4.0.1", - "eslint-plugin-json-files": "^4.4.2", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-local-rules": "portal:../scripts/eslint-plugin-local-rules", - "eslint-plugin-playwright": "^1.8.3", - "eslint-plugin-prettier": "^5.5.4", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-storybook": "workspace:*", - "github-release-from-changelog": "^2.1.1", "happy-dom": "^17.6.3", "http-server": "^14.1.1", "husky": "^4.3.7", - "jiti": "^2.4.2", - "lint-staged": "^13.3.0", + "lint-staged": "^16.2.7", "mock-require": "^3.0.3", - "prettier": "^3.7.1", - "prettier-plugin-brace-style": "^0.8.1", - "prettier-plugin-css-order": "^2.1.2", - "prettier-plugin-curly": "^0.4.1", - "prettier-plugin-jsdoc": "^1.7.0", - "prettier-plugin-merge": "^0.8.0", "process": "^0.11.10", "react": "^18.2.0", "react-dom": "^18.2.0", "react-popper-tooltip": "^4.4.2", - "rimraf": "^6.0.1", "slash": "^5.0.0", "sort-package-json": "^2.14.0", "storybook": "workspace:^", "storybook-addon-pseudo-states": "workspace:*", "ts-dedent": "^2.0.0", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "uuid": "^11.1.0", "vite": "^7.0.4", "vite-plugin-inspect": "^11.0.0", diff --git a/code/presets/create-react-app/package.json b/code/presets/create-react-app/package.json index 24e8cdb1adda..1a7257377bf9 100644 --- a/code/presets/create-react-app/package.json +++ b/code/presets/create-react-app/package.json @@ -41,7 +41,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "react-scripts": ">=5.0.0", diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index f65de9e33cfe..b9fcaaac9dc2 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -51,7 +51,7 @@ "devDependencies": { "@types/node": "^22.19.1", "empathic": "^2.0.0", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index 69b2cd9a3481..c17bd6951ae0 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -43,7 +43,7 @@ }, "devDependencies": { "@types/node": "^22.19.1", - "typescript": "^5.8.3", + "typescript": "^5.9.3", "yaml": "^2.8.1" }, "peerDependencies": { diff --git a/package.json b/package.json index fb7c4b13d863..9d49f08f6bf0 100644 --- a/package.json +++ b/package.json @@ -60,16 +60,16 @@ "react": "^18.2.0", "serialize-javascript": "^3.1.0", "type-fest": "~2.19", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "devDependencies": { - "@nx/workspace": "^22.0.4", + "@nx/workspace": "^22.1.3", "@playwright/test": "^1.52.0", "@types/kill-port": "^2.0.3", "http-server": "^14.1.1", - "jiti": "^2.4.2", + "jiti": "^2.6.1", "kill-port": "^2.0.1", - "nx": "^22.0.4", + "nx": "^22.1.3", "prettier": "^3.7.1" } } diff --git a/scripts/package.json b/scripts/package.json index a3d043afeb29..1d0714e9a36b 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -63,8 +63,6 @@ "@actions/core": "^1.11.1", "@fal-works/esbuild-plugin-global-externals": "^2.1.2", "@google-cloud/bigquery": "^6.2.1", - "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd", - "@ndelangen/circleci-config-sdk": "https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1", "@octokit/graphql": "^5.0.6", "@octokit/request": "^8.4.1", "@polka/parse": "^1.0.0-next.28", @@ -97,10 +95,10 @@ "ansi-regex": "^6.0.1", "chromatic": "^11.28.2", "codecov": "^3.8.1", - "commander": "^12.1.0", + "commander": "^14.0.2", "cross-env": "^7.0.3", "cross-spawn": "^7.0.6", - "danger": "^13.0.4", + "danger": "^13.0.5", "dataloader": "^2.2.2", "detect-port": "^1.6.1", "diff-match-patch-es": "^0.1.0", @@ -112,6 +110,7 @@ "eslint": "^8.57.1", "eslint-config-airbnb-typescript": "^18.0.0", "eslint-config-prettier": "^9.1.2", + "eslint-import-resolver-typescript": "^3.10.1", "eslint-plugin-compat": "^6.0.2", "eslint-plugin-depend": "^1.4.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -122,10 +121,12 @@ "eslint-plugin-json-files": "^4.4.2", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-local-rules": "portal:./eslint-plugin-local-rules", + "eslint-plugin-playwright": "^1.8.3", "eslint-plugin-prettier": "^5.5.4", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^4.6.2", - "execa": "^6.1.0", + "eslint-plugin-storybook": "workspace:*", + "execa": "^9.6.0", "fast-folder-size": "^2.2.0", "fast-glob": "^3.3.2", "github-release-from-changelog": "^2.1.1", @@ -133,18 +134,18 @@ "globby": "^14.1.0", "http-server": "^14.1.1", "husky": "^4.3.7", - "jiti": "^2.4.2", + "jiti": "^2.6.1", "json5": "^2.2.3", "junit-xml": "^1.2.0", - "knip": "^5.51.0", - "lint-staged": "^15.5.2", + "knip": "^5.70.2", + "lint-staged": "^16.2.7", "memoizerific": "^1.11.3", "minimatch": "^10.0.1", - "node-gyp": "^9.3.1", + "node-gyp": "^12.1.0", "npm-registry-client": "^8.6.0", "ora": "^5.4.1", - "p-limit": "^3.1.0", - "p-retry": "^5.1.2", + "p-limit": "^7.2.0", + "p-retry": "^7.1.0", "picocolors": "^1.1.0", "playwright": "1.52.0", "playwright-core": "1.52.0", @@ -163,6 +164,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "recast": "^0.23.9", + "rimraf": "^6.1.2", "rollup": "^4.21.0", "rollup-plugin-dts": "^6.1.1", "semver": "^7.7.3", diff --git a/yarn.lock b/yarn.lock index 18ecc4f425dc..2a5e014181f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -534,17 +534,6 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:7.17.7": - version: 7.17.7 - resolution: "@babel/generator@npm:7.17.7" - dependencies: - "@babel/types": "npm:^7.17.0" - jsesc: "npm:^2.5.1" - source-map: "npm:^0.5.0" - checksum: 10c0/8088453c4418e0ee6528506fbd5847bbdfd56327a0025ca9496a259261e162c594ffd08be0d63e74c32feced795616772f38acc5f5e493a86a45fd439fd9feb0 - languageName: node - linkType: hard - "@babel/generator@npm:7.26.10": version: 7.26.10 resolution: "@babel/generator@npm:7.26.10" @@ -790,7 +779,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.5, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.26.9, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.28.5, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.4, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.26.9, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.0, @babel/parser@npm:^7.28.5, @babel/parser@npm:^7.4.5, @babel/parser@npm:^7.6.0, @babel/parser@npm:^7.9.6": version: 7.28.5 resolution: "@babel/parser@npm:7.28.5" dependencies: @@ -2281,7 +2270,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/core@npm:^1.1.0, @emnapi/core@npm:^1.4.3": +"@emnapi/core@npm:^1.1.0, @emnapi/core@npm:^1.4.3, @emnapi/core@npm:^1.5.0": version: 1.7.1 resolution: "@emnapi/core@npm:1.7.1" dependencies: @@ -2291,7 +2280,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/runtime@npm:^1.1.0, @emnapi/runtime@npm:^1.4.3, @emnapi/runtime@npm:^1.7.0": +"@emnapi/runtime@npm:^1.1.0, @emnapi/runtime@npm:^1.4.3, @emnapi/runtime@npm:^1.5.0, @emnapi/runtime@npm:^1.7.0": version: 1.7.1 resolution: "@emnapi/runtime@npm:1.7.1" dependencies: @@ -2782,13 +2771,6 @@ __metadata: languageName: node linkType: hard -"@gar/promisify@npm:^1.1.3": - version: 1.1.3 - resolution: "@gar/promisify@npm:1.1.3" - checksum: 10c0/0b3c9958d3cd17f4add3574975e3115ae05dc7f1298a60810414b16f6f558c137b5fb3cd3905df380bacfd955ec13f67c1e6710cbb5c246a7e8d65a8289b2bff - languageName: node - linkType: hard - "@gilbarbara/deep-equal@npm:^0.1.1": version: 0.1.2 resolution: "@gilbarbara/deep-equal@npm:0.1.2" @@ -3709,6 +3691,15 @@ __metadata: languageName: node linkType: hard +"@isaacs/fs-minipass@npm:^4.0.0": + version: 4.0.1 + resolution: "@isaacs/fs-minipass@npm:4.0.1" + dependencies: + minipass: "npm:^7.0.4" + checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 + languageName: node + linkType: hard + "@istanbuljs/schema@npm:^0.1.2, @istanbuljs/schema@npm:^0.1.3": version: 0.1.3 resolution: "@istanbuljs/schema@npm:0.1.3" @@ -4301,25 +4292,14 @@ __metadata: languageName: node linkType: hard -"@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd": - version: 0.0.0 - resolution: "@ndelangen/circleci-config-parser@https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd" - dependencies: - ajv: "npm:^8.17.1" - peerDependencies: - "@ndelangen/circleci-config-sdk": "*" - yaml: ^2.8.1 - checksum: 10c0/e7e7820df5d9d155de8ef07672907995d1a85d936bb8419c7037d61c8605210786018e9c81479be2caac6c90d3de298dfc83b99925a990c35e5c92ac7618dee2 - languageName: node - linkType: hard - -"@ndelangen/circleci-config-sdk@https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1": - version: 0.0.0 - resolution: "@ndelangen/circleci-config-sdk@https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1" +"@napi-rs/wasm-runtime@npm:^1.0.7": + version: 1.0.7 + resolution: "@napi-rs/wasm-runtime@npm:1.0.7" dependencies: - browser-or-node: "npm:^3.0.0" - yaml: "npm:^2.8.1" - checksum: 10c0/9ce4be4b12c271402f8956a4ab0644daad86e30da00ec821829997d154af82affa0d1533c28deeb7343a2788e28828f45e96b71e4e9704aa701da613d3796b84 + "@emnapi/core": "npm:^1.5.0" + "@emnapi/runtime": "npm:^1.5.0" + "@tybys/wasm-util": "npm:^0.10.1" + checksum: 10c0/2d8635498136abb49d6dbf7395b78c63422292240963bf055f307b77aeafbde57ae2c0ceaaef215601531b36d6eb92a2cdd6f5ba90ed2aa8127c27aff9c4ae55 languageName: node linkType: hard @@ -4465,13 +4445,16 @@ __metadata: languageName: node linkType: hard -"@npmcli/fs@npm:^2.1.0": - version: 2.1.2 - resolution: "@npmcli/fs@npm:2.1.2" +"@npmcli/agent@npm:^4.0.0": + version: 4.0.0 + resolution: "@npmcli/agent@npm:4.0.0" dependencies: - "@gar/promisify": "npm:^1.1.3" - semver: "npm:^7.3.5" - checksum: 10c0/c50d087733d0d8df23be24f700f104b19922a28677aa66fdbe06ff6af6431cc4a5bb1e27683cbc661a5dafa9bafdc603e6a0378121506dfcd394b2b6dd76a187 + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^11.2.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10c0/f7b5ce0f3dd42c3f8c6546e8433573d8049f67ef11ec22aa4704bc41483122f68bf97752e06302c455ead667af5cb753e6a09bff06632bc465c1cfd4c4b75a53 languageName: node linkType: hard @@ -4484,19 +4467,18 @@ __metadata: languageName: node linkType: hard -"@npmcli/move-file@npm:^2.0.0": - version: 2.0.1 - resolution: "@npmcli/move-file@npm:2.0.1" +"@npmcli/fs@npm:^5.0.0": + version: 5.0.0 + resolution: "@npmcli/fs@npm:5.0.0" dependencies: - mkdirp: "npm:^1.0.4" - rimraf: "npm:^3.0.2" - checksum: 10c0/11b2151e6d1de6f6eb23128de5aa8a429fd9097d839a5190cb77aa47a6b627022c42d50fa7c47a00f1c9f8f0c1560092b09b061855d293fa0741a2a94cfb174d + semver: "npm:^7.3.5" + checksum: 10c0/26e376d780f60ff16e874a0ac9bc3399186846baae0b6e1352286385ac134d900cc5dafaded77f38d77f86898fc923ae1cee9d7399f0275b1aa24878915d722b languageName: node linkType: hard -"@nx/devkit@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/devkit@npm:22.0.4" +"@nx/devkit@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/devkit@npm:22.1.3" dependencies: "@zkochan/js-yaml": "npm:0.0.7" ejs: "npm:^3.1.7" @@ -4507,94 +4489,94 @@ __metadata: yargs-parser: "npm:21.1.1" peerDependencies: nx: ">= 21 <= 23 || ^22.0.0-0" - checksum: 10c0/c96f9fbf91a2391ed7b8d3fb519d75683fa8390c512c337f72d56b343701e28de63a89ba7978c2d4df04e570776c771a258181522fc42fcae13e38d6fa753723 + checksum: 10c0/9b75154962edf6b1aeee4392c1db5218964ed95eb0b5cc66f499c802acd957789fef2551964dac21682768f78552502bdb43bfe5f364b89dbd9f8ecb637e2e42 languageName: node linkType: hard -"@nx/nx-darwin-arm64@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-darwin-arm64@npm:22.0.4" +"@nx/nx-darwin-arm64@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-darwin-arm64@npm:22.1.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nx/nx-darwin-x64@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-darwin-x64@npm:22.0.4" +"@nx/nx-darwin-x64@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-darwin-x64@npm:22.1.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nx/nx-freebsd-x64@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-freebsd-x64@npm:22.0.4" +"@nx/nx-freebsd-x64@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-freebsd-x64@npm:22.1.3" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@nx/nx-linux-arm-gnueabihf@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-linux-arm-gnueabihf@npm:22.0.4" +"@nx/nx-linux-arm-gnueabihf@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-linux-arm-gnueabihf@npm:22.1.3" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@nx/nx-linux-arm64-gnu@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-linux-arm64-gnu@npm:22.0.4" +"@nx/nx-linux-arm64-gnu@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-linux-arm64-gnu@npm:22.1.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-arm64-musl@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-linux-arm64-musl@npm:22.0.4" +"@nx/nx-linux-arm64-musl@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-linux-arm64-musl@npm:22.1.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nx/nx-linux-x64-gnu@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-linux-x64-gnu@npm:22.0.4" +"@nx/nx-linux-x64-gnu@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-linux-x64-gnu@npm:22.1.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-x64-musl@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-linux-x64-musl@npm:22.0.4" +"@nx/nx-linux-x64-musl@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-linux-x64-musl@npm:22.1.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nx/nx-win32-arm64-msvc@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-win32-arm64-msvc@npm:22.0.4" +"@nx/nx-win32-arm64-msvc@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-win32-arm64-msvc@npm:22.1.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@nx/nx-win32-x64-msvc@npm:22.0.4": - version: 22.0.4 - resolution: "@nx/nx-win32-x64-msvc@npm:22.0.4" +"@nx/nx-win32-x64-msvc@npm:22.1.3": + version: 22.1.3 + resolution: "@nx/nx-win32-x64-msvc@npm:22.1.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@nx/workspace@npm:^22.0.4": - version: 22.0.4 - resolution: "@nx/workspace@npm:22.0.4" +"@nx/workspace@npm:^22.1.3": + version: 22.1.3 + resolution: "@nx/workspace@npm:22.1.3" dependencies: - "@nx/devkit": "npm:22.0.4" + "@nx/devkit": "npm:22.1.3" "@zkochan/js-yaml": "npm:0.0.7" chalk: "npm:^4.1.0" enquirer: "npm:~2.3.6" - nx: "npm:22.0.4" + nx: "npm:22.1.3" picomatch: "npm:4.0.2" semver: "npm:^7.6.3" tslib: "npm:^2.3.0" yargs-parser: "npm:21.1.1" - checksum: 10c0/03438b806873ed76ecfe1b419f1ab0c16c3a5d66a0bc5967474a8f9995ab2c8aff87101e27c0946d403a1cb81694b42522cf56eecdd551708c0c089068eeb2d0 + checksum: 10c0/0e67d7bd353f749dab4b7a3f55fc84586b38281a6591454b6a0594f7c33602c8c2121d138c434818b2c19241928200d103155f9b3d7b55eae30383b7314b222c languageName: node linkType: hard @@ -5063,6 +5045,141 @@ __metadata: languageName: node linkType: hard +"@oxc-resolver/binding-android-arm-eabi@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-android-arm-eabi@npm:11.14.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@oxc-resolver/binding-android-arm64@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-android-arm64@npm:11.14.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-darwin-arm64@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-darwin-arm64@npm:11.14.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-darwin-x64@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-darwin-x64@npm:11.14.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-freebsd-x64@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-freebsd-x64@npm:11.14.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.14.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm-musleabihf@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-arm-musleabihf@npm:11.14.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm64-gnu@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-arm64-gnu@npm:11.14.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm64-musl@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-arm64-musl@npm:11.14.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-ppc64-gnu@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-ppc64-gnu@npm:11.14.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-riscv64-gnu@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-riscv64-gnu@npm:11.14.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-riscv64-musl@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-riscv64-musl@npm:11.14.0" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-s390x-gnu@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-s390x-gnu@npm:11.14.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-x64-gnu@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-x64-gnu@npm:11.14.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-x64-musl@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-linux-x64-musl@npm:11.14.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-wasm32-wasi@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-wasm32-wasi@npm:11.14.0" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.7" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-arm64-msvc@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-win32-arm64-msvc@npm:11.14.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-ia32-msvc@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-win32-ia32-msvc@npm:11.14.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-x64-msvc@npm:11.14.0": + version: 11.14.0 + resolution: "@oxc-resolver/binding-win32-x64-msvc@npm:11.14.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@parcel/watcher-android-arm64@npm:2.5.1": version: 2.5.1 resolution: "@parcel/watcher-android-arm64@npm:2.5.1" @@ -7873,11 +7990,11 @@ __metadata: "@storybook/icons": "npm:^2.0.1" "@testing-library/react": "npm:^14.0.0" axe-core: "npm:^4.2.0" - execa: "npm:^9.5.2" + execa: "npm:^9.6.0" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" react-resize-detector: "npm:^7.1.2" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vitest-axe: "npm:^0.1.0" peerDependencies: storybook: "workspace:^" @@ -7931,7 +8048,7 @@ __metadata: telejson: "npm:8.0.0" tocbot: "npm:^4.20.1" ts-dedent: "npm:^2.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite: "npm:^7.0.4" peerDependencies: storybook: "workspace:^" @@ -7943,7 +8060,7 @@ __metadata: resolution: "@storybook/addon-links@workspace:code/addons/links" dependencies: "@storybook/global": "npm:^5.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 storybook: "workspace:^" @@ -7962,7 +8079,7 @@ __metadata: react: "npm:^18.2.0" react-dom: "npm:^18.2.0" react-joyride: "npm:^2.8.2" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: storybook: "workspace:^" languageName: unknown @@ -7976,7 +8093,7 @@ __metadata: react: "npm:^18.2.0" react-dom: "npm:^18.2.0" ts-dedent: "npm:^2.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: storybook: "workspace:^" languageName: unknown @@ -8008,7 +8125,7 @@ __metadata: tinyglobby: "npm:^0.2.10" tree-kill: "npm:^1.2.2" ts-dedent: "npm:^2.2.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vitest: "npm:^4.0.1" peerDependencies: "@vitest/browser": ^3.0.0 || ^4.0.0 @@ -8053,7 +8170,7 @@ __metadata: telejson: "npm:8.0.0" ts-dedent: "npm:^2.0.0" tsconfig-paths-webpack-plugin: "npm:^4.0.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" webpack: "npm:5" zone.js: "npm:^0.15.0" peerDependencies: @@ -8151,7 +8268,7 @@ __metadata: style-loader: "npm:^4.0.0" terser-webpack-plugin: "npm:^5.3.14" ts-dedent: "npm:^2.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" webpack: "npm:5" webpack-dev-middleware: "npm:^6.1.2" webpack-hot-middleware: "npm:^2.25.1" @@ -8172,7 +8289,7 @@ __metadata: "@types/cross-spawn": "npm:^6.0.6" "@types/prompts": "npm:^2.0.9" "@types/semver": "npm:^7.7.1" - commander: "npm:^14.0.1" + commander: "npm:^14.0.2" comment-json: "npm:^4.2.5" create-storybook: "workspace:*" cross-spawn: "npm:^7.0.6" @@ -8181,7 +8298,7 @@ __metadata: globby: "npm:^14.1.0" jscodeshift: "npm:^0.15.1" leven: "npm:^4.0.0" - p-limit: "npm:^6.2.0" + p-limit: "npm:^7.2.0" picocolors: "npm:^1.1.0" semver: "npm:^7.7.3" slash: "npm:^5.0.0" @@ -8238,14 +8355,11 @@ __metadata: "@testing-library/jest-dom": "npm:^6.6.3" "@testing-library/react": "npm:^16.2.0" "@testing-library/user-event": "patch:@testing-library/user-event@npm%3A14.6.1#~/.yarn/patches/@testing-library-user-event-npm-14.6.1-5da7e1d4e2.patch" - "@trivago/prettier-plugin-sort-imports": "npm:^4.3.0" "@types/lodash-es": "npm:^4.17.12" "@types/mock-require": "npm:^2.0.3" "@types/node": "npm:^22.19.1" "@types/react": "npm:^18.0.37" "@types/react-dom": "npm:^18.0.11" - "@typescript-eslint/eslint-plugin": "npm:^8.48.0" - "@typescript-eslint/parser": "npm:^8.48.0" "@vitejs/plugin-react": "npm:^4.7.0" "@vitejs/plugin-vue": "npm:^4.6.2" "@vitest/browser": "npm:^3.2.4" @@ -8253,53 +8367,24 @@ __metadata: "@vitest/coverage-v8": "npm:^3.2.4" create-storybook: "workspace:*" cross-env: "npm:^7.0.3" - danger: "npm:^13.0.4" es-toolkit: "npm:^1.36.0" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0" esbuild-loader: "npm:^4.3.0" - eslint: "npm:8.57.1" - eslint-config-airbnb-typescript: "npm:^18.0.0" - eslint-config-prettier: "npm:^9.1.2" - eslint-import-resolver-typescript: "npm:^3.10.1" - eslint-plugin-compat: "npm:^6.0.2" - eslint-plugin-depend: "npm:^1.4.0" - eslint-plugin-eslint-comments: "npm:^3.2.0" - eslint-plugin-file-progress: "npm:^1.5.0" - eslint-plugin-html: "npm:^6.2.0" - eslint-plugin-import: "npm:^2.32.0" - eslint-plugin-json: "npm:^4.0.1" - eslint-plugin-json-files: "npm:^4.4.2" - eslint-plugin-jsx-a11y: "npm:^6.10.2" - eslint-plugin-local-rules: "portal:../scripts/eslint-plugin-local-rules" - eslint-plugin-playwright: "npm:^1.8.3" - eslint-plugin-prettier: "npm:^5.5.4" - eslint-plugin-react: "npm:^7.37.5" - eslint-plugin-react-hooks: "npm:^4.6.2" - eslint-plugin-storybook: "workspace:*" - github-release-from-changelog: "npm:^2.1.1" happy-dom: "npm:^17.6.3" http-server: "npm:^14.1.1" husky: "npm:^4.3.7" - jiti: "npm:^2.4.2" - lint-staged: "npm:^13.3.0" + lint-staged: "npm:^16.2.7" mock-require: "npm:^3.0.3" - prettier: "npm:^3.7.1" - prettier-plugin-brace-style: "npm:^0.8.1" - prettier-plugin-css-order: "npm:^2.1.2" - prettier-plugin-curly: "npm:^0.4.1" - prettier-plugin-jsdoc: "npm:^1.7.0" - prettier-plugin-merge: "npm:^0.8.0" process: "npm:^0.11.10" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" react-popper-tooltip: "npm:^4.4.2" - rimraf: "npm:^6.0.1" slash: "npm:^5.0.0" sort-package-json: "npm:^2.14.0" storybook: "workspace:^" storybook-addon-pseudo-states: "workspace:*" ts-dedent: "npm:^2.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" uuid: "npm:^11.1.0" vite: "npm:^7.0.4" vite-plugin-inspect: "npm:^11.0.0" @@ -8339,7 +8424,7 @@ __metadata: tiny-invariant: "npm:^1.3.1" tinyglobby: "npm:^0.2.13" ts-dedent: "npm:^2.2.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" languageName: unknown linkType: soft @@ -8360,7 +8445,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/csf-plugin@workspace:code/lib/csf-plugin" dependencies: - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" unplugin: "npm:^2.3.5" peerDependencies: esbuild: "*" @@ -8398,7 +8483,7 @@ __metadata: babel-loader: "npm:9.1.3" ember-source: "npm:~3.28.1" empathic: "npm:2.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: "@babel/core": "*" babel-plugin-ember-modules-api-polyfill: ^3.5.0 @@ -8424,7 +8509,7 @@ __metadata: "@storybook/builder-vite": "workspace:*" "@storybook/html": "workspace:*" "@types/node": "npm:^22.19.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: storybook: "workspace:^" languageName: unknown @@ -8465,7 +8550,7 @@ __metadata: postcss-load-config: "npm:^6.0.1" semver: "npm:^7.7.3" styled-jsx: "npm:5.1.6" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite-plugin-storybook-nextjs: "npm:^3.1.0" peerDependencies: next: ^14.1.0 || ^15.0.0 || ^16.0.0 @@ -8524,7 +8609,7 @@ __metadata: styled-jsx: "npm:^5.1.6" tsconfig-paths: "npm:^4.0.0" tsconfig-paths-webpack-plugin: "npm:^4.0.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" webpack: "npm:^5.65.0" peerDependencies: next: ^14.1.0 || ^15.0.0 || ^16.0.0 @@ -8547,7 +8632,7 @@ __metadata: "@storybook/builder-vite": "workspace:*" "@storybook/preact": "workspace:*" "@types/node": "npm:^22.19.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite: "npm:^7.0.4" peerDependencies: preact: ">=10" @@ -8579,7 +8664,7 @@ __metadata: "@types/semver": "npm:^7.7.1" pnp-webpack-plugin: "npm:^1.7.0" semver: "npm:^7.7.3" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: react-scripts: ">=5.0.0" storybook: "workspace:^" @@ -8600,7 +8685,7 @@ __metadata: resolve: "npm:^1.22.8" semver: "npm:^7.7.3" tsconfig-paths: "npm:^4.2.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" webpack: "npm:5" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -8620,7 +8705,7 @@ __metadata: "@types/node": "npm:^22.19.1" safe-identifier: "npm:^0.4.2" ts-dedent: "npm:^2.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" yaml: "npm:^2.8.1" yaml-loader: "npm:^0.8.1" peerDependencies: @@ -8666,7 +8751,7 @@ __metadata: "@storybook/react": "workspace:*" "@storybook/react-vite": "workspace:*" "@types/node": "npm:^22.19.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite-plugin-rnw: "npm:^0.0.10" vite-tsconfig-paths: "npm:^5.1.4" peerDependencies: @@ -8693,7 +8778,7 @@ __metadata: react-docgen: "npm:^8.0.0" resolve: "npm:^1.22.8" tsconfig-paths: "npm:^4.2.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite: "npm:^7.0.4" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -8763,13 +8848,13 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/root@workspace:." dependencies: - "@nx/workspace": "npm:^22.0.4" + "@nx/workspace": "npm:^22.1.3" "@playwright/test": "npm:^1.52.0" "@types/kill-port": "npm:^2.0.3" http-server: "npm:^14.1.1" - jiti: "npm:^2.4.2" + jiti: "npm:^2.6.1" kill-port: "npm:^2.0.1" - nx: "npm:^22.0.4" + nx: "npm:^22.1.3" prettier: "npm:^3.7.1" languageName: unknown linkType: soft @@ -8781,8 +8866,6 @@ __metadata: "@actions/core": "npm:^1.11.1" "@fal-works/esbuild-plugin-global-externals": "npm:^2.1.2" "@google-cloud/bigquery": "npm:^6.2.1" - "@ndelangen/circleci-config-parser": "https://pkg.pr.new/ndelangen/circleci-config-parser-ts/@ndelangen/circleci-config-parser@eccb0bd" - "@ndelangen/circleci-config-sdk": "https://pkg.pr.new/ndelangen/circleci-config-sdk-ts/@ndelangen/circleci-config-sdk@1" "@octokit/graphql": "npm:^5.0.6" "@octokit/request": "npm:^8.4.1" "@polka/parse": "npm:^1.0.0-next.28" @@ -8816,10 +8899,10 @@ __metadata: ansi-regex: "npm:^6.0.1" chromatic: "npm:^11.28.2" codecov: "npm:^3.8.1" - commander: "npm:^12.1.0" + commander: "npm:^14.0.2" cross-env: "npm:^7.0.3" cross-spawn: "npm:^7.0.6" - danger: "npm:^13.0.4" + danger: "npm:^13.0.5" dataloader: "npm:^2.2.2" detect-port: "npm:^1.6.1" diff-match-patch-es: "npm:^0.1.0" @@ -8831,6 +8914,7 @@ __metadata: eslint: "npm:^8.57.1" eslint-config-airbnb-typescript: "npm:^18.0.0" eslint-config-prettier: "npm:^9.1.2" + eslint-import-resolver-typescript: "npm:^3.10.1" eslint-plugin-compat: "npm:^6.0.2" eslint-plugin-depend: "npm:^1.4.0" eslint-plugin-eslint-comments: "npm:^3.2.0" @@ -8841,10 +8925,12 @@ __metadata: eslint-plugin-json-files: "npm:^4.4.2" eslint-plugin-jsx-a11y: "npm:^6.10.2" eslint-plugin-local-rules: "portal:./eslint-plugin-local-rules" + eslint-plugin-playwright: "npm:^1.8.3" eslint-plugin-prettier: "npm:^5.5.4" eslint-plugin-react: "npm:^7.37.5" eslint-plugin-react-hooks: "npm:^4.6.2" - execa: "npm:^6.1.0" + eslint-plugin-storybook: "workspace:*" + execa: "npm:^9.6.0" fast-folder-size: "npm:^2.2.0" fast-glob: "npm:^3.3.2" github-release-from-changelog: "npm:^2.1.1" @@ -8852,18 +8938,18 @@ __metadata: globby: "npm:^14.1.0" http-server: "npm:^14.1.1" husky: "npm:^4.3.7" - jiti: "npm:^2.4.2" + jiti: "npm:^2.6.1" json5: "npm:^2.2.3" junit-xml: "npm:^1.2.0" - knip: "npm:^5.51.0" - lint-staged: "npm:^15.5.2" + knip: "npm:^5.70.2" + lint-staged: "npm:^16.2.7" memoizerific: "npm:^1.11.3" minimatch: "npm:^10.0.1" - node-gyp: "npm:^9.3.1" + node-gyp: "npm:^12.1.0" npm-registry-client: "npm:^8.6.0" ora: "npm:^5.4.1" - p-limit: "npm:^3.1.0" - p-retry: "npm:^5.1.2" + p-limit: "npm:^7.2.0" + p-retry: "npm:^7.1.0" picocolors: "npm:^1.1.0" playwright: "npm:1.52.0" playwright-core: "npm:1.52.0" @@ -8882,6 +8968,7 @@ __metadata: react: "npm:^18.3.1" react-dom: "npm:^18.3.1" recast: "npm:^0.23.9" + rimraf: "npm:^6.1.2" rollup: "npm:^4.21.0" rollup-plugin-dts: "npm:^6.1.1" semver: "npm:^7.7.3" @@ -8921,7 +9008,7 @@ __metadata: "@storybook/preset-server-webpack": "workspace:*" "@storybook/server": "workspace:*" "@types/node": "npm:^22.19.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: storybook: "workspace:^" languageName: unknown @@ -8952,7 +9039,7 @@ __metadata: svelte: "npm:^5.39.5" svelte2tsx: "npm:^0.7.44" sveltedoc-parser: "npm:^4.2.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite: "npm:^7.0.4" peerDependencies: "@sveltejs/vite-plugin-svelte": ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 @@ -8989,7 +9076,7 @@ __metadata: "@storybook/svelte": "workspace:*" "@storybook/svelte-vite": "workspace:*" "@types/node": "npm:^22.19.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite: "npm:^7.0.4" peerDependencies: storybook: "workspace:^" @@ -9006,7 +9093,7 @@ __metadata: "@storybook/vue3": "workspace:*" "@types/node": "npm:^22.19.1" magic-string: "npm:^0.30.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" vite: "npm:^7.0.4" vue-component-meta: "npm:^2.0.0" vue-docgen-api: "npm:^4.75.1" @@ -9041,7 +9128,7 @@ __metadata: "@storybook/builder-vite": "workspace:*" "@storybook/web-components": "workspace:*" "@types/node": "npm:^22.19.1" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: storybook: "workspace:^" languageName: unknown @@ -9298,26 +9385,6 @@ __metadata: languageName: node linkType: hard -"@trivago/prettier-plugin-sort-imports@npm:^4.3.0": - version: 4.3.0 - resolution: "@trivago/prettier-plugin-sort-imports@npm:4.3.0" - dependencies: - "@babel/generator": "npm:7.17.7" - "@babel/parser": "npm:^7.20.5" - "@babel/traverse": "npm:7.23.2" - "@babel/types": "npm:7.17.0" - javascript-natural-sort: "npm:0.7.1" - lodash: "npm:^4.17.21" - peerDependencies: - "@vue/compiler-sfc": 3.x - prettier: 2.x - 3.x - peerDependenciesMeta: - "@vue/compiler-sfc": - optional: true - checksum: 10c0/42270fb9c89e54a3f8b6ac8c43e6d0e03350e2857e902cdad4de22c78ef1864da600525595311bc7e94e51c16c7dd3882c2e048a162fdab59761ffa893756aa2 - languageName: node - linkType: hard - "@trivago/prettier-plugin-sort-imports@npm:^6.0.0": version: 6.0.0 resolution: "@trivago/prettier-plugin-sort-imports@npm:6.0.0" @@ -9361,7 +9428,7 @@ __metadata: languageName: node linkType: hard -"@tybys/wasm-util@npm:^0.10.0": +"@tybys/wasm-util@npm:^0.10.0, @tybys/wasm-util@npm:^0.10.1": version: 0.10.1 resolution: "@tybys/wasm-util@npm:0.10.1" dependencies: @@ -10088,13 +10155,6 @@ __metadata: languageName: node linkType: hard -"@types/retry@npm:0.12.1": - version: 0.12.1 - resolution: "@types/retry@npm:0.12.1" - checksum: 10c0/d2d08393973693826fc947fb09596c34bd65863201e2f6d7e9d7a02d504199d6a2bab13eba56f6366ee0fd45434c699a9fdcfff3311e63bf2fad7a4cf34bacfd - languageName: node - linkType: hard - "@types/retry@npm:0.12.2": version: 0.12.2 resolution: "@types/retry@npm:0.12.2" @@ -11770,13 +11830,6 @@ __metadata: languageName: node linkType: hard -"abbrev@npm:^1.0.0": - version: 1.1.1 - resolution: "abbrev@npm:1.1.1" - checksum: 10c0/3f762677702acb24f65e813070e306c61fafe25d4b2583f9dfc935131f774863f3addd5741572ed576bd69cabe473c5af18e1e108b829cb7b6b4747884f726e6 - languageName: node - linkType: hard - "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -11784,6 +11837,13 @@ __metadata: languageName: node linkType: hard +"abbrev@npm:^4.0.0": + version: 4.0.0 + resolution: "abbrev@npm:4.0.0" + checksum: 10c0/b4cc16935235e80702fc90192e349e32f8ef0ed151ef506aa78c81a7c455ec18375c4125414b99f84b2e055199d66383e787675f0bcd87da7a4dbd59f9eac1d5 + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -11874,7 +11934,7 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:6, agent-base@npm:^6.0.2": +"agent-base@npm:6": version: 6.0.2 resolution: "agent-base@npm:6.0.2" dependencies: @@ -11883,22 +11943,13 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": +"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": version: 7.1.4 resolution: "agent-base@npm:7.1.4" checksum: 10c0/c2c9ab7599692d594b6a161559ada307b7a624fa4c7b03e3afdb5a5e31cd0e53269115b620fcab024c5ac6a6f37fa5eb2e004f076ad30f5f7e6b8b671f7b35fe languageName: node linkType: hard -"agentkeepalive@npm:^4.2.1": - version: 4.5.0 - resolution: "agentkeepalive@npm:4.5.0" - dependencies: - humanize-ms: "npm:^1.2.1" - checksum: 10c0/394ea19f9710f230722996e156607f48fdf3a345133b0b1823244b7989426c16019a428b56c82d3eabef616e938812981d9009f4792ecc66bd6a59e991c62612 - languageName: node - linkType: hard - "aggregate-error@npm:^3.0.0": version: 3.1.0 resolution: "aggregate-error@npm:3.1.0" @@ -11957,7 +12008,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.17.1, ajv@npm:^8.0.0, ajv@npm:^8.17.1, ajv@npm:^8.2.0, ajv@npm:^8.9.0": +"ajv@npm:8.17.1, ajv@npm:^8.0.0, ajv@npm:^8.2.0, ajv@npm:^8.9.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -12019,15 +12070,6 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^5.0.0": - version: 5.0.0 - resolution: "ansi-escapes@npm:5.0.0" - dependencies: - type-fest: "npm:^1.0.2" - checksum: 10c0/f705cc7fbabb981ddf51562cd950792807bccd7260cc3d9478a619dda62bff6634c87ca100f2545ac7aade9b72652c4edad8c7f0d31a0b949b5fa58f33eaf0d0 - languageName: node - linkType: hard - "ansi-escapes@npm:^7.0.0": version: 7.0.0 resolution: "ansi-escapes@npm:7.0.0" @@ -12164,16 +12206,6 @@ __metadata: languageName: node linkType: hard -"are-we-there-yet@npm:^3.0.0": - version: 3.0.1 - resolution: "are-we-there-yet@npm:3.0.1" - dependencies: - delegates: "npm:^1.0.0" - readable-stream: "npm:^3.6.0" - checksum: 10c0/8373f289ba42e4b5ec713bb585acdac14b5702c75f2a458dc985b9e4fa5762bc5b46b40a21b72418a3ed0cfb5e35bdc317ef1ae132f3035f633d581dd03168c3 - languageName: node - linkType: hard - "are-we-there-yet@npm:^4.0.0": version: 4.0.2 resolution: "are-we-there-yet@npm:4.0.2" @@ -13111,7 +13143,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:^3.0.3, braces@npm:~3.0.2": +"braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -13329,13 +13361,6 @@ __metadata: languageName: node linkType: hard -"browser-or-node@npm:^3.0.0": - version: 3.0.0 - resolution: "browser-or-node@npm:3.0.0" - checksum: 10c0/05db930e0a21bfffef74dbc4a27eaa12113e7f43a95f3b80a925f624212d701b86034cdfb5c422bdee061c4ae8442d294feee8996e6ae2555a8e46ea0b830b52 - languageName: node - linkType: hard - "browser-process-hrtime@npm:^1.0.0": version: 1.0.0 resolution: "browser-process-hrtime@npm:1.0.0" @@ -13583,35 +13608,9 @@ __metadata: languageName: node linkType: hard -"cacache@npm:^16.1.0": - version: 16.1.3 - resolution: "cacache@npm:16.1.3" - dependencies: - "@npmcli/fs": "npm:^2.1.0" - "@npmcli/move-file": "npm:^2.0.0" - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.1.0" - glob: "npm:^8.0.1" - infer-owner: "npm:^1.0.4" - lru-cache: "npm:^7.7.1" - minipass: "npm:^3.1.6" - minipass-collect: "npm:^1.0.2" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - mkdirp: "npm:^1.0.4" - p-map: "npm:^4.0.0" - promise-inflight: "npm:^1.0.1" - rimraf: "npm:^3.0.2" - ssri: "npm:^9.0.0" - tar: "npm:^6.1.11" - unique-filename: "npm:^2.0.0" - checksum: 10c0/cdf6836e1c457d2a5616abcaf5d8240c0346b1f5bd6fdb8866b9d84b6dff0b54e973226dc11e0d099f35394213d24860d1989c8358d2a41b39eb912b3000e749 - languageName: node - linkType: hard - -"cacache@npm:^18.0.0": - version: 18.0.0 - resolution: "cacache@npm:18.0.0" +"cacache@npm:^18.0.0": + version: 18.0.0 + resolution: "cacache@npm:18.0.0" dependencies: "@npmcli/fs": "npm:^3.1.0" fs-minipass: "npm:^3.0.0" @@ -13629,6 +13628,25 @@ __metadata: languageName: node linkType: hard +"cacache@npm:^20.0.1": + version: 20.0.3 + resolution: "cacache@npm:20.0.3" + dependencies: + "@npmcli/fs": "npm:^5.0.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^13.0.0" + lru-cache: "npm:^11.1.0" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^7.0.2" + ssri: "npm:^13.0.0" + unique-filename: "npm:^5.0.0" + checksum: 10c0/c7da1ca694d20e8f8aedabd21dc11518f809a7d2b59aa76a1fc655db5a9e62379e465c157ddd2afe34b19230808882288effa6911b2de26a088a6d5645123462 + languageName: node + linkType: hard + "calculate-cache-key-for-tree@npm:^2.0.0": version: 2.0.0 resolution: "calculate-cache-key-for-tree@npm:2.0.0" @@ -13760,13 +13778,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:5.3.0": - version: 5.3.0 - resolution: "chalk@npm:5.3.0" - checksum: 10c0/8297d436b2c0f95801103ff2ef67268d362021b8210daf8ddbe349695333eb3610a71122172ff3b0272f1ef2cf7cc2c41fdaa4715f52e49ffe04c56340feed09 - languageName: node - linkType: hard - "chalk@npm:^2.0.0, chalk@npm:^2.3.0": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -13798,7 +13809,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^5.0.0, chalk@npm:^5.0.1, chalk@npm:^5.4.1": +"chalk@npm:^5.0.0, chalk@npm:^5.0.1": version: 5.6.2 resolution: "chalk@npm:5.6.2" checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976 @@ -13912,6 +13923,13 @@ __metadata: languageName: node linkType: hard +"chownr@npm:^3.0.0": + version: 3.0.0 + resolution: "chownr@npm:3.0.0" + checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10 + languageName: node + linkType: hard + "chromatic@npm:^11.28.2": version: 11.28.2 resolution: "chromatic@npm:11.28.2" @@ -14021,15 +14039,6 @@ __metadata: languageName: node linkType: hard -"cli-cursor@npm:^4.0.0": - version: 4.0.0 - resolution: "cli-cursor@npm:4.0.0" - dependencies: - restore-cursor: "npm:^4.0.0" - checksum: 10c0/e776e8c3c6727300d0539b0d25160b2bb56aed1a63942753ba1826b012f337a6f4b7ace3548402e4f2f13b5e16bfd751be672c44b203205e7eca8be94afec42c - languageName: node - linkType: hard - "cli-cursor@npm:^5.0.0": version: 5.0.0 resolution: "cli-cursor@npm:5.0.0" @@ -14053,16 +14062,6 @@ __metadata: languageName: node linkType: hard -"cli-truncate@npm:^3.1.0": - version: 3.1.0 - resolution: "cli-truncate@npm:3.1.0" - dependencies: - slice-ansi: "npm:^5.0.0" - string-width: "npm:^5.0.0" - checksum: 10c0/a19088878409ec0e5dc2659a5166929629d93cfba6d68afc9cde2282fd4c751af5b555bf197047e31c87c574396348d011b7aa806fec29c4139ea4f7f00b324c - languageName: node - linkType: hard - "cli-truncate@npm:^4.0.0": version: 4.0.0 resolution: "cli-truncate@npm:4.0.0" @@ -14073,6 +14072,16 @@ __metadata: languageName: node linkType: hard +"cli-truncate@npm:^5.0.0": + version: 5.1.1 + resolution: "cli-truncate@npm:5.1.1" + dependencies: + slice-ansi: "npm:^7.1.0" + string-width: "npm:^8.0.0" + checksum: 10c0/3842920829a62f3e041ce39199050c42706c3c9c756a4efc8b86d464e102d1fa031d8b1b9b2e3bb36e1017c763558275472d031bdc884c1eff22a2f20e4f6b0a + languageName: node + linkType: hard + "cli-width@npm:^4.1.0": version: 4.1.0 resolution: "cli-width@npm:4.1.0" @@ -14298,13 +14307,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:11.0.0": - version: 11.0.0 - resolution: "commander@npm:11.0.0" - checksum: 10c0/471c44cd2d31dee556753df6ceb5ef52ccded0ba6308d3ba7a76251aa0edeedf5ac66ca86cb6096cc8fe20997064233c476983d346265f85180e86312724de0c - languageName: node - linkType: hard - "commander@npm:^10.0.0": version: 10.0.1 resolution: "commander@npm:10.0.1" @@ -14312,21 +14314,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^12.1.0": - version: 12.1.0 - resolution: "commander@npm:12.1.0" - checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9 - languageName: node - linkType: hard - -"commander@npm:^13.1.0": - version: 13.1.0 - resolution: "commander@npm:13.1.0" - checksum: 10c0/7b8c5544bba704fbe84b7cab2e043df8586d5c114a4c5b607f83ae5060708940ed0b5bd5838cf8ce27539cde265c1cbd59ce3c8c6b017ed3eec8943e3a415164 - languageName: node - linkType: hard - -"commander@npm:^14.0.1": +"commander@npm:^14.0.2": version: 14.0.2 resolution: "commander@npm:14.0.2" checksum: 10c0/245abd1349dbad5414cb6517b7b5c584895c02c4f7836ff5395f301192b8566f9796c82d7bd6c92d07eba8775fe4df86602fca5d86d8d10bcc2aded1e21c2aeb @@ -14756,7 +14744,7 @@ __metadata: dependencies: "@types/prompts": "npm:^2.0.9" "@types/semver": "npm:^7.7.1" - commander: "npm:^14.0.1" + commander: "npm:^14.0.2" empathic: "npm:^2.0.0" picocolors: "npm:^1.1.0" process-ancestry: "npm:^0.0.2" @@ -14956,9 +14944,9 @@ __metadata: languageName: node linkType: hard -"danger@npm:^13.0.4": - version: 13.0.4 - resolution: "danger@npm:13.0.4" +"danger@npm:^13.0.5": + version: 13.0.5 + resolution: "danger@npm:13.0.5" dependencies: "@gitbeaker/rest": "npm:^38.0.0" "@octokit/rest": "npm:^20.1.2" @@ -14968,7 +14956,6 @@ __metadata: core-js: "npm:^3.8.2" debug: "npm:^4.1.1" fast-json-patch: "npm:^3.0.0-1" - get-stdin: "npm:^6.0.0" http-proxy-agent: "npm:^5.0.0" https-proxy-agent: "npm:^5.0.1" hyperlinker: "npm:^1.0.0" @@ -14976,10 +14963,8 @@ __metadata: json5: "npm:^2.2.3" jsonpointer: "npm:^5.0.0" jsonwebtoken: "npm:^9.0.0" - lodash.find: "npm:^4.6.0" lodash.includes: "npm:^4.3.0" lodash.isobject: "npm:^3.0.2" - lodash.keys: "npm:^4.0.8" lodash.mapvalues: "npm:^4.6.0" lodash.memoize: "npm:^4.1.2" memfs-or-file-map-to-github-branch: "npm:^1.3.0" @@ -15007,7 +14992,7 @@ __metadata: danger-process: distribution/commands/danger-process.js danger-reset-status: distribution/commands/danger-reset-status.js danger-runner: distribution/commands/danger-runner.js - checksum: 10c0/0173ce07e17161218e8777c66a5314677bd4947e362e2c63f68f76f0361584d99716a3b19865a35ad66b3c2dfb0d37efbff04b94cedbe8fd38db01048db687da + checksum: 10c0/23afe5b30944871e4087aae278bf0a1de4d7d7314fcacf50be6c83bf837858c90cf79970ab0df1f5482fd2bf45b580d09d33695375aa515b04411aae1314598a languageName: node linkType: hard @@ -15083,7 +15068,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.3.7, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.3.7, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -15809,19 +15794,6 @@ __metadata: languageName: node linkType: hard -"easy-table@npm:1.2.0": - version: 1.2.0 - resolution: "easy-table@npm:1.2.0" - dependencies: - ansi-regex: "npm:^5.0.1" - wcwidth: "npm:^1.0.1" - dependenciesMeta: - wcwidth: - optional: true - checksum: 10c0/2d37937cd608586ba02e1ec479f90ccec581d366b3b0d1bb26b99ee6005f8d724e32a07a873759893461ca45b99e2d08c30326529d967ce9eedc1e9b68d4aa63 - languageName: node - linkType: hard - "ecc-jsbn@npm:~0.1.1": version: 0.1.2 resolution: "ecc-jsbn@npm:0.1.2" @@ -16161,7 +16133,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.17.1, enhanced-resolve@npm:^5.17.3, enhanced-resolve@npm:^5.18.1, enhanced-resolve@npm:^5.7.0": +"enhanced-resolve@npm:^5.17.1, enhanced-resolve@npm:^5.17.3, enhanced-resolve@npm:^5.7.0": version: 5.18.3 resolution: "enhanced-resolve@npm:5.18.3" dependencies: @@ -16925,12 +16897,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-local-rules@portal:../scripts/eslint-plugin-local-rules::locator=%40storybook%2Fcode%40workspace%3Acode": - version: 0.0.0-use.local - resolution: "eslint-plugin-local-rules@portal:../scripts/eslint-plugin-local-rules::locator=%40storybook%2Fcode%40workspace%3Acode" - languageName: node - linkType: soft - "eslint-plugin-local-rules@portal:./eslint-plugin-local-rules::locator=%40storybook%2Fscripts%40workspace%3Ascripts": version: 0.0.0-use.local resolution: "eslint-plugin-local-rules@portal:./eslint-plugin-local-rules::locator=%40storybook%2Fscripts%40workspace%3Ascripts" @@ -17043,7 +17009,7 @@ __metadata: prettier: "npm:^3.7.1" prompts: "npm:^2.4.0" ts-dedent: "npm:^2.0.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: eslint: ">=8" storybook: "workspace:^" @@ -17166,7 +17132,7 @@ __metadata: languageName: node linkType: hard -"eslint@npm:8.57.1, eslint@npm:^8.57.1": +"eslint@npm:^8.57.1": version: 8.57.1 resolution: "eslint@npm:8.57.1" dependencies: @@ -17447,23 +17413,6 @@ __metadata: languageName: node linkType: hard -"execa@npm:7.2.0": - version: 7.2.0 - resolution: "execa@npm:7.2.0" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^6.0.1" - human-signals: "npm:^4.3.0" - is-stream: "npm:^3.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^5.1.0" - onetime: "npm:^6.0.0" - signal-exit: "npm:^3.0.7" - strip-final-newline: "npm:^3.0.0" - checksum: 10c0/098cd6a1bc26d509e5402c43f4971736450b84d058391820c6f237aeec6436963e006fd8423c9722f148c53da86aa50045929c7278b5522197dff802d10f9885 - languageName: node - linkType: hard - "execa@npm:^1.0.0": version: 1.0.0 resolution: "execa@npm:1.0.0" @@ -17496,41 +17445,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:^6.1.0": - version: 6.1.0 - resolution: "execa@npm:6.1.0" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^6.0.1" - human-signals: "npm:^3.0.1" - is-stream: "npm:^3.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^5.1.0" - onetime: "npm:^6.0.0" - signal-exit: "npm:^3.0.7" - strip-final-newline: "npm:^3.0.0" - checksum: 10c0/004ee32092af745766a1b0352fdba8701a4001bc3fe08e63101c04276d4c860bbe11bb8ab85f37acdff13d3da83d60e044041dcf24bd7e25e645a543828d9c41 - languageName: node - linkType: hard - -"execa@npm:^8.0.1": - version: 8.0.1 - resolution: "execa@npm:8.0.1" - dependencies: - cross-spawn: "npm:^7.0.3" - get-stream: "npm:^8.0.1" - human-signals: "npm:^5.0.0" - is-stream: "npm:^3.0.0" - merge-stream: "npm:^2.0.0" - npm-run-path: "npm:^5.1.0" - onetime: "npm:^6.0.0" - signal-exit: "npm:^4.1.0" - strip-final-newline: "npm:^3.0.0" - checksum: 10c0/2c52d8775f5bf103ce8eec9c7ab3059909ba350a5164744e9947ed14a53f51687c040a250bda833f906d1283aa8803975b84e6c8f7a7c42f99dc8ef80250d1af - languageName: node - linkType: hard - -"execa@npm:^9.5.2": +"execa@npm:^9.6.0": version: 9.6.0 resolution: "execa@npm:9.6.0" dependencies: @@ -17906,6 +17821,15 @@ __metadata: languageName: node linkType: hard +"fd-package-json@npm:^2.0.0": + version: 2.0.0 + resolution: "fd-package-json@npm:2.0.0" + dependencies: + walk-up-path: "npm:^4.0.0" + checksum: 10c0/a0a48745257bc09c939486608dad9f2ced238f0c64266222cc881618ed4c8f6aa0ccfe45a1e6d4f9ce828509e8d617cec60e2a114851bebb1ff4886dc5ed5112 + languageName: node + linkType: hard + "fd-slicer@npm:~1.1.0": version: 1.1.0 resolution: "fd-slicer@npm:1.1.0" @@ -18258,7 +18182,7 @@ __metadata: languageName: node linkType: hard -"foreground-child@npm:^3.1.0, foreground-child@npm:^3.3.1": +"foreground-child@npm:^3.1.0": version: 3.3.1 resolution: "foreground-child@npm:3.3.1" dependencies: @@ -18329,6 +18253,17 @@ __metadata: languageName: node linkType: hard +"formatly@npm:^0.3.0": + version: 0.3.0 + resolution: "formatly@npm:0.3.0" + dependencies: + fd-package-json: "npm:^2.0.0" + bin: + formatly: bin/index.mjs + checksum: 10c0/ef9dbd3cdaee649e9604ea060d8d62d8131eb81117634336592ee2193fc7c98a3f1f1b5d09a045dbd36287ba88edf868ef179d39fbda2f34fbe2be70c42dd014 + languageName: node + linkType: hard + "forwarded@npm:0.2.0": version: 0.2.0 resolution: "forwarded@npm:0.2.0" @@ -18423,7 +18358,7 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": +"fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" dependencies: @@ -18573,22 +18508,6 @@ __metadata: languageName: node linkType: hard -"gauge@npm:^4.0.3": - version: 4.0.4 - resolution: "gauge@npm:4.0.4" - dependencies: - aproba: "npm:^1.0.3 || ^2.0.0" - color-support: "npm:^1.1.3" - console-control-strings: "npm:^1.1.0" - has-unicode: "npm:^2.0.1" - signal-exit: "npm:^3.0.7" - string-width: "npm:^4.2.3" - strip-ansi: "npm:^6.0.1" - wide-align: "npm:^1.1.5" - checksum: 10c0/ef10d7981113d69225135f994c9f8c4369d945e64a8fc721d655a3a38421b738c9fe899951721d1b47b73c41fdb5404ac87cc8903b2ecbed95d2800363e7e58c - languageName: node - linkType: hard - "gauge@npm:^5.0.0": version: 5.0.2 resolution: "gauge@npm:5.0.2" @@ -18694,10 +18613,10 @@ __metadata: languageName: node linkType: hard -"get-east-asian-width@npm:^1.0.0": - version: 1.2.0 - resolution: "get-east-asian-width@npm:1.2.0" - checksum: 10c0/914b1e217cf38436c24b4c60b4c45289e39a45bf9e65ef9fd343c2815a1a02b8a0215aeec8bf9c07c516089004b6e3826332481f40a09529fcadbf6e579f286b +"get-east-asian-width@npm:^1.0.0, get-east-asian-width@npm:^1.3.0": + version: 1.4.0 + resolution: "get-east-asian-width@npm:1.4.0" + checksum: 10c0/4e481d418e5a32061c36fbb90d1b225a254cc5b2df5f0b25da215dcd335a3c111f0c2023ffda43140727a9cafb62dac41d022da82c08f31083ee89f714ee3b83 languageName: node linkType: hard @@ -18722,7 +18641,7 @@ __metadata: languageName: node linkType: hard -"get-npm-tarball-url@npm:^2.0.3": +"get-npm-tarball-url@npm:^2.1.0": version: 2.1.0 resolution: "get-npm-tarball-url@npm:2.1.0" checksum: 10c0/af779fa5b9c89a3deaf9640630a23368f5ba6a028a1179872aaf581a59485fb2c2c6bd9b94670de228cfc5f23600c89a01e594879085f7fb4dddf820a63105b8 @@ -18739,13 +18658,6 @@ __metadata: languageName: node linkType: hard -"get-stdin@npm:^6.0.0": - version: 6.0.0 - resolution: "get-stdin@npm:6.0.0" - checksum: 10c0/c8971d27ffb72e4aae0f18ba792d2bfec872f662e98e13b182d8611a36f38396b79f43563884f597e667c7bb9ab98f337ee958ae278af5fa7c310ca62845e56b - languageName: node - linkType: hard - "get-stdin@npm:^9.0.0": version: 9.0.0 resolution: "get-stdin@npm:9.0.0" @@ -18781,20 +18693,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^6.0.1": - version: 6.0.1 - resolution: "get-stream@npm:6.0.1" - checksum: 10c0/49825d57d3fd6964228e6200a58169464b8e8970489b3acdc24906c782fb7f01f9f56f8e6653c4a50713771d6658f7cfe051e5eb8c12e334138c9c918b296341 - languageName: node - linkType: hard - -"get-stream@npm:^8.0.1": - version: 8.0.1 - resolution: "get-stream@npm:8.0.1" - checksum: 10c0/5c2181e98202b9dae0bb4a849979291043e5892eb40312b47f0c22b9414fc9b28a3b6063d2375705eb24abc41ecf97894d9a51f64ff021511b504477b27b4290 - languageName: node - linkType: hard - "get-stream@npm:^9.0.0": version: 9.0.1 resolution: "get-stream@npm:9.0.1" @@ -18924,19 +18822,14 @@ __metadata: languageName: node linkType: hard -"glob@npm:^11.0.3": - version: 11.1.0 - resolution: "glob@npm:11.1.0" +"glob@npm:^13.0.0": + version: 13.0.0 + resolution: "glob@npm:13.0.0" dependencies: - foreground-child: "npm:^3.3.1" - jackspeak: "npm:^4.1.1" minimatch: "npm:^10.1.1" minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" path-scurry: "npm:^2.0.0" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/1ceae07f23e316a6fa74581d9a74be6e8c2e590d2f7205034dd5c0435c53f5f7b712c2be00c3b65bf0a49294a1c6f4b98cd84c7637e29453b5aa13b79f1763a2 + checksum: 10c0/8e2f5821f3f7c312dd102e23a15b80c79e0837a9872784293ba2e15ec73b3f3749a49a42a31bfcb4e52c84820a474e92331c2eebf18819d20308f5c33876630a languageName: node linkType: hard @@ -18980,19 +18873,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.1": - version: 8.1.0 - resolution: "glob@npm:8.1.0" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^5.0.1" - once: "npm:^1.3.0" - checksum: 10c0/cb0b5cab17a59c57299376abe5646c7070f8acb89df5595b492dba3bfb43d301a46c01e5695f01154e6553168207cb60d4eaf07d3be4bc3eb9b0457c5c561d0f - languageName: node - linkType: hard - "globals@npm:^13.19.0, globals@npm:^13.23.0, globals@npm:^13.6.0": version: 13.24.0 resolution: "globals@npm:13.24.0" @@ -19738,7 +19618,7 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.1.0, http-cache-semantics@npm:^4.1.1": +"http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc @@ -19945,27 +19825,6 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^3.0.1": - version: 3.0.1 - resolution: "human-signals@npm:3.0.1" - checksum: 10c0/0bb27e72aea1666322f69ab9816e05df952ef2160346f2293f98f45d472edb1b62d0f1a596697b50d48d8f8222e6db3b9f9dc0b6bf6113866121001f0a8e48e9 - languageName: node - linkType: hard - -"human-signals@npm:^4.3.0": - version: 4.3.1 - resolution: "human-signals@npm:4.3.1" - checksum: 10c0/40498b33fe139f5cc4ef5d2f95eb1803d6318ac1b1c63eaf14eeed5484d26332c828de4a5a05676b6c83d7b9e57727c59addb4b1dea19cb8d71e83689e5b336c - languageName: node - linkType: hard - -"human-signals@npm:^5.0.0": - version: 5.0.0 - resolution: "human-signals@npm:5.0.0" - checksum: 10c0/5a9359073fe17a8b58e5a085e9a39a950366d9f00217c4ff5878bd312e09d80f460536ea6a3f260b5943a01fe55c158d1cea3fc7bee3d0520aeef04f6d915c82 - languageName: node - linkType: hard - "human-signals@npm:^8.0.1": version: 8.0.1 resolution: "human-signals@npm:8.0.1" @@ -19973,15 +19832,6 @@ __metadata: languageName: node linkType: hard -"humanize-ms@npm:^1.2.1": - version: 1.2.1 - resolution: "humanize-ms@npm:1.2.1" - dependencies: - ms: "npm:^2.0.0" - checksum: 10c0/f34a2c20161d02303c2807badec2f3b49cbfbbb409abd4f95a07377ae01cfe6b59e3d15ac609cffcd8f2521f0eb37b7e1091acf65da99aa2a4f1ad63c21e7e7a - languageName: node - linkType: hard - "husky@npm:^4.3.7": version: 4.3.8 resolution: "husky@npm:4.3.8" @@ -20137,13 +19987,6 @@ __metadata: languageName: node linkType: hard -"infer-owner@npm:^1.0.4": - version: 1.0.4 - resolution: "infer-owner@npm:1.0.4" - checksum: 10c0/a7b241e3149c26e37474e3435779487f42f36883711f198c45794703c7556bc38af224088bd4d1a221a45b8208ae2c2bcf86200383621434d0c099304481c5b9 - languageName: node - linkType: hard - "inflection@npm:^1.12.0": version: 1.13.4 resolution: "inflection@npm:1.13.4" @@ -20228,13 +20071,10 @@ __metadata: languageName: node linkType: hard -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc +"ip-address@npm:^10.0.1": + version: 10.1.0 + resolution: "ip-address@npm:10.1.0" + checksum: 10c0/0103516cfa93f6433b3bd7333fa876eb21263912329bfa47010af5e16934eeeff86f3d2ae700a3744a137839ddfad62b900c7a445607884a49b5d1e32a3d7566 languageName: node linkType: hard @@ -20649,7 +20489,7 @@ __metadata: languageName: node linkType: hard -"is-network-error@npm:^1.0.0": +"is-network-error@npm:^1.0.0, is-network-error@npm:^1.1.0": version: 1.3.0 resolution: "is-network-error@npm:1.3.0" checksum: 10c0/3e85a69e957988db66d5af5412efdd531a5a63e150d1bdd5647cfd4dc54fd89b1dbdd472621f8915233c3176ba1e6922afa8a51a9e363ba4693edf96a294f898 @@ -20784,13 +20624,6 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "is-stream@npm:3.0.0" - checksum: 10c0/eb2f7127af02ee9aa2a0237b730e47ac2de0d4e76a4a905a50a11557f2339df5765eaea4ceb8029f1efa978586abe776908720bfcb1900c20c6ec5145f6f29d8 - languageName: node - linkType: hard - "is-stream@npm:^4.0.1": version: 4.0.1 resolution: "is-stream@npm:4.0.1" @@ -21046,15 +20879,6 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^4.1.1": - version: 4.1.1 - resolution: "jackspeak@npm:4.1.1" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - checksum: 10c0/84ec4f8e21d6514db24737d9caf65361511f75e5e424980eebca4199f400874f45e562ac20fa8aeb1dd20ca2f3f81f0788b6e9c3e64d216a5794fd6f30e0e042 - languageName: node - linkType: hard - "jake@npm:^10.8.5": version: 10.8.7 resolution: "jake@npm:10.8.7" @@ -21069,7 +20893,7 @@ __metadata: languageName: node linkType: hard -"javascript-natural-sort@npm:0.7.1, javascript-natural-sort@npm:^0.7.1": +"javascript-natural-sort@npm:^0.7.1": version: 0.7.1 resolution: "javascript-natural-sort@npm:0.7.1" checksum: 10c0/340f8ffc5d30fb516e06dc540e8fa9e0b93c865cf49d791fed3eac3bdc5fc71f0066fc81d44ec1433edc87caecaf9f13eec4a1fce8c5beafc709a71eaedae6fe @@ -21177,7 +21001,7 @@ __metadata: languageName: node linkType: hard -"jiti@npm:^2.4.2, jiti@npm:^2.5.1": +"jiti@npm:^2.5.1, jiti@npm:^2.6.0, jiti@npm:^2.6.1": version: 2.6.1 resolution: "jiti@npm:2.6.1" bin: @@ -21270,7 +21094,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0": +"js-yaml@npm:4.1.0": version: 4.1.0 resolution: "js-yaml@npm:4.1.0" dependencies: @@ -21293,10 +21117,14 @@ __metadata: languageName: node linkType: hard -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 +"js-yaml@npm:^4.1.0, js-yaml@npm:^4.1.1": + version: 4.1.1 + resolution: "js-yaml@npm:4.1.1" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/561c7d7088c40a9bb53cc75becbfb1df6ae49b34b5e6e5a81744b14ae8667ec564ad2527709d1a6e7d5e5fa6d483aa0f373a50ad98d42fde368ec4a190d4fae7 languageName: node linkType: hard @@ -21349,15 +21177,6 @@ __metadata: languageName: node linkType: hard -"jsesc@npm:^2.5.1": - version: 2.5.2 - resolution: "jsesc@npm:2.5.2" - bin: - jsesc: bin/jsesc - checksum: 10c0/dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88 - languageName: node - linkType: hard - "jsesc@npm:^3.0.2, jsesc@npm:~3.1.0": version: 3.1.0 resolution: "jsesc@npm:3.1.0" @@ -21702,31 +21521,29 @@ __metadata: languageName: node linkType: hard -"knip@npm:^5.51.0": - version: 5.51.0 - resolution: "knip@npm:5.51.0" +"knip@npm:^5.70.2": + version: 5.70.2 + resolution: "knip@npm:5.70.2" dependencies: "@nodelib/fs.walk": "npm:^1.2.3" - easy-table: "npm:1.2.0" - enhanced-resolve: "npm:^5.18.1" fast-glob: "npm:^3.3.3" - jiti: "npm:^2.4.2" - js-yaml: "npm:^4.1.0" + formatly: "npm:^0.3.0" + jiti: "npm:^2.6.0" + js-yaml: "npm:^4.1.1" minimist: "npm:^1.2.8" - picocolors: "npm:^1.1.0" + oxc-resolver: "npm:^11.13.2" + picocolors: "npm:^1.1.1" picomatch: "npm:^4.0.1" - pretty-ms: "npm:^9.0.0" - smol-toml: "npm:^1.3.1" - strip-json-comments: "npm:5.0.1" - zod: "npm:^3.22.4" - zod-validation-error: "npm:^3.0.3" + smol-toml: "npm:^1.5.2" + strip-json-comments: "npm:5.0.3" + zod: "npm:^4.1.11" peerDependencies: "@types/node": ">=18" - typescript: ">=5.0.4" + typescript: ">=5.0.4 <7" bin: knip: bin/knip.js knip-bun: bin/knip-bun.js - checksum: 10c0/d6f0f658e418ff45f9a1058eb0543854144af8ba6117180d9d32a22284a66cb0ba19204de758d8578639f07fa531b961e7c415f3600aa590eaf03a070320c16e + checksum: 10c0/bacc5ad4c32de3af25da960f186efb2c4f006ad02b88bc09a8fe291912c0dd4f1fab0644c1848d5d194d2d0bc7ea046c7a27779149ec25065b4ded54bb72490c languageName: node linkType: hard @@ -21863,14 +21680,7 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:2.1.0": - version: 2.1.0 - resolution: "lilconfig@npm:2.1.0" - checksum: 10c0/64645641aa8d274c99338e130554abd6a0190533c0d9eb2ce7ebfaf2e05c7d9961f3ffe2bfa39efd3b60c521ba3dd24fa236fe2775fc38501bf82bf49d4678b8 - languageName: node - linkType: hard - -"lilconfig@npm:^3.0.0, lilconfig@npm:^3.1.1, lilconfig@npm:^3.1.3": +"lilconfig@npm:^3.0.0, lilconfig@npm:^3.1.1": version: 3.1.3 resolution: "lilconfig@npm:3.1.3" checksum: 10c0/f5604e7240c5c275743561442fbc5abf2a84ad94da0f5adc71d25e31fa8483048de3dcedcb7a44112a942fed305fd75841cdf6c9681c7f640c63f1049e9a5dcc @@ -21891,62 +21701,20 @@ __metadata: languageName: node linkType: hard -"lint-staged@npm:^13.3.0": - version: 13.3.0 - resolution: "lint-staged@npm:13.3.0" +"lint-staged@npm:^16.2.7": + version: 16.2.7 + resolution: "lint-staged@npm:16.2.7" dependencies: - chalk: "npm:5.3.0" - commander: "npm:11.0.0" - debug: "npm:4.3.4" - execa: "npm:7.2.0" - lilconfig: "npm:2.1.0" - listr2: "npm:6.6.1" - micromatch: "npm:4.0.5" - pidtree: "npm:0.6.0" - string-argv: "npm:0.3.2" - yaml: "npm:2.3.1" - bin: - lint-staged: bin/lint-staged.js - checksum: 10c0/57ce70a3f05d779bd73a01a3dc8fc17a16ab5c220a77041b3d2147de3cfaba17692907fecc1426b85e0159c13814ec905a7be79171917d670a6d31d2de6bf24f - languageName: node - linkType: hard - -"lint-staged@npm:^15.5.2": - version: 15.5.2 - resolution: "lint-staged@npm:15.5.2" - dependencies: - chalk: "npm:^5.4.1" - commander: "npm:^13.1.0" - debug: "npm:^4.4.0" - execa: "npm:^8.0.1" - lilconfig: "npm:^3.1.3" - listr2: "npm:^8.2.5" + commander: "npm:^14.0.2" + listr2: "npm:^9.0.5" micromatch: "npm:^4.0.8" + nano-spawn: "npm:^2.0.0" pidtree: "npm:^0.6.0" string-argv: "npm:^0.3.2" - yaml: "npm:^2.7.0" + yaml: "npm:^2.8.1" bin: lint-staged: bin/lint-staged.js - checksum: 10c0/618386254600ada3af3672486a9d082250108245e7c0863d9dfe0a21e7764e3b2eb6416b0f8970e548f4e9d368637331598b27df5a1306925feabbaf16a667e1 - languageName: node - linkType: hard - -"listr2@npm:6.6.1": - version: 6.6.1 - resolution: "listr2@npm:6.6.1" - dependencies: - cli-truncate: "npm:^3.1.0" - colorette: "npm:^2.0.20" - eventemitter3: "npm:^5.0.1" - log-update: "npm:^5.0.1" - rfdc: "npm:^1.3.0" - wrap-ansi: "npm:^8.1.0" - peerDependencies: - enquirer: ">= 2.3.0 < 3" - peerDependenciesMeta: - enquirer: - optional: true - checksum: 10c0/2abfcd4346b8208e8d406cfe7a058cd10e3238f60de1ee53fa108a507b45b853ceb87e0d1d4ff229bbf6dd6e896262352e0c7a8895b8511cd55fe94304d3921e + checksum: 10c0/9a677c21a8112d823ae5bc565ba2c9e7b803786f2a021c46827a55fe44ed59def96edb24fc99c06a2545cdbbf366022ad82addcb3bf60c712f3b98ef92069717 languageName: node linkType: hard @@ -21964,17 +21732,17 @@ __metadata: languageName: node linkType: hard -"listr2@npm:^8.2.5": - version: 8.3.2 - resolution: "listr2@npm:8.3.2" +"listr2@npm:^9.0.5": + version: 9.0.5 + resolution: "listr2@npm:9.0.5" dependencies: - cli-truncate: "npm:^4.0.0" + cli-truncate: "npm:^5.0.0" colorette: "npm:^2.0.20" eventemitter3: "npm:^5.0.1" log-update: "npm:^6.1.0" rfdc: "npm:^1.4.1" wrap-ansi: "npm:^9.0.0" - checksum: 10c0/6b6378e28debda863d31f03ffe880a76b45c07388c74e8e0676fc957de7f2aff24fdea7f48b17d12808440f64680215c36df388c79d2b367c7866dd66f75fb09 + checksum: 10c0/46448d1ba0addc9d71aeafd05bb8e86ded9641ccad930ac302c2bd2ad71580375604743e18586fcb8f11906edf98e8e17fca75ba0759947bf275d381f68e311d languageName: node linkType: hard @@ -22164,13 +21932,6 @@ __metadata: languageName: node linkType: hard -"lodash.find@npm:^4.6.0": - version: 4.6.0 - resolution: "lodash.find@npm:4.6.0" - checksum: 10c0/0238f3abc0b87aa441820ab0ab31a81156e1809a66285f454fbea18cbdf4d16572d504dd9e96c22df8a36b81d0272bca9205d09d217d61f9b53fa3358023377f - languageName: node - linkType: hard - "lodash.includes@npm:^4.3.0": version: 4.3.0 resolution: "lodash.includes@npm:4.3.0" @@ -22220,13 +21981,6 @@ __metadata: languageName: node linkType: hard -"lodash.keys@npm:^4.0.8": - version: 4.2.0 - resolution: "lodash.keys@npm:4.2.0" - checksum: 10c0/e21565d5076f4afc99e517d2b3dc84f05bc83e036f532c6e691c318f9ffd7eca3006365e0dafae1c5f046e344aaa722b01fe102b9f68e7cc63b79d2f9196f667 - languageName: node - linkType: hard - "lodash.mapvalues@npm:^4.6.0": version: 4.6.0 resolution: "lodash.mapvalues@npm:4.6.0" @@ -22286,19 +22040,6 @@ __metadata: languageName: node linkType: hard -"log-update@npm:^5.0.1": - version: 5.0.1 - resolution: "log-update@npm:5.0.1" - dependencies: - ansi-escapes: "npm:^5.0.0" - cli-cursor: "npm:^4.0.0" - slice-ansi: "npm:^5.0.0" - strip-ansi: "npm:^7.0.1" - wrap-ansi: "npm:^8.0.1" - checksum: 10c0/1050ea2027e80f32e132aace909987cb00c2719368c78b82ffca681a5b3f4020eeb5f4b4e310c47c35c6c36aff258c1d1bc51485ac44d6fdac9eb0a4275c539f - languageName: node - linkType: hard - "log-update@npm:^6.1.0": version: 6.1.0 resolution: "log-update@npm:6.1.0" @@ -22369,7 +22110,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:7.18.3, lru-cache@npm:^7.7.1": +"lru-cache@npm:7.18.3": version: 7.18.3 resolution: "lru-cache@npm:7.18.3" checksum: 10c0/b3a452b491433db885beed95041eb104c157ef7794b9c9b4d647be503be91769d11206bb573849a16b4cc0d03cbd15ffd22df7960997788b74c1d399ac7a4fed @@ -22383,7 +22124,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^11.0.0": +"lru-cache@npm:^11.0.0, lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1": version: 11.2.2 resolution: "lru-cache@npm:11.2.2" checksum: 10c0/72d7831bbebc85e2bdefe01047ee5584db69d641c48d7a509e86f66f6ee111b30af7ec3bd68a967d47b69a4b1fa8bbf3872630bd06a63b6735e6f0a5f1c8e83d @@ -22497,30 +22238,6 @@ __metadata: languageName: node linkType: hard -"make-fetch-happen@npm:^10.0.3": - version: 10.2.1 - resolution: "make-fetch-happen@npm:10.2.1" - dependencies: - agentkeepalive: "npm:^4.2.1" - cacache: "npm:^16.1.0" - http-cache-semantics: "npm:^4.1.0" - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - is-lambda: "npm:^1.0.1" - lru-cache: "npm:^7.7.1" - minipass: "npm:^3.1.6" - minipass-collect: "npm:^1.0.2" - minipass-fetch: "npm:^2.0.3" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^0.6.3" - promise-retry: "npm:^2.0.1" - socks-proxy-agent: "npm:^7.0.0" - ssri: "npm:^9.0.0" - checksum: 10c0/28ec392f63ab93511f400839dcee83107eeecfaad737d1e8487ea08b4332cd89a8f3319584222edd9f6f1d0833cf516691469496d46491863f9e88c658013949 - languageName: node - linkType: hard - "make-fetch-happen@npm:^13.0.0": version: 13.0.0 resolution: "make-fetch-happen@npm:13.0.0" @@ -22540,6 +22257,25 @@ __metadata: languageName: node linkType: hard +"make-fetch-happen@npm:^15.0.0": + version: 15.0.3 + resolution: "make-fetch-happen@npm:15.0.3" + dependencies: + "@npmcli/agent": "npm:^4.0.0" + cacache: "npm:^20.0.1" + http-cache-semantics: "npm:^4.1.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^5.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^1.0.0" + proc-log: "npm:^6.0.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^13.0.0" + checksum: 10c0/525f74915660be60b616bcbd267c4a5b59481b073ba125e45c9c3a041bb1a47a2bd0ae79d028eb6f5f95bf9851a4158423f5068539c3093621abb64027e8e461 + languageName: node + linkType: hard + "map-async@npm:~0.1.1": version: 0.1.1 resolution: "map-async@npm:0.1.1" @@ -23183,16 +22919,6 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:4.0.5": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" - dependencies: - braces: "npm:^3.0.2" - picomatch: "npm:^2.3.1" - checksum: 10c0/3d6505b20f9fa804af5d8c596cb1c5e475b9b0cd05f652c5b56141cf941bd72adaeb7a436fda344235cef93a7f29b7472efc779fcdb83b478eab0867b95cdeff - languageName: node - linkType: hard - "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5, micromatch@npm:^4.0.8": version: 4.0.8 resolution: "micromatch@npm:4.0.8" @@ -23281,13 +23007,6 @@ __metadata: languageName: node linkType: hard -"mimic-fn@npm:^4.0.0": - version: 4.0.0 - resolution: "mimic-fn@npm:4.0.0" - checksum: 10c0/de9cc32be9996fd941e512248338e43407f63f6d497abe8441fa33447d922e927de54d4cc3c1a3c6d652857acd770389d5a3823f311a744132760ce2be15ccbf - languageName: node - linkType: hard - "mimic-function@npm:^5.0.0": version: 5.0.1 resolution: "mimic-function@npm:5.0.1" @@ -23407,33 +23126,42 @@ __metadata: languageName: node linkType: hard -"minipass-fetch@npm:^2.0.3": - version: 2.1.2 - resolution: "minipass-fetch@npm:2.1.2" +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.4 + resolution: "minipass-fetch@npm:3.0.4" dependencies: encoding: "npm:^0.1.13" - minipass: "npm:^3.1.6" + minipass: "npm:^7.0.3" minipass-sized: "npm:^1.0.3" minizlib: "npm:^2.1.2" dependenciesMeta: encoding: optional: true - checksum: 10c0/33ab2c5bdb3d91b9cb8bc6ae42d7418f4f00f7f7beae14b3bb21ea18f9224e792f560a6e17b6f1be12bbeb70dbe99a269f4204c60e5d99130a0777b153505c43 + checksum: 10c0/1b63c1f3313e88eeac4689f1b71c9f086598db9a189400e3ee960c32ed89e06737fa23976c9305c2d57464fb3fcdc12749d3378805c9d6176f5569b0d0ee8a75 languageName: node linkType: hard -"minipass-fetch@npm:^3.0.0": - version: 3.0.4 - resolution: "minipass-fetch@npm:3.0.4" +"minipass-fetch@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass-fetch@npm:5.0.0" dependencies: encoding: "npm:^0.1.13" minipass: "npm:^7.0.3" minipass-sized: "npm:^1.0.3" - minizlib: "npm:^2.1.2" + minizlib: "npm:^3.0.1" dependenciesMeta: encoding: optional: true - checksum: 10c0/1b63c1f3313e88eeac4689f1b71c9f086598db9a189400e3ee960c32ed89e06737fa23976c9305c2d57464fb3fcdc12749d3378805c9d6176f5569b0d0ee8a75 + checksum: 10c0/9443aab5feab190972f84b64116e54e58dd87a58e62399cae0a4a7461b80568281039b7c3a38ba96453431ebc799d1e26999e548540156216729a4967cd5ef06 languageName: node linkType: hard @@ -23464,7 +23192,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^3.0.0, minipass@npm:^3.1.1, minipass@npm:^3.1.6": +"minipass@npm:^3.0.0": version: 3.3.6 resolution: "minipass@npm:3.3.6" dependencies: @@ -23480,7 +23208,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 @@ -23497,7 +23225,16 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:1.0.4, mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": +"minizlib@npm:^3.0.1, minizlib@npm:^3.1.0": + version: 3.1.0 + resolution: "minizlib@npm:3.1.0" + dependencies: + minipass: "npm:^7.1.2" + checksum: 10c0/5aad75ab0090b8266069c9aabe582c021ae53eb33c6c691054a13a45db3b4f91a7fb1bd79151e6b4e9e9a86727b522527c0a06ec7d45206b745d54cd3097bcec + languageName: node + linkType: hard + +"mkdirp@npm:1.0.4, mkdirp@npm:^1.0.3": version: 1.0.4 resolution: "mkdirp@npm:1.0.4" bin: @@ -23612,7 +23349,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.3": +"ms@npm:2.1.3, ms@npm:^2.1.1, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 @@ -23699,6 +23436,13 @@ __metadata: languageName: node linkType: hard +"nano-spawn@npm:^2.0.0": + version: 2.0.0 + resolution: "nano-spawn@npm:2.0.0" + checksum: 10c0/d00f9b5739f86e28cb732ffd774793e110810cded246b8393c75c4f22674af47f98ee37b19f022ada2d8c9425f800e841caa0662fbff4c0930a10e39339fb366 + languageName: node + linkType: hard + "nanoid@npm:^3.3.11, nanoid@npm:^3.3.6, nanoid@npm:^3.3.8": version: 3.3.11 resolution: "nanoid@npm:3.3.11" @@ -23777,6 +23521,13 @@ __metadata: languageName: node linkType: hard +"negotiator@npm:^1.0.0": + version: 1.0.0 + resolution: "negotiator@npm:1.0.0" + checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b + languageName: node + linkType: hard + "neo-async@npm:^2.5.0, neo-async@npm:^2.6.1, neo-async@npm:^2.6.2": version: 2.6.2 resolution: "neo-async@npm:2.6.2" @@ -23949,24 +23700,23 @@ __metadata: languageName: node linkType: hard -"node-gyp@npm:^9.3.1": - version: 9.4.1 - resolution: "node-gyp@npm:9.4.1" +"node-gyp@npm:^12.1.0": + version: 12.1.0 + resolution: "node-gyp@npm:12.1.0" dependencies: env-paths: "npm:^2.2.0" exponential-backoff: "npm:^3.1.1" - glob: "npm:^7.1.4" graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^10.0.3" - nopt: "npm:^6.0.0" - npmlog: "npm:^6.0.0" - rimraf: "npm:^3.0.2" + make-fetch-happen: "npm:^15.0.0" + nopt: "npm:^9.0.0" + proc-log: "npm:^6.0.0" semver: "npm:^7.3.5" - tar: "npm:^6.1.2" - which: "npm:^2.0.2" + tar: "npm:^7.5.2" + tinyglobby: "npm:^0.2.12" + which: "npm:^6.0.0" bin: node-gyp: bin/node-gyp.js - checksum: 10c0/f7d676cfa79f27d35edf17fe9c80064123670362352d19729e5dc9393d7e99f1397491c3107eddc0c0e8941442a6244a7ba6c860cfbe4b433b4cae248a55fe10 + checksum: 10c0/f43efea8aaf0beb6b2f6184e533edad779b2ae38062953e21951f46221dd104006cc574154f2ad4a135467a5aae92c49e84ef289311a82e08481c5df0e8dc495 languageName: node linkType: hard @@ -24046,25 +23796,25 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^6.0.0": - version: 6.0.0 - resolution: "nopt@npm:6.0.0" +"nopt@npm:^7.0.0, nopt@npm:^7.2.1": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" dependencies: - abbrev: "npm:^1.0.0" + abbrev: "npm:^2.0.0" bin: nopt: bin/nopt.js - checksum: 10c0/837b52c330df16fcaad816b1f54fec6b2854ab1aa771d935c1603fbcf9b023bb073f1466b1b67f48ea4dce127ae675b85b9d9355700e9b109de39db490919786 + checksum: 10c0/a069c7c736767121242037a22a788863accfa932ab285a1eb569eb8cd534b09d17206f68c37f096ae785647435e0c5a5a0a67b42ec743e481a455e5ae6a6df81 languageName: node linkType: hard -"nopt@npm:^7.0.0, nopt@npm:^7.2.1": - version: 7.2.1 - resolution: "nopt@npm:7.2.1" +"nopt@npm:^9.0.0": + version: 9.0.0 + resolution: "nopt@npm:9.0.0" dependencies: - abbrev: "npm:^2.0.0" + abbrev: "npm:^4.0.0" bin: nopt: bin/nopt.js - checksum: 10c0/a069c7c736767121242037a22a788863accfa932ab285a1eb569eb8cd534b09d17206f68c37f096ae785647435e0c5a5a0a67b42ec743e481a455e5ae6a6df81 + checksum: 10c0/1822eb6f9b020ef6f7a7516d7b64a8036e09666ea55ac40416c36e4b2b343122c3cff0e2f085675f53de1d2db99a2a89a60ccea1d120bcd6a5347bf6ceb4a7fd languageName: node linkType: hard @@ -24165,15 +23915,6 @@ __metadata: languageName: node linkType: hard -"npm-run-path@npm:^5.1.0": - version: 5.1.0 - resolution: "npm-run-path@npm:5.1.0" - dependencies: - path-key: "npm:^4.0.0" - checksum: 10c0/ff6d77514489f47fa1c3b1311d09cd4b6d09a874cc1866260f9dea12cbaabda0436ed7f8c2ee44d147bf99a3af29307c6f63b0f83d242b0b6b0ab25dff2629e3 - languageName: node - linkType: hard - "npm-run-path@npm:^6.0.0": version: 6.0.0 resolution: "npm-run-path@npm:6.0.0" @@ -24196,18 +23937,6 @@ __metadata: languageName: node linkType: hard -"npmlog@npm:^6.0.0": - version: 6.0.2 - resolution: "npmlog@npm:6.0.2" - dependencies: - are-we-there-yet: "npm:^3.0.0" - console-control-strings: "npm:^1.1.0" - gauge: "npm:^4.0.3" - set-blocking: "npm:^2.0.0" - checksum: 10c0/0cacedfbc2f6139c746d9cd4a85f62718435ad0ca4a2d6459cd331dd33ae58206e91a0742c1558634efcde3f33f8e8e7fd3adf1bfe7978310cf00bd55cccf890 - languageName: node - linkType: hard - "npmlog@npm:^7.0.0": version: 7.0.1 resolution: "npmlog@npm:7.0.1" @@ -24236,21 +23965,21 @@ __metadata: languageName: node linkType: hard -"nx@npm:22.0.4, nx@npm:^22.0.4": - version: 22.0.4 - resolution: "nx@npm:22.0.4" +"nx@npm:22.1.3, nx@npm:^22.1.3": + version: 22.1.3 + resolution: "nx@npm:22.1.3" dependencies: "@napi-rs/wasm-runtime": "npm:0.2.4" - "@nx/nx-darwin-arm64": "npm:22.0.4" - "@nx/nx-darwin-x64": "npm:22.0.4" - "@nx/nx-freebsd-x64": "npm:22.0.4" - "@nx/nx-linux-arm-gnueabihf": "npm:22.0.4" - "@nx/nx-linux-arm64-gnu": "npm:22.0.4" - "@nx/nx-linux-arm64-musl": "npm:22.0.4" - "@nx/nx-linux-x64-gnu": "npm:22.0.4" - "@nx/nx-linux-x64-musl": "npm:22.0.4" - "@nx/nx-win32-arm64-msvc": "npm:22.0.4" - "@nx/nx-win32-x64-msvc": "npm:22.0.4" + "@nx/nx-darwin-arm64": "npm:22.1.3" + "@nx/nx-darwin-x64": "npm:22.1.3" + "@nx/nx-freebsd-x64": "npm:22.1.3" + "@nx/nx-linux-arm-gnueabihf": "npm:22.1.3" + "@nx/nx-linux-arm64-gnu": "npm:22.1.3" + "@nx/nx-linux-arm64-musl": "npm:22.1.3" + "@nx/nx-linux-x64-gnu": "npm:22.1.3" + "@nx/nx-linux-x64-musl": "npm:22.1.3" + "@nx/nx-win32-arm64-msvc": "npm:22.1.3" + "@nx/nx-win32-x64-msvc": "npm:22.1.3" "@yarnpkg/lockfile": "npm:^1.1.0" "@yarnpkg/parsers": "npm:3.0.2" "@zkochan/js-yaml": "npm:0.0.7" @@ -24317,7 +24046,7 @@ __metadata: bin: nx: bin/nx.js nx-cloud: bin/nx-cloud.js - checksum: 10c0/0701c118f890d3a205532b96770f5a0de565efa5ee15d20384d7c124e489bed863b16d41478036dc3f600a654ea34e2bfbe48c4fdece7d2e527636f594784e63 + checksum: 10c0/d6bbc6bb4df78cd84b0f02a51dca7e94c31a7f102b29b24b67dea6c32063704bd9ba2083b6b27b4ec60f91484b7ed4ae7370ef46ab77646d88e98f9da58500c2 languageName: node linkType: hard @@ -24503,15 +24232,6 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^6.0.0": - version: 6.0.0 - resolution: "onetime@npm:6.0.0" - dependencies: - mimic-fn: "npm:^4.0.0" - checksum: 10c0/4eef7c6abfef697dd4479345a4100c382d73c149d2d56170a54a07418c50816937ad09500e1ed1e79d235989d073a9bade8557122aee24f0576ecde0f392bb6c - languageName: node - linkType: hard - "onetime@npm:^7.0.0": version: 7.0.0 resolution: "onetime@npm:7.0.0" @@ -24687,6 +24407,72 @@ __metadata: languageName: node linkType: hard +"oxc-resolver@npm:^11.13.2": + version: 11.14.0 + resolution: "oxc-resolver@npm:11.14.0" + dependencies: + "@oxc-resolver/binding-android-arm-eabi": "npm:11.14.0" + "@oxc-resolver/binding-android-arm64": "npm:11.14.0" + "@oxc-resolver/binding-darwin-arm64": "npm:11.14.0" + "@oxc-resolver/binding-darwin-x64": "npm:11.14.0" + "@oxc-resolver/binding-freebsd-x64": "npm:11.14.0" + "@oxc-resolver/binding-linux-arm-gnueabihf": "npm:11.14.0" + "@oxc-resolver/binding-linux-arm-musleabihf": "npm:11.14.0" + "@oxc-resolver/binding-linux-arm64-gnu": "npm:11.14.0" + "@oxc-resolver/binding-linux-arm64-musl": "npm:11.14.0" + "@oxc-resolver/binding-linux-ppc64-gnu": "npm:11.14.0" + "@oxc-resolver/binding-linux-riscv64-gnu": "npm:11.14.0" + "@oxc-resolver/binding-linux-riscv64-musl": "npm:11.14.0" + "@oxc-resolver/binding-linux-s390x-gnu": "npm:11.14.0" + "@oxc-resolver/binding-linux-x64-gnu": "npm:11.14.0" + "@oxc-resolver/binding-linux-x64-musl": "npm:11.14.0" + "@oxc-resolver/binding-wasm32-wasi": "npm:11.14.0" + "@oxc-resolver/binding-win32-arm64-msvc": "npm:11.14.0" + "@oxc-resolver/binding-win32-ia32-msvc": "npm:11.14.0" + "@oxc-resolver/binding-win32-x64-msvc": "npm:11.14.0" + dependenciesMeta: + "@oxc-resolver/binding-android-arm-eabi": + optional: true + "@oxc-resolver/binding-android-arm64": + optional: true + "@oxc-resolver/binding-darwin-arm64": + optional: true + "@oxc-resolver/binding-darwin-x64": + optional: true + "@oxc-resolver/binding-freebsd-x64": + optional: true + "@oxc-resolver/binding-linux-arm-gnueabihf": + optional: true + "@oxc-resolver/binding-linux-arm-musleabihf": + optional: true + "@oxc-resolver/binding-linux-arm64-gnu": + optional: true + "@oxc-resolver/binding-linux-arm64-musl": + optional: true + "@oxc-resolver/binding-linux-ppc64-gnu": + optional: true + "@oxc-resolver/binding-linux-riscv64-gnu": + optional: true + "@oxc-resolver/binding-linux-riscv64-musl": + optional: true + "@oxc-resolver/binding-linux-s390x-gnu": + optional: true + "@oxc-resolver/binding-linux-x64-gnu": + optional: true + "@oxc-resolver/binding-linux-x64-musl": + optional: true + "@oxc-resolver/binding-wasm32-wasi": + optional: true + "@oxc-resolver/binding-win32-arm64-msvc": + optional: true + "@oxc-resolver/binding-win32-ia32-msvc": + optional: true + "@oxc-resolver/binding-win32-x64-msvc": + optional: true + checksum: 10c0/07fc64fc69462860d7e1dcb32d10880670cd777936d99721b523e8d095df8240fa01ee624aafc19978010b7b788bfb53202cea2b70efe5fc43bc1d1296025e6b + languageName: node + linkType: hard + "p-event@npm:^4.1.0": version: 4.2.0 resolution: "p-event@npm:4.2.0" @@ -24728,7 +24514,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": +"p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -24746,12 +24532,12 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^6.2.0": - version: 6.2.0 - resolution: "p-limit@npm:6.2.0" +"p-limit@npm:^7.2.0": + version: 7.2.0 + resolution: "p-limit@npm:7.2.0" dependencies: - yocto-queue: "npm:^1.1.1" - checksum: 10c0/448bf55a1776ca1444594d53b3c731e68cdca00d44a6c8df06a2f6e506d5bbd540ebb57b05280f8c8bff992a630ed782a69612473f769a7473495d19e2270166 + yocto-queue: "npm:^1.2.1" + checksum: 10c0/18e5ea305c31fdc0cf5260da7b63adfd46748cd72d4b40a31a13bd23eeece729c9308047fb5d848d7fa006d1b2fc2f36bb0d9dd173a300c38cd6dc1ed3355382 languageName: node linkType: hard @@ -24809,13 +24595,10 @@ __metadata: languageName: node linkType: hard -"p-retry@npm:^5.1.2": - version: 5.1.2 - resolution: "p-retry@npm:5.1.2" - dependencies: - "@types/retry": "npm:0.12.1" - retry: "npm:^0.13.1" - checksum: 10c0/9017001ebfbe2a08cf45c970106f6953f5c76d1f8d8e9ff81afcbf6c25fe9f0e13499c5ac49b35d114672cf15689a952f4f3287fd1316420eb810a5a99ecf4e7 +"p-map@npm:^7.0.2": + version: 7.0.4 + resolution: "p-map@npm:7.0.4" + checksum: 10c0/a5030935d3cb2919d7e89454d1ce82141e6f9955413658b8c9403cfe379283770ed3048146b44cde168aa9e8c716505f196d5689db0ae3ce9a71521a2fef3abd languageName: node linkType: hard @@ -24830,6 +24613,15 @@ __metadata: languageName: node linkType: hard +"p-retry@npm:^7.1.0": + version: 7.1.0 + resolution: "p-retry@npm:7.1.0" + dependencies: + is-network-error: "npm:^1.1.0" + checksum: 10c0/fe756dac411bd104901b383f6b95214f453a5f5aa4e289d3642b937c62cf4fcfc77f6276b570388a686b2923af6d43e71b29c3b2abe062cb7070176d00627081 + languageName: node + linkType: hard + "p-timeout@npm:^3.1.0": version: 3.2.0 resolution: "p-timeout@npm:3.2.0" @@ -25307,7 +25099,7 @@ __metadata: languageName: node linkType: hard -"pidtree@npm:0.6.0, pidtree@npm:^0.6.0": +"pidtree@npm:^0.6.0": version: 0.6.0 resolution: "pidtree@npm:0.6.0" bin: @@ -26030,7 +25822,7 @@ __metadata: languageName: node linkType: hard -"pretty-ms@npm:^9.0.0, pretty-ms@npm:^9.2.0": +"pretty-ms@npm:^9.2.0": version: 9.3.0 resolution: "pretty-ms@npm:9.3.0" dependencies: @@ -26079,6 +25871,13 @@ __metadata: languageName: node linkType: hard +"proc-log@npm:^6.0.0": + version: 6.1.0 + resolution: "proc-log@npm:6.1.0" + checksum: 10c0/4f178d4062733ead9d71a9b1ab24ebcecdfe2250916a5b1555f04fe2eda972a0ec76fbaa8df1ad9c02707add6749219d118a4fc46dc56bdfe4dde4b47d80bb82 + languageName: node + linkType: hard + "process-ancestry@npm:^0.0.2": version: 0.0.2 resolution: "process-ancestry@npm:0.0.2" @@ -26121,13 +25920,6 @@ __metadata: languageName: node linkType: hard -"promise-inflight@npm:^1.0.1": - version: 1.0.1 - resolution: "promise-inflight@npm:1.0.1" - checksum: 10c0/d179d148d98fbff3d815752fa9a08a87d3190551d1420f17c4467f628214db12235ae068d98cd001f024453676d8985af8f28f002345646c4ece4600a79620bc - languageName: node - linkType: hard - "promise-map-series@npm:^0.2.1": version: 0.2.3 resolution: "promise-map-series@npm:0.2.3" @@ -27684,16 +27476,6 @@ __metadata: languageName: node linkType: hard -"restore-cursor@npm:^4.0.0": - version: 4.0.0 - resolution: "restore-cursor@npm:4.0.0" - dependencies: - onetime: "npm:^5.1.0" - signal-exit: "npm:^3.0.2" - checksum: 10c0/6f7da8c5e422ac26aa38354870b1afac09963572cf2879443540449068cb43476e9cbccf6f8de3e0171e0d6f7f533c2bc1a0a008003c9a525bbc098e89041318 - languageName: node - linkType: hard - "restore-cursor@npm:^5.0.0": version: 5.1.0 resolution: "restore-cursor@npm:5.1.0" @@ -27752,7 +27534,7 @@ __metadata: languageName: node linkType: hard -"rfdc@npm:^1.3.0, rfdc@npm:^1.4.1": +"rfdc@npm:^1.4.1": version: 1.4.1 resolution: "rfdc@npm:1.4.1" checksum: 10c0/4614e4292356cafade0b6031527eea9bc90f2372a22c012313be1dcc69a3b90c7338158b414539be863fa95bfcb2ddcd0587be696841af4e6679d85e62c060c7 @@ -27781,15 +27563,15 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^6.0.1": - version: 6.1.0 - resolution: "rimraf@npm:6.1.0" +"rimraf@npm:^6.0.1, rimraf@npm:^6.1.2": + version: 6.1.2 + resolution: "rimraf@npm:6.1.2" dependencies: - glob: "npm:^11.0.3" + glob: "npm:^13.0.0" package-json-from-dist: "npm:^1.0.1" bin: rimraf: dist/esm/bin.mjs - checksum: 10c0/19658c91a08e43cd5f930384410135a1194082d5e73e0863137bc02c03d684817e30848f734ef05ec84094fe5e3eb9ffd6814ecec65d8fc2e234f5c391ab42e0 + checksum: 10c0/c11a6a6fad937ada03c12fe688860690df8296d7cd08dbe59e3cc087f44e43573ae26ecbe48e54cb7a6db745b8c81fe5a15b9359233cc21d52d9b5b3330fcc74 languageName: node linkType: hard @@ -28722,7 +28504,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.7": +"signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 @@ -28847,10 +28629,10 @@ __metadata: languageName: node linkType: hard -"smol-toml@npm:^1.3.1": - version: 1.3.1 - resolution: "smol-toml@npm:1.3.1" - checksum: 10c0/bac5bf4f2655fd561fe41f9426d70ab68b486631beff97a7f127f5d2f811b5e247d50a06583be03d35a625dcb05b7984b94a61a81c68ea2810ac7a9bf4edc64d +"smol-toml@npm:^1.5.2": + version: 1.5.2 + resolution: "smol-toml@npm:1.5.2" + checksum: 10c0/ccfe5dda80c1d0c45869140b1e695a13a81ba7c57c1ca083146fe2f475d6f57031c12410f95d53a5acb3a1504e8e8e12cab36871909e8c8ce0c7011ccd22a2ac languageName: node linkType: hard @@ -28865,35 +28647,24 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "socks-proxy-agent@npm:7.0.0" - dependencies: - agent-base: "npm:^6.0.2" - debug: "npm:^4.3.3" - socks: "npm:^2.6.2" - checksum: 10c0/b859f7eb8e96ec2c4186beea233ae59c02404094f3eb009946836af27d6e5c1627d1975a69b4d2e20611729ed543b6db3ae8481eb38603433c50d0345c987600 - languageName: node - linkType: hard - -"socks-proxy-agent@npm:^8.0.1": - version: 8.0.2 - resolution: "socks-proxy-agent@npm:8.0.2" +"socks-proxy-agent@npm:^8.0.1, socks-proxy-agent@npm:^8.0.3": + version: 8.0.5 + resolution: "socks-proxy-agent@npm:8.0.5" dependencies: - agent-base: "npm:^7.0.2" + agent-base: "npm:^7.1.2" debug: "npm:^4.3.4" - socks: "npm:^2.7.1" - checksum: 10c0/a842402fc9b8848a31367f2811ca3cd14c4106588b39a0901cd7a69029998adfc6456b0203617c18ed090542ad0c24ee4e9d4c75a0c4b75071e214227c177eb7 + socks: "npm:^2.8.3" + checksum: 10c0/5d2c6cecba6821389aabf18728325730504bf9bb1d9e342e7987a5d13badd7a98838cc9a55b8ed3cb866ad37cc23e1086f09c4d72d93105ce9dfe76330e9d2a6 languageName: node linkType: hard -"socks@npm:^2.6.2, socks@npm:^2.7.1": - version: 2.8.4 - resolution: "socks@npm:2.8.4" +"socks@npm:^2.8.3": + version: 2.8.7 + resolution: "socks@npm:2.8.7" dependencies: - ip-address: "npm:^9.0.5" + ip-address: "npm:^10.0.1" smart-buffer: "npm:^4.2.0" - checksum: 10c0/00c3271e233ccf1fb83a3dd2060b94cc37817e0f797a93c560b9a7a86c4a0ec2961fb31263bdd24a3c28945e24868b5f063cd98744171d9e942c513454b50ae5 + checksum: 10c0/2805a43a1c4bcf9ebf6e018268d87b32b32b06fbbc1f9282573583acc155860dc361500f89c73bfbb157caa1b4ac78059eac0ef15d1811eb0ca75e0bdadbc9d2 languageName: node linkType: hard @@ -29031,7 +28802,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.5.0, source-map@npm:^0.5.7": +"source-map@npm:^0.5.7": version: 0.5.7 resolution: "source-map@npm:0.5.7" checksum: 10c0/904e767bb9c494929be013017380cbba013637da1b28e5943b566031e29df04fba57edf3f093e0914be094648b577372bd8ad247fa98cfba9c600794cd16b599 @@ -29127,7 +28898,7 @@ __metadata: languageName: node linkType: hard -"sprintf-js@npm:^1.1.1, sprintf-js@npm:^1.1.3": +"sprintf-js@npm:^1.1.1": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3" checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec @@ -29171,6 +28942,15 @@ __metadata: languageName: node linkType: hard +"ssri@npm:^13.0.0": + version: 13.0.0 + resolution: "ssri@npm:13.0.0" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/405f3a531cd98b013cecb355d63555dca42fd12c7bc6671738aaa9a82882ff41cdf0ef9a2b734ca4f9a760338f114c29d01d9238a65db3ccac27929bd6e6d4b2 + languageName: node + linkType: hard + "ssri@npm:^5.2.4": version: 5.3.0 resolution: "ssri@npm:5.3.0" @@ -29180,15 +28960,6 @@ __metadata: languageName: node linkType: hard -"ssri@npm:^9.0.0": - version: 9.0.1 - resolution: "ssri@npm:9.0.1" - dependencies: - minipass: "npm:^3.1.1" - checksum: 10c0/c5d153ce03b5980d683ecaa4d805f6a03d8dc545736213803e168a1907650c46c08a4e5ce6d670a0205482b35c35713d9d286d9133bdd79853a406e22ad81f04 - languageName: node - linkType: hard - "stable-hash@npm:^0.0.5": version: 0.0.5 resolution: "stable-hash@npm:0.0.5" @@ -29273,7 +29044,7 @@ __metadata: "@storybook/icons": "npm:^2.0.1" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" - typescript: "npm:^5.8.3" + typescript: "npm:^5.9.3" peerDependencies: storybook: "workspace:^" languageName: unknown @@ -29343,7 +29114,7 @@ __metadata: bundle-require: "npm:^5.1.0" camelcase: "npm:^8.0.0" chai: "npm:^5.1.1" - commander: "npm:^14.0.1" + commander: "npm:^14.0.2" comment-parser: "npm:^1.4.1" copy-to-clipboard: "npm:^3.3.1" cross-spawn: "npm:^7.0.6" @@ -29357,15 +29128,15 @@ __metadata: empathic: "npm:^2.0.0" es-toolkit: "npm:^1.36.0" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0" - execa: "npm:^8.0.1" + execa: "npm:^9.6.0" exsolve: "npm:^1.0.7" fetch-retry: "npm:^6.0.0" flush-promises: "npm:^1.0.2" fuse.js: "npm:^3.6.1" - get-npm-tarball-url: "npm:^2.0.3" + get-npm-tarball-url: "npm:^2.1.0" glob: "npm:^10.5.0" globby: "npm:^14.1.0" - jiti: "npm:^2.4.2" + jiti: "npm:^2.6.1" js-yaml: "npm:^4.1.0" jsdoc-type-pratt-parser: "npm:^4.0.0" launch-editor: "npm:^2.11.1" @@ -29377,7 +29148,7 @@ __metadata: nanoid: "npm:^4.0.2" npmlog: "npm:^7.0.0" open: "npm:^10.2.0" - p-limit: "npm:^6.2.0" + p-limit: "npm:^7.2.0" package-manager-detector: "npm:^1.1.0" picocolors: "npm:^1.1.0" picomatch: "npm:^2.3.0" @@ -29484,7 +29255,7 @@ __metadata: languageName: node linkType: hard -"string-argv@npm:0.3.2, string-argv@npm:^0.3.2": +"string-argv@npm:^0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" checksum: 10c0/75c02a83759ad1722e040b86823909d9a2fc75d15dd71ec4b537c3560746e33b5f5a07f7332d1e3f88319909f82190843aa2f0a0d8c8d591ec08e93d5b8dec82 @@ -29513,7 +29284,7 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^5.0.0, string-width@npm:^5.0.1, string-width@npm:^5.1.2": +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": version: 5.1.2 resolution: "string-width@npm:5.1.2" dependencies: @@ -29535,6 +29306,16 @@ __metadata: languageName: node linkType: hard +"string-width@npm:^8.0.0": + version: 8.1.0 + resolution: "string-width@npm:8.1.0" + dependencies: + get-east-asian-width: "npm:^1.3.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/749b5d0dab2532b4b6b801064230f4da850f57b3891287023117ab63a464ad79dd208f42f793458f48f3ad121fe2e1f01dd525ff27ead957ed9f205e27406593 + languageName: node + linkType: hard + "string.prototype.includes@npm:^2.0.1": version: 2.0.1 resolution: "string.prototype.includes@npm:2.0.1" @@ -29707,13 +29488,6 @@ __metadata: languageName: node linkType: hard -"strip-final-newline@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-final-newline@npm:3.0.0" - checksum: 10c0/a771a17901427bac6293fd416db7577e2bc1c34a19d38351e9d5478c3c415f523f391003b42ed475f27e33a78233035df183525395f731d3bfb8cdcbd4da08ce - languageName: node - linkType: hard - "strip-final-newline@npm:^4.0.0": version: 4.0.0 resolution: "strip-final-newline@npm:4.0.0" @@ -29737,10 +29511,10 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:5.0.1": - version: 5.0.1 - resolution: "strip-json-comments@npm:5.0.1" - checksum: 10c0/c9d9d55a0167c57aa688df3aa20628cf6f46f0344038f189eaa9d159978e80b2bfa6da541a40d83f7bde8a3554596259bf6b70578b2172356536a0e3fa5a0982 +"strip-json-comments@npm:5.0.3, strip-json-comments@npm:^5.0.1": + version: 5.0.3 + resolution: "strip-json-comments@npm:5.0.3" + checksum: 10c0/daaf20b29f69fb51112698f4a9a662490dbb78d5baf6127c75a0a83c2ac6c078a8c0f74b389ad5e0519d6fc359c4a57cb9971b1ae201aef62ce45a13247791e0 languageName: node linkType: hard @@ -29751,13 +29525,6 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^5.0.1": - version: 5.0.3 - resolution: "strip-json-comments@npm:5.0.3" - checksum: 10c0/daaf20b29f69fb51112698f4a9a662490dbb78d5baf6127c75a0a83c2ac6c078a8c0f74b389ad5e0519d6fc359c4a57cb9971b1ae201aef62ce45a13247791e0 - languageName: node - linkType: hard - "strip-literal@npm:^3.0.0": version: 3.0.0 resolution: "strip-literal@npm:3.0.0" @@ -30055,6 +29822,19 @@ __metadata: languageName: node linkType: hard +"tar@npm:^7.5.2": + version: 7.5.2 + resolution: "tar@npm:7.5.2" + dependencies: + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.1.0" + yallist: "npm:^5.0.0" + checksum: 10c0/a7d8b801139b52f93a7e34830db0de54c5aa45487c7cb551f6f3d44a112c67f1cb8ffdae856b05fd4f17b1749911f1c26f1e3a23bbe0279e17fd96077f13f467 + languageName: node + linkType: hard + "teeny-request@npm:7.0.1": version: 7.0.1 resolution: "teeny-request@npm:7.0.1" @@ -30286,7 +30066,7 @@ __metadata: languageName: node linkType: hard -"tinyglobby@npm:^0.2.10, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15, tinyglobby@npm:^0.2.9": +"tinyglobby@npm:^0.2.10, tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15, tinyglobby@npm:^0.2.9": version: 0.2.15 resolution: "tinyglobby@npm:0.2.15" dependencies: @@ -30806,7 +30586,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.8.3": +"typescript@npm:^5.9.3": version: 5.9.3 resolution: "typescript@npm:5.9.3" bin: @@ -30816,7 +30596,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.8.3#optional!builtin": +"typescript@patch:typescript@npm%3A^5.9.3#optional!builtin": version: 5.9.3 resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5" bin: @@ -30945,15 +30725,6 @@ __metadata: languageName: node linkType: hard -"unique-filename@npm:^2.0.0": - version: 2.0.1 - resolution: "unique-filename@npm:2.0.1" - dependencies: - unique-slug: "npm:^3.0.0" - checksum: 10c0/55d95cd670c4a86117ebc34d394936d712d43b56db6bc511f9ca00f666373818bf9f075fb0ab76bcbfaf134592ef26bb75aad20786c1ff1ceba4457eaba90fb8 - languageName: node - linkType: hard - "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0" @@ -30963,12 +30734,12 @@ __metadata: languageName: node linkType: hard -"unique-slug@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-slug@npm:3.0.0" +"unique-filename@npm:^5.0.0": + version: 5.0.0 + resolution: "unique-filename@npm:5.0.0" dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/617240eb921af803b47d322d75a71a363dacf2e56c29ae5d1404fad85f64f4ec81ef10ee4fd79215d0202cbe1e5a653edb0558d59c9c81d3bd538c2d58e4c026 + unique-slug: "npm:^6.0.0" + checksum: 10c0/afb897e9cf4c2fb622ea716f7c2bb462001928fc5f437972213afdf1cc32101a230c0f1e9d96fc91ee5185eca0f2feb34127145874975f347be52eb91d6ccc2c languageName: node linkType: hard @@ -30981,6 +30752,15 @@ __metadata: languageName: node linkType: hard +"unique-slug@npm:^6.0.0": + version: 6.0.0 + resolution: "unique-slug@npm:6.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10c0/da7ade4cb04eb33ad0499861f82fe95ce9c7c878b7139dc54d140ecfb6a6541c18a5c8dac16188b8b379fe62c0c1f1b710814baac910cde5f4fec06212126c6a + languageName: node + linkType: hard + "unique-string@npm:^3.0.0": version: 3.0.0 resolution: "unique-string@npm:3.0.0" @@ -32144,6 +31924,13 @@ __metadata: languageName: node linkType: hard +"walk-up-path@npm:^4.0.0": + version: 4.0.0 + resolution: "walk-up-path@npm:4.0.0" + checksum: 10c0/fabe344f91387d1d41df230af962ef18bf703dd4178006d55cd6412caacd187b54440002d4d53a982d4f7f0455567dcffb6d3884533c8b2268928eca3ebd8a19 + languageName: node + linkType: hard + "warning@npm:^4.0.2": version: 4.0.3 resolution: "warning@npm:4.0.3" @@ -32593,7 +32380,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^2.0.1, which@npm:^2.0.2": +"which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -32615,6 +32402,17 @@ __metadata: languageName: node linkType: hard +"which@npm:^6.0.0": + version: 6.0.0 + resolution: "which@npm:6.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10c0/fe9d6463fe44a76232bb6e3b3181922c87510a5b250a98f1e43a69c99c079b3f42ddeca7e03d3e5f2241bf2d334f5a7657cfa868b97c109f3870625842f4cc15 + languageName: node + linkType: hard + "why-is-node-running@npm:^2.3.0": version: 2.3.0 resolution: "why-is-node-running@npm:2.3.0" @@ -32723,7 +32521,7 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^8.0.1, wrap-ansi@npm:^8.1.0": +"wrap-ansi@npm:^8.1.0": version: 8.1.0 resolution: "wrap-ansi@npm:8.1.0" dependencies: @@ -32855,6 +32653,13 @@ __metadata: languageName: node linkType: hard +"yallist@npm:^5.0.0": + version: 5.0.0 + resolution: "yallist@npm:5.0.0" + checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 + languageName: node + linkType: hard + "yaml-loader@npm:^0.8.1": version: 0.8.1 resolution: "yaml-loader@npm:0.8.1" @@ -32866,13 +32671,6 @@ __metadata: languageName: node linkType: hard -"yaml@npm:2.3.1": - version: 2.3.1 - resolution: "yaml@npm:2.3.1" - checksum: 10c0/ed4c21a907fb1cd60a25177612fa46d95064a144623d269199817908475fe85bef20fb17406e3bdc175351b6488056a6f84beb7836e8c262646546a0220188e3 - languageName: node - linkType: hard - "yaml@npm:^1.10.0": version: 1.10.2 resolution: "yaml@npm:1.10.2" @@ -32880,7 +32678,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.0.0, yaml@npm:^2.6.0, yaml@npm:^2.7.0, yaml@npm:^2.8.1": +"yaml@npm:^2.0.0, yaml@npm:^2.6.0, yaml@npm:^2.8.1": version: 2.8.1 resolution: "yaml@npm:2.8.1" bin: @@ -32979,7 +32777,7 @@ __metadata: languageName: node linkType: hard -"yocto-queue@npm:^1.0.0, yocto-queue@npm:^1.1.1": +"yocto-queue@npm:^1.0.0, yocto-queue@npm:^1.2.1": version: 1.2.2 resolution: "yocto-queue@npm:1.2.2" checksum: 10c0/36d4793e9cf7060f9da543baf67c55e354f4862c8d3d34de1a1b1d7c382d44171315cc54abf84d8900b8113d742b830108a1434f4898fb244f9b7e8426d4b8f5 @@ -33007,15 +32805,6 @@ __metadata: languageName: node linkType: hard -"zod-validation-error@npm:^3.0.3": - version: 3.3.1 - resolution: "zod-validation-error@npm:3.3.1" - peerDependencies: - zod: ^3.18.0 - checksum: 10c0/53869a8478f42cd38f51e159431fe7af9e0b456e8078c6d9d906adb212753788defa9c8bd7374e9ecd4a688b6736fcfa091aebac65054328b8cfdecce9395d8e - languageName: node - linkType: hard - "zod@npm:3.22.4": version: 3.22.4 resolution: "zod@npm:3.22.4" @@ -33023,13 +32812,20 @@ __metadata: languageName: node linkType: hard -"zod@npm:^3.22.4, zod@npm:^3.25.76": +"zod@npm:^3.25.76": version: 3.25.76 resolution: "zod@npm:3.25.76" checksum: 10c0/5718ec35e3c40b600316c5b4c5e4976f7fee68151bc8f8d90ec18a469be9571f072e1bbaace10f1e85cf8892ea12d90821b200e980ab46916a6166a4260a983c languageName: node linkType: hard +"zod@npm:^4.1.11": + version: 4.1.13 + resolution: "zod@npm:4.1.13" + checksum: 10c0/d7e74e82dba81a91ffc3239cd85bc034abe193a28f7087a94ab258a3e48e9a7ca4141920cac979a0d781495b48fc547777394149f26be04c3dc642f58bbc3941 + languageName: node + linkType: hard + "zone.js@npm:^0.15.0": version: 0.15.1 resolution: "zone.js@npm:0.15.1" From e0d69b6e69dc9a08ad793fd44b02180b2336c9b4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 21:24:28 +0100 Subject: [PATCH 100/310] apply new linting --- .../vitest/src/node/boot-test-runner.test.ts | 5 ++- .../src/plugins/webpack-stats-plugin.ts | 4 +-- .../storybook-mock-transform-loader.ts | 2 +- .../src/loaders/webpack-automock-loader.ts | 2 +- code/builders/builder-webpack5/src/types.ts | 6 ++-- code/core/src/actions/runtime/action.ts | 6 ++-- .../components/components/Select/Select.tsx | 6 ++-- .../src/components/components/Tabs/Button.tsx | 12 ++++--- .../components/tooltip/WithTooltip.tsx | 3 +- code/core/src/core-server/build-static.ts | 5 ++- code/core/src/csf-tools/CsfFile.ts | 9 +++-- code/core/src/csf/csf-factories.ts | 5 +-- code/core/src/csf/story.ts | 33 ++++++++++++------- code/core/src/highlight/useHighlights.ts | 1 - .../src/manager/components/layout/Layout.tsx | 6 ++-- code/core/src/mocking-utils/esmWalker.ts | 1 - code/core/src/types/modules/addons.ts | 6 ++-- code/core/src/types/modules/story.ts | 5 +-- code/e2e-tests/addon-docs.spec.ts | 1 - .../angular/src/client/argsToTemplate.ts | 8 +++-- .../nextjs/src/swc/next-swc-loader-patch.ts | 1 - .../componentManifest/getComponentImports.ts | 4 +-- code/renderers/react/src/preview.tsx | 8 +++-- code/renderers/svelte/src/types.ts | 5 +-- .../template/components/Button.js | 2 +- .../template/stories/demo-wc-card.stories.js | 2 +- 26 files changed, 86 insertions(+), 62 deletions(-) diff --git a/code/addons/vitest/src/node/boot-test-runner.test.ts b/code/addons/vitest/src/node/boot-test-runner.test.ts index 87eae0cd7577..80f30bf856fe 100644 --- a/code/addons/vitest/src/node/boot-test-runner.test.ts +++ b/code/addons/vitest/src/node/boot-test-runner.test.ts @@ -100,9 +100,8 @@ describe('bootTestRunner', () => { } as Options; beforeEach(async () => { - const { experimental_MockUniversalStore: MockUniversalStore } = await import( - 'storybook/internal/core-server' - ); + const { experimental_MockUniversalStore: MockUniversalStore } = + await import('storybook/internal/core-server'); mockStore = new MockUniversalStore(storeOptions); vi.mocked(executeNodeCommand).mockClear(); vi.mocked(log).mockClear(); diff --git a/code/builders/builder-vite/src/plugins/webpack-stats-plugin.ts b/code/builders/builder-vite/src/plugins/webpack-stats-plugin.ts index f75adb270842..0f6c1c441be9 100644 --- a/code/builders/builder-vite/src/plugins/webpack-stats-plugin.ts +++ b/code/builders/builder-vite/src/plugins/webpack-stats-plugin.ts @@ -52,8 +52,8 @@ function isUserCode(moduleName: string) { return Boolean( !moduleName.startsWith('vite/') && - !moduleName.startsWith('\0') && - moduleName !== 'react/jsx-runtime' + !moduleName.startsWith('\0') && + moduleName !== 'react/jsx-runtime' ); } diff --git a/code/builders/builder-webpack5/src/loaders/storybook-mock-transform-loader.ts b/code/builders/builder-webpack5/src/loaders/storybook-mock-transform-loader.ts index ebc0aa6c402b..f89f32ca83a8 100644 --- a/code/builders/builder-webpack5/src/loaders/storybook-mock-transform-loader.ts +++ b/code/builders/builder-webpack5/src/loaders/storybook-mock-transform-loader.ts @@ -6,8 +6,8 @@ import type { LoaderDefinition } from 'webpack'; /** * A Webpack loader that normalize sb.mock(import(...)) calls to sb.mock(...) * - * @param source The original source code of the preview config file. * @this The Webpack loader context. + * @param source The original source code of the preview config file. */ const storybookMockTransformLoader: LoaderDefinition = function mockTransformLoaderFn( source, diff --git a/code/builders/builder-webpack5/src/loaders/webpack-automock-loader.ts b/code/builders/builder-webpack5/src/loaders/webpack-automock-loader.ts index 8fa9d7dfb952..343140306834 100644 --- a/code/builders/builder-webpack5/src/loaders/webpack-automock-loader.ts +++ b/code/builders/builder-webpack5/src/loaders/webpack-automock-loader.ts @@ -19,8 +19,8 @@ interface AutomockLoaderOptions { * This loader is intended to be used by `WebpackMockPlugin` when no `__mocks__` file is found for a * module specified in `sb.mock()`. * - * @param {string} source The original source code of the module. * @this {LoaderContext} The Webpack loader context. + * @param {string} source The original source code of the module. */ export default function webpackAutomockLoader( this: LoaderContext, diff --git a/code/builders/builder-webpack5/src/types.ts b/code/builders/builder-webpack5/src/types.ts index 9a68c77b6ad6..d750dd543ca9 100644 --- a/code/builders/builder-webpack5/src/types.ts +++ b/code/builders/builder-webpack5/src/types.ts @@ -16,8 +16,10 @@ export interface TypescriptOptions extends TypeScriptOptionsBase { checkOptions?: ConstructorParameters[0]; } -export interface StorybookConfigWebpack - extends Omit { +export interface StorybookConfigWebpack extends Omit< + StorybookConfig, + 'webpack' | 'webpackFinal' | 'features' +> { /** * Modify or return a custom Webpack config after the Storybook's default configuration has run * (mostly used by addons). diff --git a/code/core/src/actions/runtime/action.ts b/code/core/src/actions/runtime/action.ts index c0ce50bb035d..6e9c6c65a519 100644 --- a/code/core/src/actions/runtime/action.ts +++ b/code/core/src/actions/runtime/action.ts @@ -22,9 +22,9 @@ const findProto = (obj: unknown, callback: (proto: any) => boolean): Function | const isReactSyntheticEvent = (e: unknown): e is SyntheticEvent => Boolean( typeof e === 'object' && - e && - findProto(e, (proto) => /^Synthetic(?:Base)?Event$/.test(proto.constructor.name)) && - typeof (e as SyntheticEvent).persist === 'function' + e && + findProto(e, (proto) => /^Synthetic(?:Base)?Event$/.test(proto.constructor.name)) && + typeof (e as SyntheticEvent).persist === 'function' ); const serializeArg = (a: T) => { if (isReactSyntheticEvent(a)) { diff --git a/code/core/src/components/components/Select/Select.tsx b/code/core/src/components/components/Select/Select.tsx index 961e2990e9e6..de445dca8970 100644 --- a/code/core/src/components/components/Select/Select.tsx +++ b/code/core/src/components/components/Select/Select.tsx @@ -25,8 +25,10 @@ import { valueToExternal, } from './helpers'; -export interface SelectProps - extends Omit { +export interface SelectProps extends Omit< + ButtonProps, + 'onClick' | 'onChange' | 'onSelect' | 'variant' +> { size?: 'small' | 'medium'; padding?: 'small' | 'medium' | 'none'; diff --git a/code/core/src/components/components/Tabs/Button.tsx b/code/core/src/components/components/Tabs/Button.tsx index 085c50286f2a..89ab4df8e85f 100644 --- a/code/core/src/components/components/Tabs/Button.tsx +++ b/code/core/src/components/components/Tabs/Button.tsx @@ -14,13 +14,17 @@ import { deprecate } from 'storybook/internal/client-logger'; import { isPropValid, styled } from 'storybook/theming'; -interface ButtonProps - extends DetailedHTMLProps, HTMLButtonElement> { +interface ButtonProps extends DetailedHTMLProps< + ButtonHTMLAttributes, + HTMLButtonElement +> { href?: never; target?: never; } -interface LinkProps - extends DetailedHTMLProps, HTMLAnchorElement> { +interface LinkProps extends DetailedHTMLProps< + AnchorHTMLAttributes, + HTMLAnchorElement +> { disabled?: void; href: string; } diff --git a/code/core/src/components/components/tooltip/WithTooltip.tsx b/code/core/src/components/components/tooltip/WithTooltip.tsx index f08d77bcf830..9e5b6b3b890d 100644 --- a/code/core/src/components/components/tooltip/WithTooltip.tsx +++ b/code/core/src/components/components/tooltip/WithTooltip.tsx @@ -177,7 +177,8 @@ interface WithHideFn { } export interface WithTooltipPureProps - extends Omit, + extends + Omit, Omit, 'trigger'>, PopperOptions { svg?: boolean; diff --git a/code/core/src/core-server/build-static.ts b/code/core/src/core-server/build-static.ts index 592c5e108c80..bb8fa8f81072 100644 --- a/code/core/src/core-server/build-static.ts +++ b/code/core/src/core-server/build-static.ts @@ -64,9 +64,8 @@ export async function buildStaticStandalone(options: BuildStaticStandaloneOption resolvePackageDir('storybook'), 'dist/core-server/presets/common-preset.js' ); - const commonOverridePreset = import.meta.resolve( - 'storybook/internal/core-server/presets/common-override-preset' - ); + const commonOverridePreset = import.meta + .resolve('storybook/internal/core-server/presets/common-override-preset'); logger.step('Loading presets'); let presets = await loadAllPresets({ diff --git a/code/core/src/csf-tools/CsfFile.ts b/code/core/src/csf-tools/CsfFile.ts index 1f2d39e031da..a626e72a4028 100644 --- a/code/core/src/csf-tools/CsfFile.ts +++ b/code/core/src/csf-tools/CsfFile.ts @@ -255,11 +255,10 @@ export class BadMetaError extends Error { } } -export interface StaticMeta - extends Pick< - ComponentAnnotations, - 'id' | 'title' | 'includeStories' | 'excludeStories' | 'tags' - > { +export interface StaticMeta extends Pick< + ComponentAnnotations, + 'id' | 'title' | 'includeStories' | 'excludeStories' | 'tags' +> { component?: string; } diff --git a/code/core/src/csf/csf-factories.ts b/code/core/src/csf/csf-factories.ts index 22af4a85f64c..5209a5339faf 100644 --- a/code/core/src/csf/csf-factories.ts +++ b/code/core/src/csf/csf-factories.ts @@ -61,8 +61,9 @@ export function definePreview - extends ProjectAnnotations {} +export interface PreviewAddon< + in TExtraContext extends AddonTypes = AddonTypes, +> extends ProjectAnnotations {} export function definePreviewAddon( preview: ProjectAnnotations diff --git a/code/core/src/csf/story.ts b/code/core/src/csf/story.ts index 0a128a1670a2..6856fd5cea5f 100644 --- a/code/core/src/csf/story.ts +++ b/code/core/src/csf/story.ts @@ -202,8 +202,10 @@ export interface Renderer extends AddonTypes { /** @deprecated - Use `Renderer` */ export type AnyFramework = Renderer; -export interface StoryContextForEnhancers - extends StoryIdentifier { +export interface StoryContextForEnhancers< + TRenderer extends Renderer = Renderer, + TArgs = Args, +> extends StoryIdentifier { component?: (TRenderer & { T: any })['component']; subcomponents?: Record; parameters: Parameters; @@ -250,8 +252,7 @@ export type AfterEach = ( export interface Canvas {} export interface StoryContext - extends StoryContextForEnhancers, - Required> { + extends StoryContextForEnhancers, Required> { loaded: Record; abortSignal: AbortSignal; canvasElement: TRenderer['canvasElement']; @@ -266,12 +267,16 @@ export interface StoryContext - extends StoryContext {} +export interface StoryContextForLoaders< + TRenderer extends Renderer = Renderer, + TArgs = Args, +> extends StoryContext {} /** @deprecated Use {@link StoryContext} instead. */ -export interface PlayFunctionContext - extends StoryContext {} +export interface PlayFunctionContext< + TRenderer extends Renderer = Renderer, + TArgs = Args, +> extends StoryContext {} export type StepLabel = string; @@ -399,8 +404,10 @@ export interface BaseAnnotations) => TRenderer['mount']; } -export interface ProjectAnnotations - extends BaseAnnotations { +export interface ProjectAnnotations< + TRenderer extends Renderer = Renderer, + TArgs = Args, +> extends BaseAnnotations { argsEnhancers?: ArgsEnhancer[]; argTypesEnhancers?: ArgTypesEnhancer[]; @@ -428,8 +435,10 @@ export interface ProjectAnnotations - extends BaseAnnotations { +export interface ComponentAnnotations< + TRenderer extends Renderer = Renderer, + TArgs = Args, +> extends BaseAnnotations { /** * Title of the component which will be presented in the navigation. **Should be unique.** * diff --git a/code/core/src/highlight/useHighlights.ts b/code/core/src/highlight/useHighlights.ts index 0a3a4fb87e4c..dc1d00b3908c 100644 --- a/code/core/src/highlight/useHighlights.ts +++ b/code/core/src/highlight/useHighlights.ts @@ -1,5 +1,4 @@ /// - /* eslint-env browser */ import type { Channel } from 'storybook/internal/channels'; import { STORY_RENDER_PHASE_CHANGED } from 'storybook/internal/core-events'; diff --git a/code/core/src/manager/components/layout/Layout.tsx b/code/core/src/manager/components/layout/Layout.tsx index 439bfe300fba..be3f3ee054de 100644 --- a/code/core/src/manager/components/layout/Layout.tsx +++ b/code/core/src/manager/components/layout/Layout.tsx @@ -16,8 +16,10 @@ interface InternalLayoutState { isDragging: boolean; } -interface ManagerLayoutState - extends Pick { +interface ManagerLayoutState extends Pick< + API_Layout, + 'navSize' | 'bottomPanelHeight' | 'rightPanelWidth' | 'panelPosition' +> { viewMode: API_ViewMode; } diff --git a/code/core/src/mocking-utils/esmWalker.ts b/code/core/src/mocking-utils/esmWalker.ts index 06e9e4470485..64b4c4e26941 100644 --- a/code/core/src/mocking-utils/esmWalker.ts +++ b/code/core/src/mocking-utils/esmWalker.ts @@ -1,5 +1,4 @@ // TODO: Remove as soon as https://github.com/vitest-dev/vitest/pull/8301 is released and we use it - /** * Copyright (c) Vitest * https://github.com/vitest-dev/vitest/blob/v3.2.4/packages/mocker/src/node/esmWalker.ts MIT diff --git a/code/core/src/types/modules/addons.ts b/code/core/src/types/modules/addons.ts index 01f56adc965f..58c689093215 100644 --- a/code/core/src/types/modules/addons.ts +++ b/code/core/src/types/modules/addons.ts @@ -213,8 +213,10 @@ export interface Addon_BaseAnnotations< play?: (context: Addon_StoryContext) => Promise | void; } -export interface Addon_Annotations - extends Addon_BaseAnnotations { +export interface Addon_Annotations extends Addon_BaseAnnotations< + TArgs, + StoryFnReturnType +> { /** * Used to only include certain named exports as stories. Useful when you want to have non-story * exports such as mock data or ignore a few stories. diff --git a/code/core/src/types/modules/story.ts b/code/core/src/types/modules/story.ts index 3b5d204dfc9b..894cabc1fc56 100644 --- a/code/core/src/types/modules/story.ts +++ b/code/core/src/types/modules/story.ts @@ -41,8 +41,9 @@ export type RenderToCanvas = ( element: TRenderer['canvasElement'] ) => MaybePromise; -export interface ProjectAnnotations - extends BaseProjectAnnotations { +export interface ProjectAnnotations< + TRenderer extends Renderer, +> extends BaseProjectAnnotations { testingLibraryRender?: (...args: never[]) => { unmount: () => void }; renderToCanvas?: RenderToCanvas; } diff --git a/code/e2e-tests/addon-docs.spec.ts b/code/e2e-tests/addon-docs.spec.ts index 8fd4c45e561b..5fda741be2b5 100644 --- a/code/e2e-tests/addon-docs.spec.ts +++ b/code/e2e-tests/addon-docs.spec.ts @@ -1,5 +1,4 @@ /* eslint-disable playwright/no-conditional-expect */ - /* eslint-disable playwright/no-conditional-in-test */ import { expect, test } from '@playwright/test'; import process from 'process'; diff --git a/code/frameworks/angular/src/client/argsToTemplate.ts b/code/frameworks/angular/src/client/argsToTemplate.ts index 98bc8d1af372..351d67f822a6 100644 --- a/code/frameworks/angular/src/client/argsToTemplate.ts +++ b/code/frameworks/angular/src/client/argsToTemplate.ts @@ -66,8 +66,12 @@ export function argsToTemplate>( return Object.entries(args) .filter(([key]) => args[key] !== undefined) .filter(([key]) => { - if (includeSet) return includeSet.has(key); - if (excludeSet) return !excludeSet.has(key); + if (includeSet) { + return includeSet.has(key); + } + if (excludeSet) { + return !excludeSet.has(key); + } return true; }) .map(([key, value]) => diff --git a/code/frameworks/nextjs/src/swc/next-swc-loader-patch.ts b/code/frameworks/nextjs/src/swc/next-swc-loader-patch.ts index 45fa7612b054..622e52e38406 100644 --- a/code/frameworks/nextjs/src/swc/next-swc-loader-patch.ts +++ b/code/frameworks/nextjs/src/swc/next-swc-loader-patch.ts @@ -1,7 +1,6 @@ // THIS IS A PATCH over the original code from Next 14.0.0 // we use our own patch because we need to remove tracing from the original code // which is not possible otherwise - /* Copyright (c) 2017 The swc Project Developers Permission is hereby granted, free of charge, to any diff --git a/code/renderers/react/src/componentManifest/getComponentImports.ts b/code/renderers/react/src/componentManifest/getComponentImports.ts index f0e53ceb29ee..094ca0242075 100644 --- a/code/renderers/react/src/componentManifest/getComponentImports.ts +++ b/code/renderers/react/src/componentManifest/getComponentImports.ts @@ -146,8 +146,8 @@ export const getComponents = ({ } // missing binding -> keep (will become null import) // missing binding -> keep (will become null import) const isImportBinding = Boolean( binding.path.isImportSpecifier?.() || - binding.path.isImportDefaultSpecifier?.() || - binding.path.isImportNamespaceSpecifier?.() + binding.path.isImportDefaultSpecifier?.() || + binding.path.isImportNamespaceSpecifier?.() ); return !isImportBinding; }; diff --git a/code/renderers/react/src/preview.tsx b/code/renderers/react/src/preview.tsx index ebcb0ffb960e..4dc5780b4611 100644 --- a/code/renderers/react/src/preview.tsx +++ b/code/renderers/react/src/preview.tsx @@ -85,7 +85,7 @@ type DecoratorsArgs = UnionToIntersectio >; export interface ReactMeta> -/** @ts-expect-error hard */ + /** @ts-expect-error hard */ extends Meta { // Required args don't need to be provided when the user uses an empty render story< @@ -113,7 +113,9 @@ export interface ReactMeta; } -export interface ReactStory> - extends Story { +export interface ReactStory< + T extends ReactTypes, + TInput extends StoryAnnotations, +> extends Story { Component: ComponentType>; } diff --git a/code/renderers/svelte/src/types.ts b/code/renderers/svelte/src/types.ts index ebfe203bb165..ddceb7c958a7 100644 --- a/code/renderers/svelte/src/types.ts +++ b/code/renderers/svelte/src/types.ts @@ -8,8 +8,9 @@ import type { Component, ComponentProps } from 'svelte'; export type StoryContext = StoryContextBase; -export interface SvelteRenderer = Component> - extends WebRenderer { +export interface SvelteRenderer< + C extends Component = Component, +> extends WebRenderer { component: Component ? this['T'] : any>; storyResult: this['T'] extends Record ? SvelteStoryResult diff --git a/code/renderers/web-components/template/components/Button.js b/code/renderers/web-components/template/components/Button.js index 289aa4267340..9f4984771171 100644 --- a/code/renderers/web-components/template/components/Button.js +++ b/code/renderers/web-components/template/components/Button.js @@ -52,7 +52,7 @@ export class SbButton extends LitElement { diff --git a/code/renderers/web-components/template/stories/demo-wc-card.stories.js b/code/renderers/web-components/template/stories/demo-wc-card.stories.js index 61f6994afe81..fccfc253511a 100644 --- a/code/renderers/web-components/template/stories/demo-wc-card.stories.js +++ b/code/renderers/web-components/template/stories/demo-wc-card.stories.js @@ -5,7 +5,7 @@ import './demo-wc-card'; export default { component: 'demo-wc-card', render: ({ backSide, header, rows, prefix }) => html` - ${prefix}A simple card `, From abafda2cc1856a57c44b3698a09190bc62adb1f4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 21:27:40 +0100 Subject: [PATCH 101/310] apply new linting --- scripts/check-dependencies.js | 4 +--- scripts/tasks/sandbox.ts | 5 ++--- scripts/utils/cli-step.ts | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/check-dependencies.js b/scripts/check-dependencies.js index 95e2a88a10c1..f689158a4fa9 100644 --- a/scripts/check-dependencies.js +++ b/scripts/check-dependencies.js @@ -1,6 +1,3 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-nocheck - /** * This file needs to be run before any other script to ensure dependencies are installed Therefore, * we cannot transform this file to Typescript, because it would require esbuild to be installed @@ -18,6 +15,7 @@ const checkDependencies = async () => { const scriptsPath = join(dirname); const codePath = join(dirname, '..', 'code'); + /** @type {import('child_process').ChildProcess[]} */ const tasks = []; if (!existsSync(join(scriptsPath, 'node_modules'))) { diff --git a/scripts/tasks/sandbox.ts b/scripts/tasks/sandbox.ts index ab27c25a2f9c..d02d798a8b78 100644 --- a/scripts/tasks/sandbox.ts +++ b/scripts/tasks/sandbox.ts @@ -162,9 +162,8 @@ export const sandbox: Task = { await setImportMap(details.sandboxDir); - const { JsPackageManagerFactory } = await import( - '../../code/core/src/common/js-package-manager/JsPackageManagerFactory' - ); + const { JsPackageManagerFactory } = + await import('../../code/core/src/common/js-package-manager/JsPackageManagerFactory'); const packageManager = JsPackageManagerFactory.getPackageManager({}, details.sandboxDir); diff --git a/scripts/utils/cli-step.ts b/scripts/utils/cli-step.ts index b1b63b430fd1..608b866d14c7 100644 --- a/scripts/utils/cli-step.ts +++ b/scripts/utils/cli-step.ts @@ -7,9 +7,8 @@ import { createOptions, getCommand } from './options'; const require = createRequire(import.meta.url); const cliExecutable = require.resolve('../../code/core/dist/bin/dispatcher.js'); const toolboxExecutable = require.resolve('../../code/lib/cli-storybook/dist/bin/index.js'); -const createStorybookExecutable = require.resolve( - '../../code/lib/create-storybook/dist/bin/index.js' -); +const createStorybookExecutable = + require.resolve('../../code/lib/create-storybook/dist/bin/index.js'); export type CLIStep = { command: string; From 828fc81df5f136d5f7983ee16564e66d255404db Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 22:32:13 +0100 Subject: [PATCH 102/310] Enhance CLI options by adding a required task argument to the getOptionsOrPrompt function in options.ts for improved command handling. --- scripts/utils/options.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/utils/options.ts b/scripts/utils/options.ts index 3b1b139228fd..fd2c6b0d4197 100644 --- a/scripts/utils/options.ts +++ b/scripts/utils/options.ts @@ -320,6 +320,7 @@ export async function getOptionsOrPrompt( options: TOptions ): Promise> { const main = program.version('5.0.0'); + main.arguments(''); const cliValues = getOptions(main as any, options, process.argv); if (areOptionsSatisfied(options, cliValues)) { From 8c2605456e77f0a5e5cd78bc7fbe501130a32159 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 22:35:30 +0100 Subject: [PATCH 103/310] Update CLI options to make the task argument optional in the getOptionsOrPrompt function in options.ts for improved flexibility in command handling. --- scripts/utils/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/options.ts b/scripts/utils/options.ts index fd2c6b0d4197..4609f381bdf3 100644 --- a/scripts/utils/options.ts +++ b/scripts/utils/options.ts @@ -320,7 +320,7 @@ export async function getOptionsOrPrompt( options: TOptions ): Promise> { const main = program.version('5.0.0'); - main.arguments(''); + main.arguments('[task]'); const cliValues = getOptions(main as any, options, process.argv); if (areOptionsSatisfied(options, cliValues)) { From 5a4a23c7812b6d6d9f382a50fbd1c023032e59c7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 23:24:41 +0100 Subject: [PATCH 104/310] Refactor command execution types across the codebase to use ResultPromise instead of ExecaChildProcess for improved type safety and consistency in handling command results. --- code/core/src/cli/AddonVitestService.test.ts | 4 ++-- code/core/src/common/js-package-manager/BUNProxy.ts | 8 ++++---- code/core/src/common/js-package-manager/NPMProxy.ts | 8 ++++---- code/core/src/common/js-package-manager/PNPMProxy.ts | 8 ++++---- code/core/src/common/js-package-manager/Yarn1Proxy.ts | 6 +++--- code/core/src/common/js-package-manager/Yarn2Proxy.ts | 6 +++--- code/core/src/common/utils/command.ts | 2 +- code/core/src/node-logger/tasks.test.ts | 10 +++++----- code/core/src/node-logger/tasks.ts | 4 ++-- code/core/src/node-logger/wrap-utils.test.ts | 4 ++-- scripts/utils/exec.ts | 6 +++--- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/code/core/src/cli/AddonVitestService.test.ts b/code/core/src/cli/AddonVitestService.test.ts index 8ffa9fb6287d..f457886880ba 100644 --- a/code/core/src/cli/AddonVitestService.test.ts +++ b/code/core/src/cli/AddonVitestService.test.ts @@ -8,7 +8,7 @@ import { logger, prompt } from 'storybook/internal/node-logger'; import * as find from 'empathic/find'; // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import { SupportedBuilder, SupportedFramework } from '../types'; import { AddonVitestService } from './AddonVitestService'; @@ -394,7 +394,7 @@ describe('AddonVitestService', () => { }); it('should execute playwright install command', async () => { - type ChildProcessFactory = (signal?: AbortSignal) => ExecaChildProcess; + type ChildProcessFactory = (signal?: AbortSignal) => ResultPromise; let commandFactory: ChildProcessFactory | ChildProcessFactory[]; vi.mocked(prompt.confirm).mockResolvedValue(true); vi.mocked(prompt.executeTaskWithSpinner).mockImplementation( diff --git a/code/core/src/common/js-package-manager/BUNProxy.ts b/code/core/src/common/js-package-manager/BUNProxy.ts index d76ebfb657d3..b5a39f16d7a0 100644 --- a/code/core/src/common/js-package-manager/BUNProxy.ts +++ b/code/core/src/common/js-package-manager/BUNProxy.ts @@ -161,7 +161,7 @@ export class BUNProxy extends JsPackageManager { try { const process = await exec({ packageDepth: depth }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = JSON.parse(commandResult); return this.mapDependencies(parsedOutput, pattern); @@ -171,7 +171,7 @@ export class BUNProxy extends JsPackageManager { try { const process = await exec({ packageDepth: 0 }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = JSON.parse(commandResult); return this.mapDependencies(parsedOutput, pattern); @@ -211,7 +211,7 @@ export class BUNProxy extends JsPackageManager { args: ['config', 'get', 'registry', '-ws=false', '-iwr'], }); const result = await process; - const url = (result.stdout ?? '').trim(); + const url = (typeof result.stdout === 'string' ? result.stdout : '').trim(); return url === 'undefined' ? undefined : url; } @@ -242,7 +242,7 @@ export class BUNProxy extends JsPackageManager { args: ['info', packageName, ...args], }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = fetchAllVersions ? JSON.parse(commandResult) : commandResult.trim(); diff --git a/code/core/src/common/js-package-manager/NPMProxy.ts b/code/core/src/common/js-package-manager/NPMProxy.ts index 36b6f847f98d..a28c7d689270 100644 --- a/code/core/src/common/js-package-manager/NPMProxy.ts +++ b/code/core/src/common/js-package-manager/NPMProxy.ts @@ -140,7 +140,7 @@ export class NPMProxy extends JsPackageManager { try { const childProcess = await exec({ packageDepth: depth }); - const commandResult = childProcess.stdout ?? ''; + const commandResult = typeof childProcess.stdout === 'string' ? childProcess.stdout : ''; const parsedOutput = JSON.parse(commandResult); return this.mapDependencies(parsedOutput, pattern); @@ -149,7 +149,7 @@ export class NPMProxy extends JsPackageManager { // in case the user's project has peer dependency issues. So we try again with no depth try { const childProcess = await exec({ packageDepth: 0 }); - const commandResult = childProcess.stdout ?? ''; + const commandResult = typeof childProcess.stdout === 'string' ? childProcess.stdout : ''; const parsedOutput = JSON.parse(commandResult); return this.mapDependencies(parsedOutput, pattern); @@ -188,7 +188,7 @@ export class NPMProxy extends JsPackageManager { args: ['config', 'get', 'registry', '-ws=false', '-iwr'], }); const result = await process; - const url = (result.stdout ?? '').trim(); + const url = (typeof result.stdout === 'string' ? result.stdout : '').trim(); return url === 'undefined' ? undefined : url; } @@ -218,7 +218,7 @@ export class NPMProxy extends JsPackageManager { args: ['info', packageName, ...args], }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = fetchAllVersions ? JSON.parse(commandResult) : commandResult.trim(); diff --git a/code/core/src/common/js-package-manager/PNPMProxy.ts b/code/core/src/common/js-package-manager/PNPMProxy.ts index 1756bff55b43..f3b37b1b6f56 100644 --- a/code/core/src/common/js-package-manager/PNPMProxy.ts +++ b/code/core/src/common/js-package-manager/PNPMProxy.ts @@ -59,7 +59,7 @@ export class PNPMProxy extends JsPackageManager { command: 'pnpm', args: ['--version'], }); - return result.stdout ?? null; + return typeof result.stdout === 'string' ? result.stdout : ''; } getInstallArgs(): string[] { @@ -107,7 +107,7 @@ export class PNPMProxy extends JsPackageManager { command: 'pnpm', args: ['config', 'get', 'registry'], }); - const url = (childProcess.stdout ?? '').trim(); + const url = (typeof childProcess.stdout === 'string' ? childProcess.stdout : '').trim(); return url === 'undefined' ? undefined : url; } @@ -121,7 +121,7 @@ export class PNPMProxy extends JsPackageManager { }, cwd: this.instanceDir, }); - const commandResult = childProcess.stdout ?? ''; + const commandResult = typeof childProcess.stdout === 'string' ? childProcess.stdout : ''; const parsedOutput = JSON.parse(commandResult); return this.mapDependencies(parsedOutput, pattern); @@ -221,7 +221,7 @@ export class PNPMProxy extends JsPackageManager { args: ['info', packageName, ...args], }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = fetchAllVersions ? JSON.parse(commandResult) : commandResult.trim(); diff --git a/code/core/src/common/js-package-manager/Yarn1Proxy.ts b/code/core/src/common/js-package-manager/Yarn1Proxy.ts index 23cb1fcbfbdd..f7d4b659be22 100644 --- a/code/core/src/common/js-package-manager/Yarn1Proxy.ts +++ b/code/core/src/common/js-package-manager/Yarn1Proxy.ts @@ -100,7 +100,7 @@ export class Yarn1Proxy extends JsPackageManager { command: 'yarn', args: ['config', 'get', 'registry'], }); - const url = (childProcess.stdout ?? '').trim(); + const url = (typeof childProcess.stdout === 'string' ? childProcess.stdout : '').trim(); return url === 'undefined' ? undefined : url; } @@ -121,7 +121,7 @@ export class Yarn1Proxy extends JsPackageManager { cwd: this.instanceDir, }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = JSON.parse(commandResult); return this.mapDependencies(parsedOutput, pattern); @@ -174,7 +174,7 @@ export class Yarn1Proxy extends JsPackageManager { args: ['info', packageName, ...args], }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = JSON.parse(commandResult); if (parsedOutput.type === 'inspect') { diff --git a/code/core/src/common/js-package-manager/Yarn2Proxy.ts b/code/core/src/common/js-package-manager/Yarn2Proxy.ts index 0f32e69fe4c3..fd4fdd859d2d 100644 --- a/code/core/src/common/js-package-manager/Yarn2Proxy.ts +++ b/code/core/src/common/js-package-manager/Yarn2Proxy.ts @@ -139,7 +139,7 @@ export class Yarn2Proxy extends JsPackageManager { }, cwd: this.instanceDir, }); - const commandResult = childProcess.stdout ?? ''; + const commandResult = typeof childProcess.stdout === 'string' ? childProcess.stdout : ''; logger.debug(`Installation found for ${pattern.join(', ')}: ${commandResult}`); @@ -251,7 +251,7 @@ export class Yarn2Proxy extends JsPackageManager { args: ['config', 'get', 'npmRegistryServer'], }); const result = await process; - const url = (result.stdout ?? '').trim(); + const url = (typeof result.stdout === 'string' ? result.stdout : '').trim(); return url === 'undefined' ? undefined : url; } @@ -267,7 +267,7 @@ export class Yarn2Proxy extends JsPackageManager { args: ['npm', 'info', packageName, ...args], }); const result = await process; - const commandResult = result.stdout ?? ''; + const commandResult = typeof result.stdout === 'string' ? result.stdout : ''; const parsedOutput = JSON.parse(commandResult); return parsedOutput[field]; diff --git a/code/core/src/common/utils/command.ts b/code/core/src/common/utils/command.ts index 089738f12081..052a94df69b7 100644 --- a/code/core/src/common/utils/command.ts +++ b/code/core/src/common/utils/command.ts @@ -16,7 +16,7 @@ const COMMON_ENV_VARS = { NO_UPDATE_NOTIFIER: 'true', }; -export type ExecuteCommandOptions = Options & { +export type ExecuteCommandOptions = Omit & { command: string; args?: string[]; cwd?: string; diff --git a/code/core/src/node-logger/tasks.test.ts b/code/core/src/node-logger/tasks.test.ts index fd546e46d2dc..c1922f14ccf5 100644 --- a/code/core/src/node-logger/tasks.test.ts +++ b/code/core/src/node-logger/tasks.test.ts @@ -1,12 +1,12 @@ import { describe, expect, it, vi } from 'vitest'; // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import { executeTaskWithSpinner } from './tasks'; -// Create a minimal fake ExecaChildProcess -const makeChild = (onStart?: (cp: Partial) => void): ExecaChildProcess => { +// Create a minimal fake ResultPromise +const makeChild = (onStart?: (cp: Partial) => void): ResultPromise => { const listeners: Record = {}; const stdout = { on: vi.fn((event: string, cb: (data: Buffer) => void) => { @@ -15,7 +15,7 @@ const makeChild = (onStart?: (cp: Partial) => void): ExecaChi }), } as any; - const cp: Partial = { + const cp: Partial = { stdout: stdout as any, then: undefined as any, catch: undefined as any, @@ -29,7 +29,7 @@ const makeChild = (onStart?: (cp: Partial) => void): ExecaChi (cp as any).finally = promise.finally.bind(promise); onStart?.(cp); - return cp as ExecaChildProcess; + return cp as ResultPromise; }; describe('executeTaskWithSpinner', () => { diff --git a/code/core/src/node-logger/tasks.ts b/code/core/src/node-logger/tasks.ts index ae63d2997fed..1a3bb148bd3e 100644 --- a/code/core/src/node-logger/tasks.ts +++ b/code/core/src/node-logger/tasks.ts @@ -1,11 +1,11 @@ // eslint-disable-next-line depend/ban-dependencies -import type { ExecaChildProcess } from 'execa'; +import type { ResultPromise } from 'execa'; import { CLI_COLORS, log } from './logger'; import { logTracker } from './logger/log-tracker'; import { spinner } from './prompts/prompt-functions'; -type ChildProcessFactory = (signal?: AbortSignal) => ExecaChildProcess; +type ChildProcessFactory = (signal?: AbortSignal) => ResultPromise; interface SetupAbortControllerResult { abortController: AbortController; diff --git a/code/core/src/node-logger/wrap-utils.test.ts b/code/core/src/node-logger/wrap-utils.test.ts index 0b280e69909c..ce7ba3741981 100644 --- a/code/core/src/node-logger/wrap-utils.test.ts +++ b/code/core/src/node-logger/wrap-utils.test.ts @@ -83,7 +83,7 @@ describe('wrap-utils', () => { // Note: execaSync mock is not actually used by the implementation // which reads process.env directly, but kept for compatibility // eslint-disable-next-line @typescript-eslint/no-explicit-any - vi.mocked(execaSync).mockImplementation((cmd: string, args: any) => { + vi.mocked(execaSync).mockImplementation((_cmd: string | URL, args: any) => { if (args && args[0] === '$TERM_PROGRAM') { return { stdout: 'iTerm.app', @@ -346,7 +346,7 @@ describe('wrap-utils', () => { // Note: execaSync mock is not actually used by the implementation // which reads process.env directly, but kept for compatibility // eslint-disable-next-line @typescript-eslint/no-explicit-any - vi.mocked(execaSync).mockImplementation((cmd: string, args: any) => { + vi.mocked(execaSync).mockImplementation((_cmd: string | URL, args: any) => { if (args && args[0] === '$TERM_PROGRAM') { return { stdout: 'iTerm.app', diff --git a/scripts/utils/exec.ts b/scripts/utils/exec.ts index a5ffe008c410..c4824b757123 100644 --- a/scripts/utils/exec.ts +++ b/scripts/utils/exec.ts @@ -1,5 +1,5 @@ // eslint-disable-next-line depend/ban-dependencies -import { type ExecaChildProcess, type Options, execa } from 'execa'; +import { type ResultPromise, type Options, execa } from 'execa'; import picocolors from 'picocolors'; const logger = console; @@ -33,9 +33,9 @@ export const exec = async ( stdout: debug ? 'inherit' : 'pipe', stderr: debug ? 'inherit' : 'pipe', stdin: 'inherit', - signal, + ...(signal && { cancelSignal: signal }), }; - let currentChild: ExecaChildProcess; + let currentChild: ResultPromise; try { if (typeof command === 'string') { From be7f3b87a1a4365252b16dabb60e93bea039b328 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sat, 29 Nov 2025 23:26:31 +0100 Subject: [PATCH 105/310] Implement type guard in addBundlerEntries function to ensure config is an object, enhancing error handling and preventing incorrect usage. --- scripts/knip.config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/knip.config.ts b/scripts/knip.config.ts index 7af5bf771f7d..c159f8163cba 100644 --- a/scripts/knip.config.ts +++ b/scripts/knip.config.ts @@ -81,6 +81,10 @@ const baseConfig = { // Adds package.json#bundler.entries etc. to each workspace config `entry: []` // Knip maps package.json#export to source files but the entries are incomplete export const addBundlerEntries = async (config: KnipConfig) => { + // Type guard: ensure config is an object, not a function + if (typeof config === 'function') { + throw new Error('addBundlerEntries expects a config object, not a function'); + } const baseDir = join(__dirname, '..'); const rootManifest = await import(pathToFileURL(join(baseDir, 'package.json')).href, { with: { type: 'json' }, From bcc8b3d5b9c28d4725e04606c758bd08ae55d636 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:18:02 +0100 Subject: [PATCH 106/310] Update CLI options to accept multiple task arguments in the getOptionsOrPrompt function in options.ts for enhanced command flexibility. --- scripts/utils/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/options.ts b/scripts/utils/options.ts index 4609f381bdf3..0c19fcec1610 100644 --- a/scripts/utils/options.ts +++ b/scripts/utils/options.ts @@ -320,7 +320,7 @@ export async function getOptionsOrPrompt( options: TOptions ): Promise> { const main = program.version('5.0.0'); - main.arguments('[task]'); + main.arguments('[tasks...]'); const cliValues = getOptions(main as any, options, process.argv); if (areOptionsSatisfied(options, cliValues)) { From 4039ead0064a7c031b36c55ebc3d5a43d65faa36 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:29:16 +0100 Subject: [PATCH 107/310] Remove deprecated CI source configuration file to streamline the codebase and eliminate unused code. --- scripts/ci/source.ts | 1384 ------------------------------------------ 1 file changed, 1384 deletions(-) delete mode 100644 scripts/ci/source.ts diff --git a/scripts/ci/source.ts b/scripts/ci/source.ts deleted file mode 100644 index 887830ad776c..000000000000 --- a/scripts/ci/source.ts +++ /dev/null @@ -1,1384 +0,0 @@ -// 'bench-packages': { -// executor: { -// class: 'small', -// name: 'sb_node_22_classic', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// when: { -// condition: { -// and: ['<< pipeline.parameters.ghBaseBranch >>', '<< pipeline.parameters.ghPrNumber >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', -// name: 'Benchmarking packages against base branch', -// working_directory: 'scripts', -// }, -// }, -// ], -// }, -// }, -// { -// when: { -// condition: { -// or: [ -// { -// not: '<< pipeline.parameters.ghBaseBranch >>', -// }, -// { -// not: '<< pipeline.parameters.ghPrNumber >>', -// }, -// ], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// }, -// }, -// { -// run: { -// command: 'yarn bench-packages --upload', -// name: 'Uploading package benchmarks for branch', -// working_directory: 'scripts', -// }, -// }, -// ], -// }, -// }, -// { -// store_artifacts: { -// path: 'bench/packages/results.json', -// }, -// }, -// 'report-workflow-on-failure', -// 'cancel-workflow-on-failure', -// ], -// }, -// 'bench-sandboxes': { -// executor: { -// class: 'small', -// name: 'sb_playwright', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', -// 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', -// name: 'Running Bench', -// }, -// }, -// { -// run: { -// command: -// 'yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>', -// name: 'Uploading results', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)', -// }, -// }, -// ], -// }, - -// 'check-sandboxes': { -// executor: { -// class: 'medium', -// name: 'sb_node_22_classic', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', -// 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', -// name: 'Type check Sandboxes', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, -// 'chromatic-internal-storybook': { -// environment: { -// NODE_OPTIONS: '--max_old_space_size=4096', -// }, -// executor: { -// class: 'large', -// name: 'sb_node_22_browsers', -// }, -// steps: [ -// 'checkout', -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'yarn storybook:ui:chromatic', -// name: 'Running Chromatic', -// working_directory: 'code', -// }, -// }, -// 'report-workflow-on-failure', -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, -// 'chromatic-sandboxes': { -// executor: { -// class: 'medium', -// name: 'sb_node_22_browsers', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// 'checkout', -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', -// 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', -// name: 'Running Chromatic', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, -// coverage: { -// executor: { -// class: 'small', -// name: 'sb_node_22_browsers', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// 'codecov/upload', -// 'report-workflow-on-failure', -// ], -// }, -// 'create-sandboxes': { -// executor: { -// class: 'large', -// name: 'sb_node_22_browsers', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// '# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n', -// name: 'Setup Corepack', -// }, -// }, -// 'start-event-collector', -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n', -// environment: { -// STORYBOOK_TELEMETRY_DEBUG: 1, -// STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', -// }, -// name: 'Create Sandboxes', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)', -// }, -// }, -// { -// persist_to_workspace: { -// paths: ['sandbox/**'], -// root: '.', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, -// 'e2e-dev': { -// executor: { -// class: 'medium+', -// name: 'sb_playwright', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', -// name: 'Install sandbox dependencies', -// }, -// }, -// { -// run: { -// command: -// 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', -// name: 'Running E2E Tests', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// { -// store_artifacts: { -// destination: 'playwright', -// path: 'code/playwright-results/', -// }, -// }, -// ], -// }, -// 'e2e-production': { -// executor: { -// class: 'medium', -// name: 'sb_playwright', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', -// name: 'Install sandbox dependencies', -// }, -// }, -// { -// run: { -// command: -// 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1\n', -// name: 'Running E2E Tests', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// { -// store_artifacts: { -// destination: 'playwright', -// path: 'code/playwright-results/', -// }, -// }, -// ], -// }, -// 'e2e-ui': { -// executor: { -// class: 'medium', -// name: 'sb_playwright', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'yarn install --no-immutable', -// environment: { -// YARN_ENABLE_IMMUTABLE_INSTALLS: false, -// }, -// name: 'Install dependencies', -// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', -// }, -// }, -// { -// run: { -// command: 'yarn playwright-e2e', -// name: 'Run E2E tests', -// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// { -// store_artifacts: { -// destination: 'playwright', -// path: 'test-storybooks/portable-stories-kitchen-sink/react/test-results/', -// }, -// }, -// 'report-workflow-on-failure', -// ], -// }, -// 'e2e-ui-vitest-3': { -// executor: { -// class: 'medium', -// name: 'sb_playwright', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'yarn install --no-immutable', -// environment: { -// YARN_ENABLE_IMMUTABLE_INSTALLS: false, -// }, -// name: 'Install dependencies', -// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', -// }, -// }, -// { -// run: { -// command: 'yarn playwright-e2e', -// name: 'Run E2E tests', -// working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// { -// store_artifacts: { -// destination: 'playwright', -// path: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/', -// }, -// }, -// 'report-workflow-on-failure', -// ], -// }, -// knip: { -// executor: { -// class: 'large', -// name: 'sb_node_22_classic', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'cd code\nyarn knip --no-exit-code\n', -// name: 'Knip', -// }, -// }, -// 'report-workflow-on-failure', -// 'cancel-workflow-on-failure', -// ], -// }, -// lint: { -// executor: { -// class: 'medium+', -// name: 'sb_node_22_classic', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'cd code\nyarn lint\n', -// name: 'Lint', -// }, -// }, -// 'report-workflow-on-failure', -// 'cancel-workflow-on-failure', -// ], -// }, -// 'smoke-test-sandboxes': { -// executor: { -// class: 'medium', -// name: 'sb_node_18_browsers', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit', -// name: 'Smoke Testing Sandboxes', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, -// 'stories-tests': { -// executor: { -// class: 'xlarge', -// name: 'sb_playwright', -// }, -// parallelism: 2, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', -// name: 'Run tests', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// 'report-workflow-on-failure', -// 'cancel-workflow-on-failure', -// ], -// }, -// 'test-init-empty': { -// executor: { -// class: 'small', -// name: 'sb_node_22_browsers', -// }, -// parameters: { -// packageManager: { -// type: 'string', -// }, -// template: { -// type: 'string', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// when: { -// condition: { -// equal: ['npm', '<< parameters.packageManager >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (NPM)', -// }, -// }, -// ], -// }, -// }, -// { -// when: { -// condition: { -// equal: ['yarn2', '<< parameters.packageManager >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (Yarn 2)', -// }, -// }, -// ], -// }, -// }, -// { -// when: { -// condition: { -// equal: ['pnpm', '<< parameters.packageManager >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (PNPM)', -// }, -// }, -// ], -// }, -// }, -// { -// when: { -// condition: { -// equal: ['react-vite-ts', '<< parameters.template >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (--skip-install)', -// }, -// }, -// ], -// }, -// }, -// 'report-workflow-on-failure', -// ], -// }, -// 'test-init-empty-windows': { -// executor: 'win/default', -// parameters: { -// packageManager: { -// type: 'string', -// }, -// template: { -// type: 'string', -// }, -// }, -// steps: [ -// 'checkout', -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n', -// name: 'Setup Node & Yarn on Windows', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// 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: ['npm', '<< parameters.packageManager >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (Windows NPM)', -// shell: 'bash.exe', -// }, -// }, -// ], -// }, -// }, -// { -// when: { -// condition: { -// equal: ['yarn2', '<< parameters.packageManager >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (Windows Yarn 2)', -// shell: 'bash.exe', -// }, -// }, -// ], -// }, -// }, -// { -// when: { -// condition: { -// equal: ['pnpm', '<< parameters.packageManager >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (Windows PNPM)', -// shell: 'bash.exe', -// }, -// }, -// ], -// }, -// }, -// { -// when: { -// condition: { -// equal: ['react-vite-ts', '<< parameters.template >>'], -// }, -// steps: [ -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// shell: 'bash.exe', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: '<< parameters.template >>', -// }, -// name: 'Storybook init from empty directory (Windows --skip-install)', -// shell: 'bash.exe', -// }, -// }, -// ], -// }, -// }, -// ], -// }, -// 'test-init-features': { -// executor: { -// class: 'small', -// name: 'sb_node_22_browsers', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// background: true, -// command: 'cd code\nyarn local-registry --open\n', -// name: 'Verdaccio', -// }, -// }, -// { -// run: { -// command: 'cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n', -// name: 'Wait on Verdaccio', -// }, -// }, -// { -// run: { -// command: -// 'cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n', -// environment: { -// IN_STORYBOOK_SANDBOX: true, -// STORYBOOK_DISABLE_TELEMETRY: true, -// STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', -// }, -// name: 'Storybook init for features', -// }, -// }, -// ], -// }, -// 'test-portable-stories': { -// executor: { -// class: 'medium', -// name: 'sb_playwright', -// }, -// parameters: { -// directory: { -// type: 'string', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'yarn install --no-immutable', -// environment: { -// YARN_ENABLE_IMMUTABLE_INSTALLS: false, -// }, -// name: 'Install dependencies', -// working_directory: -// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', -// }, -// }, -// { -// run: { -// command: 'yarn jest', -// name: 'Run Jest tests', -// working_directory: -// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', -// }, -// }, -// { -// run: { -// command: 'yarn vitest', -// name: 'Run Vitest tests', -// working_directory: -// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', -// }, -// }, -// { -// run: { -// command: 'yarn playwright-ct', -// name: 'Run Playwright CT tests', -// working_directory: -// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', -// }, -// }, -// { -// run: { -// command: 'yarn cypress', -// name: 'Run Cypress CT tests', -// working_directory: -// 'test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>', -// }, -// }, -// 'report-workflow-on-failure', -// ], -// }, -// 'test-runner-dev': { -// executor: { -// class: 'large', -// name: 'sb_playwright', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit', -// name: 'Running Test Runner in Dev mode', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, -// 'test-runner-production': { -// executor: { -// class: 'medium+', -// name: 'sb_playwright', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', -// name: 'Install sandbox dependencies', -// }, -// }, -// 'start-event-collector', -// { -// run: { -// command: -// 'yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit', -// environment: { -// STORYBOOK_TELEMETRY_DEBUG: 1, -// STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', -// }, -// name: 'Running Test Runner', -// }, -// }, -// { -// run: { -// command: -// 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', -// name: 'Check Telemetry', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, -// 'test-yarn-pnp': { -// executor: { -// class: 'medium', -// name: 'sb_playwright', -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: 'yarn install --no-immutable', -// environment: { -// YARN_ENABLE_IMMUTABLE_INSTALLS: false, -// }, -// name: 'Install dependencies', -// working_directory: 'test-storybooks/yarn-pnp', -// }, -// }, -// { -// run: { -// command: 'yarn storybook --smoke-test', -// name: 'Run Storybook smoke test', -// working_directory: 'test-storybooks/yarn-pnp', -// }, -// }, -// 'report-workflow-on-failure', -// ], -// }, -// 'unit-tests': { -// executor: { -// class: 'xlarge', -// name: 'sb_playwright', -// }, -// parallelism: 2, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'cd code\nTEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose\n', -// name: 'Run tests', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// 'report-workflow-on-failure', -// 'cancel-workflow-on-failure', -// ], -// }, -// 'vitest-integration': { -// executor: { -// class: 'xlarge', -// name: 'sb_playwright', -// }, -// parallelism: '<< parameters.parallelism >>', -// parameters: { -// parallelism: { -// type: 'integer', -// }, -// }, -// steps: [ -// { -// 'git-shallow-clone/checkout_advanced': { -// clone_options: '--depth 1 --verbose', -// }, -// }, -// { -// attach_workspace: { -// at: '.', -// }, -// }, -// { -// run: { -// command: -// 'TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n', -// name: 'Install sandbox dependencies', -// }, -// }, -// 'start-event-collector', -// { -// run: { -// command: -// 'yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit', -// environment: { -// STORYBOOK_TELEMETRY_DEBUG: 1, -// STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log', -// }, -// name: 'Running story tests in Vitest', -// }, -// }, -// { -// run: { -// command: -// 'yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', -// name: 'Check Telemetry', -// }, -// }, -// { -// 'report-workflow-on-failure': { -// template: -// '$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)', -// }, -// }, -// { -// store_test_results: { -// path: 'test-results', -// }, -// }, -// ], -// }, From 378aefa6b637c8d4d7486fc6cabd20c9f0eade10 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:29:32 +0100 Subject: [PATCH 108/310] Remove CircleCI configuration files to streamline the codebase and eliminate unused CI jobs and parameters. --- .circleci/src/@orbs.yml | 15 -- .circleci/src/@parameters.yml | 14 -- .circleci/src/@version.yml | 1 - .../commands/cancel-workflow-on-failure.yml | 10 -- .../commands/report-workflow-on-failure.yml | 17 -- .../src/commands/start-event-collector.yml | 8 - .../src/executors/sb_node_18_browsers.yml | 15 -- .../src/executors/sb_node_22_browsers.yml | 15 -- .../src/executors/sb_node_22_classic.yml | 15 -- .circleci/src/executors/sb_playwright.yml | 15 -- .circleci/src/jobs/bench-packages.yml | 61 ------- .circleci/src/jobs/bench-sandboxes.yml | 29 ---- .circleci/src/jobs/build.yml | 47 ------ .circleci/src/jobs/check-sandboxes.yml | 28 --- .circleci/src/jobs/check.yml | 29 ---- .../src/jobs/chromatic-internal-storybook.yml | 19 --- .circleci/src/jobs/chromatic-sandboxes.yml | 29 ---- .circleci/src/jobs/coverage.yml | 11 -- .circleci/src/jobs/create-sandboxes.yml | 45 ----- .circleci/src/jobs/e2e-dev.yml | 36 ---- .circleci/src/jobs/e2e-production.yml | 36 ---- .circleci/src/jobs/e2e-ui-vitest-3.yml | 25 --- .circleci/src/jobs/e2e-ui.yml | 25 --- .circleci/src/jobs/knip.yml | 16 -- .circleci/src/jobs/lint.yml | 16 -- .circleci/src/jobs/pretty-docs.yml | 25 --- .circleci/src/jobs/script-checks.yml | 26 --- .circleci/src/jobs/smoke-test-sandboxes.yml | 22 --- .circleci/src/jobs/stories-tests.yml | 19 --- .../src/jobs/test-init-empty-windows.yml | 159 ------------------ .circleci/src/jobs/test-init-empty.yml | 134 --------------- .circleci/src/jobs/test-init-features.yml | 34 ---- .circleci/src/jobs/test-portable-stories.yml | 36 ---- .circleci/src/jobs/test-runner-dev.yml | 22 --- .circleci/src/jobs/test-runner-production.yml | 35 ---- .circleci/src/jobs/test-yarn-pnp.yml | 21 --- .circleci/src/jobs/unit-tests.yml | 31 ---- .circleci/src/jobs/vitest-integration.yml | 35 ---- .circleci/src/workflows/daily.yml | 122 -------------- .circleci/src/workflows/docs.yml | 8 - .circleci/src/workflows/merged.yml | 103 ------------ .circleci/src/workflows/normal.yml | 90 ---------- 42 files changed, 1499 deletions(-) delete mode 100644 .circleci/src/@orbs.yml delete mode 100644 .circleci/src/@parameters.yml delete mode 100644 .circleci/src/@version.yml delete mode 100644 .circleci/src/commands/cancel-workflow-on-failure.yml delete mode 100644 .circleci/src/commands/report-workflow-on-failure.yml delete mode 100644 .circleci/src/commands/start-event-collector.yml delete mode 100644 .circleci/src/executors/sb_node_18_browsers.yml delete mode 100644 .circleci/src/executors/sb_node_22_browsers.yml delete mode 100644 .circleci/src/executors/sb_node_22_classic.yml delete mode 100644 .circleci/src/executors/sb_playwright.yml delete mode 100644 .circleci/src/jobs/bench-packages.yml delete mode 100644 .circleci/src/jobs/bench-sandboxes.yml delete mode 100644 .circleci/src/jobs/build.yml delete mode 100644 .circleci/src/jobs/check-sandboxes.yml delete mode 100644 .circleci/src/jobs/check.yml delete mode 100644 .circleci/src/jobs/chromatic-internal-storybook.yml delete mode 100644 .circleci/src/jobs/chromatic-sandboxes.yml delete mode 100644 .circleci/src/jobs/coverage.yml delete mode 100644 .circleci/src/jobs/create-sandboxes.yml delete mode 100644 .circleci/src/jobs/e2e-dev.yml delete mode 100644 .circleci/src/jobs/e2e-production.yml delete mode 100644 .circleci/src/jobs/e2e-ui-vitest-3.yml delete mode 100644 .circleci/src/jobs/e2e-ui.yml delete mode 100644 .circleci/src/jobs/knip.yml delete mode 100644 .circleci/src/jobs/lint.yml delete mode 100644 .circleci/src/jobs/pretty-docs.yml delete mode 100644 .circleci/src/jobs/script-checks.yml delete mode 100644 .circleci/src/jobs/smoke-test-sandboxes.yml delete mode 100644 .circleci/src/jobs/stories-tests.yml delete mode 100644 .circleci/src/jobs/test-init-empty-windows.yml delete mode 100644 .circleci/src/jobs/test-init-empty.yml delete mode 100644 .circleci/src/jobs/test-init-features.yml delete mode 100644 .circleci/src/jobs/test-portable-stories.yml delete mode 100644 .circleci/src/jobs/test-runner-dev.yml delete mode 100644 .circleci/src/jobs/test-runner-production.yml delete mode 100644 .circleci/src/jobs/test-yarn-pnp.yml delete mode 100644 .circleci/src/jobs/unit-tests.yml delete mode 100644 .circleci/src/jobs/vitest-integration.yml delete mode 100644 .circleci/src/workflows/daily.yml delete mode 100644 .circleci/src/workflows/docs.yml delete mode 100644 .circleci/src/workflows/merged.yml delete mode 100644 .circleci/src/workflows/normal.yml diff --git a/.circleci/src/@orbs.yml b/.circleci/src/@orbs.yml deleted file mode 100644 index e0e9c2823f11..000000000000 --- a/.circleci/src/@orbs.yml +++ /dev/null @@ -1,15 +0,0 @@ -orbs: - # Efficient git cloning - git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 - # Browser automation support - browser-tools: circleci/browser-tools@1.4.1 - # Failure notifications via Discord - discord: antonioned/discord@0.1.0 - # Code coverage reporting - codecov: codecov/codecov@3.2.4 - # Node.js utilities - node: circleci/node@5.2.0 - # Monorepo build optimization - nx: nrwl/nx@1.6.2 - # Windows support - win: circleci/windows@5.0.0 diff --git a/.circleci/src/@parameters.yml b/.circleci/src/@parameters.yml deleted file mode 100644 index fb2727cee8ae..000000000000 --- a/.circleci/src/@parameters.yml +++ /dev/null @@ -1,14 +0,0 @@ -parameters: - workflow: - description: Which workflow to run - type: enum - enum: ['normal', 'merged', 'daily', 'skipped', 'docs'] - default: 'skipped' - ghPrNumber: - description: The PR number - type: string - default: '' - ghBaseBranch: - description: The name of the base branch (the target of the PR) - type: string - default: 'next' diff --git a/.circleci/src/@version.yml b/.circleci/src/@version.yml deleted file mode 100644 index 3879be90472a..000000000000 --- a/.circleci/src/@version.yml +++ /dev/null @@ -1 +0,0 @@ -version: 2.1 diff --git a/.circleci/src/commands/cancel-workflow-on-failure.yml b/.circleci/src/commands/cancel-workflow-on-failure.yml deleted file mode 100644 index 233e75fca22f..000000000000 --- a/.circleci/src/commands/cancel-workflow-on-failure.yml +++ /dev/null @@ -1,10 +0,0 @@ -description: 'Cancels the entire workflow in case the previous step has failed' - -steps: - - run: - name: Cancel current workflow - when: on_fail - command: | - echo "Canceling workflow as previous step resulted in failure." - echo "To execute all checks locally, please run yarn ci-tests" - curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" diff --git a/.circleci/src/commands/report-workflow-on-failure.yml b/.circleci/src/commands/report-workflow-on-failure.yml deleted file mode 100644 index 4fb3d7f1b565..000000000000 --- a/.circleci/src/commands/report-workflow-on-failure.yml +++ /dev/null @@ -1,17 +0,0 @@ -description: 'Reports failures to discord' - -parameters: - template: - description: | - Which template to report in discord. Applicable for parallel sandbox jobs - type: string - default: 'none' - -steps: - - run: - when: on_fail - command: git fetch --unshallow - - discord/status: - only_for_branches: main,next,next-release,latest-release - fail_only: true - failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) diff --git a/.circleci/src/commands/start-event-collector.yml b/.circleci/src/commands/start-event-collector.yml deleted file mode 100644 index 6d0177f9955b..000000000000 --- a/.circleci/src/commands/start-event-collector.yml +++ /dev/null @@ -1,8 +0,0 @@ -description: 'Starts the event collector' - -steps: - - run: - name: Start Event Collector - command: yarn jiti ./event-log-collector.ts - working_directory: scripts - background: true diff --git a/.circleci/src/executors/sb_node_18_browsers.yml b/.circleci/src/executors/sb_node_18_browsers.yml deleted file mode 100644 index 0f5bbbc795bd..000000000000 --- a/.circleci/src/executors/sb_node_18_browsers.yml +++ /dev/null @@ -1,15 +0,0 @@ -docker: - - image: cimg/node:18.20.3-browsers - environment: - NODE_OPTIONS: --max_old_space_size=6144 - -parameters: - class: - description: The Resource class - type: enum - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'small' - -resource_class: <> - -working_directory: /tmp/storybook diff --git a/.circleci/src/executors/sb_node_22_browsers.yml b/.circleci/src/executors/sb_node_22_browsers.yml deleted file mode 100644 index affdeeccab53..000000000000 --- a/.circleci/src/executors/sb_node_22_browsers.yml +++ /dev/null @@ -1,15 +0,0 @@ -docker: - - image: cimg/node:22.15.0-browsers - environment: - NODE_OPTIONS: --max_old_space_size=6144 - -parameters: - class: - description: The Resource class - type: enum - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'small' - -resource_class: <> - -working_directory: /tmp/storybook diff --git a/.circleci/src/executors/sb_node_22_classic.yml b/.circleci/src/executors/sb_node_22_classic.yml deleted file mode 100644 index 99584951908d..000000000000 --- a/.circleci/src/executors/sb_node_22_classic.yml +++ /dev/null @@ -1,15 +0,0 @@ -docker: - - image: cimg/node:22.15.0 - environment: - NODE_OPTIONS: --max_old_space_size=6144 - -parameters: - class: - description: The Resource class - type: enum - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'small' - -resource_class: <> - -working_directory: /tmp/storybook diff --git a/.circleci/src/executors/sb_playwright.yml b/.circleci/src/executors/sb_playwright.yml deleted file mode 100644 index 7c8261103401..000000000000 --- a/.circleci/src/executors/sb_playwright.yml +++ /dev/null @@ -1,15 +0,0 @@ -docker: - - image: mcr.microsoft.com/playwright:v1.52.0-noble - environment: - NODE_OPTIONS: --max_old_space_size=6144 - -parameters: - class: - description: The Resource class - type: enum - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'small' - -resource_class: <> - -working_directory: /tmp/storybook diff --git a/.circleci/src/jobs/bench-packages.yml b/.circleci/src/jobs/bench-packages.yml deleted file mode 100644 index 399cbe69d4d3..000000000000 --- a/.circleci/src/jobs/bench-packages.yml +++ /dev/null @@ -1,61 +0,0 @@ -executor: - class: small - name: sb_node_22_classic - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - # if there is a base branch AND a PR number in parameters, benchmark packages against those - # this happens when run against a PR - - when: - condition: - and: - - << pipeline.parameters.ghBaseBranch >> - - << pipeline.parameters.ghPrNumber >> - steps: - - run: - name: Verdaccio - background: true - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Benchmarking packages against base branch - working_directory: scripts - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - # if there is a NOT a base branch OR NOT a PR number in parameters, just upload benchmarks for the branch - # this happens when run directly on branches, like next or main - - when: - condition: - or: - - not: << pipeline.parameters.ghBaseBranch >> - - not: << pipeline.parameters.ghPrNumber >> - steps: - - run: - name: Verdaccio - background: true - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Uploading package benchmarks for branch - working_directory: scripts - command: yarn bench-packages --upload - - store_artifacts: - path: storybook/bench/packages/results.json - - report-workflow-on-failure - - cancel-workflow-on-failure diff --git a/.circleci/src/jobs/bench-sandboxes.yml b/.circleci/src/jobs/bench-sandboxes.yml deleted file mode 100644 index 759c5a9704c2..000000000000 --- a/.circleci/src/jobs/bench-sandboxes.yml +++ /dev/null @@ -1,29 +0,0 @@ -executor: - class: small - name: sb_playwright - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install sandbox dependencies - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - 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 - - run: - name: Uploading results - command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) diff --git a/.circleci/src/jobs/build.yml b/.circleci/src/jobs/build.yml deleted file mode 100644 index 238947ce7e0b..000000000000 --- a/.circleci/src/jobs/build.yml +++ /dev/null @@ -1,47 +0,0 @@ -executor: - class: large - name: sb_node_22_classic - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - restore_cache: - name: Restore Yarn cache - keys: - - build-yarn-2-cache-v5--{{ checksum "yarn.lock" }} - - run: - name: Compile - command: | - yarn - yarn task --task compile --start-from=auto --no-link --debug - git diff --exit-code - yarn dedupe --check - - run: - name: Publish to Verdaccio - command: | - cd code - yarn local-registry --publish - - report-workflow-on-failure - - store_artifacts: - path: storybook/code/bench/esbuild-metafiles - - save_cache: - name: Save Yarn cache - key: build-yarn-2-cache-v5--{{ checksum "yarn.lock" }} - paths: - - ~/.yarn/berry/cache - - persist_to_workspace: - root: /tmp - paths: - - storybook/node_modules - - storybook/code/node_modules - - storybook/code/addons - - storybook/scripts/node_modules - - storybook/code/bench - - storybook/code/examples - - storybook/code/frameworks - - storybook/code/lib - - storybook/code/core - - storybook/code/builders - - storybook/code/renderers - - storybook/code/presets - - storybook/.verdaccio-cache diff --git a/.circleci/src/jobs/check-sandboxes.yml b/.circleci/src/jobs/check-sandboxes.yml deleted file mode 100644 index f078631cc820..000000000000 --- a/.circleci/src/jobs/check-sandboxes.yml +++ /dev/null @@ -1,28 +0,0 @@ -executor: - class: medium - name: sb_node_22_classic - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install sandbox dependencies - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - 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 - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/jobs/check.yml b/.circleci/src/jobs/check.yml deleted file mode 100644 index ada7fae44c36..000000000000 --- a/.circleci/src/jobs/check.yml +++ /dev/null @@ -1,29 +0,0 @@ -executor: - class: large - name: sb_node_22_classic - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - nx/set-shas: - main-branch-name: 'next' - workflow-name: << pipeline.parameters.workflow >> - - restore_cache: - name: Restore Yarn cache - keys: - - build-yarn-2-cache-v5--{{ checksum "yarn.lock" }} - - run: - name: Compile - command: | - yarn - yarn task --task compile --start-from=auto --no-link --debug - - run: - name: Check - command: | - yarn task --task check --start-from=auto --no-link --debug - - run: - name: Ensure no changes pending - command: | - git diff --exit-code - - report-workflow-on-failure - - cancel-workflow-on-failure diff --git a/.circleci/src/jobs/chromatic-internal-storybook.yml b/.circleci/src/jobs/chromatic-internal-storybook.yml deleted file mode 100644 index dfd6d92062e3..000000000000 --- a/.circleci/src/jobs/chromatic-internal-storybook.yml +++ /dev/null @@ -1,19 +0,0 @@ -executor: - class: large - name: sb_node_22_browsers - -environment: - NODE_OPTIONS: --max_old_space_size=4096 - -steps: - # switched this to the CircleCI helper to get the full git history for TurboSnap - - checkout - - attach_workspace: - at: /tmp - - run: - name: Running Chromatic - command: yarn storybook:ui:chromatic - working_directory: code - - report-workflow-on-failure - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/jobs/chromatic-sandboxes.yml b/.circleci/src/jobs/chromatic-sandboxes.yml deleted file mode 100644 index ef0bd31c8567..000000000000 --- a/.circleci/src/jobs/chromatic-sandboxes.yml +++ /dev/null @@ -1,29 +0,0 @@ -executor: - class: medium - name: sb_node_22_browsers - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - checkout - - attach_workspace: - at: /tmp - - run: - name: Install sandbox dependencies - # chromatic can only run in a git directory - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - cp /tmp/storybook-sandboxes /tmp/storybook/sandbox -r --remove-destination - - run: - name: Running Chromatic - 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 - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/jobs/coverage.yml b/.circleci/src/jobs/coverage.yml deleted file mode 100644 index ba3fcc1bb856..000000000000 --- a/.circleci/src/jobs/coverage.yml +++ /dev/null @@ -1,11 +0,0 @@ -executor: - class: small - name: sb_node_22_browsers - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - codecov/upload - - report-workflow-on-failure diff --git a/.circleci/src/jobs/create-sandboxes.yml b/.circleci/src/jobs/create-sandboxes.yml deleted file mode 100644 index 9fd949dc8b3b..000000000000 --- a/.circleci/src/jobs/create-sandboxes.yml +++ /dev/null @@ -1,45 +0,0 @@ -executor: - class: large - name: sb_node_22_browsers - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Setup Corepack - command: | - # Enable corepack - sudo corepack enable - - # Verify yarn is working - which yarn - yarn --version - - start-event-collector - - run: - name: Create Sandboxes - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit - if [[ $TEMPLATE != bench/* ]]; then - yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE - fi - cd $(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log' - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - - persist_to_workspace: - root: /tmp - paths: - storybook-sandboxes/** - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/jobs/e2e-dev.yml b/.circleci/src/jobs/e2e-dev.yml deleted file mode 100644 index 0dc12f27e782..000000000000 --- a/.circleci/src/jobs/e2e-dev.yml +++ /dev/null @@ -1,36 +0,0 @@ -executor: - class: medium+ - name: sb_playwright - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install sandbox dependencies - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - 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 - # `circleci tests run` allows rerunning failed tests by passing a subset of test files to the command via `xargs` - # --index=0 --total=1 ensures we run all tests on all runners, since each runner handles a different sandbox - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - - store_test_results: - path: storybook/test-results - - store_artifacts: # this is where playwright puts more complex stuff - path: storybook/code/playwright-results/ - destination: playwright diff --git a/.circleci/src/jobs/e2e-production.yml b/.circleci/src/jobs/e2e-production.yml deleted file mode 100644 index e467ececd7ef..000000000000 --- a/.circleci/src/jobs/e2e-production.yml +++ /dev/null @@ -1,36 +0,0 @@ -executor: - class: medium - name: sb_playwright - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install sandbox dependencies - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - 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 - # `circleci tests run` allows rerunning failed tests by passing a subset of test files to the command via `xargs` - # --index=0 --total=1 ensures we run all tests on all runners, since each runner handles a different sandbox - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - - store_test_results: - path: storybook/test-results - - store_artifacts: # this is where playwright puts more complex stuff - path: storybook/code/playwright-results/ - destination: playwright diff --git a/.circleci/src/jobs/e2e-ui-vitest-3.yml b/.circleci/src/jobs/e2e-ui-vitest-3.yml deleted file mode 100644 index b848e4d13e89..000000000000 --- a/.circleci/src/jobs/e2e-ui-vitest-3.yml +++ /dev/null @@ -1,25 +0,0 @@ -executor: - name: sb_playwright - class: medium - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install dependencies - command: yarn install --no-immutable - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run E2E tests - command: yarn playwright-e2e - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - - store_test_results: - path: storybook/test-results - - store_artifacts: - path: storybook/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ - destination: playwright - - report-workflow-on-failure diff --git a/.circleci/src/jobs/e2e-ui.yml b/.circleci/src/jobs/e2e-ui.yml deleted file mode 100644 index 4157d49dcfff..000000000000 --- a/.circleci/src/jobs/e2e-ui.yml +++ /dev/null @@ -1,25 +0,0 @@ -executor: - name: sb_playwright - class: medium - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install dependencies - command: yarn install --no-immutable - working_directory: test-storybooks/portable-stories-kitchen-sink/react - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run E2E tests - command: yarn playwright-e2e - working_directory: test-storybooks/portable-stories-kitchen-sink/react - - store_test_results: - path: storybook/test-results - - store_artifacts: - path: storybook/test-storybooks/portable-stories-kitchen-sink/react/test-results/ - destination: playwright - - report-workflow-on-failure diff --git a/.circleci/src/jobs/knip.yml b/.circleci/src/jobs/knip.yml deleted file mode 100644 index 89f9201820bb..000000000000 --- a/.circleci/src/jobs/knip.yml +++ /dev/null @@ -1,16 +0,0 @@ -executor: - class: large - name: sb_node_22_classic - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Knip - command: | - cd code - yarn knip --no-exit-code - - report-workflow-on-failure - - cancel-workflow-on-failure diff --git a/.circleci/src/jobs/lint.yml b/.circleci/src/jobs/lint.yml deleted file mode 100644 index d27535998dcd..000000000000 --- a/.circleci/src/jobs/lint.yml +++ /dev/null @@ -1,16 +0,0 @@ -executor: - class: medium+ - name: sb_node_22_classic - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Lint - command: | - cd code - yarn lint - - report-workflow-on-failure - - cancel-workflow-on-failure diff --git a/.circleci/src/jobs/pretty-docs.yml b/.circleci/src/jobs/pretty-docs.yml deleted file mode 100644 index 6e1c5f18ad6e..000000000000 --- a/.circleci/src/jobs/pretty-docs.yml +++ /dev/null @@ -1,25 +0,0 @@ -executor: - class: medium+ - name: sb_node_22_classic - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - restore_cache: - name: Restore Yarn cache - keys: - - prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }} - - run: - name: Install - command: | - yarn install - - save_cache: - name: Save Yarn cache - key: prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }} - paths: - - ~/.yarn/berry/cache - - run: - name: Prettier - command: | - cd scripts - yarn docs:prettier:check diff --git a/.circleci/src/jobs/script-checks.yml b/.circleci/src/jobs/script-checks.yml deleted file mode 100644 index bc5d22e1d6e3..000000000000 --- a/.circleci/src/jobs/script-checks.yml +++ /dev/null @@ -1,26 +0,0 @@ -executor: sb_node_22_browsers - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Check parallelism count - command: | - cd scripts - yarn get-template --check - - run: - name: Type check - command: | - cd scripts - yarn check - - run: - name: Run tests - command: | - cd scripts - yarn test --coverage - - store_test_results: - path: storybook/scripts/junit.xml - - report-workflow-on-failure - - cancel-workflow-on-failure diff --git a/.circleci/src/jobs/smoke-test-sandboxes.yml b/.circleci/src/jobs/smoke-test-sandboxes.yml deleted file mode 100644 index adb0bc7302f2..000000000000 --- a/.circleci/src/jobs/smoke-test-sandboxes.yml +++ /dev/null @@ -1,22 +0,0 @@ -executor: - class: medium - name: sb_node_18_browsers - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Smoke Testing Sandboxes - command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/jobs/stories-tests.yml b/.circleci/src/jobs/stories-tests.yml deleted file mode 100644 index bb1f1d2bc9a4..000000000000 --- a/.circleci/src/jobs/stories-tests.yml +++ /dev/null @@ -1,19 +0,0 @@ -executor: - class: xlarge - name: sb_playwright -parallelism: 2 -steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests - - store_test_results: - path: storybook/test-results - - report-workflow-on-failure - - cancel-workflow-on-failure diff --git a/.circleci/src/jobs/test-init-empty-windows.yml b/.circleci/src/jobs/test-init-empty-windows.yml deleted file mode 100644 index 29896855b782..000000000000 --- a/.circleci/src/jobs/test-init-empty-windows.yml +++ /dev/null @@ -1,159 +0,0 @@ -executor: win/default - -parameters: - packageManager: - type: string - template: - type: string - -working_directory: 'C:\Users\circleci\storybook' - -steps: - - checkout - - attach_workspace: - at: 'C:\Users\circleci' - - run: - name: Setup Node & Yarn on Windows - shell: bash.exe - # We pin to Node 22 because of npm issues with Node 24 as it isn't fully stable yet and it causes issues when running npx - command: | - choco install nodejs-lts --version=22.11.0 -y - corepack enable - # Make sure to install dependencies again because we are now running on Windows and the attached workspace had dependencies installed for Linux - - run: - name: Install dependencies - shell: bash.exe - command: yarn install - - when: - condition: - equal: ['npm', << parameters.packageManager >>] - steps: - - run: - name: Verdaccio - background: true - shell: bash.exe - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - shell: bash.exe - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Windows NPM) - shell: bash.exe - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - - when: - condition: - equal: ['yarn2', << parameters.packageManager >>] - steps: - - run: - name: Verdaccio - background: true - shell: bash.exe - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - shell: bash.exe - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Windows Yarn 2) - shell: bash.exe - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - - when: - condition: - equal: ['pnpm', << parameters.packageManager >>] - steps: - - run: - name: Verdaccio - background: true - shell: bash.exe - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - shell: bash.exe - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Windows PNPM) - shell: bash.exe - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - - when: - condition: - equal: ['react-vite-ts', << parameters.template >>] - steps: - - run: - name: Verdaccio - background: true - shell: bash.exe - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - shell: bash.exe - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Windows --skip-install) - shell: bash.exe - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - # TODO: Find out a solution for this. The Discord orb we use isn't powershell compatible. - # For now this will just not report on Discord, but it will fail correctly in CircleCI. - # - report-workflow-on-failure diff --git a/.circleci/src/jobs/test-init-empty.yml b/.circleci/src/jobs/test-init-empty.yml deleted file mode 100644 index 6f73dfec572d..000000000000 --- a/.circleci/src/jobs/test-init-empty.yml +++ /dev/null @@ -1,134 +0,0 @@ -executor: - class: small - name: sb_node_22_browsers - -parameters: - packageManager: - type: string - template: - type: string - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - when: - condition: - equal: ['npm', << parameters.packageManager >>] - steps: - - run: - name: Verdaccio - background: true - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (NPM) - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - - when: - condition: - equal: ['yarn2', << parameters.packageManager >>] - steps: - - run: - name: Verdaccio - background: true - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Yarn 2) - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - - when: - condition: - equal: ['pnpm', << parameters.packageManager >>] - steps: - - run: - name: Verdaccio - background: true - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (PNPM) - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - - when: - condition: - equal: ['react-vite-ts', << parameters.template >>] - steps: - - run: - name: Verdaccio - background: true - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (--skip-install) - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - STORYBOOK_DISABLE_TELEMETRY: true - - report-workflow-on-failure diff --git a/.circleci/src/jobs/test-init-features.yml b/.circleci/src/jobs/test-init-features.yml deleted file mode 100644 index 4e84e5a281ec..000000000000 --- a/.circleci/src/jobs/test-init-features.yml +++ /dev/null @@ -1,34 +0,0 @@ -executor: - class: small - name: sb_node_22_browsers - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Verdaccio - background: true - command: | - cd code - yarn local-registry --open - - run: - name: Wait on Verdaccio - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init for features - command: | - cd .. - mkdir features-1 - cd features-1 - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug - npx vitest - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - STORYBOOK_DISABLE_TELEMETRY: true diff --git a/.circleci/src/jobs/test-portable-stories.yml b/.circleci/src/jobs/test-portable-stories.yml deleted file mode 100644 index a1fa5696cc89..000000000000 --- a/.circleci/src/jobs/test-portable-stories.yml +++ /dev/null @@ -1,36 +0,0 @@ -executor: - name: sb_playwright - class: medium+ - -parameters: - directory: - type: string - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install dependencies - command: yarn install --no-immutable - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run Jest tests - command: yarn jest - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - name: Run Vitest tests - command: yarn vitest - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - name: Run Playwright CT tests - command: yarn playwright-ct - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - name: Run Cypress CT tests - command: yarn cypress - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - report-workflow-on-failure diff --git a/.circleci/src/jobs/test-runner-dev.yml b/.circleci/src/jobs/test-runner-dev.yml deleted file mode 100644 index 698f06ee96f6..000000000000 --- a/.circleci/src/jobs/test-runner-dev.yml +++ /dev/null @@ -1,22 +0,0 @@ -executor: - class: large - name: sb_playwright - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Running Test Runner in Dev mode - command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/jobs/test-runner-production.yml b/.circleci/src/jobs/test-runner-production.yml deleted file mode 100644 index 7dc4f5650138..000000000000 --- a/.circleci/src/jobs/test-runner-production.yml +++ /dev/null @@ -1,35 +0,0 @@ -executor: - class: medium+ - name: sb_playwright - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install sandbox dependencies - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - - start-event-collector - - run: - name: Running Test Runner - command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log' - - run: - name: 'Check Telemetry' - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/jobs/test-yarn-pnp.yml b/.circleci/src/jobs/test-yarn-pnp.yml deleted file mode 100644 index 9310787ddd5f..000000000000 --- a/.circleci/src/jobs/test-yarn-pnp.yml +++ /dev/null @@ -1,21 +0,0 @@ -executor: - name: sb_playwright - class: medium - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install dependencies - command: yarn install --no-immutable - working_directory: test-storybooks/yarn-pnp - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run Storybook smoke test - command: yarn storybook --smoke-test - working_directory: test-storybooks/yarn-pnp - - - report-workflow-on-failure diff --git a/.circleci/src/jobs/unit-tests.yml b/.circleci/src/jobs/unit-tests.yml deleted file mode 100644 index f9ff1afec308..000000000000 --- a/.circleci/src/jobs/unit-tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -executor: - class: xlarge - name: sb_playwright - -parallelism: 2 - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Run tests - # TEST_FILES should include all relevant test files, including story files, but not e2e-tests - # `circleci tests run` shards tests across parallel runners and allows rerunning failed tests by passing a subset of test files to the command via `xargs` - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - - store_test_results: - path: storybook/test-results - # TODO: bring coverage back later. This has caused flakiness in the tests because - # Somehow Vitest reports coverage while some tests are still running, - # then it tries to report coverage again and as result it crashes like this: - # https://app.circleci.com/pipelines/github/storybookjs/storybook/85043/workflows/4ddf7907-b93c-4b17-8fdf-fe0bd7fde905/jobs/715446 - # - persist_to_workspace: - # root: /tmp - # paths: - # - storybook/code/coverage - - report-workflow-on-failure - - cancel-workflow-on-failure diff --git a/.circleci/src/jobs/vitest-integration.yml b/.circleci/src/jobs/vitest-integration.yml deleted file mode 100644 index 4a7180765e46..000000000000 --- a/.circleci/src/jobs/vitest-integration.yml +++ /dev/null @@ -1,35 +0,0 @@ -executor: - class: xlarge - name: sb_playwright - -parameters: - parallelism: - type: integer - -parallelism: << parameters.parallelism >> - -steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: /tmp - - run: - name: Install sandbox dependencies - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - - start-event-collector - - run: - name: Running story tests in Vitest - command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log' - - run: - name: 'Check Telemetry' - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - - store_test_results: - path: storybook/test-results diff --git a/.circleci/src/workflows/daily.yml b/.circleci/src/workflows/daily.yml deleted file mode 100644 index e16835808ae4..000000000000 --- a/.circleci/src/workflows/daily.yml +++ /dev/null @@ -1,122 +0,0 @@ -# Comprehensive daily testing workflow, for the most exhaustive (but expensive) checks. -# Uses the `daily` sandboxes from `sandbox-templates.ts`, which includes the `normal` and `merged` sandboxes -# Triggered via the `ci:daily` pull request label - -when: - equal: [daily, << pipeline.parameters.workflow >>] - -jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - create-sandboxes: - parallelism: 39 - requires: - - build - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - # - smoke-test-sandboxes: # disabled for now - # requires: - # - create-sandboxes - - chromatic-sandboxes: - parallelism: 36 - requires: - - create-sandboxes - - e2e-production: - parallelism: 7 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 28 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 34 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 13 - requires: - - create-sandboxes - - test-portable-stories: - requires: - - build - matrix: - parameters: - directory: ['react', 'vue3', 'nextjs', 'svelte'] - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-init-empty: - requires: - - build - matrix: - parameters: - packageManager: - - 'npm' - # TODO: reenable once we find out the source of failure - # - "yarn1" - # - "yarn2" - # - "pnpm" - template: - - 'react-vite-ts' - - 'nextjs-ts' - - 'vue-vite-ts' - # --smoke-test is not supported for the angular builder right now - # - "angular-cli" - - 'lit-vite-ts' - - test-init-empty-windows: - requires: - - build - matrix: - parameters: - packageManager: - - 'npm' - template: - - 'react-vite-ts' - - 'nextjs-ts' - - 'vue-vite-ts' - - 'lit-vite-ts' -# TODO: don't forget to reenable this -# - bench-sandboxes: -# parallelism: 5 -# requires: -# - create-sandboxes - -# TODO: reenable once we find out the source of flakyness -# - test-runner-dev: -# parallelism: 4 -# requires: -# - create-sandboxes diff --git a/.circleci/src/workflows/docs.yml b/.circleci/src/workflows/docs.yml deleted file mode 100644 index 2ee7a11790d8..000000000000 --- a/.circleci/src/workflows/docs.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Documentation checks -# Triggered via the `ci:docs` pull request label - -when: - equal: [docs, << pipeline.parameters.workflow >>] - -jobs: - - pretty-docs diff --git a/.circleci/src/workflows/merged.yml b/.circleci/src/workflows/merged.yml deleted file mode 100644 index cf0078883d76..000000000000 --- a/.circleci/src/workflows/merged.yml +++ /dev/null @@ -1,103 +0,0 @@ -# Post-merge validation workflow, runs after a pull request is merged -# Uses the `merged` sandboxes from `sandbox-templates.ts`, which includes the `normal` sandboxes -# Can be triggered via the `ci:merged` pull request label - -when: - equal: [merged, << pipeline.parameters.workflow >>] - -jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 22 - requires: - - build - - chromatic-sandboxes: - parallelism: 19 - requires: - - create-sandboxes - - e2e-production: - parallelism: 6 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 14 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 17 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 7 - requires: - - create-sandboxes - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - - test-portable-stories: - requires: - - build - matrix: - parameters: - directory: ['react', 'vue3', 'nextjs', 'svelte'] - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-init-empty-windows: - requires: - - build - matrix: - parameters: - packageManager: - - 'npm' - template: - - 'react-vite-ts' - - 'nextjs-ts' - - 'vue-vite-ts' - - 'lit-vite-ts' -# TODO: don't forget to reenable this -# - bench-sandboxes: -# parallelism: 5 -# requires: -# - create-sandboxes -# TODO: reenable once we find out the source of flakyness -# - test-runner-dev: -# parallelism: 4 -# requires: -# - create-sandboxes diff --git a/.circleci/src/workflows/normal.yml b/.circleci/src/workflows/normal.yml deleted file mode 100644 index a3f4ed1de6f6..000000000000 --- a/.circleci/src/workflows/normal.yml +++ /dev/null @@ -1,90 +0,0 @@ -# Standard PR check workflow, applicable to most pull requests -# Uses the `normal` sandboxes from `sandbox-templates.ts` -# Can be triggered via the `ci:normal` pull request label - -when: - equal: [normal, << pipeline.parameters.workflow >>] - -jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 14 - requires: - - build - - chromatic-sandboxes: - parallelism: 11 - requires: - - create-sandboxes - - e2e-production: - parallelism: 6 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 8 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 9 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 5 - requires: - - create-sandboxes - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - # TODO: don't forget to reenable this - # - bench-sandboxes: - # parallelism: 5 - # requires: - # - create-sandboxes - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-portable-stories: - requires: - - build - matrix: - parameters: - directory: ['react', 'vue3', 'nextjs', 'svelte'] - # TODO: reenable once we find out the source of flakyness - # - test-runner-dev: - # requires: - # - create-sandboxes From 9d262fcad11afdec6c80c034645a921bd7269ed5 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:42:56 +0100 Subject: [PATCH 109/310] Discard changes to code/lib/cli-storybook/src/sandbox.ts --- code/lib/cli-storybook/src/sandbox.ts | 88 ++++++++++++--------------- 1 file changed, 40 insertions(+), 48 deletions(-) diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index e6e0c5025136..5bfcc854048f 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -15,6 +15,7 @@ import { sync as spawnSync } from 'cross-spawn'; import { join } from 'pathe'; import picocolors from 'picocolors'; import { lt, prerelease } from 'semver'; +import invariant from 'tiny-invariant'; import { dedent } from 'ts-dedent'; import type { Template, TemplateKey } from './sandbox-templates'; @@ -41,7 +42,6 @@ export const sandbox = async ({ let selectedConfig: Template | undefined = TEMPLATES[filterValue as TemplateKey]; let templateId: Choice | null = selectedConfig ? (filterValue as TemplateKey) : null; - console.log({ options, output: outputDirectory, filterValue, init, templateId, selectedConfig }); const { packageManager: pkgMgr } = options; const packageManager = JsPackageManagerFactory.getPackageManager({ @@ -56,35 +56,31 @@ export const sandbox = async ({ const downloadType = !isOutdated && init ? 'after-storybook' : 'before-storybook'; const branch = isPrerelease ? 'next' : 'main'; - // const messages = { - // welcome: `Creating a Storybook ${picocolors.bold(currentVersion)} sandbox..`, - // notLatest: picocolors.red(dedent` - // This version is behind the latest release, which is: ${picocolors.bold(latestVersion)}! - // You likely ran the init command through npx, which can use a locally cached version, to get the latest please run: - // ${picocolors.bold('npx storybook@latest sandbox')} - - // You may want to CTRL+C to stop, and run with the latest version instead. - // `), - // longInitTime: picocolors.yellow( - // 'The creation of the sandbox will take longer, because we will need to run init.' - // ), - // prerelease: picocolors.yellow('This is a pre-release version.'), - // }; - - console.log({ isOutdated, isPrerelease }); - - // logger.logBox( - // [messages.welcome] - // .concat(isOutdated && !isPrerelease ? [messages.notLatest] : []) - // .concat(init && (isOutdated || isPrerelease) ? [messages.longInitTime] : []) - // .concat(isPrerelease ? [messages.prerelease] : []) - // .join('\n'), - // { - // rounded: true, - // } - // ); - - console.log({ selectedConfig }); + const messages = { + welcome: `Creating a Storybook ${picocolors.bold(currentVersion)} sandbox..`, + notLatest: picocolors.red(dedent` + This version is behind the latest release, which is: ${picocolors.bold(latestVersion)}! + You likely ran the init command through npx, which can use a locally cached version, to get the latest please run: + ${picocolors.bold('npx storybook@latest sandbox')} + + You may want to CTRL+C to stop, and run with the latest version instead. + `), + longInitTime: picocolors.yellow( + 'The creation of the sandbox will take longer, because we will need to run init.' + ), + prerelease: picocolors.yellow('This is a pre-release version.'), + }; + + logger.logBox( + [messages.welcome] + .concat(isOutdated && !isPrerelease ? [messages.notLatest] : []) + .concat(init && (isOutdated || isPrerelease) ? [messages.longInitTime] : []) + .concat(isPrerelease ? [messages.prerelease] : []) + .join('\n'), + { + rounded: true, + } + ); if (!selectedConfig) { const filterRegex = new RegExp(`^${filterValue || ''}`, 'i'); @@ -165,11 +161,7 @@ export const sandbox = async ({ } let selectedDirectory = outputDirectory; - const outputDirectoryName = outputDirectory || templateId; - - console.log({ selectedDirectory, outputDirectoryName }); - if (selectedDirectory && existsSync(`${selectedDirectory}`)) { logger.log(`⚠️ ${selectedDirectory} already exists! Overwriting...`); await rm(selectedDirectory, { recursive: true, force: true }); @@ -194,7 +186,7 @@ export const sandbox = async ({ ); selectedDirectory = directory; } - // invariant(selectedDirectory); + invariant(selectedDirectory); try { const templateDestination = isAbsolute(selectedDirectory) @@ -253,23 +245,23 @@ export const sandbox = async ({ `) : `Recreate your setup, then ${picocolors.yellow(`npx storybook@latest init`)}`; - // logger.logBox( - // dedent` - // 🎉 Your Storybook reproduction project is ready to use! 🎉 + logger.logBox( + dedent` + 🎉 Your Storybook reproduction project is ready to use! 🎉 - // ${picocolors.yellow(`cd ${selectedDirectory}`)} - // ${initMessage} + ${picocolors.yellow(`cd ${selectedDirectory}`)} + ${initMessage} - // Once you've recreated the problem you're experiencing, please: + Once you've recreated the problem you're experiencing, please: - // 1. Document any additional steps in ${picocolors.cyan('README.md')} - // 2. Publish the repository to github - // 3. Link to the repro repository in your issue + 1. Document any additional steps in ${picocolors.cyan('README.md')} + 2. Publish the repository to github + 3. Link to the repro repository in your issue - // Having a clean repro helps us solve your issue faster! 🙏 - // `.trim(), - // { rounded: true } - // ); + Having a clean repro helps us solve your issue faster! 🙏 + `.trim(), + { rounded: true } + ); } catch (error) { logger.error('🚨 Failed to create sandbox'); throw error; From d6ee31ac2d725b32b989c0f21b888c2efd6ccd76 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:45:27 +0100 Subject: [PATCH 110/310] Update package.json files across multiple directories to streamline dependencies and configurations, including re-adding 'storybook' entries and 'nx' configurations for consistency. --- package.json | 7 ++----- scripts/package.json | 10 +++++----- test-storybooks/ember-cli/package.json | 8 ++++---- test-storybooks/external-docs/package.json | 4 ++-- .../nextjs/package.json | 12 ++++++------ .../react-vitest-3/package.json | 14 +++++++------- .../react/package.json | 14 +++++++------- .../svelte/package.json | 10 +++++----- .../vue3/package.json | 12 ++++++------ test-storybooks/server-kitchen-sink/package.json | 4 ++-- test-storybooks/standalone-preview/package.json | 4 ++-- test-storybooks/yarn-pnp/package.json | 12 ++++++------ 12 files changed, 54 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index 9d49f08f6bf0..3fa2f3e218b9 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,6 @@ "vite-ecosystem-ci:build": "yarn task --task sandbox --template react-vite/default-ts --start-from=install --skip-cache", "vite-ecosystem-ci:test": "yarn task --task test-runner-dev --template react-vite/default-ts --start-from=dev && yarn task --task test-runner --template react-vite/default-ts --start-from=build && yarn task --task vitest-integration --template react-vite/default-ts --start-from vitest-integration" }, - "packageManager": "yarn@4.10.3", - "engines": { - "node": ">=22.0.0" - }, "resolutions": { "@babel/runtime": "latest", "@babel/traverse": "latest", @@ -71,5 +67,6 @@ "kill-port": "^2.0.1", "nx": "^22.1.3", "prettier": "^3.7.1" - } + }, + "packageManager": "yarn@4.10.3" } diff --git a/scripts/package.json b/scripts/package.json index 1d0714e9a36b..3da3e20aa4f1 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -3,9 +3,6 @@ "version": "7.0.0-alpha.16", "private": true, "type": "module", - "nx": { - "includedScripts": [] - }, "scripts": { "bench-packages": "jiti ./bench/bench-packages.ts", "build-package": "jiti ./build-package.ts", @@ -23,6 +20,7 @@ "lint:js:cmd": "cross-env NODE_ENV=production eslint --cache --cache-location=../.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives", "lint:package": "sort-package-json", "local-registry": "jiti ./run-registry.ts", + "prepare-sandbox": "jiti ./prepare-sandbox.ts", "publish": "jiti ./sandbox/publish.ts", "release:cancel-preparation-runs": "jiti ./release/cancel-preparation-runs.ts", "release:generate-pr-description": "jiti ./release/generate-pr-description.ts", @@ -40,7 +38,6 @@ "release:write-changelog": "jiti ./release/write-changelog.ts", "strict-ts": "jiti ./strict-ts.ts", "task": "jiti ./task.ts", - "prepare-sandbox": "jiti ./prepare-sandbox.ts", "test": "NODE_OPTIONS=--max_old_space_size=4096 vitest run", "test:watch": "NODE_OPTIONS=--max_old_space_size=4096 vitest watch", "upgrade": "jiti ./task.ts", @@ -190,5 +187,8 @@ "verdaccio": "^5.33.0", "verdaccio-auth-memory": "^10.3.1" }, - "packageManager": "yarn@4.10.3" + "packageManager": "yarn@4.10.3", + "nx": { + "includedScripts": [] + } } diff --git a/test-storybooks/ember-cli/package.json b/test-storybooks/ember-cli/package.json index cba6fdffedf2..cff81fa1cfaa 100644 --- a/test-storybooks/ember-cli/package.json +++ b/test-storybooks/ember-cli/package.json @@ -7,8 +7,8 @@ "build": "ember build --output-path ember-output", "dev": "ember serve", "storybook": "yarn build && storybook dev -p 9009", - "storybook-prebuild": "yarn build && shx cp -r public/* ember-output", - "storybook:dev": "yarn dev & NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 9009" + "storybook:dev": "yarn dev & NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 9009", + "storybook-prebuild": "yarn build && shx cp -r public/* ember-output" }, "resolutions": { "@storybook/addon-a11y": "file:../../code/addons/a11y", @@ -19,7 +19,6 @@ "@storybook/builder-vite": "file:../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../code/lib/codemod", - "storybook": "file:../../code/core", "@storybook/core-webpack": "file:../../code/lib/core-webpack", "@storybook/csf-plugin": "file:../../code/lib/csf-plugin", "@storybook/ember": "file:../../code/frameworks/ember", @@ -42,7 +41,8 @@ "@storybook/vue3": "file:../../code/renderers/vue3", "@storybook/vue3-vite": "file:../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../code/renderers/web-components", - "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite" + "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite", + "storybook": "file:../../code/core" }, "dependencies": { "ember-named-blocks-polyfill": "^0.2.3", diff --git a/test-storybooks/external-docs/package.json b/test-storybooks/external-docs/package.json index bffd36eb21e3..239ecc93847e 100644 --- a/test-storybooks/external-docs/package.json +++ b/test-storybooks/external-docs/package.json @@ -19,7 +19,6 @@ "@storybook/builder-vite": "file:../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../code/lib/codemod", - "storybook": "file:../../code/core", "@storybook/core-webpack": "file:../../code/lib/core-webpack", "@storybook/csf-plugin": "file:../../code/lib/csf-plugin", "@storybook/ember": "file:../../code/frameworks/ember", @@ -42,7 +41,8 @@ "@storybook/vue3": "file:../../code/renderers/vue3", "@storybook/vue3-vite": "file:../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../code/renderers/web-components", - "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite" + "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite", + "storybook": "file:../../code/core" }, "dependencies": { "@storybook/addon-docs": "*", diff --git a/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json b/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json index ebabb698627c..62cd3ed2a11a 100644 --- a/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/nextjs/package.json @@ -14,9 +14,6 @@ "storybook": "storybook dev -p 6006", "vitest": "echo 'Vitest is not supported in Next.js testing'" }, - "nx": { - "includedScripts": [] - }, "resolutions": { "@storybook/addon-a11y": "file:../../../code/addons/a11y", "@storybook/addon-docs": "file:../../../code/addons/docs", @@ -26,8 +23,6 @@ "@storybook/builder-vite": "file:../../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../../code/lib/codemod", - "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", - "storybook": "file:../../../code/core", "@storybook/core-webpack": "file:../../../code/lib/core-webpack", "@storybook/csf-plugin": "file:../../../code/lib/csf-plugin", "@storybook/ember": "file:../../../code/frameworks/ember", @@ -50,7 +45,9 @@ "@storybook/vue3": "file:../../../code/renderers/vue3", "@storybook/vue3-vite": "file:../../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../../code/renderers/web-components", - "@storybook/web-components-vite": "file:../../../code/frameworks/web-components-vite" + "@storybook/web-components-vite": "file:../../../code/frameworks/web-components-vite", + "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", + "storybook": "file:../../../code/core" }, "dependencies": { "next": "^14.2.0", @@ -78,5 +75,8 @@ }, "maintainer_please_read_this": { "_": "we use file protocol to make this setup close to real life scenarios as well as avoid issues with duplicated React instances. When you recompile the SB packages, you need to rerun install." + }, + "nx": { + "includedScripts": [] } } diff --git a/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/package.json b/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/package.json index 651bf906aafb..ebaa7cd0f087 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/package.json @@ -11,9 +11,6 @@ "storybook": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 6006", "vitest": "SKIP_FAIL_ON_PURPOSE=true vitest run" }, - "nx": { - "includedScripts": [] - }, "resolutions": { "@playwright/test": "1.52.0", "@storybook/addon-a11y": "file:../../../code/addons/a11y", @@ -21,16 +18,14 @@ "@storybook/addon-jest": "file:../../../code/addons/jest", "@storybook/addon-links": "file:../../../code/addons/links", "@storybook/addon-themes": "file:../../../code/addons/themes", + "@storybook/addon-vitest": "file:../../../code/addons/vitest", "@storybook/angular": "file:../../../code/frameworks/angular", "@storybook/builder-vite": "file:../../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../../code/lib/codemod", - "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", - "storybook": "portal:../../../code/core", "@storybook/core-webpack": "portal:../../../code/lib/core-webpack", "@storybook/csf-plugin": "portal:../../../code/lib/csf-plugin", "@storybook/ember": "portal:../../../code/frameworks/ember", - "@storybook/addon-vitest": "file:../../../code/addons/vitest", "@storybook/html": "file:../../../code/renderers/html", "@storybook/nextjs": "file:../../../code/frameworks/nextjs", "@storybook/preact": "file:../../../code/renderers/preact", @@ -51,7 +46,9 @@ "@storybook/vue3-vite": "file:../../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../../code/renderers/web-components", "@storybook/web-components-vite": "file:../../../code/frameworks/web-components-vite", - "playwright": "1.52.0" + "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", + "playwright": "1.52.0", + "storybook": "portal:../../../code/core" }, "dependencies": { "react": "^18.0.0", @@ -83,5 +80,8 @@ "typescript": "^5.8.3", "vite": "^5.1.1", "vitest": "^3.2.4" + }, + "nx": { + "includedScripts": [] } } diff --git a/test-storybooks/portable-stories-kitchen-sink/react/package.json b/test-storybooks/portable-stories-kitchen-sink/react/package.json index 844d4672e062..24835d2fb05d 100644 --- a/test-storybooks/portable-stories-kitchen-sink/react/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/react/package.json @@ -15,25 +15,20 @@ "storybook": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 6006", "vitest": "SKIP_FAIL_ON_PURPOSE=true vitest run" }, - "nx": { - "includedScripts": [] - }, "resolutions": { "@playwright/test": "1.52.0", "@storybook/addon-a11y": "file:../../../code/addons/a11y", "@storybook/addon-docs": "file:../../../code/addons/docs", "@storybook/addon-links": "file:../../../code/addons/links", "@storybook/addon-themes": "file:../../../code/addons/themes", + "@storybook/addon-vitest": "file:../../../code/addons/vitest", "@storybook/angular": "file:../../../code/frameworks/angular", "@storybook/builder-vite": "file:../../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../../code/lib/codemod", - "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", - "storybook": "portal:../../../code/core", "@storybook/core-webpack": "portal:../../../code/lib/core-webpack", "@storybook/csf-plugin": "portal:../../../code/lib/csf-plugin", "@storybook/ember": "portal:../../../code/frameworks/ember", - "@storybook/addon-vitest": "file:../../../code/addons/vitest", "@storybook/html": "file:../../../code/renderers/html", "@storybook/nextjs": "file:../../../code/frameworks/nextjs", "@storybook/preact": "file:../../../code/renderers/preact", @@ -54,7 +49,9 @@ "@storybook/vue3-vite": "file:../../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../../code/renderers/web-components", "@storybook/web-components-vite": "file:../../../code/frameworks/web-components-vite", - "playwright": "1.52.0" + "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", + "playwright": "1.52.0", + "storybook": "portal:../../../code/core" }, "dependencies": { "react": "^18.0.0", @@ -94,5 +91,8 @@ "typescript": "^5.8.3", "vite": "^7", "vitest": "4.0.4" + }, + "nx": { + "includedScripts": [] } } diff --git a/test-storybooks/portable-stories-kitchen-sink/svelte/package.json b/test-storybooks/portable-stories-kitchen-sink/svelte/package.json index 07bac3d7d8ab..e351a866665f 100644 --- a/test-storybooks/portable-stories-kitchen-sink/svelte/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/svelte/package.json @@ -13,9 +13,6 @@ "storybook": "STORYBOOK_TELEMETRY_URL=\"http://localhost:6007/event-log\" storybook dev -p 6006", "vitest": "vitest" }, - "nx": { - "includedScripts": [] - }, "resolutions": { "@playwright/test": "1.52.0", "@storybook/addon-a11y": "portal:../../../code/addons/a11y", @@ -26,7 +23,6 @@ "@storybook/builder-vite": "portal:../../../code/builders/builder-vite", "@storybook/builder-webpack5": "portal:../../../code/builders/builder-webpack5", "@storybook/codemod": "portal:../../../code/lib/codemod", - "storybook": "portal:../../../code/core", "@storybook/core-webpack": "portal:../../../code/lib/core-webpack", "@storybook/csf-plugin": "portal:../../../code/lib/csf-plugin", "@storybook/ember": "portal:../../../code/frameworks/ember", @@ -50,7 +46,8 @@ "@storybook/vue3-vite": "portal:../../../code/frameworks/vue3-vite", "@storybook/web-components": "portal:../../../code/renderers/web-components", "@storybook/web-components-vite": "portal:../../../code/frameworks/web-components-vite", - "playwright": "1.52.0" + "playwright": "1.52.0", + "storybook": "portal:../../../code/core" }, "devDependencies": { "@playwright/experimental-ct-svelte": "1.52.0", @@ -69,5 +66,8 @@ "typescript": "^5.2.2", "vite": "^6", "vitest": "^3.2.4" + }, + "nx": { + "includedScripts": [] } } diff --git a/test-storybooks/portable-stories-kitchen-sink/vue3/package.json b/test-storybooks/portable-stories-kitchen-sink/vue3/package.json index 04f1f5292d08..fe78b5c5f255 100644 --- a/test-storybooks/portable-stories-kitchen-sink/vue3/package.json +++ b/test-storybooks/portable-stories-kitchen-sink/vue3/package.json @@ -14,9 +14,6 @@ "storybook": "STORYBOOK_TELEMETRY_URL=\"http://localhost:6007/event-log\" storybook dev -p 6006", "vitest": "echo 'Vitest tests are implemented in the renderer directory instead!'" }, - "nx": { - "includedScripts": [] - }, "resolutions": { "@playwright/test": "1.52.0", "@storybook/addon-a11y": "file:../../../code/addons/a11y", @@ -27,8 +24,6 @@ "@storybook/builder-vite": "file:../../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../../code/lib/codemod", - "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", - "storybook": "file:../../../code/core", "@storybook/core-webpack": "file:../../../code/lib/core-webpack", "@storybook/csf-plugin": "file:../../../code/lib/csf-plugin", "@storybook/ember": "file:../../../code/frameworks/ember", @@ -52,7 +47,9 @@ "@storybook/vue3-vite": "file:../../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../../code/renderers/web-components", "@storybook/web-components-vite": "file:../../../code/frameworks/web-components-vite", - "playwright": "1.52.0" + "eslint-plugin-storybook": "file:../../../code/lib/eslint-plugin", + "playwright": "1.52.0", + "storybook": "file:../../../code/core" }, "dependencies": { "vue": "^3.4.19" @@ -71,5 +68,8 @@ "storybook": "^8.0.0", "typescript": "^5.2.2", "vite": "^5.1.1" + }, + "nx": { + "includedScripts": [] } } diff --git a/test-storybooks/server-kitchen-sink/package.json b/test-storybooks/server-kitchen-sink/package.json index adb9d83d0c9b..1dc6ba82e40e 100644 --- a/test-storybooks/server-kitchen-sink/package.json +++ b/test-storybooks/server-kitchen-sink/package.json @@ -22,7 +22,6 @@ "@storybook/builder-vite": "file:../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../code/lib/codemod", - "storybook": "file:../../code/core", "@storybook/core-webpack": "file:../../code/lib/core-webpack", "@storybook/csf-plugin": "file:../../code/lib/csf-plugin", "@storybook/ember": "file:../../code/frameworks/ember", @@ -45,7 +44,8 @@ "@storybook/vue3": "file:../../code/renderers/vue3", "@storybook/vue3-vite": "file:../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../code/renderers/web-components", - "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite" + "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite", + "storybook": "file:../../code/core" }, "devDependencies": { "@storybook/addon-a11y": "*", diff --git a/test-storybooks/standalone-preview/package.json b/test-storybooks/standalone-preview/package.json index 6f185c52f623..9d80250b5040 100644 --- a/test-storybooks/standalone-preview/package.json +++ b/test-storybooks/standalone-preview/package.json @@ -15,7 +15,6 @@ "@storybook/builder-vite": "file:../../code/builders/builder-vite", "@storybook/builder-webpack5": "file:../../code/builders/builder-webpack5", "@storybook/codemod": "file:../../code/lib/codemod", - "storybook": "file:../../../code/core", "@storybook/core-webpack": "file:../../code/lib/core-webpack", "@storybook/csf-plugin": "file:../../code/lib/csf-plugin", "@storybook/ember": "file:../../code/frameworks/ember", @@ -38,7 +37,8 @@ "@storybook/vue3": "file:../../code/renderers/vue3", "@storybook/vue3-vite": "file:../../code/frameworks/vue3-vite", "@storybook/web-components": "file:../../code/renderers/web-components", - "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite" + "@storybook/web-components-vite": "file:../../code/frameworks/web-components-vite", + "storybook": "file:../../../code/core" }, "devDependencies": { "@storybook/addon-docs": "*", diff --git a/test-storybooks/yarn-pnp/package.json b/test-storybooks/yarn-pnp/package.json index cb9924ed904d..c21cc01fde26 100644 --- a/test-storybooks/yarn-pnp/package.json +++ b/test-storybooks/yarn-pnp/package.json @@ -4,14 +4,11 @@ "private": true, "type": "module", "scripts": { - "dev": "vite", "build": "vue-tsc -b && vite build", + "build-storybook": "storybook build", + "dev": "vite", "preview": "vite preview", - "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" - }, - "nx": { - "includedScripts": [] + "storybook": "storybook dev -p 6006" }, "resolutions": { "@playwright/test": "1.52.0", @@ -75,5 +72,8 @@ "vite": "^7.1.7", "vitest": "^4.0.7", "vue-tsc": "^3.1.0" + }, + "nx": { + "includedScripts": [] } } From cab6f6df2e262a33504ce8f4ddfa3d9cd81e9718 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:47:47 +0100 Subject: [PATCH 111/310] Update detect-port dependency version in package.json and yarn.lock to 1.6.1 for improved functionality and compatibility. --- code/core/package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/core/package.json b/code/core/package.json index 3517d3a8323e..1c6a32a266e1 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -269,7 +269,7 @@ "deep-object-diff": "^1.1.0", "dequal": "^2.0.2", "detect-indent": "^7.0.1", - "detect-port": "^1.3.0", + "detect-port": "^1.6.1", "diff": "^5.2.0", "downshift": "^9.0.4", "ejs": "^3.1.10", diff --git a/yarn.lock b/yarn.lock index 2a5e014181f6..2279fa24fa66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15465,7 +15465,7 @@ __metadata: languageName: node linkType: hard -"detect-port@npm:^1.3.0, detect-port@npm:^1.6.1": +"detect-port@npm:^1.6.1": version: 1.6.1 resolution: "detect-port@npm:1.6.1" dependencies: @@ -29121,7 +29121,7 @@ __metadata: deep-object-diff: "npm:^1.1.0" dequal: "npm:^2.0.2" detect-indent: "npm:^7.0.1" - detect-port: "npm:^1.3.0" + detect-port: "npm:^1.6.1" diff: "npm:^5.2.0" downshift: "npm:^9.0.4" ejs: "npm:^3.1.10" From aef86c5b3c44eb69298a116a78319f2eb124c7c0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:49:19 +0100 Subject: [PATCH 112/310] Remove deprecated dependencies from yarn.lock and package.json to streamline the codebase and improve compatibility. --- code/package.json | 1 - yarn.lock | 582 +--------------------------------------------- 2 files changed, 6 insertions(+), 577 deletions(-) diff --git a/code/package.json b/code/package.json index 50f0764f895f..752df6f2d2e4 100644 --- a/code/package.json +++ b/code/package.json @@ -84,7 +84,6 @@ "@storybook/addon-themes": "workspace:*", "@storybook/addon-vitest": "workspace:*", "@storybook/angular": "workspace:*", - "@storybook/bench": "next", "@storybook/builder-vite": "workspace:*", "@storybook/builder-webpack5": "workspace:*", "@storybook/codemod": "workspace:*", diff --git a/yarn.lock b/yarn.lock index 2279fa24fa66..08f0d3415886 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2825,26 +2825,6 @@ __metadata: languageName: node linkType: hard -"@google-cloud/bigquery@npm:^5.2.0": - version: 5.12.0 - resolution: "@google-cloud/bigquery@npm:5.12.0" - dependencies: - "@google-cloud/common": "npm:^3.9.0" - "@google-cloud/paginator": "npm:^3.0.0" - "@google-cloud/promisify": "npm:^2.0.0" - arrify: "npm:^2.0.1" - big.js: "npm:^6.0.0" - duplexify: "npm:^4.0.0" - extend: "npm:^3.0.2" - is: "npm:^3.3.0" - p-event: "npm:^4.1.0" - readable-stream: "npm:^3.6.0" - stream-events: "npm:^1.0.5" - uuid: "npm:^8.0.0" - checksum: 10c0/add0f51b07f4e6d6614b24db765fe4c1729bdf08d5bb58f19361d54bd198f7787a5df02af005484badadb3f2bb252b9a5eae4ed5a23a880b4f05c4c33d347e92 - languageName: node - linkType: hard - "@google-cloud/bigquery@npm:^6.2.1": version: 6.2.1 resolution: "@google-cloud/bigquery@npm:6.2.1" @@ -2864,23 +2844,6 @@ __metadata: languageName: node linkType: hard -"@google-cloud/common@npm:^3.9.0": - version: 3.10.0 - resolution: "@google-cloud/common@npm:3.10.0" - dependencies: - "@google-cloud/projectify": "npm:^2.0.0" - "@google-cloud/promisify": "npm:^2.0.0" - arrify: "npm:^2.0.1" - duplexify: "npm:^4.1.1" - ent: "npm:^2.2.0" - extend: "npm:^3.0.2" - google-auth-library: "npm:^7.14.0" - retry-request: "npm:^4.2.2" - teeny-request: "npm:^7.0.0" - checksum: 10c0/00ade204941f878a5923fb52edb2bf7105860854d87a970b55061a028e984040ae5e2b7d5f3cfe2ad568cff0bc9f9066560ba7a811eef642725ae4efae375e33 - languageName: node - linkType: hard - "@google-cloud/common@npm:^4.0.0": version: 4.0.3 resolution: "@google-cloud/common@npm:4.0.3" @@ -2898,16 +2861,6 @@ __metadata: languageName: node linkType: hard -"@google-cloud/paginator@npm:^3.0.0": - version: 3.0.7 - resolution: "@google-cloud/paginator@npm:3.0.7" - dependencies: - arrify: "npm:^2.0.0" - extend: "npm:^3.0.2" - checksum: 10c0/589f08435591897f694f18c154cd36a69c7094da40668b713152faefbba9fe0a46a85eb46d9f0160c698f21b61a86b11dfc21cd74b1c071b96b45e8892e41184 - languageName: node - linkType: hard - "@google-cloud/paginator@npm:^4.0.0": version: 4.0.1 resolution: "@google-cloud/paginator@npm:4.0.1" @@ -2925,13 +2878,6 @@ __metadata: languageName: node linkType: hard -"@google-cloud/projectify@npm:^2.0.0": - version: 2.1.1 - resolution: "@google-cloud/projectify@npm:2.1.1" - checksum: 10c0/8463cb23f02c65f38925b3326b851404f74ad0bcc1083143e8bd4b42994ad39be1e25e7a2bcbe8891d8d01dc8c1bf00289c14654baf367133d7705df75ad4469 - languageName: node - linkType: hard - "@google-cloud/projectify@npm:^3.0.0": version: 3.0.0 resolution: "@google-cloud/projectify@npm:3.0.0" @@ -2939,13 +2885,6 @@ __metadata: languageName: node linkType: hard -"@google-cloud/promisify@npm:^2.0.0": - version: 2.0.4 - resolution: "@google-cloud/promisify@npm:2.0.4" - checksum: 10c0/fc7d738cf1c504489ebea18d25d6278392e0bb85012db8e36a2c625917121d0a667ba37a1f90692a5142fe8d2aa5026a08d5f24825c2cabbebc015752a6d486b - languageName: node - linkType: hard - "@google-cloud/promisify@npm:^3.0.0": version: 3.0.1 resolution: "@google-cloud/promisify@npm:3.0.1" @@ -2953,290 +2892,14 @@ __metadata: languageName: node linkType: hard -"@hapi/accept@npm:^5.0.1": - version: 5.0.2 - resolution: "@hapi/accept@npm:5.0.2" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/38c7bcba40ca2c09aaafefbba73bf5b991bfcc2b2e57285ab6c6a9e00a06c2bdfd0c29a2a89f9ba3af314e12bc0ebd92652e805b7cef805062e8e73f41e75630 - languageName: node - linkType: hard - -"@hapi/ammo@npm:5.x.x, @hapi/ammo@npm:^5.0.1": - version: 5.0.1 - resolution: "@hapi/ammo@npm:5.0.1" - dependencies: - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/35f6268efa84832f9d3ba086c25bf7597e87e93005fe02aaf4054a271288d19640981127f389e7f42c7e8fff7946518a2c4f7c7adb04d86818bdbdc331639414 - languageName: node - linkType: hard - -"@hapi/b64@npm:5.x.x": - version: 5.0.0 - resolution: "@hapi/b64@npm:5.0.0" - dependencies: - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/01389a2de70a3d48252f71786ee6b9487d571f999a46ea80b3481f84af66974e551e751286c85612d570ef714b35c07f9b71f765a05816584062f2726ad69ad8 - languageName: node - linkType: hard - -"@hapi/boom@npm:9.x.x, @hapi/boom@npm:^9.1.0": - version: 9.1.4 - resolution: "@hapi/boom@npm:9.1.4" - dependencies: - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/49bb99443e7bdbbdc87ee8de97cd64351e173b57d7c59061c69972d2de77fb98f2f440c1be42b37e1ac04f57c60fbb79f8fd3e9e5695360add560c37e2d584db - languageName: node - linkType: hard - -"@hapi/bounce@npm:2.x.x, @hapi/bounce@npm:^2.0.0": - version: 2.0.0 - resolution: "@hapi/bounce@npm:2.0.0" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/29cad3c69075682971a76e75480cfbfd35a1cb6207e3fab7a4dd2df950a59c3f1a525e7cda75574c744ef0a3ae698e056410ac0f916f84a8a682927aa50adb3a - languageName: node - linkType: hard - -"@hapi/bourne@npm:2.x.x": - version: 2.1.0 - resolution: "@hapi/bourne@npm:2.1.0" - checksum: 10c0/0dddacffeb1874d60dd9309f2d8f7103d971c21c4bfb0cfadb406f1dcc0bc00c0b5eed09fbd45a27fe179b6c9f99015500c2197213914d6f93efa584b9313ffd - languageName: node - linkType: hard - -"@hapi/call@npm:^8.0.0": - version: 8.0.1 - resolution: "@hapi/call@npm:8.0.1" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/923cc815d585db9e0d25ddedb39a347d8716263e666de7d74faf283e6f314f6e23512d616959221aab341e25aa73fca351356ce102048da93b9053d6b1fb919b - languageName: node - linkType: hard - -"@hapi/catbox-memory@npm:^5.0.0": - version: 5.0.1 - resolution: "@hapi/catbox-memory@npm:5.0.1" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/b76b934a39f802eef3ea02cb335792b733ca846f9f55b8ecc6c4af438b9e27623e7a2319f9c7c32afadf1948db40366b485e8883fdadfb58b63027dd579bf4ab - languageName: node - linkType: hard - -"@hapi/catbox@npm:^11.1.1": - version: 11.1.1 - resolution: "@hapi/catbox@npm:11.1.1" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/hoek": "npm:9.x.x" - "@hapi/podium": "npm:4.x.x" - "@hapi/validate": "npm:1.x.x" - checksum: 10c0/db6b41d21df47389314e5afe9dddb81f6bf47d54793f1fe4a03ed7717704a4e68dfb27224390586a4ba48bb4481fad64b3c7cbc2380eedf79c8bd34c5867b780 - languageName: node - linkType: hard - -"@hapi/content@npm:^5.0.2": - version: 5.0.2 - resolution: "@hapi/content@npm:5.0.2" - dependencies: - "@hapi/boom": "npm:9.x.x" - checksum: 10c0/8c21ca61103347fac3c1f9094aa85a5ae53eedd6b966bcce932192274705a9a969f9a8e62a4a48f468822127b87befed9c128ac0f5568ee526ec3a98323a1628 - languageName: node - linkType: hard - -"@hapi/cryptiles@npm:5.x.x": - version: 5.1.0 - resolution: "@hapi/cryptiles@npm:5.1.0" - dependencies: - "@hapi/boom": "npm:9.x.x" - checksum: 10c0/844b337d94febcd0b40990fcdbcb12bf06f19afc3c3a555a1f73d586250c5227f3a3368ac9a445f53d6bdef7acf0267376087280dfc6917387012d61b307f8b7 - languageName: node - linkType: hard - -"@hapi/file@npm:2.x.x": - version: 2.0.0 - resolution: "@hapi/file@npm:2.0.0" - checksum: 10c0/316a4ddb9cc0266b0f9746caa8be6d2d9152b574438c4c7ade05314b96685012ef00d0947f9a5bcc6e02530a7af3005fee2af1ba2a17c847cf84d0be5749fa10 - languageName: node - linkType: hard - -"@hapi/hapi@npm:^20.2.2": - version: 20.3.0 - resolution: "@hapi/hapi@npm:20.3.0" - dependencies: - "@hapi/accept": "npm:^5.0.1" - "@hapi/ammo": "npm:^5.0.1" - "@hapi/boom": "npm:^9.1.0" - "@hapi/bounce": "npm:^2.0.0" - "@hapi/call": "npm:^8.0.0" - "@hapi/catbox": "npm:^11.1.1" - "@hapi/catbox-memory": "npm:^5.0.0" - "@hapi/heavy": "npm:^7.0.1" - "@hapi/hoek": "npm:^9.0.4" - "@hapi/mimos": "npm:^6.0.0" - "@hapi/podium": "npm:^4.1.1" - "@hapi/shot": "npm:^5.0.5" - "@hapi/somever": "npm:^3.0.0" - "@hapi/statehood": "npm:^7.0.3" - "@hapi/subtext": "npm:^7.1.0" - "@hapi/teamwork": "npm:^5.1.0" - "@hapi/topo": "npm:^5.0.0" - "@hapi/validate": "npm:^1.1.1" - checksum: 10c0/07c011450a604dec12021f85b0b47b14e0a49adf94d80b61354c24654bff4f1664a92bd05d5d076e760e88d6b5aeea1d5fc61be43114d8c9ee74bcf5d2a342c1 - languageName: node - linkType: hard - -"@hapi/heavy@npm:^7.0.1": - version: 7.0.1 - resolution: "@hapi/heavy@npm:7.0.1" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/hoek": "npm:9.x.x" - "@hapi/validate": "npm:1.x.x" - checksum: 10c0/04710f627bcae728cd9456ab7509d4ba598e5d8f5c49e089132a3e1090966aa7be1cff2ce1d9c58aaab0a3a96b21f8b5045aa669057c680e0f851d7682d27eb5 - languageName: node - linkType: hard - -"@hapi/hoek@npm:9.x.x, @hapi/hoek@npm:^9.0.0, @hapi/hoek@npm:^9.0.4, @hapi/hoek@npm:^9.3.0": +"@hapi/hoek@npm:^9.0.0, @hapi/hoek@npm:^9.3.0": version: 9.3.0 resolution: "@hapi/hoek@npm:9.3.0" checksum: 10c0/a096063805051fb8bba4c947e293c664b05a32b47e13bc654c0dd43813a1cec993bdd8f29ceb838020299e1d0f89f68dc0d62a603c13c9cc8541963f0beca055 languageName: node linkType: hard -"@hapi/inert@npm:^6.0.5": - version: 6.0.5 - resolution: "@hapi/inert@npm:6.0.5" - dependencies: - "@hapi/ammo": "npm:5.x.x" - "@hapi/boom": "npm:9.x.x" - "@hapi/bounce": "npm:2.x.x" - "@hapi/hoek": "npm:9.x.x" - "@hapi/validate": "npm:1.x.x" - lru-cache: "npm:^6.0.0" - checksum: 10c0/e9fe5e24c254bf6ba5492a0573a29fcbad7e662d875c1f70982dfaabc55d38d01a6caae03403639efbac13216e378cebf49157fda8061a8b019e81061e280172 - languageName: node - linkType: hard - -"@hapi/iron@npm:6.x.x": - version: 6.0.0 - resolution: "@hapi/iron@npm:6.0.0" - dependencies: - "@hapi/b64": "npm:5.x.x" - "@hapi/boom": "npm:9.x.x" - "@hapi/bourne": "npm:2.x.x" - "@hapi/cryptiles": "npm:5.x.x" - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/81678335c546165440b7214d5275fa58313ff81b4e928ef7862dfe14b2f03269db64a7c8d251e277683d007c8413a921db82c9d46c394159afa625d919c9d3cb - languageName: node - linkType: hard - -"@hapi/mimos@npm:^6.0.0": - version: 6.0.0 - resolution: "@hapi/mimos@npm:6.0.0" - dependencies: - "@hapi/hoek": "npm:9.x.x" - mime-db: "npm:1.x.x" - checksum: 10c0/f3c30dcc699f33f9988da4362deea549816f799db19fafdc8fa1ea1236904c548e8e6b65eba165c31fa66aa7f4c09f558645a126edb601720eabfe60e154cba1 - languageName: node - linkType: hard - -"@hapi/nigel@npm:4.x.x": - version: 4.0.2 - resolution: "@hapi/nigel@npm:4.0.2" - dependencies: - "@hapi/hoek": "npm:^9.0.4" - "@hapi/vise": "npm:^4.0.0" - checksum: 10c0/4e0ad90123491168d1cd1419bf4371bef7f5f94827795ccdf0fd44c922231f349caa2a1800f2621e19e0610f5ccf19688e9541d918777bd05e05dea26b9c3ba8 - languageName: node - linkType: hard - -"@hapi/pez@npm:^5.1.0": - version: 5.1.0 - resolution: "@hapi/pez@npm:5.1.0" - dependencies: - "@hapi/b64": "npm:5.x.x" - "@hapi/boom": "npm:9.x.x" - "@hapi/content": "npm:^5.0.2" - "@hapi/hoek": "npm:9.x.x" - "@hapi/nigel": "npm:4.x.x" - checksum: 10c0/4b06dcbc4035eedaa75edb9dd29ee8ce2f99c0071e13f6c7e31b6a83bdcf7504f3063d395d1426988e8a1aad77c4f7a9c3613e1e044fa9e889fcad5b59ef20d8 - languageName: node - linkType: hard - -"@hapi/podium@npm:4.x.x, @hapi/podium@npm:^4.1.1": - version: 4.1.3 - resolution: "@hapi/podium@npm:4.1.3" - dependencies: - "@hapi/hoek": "npm:9.x.x" - "@hapi/teamwork": "npm:5.x.x" - "@hapi/validate": "npm:1.x.x" - checksum: 10c0/483b999707d5214291ef2c51d5313dfe5d48968411369fc52258f07e230836c070fdd5402a6d85ed667de9e72806bb45c052e17b57dff07543b40b0b7e72bed0 - languageName: node - linkType: hard - -"@hapi/shot@npm:^5.0.5": - version: 5.0.5 - resolution: "@hapi/shot@npm:5.0.5" - dependencies: - "@hapi/hoek": "npm:9.x.x" - "@hapi/validate": "npm:1.x.x" - checksum: 10c0/f5c9aaf19f977c9eb233e5adc3b59ecd28c85a516e497cea7f13d61fd094f050b9a305807308e95041c29f7f6da1bbd40835d94b3f399996f21f3d464a0cb6b6 - languageName: node - linkType: hard - -"@hapi/somever@npm:^3.0.0": - version: 3.0.1 - resolution: "@hapi/somever@npm:3.0.1" - dependencies: - "@hapi/bounce": "npm:2.x.x" - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/b105b8dbd503d10f5f986a46e6bad097ba7724dc49bd4dd5ae5bcc8bbd5f981fc40df21b56b723ec988d172c8a073d5205811fbe80b1f57569d9e51bda46f5de - languageName: node - linkType: hard - -"@hapi/statehood@npm:^7.0.3": - version: 7.0.4 - resolution: "@hapi/statehood@npm:7.0.4" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/bounce": "npm:2.x.x" - "@hapi/bourne": "npm:2.x.x" - "@hapi/cryptiles": "npm:5.x.x" - "@hapi/hoek": "npm:9.x.x" - "@hapi/iron": "npm:6.x.x" - "@hapi/validate": "npm:1.x.x" - checksum: 10c0/bb15c6e972e7e0848c6e19414187fe18bd6db48c4c5f3928c505c24547d98f5e4e82286ceccf3b3348a9fcbe55c4e91ab253007f9d0ca542178328f31179c802 - languageName: node - linkType: hard - -"@hapi/subtext@npm:^7.1.0": - version: 7.1.0 - resolution: "@hapi/subtext@npm:7.1.0" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/bourne": "npm:2.x.x" - "@hapi/content": "npm:^5.0.2" - "@hapi/file": "npm:2.x.x" - "@hapi/hoek": "npm:9.x.x" - "@hapi/pez": "npm:^5.1.0" - "@hapi/wreck": "npm:17.x.x" - checksum: 10c0/da353fb20f20160c26e86ae6d379a80c92fa64e0a43f655308596687538e7b78d573281965c70ea07e06f6d2c32294e9d872bd173d7a49ae3bf070bd524b6182 - languageName: node - linkType: hard - -"@hapi/teamwork@npm:5.x.x, @hapi/teamwork@npm:^5.1.0": - version: 5.1.1 - resolution: "@hapi/teamwork@npm:5.1.1" - checksum: 10c0/8174a4693a00cb82474d75b0296b345b7e1c020dc440a5dc21f4f5a091306068553faab70dc6cf642ac36f49e20ee1e1aed6a81f99ffca5b1a42633d0fa437bb - languageName: node - linkType: hard - -"@hapi/topo@npm:^5.0.0, @hapi/topo@npm:^5.1.0": +"@hapi/topo@npm:^5.1.0": version: 5.1.0 resolution: "@hapi/topo@npm:5.1.0" dependencies: @@ -3245,36 +2908,6 @@ __metadata: languageName: node linkType: hard -"@hapi/validate@npm:1.x.x, @hapi/validate@npm:^1.1.1": - version: 1.1.3 - resolution: "@hapi/validate@npm:1.1.3" - dependencies: - "@hapi/hoek": "npm:^9.0.0" - "@hapi/topo": "npm:^5.0.0" - checksum: 10c0/dff9f31a5cae3356ae98cef99d5c5cf9c056b452a22755945ed27df987f5a690f6372fcd7f55c319c8c546906b5943fd6783d5620a0f0369d243a2b47f0fbee7 - languageName: node - linkType: hard - -"@hapi/vise@npm:^4.0.0": - version: 4.0.0 - resolution: "@hapi/vise@npm:4.0.0" - dependencies: - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/fbf219079aa3d21e5075ac2c663edb7881ccf32bec93c094473ff4a5b0d29021a7e325580ea27c33c6a3223d8cd04a3de20d366ea6dfddaa979eac46e24c7d3a - languageName: node - linkType: hard - -"@hapi/wreck@npm:17.x.x": - version: 17.2.0 - resolution: "@hapi/wreck@npm:17.2.0" - dependencies: - "@hapi/boom": "npm:9.x.x" - "@hapi/bourne": "npm:2.x.x" - "@hapi/hoek": "npm:9.x.x" - checksum: 10c0/c8df5eed5c25a8aba64933a83b6e60dcf6ac9e28005630ed9b641fc967a464623c8caed5a0984357a5af8e552f01339d304b283f45d61fecd518ad23e9cb3483 - languageName: node - linkType: hard - "@happy-dom/global-registrator@npm:^18.0.1": version: 18.0.1 resolution: "@happy-dom/global-registrator@npm:18.0.1" @@ -8199,31 +7832,6 @@ __metadata: languageName: unknown linkType: soft -"@storybook/bench@npm:next": - version: 1.0.0-next.6 - resolution: "@storybook/bench@npm:1.0.0-next.6" - dependencies: - "@google-cloud/bigquery": "npm:^5.2.0" - "@hapi/hapi": "npm:^20.2.2" - "@hapi/inert": "npm:^6.0.5" - "@types/fs-extra": "npm:^9.0.13" - commander: "npm:^5.1.0" - cross-spawn: "npm:^7.0.3" - du: "npm:^1.0.0" - exectimer: "npm:^2.2.2" - fs-extra: "npm:^10.1.0" - jsonexport: "npm:^3.0.1" - lodash: "npm:^4.17.19" - playwright: "npm:^1.24.2" - pretty-bytes: "npm:^5.3.0" - rimraf: "npm:^3.0.2" - bin: - sb-bench: bin/index.js - sb-upload: bin/upload.js - checksum: 10c0/4f8d054359a9240a0b0badb847f630ec339e2d77dae03703e21d4ca6a07cfba465e6f469416c58f55a7554bbe9383ce27f516e10197d8e5a8befbc0b1fc783a0 - languageName: node - linkType: hard - "@storybook/builder-vite@workspace:*, @storybook/builder-vite@workspace:code/builders/builder-vite": version: 0.0.0-use.local resolution: "@storybook/builder-vite@workspace:code/builders/builder-vite" @@ -8325,7 +7933,6 @@ __metadata: "@storybook/addon-themes": "workspace:*" "@storybook/addon-vitest": "workspace:*" "@storybook/angular": "workspace:*" - "@storybook/bench": "npm:next" "@storybook/builder-vite": "workspace:*" "@storybook/builder-webpack5": "workspace:*" "@storybook/codemod": "workspace:*" @@ -9779,15 +9386,6 @@ __metadata: languageName: node linkType: hard -"@types/fs-extra@npm:^9.0.13": - version: 9.0.13 - resolution: "@types/fs-extra@npm:9.0.13" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/576d4e9d382393316ed815c593f7f5c157408ec5e184521d077fcb15d514b5a985245f153ef52142b9b976cb9bd8f801850d51238153ebd0dc9e96b7a7548588 - languageName: node - linkType: hard - "@types/glob@npm:*": version: 8.1.0 resolution: "@types/glob@npm:8.1.0" @@ -13361,13 +12959,6 @@ __metadata: languageName: node linkType: hard -"browser-process-hrtime@npm:^1.0.0": - version: 1.0.0 - resolution: "browser-process-hrtime@npm:1.0.0" - checksum: 10c0/65da78e51e9d7fa5909147f269c54c65ae2e03d1cf797cc3cfbbe49f475578b8160ce4a76c36c1a2ffbff26c74f937d73096c508057491ddf1a6dfd11143f72d - languageName: node - linkType: hard - "browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": version: 1.2.0 resolution: "browserify-aes@npm:1.2.0" @@ -14186,13 +13777,6 @@ __metadata: languageName: node linkType: hard -"co@npm:^4.6.0": - version: 4.6.0 - resolution: "co@npm:4.6.0" - checksum: 10c0/c0e85ea0ca8bf0a50cbdca82efc5af0301240ca88ebe3644a6ffb8ffe911f34d40f8fbcf8f1d52c5ddd66706abd4d3bfcd64259f1e8e2371d4f47573b0dc8c28 - languageName: node - linkType: hard - "code-block-writer@npm:^12.0.0": version: 12.0.0 resolution: "code-block-writer@npm:12.0.0" @@ -14328,13 +13912,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^5.1.0": - version: 5.1.0 - resolution: "commander@npm:5.1.0" - checksum: 10c0/da9d71dbe4ce039faf1fe9eac3771dca8c11d66963341f62602f7b66e36d2a3f8883407af4f9a37b1db1a55c59c0c1325f186425764c2e963dc1d67aec2a4b6d - languageName: node - linkType: hard - "commander@npm:^8.3.0": version: 8.3.0 resolution: "commander@npm:8.3.0" @@ -14784,7 +14361,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.6": version: 7.0.6 resolution: "cross-spawn@npm:7.0.6" dependencies: @@ -15741,17 +15318,6 @@ __metadata: languageName: node linkType: hard -"du@npm:^1.0.0": - version: 1.0.0 - resolution: "du@npm:1.0.0" - dependencies: - map-async: "npm:~0.1.1" - bin: - dujs: ./du.js - checksum: 10c0/1ffebf86a481852709467629480341af2ca86602d4a3d1c209a7f990be075910f4468bc70005b8fd4ef1ac36f20b67d1ddb85b6a00e96d5492f4823f0e98fbac - languageName: node - linkType: hard - "dunder-proto@npm:^1.0.0, dunder-proto@npm:^1.0.1": version: 1.0.1 resolution: "dunder-proto@npm:1.0.1" @@ -17465,16 +17031,6 @@ __metadata: languageName: node linkType: hard -"exectimer@npm:^2.2.2": - version: 2.2.2 - resolution: "exectimer@npm:2.2.2" - dependencies: - browser-process-hrtime: "npm:^1.0.0" - co: "npm:^4.6.0" - checksum: 10c0/a43e64eab5bd031f8d7176aa4d3b40e767965f154d608ddc787cee4c537b8c17434536deb5353b347ffa03dfe3938d4ac8f1a216048b5939e458e924ac9b6f33 - languageName: node - linkType: hard - "expect-type@npm:^0.15.0": version: 0.15.0 resolution: "expect-type@npm:0.15.0" @@ -18301,7 +17857,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^10.0.0, fs-extra@npm:^10.1.0": +"fs-extra@npm:^10.0.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" dependencies: @@ -18540,19 +18096,6 @@ __metadata: languageName: node linkType: hard -"gaxios@npm:^4.0.0": - version: 4.3.3 - resolution: "gaxios@npm:4.3.3" - dependencies: - abort-controller: "npm:^3.0.0" - extend: "npm:^3.0.2" - https-proxy-agent: "npm:^5.0.0" - is-stream: "npm:^2.0.0" - node-fetch: "npm:^2.6.7" - checksum: 10c0/661001bb428dfdb8fabeb0d4b8290edd5ceff4fa7615ef45f447049a38c6379422eafe537c408c0bde333cdf3249fa9673cf8ee66a0658ee174fb85a728efc04 - languageName: node - linkType: hard - "gaxios@npm:^5.0.0, gaxios@npm:^5.0.1": version: 5.1.3 resolution: "gaxios@npm:5.1.3" @@ -18565,16 +18108,6 @@ __metadata: languageName: node linkType: hard -"gcp-metadata@npm:^4.2.0": - version: 4.3.1 - resolution: "gcp-metadata@npm:4.3.1" - dependencies: - gaxios: "npm:^4.0.0" - json-bigint: "npm:^1.0.0" - checksum: 10c0/1fca413fea44b103443c490895e103e972eab1f18453eabc140de10031ce5f35542d3349f09fa57bd629adf2c202005eda004b7c950272837d55fc7da040ed7d - languageName: node - linkType: hard - "gcp-metadata@npm:^5.3.0": version: 5.3.0 resolution: "gcp-metadata@npm:5.3.0" @@ -18977,23 +18510,6 @@ __metadata: languageName: node linkType: hard -"google-auth-library@npm:^7.14.0": - version: 7.14.1 - resolution: "google-auth-library@npm:7.14.1" - dependencies: - arrify: "npm:^2.0.0" - base64-js: "npm:^1.3.0" - ecdsa-sig-formatter: "npm:^1.0.11" - fast-text-encoding: "npm:^1.0.0" - gaxios: "npm:^4.0.0" - gcp-metadata: "npm:^4.2.0" - gtoken: "npm:^5.0.4" - jws: "npm:^4.0.0" - lru-cache: "npm:^6.0.0" - checksum: 10c0/30b632cfbc312701b4d1b750effbf3575bd826dc2241c8ee4526e8632cef9ee4593d9b3c0b0076a264a79864b13805b6c74c1b13171dfb8eb2ea0bd5c7aa0d43 - languageName: node - linkType: hard - "google-auth-library@npm:^8.0.2": version: 8.9.0 resolution: "google-auth-library@npm:8.9.0" @@ -19011,17 +18527,6 @@ __metadata: languageName: node linkType: hard -"google-p12-pem@npm:^3.1.3": - version: 3.1.4 - resolution: "google-p12-pem@npm:3.1.4" - dependencies: - node-forge: "npm:^1.3.1" - bin: - gp12-pem: build/src/bin/gp12-pem.js - checksum: 10c0/d40c7fa17bebd60f18a4eb7355582ab25513b641703bc3f39ddf2f90deb051d5a9622eeb46d4e45d925dc2bf0841d61e8ba34ff20f214019f270a03f39b28fd8 - languageName: node - linkType: hard - "google-p12-pem@npm:^4.0.0": version: 4.0.1 resolution: "google-p12-pem@npm:4.0.1" @@ -19070,17 +18575,6 @@ __metadata: languageName: node linkType: hard -"gtoken@npm:^5.0.4": - version: 5.3.2 - resolution: "gtoken@npm:5.3.2" - dependencies: - gaxios: "npm:^4.0.0" - google-p12-pem: "npm:^3.1.3" - jws: "npm:^4.0.0" - checksum: 10c0/c4a6893cda5a4abe3967e15e0b14f292ebbcc6c0d186bb062ff947cb41f7a2e440c1a451ac94e944aa903a51db1be86e5c2ebf837d9a70a66ae1088bcf5fa3ff - languageName: node - linkType: hard - "gtoken@npm:^6.1.0": version: 6.1.2 resolution: "gtoken@npm:6.1.2" @@ -21291,15 +20785,6 @@ __metadata: languageName: node linkType: hard -"jsonexport@npm:^3.0.1": - version: 3.2.0 - resolution: "jsonexport@npm:3.2.0" - bin: - jsonexport: bin/jsonexport.js - checksum: 10c0/eaca567412e72facb9bd765586bfcdb0525781eae49af35776c1d7b53a807a51f4bd00aab9c12647337772bbf8be9a0b66a23cada6a8a97365b5ac6296bb81cd - languageName: node - linkType: hard - "jsonfile@npm:^4.0.0": version: 4.0.0 resolution: "jsonfile@npm:4.0.0" @@ -22023,7 +21508,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4, lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21": +"lodash@npm:4, lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -22276,13 +21761,6 @@ __metadata: languageName: node linkType: hard -"map-async@npm:~0.1.1": - version: 0.1.1 - resolution: "map-async@npm:0.1.1" - checksum: 10c0/b7fd51215288d108563262ca3ffc595881c8b3eef8d6dbfd00a0b46c17a86721c6fb338f00ab42cf11a2f06ea826a1cc42c21c01be6ef0f5715818a603394b81 - languageName: node - linkType: hard - "map-or-similar@npm:^1.5.0": version: 1.5.0 resolution: "map-or-similar@npm:1.5.0" @@ -22948,7 +22426,7 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.x.x, mime-db@npm:>= 1.43.0 < 2, mime-db@npm:^1.54.0": +"mime-db@npm:>= 1.43.0 < 2, mime-db@npm:^1.54.0": version: 1.54.0 resolution: "mime-db@npm:1.54.0" checksum: 10c0/8d907917bc2a90fa2df842cdf5dfeaf509adc15fe0531e07bb2f6ab15992416479015828d6a74200041c492e42cce3ebf78e5ce714388a0a538ea9c53eece284 @@ -24473,15 +23951,6 @@ __metadata: languageName: node linkType: hard -"p-event@npm:^4.1.0": - version: 4.2.0 - resolution: "p-event@npm:4.2.0" - dependencies: - p-timeout: "npm:^3.1.0" - checksum: 10c0/f1b6a2fb13d47f2a8afc00150da5ece0d28940ce3d8fa562873e091d3337d298e78fee9cb18b768598ff1d11df608b2ae23868309ff6405b864a2451ccd6d25a - languageName: node - linkType: hard - "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -24622,15 +24091,6 @@ __metadata: languageName: node linkType: hard -"p-timeout@npm:^3.1.0": - version: 3.2.0 - resolution: "p-timeout@npm:3.2.0" - dependencies: - p-finally: "npm:^1.0.0" - checksum: 10c0/524b393711a6ba8e1d48137c5924749f29c93d70b671e6db761afa784726572ca06149c715632da8f70c090073afb2af1c05730303f915604fd38ee207b70a61 - languageName: node - linkType: hard - "p-try@npm:^1.0.0": version: 1.0.0 resolution: "p-try@npm:1.0.0" @@ -25749,13 +25209,6 @@ __metadata: languageName: node linkType: hard -"pretty-bytes@npm:^5.3.0": - version: 5.6.0 - resolution: "pretty-bytes@npm:5.6.0" - checksum: 10c0/f69f494dcc1adda98dbe0e4a36d301e8be8ff99bfde7a637b2ee2820e7cb583b0fc0f3a63b0e3752c01501185a5cf38602c7be60da41bdf84ef5b70e89c370f3 - languageName: node - linkType: hard - "pretty-bytes@npm:^6.1.1": version: 6.1.1 resolution: "pretty-bytes@npm:6.1.1" @@ -27486,16 +26939,6 @@ __metadata: languageName: node linkType: hard -"retry-request@npm:^4.2.2": - version: 4.2.2 - resolution: "retry-request@npm:4.2.2" - dependencies: - debug: "npm:^4.1.1" - extend: "npm:^3.0.2" - checksum: 10c0/16d6504a9d7a4ac74fc61adb1f670e17bfd5985dd626b7b817ff9b734c40c82afa73cf098081e3f6bc3fb733aee93b4a37cabdde8aaeca053db0f337f0ad8415 - languageName: node - linkType: hard - "retry-request@npm:^5.0.0": version: 5.0.2 resolution: "retry-request@npm:5.0.2" @@ -29848,19 +29291,6 @@ __metadata: languageName: node linkType: hard -"teeny-request@npm:^7.0.0": - version: 7.2.0 - resolution: "teeny-request@npm:7.2.0" - dependencies: - http-proxy-agent: "npm:^5.0.0" - https-proxy-agent: "npm:^5.0.0" - node-fetch: "npm:^2.6.1" - stream-events: "npm:^1.0.5" - uuid: "npm:^8.0.0" - checksum: 10c0/257ee30444ef92f43f12e98d87199fb726e89745b7995c8f496b627ff720e468da571c748376b9a14802f624b77b212ebcbc7777f033b6e78afda66838a8b2b9 - languageName: node - linkType: hard - "teeny-request@npm:^8.0.0": version: 8.0.3 resolution: "teeny-request@npm:8.0.3" From 285836e25290d287cf0859bdda7a1b0f6c4a2e33 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:52:57 +0100 Subject: [PATCH 113/310] Update dependencies in yarn.lock and package.json, including chromatic to version 13.3.4, simple-git to version 3.30.0, and sort-package-json to version 3.5.0, for improved functionality and compatibility. --- code/addons/docs/package.json | 2 +- code/addons/vitest/package.json | 2 +- code/core/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/package.json | 4 +- code/renderers/react/package.json | 2 +- scripts/package.json | 6 +- yarn.lock | 112 ++++++++++++------------------ 8 files changed, 56 insertions(+), 76 deletions(-) diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 758bf3021c5a..bfe22211f03c 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -93,7 +93,7 @@ "@types/color-convert": "^2.0.0", "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "color-convert": "^2.0.1", - "es-toolkit": "^1.36.0", + "es-toolkit": "^1.42.0", "github-slugger": "^2.0.0", "markdown-to-jsx": "^7.7.2", "memoizerific": "^1.11.3", diff --git a/code/addons/vitest/package.json b/code/addons/vitest/package.json index f0b8bd48beb4..a63f644153eb 100644 --- a/code/addons/vitest/package.json +++ b/code/addons/vitest/package.json @@ -79,7 +79,7 @@ "@vitest/browser-playwright": "^4.0.14", "@vitest/runner": "^4.0.14", "empathic": "^2.0.0", - "es-toolkit": "^1.36.0", + "es-toolkit": "^1.42.0", "istanbul-lib-report": "^3.0.1", "micromatch": "^4.0.8", "pathe": "^1.1.2", diff --git a/code/core/package.json b/code/core/package.json index 1c6a32a266e1..e74e7945b2b4 100644 --- a/code/core/package.json +++ b/code/core/package.json @@ -274,7 +274,7 @@ "downshift": "^9.0.4", "ejs": "^3.1.10", "empathic": "^2.0.0", - "es-toolkit": "^1.36.0", + "es-toolkit": "^1.42.0", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", "exsolve": "^1.0.7", "fetch-retry": "^6.0.0", diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 5bf32aa407b3..1e422e8cf5b6 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -42,7 +42,7 @@ "dependencies": { "@types/cross-spawn": "^6.0.6", "cross-spawn": "^7.0.6", - "es-toolkit": "^1.36.0", + "es-toolkit": "^1.42.0", "jscodeshift": "^0.15.1", "prettier": "^3.7.1", "storybook": "workspace:*", diff --git a/code/package.json b/code/package.json index 752df6f2d2e4..bc90f5cbd671 100644 --- a/code/package.json +++ b/code/package.json @@ -125,7 +125,7 @@ "@vitest/coverage-v8": "^3.2.4", "create-storybook": "workspace:*", "cross-env": "^7.0.3", - "es-toolkit": "^1.36.0", + "es-toolkit": "^1.42.0", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", "esbuild-loader": "^4.3.0", "happy-dom": "^17.6.3", @@ -138,7 +138,7 @@ "react-dom": "^18.2.0", "react-popper-tooltip": "^4.4.2", "slash": "^5.0.0", - "sort-package-json": "^2.14.0", + "sort-package-json": "^3.5.0", "storybook": "workspace:^", "storybook-addon-pseudo-states": "workspace:*", "ts-dedent": "^2.0.0", diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index 3c580cafffb3..0cd6608a8011 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -64,7 +64,7 @@ "babel-plugin-react-docgen": "^4.2.1", "comment-parser": "^1.4.1", "empathic": "^2.0.0", - "es-toolkit": "^1.36.0", + "es-toolkit": "^1.42.0", "escodegen": "^2.1.0", "expect-type": "^0.15.0", "html-tags": "^3.1.0", diff --git a/scripts/package.json b/scripts/package.json index 3da3e20aa4f1..d908ec61f5fe 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -90,7 +90,7 @@ "@typescript-eslint/parser": "^8.48.0", "@vitest/coverage-v8": "^3.2.4", "ansi-regex": "^6.0.1", - "chromatic": "^11.28.2", + "chromatic": "^13.3.4", "codecov": "^3.8.1", "commander": "^14.0.2", "cross-env": "^7.0.3", @@ -166,9 +166,9 @@ "rollup-plugin-dts": "^6.1.1", "semver": "^7.7.3", "serve-static": "^1.15.0", - "simple-git": "^3.25.0", + "simple-git": "^3.30.0", "slash": "^3.0.0", - "sort-package-json": "^2.14.0", + "sort-package-json": "^3.5.0", "tiny-invariant": "^1.3.3", "tinyexec": "^0.3.0", "trash": "^7.2.0", diff --git a/yarn.lock b/yarn.lock index 08f0d3415886..fffc0b9bbc9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7668,7 +7668,7 @@ __metadata: "@types/color-convert": "npm:^2.0.0" "@types/react": "npm:^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" color-convert: "npm:^2.0.1" - es-toolkit: "npm:^1.36.0" + es-toolkit: "npm:^1.42.0" github-slugger: "npm:^2.0.0" markdown-to-jsx: "npm:^7.7.2" memoizerific: "npm:^1.11.3" @@ -7745,7 +7745,7 @@ __metadata: "@vitest/browser-playwright": "npm:^4.0.14" "@vitest/runner": "npm:^4.0.14" empathic: "npm:^2.0.0" - es-toolkit: "npm:^1.36.0" + es-toolkit: "npm:^1.42.0" istanbul-lib-report: "npm:^3.0.1" micromatch: "npm:^4.0.8" pathe: "npm:^1.1.2" @@ -7974,7 +7974,7 @@ __metadata: "@vitest/coverage-v8": "npm:^3.2.4" create-storybook: "workspace:*" cross-env: "npm:^7.0.3" - es-toolkit: "npm:^1.36.0" + es-toolkit: "npm:^1.42.0" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0" esbuild-loader: "npm:^4.3.0" happy-dom: "npm:^17.6.3" @@ -7987,7 +7987,7 @@ __metadata: react-dom: "npm:^18.2.0" react-popper-tooltip: "npm:^4.4.2" slash: "npm:^5.0.0" - sort-package-json: "npm:^2.14.0" + sort-package-json: "npm:^3.5.0" storybook: "workspace:^" storybook-addon-pseudo-states: "workspace:*" ts-dedent: "npm:^2.0.0" @@ -8024,7 +8024,7 @@ __metadata: "@types/jscodeshift": "npm:^0.11.10" ansi-regex: "npm:^6.0.1" cross-spawn: "npm:^7.0.6" - es-toolkit: "npm:^1.36.0" + es-toolkit: "npm:^1.42.0" jscodeshift: "npm:^0.15.1" prettier: "npm:^3.7.1" storybook: "workspace:*" @@ -8430,7 +8430,7 @@ __metadata: babel-plugin-react-docgen: "npm:^4.2.1" comment-parser: "npm:^1.4.1" empathic: "npm:^2.0.0" - es-toolkit: "npm:^1.36.0" + es-toolkit: "npm:^1.42.0" escodegen: "npm:^2.1.0" expect-type: "npm:^0.15.0" html-tags: "npm:^3.1.0" @@ -8504,7 +8504,7 @@ __metadata: "@verdaccio/types": "npm:^10.8.0" "@vitest/coverage-v8": "npm:^3.2.4" ansi-regex: "npm:^6.0.1" - chromatic: "npm:^11.28.2" + chromatic: "npm:^13.3.4" codecov: "npm:^3.8.1" commander: "npm:^14.0.2" cross-env: "npm:^7.0.3" @@ -8580,9 +8580,9 @@ __metadata: rollup-plugin-dts: "npm:^6.1.1" semver: "npm:^7.7.3" serve-static: "npm:^1.15.0" - simple-git: "npm:^3.25.0" + simple-git: "npm:^3.30.0" slash: "npm:^3.0.0" - sort-package-json: "npm:^2.14.0" + sort-package-json: "npm:^3.5.0" tiny-invariant: "npm:^1.3.3" tinyexec: "npm:^0.3.0" trash: "npm:^7.2.0" @@ -13521,28 +13521,9 @@ __metadata: languageName: node linkType: hard -"chromatic@npm:^11.28.2": - version: 11.28.2 - resolution: "chromatic@npm:11.28.2" - peerDependencies: - "@chromatic-com/cypress": ^0.*.* || ^1.0.0 - "@chromatic-com/playwright": ^0.*.* || ^1.0.0 - peerDependenciesMeta: - "@chromatic-com/cypress": - optional: true - "@chromatic-com/playwright": - optional: true - bin: - chroma: dist/bin.js - chromatic: dist/bin.js - chromatic-cli: dist/bin.js - checksum: 10c0/0e30c01adae08708b871c5e27462af14a8426e0fe443d0c42afb2477326703504b02fa96a02e64c858072f535d149b96f207c43b147ba1492de83bb5f505e59e - languageName: node - linkType: hard - -"chromatic@npm:^13.3.3": - version: 13.3.3 - resolution: "chromatic@npm:13.3.3" +"chromatic@npm:^13.3.3, chromatic@npm:^13.3.4": + version: 13.3.4 + resolution: "chromatic@npm:13.3.4" peerDependencies: "@chromatic-com/cypress": ^0.*.* || ^1.0.0 "@chromatic-com/playwright": ^0.*.* || ^1.0.0 @@ -13555,7 +13536,7 @@ __metadata: chroma: dist/bin.js chromatic: dist/bin.js chromatic-cli: dist/bin.js - checksum: 10c0/6fc54df030113d91ef00a2050f5cb13ca182b355dae2c29cdd326fac6cf21d8ddc2cd93dc3f5db04379b7769d4df8e3ea5f18c3642e9e3a48545565f992a838c + checksum: 10c0/1800c1640dbc168b621daeca5895698cb5a0a1def50b9d1ada5ea99ce242bf1f70d15065460948b168eedea1f56422553184f4cce1d01a7816f32c60054d704d languageName: node linkType: hard @@ -14645,7 +14626,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:^4.3.7, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.6, debug@npm:^4.3.7, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -15028,7 +15009,7 @@ __metadata: languageName: node linkType: hard -"detect-newline@npm:^4.0.0": +"detect-newline@npm:^4.0.1": version: 4.0.1 resolution: "detect-newline@npm:4.0.1" checksum: 10c0/1cc1082e88ad477f30703ae9f23bd3e33816ea2db6a35333057e087d72d466f5a777809b71f560118ecff935d2c712f5b59e1008a8b56a900909d8fd4621c603 @@ -16010,15 +15991,15 @@ __metadata: languageName: node linkType: hard -"es-toolkit@npm:^1.36.0": - version: 1.36.0 - resolution: "es-toolkit@npm:1.36.0" +"es-toolkit@npm:^1.36.0, es-toolkit@npm:^1.42.0": + version: 1.42.0 + resolution: "es-toolkit@npm:1.42.0" dependenciesMeta: "@trivago/prettier-plugin-sort-imports@4.3.0": unplugged: true prettier-plugin-sort-re-exports@0.0.1: unplugged: true - checksum: 10c0/ddc13b8b2dc935f517f0959b971b0a75488bb54a131368c3aec1682b8fd48467d39c4f1d46a7bcdc3d9424e9a4924d968487540ed77ec245c5a2d7b129f5ed62 + checksum: 10c0/ee577b23336296116be423a5d01a6af827c80a10971507ae26cdb146b60ce0a930bf7bdb719ac0dc4f962ec74542a2423b934e24eb47efe1bc911862b12da109 languageName: node linkType: hard @@ -18191,13 +18172,6 @@ __metadata: languageName: node linkType: hard -"get-stdin@npm:^9.0.0": - version: 9.0.0 - resolution: "get-stdin@npm:9.0.0" - checksum: 10c0/7ef2edc0c81a0644ca9f051aad8a96ae9373d901485abafaabe59fd347a1c378689d8a3d8825fb3067415d1d09dfcaa43cb9b9516ecac6b74b3138b65a8ccc6b - languageName: node - linkType: hard - "get-stream@npm:^2.2.0": version: 2.3.1 resolution: "get-stream@npm:2.3.1" @@ -18279,10 +18253,10 @@ __metadata: languageName: node linkType: hard -"git-hooks-list@npm:^3.0.0": - version: 3.1.0 - resolution: "git-hooks-list@npm:3.1.0" - checksum: 10c0/f1b93dd11b80b2a687b99a8bb553c0d07f344532d475b3ac2a5ff044d40fa71567ddcfa5cb39fae0b4e43a670a33f02f71ec3b24b7263233f3a3df89deddfb5a +"git-hooks-list@npm:^4.0.0": + version: 4.1.1 + resolution: "git-hooks-list@npm:4.1.1" + checksum: 10c0/74d87b1ed457214599566032e3bb79d75ec1605729e83fa6182b889900dd94fc14aafe7b8c66b40562ab9fdeea0e0d8035c23a64d8eb9d3917d1f1d6c06c8e4d languageName: node linkType: hard @@ -27970,14 +27944,14 @@ __metadata: languageName: node linkType: hard -"simple-git@npm:^3.25.0": - version: 3.25.0 - resolution: "simple-git@npm:3.25.0" +"simple-git@npm:^3.30.0": + version: 3.30.0 + resolution: "simple-git@npm:3.30.0" dependencies: "@kwsites/file-exists": "npm:^1.1.1" "@kwsites/promise-deferred": "npm:^1.1.1" - debug: "npm:^4.3.5" - checksum: 10c0/2087dddac041eac6330cbb7fafea21f3e45786ea54e50ae07a49ba6a7134298e12727e5e4b6580310b679c7cb4f2a83804c04e7eab247eeabcd48d33b7885e16 + debug: "npm:^4.4.0" + checksum: 10c0/ca123580944d55c7f93d17f7a89b39cd43245916b35ed3a8b1269d1f2ae9200e17f098e42af4a2572313726f1273641cbe0748a1ea37d8c803c181fb69068b1d languageName: node linkType: hard @@ -28145,6 +28119,13 @@ __metadata: languageName: node linkType: hard +"sort-object-keys@npm:^2.0.0": + version: 2.0.1 + resolution: "sort-object-keys@npm:2.0.1" + checksum: 10c0/3bbe9d210a24ace65ede8abc4c57ea3280082f7c16fa88c9428eb3a39c85c2ab8a56767e61798bb9c74c272d50a3dbedc20df7065fdf0526c8746fa6b084c6c0 + languageName: node + linkType: hard + "sort-package-json@npm:^1.22.1": version: 1.57.0 resolution: "sort-package-json@npm:1.57.0" @@ -28161,21 +28142,20 @@ __metadata: languageName: node linkType: hard -"sort-package-json@npm:^2.14.0": - version: 2.14.0 - resolution: "sort-package-json@npm:2.14.0" +"sort-package-json@npm:^3.5.0": + version: 3.5.0 + resolution: "sort-package-json@npm:3.5.0" dependencies: detect-indent: "npm:^7.0.1" - detect-newline: "npm:^4.0.0" - get-stdin: "npm:^9.0.0" - git-hooks-list: "npm:^3.0.0" + detect-newline: "npm:^4.0.1" + git-hooks-list: "npm:^4.0.0" is-plain-obj: "npm:^4.1.0" - semver: "npm:^7.6.0" - sort-object-keys: "npm:^1.1.3" - tinyglobby: "npm:^0.2.9" + semver: "npm:^7.7.1" + sort-object-keys: "npm:^2.0.0" + tinyglobby: "npm:^0.2.12" bin: sort-package-json: cli.js - checksum: 10c0/bcc114a3b5e11d4539ba46dd4eeda6d6909202cb1a9526c230850f1edfdfcf8712e9479b71f98d8f6cb8554740294acdfcaae84461dcecd90592867e1ba90924 + checksum: 10c0/616520c9df6430df5768f1e47aa87876b3d1a98e5168810d341831afc284124c52eab08f97a1786a815c45e2dd0dd6d6797f09d770d8c1021c46005a60732055 languageName: node linkType: hard @@ -28569,7 +28549,7 @@ __metadata: downshift: "npm:^9.0.4" ejs: "npm:^3.1.10" empathic: "npm:^2.0.0" - es-toolkit: "npm:^1.36.0" + es-toolkit: "npm:^1.42.0" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0" execa: "npm:^9.6.0" exsolve: "npm:^1.0.7" @@ -29496,7 +29476,7 @@ __metadata: languageName: node linkType: hard -"tinyglobby@npm:^0.2.10, tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15, tinyglobby@npm:^0.2.9": +"tinyglobby@npm:^0.2.10, tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15": version: 0.2.15 resolution: "tinyglobby@npm:0.2.15" dependencies: From d8df3de542c14737b771538be9f343212bb41dc8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 00:53:24 +0100 Subject: [PATCH 114/310] Update es-toolkit dependency version in yarn.lock and package.json to 1.42.0 for improved functionality and compatibility. --- scripts/package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/package.json b/scripts/package.json index d908ec61f5fe..5bfa75e4511b 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -102,7 +102,7 @@ "ejs": "^3.1.10", "ejs-lint": "^2.0.1", "empathic": "^2.0.0", - "es-toolkit": "^1.36.0", + "es-toolkit": "^1.42.0", "esbuild": "^0.27.0", "eslint": "^8.57.1", "eslint-config-airbnb-typescript": "^18.0.0", diff --git a/yarn.lock b/yarn.lock index fffc0b9bbc9b..37e9da421d22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8516,7 +8516,7 @@ __metadata: ejs: "npm:^3.1.10" ejs-lint: "npm:^2.0.1" empathic: "npm:^2.0.0" - es-toolkit: "npm:^1.36.0" + es-toolkit: "npm:^1.42.0" esbuild: "npm:^0.27.0" eslint: "npm:^8.57.1" eslint-config-airbnb-typescript: "npm:^18.0.0" @@ -15991,7 +15991,7 @@ __metadata: languageName: node linkType: hard -"es-toolkit@npm:^1.36.0, es-toolkit@npm:^1.42.0": +"es-toolkit@npm:^1.42.0": version: 1.42.0 resolution: "es-toolkit@npm:1.42.0" dependenciesMeta: From cad1936d667e9c677e4b9b9cc45185f3eef6d43e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 01:07:56 +0100 Subject: [PATCH 115/310] Remove unused cache keys from CI data configuration to streamline the codebase. --- scripts/ci/data.ts | 9 +-------- scripts/ci/utils.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3eaf27ab0a70..f6cf6ce7c0d6 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -26,8 +26,6 @@ const CACHE_KEYS = [ return list.slice(0, list.length - index).join('/'); }); const CACHE_PATHS = [ - '.yarn/code-install-state.gz', - '.yarn/scripts-install-state.gz', '.yarn/root-install-state.gz', 'node_modules', 'code/node_modules', @@ -60,12 +58,7 @@ const commands = { }, }, steps: [ - { - run: { - command: 'git fetch --unshallow', - when: 'on_fail', - }, - }, + git.unshallow(), { 'discord/status': { fail_only: true, diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 61f81c64610a..d12511af3253 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -65,6 +65,14 @@ export const git = { }, }; }, + unshallow: () => { + return { + run: { + command: 'git fetch --unshallow', + when: 'on_fail', + }, + }; + }, }; export const npm = { From 91faf658b42ee2833a8f7649251f33f76d2886cd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 01:34:55 +0100 Subject: [PATCH 116/310] Refactor CI data configuration to simplify server and Verdaccio setup, consolidating wait commands and improving readability. --- scripts/ci/data.ts | 72 +++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index f6cf6ce7c0d6..75a27cd4e78a 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -216,14 +216,7 @@ function defineSandboxFlow(name: K) { git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS), - { - run: { - name: 'Verdaccio', - working_directory: `code`, - background: true, - command: 'yarn local-registry --open', - }, - }, + verdaccio.start(), { run: { name: 'Start Event Collector', @@ -232,17 +225,7 @@ function defineSandboxFlow(name: K) { command: 'yarn jiti ./event-log-collector.ts', }, }, - { - run: { - name: 'Wait on servers', - working_directory: `code`, - command: [ - 'yarn wait-on tcp:127.0.0.1:6001', // verdaccio - 'yarn wait-on tcp:127.0.0.1:6002', // reverse proxy - 'yarn wait-on tcp:127.0.0.1:6007', // event collector - ].join('\n'), - }, - }, + server.wait([...verdaccio.ports, '6007']), { run: { name: 'Setup Corepack', @@ -294,13 +277,7 @@ function defineSandboxFlow(name: K) { command: `yarn task serve --template ${name} --no-link -s serve`, }, }, - { - run: { - name: 'Wait on storybook', - working_directory: `code`, - command: 'yarn wait-on tcp:127.0.0.1:8001', - }, - }, + server.wait(['8001']), { run: { name: 'Running E2E Tests', @@ -333,13 +310,7 @@ function defineSandboxFlow(name: K) { command: `yarn task dev --template ${name} --no-link -s dev`, }, }, - { - run: { - name: 'Wait on storybook', - working_directory: 'code', - command: 'yarn wait-on tcp:127.0.0.1:6006', - }, - }, + server.wait(['6006']), { run: { name: 'Running E2E Tests', @@ -575,3 +546,38 @@ export const data = { jobs, workflows, }; + +const server = { + wait: (ports: string[]) => { + return { + run: { + name: 'Wait on servers', + working_directory: `code`, + command: ports.map((port) => `yarn wait-on tcp:127.0.0.1:${port}`).join('\n'), + }, + }; + }, +}; + +const verdaccio = { + start: () => { + return { + run: { + name: 'Verdaccio', + working_directory: `code`, + background: true, + command: 'yarn local-registry --open', + }, + }; + }, + publish: () => { + return { + run: { + name: 'Publish to Verdaccio', + working_directory: `code`, + command: 'yarn local-registry --publish', + }, + }; + }, + ports: ['6001', '6002'], +}; From 75697361d4fc3f19cefeb8278d51a09fc5684ef6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 30 Nov 2025 01:35:31 +0100 Subject: [PATCH 117/310] Refactor CI utility functions by moving server and Verdaccio configurations to utils.ts, enhancing code organization and maintainability. --- scripts/ci/data.ts | 37 ++----------------------------------- scripts/ci/utils.ts | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 75a27cd4e78a..225599965f2f 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -12,7 +12,9 @@ import { cache, git, npm, + server, toId, + verdaccio, workspace, } from './utils'; @@ -546,38 +548,3 @@ export const data = { jobs, workflows, }; - -const server = { - wait: (ports: string[]) => { - return { - run: { - name: 'Wait on servers', - working_directory: `code`, - command: ports.map((port) => `yarn wait-on tcp:127.0.0.1:${port}`).join('\n'), - }, - }; - }, -}; - -const verdaccio = { - start: () => { - return { - run: { - name: 'Verdaccio', - working_directory: `code`, - background: true, - command: 'yarn local-registry --open', - }, - }; - }, - publish: () => { - return { - run: { - name: 'Publish to Verdaccio', - working_directory: `code`, - command: 'yarn local-registry --publish', - }, - }; - }, - ports: ['6001', '6002'], -}; diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index d12511af3253..904c42365f1f 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -103,3 +103,38 @@ export function toId(name: string) { .replace(/[^a-z0-9]/g, '-') .replace(/^-+|-+$/g, ''); } + +export const server = { + wait: (ports: string[]) => { + return { + run: { + name: 'Wait on servers', + working_directory: `code`, + command: ports.map((port) => `yarn wait-on tcp:127.0.0.1:${port}`).join('\n'), + }, + }; + }, +}; + +export const verdaccio = { + start: () => { + return { + run: { + name: 'Verdaccio', + working_directory: `code`, + background: true, + command: 'yarn local-registry --open', + }, + }; + }, + publish: () => { + return { + run: { + name: 'Publish to Verdaccio', + working_directory: `code`, + command: 'yarn local-registry --publish', + }, + }; + }, + ports: ['6001', '6002'], +}; From 2ef94630c0a32bd71a75e8aa0b422610df7b99be Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 12:32:23 +0100 Subject: [PATCH 118/310] Add theming paths to Storybook configuration for enhanced theming support --- code/.storybook/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/.storybook/main.ts b/code/.storybook/main.ts index 4668c15ab5b9..05b99156056f 100644 --- a/code/.storybook/main.ts +++ b/code/.storybook/main.ts @@ -12,6 +12,8 @@ const currentDirPath = dirname(currentFilePath); const componentsPath = join(currentDirPath, '../core/src/components/index.ts'); const managerApiPath = join(currentDirPath, '../core/src/manager-api/index.mock.ts'); +const themingCreatePath = join(currentDirPath, '../core/src/theming/create.ts'); +const themingPath = join(currentDirPath, '../core/src/theming/index.ts'); const imageContextPath = join(currentDirPath, '../frameworks/nextjs/src/image-context.ts'); const config = defineMain({ @@ -154,6 +156,8 @@ const config = defineMain({ ? { 'storybook/internal/components': componentsPath, 'storybook/manager-api': managerApiPath, + 'storybook/theming/create': themingCreatePath, + 'storybook/theming': themingPath, 'sb-original/image-context': imageContextPath, } : { From 3da44a06584dfec5795a0c3967e96722fb07ce96 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 14:14:29 +0100 Subject: [PATCH 119/310] add ui tests (chromaticf) for internal storybook --- .circleci/config.generated.yml | 11 +-- code/chromatic.config.json | 3 - code/package.json | 2 +- scripts/ci/data.ts | 153 ++++++++++++++++++++++----------- 4 files changed, 108 insertions(+), 61 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 5a39cae193c2..761408074cdd 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -149,8 +149,6 @@ jobs: cache-only-lockfile: true - save_cache: paths: - - .yarn/code-install-state.gz - - .yarn/scripts-install-state.gz - .yarn/root-install-state.gz - node_modules - code/node_modules @@ -303,7 +301,7 @@ jobs: keys: *a1 - run: name: Run tests - working_directory: storybook/code + working_directory: code command: |- TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose @@ -399,7 +397,7 @@ jobs: background: true command: yarn task serve --template react-vite/default-ts --no-link -s serve - run: - name: Wait on storybook + name: Wait on servers working_directory: code command: yarn wait-on tcp:127.0.0.1:8001 - run: @@ -425,7 +423,7 @@ jobs: background: true command: yarn task dev --template react-vite/default-ts --no-link -s dev - run: - name: Wait on storybook + name: Wait on servers working_directory: code command: yarn wait-on tcp:127.0.0.1:6006 - run: @@ -447,6 +445,9 @@ workflows: - sandboxes: requires: - build + - ui: + requires: + - build - react-vite-default-ts--create: requires: - sandboxes diff --git a/code/chromatic.config.json b/code/chromatic.config.json index 80472b6810a2..d53037a9d35e 100644 --- a/code/chromatic.config.json +++ b/code/chromatic.config.json @@ -2,9 +2,6 @@ "$schema": "https://www.chromatic.com/config-file.schema.json", "projectId": "Project:635781f3500dd2c49e189caf", "projectToken": "80b312430ec4", - "buildScriptName": "storybook:ui:build", "onlyChanged": false, - "storybookConfigDir": ".storybook", - "storybookBaseDir": "./code", "zip": true } diff --git a/code/package.json b/code/package.json index bc90f5cbd671..21c71566e115 100644 --- a/code/package.json +++ b/code/package.json @@ -36,7 +36,7 @@ "publish-sandboxes": "yarn --cwd ../scripts publish", "storybook:ui": "NODE_OPTIONS=\"--max_old_space_size=4096 --trace-deprecation\" core/dist/bin/dispatcher.js dev --port 6006 --config-dir ./.storybook", "storybook:ui:build": "NODE_OPTIONS=\"--max_old_space_size=4096\" core/dist/bin/dispatcher.js build --config-dir ./.storybook --webpack-stats-json", - "storybook:ui:chromatic": "../node_modules/.bin/chromatic --build-script-name storybook:ui:build --storybook-base-dir ./ --exit-zero-on-changes --exit-once-uploaded", + "storybook:ui:chromatic": "chromatic --storybook-build-dir storybook-static --exit-zero-on-changes --exit-once-uploaded", "storybook:vitest": "yarn test:watch --project storybook-ui", "storybook:vitest:inspect": "INSPECT=true yarn test --project storybook-ui", "task": "yarn --cwd ../scripts task", diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 225599965f2f..1c15233da96f 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -381,62 +381,106 @@ const build = defineJob('build', { ], }); -const check = defineJob('check', { - executor: { - class: 'xlarge', - name: 'sb_node_22_classic', - }, - steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS), - { - run: { - name: 'TypeCheck code', - working_directory: `code`, - command: 'yarn task --task check --no-link', - }, +const uiTests = defineJob( + 'ui', + { + executor: { + class: 'xlarge', + name: 'sb_playwright', }, - { - run: { - name: 'TypeCheck scripts', - working_directory: `scripts`, - command: 'yarn check', + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), + { + run: { + name: 'Build internal storybook', + command: 'yarn storybook:ui:build', + working_directory: 'code', + }, }, - }, - git.check(), - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], -}); - -const unitTests = defineJob('unit-tests', { - executor: { - name: 'sb_node_22_classic', - class: 'xlarge', - }, - steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS), - { - run: { - name: 'Run tests', - working_directory: `${WORKING_DIR}/code`, - command: - 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + { + run: { + name: 'Run Chromatic', + command: 'yarn storybook:ui:chromatic', + working_directory: 'code', + }, }, + 'report-workflow-on-failure', + { + store_test_results: { + path: `${WORKING_DIR}/test-results`, + }, + }, + ], + }, + [build.id] +); + +const check = defineJob( + 'check', + { + executor: { + class: 'xlarge', + name: 'sb_node_22_classic', }, - { - store_test_results: { - path: `${WORKING_DIR}/test-results`, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), + { + run: { + name: 'TypeCheck code', + working_directory: `code`, + command: 'yarn task --task check --no-link', + }, + }, + { + run: { + name: 'TypeCheck scripts', + working_directory: `scripts`, + command: 'yarn check', + }, }, + git.check(), + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [build.id] +); + +const unitTests = defineJob( + 'unit-tests', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', }, - git.check(), - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], -}); + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), + { + run: { + name: 'Run tests', + working_directory: `code`, + command: + 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + }, + }, + { + store_test_results: { + path: `${WORKING_DIR}/test-results`, + }, + }, + git.check(), + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [build.id] +); const sandboxes = [ // @@ -517,12 +561,12 @@ const workflows = { build.id, { [check.id]: { - requires: [build.id], + requires: check.requires, }, }, { [unitTests.id]: { - requires: [build.id], + requires: unitTests.requires, }, }, { @@ -530,6 +574,11 @@ const workflows = { requires: [build.id], }, }, + { + [uiTests.id]: { + requires: uiTests.requires, + }, + }, ...sandboxes.flatMap((sandbox) => sandbox.workflow), ], when: { From 80d7e0f9374d55e0b806f9e7e093d0884da791cb Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 14:23:39 +0100 Subject: [PATCH 120/310] Add uiTests implementation to CI jobs configuration for enhanced testing capabilities. --- .circleci/config.generated.yml | 23 +++++++++++++++++++++++ scripts/ci/data.ts | 1 + 2 files changed, 24 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 761408074cdd..47d6ee2edad5 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -287,6 +287,29 @@ jobs: command: git diff --exit-code - report-workflow-on-failure - cancel-workflow-on-failure + ui: + description: ui + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: *a1 + - run: + name: Build internal storybook + command: yarn storybook:ui:build + working_directory: code + - run: + name: Run Chromatic + command: yarn storybook:ui:chromatic + working_directory: code + - report-workflow-on-failure + - store_test_results: + path: storybook/test-results unit-tests: description: unit-tests executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 1c15233da96f..019b3f8f008e 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -491,6 +491,7 @@ const sandboxes = [ const jobs = { [build.id]: build.implementation, [check.id]: check.implementation, + [uiTests.id]: uiTests.implementation, [unitTests.id]: unitTests.implementation, 'pretty-docs': { executor: { From b8116bb2e9b243e6c0c4c83533275dca0050100d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 15:30:38 +0100 Subject: [PATCH 121/310] Update chromatic command in package.json to use yarn for improved consistency in script execution. --- code/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/package.json b/code/package.json index 21c71566e115..ff9fe76cacb4 100644 --- a/code/package.json +++ b/code/package.json @@ -36,7 +36,7 @@ "publish-sandboxes": "yarn --cwd ../scripts publish", "storybook:ui": "NODE_OPTIONS=\"--max_old_space_size=4096 --trace-deprecation\" core/dist/bin/dispatcher.js dev --port 6006 --config-dir ./.storybook", "storybook:ui:build": "NODE_OPTIONS=\"--max_old_space_size=4096\" core/dist/bin/dispatcher.js build --config-dir ./.storybook --webpack-stats-json", - "storybook:ui:chromatic": "chromatic --storybook-build-dir storybook-static --exit-zero-on-changes --exit-once-uploaded", + "storybook:ui:chromatic": "yarn chromatic --storybook-build-dir storybook-static --exit-zero-on-changes --exit-once-uploaded", "storybook:vitest": "yarn test:watch --project storybook-ui", "storybook:vitest:inspect": "INSPECT=true yarn test --project storybook-ui", "task": "yarn --cwd ../scripts task", From de880dd17ccea7202f19cb512a6edf782ad213c0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 16:04:06 +0100 Subject: [PATCH 122/310] Update chromatic version in package.json and yarn.lock for consistency in dependencies. --- code/package.json | 3 ++- yarn.lock | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/package.json b/code/package.json index ff9fe76cacb4..5164b62a7728 100644 --- a/code/package.json +++ b/code/package.json @@ -36,7 +36,7 @@ "publish-sandboxes": "yarn --cwd ../scripts publish", "storybook:ui": "NODE_OPTIONS=\"--max_old_space_size=4096 --trace-deprecation\" core/dist/bin/dispatcher.js dev --port 6006 --config-dir ./.storybook", "storybook:ui:build": "NODE_OPTIONS=\"--max_old_space_size=4096\" core/dist/bin/dispatcher.js build --config-dir ./.storybook --webpack-stats-json", - "storybook:ui:chromatic": "yarn chromatic --storybook-build-dir storybook-static --exit-zero-on-changes --exit-once-uploaded", + "storybook:ui:chromatic": "chromatic --storybook-build-dir storybook-static --exit-zero-on-changes --exit-once-uploaded", "storybook:vitest": "yarn test:watch --project storybook-ui", "storybook:vitest:inspect": "INSPECT=true yarn test --project storybook-ui", "task": "yarn --cwd ../scripts task", @@ -123,6 +123,7 @@ "@vitest/browser": "^3.2.4", "@vitest/coverage-istanbul": "^3.2.4", "@vitest/coverage-v8": "^3.2.4", + "chromatic": "^13.3.4", "create-storybook": "workspace:*", "cross-env": "^7.0.3", "es-toolkit": "^1.42.0", diff --git a/yarn.lock b/yarn.lock index 37e9da421d22..55974d920467 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7972,6 +7972,7 @@ __metadata: "@vitest/browser": "npm:^3.2.4" "@vitest/coverage-istanbul": "npm:^3.2.4" "@vitest/coverage-v8": "npm:^3.2.4" + chromatic: "npm:^13.3.4" create-storybook: "workspace:*" cross-env: "npm:^7.0.3" es-toolkit: "npm:^1.42.0" From 8b37e209d5e0baf4f8a5249dc24e0e45d9d19323 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 16:07:46 +0100 Subject: [PATCH 123/310] Update knip version in package.json and yarn.lock for improved dependency management. --- code/package.json | 3 ++- yarn.lock | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/package.json b/code/package.json index 5164b62a7728..84667fbfba43 100644 --- a/code/package.json +++ b/code/package.json @@ -24,7 +24,7 @@ "generate-sandboxes": "yarn --cwd ../scripts generate-sandboxes", "github-release": "github-release-from-changelog", "i": "yarn --cwd .. i", - "knip": "../node_modules/.bin/knip --config ../scripts/knip.config.ts", + "knip": "knip --config ../scripts/knip.config.ts", "lint": "yarn lint:js && yarn lint:other", "lint:ejs": "ejslint **/*.ejs", "lint:js": "yarn lint:js:cmd . --quiet", @@ -132,6 +132,7 @@ "happy-dom": "^17.6.3", "http-server": "^14.1.1", "husky": "^4.3.7", + "knip": "^5.70.2", "lint-staged": "^16.2.7", "mock-require": "^3.0.3", "process": "^0.11.10", diff --git a/yarn.lock b/yarn.lock index 55974d920467..d59116045a4f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7981,6 +7981,7 @@ __metadata: happy-dom: "npm:^17.6.3" http-server: "npm:^14.1.1" husky: "npm:^4.3.7" + knip: "npm:^5.70.2" lint-staged: "npm:^16.2.7" mock-require: "npm:^3.0.3" process: "npm:^0.11.10" From f0eca7696c670ec4df985d04ae06a56ee3848afb Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 18:28:55 +0100 Subject: [PATCH 124/310] Fix import.meta.glob path in bench.stories.tsx for correct metafile loading. --- code/.storybook/bench/bench.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/.storybook/bench/bench.stories.tsx b/code/.storybook/bench/bench.stories.tsx index b5b84cacc75f..3dabf307bad4 100644 --- a/code/.storybook/bench/bench.stories.tsx +++ b/code/.storybook/bench/bench.stories.tsx @@ -5,7 +5,7 @@ import type { Meta } from '@storybook/react-vite'; import { safeMetafileArg } from '../../../scripts/bench/safe-args'; // @ts-expect-error - TS doesn't know about import.meta.glob from Vite -const allMetafiles = import.meta.glob(['../../bench/esbuild-metafiles/**/*.json'], { +const allMetafiles = import.meta.glob('../../bench/esbuild-metafiles/**/*.json', { import: 'default', }); From c1bd1d052f9d8e0de4985909e34981f5155d0652 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 18:44:57 +0100 Subject: [PATCH 125/310] Add bench directory to build job in CI configuration for improved caching. --- scripts/ci/data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 019b3f8f008e..3b4986802925 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -377,6 +377,7 @@ const build = defineJob('build', { `${WORKING_DIR}/code/${p.replace('src', 'node_modules')}`, ]), `${WORKING_DIR}/.verdaccio-cache`, + `${WORKING_DIR}/code/bench`, ]), ], }); From 89d846da80b52bfadb1f35b61d3006928fd8f66e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 19:01:23 +0100 Subject: [PATCH 126/310] Update E2E test file path in CI configuration for consistency across scripts. --- .circleci/config.generated.yml | 3 ++- scripts/ci/data.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 47d6ee2edad5..8643b3212089 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -257,6 +257,7 @@ jobs: - storybook/code/renderers/web-components/dist - storybook/code/renderers/web-components/node_modules - storybook/.verdaccio-cache + - storybook/code/bench root: /tmp check: description: check @@ -426,7 +427,7 @@ jobs: - run: name: Running E2E Tests command: |- - TEST_FILES=$(circleci tests glob "storybook/code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 react-vite-default-ts--dev: description: react-vite/default-ts (dev) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3b4986802925..e594cc5e678b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -284,7 +284,7 @@ function defineSandboxFlow(name: K) { run: { name: 'Running E2E Tests', command: [ - `TEST_FILES=$(circleci tests glob "${WORKING_DIR}/code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, + `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s never" --verbose --index=0 --total=1`, ].join('\n'), }, From 0ab6b2b011ecad5e0ba8606afdce041e80aeda73 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 1 Dec 2025 22:14:06 +0100 Subject: [PATCH 127/310] Enhance CircleCI configuration by adding package-benchmarks job and updating executor settings for existing jobs. --- .circleci/config.generated.yml | 36 +++++++++++++++++++++++++--- scripts/ci/data.ts | 44 +++++++++++++++++++++++++++++----- 2 files changed, 71 insertions(+), 9 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 8643b3212089..6890e2c64823 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -262,8 +262,8 @@ jobs: check: description: check executor: - class: xlarge name: sb_node_22_classic + class: xlarge steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -291,8 +291,8 @@ jobs: ui: description: ui executor: - class: xlarge - name: sb_playwright + name: sb_node_22_classic + class: medium+ steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -336,6 +336,33 @@ jobs: command: git diff --exit-code - report-workflow-on-failure - cancel-workflow-on-failure + package-benchmarks: + description: package-benchmarks + executor: + name: sb_node_22_classic + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: *a1 + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Benchmarking packages against base branch + command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload + working_directory: scripts pretty-docs: executor: name: sb_node_22_classic @@ -463,6 +490,9 @@ workflows: - check: requires: - build + - package-benchmarks: + requires: + - build - unit-tests: requires: - build diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index e594cc5e678b..7207a1f7c3c9 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -166,12 +166,12 @@ const executors = { resource_class: '<>', working_directory: `${ROOT_DIR}/${WORKING_DIR}`, }, -}; +} as const; type SomethingImplementation = { executor: { - class: string; - name: string; + class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + name: keyof typeof executors; }; steps: unknown[]; parameters?: Record; @@ -386,8 +386,8 @@ const uiTests = defineJob( 'ui', { executor: { - class: 'xlarge', - name: 'sb_playwright', + name: 'sb_node_22_classic', + class: 'medium+', }, steps: [ git.checkout(), @@ -422,8 +422,8 @@ const check = defineJob( 'check', { executor: { - class: 'xlarge', name: 'sb_node_22_classic', + class: 'xlarge', }, steps: [ git.checkout(), @@ -483,6 +483,32 @@ const unitTests = defineJob( [build.id] ); +const packageBenchmarks = defineJob( + 'package-benchmarks', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Benchmarking packages against base branch', + command: + 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', + working_directory: 'scripts', + }, + }, + ], + }, + [build.id] +); + const sandboxes = [ // 'react-vite/default-ts', @@ -494,6 +520,7 @@ const jobs = { [check.id]: check.implementation, [uiTests.id]: uiTests.implementation, [unitTests.id]: unitTests.implementation, + [packageBenchmarks.id]: packageBenchmarks.implementation, 'pretty-docs': { executor: { name: 'sb_node_22_classic', @@ -566,6 +593,11 @@ const workflows = { requires: check.requires, }, }, + { + [packageBenchmarks.id]: { + requires: packageBenchmarks.requires, + }, + }, { [unitTests.id]: { requires: unitTests.requires, From 5fae6b0b264bfb293cabb0d2c16cda7eedfaeb08 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 12:08:42 +0100 Subject: [PATCH 128/310] Update TypeScript SDK path in VSCode settings for consistency --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 8e8625ecd236..f2737e362922 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,7 +49,7 @@ "typescript.preferences.preferTypeOnlyAutoImports": true, "typescript.preferences.quoteStyle": "single", "typescript.preferGoToSourceDefinition": true, - "typescript.tsdk": "./code/node_modules/typescript/lib", + "typescript.tsdk": "./typescript/lib", "vitest.workspaceConfig": "./code/vitest.workspace.ts", "vitest.rootConfig": "./code/vitest.workspace.ts", } From aaef19ba8a57d4cc198c6823b063c6c3f5db6b28 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 12:56:18 +0100 Subject: [PATCH 129/310] first attempt windows --- .circleci/config.generated.yml | 63 ++++++++++++++++++------- scripts/ci/data.ts | 85 +++++++++++++++++++++++++++++----- 2 files changed, 120 insertions(+), 28 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 6890e2c64823..2b83098f8416 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -135,8 +135,8 @@ parameters: - docs type: enum jobs: - build: - description: build + build-linux: + description: build-linux executor: name: sb_node_22_classic class: xlarge @@ -148,7 +148,7 @@ jobs: pkg-manager: yarn cache-only-lockfile: true - save_cache: - paths: + paths: &a1 - .yarn/root-install-state.gz - node_modules - code/node_modules @@ -259,6 +259,36 @@ jobs: - storybook/.verdaccio-cache - storybook/code/bench root: /tmp + build-windows: + description: build-windows + executor: + name: win/default + size: xlarge + working_directory: /tmp/storybook + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - node/install-packages: + app-dir: . + pkg-manager: yarn + cache-only-lockfile: true + - save_cache: + paths: *a1 + key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - run: + name: Ensure no changes pending + command: git diff --exit-code + - run: + name: Check for dedupe + command: yarn dedupe --check + - run: + command: yarn task --task compile --start-from=auto --no-link --debug + name: Compile + working_directory: code + - run: + command: yarn local-registry --publish + name: Publish to Verdaccio + working_directory: code check: description: check executor: @@ -270,7 +300,7 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: &a1 + keys: &a2 - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - darwin-node_modules/{{ checksum ".nvmrc" }} @@ -299,7 +329,7 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a1 + keys: *a2 - run: name: Build internal storybook command: yarn storybook:ui:build @@ -322,7 +352,7 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a1 + keys: *a2 - run: name: Run tests working_directory: code @@ -347,7 +377,7 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a1 + keys: *a2 - run: name: Verdaccio working_directory: code @@ -391,7 +421,7 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a1 + keys: *a2 - run: name: Verdaccio working_directory: code @@ -439,7 +469,7 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a1 + keys: *a2 - run: name: Build storybook command: yarn task build --template react-vite/default-ts --no-link -s build @@ -467,7 +497,7 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a1 + keys: *a2 - run: name: Run storybook working_directory: code @@ -486,22 +516,23 @@ workflows: docs: jobs: - pretty-docs - - build + - build-linux + - build-windows - check: requires: - - build + - build-linux - package-benchmarks: requires: - - build + - build-linux - unit-tests: requires: - - build + - build-linux - sandboxes: requires: - - build + - build-linux - ui: requires: - - build + - build-linux - react-vite-default-ts--create: requires: - sandboxes diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 7207a1f7c3c9..cd1af4228720 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -3,6 +3,7 @@ import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; +import { normalize } from 'pathe'; import { ROOT_DIR, @@ -169,10 +170,16 @@ const executors = { } as const; type SomethingImplementation = { - executor: { - class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - name: keyof typeof executors; - }; + executor: + | { + name: keyof typeof executors; + class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + } + | { + name: 'win/default'; + size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + working_directory: string; + }; steps: unknown[]; parameters?: Record; parallelism?: number; @@ -339,7 +346,7 @@ function defineSandboxFlow(name: K) { }; } -const build = defineJob('build', { +const buildLinux = defineJob('build-linux', { executor: { name: 'sb_node_22_classic', class: 'xlarge', @@ -382,6 +389,50 @@ const build = defineJob('build', { ], }); +const buildWindows = defineJob('build-windows', { + executor: { + name: 'win/default', + size: 'xlarge', + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + }, + steps: [ + git.checkout(), + npm.install('.'), + cache.persist(CACHE_PATHS, CACHE_KEYS[0]), + git.check(), + npm.check(), + { + run: { + command: 'yarn task --task compile --start-from=auto --no-link --debug', + name: 'Compile', + working_directory: `code`, + }, + }, + { + run: { + command: 'yarn local-registry --publish', + name: 'Publish to Verdaccio', + working_directory: `code`, + }, + }, + // 'report-workflow-on-failure', + // artifact.persist(normalize(`code/bench/esbuild-metafiles`), 'bench'), + // workspace.persist([ + // ...glob + // .sync(['*/src', '*/*/src'], { + // cwd: join(dirname, '../../code'), + // onlyDirectories: true, + // }) + // .flatMap((p) => [ + // normalize(`${WORKING_DIR}/code/${p.replace('src', 'dist')}`), + // normalize(`${WORKING_DIR}/code/${p.replace('src', 'node_modules')}`), + // ]), + // normalize(`${WORKING_DIR}/.verdaccio-cache`), + // normalize(`${WORKING_DIR}/code/bench`), + // ]), + ], +}); + const uiTests = defineJob( 'ui', { @@ -415,7 +466,7 @@ const uiTests = defineJob( }, ], }, - [build.id] + [buildLinux.id] ); const check = defineJob( @@ -448,7 +499,7 @@ const check = defineJob( 'cancel-workflow-on-failure', ], }, - [build.id] + [buildLinux.id] ); const unitTests = defineJob( @@ -480,7 +531,7 @@ const unitTests = defineJob( 'cancel-workflow-on-failure', ], }, - [build.id] + [buildLinux.id] ); const packageBenchmarks = defineJob( @@ -506,7 +557,7 @@ const packageBenchmarks = defineJob( }, ], }, - [build.id] + [buildLinux.id] ); const sandboxes = [ @@ -516,7 +567,8 @@ const sandboxes = [ ].map(defineSandboxFlow); const jobs = { - [build.id]: build.implementation, + [buildLinux.id]: buildLinux.implementation, + [buildWindows.id]: buildWindows.implementation, [check.id]: check.implementation, [uiTests.id]: uiTests.implementation, [unitTests.id]: unitTests.implementation, @@ -587,7 +639,8 @@ const workflows = { docs: { jobs: [ 'pretty-docs', - build.id, + buildLinux.id, + buildWindows.id, { [check.id]: { requires: check.requires, @@ -605,7 +658,7 @@ const workflows = { }, { sandboxes: { - requires: [build.id], + requires: [buildLinux.id], }, }, { @@ -619,6 +672,14 @@ const workflows = { equal: ['docs', '<< pipeline.parameters.workflow >>'], }, }, + // windows: { + // jobs: [ + // 'pretty-docs', + // build.id, + // { + // [check.id]: { + // requires: check.requires, + // }, }; export const data = { From b0a787ad362223fcca9e660fbc271a6e52c078dd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 13:04:05 +0100 Subject: [PATCH 130/310] Remove working_directory from CircleCI executor configuration for Windows jobs --- .circleci/config.generated.yml | 1 - scripts/ci/data.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 2b83098f8416..794b39418efb 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -264,7 +264,6 @@ jobs: executor: name: win/default size: xlarge - working_directory: /tmp/storybook steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index cd1af4228720..daba58986ef0 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -178,7 +178,6 @@ type SomethingImplementation = { | { name: 'win/default'; size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - working_directory: string; }; steps: unknown[]; parameters?: Record; @@ -393,7 +392,6 @@ const buildWindows = defineJob('build-windows', { executor: { name: 'win/default', size: 'xlarge', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, }, steps: [ git.checkout(), From da7ef25c2608a734754fdde2779c578893b69f8d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 14:07:13 +0100 Subject: [PATCH 131/310] attempt 2 for windows --- .circleci/config.generated.yml | 18 ++++++++++++++++-- scripts/ci/data.ts | 17 +++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 794b39418efb..bf59ad87bab9 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -264,9 +264,23 @@ jobs: executor: name: win/default size: xlarge + environment: + NODE_OPTIONS: --max_old_space_size=6144 steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 + - run: + name: Checkout (shallow) + shell: bash.exe + command: " + + \ git init . + + \ git remote add origin \"$CIRCLE_REPOSITORY_URL\" + + \ git fetch --depth=1 origin \"$CIRCLE_SHA1\" + + \ git checkout \"$CIRCLE_SHA1\" + + \ " - node/install-packages: app-dir: . pkg-manager: yarn diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index daba58986ef0..75be57ce0004 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -3,7 +3,6 @@ import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; -import { normalize } from 'pathe'; import { ROOT_DIR, @@ -392,9 +391,23 @@ const buildWindows = defineJob('build-windows', { executor: { name: 'win/default', size: 'xlarge', + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, }, steps: [ - git.checkout(), + { + run: { + name: 'Checkout (shallow)', + shell: 'bash.exe', + command: ` + git init . + git remote add origin "$CIRCLE_REPOSITORY_URL" + git fetch --depth=1 origin "$CIRCLE_SHA1" + git checkout "$CIRCLE_SHA1" + `, + }, + }, npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), git.check(), From 246687eed8fa172485ec23042a8f3b8e2b4a5b1f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 14:13:01 +0100 Subject: [PATCH 132/310] Remove NODE_OPTIONS environment variable from CircleCI executor configuration for Windows jobs --- .circleci/config.generated.yml | 2 -- scripts/ci/data.ts | 3 --- 2 files changed, 5 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index bf59ad87bab9..e8444f167a93 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -264,8 +264,6 @@ jobs: executor: name: win/default size: xlarge - environment: - NODE_OPTIONS: --max_old_space_size=6144 steps: - run: name: Checkout (shallow) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 75be57ce0004..e7a739429e58 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -391,9 +391,6 @@ const buildWindows = defineJob('build-windows', { executor: { name: 'win/default', size: 'xlarge', - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, }, steps: [ { From 8d1ecb5f3a1f6a20bcc8495e81fedac580832520 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 14:19:30 +0100 Subject: [PATCH 133/310] try windows some more --- scripts/ci/data.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index e7a739429e58..e2154ad1ff5b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -398,11 +398,12 @@ const buildWindows = defineJob('build-windows', { name: 'Checkout (shallow)', shell: 'bash.exe', command: ` - git init . - git remote add origin "$CIRCLE_REPOSITORY_URL" - git fetch --depth=1 origin "$CIRCLE_SHA1" - git checkout "$CIRCLE_SHA1" - `, + git init . + REPO_URL="\${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}" + git remote add origin "$REPO_URL" + git fetch --depth=1 origin "$CIRCLE_SHA1" + git checkout "$CIRCLE_SHA1" + `, }, }, npm.install('.'), From 8ad6270c9cb6f060dd1b195a9d7c5206324c442a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 14:25:11 +0100 Subject: [PATCH 134/310] keep trying --- .circleci/config.generated.yml | 20 +++++++++++--------- scripts/ci/data.ts | 8 +++++++- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index e8444f167a93..548222fb99e7 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -270,19 +270,21 @@ jobs: shell: bash.exe command: " - \ git init . + \ git init . - \ git remote add origin \"$CIRCLE_REPOSITORY_URL\" + \ REPO_URL=\"${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}\" - \ git fetch --depth=1 origin \"$CIRCLE_SHA1\" + \ git remote add origin \"$REPO_URL\" - \ git checkout \"$CIRCLE_SHA1\" + \ git fetch --depth=1 origin \"$CIRCLE_SHA1\" - \ " - - node/install-packages: - app-dir: . - pkg-manager: yarn - cache-only-lockfile: true + \ git checkout \"$CIRCLE_SHA1\" + + \ " + - run: + name: Install dependencies + command: yarn install --frozen-lockfile + working_directory: code - save_cache: paths: *a1 key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index e2154ad1ff5b..b70d6578ddbf 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -406,7 +406,13 @@ const buildWindows = defineJob('build-windows', { `, }, }, - npm.install('.'), + { + run: { + name: 'Install dependencies', + command: 'yarn install --frozen-lockfile', + working_directory: 'code', + }, + }, cache.persist(CACHE_PATHS, CACHE_KEYS[0]), git.check(), npm.check(), From fb90bc8d2b9ecb23a5352b23287bcdd7e98cc062 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 14:41:03 +0100 Subject: [PATCH 135/310] Add Node.js and Yarn installation step in CircleCI configuration for Windows --- .circleci/config.generated.yml | 42 +++++++++++++++++++++++++++++++++- scripts/ci/data.ts | 28 ++++++++++++++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 548222fb99e7..23a2a7847d3c 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -282,9 +282,49 @@ jobs: \ " - run: + name: Install Node.js and Yarn + command: " + + \ @\" + + \ # read .nvmrc + + \ $nodeVersion = Get-Content '.nvmrc' | Select-Object -First 1 + + \ Write-Host 'Using Node version from .nvmrc:' $nodeVersion + + + \ # install + use that version + + \ nvm install $nodeVersion + + \ nvm use $nodeVersion + + + \ # enable yarn (via Corepack) + + \ corepack enable + + + \ # refresh PATH so this SAME session sees yarn.cmd + + \ $env:PATH = [System.Environment]::GetEnvironmentVariable('PATH','Machine') + ';' + + + \ [System.Environment]::GetEnvironmentVariable('PATH','User') + + + \ # verify + + \ Write-Host 'Node:' (node -v) + + \ Write-Host 'Yarn:' (yarn -v) + + \ \"@, + + \ " + - run: name: Install dependencies command: yarn install --frozen-lockfile - working_directory: code - save_cache: paths: *a1 key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index b70d6578ddbf..be36916c1375 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -406,11 +406,37 @@ const buildWindows = defineJob('build-windows', { `, }, }, + { + run: { + name: 'Install Node.js and Yarn', + command: ` + @" + # read .nvmrc + $nodeVersion = Get-Content '.nvmrc' | Select-Object -First 1 + Write-Host 'Using Node version from .nvmrc:' $nodeVersion + + # install + use that version + nvm install $nodeVersion + nvm use $nodeVersion + + # enable yarn (via Corepack) + corepack enable + + # refresh PATH so this SAME session sees yarn.cmd + $env:PATH = [System.Environment]::GetEnvironmentVariable('PATH','Machine') + ';' + + [System.Environment]::GetEnvironmentVariable('PATH','User') + + # verify + Write-Host 'Node:' (node -v) + Write-Host 'Yarn:' (yarn -v) + "@, + `, + }, + }, { run: { name: 'Install dependencies', command: 'yarn install --frozen-lockfile', - working_directory: 'code', }, }, cache.persist(CACHE_PATHS, CACHE_KEYS[0]), From b796b27ac844d69a767ac37dad4fdcf466a9fd8d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 14:51:43 +0100 Subject: [PATCH 136/310] Refactor Windows CI job to use Chocolatey for Node.js installation and update Yarn commands --- scripts/ci/data.ts | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index be36916c1375..ea48fddc379a 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -408,35 +408,19 @@ const buildWindows = defineJob('build-windows', { }, { run: { - name: 'Install Node.js and Yarn', + name: 'Setup Node & Yarn on Windows', + shell: 'bash.exe', command: ` - @" - # read .nvmrc - $nodeVersion = Get-Content '.nvmrc' | Select-Object -First 1 - Write-Host 'Using Node version from .nvmrc:' $nodeVersion - - # install + use that version - nvm install $nodeVersion - nvm use $nodeVersion - - # enable yarn (via Corepack) + choco install nodejs-lts --version=22.11.0 -y corepack enable - - # refresh PATH so this SAME session sees yarn.cmd - $env:PATH = [System.Environment]::GetEnvironmentVariable('PATH','Machine') + ';' + - [System.Environment]::GetEnvironmentVariable('PATH','User') - - # verify - Write-Host 'Node:' (node -v) - Write-Host 'Yarn:' (yarn -v) - "@, `, }, }, { run: { name: 'Install dependencies', - command: 'yarn install --frozen-lockfile', + shell: 'bash.exe', + command: 'yarn install', }, }, cache.persist(CACHE_PATHS, CACHE_KEYS[0]), @@ -447,6 +431,7 @@ const buildWindows = defineJob('build-windows', { command: 'yarn task --task compile --start-from=auto --no-link --debug', name: 'Compile', working_directory: `code`, + shell: 'bash.exe', }, }, { @@ -454,6 +439,7 @@ const buildWindows = defineJob('build-windows', { command: 'yarn local-registry --publish', name: 'Publish to Verdaccio', working_directory: `code`, + shell: 'bash.exe', }, }, // 'report-workflow-on-failure', From bfb4528ec8c4f86593899c570b0c5ac9d84ffa03 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 2 Dec 2025 14:57:32 +0100 Subject: [PATCH 137/310] Refactor CircleCI configuration for Windows: streamline Node.js setup with Chocolatey and adjust Yarn installation commands --- .circleci/config.generated.yml | 61 ++++++++-------------------------- scripts/ci/data.ts | 14 ++++---- 2 files changed, 20 insertions(+), 55 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 23a2a7847d3c..cd7a41c807c7 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -268,63 +268,26 @@ jobs: - run: name: Checkout (shallow) shell: bash.exe - command: " - - \ git init . - - \ REPO_URL=\"${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}\" - - \ git remote add origin \"$REPO_URL\" - - \ git fetch --depth=1 origin \"$CIRCLE_SHA1\" - - \ git checkout \"$CIRCLE_SHA1\" - - \ " + command: |- + git init . + REPO_URL="${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}" + git remote add origin "$REPO_URL" + git fetch --depth=1 origin "$CIRCLE_SHA1" + git checkout "$CIRCLE_SHA1" - run: - name: Install Node.js and Yarn + name: Setup Node & Yarn on Windows + shell: bash.exe command: " - \ @\" - - \ # read .nvmrc - - \ $nodeVersion = Get-Content '.nvmrc' | Select-Object -First 1 - - \ Write-Host 'Using Node version from .nvmrc:' $nodeVersion - - - \ # install + use that version - - \ nvm install $nodeVersion - - \ nvm use $nodeVersion - - - \ # enable yarn (via Corepack) + \ choco install nodejs-lts --version=22.11.0 -y \ corepack enable - - \ # refresh PATH so this SAME session sees yarn.cmd - - \ $env:PATH = [System.Environment]::GetEnvironmentVariable('PATH','Machine') + ';' + - - \ [System.Environment]::GetEnvironmentVariable('PATH','User') - - - \ # verify - - \ Write-Host 'Node:' (node -v) - - \ Write-Host 'Yarn:' (yarn -v) - - \ \"@, - \ " - run: name: Install dependencies - command: yarn install --frozen-lockfile + shell: bash.exe + command: yarn install - save_cache: paths: *a1 key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -338,10 +301,12 @@ jobs: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile working_directory: code + shell: bash.exe - run: command: yarn local-registry --publish name: Publish to Verdaccio working_directory: code + shell: bash.exe check: description: check executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index ea48fddc379a..e166aa8eedbe 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -397,13 +397,13 @@ const buildWindows = defineJob('build-windows', { run: { name: 'Checkout (shallow)', shell: 'bash.exe', - command: ` - git init . - REPO_URL="\${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}" - git remote add origin "$REPO_URL" - git fetch --depth=1 origin "$CIRCLE_SHA1" - git checkout "$CIRCLE_SHA1" - `, + command: [ + `git init .`, + `REPO_URL="\${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}"`, + `git remote add origin "$REPO_URL"`, + `git fetch --depth=1 origin "$CIRCLE_SHA1"`, + `git checkout "$CIRCLE_SHA1"`, + ].join('\n'), }, }, { From 0dc5e744f43fd5a227ada9d4da52fa7d73591500 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 10:29:57 +0100 Subject: [PATCH 138/310] Remove deprecated GitHub Actions workflow for unit tests and update Windows CI configuration to streamline the testing process. --- .github/workflows/tests-unit.yml | 35 ------------ scripts/ci/data.ts | 91 +++++++++++++++++++++----------- 2 files changed, 59 insertions(+), 67 deletions(-) delete mode 100644 .github/workflows/tests-unit.yml diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml deleted file mode 100644 index cf48ebae5015..000000000000 --- a/.github/workflows/tests-unit.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Unit tests - -on: - push: - branches: - - next - pull_request: - types: [opened, synchronize, reopened] - -env: - NODE_OPTIONS: '--max_old_space_size=4096' - -jobs: - build: - name: Core Unit Tests, windows-latest - if: github.repository_owner == 'storybookjs' - runs-on: windows-11-arm - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - name: Setup Node.js and Install Dependencies - uses: ./.github/actions/setup-node-and-install - with: - install-code-deps: true - - - name: compile - run: yarn task --task compile --start-from=compile - - - name: Install Playwright Dependencies - run: cd code && yarn exec playwright install chromium --with-deps - - - name: test - run: yarn test diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index e166aa8eedbe..a3790268e79b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -393,36 +393,8 @@ const buildWindows = defineJob('build-windows', { size: 'xlarge', }, steps: [ - { - run: { - name: 'Checkout (shallow)', - shell: 'bash.exe', - command: [ - `git init .`, - `REPO_URL="\${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}"`, - `git remote add origin "$REPO_URL"`, - `git fetch --depth=1 origin "$CIRCLE_SHA1"`, - `git checkout "$CIRCLE_SHA1"`, - ].join('\n'), - }, - }, - { - run: { - name: 'Setup Node & Yarn on Windows', - shell: 'bash.exe', - command: ` - choco install nodejs-lts --version=22.11.0 -y - corepack enable - `, - }, - }, - { - run: { - name: 'Install dependencies', - shell: 'bash.exe', - command: 'yarn install', - }, - }, + git.checkout(), + npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), git.check(), npm.check(), @@ -431,7 +403,6 @@ const buildWindows = defineJob('build-windows', { command: 'yarn task --task compile --start-from=auto --no-link --debug', name: 'Compile', working_directory: `code`, - shell: 'bash.exe', }, }, { @@ -439,9 +410,65 @@ const buildWindows = defineJob('build-windows', { command: 'yarn local-registry --publish', name: 'Publish to Verdaccio', working_directory: `code`, - shell: 'bash.exe', }, }, + { + run: { + command: 'yarn test', + name: 'Run unit tests', + working_directory: `code`, + }, + }, + + // { + // run: { + // name: 'Checkout (shallow)', + // shell: 'bash.exe', + // command: [ + // `git init .`, + // `REPO_URL="\${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}"`, + // `git remote add origin "$REPO_URL"`, + // `git fetch --depth=1 origin "$CIRCLE_SHA1"`, + // `git checkout "$CIRCLE_SHA1"`, + // ].join('\n'), + // }, + // }, + // { + // run: { + // name: 'Setup Node & Yarn on Windows', + // shell: 'bash.exe', + // command: ` + // choco install nodejs-lts --version=22.11.0 -y + // corepack enable + // `, + // }, + // }, + // { + // run: { + // name: 'Install dependencies', + // shell: 'bash.exe', + // command: 'yarn install', + // }, + // }, + // cache.persist(CACHE_PATHS, CACHE_KEYS[0]), + // git.check(), + // npm.check(), + // { + // run: { + // command: 'yarn task --task compile --start-from=auto --no-link --debug', + // name: 'Compile', + // working_directory: `code`, + // shell: 'bash.exe', + // }, + // }, + // { + // run: { + // command: 'yarn local-registry --publish', + // name: 'Publish to Verdaccio', + // working_directory: `code`, + // shell: 'bash.exe', + // }, + // }, // 'report-workflow-on-failure', // artifact.persist(normalize(`code/bench/esbuild-metafiles`), 'bench'), // workspace.persist([ From b63cbb951e747984afc9c70692732bbcd6ece244 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 10:34:16 +0100 Subject: [PATCH 139/310] Add shell configuration for Windows CI job to use bash.exe --- scripts/ci/data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index a3790268e79b..cbd7fe18def9 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -391,6 +391,7 @@ const buildWindows = defineJob('build-windows', { executor: { name: 'win/default', size: 'xlarge', + shell: 'bash.exe', }, steps: [ git.checkout(), From 3f808a2dc5edc8eaaa1867e3a5efcd86a3d561f2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 11:30:14 +0100 Subject: [PATCH 140/310] Refactor CircleCI configuration for Windows CI: streamline Git checkout process with HTTPS and enhance Node.js package installation steps --- .circleci/config.generated.yml | 36 +++++++++++----------------------- scripts/ci/data.ts | 2 +- scripts/ci/utils.ts | 13 ++++++++++-- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index cd7a41c807c7..f2ba7c4a9e45 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -264,30 +264,14 @@ jobs: executor: name: win/default size: xlarge + shell: bash.exe steps: - - run: - name: Checkout (shallow) - shell: bash.exe - command: |- - git init . - REPO_URL="${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}" - git remote add origin "$REPO_URL" - git fetch --depth=1 origin "$CIRCLE_SHA1" - git checkout "$CIRCLE_SHA1" - - run: - name: Setup Node & Yarn on Windows - shell: bash.exe - command: " - - \ choco install nodejs-lts --version=22.11.0 -y - - \ corepack enable - - \ " - - run: - name: Install dependencies - shell: bash.exe - command: yarn install + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - node/install-packages: + app-dir: . + pkg-manager: yarn + cache-only-lockfile: true - save_cache: paths: *a1 key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -301,12 +285,14 @@ jobs: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile working_directory: code - shell: bash.exe - run: command: yarn local-registry --publish name: Publish to Verdaccio working_directory: code - shell: bash.exe + - run: + command: yarn test + name: Run unit tests + working_directory: code check: description: check executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index cbd7fe18def9..eb700a71da58 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -394,7 +394,7 @@ const buildWindows = defineJob('build-windows', { shell: 'bash.exe', }, steps: [ - git.checkout(), + git.checkout({ forceHttps: true }), npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), git.check(), diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 904c42365f1f..31b67a03c3a0 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -50,10 +50,19 @@ export const artifact = { }; export const git = { - checkout: (shallow: boolean = true) => { + checkout: ({ forceHttps = false, shallow = true } = {}) => { + const configs = forceHttps + ? [ + '--config url."https://github.com/".insteadOf=ssh://git@github.com/', + '--config url."https://github.com/".insteadOf=git@github.com:', + ].join(' ') + : ''; + + const depth = shallow ? '--depth 1' : ''; + return { 'git-shallow-clone/checkout_advanced': { - clone_options: shallow ? '--depth 1' : '', + clone_options: `${depth} ${configs}`.trim(), }, }; }, From 2d19d22047bd3cc497dcadf8db682f57c1d50543 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 11:48:14 +0100 Subject: [PATCH 141/310] Add Node.js installation utility and update CircleCI configuration to include Yarn installation step --- .circleci/config.generated.yml | 2 ++ scripts/ci/data.ts | 2 ++ scripts/ci/utils.ts | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index f2ba7c4a9e45..56a7e1e34cb2 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -141,6 +141,8 @@ jobs: name: sb_node_22_classic class: xlarge steps: + - node/install: + install-yarn: true - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - node/install-packages: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index eb700a71da58..14a5bf47c3ab 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -11,6 +11,7 @@ import { artifact, cache, git, + node, npm, server, toId, @@ -350,6 +351,7 @@ const buildLinux = defineJob('build-linux', { class: 'xlarge', }, steps: [ + node.install(), git.checkout(), npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 31b67a03c3a0..a53b1ea7af2b 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -84,6 +84,14 @@ export const git = { }, }; +export const node = { + install: () => { + return { + 'node/install': { 'install-yarn': true }, + }; + }, +}; + export const npm = { install: (appDir: string, pkgManager: string = 'yarn') => { return { From 05bdca74a67a0d1e1c126eef6d350336a6083790 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 11:53:11 +0100 Subject: [PATCH 142/310] Update CircleCI configuration: reintroduce Yarn installation for Windows CI and streamline Node.js installation steps --- .circleci/config.generated.yml | 4 ++-- scripts/ci/data.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 56a7e1e34cb2..85ce81e67351 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -141,8 +141,6 @@ jobs: name: sb_node_22_classic class: xlarge steps: - - node/install: - install-yarn: true - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - node/install-packages: @@ -268,6 +266,8 @@ jobs: size: xlarge shell: bash.exe steps: + - node/install: + install-yarn: true - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - node/install-packages: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 14a5bf47c3ab..eb1a11848526 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -351,7 +351,6 @@ const buildLinux = defineJob('build-linux', { class: 'xlarge', }, steps: [ - node.install(), git.checkout(), npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), @@ -396,6 +395,7 @@ const buildWindows = defineJob('build-windows', { shell: 'bash.exe', }, steps: [ + node.install(), git.checkout({ forceHttps: true }), npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), From a8580d3b2e04b3ca3468da368698f7e11f6bdba4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 13:59:38 +0100 Subject: [PATCH 143/310] Refactor CircleCI configuration for Windows CI: replace Node.js installation with NVM and streamline Yarn setup process --- .circleci/config.generated.yml | 11 +++++++++-- scripts/ci/data.ts | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 85ce81e67351..ba7d2485930a 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -266,8 +266,15 @@ jobs: size: xlarge shell: bash.exe steps: - - node/install: - install-yarn: true + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - node/install-packages: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index eb1a11848526..4121c5f76d90 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -395,7 +395,20 @@ const buildWindows = defineJob('build-windows', { shell: 'bash.exe', }, steps: [ - node.install(), + { + run: { + name: 'Install Node + Yarn', + shell: 'powershell.exe', + command: [ + '$nodeVersion = Get-Content .nvmrc | Select-Object -First 1', + 'nvm install $nodeVersion', + 'nvm use $nodeVersion', + 'corepack enable', + 'corepack prepare yarn@stable --activate', + ].join('\n'), + }, + }, + // node.install(), git.checkout({ forceHttps: true }), npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), From 746d43aacdb55bc693015f05b7acccec07972ed6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 15:04:57 +0100 Subject: [PATCH 144/310] Enhance Vitest configuration: conditionally include Storybook tests based on CI environment and streamline project configuration --- .circleci/config.generated.yml | 223 ++++++++++++++------------------- code/vitest.config.ts | 30 +++-- scripts/ci/data.ts | 150 +++++++++------------- scripts/ci/utils.ts | 22 +++- 4 files changed, 187 insertions(+), 238 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index ba7d2485930a..1f2d8e09e7e3 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -284,12 +284,6 @@ jobs: - save_cache: paths: *a1 key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - run: - name: Ensure no changes pending - command: git diff --exit-code - - run: - name: Check for dedupe - command: yarn dedupe --check - run: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile @@ -298,10 +292,93 @@ jobs: command: yarn local-registry --publish name: Publish to Verdaccio working_directory: code - - run: - command: yarn test - name: Run unit tests - working_directory: code + - persist_to_workspace: + paths: + - storybook/code/core/dist + - storybook/code/core/node_modules + - storybook/code/addons/a11y/dist + - storybook/code/addons/a11y/node_modules + - storybook/code/addons/docs/dist + - storybook/code/addons/docs/node_modules + - storybook/code/addons/links/dist + - storybook/code/addons/links/node_modules + - storybook/code/addons/onboarding/dist + - storybook/code/addons/onboarding/node_modules + - storybook/code/addons/pseudo-states/dist + - storybook/code/addons/pseudo-states/node_modules + - storybook/code/addons/themes/dist + - storybook/code/addons/themes/node_modules + - storybook/code/addons/vitest/dist + - storybook/code/addons/vitest/node_modules + - storybook/code/builders/builder-vite/dist + - storybook/code/builders/builder-vite/node_modules + - storybook/code/builders/builder-webpack5/dist + - storybook/code/builders/builder-webpack5/node_modules + - storybook/code/frameworks/angular/dist + - storybook/code/frameworks/angular/node_modules + - storybook/code/frameworks/ember/dist + - storybook/code/frameworks/ember/node_modules + - storybook/code/frameworks/html-vite/dist + - storybook/code/frameworks/html-vite/node_modules + - storybook/code/frameworks/nextjs/dist + - storybook/code/frameworks/nextjs/node_modules + - storybook/code/frameworks/nextjs-vite/dist + - storybook/code/frameworks/nextjs-vite/node_modules + - storybook/code/frameworks/preact-vite/dist + - storybook/code/frameworks/preact-vite/node_modules + - storybook/code/frameworks/react-native-web-vite/dist + - storybook/code/frameworks/react-native-web-vite/node_modules + - storybook/code/frameworks/react-vite/dist + - storybook/code/frameworks/react-vite/node_modules + - storybook/code/frameworks/react-webpack5/dist + - storybook/code/frameworks/react-webpack5/node_modules + - storybook/code/frameworks/server-webpack5/dist + - storybook/code/frameworks/server-webpack5/node_modules + - storybook/code/frameworks/svelte-vite/dist + - storybook/code/frameworks/svelte-vite/node_modules + - storybook/code/frameworks/sveltekit/dist + - storybook/code/frameworks/sveltekit/node_modules + - storybook/code/frameworks/vue3-vite/dist + - storybook/code/frameworks/vue3-vite/node_modules + - storybook/code/frameworks/web-components-vite/dist + - storybook/code/frameworks/web-components-vite/node_modules + - storybook/code/lib/cli-storybook/dist + - storybook/code/lib/cli-storybook/node_modules + - storybook/code/lib/codemod/dist + - storybook/code/lib/codemod/node_modules + - storybook/code/lib/core-webpack/dist + - storybook/code/lib/core-webpack/node_modules + - storybook/code/lib/create-storybook/dist + - storybook/code/lib/create-storybook/node_modules + - storybook/code/lib/csf-plugin/dist + - storybook/code/lib/csf-plugin/node_modules + - storybook/code/lib/eslint-plugin/dist + - storybook/code/lib/eslint-plugin/node_modules + - storybook/code/lib/react-dom-shim/dist + - storybook/code/lib/react-dom-shim/node_modules + - storybook/code/presets/create-react-app/dist + - storybook/code/presets/create-react-app/node_modules + - storybook/code/presets/react-webpack/dist + - storybook/code/presets/react-webpack/node_modules + - storybook/code/presets/server-webpack/dist + - storybook/code/presets/server-webpack/node_modules + - storybook/code/renderers/html/dist + - storybook/code/renderers/html/node_modules + - storybook/code/renderers/preact/dist + - storybook/code/renderers/preact/node_modules + - storybook/code/renderers/react/dist + - storybook/code/renderers/react/node_modules + - storybook/code/renderers/server/dist + - storybook/code/renderers/server/node_modules + - storybook/code/renderers/svelte/dist + - storybook/code/renderers/svelte/node_modules + - storybook/code/renderers/vue3/dist + - storybook/code/renderers/vue3/node_modules + - storybook/code/renderers/web-components/dist + - storybook/code/renderers/web-components/node_modules + - storybook/.verdaccio-cache + - storybook/code/bench + root: /tmp check: description: check executor: @@ -354,8 +431,8 @@ jobs: - report-workflow-on-failure - store_test_results: path: storybook/test-results - unit-tests: - description: unit-tests + unit-tests-linux: + description: unit-tests-linux executor: name: sb_node_22_classic class: xlarge @@ -367,11 +444,9 @@ jobs: - restore_cache: keys: *a2 - run: - name: Run tests + command: yarn test + name: Run unit tests working_directory: code - command: |- - TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - store_test_results: path: storybook/test-results - run: @@ -423,108 +498,6 @@ jobs: command: yarn docs:prettier:check sandboxes: type: no-op - react-vite-default-ts--create: - description: react-vite/default-ts (create) - executor: - name: sb_node_22_browsers - class: large - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: *a2 - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Start Event Collector - working_directory: scripts - background: true - command: yarn jiti ./event-log-collector.ts - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - yarn wait-on tcp:127.0.0.1:6007 - - run: - name: Setup Corepack - command: |- - sudo corepack enable - which yarn - yarn --version - - run: - name: Create Sandboxes - command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - - store_artifacts: - path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log - destination: logs - - persist_to_workspace: - paths: - - storybook-sandboxes/react-vite-default-ts - root: /tmp - react-vite-default-ts--build: - description: react-vite/default-ts (build) - executor: - name: sb_playwright - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: *a2 - - run: - name: Build storybook - command: yarn task build --template react-vite/default-ts --no-link -s build - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-ts --no-link -s serve - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - react-vite-default-ts--dev: - description: react-vite/default-ts (dev) - executor: - class: xlarge - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: *a2 - - run: - name: Run storybook - working_directory: code - background: true - command: yarn task dev --template react-vite/default-ts --no-link -s dev - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:6006 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 workflows: docs: jobs: @@ -537,24 +510,18 @@ workflows: - package-benchmarks: requires: - build-linux - - unit-tests: + - unit-tests-linux: requires: - build-linux + - unit-tests-linux: + requires: + - build-windows - sandboxes: requires: - build-linux - ui: requires: - build-linux - - react-vite-default-ts--create: - requires: - - sandboxes - - react-vite-default-ts--build: - requires: - - react-vite-default-ts--create - - react-vite-default-ts--dev: - requires: - - react-vite-default-ts--create when: equal: - docs diff --git a/code/vitest.config.ts b/code/vitest.config.ts index 06602a33a802..1d9ada78d07f 100644 --- a/code/vitest.config.ts +++ b/code/vitest.config.ts @@ -10,6 +10,25 @@ import { coverageConfigDefaults, defineConfig } from 'vitest/config'; * @see .circleci/config.yml#L187 */ const threadCount = process.env.CI ? (process.platform === 'win32' ? 4 : 7) : undefined; +const shouldRunStorybookTests = !(process.env.CI && process.platform === 'win32'); + +const projects = [ + 'addons/*/vitest.config.ts', + 'frameworks/*/vitest.config.ts', + 'lib/*/vitest.config.ts', + 'core/vitest.config.ts', + 'builders/*/vitest.config.ts', + 'presets/*/vitest.config.ts', + 'renderers/*/vitest.config.ts', +]; + +/** + * On CI, we run ouw own unit tests, but for performance reasons, we don't install playwright, thus + * these tests, that need browser-mode cannot be run/added + */ +if (shouldRunStorybookTests) { + projects.push('vitest.config.storybook.ts'); +} export default defineConfig({ test: { @@ -19,16 +38,7 @@ export default defineConfig({ pool: 'threads', maxWorkers: threadCount, - projects: [ - 'vitest.config.storybook.ts', - 'addons/*/vitest.config.ts', - 'frameworks/*/vitest.config.ts', - 'lib/*/vitest.config.ts', - 'core/vitest.config.ts', - 'builders/*/vitest.config.ts', - 'presets/*/vitest.config.ts', - 'renderers/*/vitest.config.ts', - ], + projects, coverage: { provider: 'istanbul', diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 4121c5f76d90..28e20c9b72ef 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -395,25 +395,10 @@ const buildWindows = defineJob('build-windows', { shell: 'bash.exe', }, steps: [ - { - run: { - name: 'Install Node + Yarn', - shell: 'powershell.exe', - command: [ - '$nodeVersion = Get-Content .nvmrc | Select-Object -First 1', - 'nvm install $nodeVersion', - 'nvm use $nodeVersion', - 'corepack enable', - 'corepack prepare yarn@stable --activate', - ].join('\n'), - }, - }, - // node.install(), + node.installOnWindows(), git.checkout({ forceHttps: true }), npm.install('.'), cache.persist(CACHE_PATHS, CACHE_KEYS[0]), - git.check(), - npm.check(), { run: { command: 'yarn task --task compile --start-from=auto --no-link --debug', @@ -428,78 +413,19 @@ const buildWindows = defineJob('build-windows', { working_directory: `code`, }, }, - { - run: { - command: 'yarn test', - name: 'Run unit tests', - working_directory: `code`, - }, - }, - - // { - // run: { - // name: 'Checkout (shallow)', - // shell: 'bash.exe', - // command: [ - // `git init .`, - // `REPO_URL="\${CIRCLE_REPOSITORY_URL/git@github.com:/https://github.com/}"`, - // `git remote add origin "$REPO_URL"`, - // `git fetch --depth=1 origin "$CIRCLE_SHA1"`, - // `git checkout "$CIRCLE_SHA1"`, - // ].join('\n'), - // }, - // }, - // { - // run: { - // name: 'Setup Node & Yarn on Windows', - // shell: 'bash.exe', - // command: ` - // choco install nodejs-lts --version=22.11.0 -y - // corepack enable - // `, - // }, - // }, - // { - // run: { - // name: 'Install dependencies', - // shell: 'bash.exe', - // command: 'yarn install', - // }, - // }, - // cache.persist(CACHE_PATHS, CACHE_KEYS[0]), - // git.check(), - // npm.check(), - // { - // run: { - // command: 'yarn task --task compile --start-from=auto --no-link --debug', - // name: 'Compile', - // working_directory: `code`, - // shell: 'bash.exe', - // }, - // }, - // { - // run: { - // command: 'yarn local-registry --publish', - // name: 'Publish to Verdaccio', - // working_directory: `code`, - // shell: 'bash.exe', - // }, - // }, - // 'report-workflow-on-failure', - // artifact.persist(normalize(`code/bench/esbuild-metafiles`), 'bench'), - // workspace.persist([ - // ...glob - // .sync(['*/src', '*/*/src'], { - // cwd: join(dirname, '../../code'), - // onlyDirectories: true, - // }) - // .flatMap((p) => [ - // normalize(`${WORKING_DIR}/code/${p.replace('src', 'dist')}`), - // normalize(`${WORKING_DIR}/code/${p.replace('src', 'node_modules')}`), - // ]), - // normalize(`${WORKING_DIR}/.verdaccio-cache`), - // normalize(`${WORKING_DIR}/code/bench`), - // ]), + workspace.persist([ + ...glob + .sync(['*/src', '*/*/src'], { + cwd: join(dirname, '../../code'), + onlyDirectories: true, + }) + .flatMap((p) => [ + `${WORKING_DIR}/code/${p.replace('src', 'dist')}`, + `${WORKING_DIR}/code/${p.replace('src', 'node_modules')}`, + ]), + `${WORKING_DIR}/.verdaccio-cache`, + `${WORKING_DIR}/code/bench`, + ]), ], }); @@ -572,8 +498,8 @@ const check = defineJob( [buildLinux.id] ); -const unitTests = defineJob( - 'unit-tests', +const unitTestsLinux = defineJob( + 'unit-tests-linux', { executor: { name: 'sb_node_22_classic', @@ -603,6 +529,36 @@ const unitTests = defineJob( }, [buildLinux.id] ); +const unitTestsWindows = defineJob( + 'unit-tests-linux', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS), + { + run: { + command: 'yarn test', + name: 'Run unit tests', + working_directory: `code`, + }, + }, + { + store_test_results: { + path: `${WORKING_DIR}/test-results`, + }, + }, + git.check(), + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [buildWindows.id] +); const packageBenchmarks = defineJob( 'package-benchmarks', @@ -632,7 +588,7 @@ const packageBenchmarks = defineJob( const sandboxes = [ // - 'react-vite/default-ts', + // 'react-vite/default-ts', // 'react-vite/default-js', ].map(defineSandboxFlow); @@ -641,7 +597,8 @@ const jobs = { [buildWindows.id]: buildWindows.implementation, [check.id]: check.implementation, [uiTests.id]: uiTests.implementation, - [unitTests.id]: unitTests.implementation, + [unitTestsLinux.id]: unitTestsLinux.implementation, + [unitTestsWindows.id]: unitTestsWindows.implementation, [packageBenchmarks.id]: packageBenchmarks.implementation, 'pretty-docs': { executor: { @@ -722,8 +679,13 @@ const workflows = { }, }, { - [unitTests.id]: { - requires: unitTests.requires, + [unitTestsLinux.id]: { + requires: unitTestsLinux.requires, + }, + }, + { + [unitTestsWindows.id]: { + requires: unitTestsWindows.requires, }, }, { diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index a53b1ea7af2b..311625462dc2 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -3,18 +3,18 @@ export const WORKING_DIR = `storybook`; export const SANDBOX_DIR = `storybook-sandboxes`; export const workspace = { - attach: () => { + attach: (at = ROOT_DIR) => { return { attach_workspace: { - at: ROOT_DIR, + at, }, }; }, - persist: (paths: string[]) => { + persist: (paths: string[], root = ROOT_DIR) => { return { persist_to_workspace: { paths, - root: ROOT_DIR, + root, }, }; }, @@ -85,9 +85,19 @@ export const git = { }; export const node = { - install: () => { + installOnWindows: () => { return { - 'node/install': { 'install-yarn': true }, + run: { + name: 'Install Node + Yarn', + shell: 'powershell.exe', + command: [ + '$nodeVersion = Get-Content .nvmrc | Select-Object -First 1', + 'nvm install $nodeVersion', + 'nvm use $nodeVersion', + 'corepack enable', + 'corepack prepare yarn@stable --activate', + ].join('\n'), + }, }; }, }; From a2ca418a3f02cec4d0183a8d2cb634ad7b1b32a2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 15:09:58 +0100 Subject: [PATCH 145/310] Update CircleCI configuration: add Linux unit tests job and correct Windows job name for consistency --- .circleci/config.generated.yml | 27 ++++++++++++++++++++++++++- scripts/ci/data.ts | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 1f2d8e09e7e3..a8e4095d8b7d 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -433,6 +433,31 @@ jobs: path: storybook/test-results unit-tests-linux: description: unit-tests-linux + executor: + name: sb_node_22_classic + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: *a2 + - run: + name: Run tests + working_directory: code + command: |- + TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + - store_test_results: + path: storybook/test-results + - run: + name: Ensure no changes pending + command: git diff --exit-code + - report-workflow-on-failure + - cancel-workflow-on-failure + unit-tests-windows: + description: unit-tests-windows executor: name: sb_node_22_classic class: xlarge @@ -513,7 +538,7 @@ workflows: - unit-tests-linux: requires: - build-linux - - unit-tests-linux: + - unit-tests-windows: requires: - build-windows - sandboxes: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 28e20c9b72ef..287fbc235ddf 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -530,7 +530,7 @@ const unitTestsLinux = defineJob( [buildLinux.id] ); const unitTestsWindows = defineJob( - 'unit-tests-linux', + 'unit-tests-windows', { executor: { name: 'sb_node_22_classic', From 0b19e2ce0bf27d7d3c7fa189d5c5078bdc5a6528 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 15:23:46 +0100 Subject: [PATCH 146/310] Update CircleCI configuration: change workspace paths to use 'project' prefix and adjust Windows workspace attachment location --- .circleci/config.generated.yml | 172 ++++++++++++++++----------------- scripts/ci/data.ts | 31 +++--- 2 files changed, 103 insertions(+), 100 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index a8e4095d8b7d..8df6c14e658b 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -294,91 +294,91 @@ jobs: working_directory: code - persist_to_workspace: paths: - - storybook/code/core/dist - - storybook/code/core/node_modules - - storybook/code/addons/a11y/dist - - storybook/code/addons/a11y/node_modules - - storybook/code/addons/docs/dist - - storybook/code/addons/docs/node_modules - - storybook/code/addons/links/dist - - storybook/code/addons/links/node_modules - - storybook/code/addons/onboarding/dist - - storybook/code/addons/onboarding/node_modules - - storybook/code/addons/pseudo-states/dist - - storybook/code/addons/pseudo-states/node_modules - - storybook/code/addons/themes/dist - - storybook/code/addons/themes/node_modules - - storybook/code/addons/vitest/dist - - storybook/code/addons/vitest/node_modules - - storybook/code/builders/builder-vite/dist - - storybook/code/builders/builder-vite/node_modules - - storybook/code/builders/builder-webpack5/dist - - storybook/code/builders/builder-webpack5/node_modules - - storybook/code/frameworks/angular/dist - - storybook/code/frameworks/angular/node_modules - - storybook/code/frameworks/ember/dist - - storybook/code/frameworks/ember/node_modules - - storybook/code/frameworks/html-vite/dist - - storybook/code/frameworks/html-vite/node_modules - - storybook/code/frameworks/nextjs/dist - - storybook/code/frameworks/nextjs/node_modules - - storybook/code/frameworks/nextjs-vite/dist - - storybook/code/frameworks/nextjs-vite/node_modules - - storybook/code/frameworks/preact-vite/dist - - storybook/code/frameworks/preact-vite/node_modules - - storybook/code/frameworks/react-native-web-vite/dist - - storybook/code/frameworks/react-native-web-vite/node_modules - - storybook/code/frameworks/react-vite/dist - - storybook/code/frameworks/react-vite/node_modules - - storybook/code/frameworks/react-webpack5/dist - - storybook/code/frameworks/react-webpack5/node_modules - - storybook/code/frameworks/server-webpack5/dist - - storybook/code/frameworks/server-webpack5/node_modules - - storybook/code/frameworks/svelte-vite/dist - - storybook/code/frameworks/svelte-vite/node_modules - - storybook/code/frameworks/sveltekit/dist - - storybook/code/frameworks/sveltekit/node_modules - - storybook/code/frameworks/vue3-vite/dist - - storybook/code/frameworks/vue3-vite/node_modules - - storybook/code/frameworks/web-components-vite/dist - - storybook/code/frameworks/web-components-vite/node_modules - - storybook/code/lib/cli-storybook/dist - - storybook/code/lib/cli-storybook/node_modules - - storybook/code/lib/codemod/dist - - storybook/code/lib/codemod/node_modules - - storybook/code/lib/core-webpack/dist - - storybook/code/lib/core-webpack/node_modules - - storybook/code/lib/create-storybook/dist - - storybook/code/lib/create-storybook/node_modules - - storybook/code/lib/csf-plugin/dist - - storybook/code/lib/csf-plugin/node_modules - - storybook/code/lib/eslint-plugin/dist - - storybook/code/lib/eslint-plugin/node_modules - - storybook/code/lib/react-dom-shim/dist - - storybook/code/lib/react-dom-shim/node_modules - - storybook/code/presets/create-react-app/dist - - storybook/code/presets/create-react-app/node_modules - - storybook/code/presets/react-webpack/dist - - storybook/code/presets/react-webpack/node_modules - - storybook/code/presets/server-webpack/dist - - storybook/code/presets/server-webpack/node_modules - - storybook/code/renderers/html/dist - - storybook/code/renderers/html/node_modules - - storybook/code/renderers/preact/dist - - storybook/code/renderers/preact/node_modules - - storybook/code/renderers/react/dist - - storybook/code/renderers/react/node_modules - - storybook/code/renderers/server/dist - - storybook/code/renderers/server/node_modules - - storybook/code/renderers/svelte/dist - - storybook/code/renderers/svelte/node_modules - - storybook/code/renderers/vue3/dist - - storybook/code/renderers/vue3/node_modules - - storybook/code/renderers/web-components/dist - - storybook/code/renderers/web-components/node_modules - - storybook/.verdaccio-cache - - storybook/code/bench - root: /tmp + - project/code/core/dist + - project/code/core/node_modules + - project/code/addons/a11y/dist + - project/code/addons/a11y/node_modules + - project/code/addons/docs/dist + - project/code/addons/docs/node_modules + - project/code/addons/links/dist + - project/code/addons/links/node_modules + - project/code/addons/onboarding/dist + - project/code/addons/onboarding/node_modules + - project/code/addons/pseudo-states/dist + - project/code/addons/pseudo-states/node_modules + - project/code/addons/themes/dist + - project/code/addons/themes/node_modules + - project/code/addons/vitest/dist + - project/code/addons/vitest/node_modules + - project/code/builders/builder-vite/dist + - project/code/builders/builder-vite/node_modules + - project/code/builders/builder-webpack5/dist + - project/code/builders/builder-webpack5/node_modules + - project/code/frameworks/angular/dist + - project/code/frameworks/angular/node_modules + - project/code/frameworks/ember/dist + - project/code/frameworks/ember/node_modules + - project/code/frameworks/html-vite/dist + - project/code/frameworks/html-vite/node_modules + - project/code/frameworks/nextjs/dist + - project/code/frameworks/nextjs/node_modules + - project/code/frameworks/nextjs-vite/dist + - project/code/frameworks/nextjs-vite/node_modules + - project/code/frameworks/preact-vite/dist + - project/code/frameworks/preact-vite/node_modules + - project/code/frameworks/react-native-web-vite/dist + - project/code/frameworks/react-native-web-vite/node_modules + - project/code/frameworks/react-vite/dist + - project/code/frameworks/react-vite/node_modules + - project/code/frameworks/react-webpack5/dist + - project/code/frameworks/react-webpack5/node_modules + - project/code/frameworks/server-webpack5/dist + - project/code/frameworks/server-webpack5/node_modules + - project/code/frameworks/svelte-vite/dist + - project/code/frameworks/svelte-vite/node_modules + - project/code/frameworks/sveltekit/dist + - project/code/frameworks/sveltekit/node_modules + - project/code/frameworks/vue3-vite/dist + - project/code/frameworks/vue3-vite/node_modules + - project/code/frameworks/web-components-vite/dist + - project/code/frameworks/web-components-vite/node_modules + - project/code/lib/cli-storybook/dist + - project/code/lib/cli-storybook/node_modules + - project/code/lib/codemod/dist + - project/code/lib/codemod/node_modules + - project/code/lib/core-webpack/dist + - project/code/lib/core-webpack/node_modules + - project/code/lib/create-storybook/dist + - project/code/lib/create-storybook/node_modules + - project/code/lib/csf-plugin/dist + - project/code/lib/csf-plugin/node_modules + - project/code/lib/eslint-plugin/dist + - project/code/lib/eslint-plugin/node_modules + - project/code/lib/react-dom-shim/dist + - project/code/lib/react-dom-shim/node_modules + - project/code/presets/create-react-app/dist + - project/code/presets/create-react-app/node_modules + - project/code/presets/react-webpack/dist + - project/code/presets/react-webpack/node_modules + - project/code/presets/server-webpack/dist + - project/code/presets/server-webpack/node_modules + - project/code/renderers/html/dist + - project/code/renderers/html/node_modules + - project/code/renderers/preact/dist + - project/code/renderers/preact/node_modules + - project/code/renderers/react/dist + - project/code/renderers/react/node_modules + - project/code/renderers/server/dist + - project/code/renderers/server/node_modules + - project/code/renderers/svelte/dist + - project/code/renderers/svelte/node_modules + - project/code/renderers/vue3/dist + - project/code/renderers/vue3/node_modules + - project/code/renderers/web-components/dist + - project/code/renderers/web-components/node_modules + - project/.verdaccio-cache + - project/code/bench + root: C:\Users\circleci check: description: check executor: @@ -465,7 +465,7 @@ jobs: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - attach_workspace: - at: /tmp + at: C:\Users\circleci\workspace - restore_cache: keys: *a2 - run: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 287fbc235ddf..1fe4fd1cce19 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -413,19 +413,22 @@ const buildWindows = defineJob('build-windows', { working_directory: `code`, }, }, - workspace.persist([ - ...glob - .sync(['*/src', '*/*/src'], { - cwd: join(dirname, '../../code'), - onlyDirectories: true, - }) - .flatMap((p) => [ - `${WORKING_DIR}/code/${p.replace('src', 'dist')}`, - `${WORKING_DIR}/code/${p.replace('src', 'node_modules')}`, - ]), - `${WORKING_DIR}/.verdaccio-cache`, - `${WORKING_DIR}/code/bench`, - ]), + workspace.persist( + [ + ...glob + .sync(['*/src', '*/*/src'], { + cwd: join(dirname, '../../code'), + onlyDirectories: true, + }) + .flatMap((p) => [ + `project/code/${p.replace('src', 'dist')}`, + `project/code/${p.replace('src', 'node_modules')}`, + ]), + `project/.verdaccio-cache`, + `project/code/bench`, + ], + 'C:\\Users\\circleci' + ), ], }); @@ -538,7 +541,7 @@ const unitTestsWindows = defineJob( }, steps: [ git.checkout(), - workspace.attach(), + workspace.attach('C:\\Users\\circleci\\workspace'), cache.attach(CACHE_KEYS), { run: { From ccb72295a89282aa25d77258ef893e150161e5ae Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 15:39:00 +0100 Subject: [PATCH 147/310] Update CircleCI configuration: change executor class to 'medium+' and adjust workspace attachment path for Windows CI --- .circleci/config.generated.yml | 4 ++-- scripts/ci/data.ts | 44 +++++++++++++++++----------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 8df6c14e658b..61a978721de3 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -460,12 +460,12 @@ jobs: description: unit-tests-windows executor: name: sb_node_22_classic - class: xlarge + class: medium+ steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 - attach_workspace: - at: C:\Users\circleci\workspace + at: C:\Users\circleci - restore_cache: keys: *a2 - run: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 1fe4fd1cce19..3e012981c285 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -345,7 +345,7 @@ function defineSandboxFlow(name: K) { }; } -const buildLinux = defineJob('build-linux', { +const linux_build = defineJob('build-linux', { executor: { name: 'sb_node_22_classic', class: 'xlarge', @@ -388,7 +388,7 @@ const buildLinux = defineJob('build-linux', { ], }); -const buildWindows = defineJob('build-windows', { +const windows_build = defineJob('build-windows', { executor: { name: 'win/default', size: 'xlarge', @@ -465,7 +465,7 @@ const uiTests = defineJob( }, ], }, - [buildLinux.id] + [linux_build.id] ); const check = defineJob( @@ -498,10 +498,10 @@ const check = defineJob( 'cancel-workflow-on-failure', ], }, - [buildLinux.id] + [linux_build.id] ); -const unitTestsLinux = defineJob( +const linux_unitTests = defineJob( 'unit-tests-linux', { executor: { @@ -530,18 +530,18 @@ const unitTestsLinux = defineJob( 'cancel-workflow-on-failure', ], }, - [buildLinux.id] + [linux_build.id] ); -const unitTestsWindows = defineJob( +const windows_unitTests = defineJob( 'unit-tests-windows', { executor: { name: 'sb_node_22_classic', - class: 'xlarge', + class: 'medium+', }, steps: [ git.checkout(), - workspace.attach('C:\\Users\\circleci\\workspace'), + workspace.attach('C:\\Users\\circleci'), cache.attach(CACHE_KEYS), { run: { @@ -560,7 +560,7 @@ const unitTestsWindows = defineJob( 'cancel-workflow-on-failure', ], }, - [buildWindows.id] + [windows_build.id] ); const packageBenchmarks = defineJob( @@ -586,7 +586,7 @@ const packageBenchmarks = defineJob( }, ], }, - [buildLinux.id] + [linux_build.id] ); const sandboxes = [ @@ -596,12 +596,12 @@ const sandboxes = [ ].map(defineSandboxFlow); const jobs = { - [buildLinux.id]: buildLinux.implementation, - [buildWindows.id]: buildWindows.implementation, + [linux_build.id]: linux_build.implementation, + [windows_build.id]: windows_build.implementation, [check.id]: check.implementation, [uiTests.id]: uiTests.implementation, - [unitTestsLinux.id]: unitTestsLinux.implementation, - [unitTestsWindows.id]: unitTestsWindows.implementation, + [linux_unitTests.id]: linux_unitTests.implementation, + [windows_unitTests.id]: windows_unitTests.implementation, [packageBenchmarks.id]: packageBenchmarks.implementation, 'pretty-docs': { executor: { @@ -669,8 +669,8 @@ const workflows = { docs: { jobs: [ 'pretty-docs', - buildLinux.id, - buildWindows.id, + linux_build.id, + windows_build.id, { [check.id]: { requires: check.requires, @@ -682,18 +682,18 @@ const workflows = { }, }, { - [unitTestsLinux.id]: { - requires: unitTestsLinux.requires, + [linux_unitTests.id]: { + requires: linux_unitTests.requires, }, }, { - [unitTestsWindows.id]: { - requires: unitTestsWindows.requires, + [windows_unitTests.id]: { + requires: windows_unitTests.requires, }, }, { sandboxes: { - requires: [buildLinux.id], + requires: [linux_build.id], }, }, { From 8406832fda3c753f63ce5a8779605d511f000d8f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 15:51:39 +0100 Subject: [PATCH 148/310] Refactor CircleCI configuration: standardize cache keys for Linux and Windows environments, and streamline test result paths --- .circleci/config.generated.yml | 42 +++++++++++++++++++++++----------- scripts/ci/data.ts | 42 +++++++++++++++++----------------- 2 files changed, 50 insertions(+), 34 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 61a978721de3..5ee628313e32 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -153,7 +153,7 @@ jobs: - node_modules - code/node_modules - scripts/node_modules - key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Ensure no changes pending command: git diff --exit-code @@ -283,7 +283,7 @@ jobs: cache-only-lockfile: true - save_cache: paths: *a1 - key: darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile @@ -390,11 +390,11 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: &a2 - - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - darwin-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - darwin-node_modules/{{ checksum ".nvmrc" }} - - darwin-node_modules + keys: + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - linux-node_modules/{{ checksum ".nvmrc" }} + - linux-node_modules - run: name: TypeCheck code working_directory: code @@ -419,7 +419,11 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a2 + keys: + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - linux-node_modules/{{ checksum ".nvmrc" }} + - linux-node_modules - run: name: Build internal storybook command: yarn storybook:ui:build @@ -430,7 +434,7 @@ jobs: working_directory: code - report-workflow-on-failure - store_test_results: - path: storybook/test-results + path: test-results unit-tests-linux: description: unit-tests-linux executor: @@ -442,7 +446,11 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a2 + keys: + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - linux-node_modules/{{ checksum ".nvmrc" }} + - linux-node_modules - run: name: Run tests working_directory: code @@ -467,13 +475,17 @@ jobs: - attach_workspace: at: C:\Users\circleci - restore_cache: - keys: *a2 + keys: + - windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - windows-node_modules/{{ checksum ".nvmrc" }} + - windows-node_modules - run: command: yarn test name: Run unit tests working_directory: code - store_test_results: - path: storybook/test-results + path: test-results - run: name: Ensure no changes pending command: git diff --exit-code @@ -490,7 +502,11 @@ jobs: - attach_workspace: at: /tmp - restore_cache: - keys: *a2 + keys: + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - linux-node_modules/{{ checksum ".nvmrc" }} + - linux-node_modules - run: name: Verdaccio working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3e012981c285..91240bebfd2b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -19,15 +19,15 @@ import { workspace, } from './utils'; -const PLATFORM = os.platform(); -const CACHE_KEYS = [ - `${PLATFORM}-node_modules`, - '{{ checksum ".nvmrc" }}', - '{{ checksum ".yarnrc.yml" }}', - '{{ checksum "yarn.lock" }}', -].map((_, index, list) => { - return list.slice(0, list.length - index).join('/'); -}); +const CACHE_KEYS = (platform = 'linux') => + [ + `${platform}-node_modules`, + '{{ checksum ".nvmrc" }}', + '{{ checksum ".yarnrc.yml" }}', + '{{ checksum "yarn.lock" }}', + ].map((_, index, list) => { + return list.slice(0, list.length - index).join('/'); + }); const CACHE_PATHS = [ '.yarn/root-install-state.gz', 'node_modules', @@ -223,7 +223,7 @@ function defineSandboxFlow(name: K) { steps: [ git.checkout(), workspace.attach(), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS()), verdaccio.start(), { run: { @@ -271,7 +271,7 @@ function defineSandboxFlow(name: K) { steps: [ git.checkout(), workspace.attach(), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS()), { run: { name: 'Build storybook', @@ -309,7 +309,7 @@ function defineSandboxFlow(name: K) { steps: [ git.checkout(), workspace.attach(), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS()), { run: { name: 'Run storybook', @@ -353,7 +353,7 @@ const linux_build = defineJob('build-linux', { steps: [ git.checkout(), npm.install('.'), - cache.persist(CACHE_PATHS, CACHE_KEYS[0]), + cache.persist(CACHE_PATHS, CACHE_KEYS()[0]), git.check(), npm.check(), { @@ -398,7 +398,7 @@ const windows_build = defineJob('build-windows', { node.installOnWindows(), git.checkout({ forceHttps: true }), npm.install('.'), - cache.persist(CACHE_PATHS, CACHE_KEYS[0]), + cache.persist(CACHE_PATHS, CACHE_KEYS('windows')[0]), { run: { command: 'yarn task --task compile --start-from=auto --no-link --debug', @@ -442,7 +442,7 @@ const uiTests = defineJob( steps: [ git.checkout(), workspace.attach(), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS()), { run: { name: 'Build internal storybook', @@ -460,7 +460,7 @@ const uiTests = defineJob( 'report-workflow-on-failure', { store_test_results: { - path: `${WORKING_DIR}/test-results`, + path: `test-results`, }, }, ], @@ -478,7 +478,7 @@ const check = defineJob( steps: [ git.checkout(), workspace.attach(), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS()), { run: { name: 'TypeCheck code', @@ -511,7 +511,7 @@ const linux_unitTests = defineJob( steps: [ git.checkout(), workspace.attach(), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS()), { run: { name: 'Run tests', @@ -542,7 +542,7 @@ const windows_unitTests = defineJob( steps: [ git.checkout(), workspace.attach('C:\\Users\\circleci'), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS('windows')), { run: { command: 'yarn test', @@ -552,7 +552,7 @@ const windows_unitTests = defineJob( }, { store_test_results: { - path: `${WORKING_DIR}/test-results`, + path: `test-results`, }, }, git.check(), @@ -573,7 +573,7 @@ const packageBenchmarks = defineJob( steps: [ git.checkout(), workspace.attach(), - cache.attach(CACHE_KEYS), + cache.attach(CACHE_KEYS()), verdaccio.start(), server.wait([...verdaccio.ports]), { From 0b4c9ebc8906cc8d43cc599bdb002ec49cc9bdc7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 18:03:38 +0100 Subject: [PATCH 149/310] Update CircleCI configuration: standardize cache keys to include version prefix for both Linux and Windows environments, and modify Windows executor settings for improved compatibility --- .circleci/config.generated.yml | 60 ++++++++++++++++++++-------------- scripts/ci/data.ts | 20 ++++++++---- 2 files changed, 49 insertions(+), 31 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 5ee628313e32..a2f1590b8bf6 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -153,7 +153,7 @@ jobs: - node_modules - code/node_modules - scripts/node_modules - key: linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Ensure no changes pending command: git diff --exit-code @@ -283,7 +283,7 @@ jobs: cache-only-lockfile: true - save_cache: paths: *a1 - key: windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v1-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile @@ -391,10 +391,10 @@ jobs: at: /tmp - restore_cache: keys: - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - linux-node_modules/{{ checksum ".nvmrc" }} - - linux-node_modules + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules - run: name: TypeCheck code working_directory: code @@ -420,10 +420,10 @@ jobs: at: /tmp - restore_cache: keys: - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - linux-node_modules/{{ checksum ".nvmrc" }} - - linux-node_modules + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules - run: name: Build internal storybook command: yarn storybook:ui:build @@ -447,10 +447,10 @@ jobs: at: /tmp - restore_cache: keys: - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - linux-node_modules/{{ checksum ".nvmrc" }} - - linux-node_modules + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules - run: name: Run tests working_directory: code @@ -467,19 +467,29 @@ jobs: unit-tests-windows: description: unit-tests-windows executor: - name: sb_node_22_classic - class: medium+ + name: win/default + size: medium+ + shell: bash.exe steps: + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - attach_workspace: at: C:\Users\circleci - restore_cache: keys: - - windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - windows-node_modules/{{ checksum ".nvmrc" }} - - windows-node_modules + - v1-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-windows-node_modules/{{ checksum ".nvmrc" }} + - v1-windows-node_modules - run: command: yarn test name: Run unit tests @@ -503,10 +513,10 @@ jobs: at: /tmp - restore_cache: keys: - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - linux-node_modules/{{ checksum ".nvmrc" }} - - linux-node_modules + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules - run: name: Verdaccio working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 91240bebfd2b..9d2f72bb3e0b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1,4 +1,3 @@ -import os from 'node:os'; import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies @@ -21,7 +20,7 @@ import { const CACHE_KEYS = (platform = 'linux') => [ - `${platform}-node_modules`, + `v1-${platform}-node_modules`, '{{ checksum ".nvmrc" }}', '{{ checksum ".yarnrc.yml" }}', '{{ checksum "yarn.lock" }}', @@ -398,7 +397,14 @@ const windows_build = defineJob('build-windows', { node.installOnWindows(), git.checkout({ forceHttps: true }), npm.install('.'), - cache.persist(CACHE_PATHS, CACHE_KEYS('windows')[0]), + // Note: Windows cache warnings about "unknown file mode" for symlinks are harmless. + // Tar will skip symlinks it can't archive, but they'll be recreated on cache restore + // when yarn install runs. The cache will still work correctly for regular files. + cache.persist( + // CACHE_PATHS.map((path) => 'C:\\Users\\circleci\\project\\' + path), + CACHE_PATHS, + CACHE_KEYS('windows')[0] + ), { run: { command: 'yarn task --task compile --start-from=auto --no-link --debug', @@ -536,11 +542,13 @@ const windows_unitTests = defineJob( 'unit-tests-windows', { executor: { - name: 'sb_node_22_classic', - class: 'medium+', + name: 'win/default', + size: 'medium+', + shell: 'bash.exe', }, steps: [ - git.checkout(), + node.installOnWindows(), + git.checkout({ forceHttps: true }), workspace.attach('C:\\Users\\circleci'), cache.attach(CACHE_KEYS('windows')), { From f0cdaa0c9d8f067be1f97aa3d6219ba5a869d4e1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 18:08:18 +0100 Subject: [PATCH 150/310] Update CircleCI configuration: change Windows executor size from 'medium+' to 'medium' for optimized resource allocation --- scripts/ci/data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 9d2f72bb3e0b..73780eb3550a 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -543,7 +543,7 @@ const windows_unitTests = defineJob( { executor: { name: 'win/default', - size: 'medium+', + size: 'medium', shell: 'bash.exe', }, steps: [ From 6dc97e01fe65e467e282befaf6311022cfe8a63a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 18:16:57 +0100 Subject: [PATCH 151/310] Update CircleCI configuration: streamline git checkout steps by removing duplicate entries and ensure consistent use of HTTPS for repository access --- .circleci/config.generated.yml | 10 +++++----- scripts/ci/data.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index a2f1590b8bf6..d5c3eb4aeacd 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -266,6 +266,8 @@ jobs: size: xlarge shell: bash.exe steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - run: name: Install Node + Yarn shell: powershell.exe @@ -275,8 +277,6 @@ jobs: nvm use $nodeVersion corepack enable corepack prepare yarn@stable --activate - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - node/install-packages: app-dir: . pkg-manager: yarn @@ -468,9 +468,11 @@ jobs: description: unit-tests-windows executor: name: win/default - size: medium+ + size: medium shell: bash.exe steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - run: name: Install Node + Yarn shell: powershell.exe @@ -480,8 +482,6 @@ jobs: nvm use $nodeVersion corepack enable corepack prepare yarn@stable --activate - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - attach_workspace: at: C:\Users\circleci - restore_cache: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 73780eb3550a..de93245de11f 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -394,8 +394,8 @@ const windows_build = defineJob('build-windows', { shell: 'bash.exe', }, steps: [ - node.installOnWindows(), git.checkout({ forceHttps: true }), + node.installOnWindows(), npm.install('.'), // Note: Windows cache warnings about "unknown file mode" for symlinks are harmless. // Tar will skip symlinks it can't archive, but they'll be recreated on cache restore @@ -547,8 +547,8 @@ const windows_unitTests = defineJob( shell: 'bash.exe', }, steps: [ - node.installOnWindows(), git.checkout({ forceHttps: true }), + node.installOnWindows(), workspace.attach('C:\\Users\\circleci'), cache.attach(CACHE_KEYS('windows')), { From 5031a0db4ccc01f3faeaf4ba9eac1c98b6c16a7e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 3 Dec 2025 18:52:37 +0100 Subject: [PATCH 152/310] Update CircleCI configuration: simplify workspace paths and ensure consistent directory structure for Windows builds --- .circleci/config.generated.yml | 172 ++++++++++++++++----------------- scripts/ci/data.ts | 12 +-- 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index d5c3eb4aeacd..358a525c364f 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -294,91 +294,91 @@ jobs: working_directory: code - persist_to_workspace: paths: - - project/code/core/dist - - project/code/core/node_modules - - project/code/addons/a11y/dist - - project/code/addons/a11y/node_modules - - project/code/addons/docs/dist - - project/code/addons/docs/node_modules - - project/code/addons/links/dist - - project/code/addons/links/node_modules - - project/code/addons/onboarding/dist - - project/code/addons/onboarding/node_modules - - project/code/addons/pseudo-states/dist - - project/code/addons/pseudo-states/node_modules - - project/code/addons/themes/dist - - project/code/addons/themes/node_modules - - project/code/addons/vitest/dist - - project/code/addons/vitest/node_modules - - project/code/builders/builder-vite/dist - - project/code/builders/builder-vite/node_modules - - project/code/builders/builder-webpack5/dist - - project/code/builders/builder-webpack5/node_modules - - project/code/frameworks/angular/dist - - project/code/frameworks/angular/node_modules - - project/code/frameworks/ember/dist - - project/code/frameworks/ember/node_modules - - project/code/frameworks/html-vite/dist - - project/code/frameworks/html-vite/node_modules - - project/code/frameworks/nextjs/dist - - project/code/frameworks/nextjs/node_modules - - project/code/frameworks/nextjs-vite/dist - - project/code/frameworks/nextjs-vite/node_modules - - project/code/frameworks/preact-vite/dist - - project/code/frameworks/preact-vite/node_modules - - project/code/frameworks/react-native-web-vite/dist - - project/code/frameworks/react-native-web-vite/node_modules - - project/code/frameworks/react-vite/dist - - project/code/frameworks/react-vite/node_modules - - project/code/frameworks/react-webpack5/dist - - project/code/frameworks/react-webpack5/node_modules - - project/code/frameworks/server-webpack5/dist - - project/code/frameworks/server-webpack5/node_modules - - project/code/frameworks/svelte-vite/dist - - project/code/frameworks/svelte-vite/node_modules - - project/code/frameworks/sveltekit/dist - - project/code/frameworks/sveltekit/node_modules - - project/code/frameworks/vue3-vite/dist - - project/code/frameworks/vue3-vite/node_modules - - project/code/frameworks/web-components-vite/dist - - project/code/frameworks/web-components-vite/node_modules - - project/code/lib/cli-storybook/dist - - project/code/lib/cli-storybook/node_modules - - project/code/lib/codemod/dist - - project/code/lib/codemod/node_modules - - project/code/lib/core-webpack/dist - - project/code/lib/core-webpack/node_modules - - project/code/lib/create-storybook/dist - - project/code/lib/create-storybook/node_modules - - project/code/lib/csf-plugin/dist - - project/code/lib/csf-plugin/node_modules - - project/code/lib/eslint-plugin/dist - - project/code/lib/eslint-plugin/node_modules - - project/code/lib/react-dom-shim/dist - - project/code/lib/react-dom-shim/node_modules - - project/code/presets/create-react-app/dist - - project/code/presets/create-react-app/node_modules - - project/code/presets/react-webpack/dist - - project/code/presets/react-webpack/node_modules - - project/code/presets/server-webpack/dist - - project/code/presets/server-webpack/node_modules - - project/code/renderers/html/dist - - project/code/renderers/html/node_modules - - project/code/renderers/preact/dist - - project/code/renderers/preact/node_modules - - project/code/renderers/react/dist - - project/code/renderers/react/node_modules - - project/code/renderers/server/dist - - project/code/renderers/server/node_modules - - project/code/renderers/svelte/dist - - project/code/renderers/svelte/node_modules - - project/code/renderers/vue3/dist - - project/code/renderers/vue3/node_modules - - project/code/renderers/web-components/dist - - project/code/renderers/web-components/node_modules - - project/.verdaccio-cache - - project/code/bench - root: C:\Users\circleci + - code/core/dist + - code/core/node_modules + - code/addons/a11y/dist + - code/addons/a11y/node_modules + - code/addons/docs/dist + - code/addons/docs/node_modules + - code/addons/links/dist + - code/addons/links/node_modules + - code/addons/onboarding/dist + - code/addons/onboarding/node_modules + - code/addons/pseudo-states/dist + - code/addons/pseudo-states/node_modules + - code/addons/themes/dist + - code/addons/themes/node_modules + - code/addons/vitest/dist + - code/addons/vitest/node_modules + - code/builders/builder-vite/dist + - code/builders/builder-vite/node_modules + - code/builders/builder-webpack5/dist + - code/builders/builder-webpack5/node_modules + - code/frameworks/angular/dist + - code/frameworks/angular/node_modules + - code/frameworks/ember/dist + - code/frameworks/ember/node_modules + - code/frameworks/html-vite/dist + - code/frameworks/html-vite/node_modules + - code/frameworks/nextjs/dist + - code/frameworks/nextjs/node_modules + - code/frameworks/nextjs-vite/dist + - code/frameworks/nextjs-vite/node_modules + - code/frameworks/preact-vite/dist + - code/frameworks/preact-vite/node_modules + - code/frameworks/react-native-web-vite/dist + - code/frameworks/react-native-web-vite/node_modules + - code/frameworks/react-vite/dist + - code/frameworks/react-vite/node_modules + - code/frameworks/react-webpack5/dist + - code/frameworks/react-webpack5/node_modules + - code/frameworks/server-webpack5/dist + - code/frameworks/server-webpack5/node_modules + - code/frameworks/svelte-vite/dist + - code/frameworks/svelte-vite/node_modules + - code/frameworks/sveltekit/dist + - code/frameworks/sveltekit/node_modules + - code/frameworks/vue3-vite/dist + - code/frameworks/vue3-vite/node_modules + - code/frameworks/web-components-vite/dist + - code/frameworks/web-components-vite/node_modules + - code/lib/cli-storybook/dist + - code/lib/cli-storybook/node_modules + - code/lib/codemod/dist + - code/lib/codemod/node_modules + - code/lib/core-webpack/dist + - code/lib/core-webpack/node_modules + - code/lib/create-storybook/dist + - code/lib/create-storybook/node_modules + - code/lib/csf-plugin/dist + - code/lib/csf-plugin/node_modules + - code/lib/eslint-plugin/dist + - code/lib/eslint-plugin/node_modules + - code/lib/react-dom-shim/dist + - code/lib/react-dom-shim/node_modules + - code/presets/create-react-app/dist + - code/presets/create-react-app/node_modules + - code/presets/react-webpack/dist + - code/presets/react-webpack/node_modules + - code/presets/server-webpack/dist + - code/presets/server-webpack/node_modules + - code/renderers/html/dist + - code/renderers/html/node_modules + - code/renderers/preact/dist + - code/renderers/preact/node_modules + - code/renderers/react/dist + - code/renderers/react/node_modules + - code/renderers/server/dist + - code/renderers/server/node_modules + - code/renderers/svelte/dist + - code/renderers/svelte/node_modules + - code/renderers/vue3/dist + - code/renderers/vue3/node_modules + - code/renderers/web-components/dist + - code/renderers/web-components/node_modules + - .verdaccio-cache + - code/bench + root: C:\Users\circleci\project check: description: check executor: @@ -483,7 +483,7 @@ jobs: corepack enable corepack prepare yarn@stable --activate - attach_workspace: - at: C:\Users\circleci + at: C:\Users\circleci\project - restore_cache: keys: - v1-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index de93245de11f..71252ef9c658 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -427,13 +427,13 @@ const windows_build = defineJob('build-windows', { onlyDirectories: true, }) .flatMap((p) => [ - `project/code/${p.replace('src', 'dist')}`, - `project/code/${p.replace('src', 'node_modules')}`, + `code/${p.replace('src', 'dist')}`, + `code/${p.replace('src', 'node_modules')}`, ]), - `project/.verdaccio-cache`, - `project/code/bench`, + `.verdaccio-cache`, + `code/bench`, ], - 'C:\\Users\\circleci' + 'C:\\Users\\circleci\\project' ), ], }); @@ -549,7 +549,7 @@ const windows_unitTests = defineJob( steps: [ git.checkout({ forceHttps: true }), node.installOnWindows(), - workspace.attach('C:\\Users\\circleci'), + workspace.attach('C:\\Users\\circleci\\project'), cache.attach(CACHE_KEYS('windows')), { run: { From 233af6258757957d0753b9f31f181e2a73ba4a99 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 4 Dec 2025 15:43:14 +0100 Subject: [PATCH 153/310] Enhance CircleCI configuration: add jobs for creating, building, and developing React Vite sandboxes for both TypeScript and JavaScript templates, ensuring proper dependencies and workflow integration. --- .circleci/config.generated.yml | 248 ++++++++++++++++++++++++++++++++- scripts/ci/data.ts | 14 +- 2 files changed, 250 insertions(+), 12 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 358a525c364f..e75affb95e10 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -549,8 +549,236 @@ jobs: command: yarn docs:prettier:check sandboxes: type: no-op + react-vite-default-ts--create: + description: react-vite/default-ts (create) + executor: + name: sb_node_22_browsers + class: large + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Start Event Collector + working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + yarn wait-on tcp:127.0.0.1:6007 + - run: + name: Setup Corepack + command: |- + sudo corepack enable + which yarn + yarn --version + - run: + name: Create Sandboxes + command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log + - store_artifacts: + path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log + destination: logs + - persist_to_workspace: + paths: + - storybook-sandboxes/react-vite-default-ts + root: /tmp + react-vite-default-ts--build: + description: react-vite/default-ts (build) + executor: + name: sb_playwright + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules + - run: + name: Build storybook + command: yarn task build --template react-vite/default-ts --no-link -s build + - run: + name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-ts --no-link -s serve + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + react-vite-default-ts--dev: + description: react-vite/default-ts (dev) + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules + - run: + name: Run storybook + working_directory: code + background: true + command: yarn task dev --template react-vite/default-ts --no-link -s dev + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:6006 + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + react-vite-default-js--create: + description: react-vite/default-js (create) + executor: + name: sb_node_22_browsers + class: large + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Start Event Collector + working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + yarn wait-on tcp:127.0.0.1:6007 + - run: + name: Setup Corepack + command: |- + sudo corepack enable + which yarn + yarn --version + - run: + name: Create Sandboxes + command: yarn task sandbox --template react-vite/default-js --no-link -s sandbox --debug + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log + - store_artifacts: + path: /tmp/storybook-sandboxes/react-vite-default-js/debug-storybook.log + destination: logs + - persist_to_workspace: + paths: + - storybook-sandboxes/react-vite-default-js + root: /tmp + react-vite-default-js--build: + description: react-vite/default-js (build) + executor: + name: sb_playwright + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules + - run: + name: Build storybook + command: yarn task build --template react-vite/default-js --no-link -s build + - run: + name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-js --no-link -s serve + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 + react-vite-default-js--dev: + description: react-vite/default-js (dev) + executor: + class: xlarge + name: sb_playwright + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v1-linux-node_modules/{{ checksum ".nvmrc" }} + - v1-linux-node_modules + - run: + name: Run storybook + working_directory: code + background: true + command: yarn task dev --template react-vite/default-js --no-link -s dev + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:6006 + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 workflows: - docs: + generated: jobs: - pretty-docs - build-linux @@ -573,6 +801,24 @@ workflows: - ui: requires: - build-linux + - react-vite-default-ts--create: + requires: + - sandboxes + - react-vite-default-ts--build: + requires: + - react-vite-default-ts--create + - react-vite-default-ts--dev: + requires: + - react-vite-default-ts--create + - react-vite-default-js--create: + requires: + - sandboxes + - react-vite-default-js--build: + requires: + - react-vite-default-js--create + - react-vite-default-js--dev: + requires: + - react-vite-default-js--create when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 71252ef9c658..27c9fddee32e 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -599,8 +599,8 @@ const packageBenchmarks = defineJob( const sandboxes = [ // - // 'react-vite/default-ts', - // 'react-vite/default-js', + 'react-vite/default-ts', + 'react-vite/default-js', ].map(defineSandboxFlow); const jobs = { @@ -674,7 +674,7 @@ const parameters = { }; const workflows = { - docs: { + generated: { jobs: [ 'pretty-docs', linux_build.id, @@ -715,14 +715,6 @@ const workflows = { equal: ['docs', '<< pipeline.parameters.workflow >>'], }, }, - // windows: { - // jobs: [ - // 'pretty-docs', - // build.id, - // { - // [check.id]: { - // requires: check.requires, - // }, }; export const data = { From 17199e3f839c46dea3b5517a928a5bb44e71bb59 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 11:41:20 +0100 Subject: [PATCH 154/310] experiment with persisting more of yarn things, to try to get windows to persist/restore to a working setup from 1 job to another --- .circleci/config.generated.yml | 3 +++ scripts/ci/data.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index e75affb95e10..e71a7c046b6e 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -149,6 +149,9 @@ jobs: cache-only-lockfile: true - save_cache: paths: &a1 + - .yarn/cache + - .yarn/unplugged + - .yarn/build-state.yml - .yarn/root-install-state.gz - node_modules - code/node_modules diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 27c9fddee32e..458eb20cd6fc 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -28,6 +28,9 @@ const CACHE_KEYS = (platform = 'linux') => return list.slice(0, list.length - index).join('/'); }); const CACHE_PATHS = [ + '.yarn/cache', + '.yarn/unplugged', + '.yarn/build-state.yml', '.yarn/root-install-state.gz', 'node_modules', 'code/node_modules', From 749b0aedba839a3fa25d32db3a24cbf16241d096 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 12:51:47 +0100 Subject: [PATCH 155/310] Update CircleCI configuration: change cache keys from v1 to v2 for both Linux and Windows environments to improve cache management and consistency across jobs. --- .circleci/config.generated.yml | 92 +++++++++++++++++----------------- scripts/ci/data.ts | 2 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index e71a7c046b6e..49ef55d18d3a 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -156,7 +156,7 @@ jobs: - node_modules - code/node_modules - scripts/node_modules - key: v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Ensure no changes pending command: git diff --exit-code @@ -286,7 +286,7 @@ jobs: cache-only-lockfile: true - save_cache: paths: *a1 - key: v1-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: command: yarn task --task compile --start-from=auto --no-link --debug name: Compile @@ -394,10 +394,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: TypeCheck code working_directory: code @@ -423,10 +423,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Build internal storybook command: yarn storybook:ui:build @@ -450,10 +450,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Run tests working_directory: code @@ -489,10 +489,10 @@ jobs: at: C:\Users\circleci\project - restore_cache: keys: - - v1-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-windows-node_modules/{{ checksum ".nvmrc" }} - - v1-windows-node_modules + - v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-windows-node_modules/{{ checksum ".nvmrc" }} + - v2-windows-node_modules - run: command: yarn test name: Run unit tests @@ -516,10 +516,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Verdaccio working_directory: code @@ -564,10 +564,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Verdaccio working_directory: code @@ -616,10 +616,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Build storybook command: yarn task build --template react-vite/default-ts --no-link -s build @@ -648,10 +648,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Run storybook working_directory: code @@ -678,10 +678,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Verdaccio working_directory: code @@ -730,10 +730,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Build storybook command: yarn task build --template react-vite/default-js --no-link -s build @@ -762,10 +762,10 @@ jobs: at: /tmp - restore_cache: keys: - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v1-linux-node_modules/{{ checksum ".nvmrc" }} - - v1-linux-node_modules + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v2-linux-node_modules/{{ checksum ".nvmrc" }} + - v2-linux-node_modules - run: name: Run storybook working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 458eb20cd6fc..804e06efd2b0 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -20,7 +20,7 @@ import { const CACHE_KEYS = (platform = 'linux') => [ - `v1-${platform}-node_modules`, + `v2-${platform}-node_modules`, '{{ checksum ".nvmrc" }}', '{{ checksum ".yarnrc.yml" }}', '{{ checksum "yarn.lock" }}', From 005c7510f1896227c410cc07db9969bb8f54b692 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 12:52:24 +0100 Subject: [PATCH 156/310] Comment out default TypeScript and JavaScript sandboxes in CircleCI configuration for clarity and future reference. --- scripts/ci/data.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 804e06efd2b0..4a59d7a31f62 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -602,8 +602,8 @@ const packageBenchmarks = defineJob( const sandboxes = [ // - 'react-vite/default-ts', - 'react-vite/default-js', + // 'react-vite/default-ts', + // 'react-vite/default-js', ].map(defineSandboxFlow); const jobs = { From 26d14c56e52c696ca17fbf966d2103a387032ea3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 13:21:41 +0100 Subject: [PATCH 157/310] Add symlink conversion script and update CircleCI config to use it for Windows builds --- .circleci/config.generated.yml | 253 +-------------------------------- scripts/ci/data.ts | 10 +- scripts/ci/no-junctions.sh | 32 +++++ 3 files changed, 45 insertions(+), 250 deletions(-) create mode 100755 scripts/ci/no-junctions.sh diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 49ef55d18d3a..fab08dc39c44 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -284,17 +284,20 @@ jobs: app-dir: . pkg-manager: yarn cache-only-lockfile: true + - run: + name: Convert symlinks to real directories + command: ./scripts/ci/no-junctions.sh - save_cache: paths: *a1 key: v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: - command: yarn task --task compile --start-from=auto --no-link --debug name: Compile working_directory: code + command: yarn task --task compile --start-from=auto --no-link --debug - run: - command: yarn local-registry --publish name: Publish to Verdaccio working_directory: code + command: yarn local-registry --publish - persist_to_workspace: paths: - code/core/dist @@ -552,234 +555,6 @@ jobs: command: yarn docs:prettier:check sandboxes: type: no-op - react-vite-default-ts--create: - description: react-vite/default-ts (create) - executor: - name: sb_node_22_browsers - class: large - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Start Event Collector - working_directory: scripts - background: true - command: yarn jiti ./event-log-collector.ts - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - yarn wait-on tcp:127.0.0.1:6007 - - run: - name: Setup Corepack - command: |- - sudo corepack enable - which yarn - yarn --version - - run: - name: Create Sandboxes - command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - - store_artifacts: - path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log - destination: logs - - persist_to_workspace: - paths: - - storybook-sandboxes/react-vite-default-ts - root: /tmp - react-vite-default-ts--build: - description: react-vite/default-ts (build) - executor: - name: sb_playwright - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules - - run: - name: Build storybook - command: yarn task build --template react-vite/default-ts --no-link -s build - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-ts --no-link -s serve - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - react-vite-default-ts--dev: - description: react-vite/default-ts (dev) - executor: - class: xlarge - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules - - run: - name: Run storybook - working_directory: code - background: true - command: yarn task dev --template react-vite/default-ts --no-link -s dev - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:6006 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - react-vite-default-js--create: - description: react-vite/default-js (create) - executor: - name: sb_node_22_browsers - class: large - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Start Event Collector - working_directory: scripts - background: true - command: yarn jiti ./event-log-collector.ts - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - yarn wait-on tcp:127.0.0.1:6007 - - run: - name: Setup Corepack - command: |- - sudo corepack enable - which yarn - yarn --version - - run: - name: Create Sandboxes - command: yarn task sandbox --template react-vite/default-js --no-link -s sandbox --debug - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - - store_artifacts: - path: /tmp/storybook-sandboxes/react-vite-default-js/debug-storybook.log - destination: logs - - persist_to_workspace: - paths: - - storybook-sandboxes/react-vite-default-js - root: /tmp - react-vite-default-js--build: - description: react-vite/default-js (build) - executor: - name: sb_playwright - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules - - run: - name: Build storybook - command: yarn task build --template react-vite/default-js --no-link -s build - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-js --no-link -s serve - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 - react-vite-default-js--dev: - description: react-vite/default-js (dev) - executor: - class: xlarge - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules - - run: - name: Run storybook - working_directory: code - background: true - command: yarn task dev --template react-vite/default-js --no-link -s dev - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:6006 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-js --no-link -s never" --verbose --index=0 --total=1 workflows: generated: jobs: @@ -804,24 +579,6 @@ workflows: - ui: requires: - build-linux - - react-vite-default-ts--create: - requires: - - sandboxes - - react-vite-default-ts--build: - requires: - - react-vite-default-ts--create - - react-vite-default-ts--dev: - requires: - - react-vite-default-ts--create - - react-vite-default-js--create: - requires: - - sandboxes - - react-vite-default-js--build: - requires: - - react-vite-default-js--create - - react-vite-default-js--dev: - requires: - - react-vite-default-js--create when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 4a59d7a31f62..c9b1ef481e85 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -400,6 +400,12 @@ const windows_build = defineJob('build-windows', { git.checkout({ forceHttps: true }), node.installOnWindows(), npm.install('.'), + { + run: { + name: 'Convert symlinks to real directories', + command: './scripts/ci/no-junctions.sh', + }, + }, // Note: Windows cache warnings about "unknown file mode" for symlinks are harmless. // Tar will skip symlinks it can't archive, but they'll be recreated on cache restore // when yarn install runs. The cache will still work correctly for regular files. @@ -410,16 +416,16 @@ const windows_build = defineJob('build-windows', { ), { run: { - command: 'yarn task --task compile --start-from=auto --no-link --debug', name: 'Compile', working_directory: `code`, + command: 'yarn task --task compile --start-from=auto --no-link --debug', }, }, { run: { - command: 'yarn local-registry --publish', name: 'Publish to Verdaccio', working_directory: `code`, + command: 'yarn local-registry --publish', }, }, workspace.persist( diff --git a/scripts/ci/no-junctions.sh b/scripts/ci/no-junctions.sh new file mode 100755 index 000000000000..f3f6f43f2b19 --- /dev/null +++ b/scripts/ci/no-junctions.sh @@ -0,0 +1,32 @@ + +set -euo pipefail + +TARGET="${1:-node_modules}" + +echo "Converting symlinks/junctions inside: $TARGET" +echo + +find "$TARGET" -type l | while read -r link; do + # Resolve where the link points + realpath="$(readlink "$link")" + + echo "Processing link: $link" + echo " → points to: $realpath" + + # Create a temp directory to hold the copied contents + tmpdir="${link}.tmp" + + # Copy the real directory into temp + cp -R "$realpath" "$tmpdir" + + # Remove the symlink + rm "$link" + + # Move temp directory to the original symlink path + mv "$tmpdir" "$link" + + echo " ✓ Converted to real directory" + echo +done + +echo "All junctions/symlinks converted." \ No newline at end of file From e2e27d519e194c3b22acb64b7a1220fa2a8ef2f3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 14:12:33 +0100 Subject: [PATCH 158/310] Refactor CircleCI configuration: remove symlink conversion step and streamline compile command for Windows builds --- .circleci/config.generated.yml | 9 +++------ scripts/ci/data.ts | 21 +++++++++------------ 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index fab08dc39c44..4022861e0c3d 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -284,16 +284,13 @@ jobs: app-dir: . pkg-manager: yarn cache-only-lockfile: true - - run: - name: Convert symlinks to real directories - command: ./scripts/ci/no-junctions.sh - - save_cache: - paths: *a1 - key: v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Compile working_directory: code command: yarn task --task compile --start-from=auto --no-link --debug + - save_cache: + paths: *a1 + key: v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Publish to Verdaccio working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index c9b1ef481e85..1d9c12f3a597 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -400,27 +400,24 @@ const windows_build = defineJob('build-windows', { git.checkout({ forceHttps: true }), node.installOnWindows(), npm.install('.'), + // { + // run: { + // name: 'Convert symlinks to real directories', + // command: './scripts/ci/no-junctions.sh', + // }, + // }, { run: { - name: 'Convert symlinks to real directories', - command: './scripts/ci/no-junctions.sh', + name: 'Compile', + working_directory: `code`, + command: 'yarn task --task compile --start-from=auto --no-link --debug', }, }, - // Note: Windows cache warnings about "unknown file mode" for symlinks are harmless. - // Tar will skip symlinks it can't archive, but they'll be recreated on cache restore - // when yarn install runs. The cache will still work correctly for regular files. cache.persist( // CACHE_PATHS.map((path) => 'C:\\Users\\circleci\\project\\' + path), CACHE_PATHS, CACHE_KEYS('windows')[0] ), - { - run: { - name: 'Compile', - working_directory: `code`, - command: 'yarn task --task compile --start-from=auto --no-link --debug', - }, - }, { run: { name: 'Publish to Verdaccio', From ec543054a56b66eefc6e8c4e81592791259fd781 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 14:27:57 +0100 Subject: [PATCH 159/310] Update CircleCI configuration: change cache keys from v2 to v3 for both Linux and Windows environments to enhance cache management and consistency across jobs. --- .circleci/config.generated.yml | 44 +++++++++++++++++----------------- scripts/ci/data.ts | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 4022861e0c3d..2ea7f42696e5 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -156,7 +156,7 @@ jobs: - node_modules - code/node_modules - scripts/node_modules - key: v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Ensure no changes pending command: git diff --exit-code @@ -290,7 +290,7 @@ jobs: command: yarn task --task compile --start-from=auto --no-link --debug - save_cache: paths: *a1 - key: v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v3-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Publish to Verdaccio working_directory: code @@ -394,10 +394,10 @@ jobs: at: /tmp - restore_cache: keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }} + - v3-linux-node_modules - run: name: TypeCheck code working_directory: code @@ -423,10 +423,10 @@ jobs: at: /tmp - restore_cache: keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }} + - v3-linux-node_modules - run: name: Build internal storybook command: yarn storybook:ui:build @@ -450,10 +450,10 @@ jobs: at: /tmp - restore_cache: keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }} + - v3-linux-node_modules - run: name: Run tests working_directory: code @@ -489,10 +489,10 @@ jobs: at: C:\Users\circleci\project - restore_cache: keys: - - v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-windows-node_modules/{{ checksum ".nvmrc" }} - - v2-windows-node_modules + - v3-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v3-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v3-windows-node_modules/{{ checksum ".nvmrc" }} + - v3-windows-node_modules - run: command: yarn test name: Run unit tests @@ -516,10 +516,10 @@ jobs: at: /tmp - restore_cache: keys: - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v2-linux-node_modules/{{ checksum ".nvmrc" }} - - v2-linux-node_modules + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v3-linux-node_modules/{{ checksum ".nvmrc" }} + - v3-linux-node_modules - run: name: Verdaccio working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 1d9c12f3a597..4343604ca090 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -20,7 +20,7 @@ import { const CACHE_KEYS = (platform = 'linux') => [ - `v2-${platform}-node_modules`, + `v3-${platform}-node_modules`, '{{ checksum ".nvmrc" }}', '{{ checksum ".yarnrc.yml" }}', '{{ checksum "yarn.lock" }}', From db904ebaede72af9ad946251ed1c1fc2832e6d60 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 15:08:20 +0100 Subject: [PATCH 160/310] Add unlink script for Windows builds and update CircleCI configuration to use it, replacing the removed symlink conversion step. --- scripts/ci/data.ts | 13 +++--- scripts/ci/no-junctions.sh | 32 --------------- scripts/ci/unlink-windows.ts | 76 ++++++++++++++++++++++++++++++++++++ scripts/package.json | 1 + 4 files changed, 84 insertions(+), 38 deletions(-) delete mode 100755 scripts/ci/no-junctions.sh create mode 100644 scripts/ci/unlink-windows.ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 4343604ca090..009569e1dfd5 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -400,12 +400,6 @@ const windows_build = defineJob('build-windows', { git.checkout({ forceHttps: true }), node.installOnWindows(), npm.install('.'), - // { - // run: { - // name: 'Convert symlinks to real directories', - // command: './scripts/ci/no-junctions.sh', - // }, - // }, { run: { name: 'Compile', @@ -413,6 +407,13 @@ const windows_build = defineJob('build-windows', { command: 'yarn task --task compile --start-from=auto --no-link --debug', }, }, + { + run: { + name: 'Convert symlinks to real directories', + command: 'yarn windows:unlink', + working_directory: `scripts`, + }, + }, cache.persist( // CACHE_PATHS.map((path) => 'C:\\Users\\circleci\\project\\' + path), CACHE_PATHS, diff --git a/scripts/ci/no-junctions.sh b/scripts/ci/no-junctions.sh deleted file mode 100755 index f3f6f43f2b19..000000000000 --- a/scripts/ci/no-junctions.sh +++ /dev/null @@ -1,32 +0,0 @@ - -set -euo pipefail - -TARGET="${1:-node_modules}" - -echo "Converting symlinks/junctions inside: $TARGET" -echo - -find "$TARGET" -type l | while read -r link; do - # Resolve where the link points - realpath="$(readlink "$link")" - - echo "Processing link: $link" - echo " → points to: $realpath" - - # Create a temp directory to hold the copied contents - tmpdir="${link}.tmp" - - # Copy the real directory into temp - cp -R "$realpath" "$tmpdir" - - # Remove the symlink - rm "$link" - - # Move temp directory to the original symlink path - mv "$tmpdir" "$link" - - echo " ✓ Converted to real directory" - echo -done - -echo "All junctions/symlinks converted." \ No newline at end of file diff --git a/scripts/ci/unlink-windows.ts b/scripts/ci/unlink-windows.ts new file mode 100644 index 000000000000..6a0597314230 --- /dev/null +++ b/scripts/ci/unlink-windows.ts @@ -0,0 +1,76 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +import { getWorkspace } from '../utils/tools'; + +function copyRecursiveSync(src: string, dest: string) { + const exists = fs.existsSync(src); + const stats = exists && fs.statSync(src); + const isDirectory = exists && stats.isDirectory(); + + if (isDirectory) { + if (!fs.existsSync(dest)) { + fs.mkdirSync(dest); + } + fs.readdirSync(src).forEach((childItemName) => { + copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName)); + }); + } else if (exists) { + fs.copyFileSync(src, dest); + } +} + +async function fixCacheLinks() { + console.log('Starting dynamic retrieval of workspace packages...'); + + // 1. Get the list of packages + const packages = await getWorkspace(); + const nodeModulesBaseDir = path.resolve(import.meta.dirname, '..', '..', 'node_modules'); + + console.log(`Found ${packages.length} workspace packages to process.`); + + for (const pkg of packages) { + if (pkg.private) { + continue; + } + const packageName = pkg.name; + // pkg.path is the absolute path to the package directory (e.g., C:\Users\circleci\project\packages\my-package) + const sourcePath = pkg.path; + + // The link/junction location inside node_modules + const nodeModulesPath = path.join(nodeModulesBaseDir, packageName); + + if (fs.existsSync(nodeModulesPath)) { + console.log(`Processing: ${packageName}`); + + try { + // 2. Remove the existing link/junction in node_modules + // Use fs.rmSync to delete the directory (the link/junction) + fs.rmSync(nodeModulesPath, { recursive: true, force: true }); + + // 3. Copy the actual source package content into the node_modules location + if (fs.existsSync(sourcePath)) { + // Copy the source package directory into the node_modules directory + copyRecursiveSync(sourcePath, nodeModulesPath); + console.log(` -> Copied files from ${sourcePath} to ${nodeModulesPath}`); + } else { + console.warn( + ` -> WARNING: Source directory not found for ${packageName} at ${sourcePath}` + ); + } + } catch (e) { + console.error(`Error processing ${packageName}:`, e); + // Fail the build if a critical file operation fails + process.exit(1); + } + } + } + + console.log('Link conversion complete. node_modules is ready for caching.'); +} + +// Execute the async function +fixCacheLinks().catch((err) => { + console.error('An error occurred during link fixing:', err); + process.exit(1); +}); diff --git a/scripts/package.json b/scripts/package.json index 9ffa9aa632ec..ee08e8b7cf62 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -22,6 +22,7 @@ "local-registry": "jiti ./run-registry.ts", "prepare-sandbox": "jiti ./prepare-sandbox.ts", "publish": "jiti ./sandbox/publish.ts", + "windows:unlink": "jiti ./ci/unlink-windows.ts", "release:cancel-preparation-runs": "jiti ./release/cancel-preparation-runs.ts", "release:generate-pr-description": "jiti ./release/generate-pr-description.ts", "release:get-changelog-from-file": "jiti ./release/get-changelog-from-file.ts", From de76052fca757e8ac20c89c20c2d331ea4ba8f34 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 15:19:40 +0100 Subject: [PATCH 161/310] Update CircleCI configuration: change cache keys from v3 to v4 for Linux and Windows environments to improve cache management and consistency across jobs. --- .circleci/config.generated.yml | 48 ++++++++++++++++++---------------- scripts/ci/data.ts | 2 +- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 2ea7f42696e5..057a24d39a7f 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -156,7 +156,7 @@ jobs: - node_modules - code/node_modules - scripts/node_modules - key: v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Ensure no changes pending command: git diff --exit-code @@ -288,9 +288,13 @@ jobs: name: Compile working_directory: code command: yarn task --task compile --start-from=auto --no-link --debug + - run: + name: Convert symlinks to real directories + command: yarn windows:unlink + working_directory: scripts - save_cache: paths: *a1 - key: v3-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v4-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Publish to Verdaccio working_directory: code @@ -394,10 +398,10 @@ jobs: at: /tmp - restore_cache: keys: - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }} - - v3-linux-node_modules + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }} + - v4-linux-node_modules - run: name: TypeCheck code working_directory: code @@ -423,10 +427,10 @@ jobs: at: /tmp - restore_cache: keys: - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }} - - v3-linux-node_modules + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }} + - v4-linux-node_modules - run: name: Build internal storybook command: yarn storybook:ui:build @@ -450,10 +454,10 @@ jobs: at: /tmp - restore_cache: keys: - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }} - - v3-linux-node_modules + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }} + - v4-linux-node_modules - run: name: Run tests working_directory: code @@ -489,10 +493,10 @@ jobs: at: C:\Users\circleci\project - restore_cache: keys: - - v3-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v3-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v3-windows-node_modules/{{ checksum ".nvmrc" }} - - v3-windows-node_modules + - v4-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-windows-node_modules/{{ checksum ".nvmrc" }} + - v4-windows-node_modules - run: command: yarn test name: Run unit tests @@ -516,10 +520,10 @@ jobs: at: /tmp - restore_cache: keys: - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v3-linux-node_modules/{{ checksum ".nvmrc" }} - - v3-linux-node_modules + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }} + - v4-linux-node_modules - run: name: Verdaccio working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 009569e1dfd5..3f3f0953614e 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -20,7 +20,7 @@ import { const CACHE_KEYS = (platform = 'linux') => [ - `v3-${platform}-node_modules`, + `v4-${platform}-node_modules`, '{{ checksum ".nvmrc" }}', '{{ checksum ".yarnrc.yml" }}', '{{ checksum "yarn.lock" }}', From 97cd99d34859d6c05221f414bdbbc34aea3d696b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 5 Dec 2025 17:01:41 +0100 Subject: [PATCH 162/310] I tried removing the need for running yarn install in sub-jobs running on windows, but ultimately I must concede and conclude it's not possible. I'll move on for now. --- .circleci/config.generated.yml | 4 ++ scripts/ci/data.ts | 8 +++ scripts/ci/unlink-windows.ts | 118 ++++++++++++++++++--------------- 3 files changed, 75 insertions(+), 55 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 057a24d39a7f..fe35c1e039a4 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -497,6 +497,10 @@ jobs: - v4-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - v4-windows-node_modules/{{ checksum ".nvmrc" }} - v4-windows-node_modules + - node/install-packages: + app-dir: . + pkg-manager: yarn + cache-only-lockfile: true - run: command: yarn test name: Run unit tests diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3f3f0953614e..632243b590a5 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -558,6 +558,14 @@ const windows_unitTests = defineJob( node.installOnWindows(), workspace.attach('C:\\Users\\circleci\\project'), cache.attach(CACHE_KEYS('windows')), + /** + * I really wish this wasn't needed, but it is. I tried a lot of things to get it to not be + * needed, but ultimately, something kept failing. At this point I gave up: + * https://app.circleci.com/pipelines/github/storybookjs/storybook/110923/workflows/50076187-a5a7-4955-bff4-30bf9aec465c/jobs/976355 + * + * So if you see a way to debug/solve those failing tests, please do so. + */ + npm.install('.'), { run: { command: 'yarn test', diff --git a/scripts/ci/unlink-windows.ts b/scripts/ci/unlink-windows.ts index 6a0597314230..bbc941e4800b 100644 --- a/scripts/ci/unlink-windows.ts +++ b/scripts/ci/unlink-windows.ts @@ -3,6 +3,69 @@ import * as path from 'path'; import { getWorkspace } from '../utils/tools'; +/** + * This script converts symlinks/junctions in node_modules to real directories by copying the source + * package content into the node_modules location. + * + * Why this is needed: Cache persistence in Windows boxes on CircleCI fails to persist our monorepo + * node_modules/ folders because they are symlinks/junctions, and the zipping + * tool fails to handle them. In order to prevent having to run yarn install in every job running on + * Windows, and to have the same or similar-enough setup for cache across Linux/Windows, we need to + * convert the symlinks/junctions to real directories. This script does that. + * + * Note: This script has not fully eliminated the need to run yarn install in subsequent Windows + * jobs. We're keeping it in the hope that we'll eventually figure out what's wrong or missing from + * the cache persistence in Windows boxes on CircleCI, so we won't have to run yarn install in + * subsequent jobs running on Windows. + */ + +console.log('Starting dynamic retrieval of workspace packages...'); + +// 1. Get the list of packages +const packages = await getWorkspace(); +const nodeModulesBaseDir = path.resolve(import.meta.dirname, '..', '..', 'node_modules'); + +console.log(`Found ${packages.length} workspace packages to process.`); + +for (const pkg of packages) { + if (pkg.private) { + continue; + } + const packageName = pkg.name; + // pkg.path is the absolute path to the package directory (e.g., C:\Users\circleci\project\packages\my-package) + const sourcePath = pkg.path; + + // The link/junction location inside node_modules + const nodeModulesPath = path.join(nodeModulesBaseDir, packageName); + + if (fs.existsSync(nodeModulesPath)) { + console.log(`Processing: ${packageName}`); + + try { + // 2. Remove the existing link/junction in node_modules + // Use fs.rmSync to delete the directory (the link/junction) + fs.rmSync(nodeModulesPath, { recursive: true, force: true }); + + // 3. Copy the actual source package content into the node_modules location + if (fs.existsSync(sourcePath)) { + // Copy the source package directory into the node_modules directory + copyRecursiveSync(sourcePath, nodeModulesPath); + console.log(` -> Copied files from ${sourcePath} to ${nodeModulesPath}`); + } else { + console.warn( + ` -> WARNING: Source directory not found for ${packageName} at ${sourcePath}` + ); + } + } catch (e) { + console.error(`Error processing ${packageName}:`, e); + // Fail the build if a critical file operation fails + process.exit(1); + } + } +} + +console.log('Link conversion complete. node_modules is ready for caching.'); + function copyRecursiveSync(src: string, dest: string) { const exists = fs.existsSync(src); const stats = exists && fs.statSync(src); @@ -19,58 +82,3 @@ function copyRecursiveSync(src: string, dest: string) { fs.copyFileSync(src, dest); } } - -async function fixCacheLinks() { - console.log('Starting dynamic retrieval of workspace packages...'); - - // 1. Get the list of packages - const packages = await getWorkspace(); - const nodeModulesBaseDir = path.resolve(import.meta.dirname, '..', '..', 'node_modules'); - - console.log(`Found ${packages.length} workspace packages to process.`); - - for (const pkg of packages) { - if (pkg.private) { - continue; - } - const packageName = pkg.name; - // pkg.path is the absolute path to the package directory (e.g., C:\Users\circleci\project\packages\my-package) - const sourcePath = pkg.path; - - // The link/junction location inside node_modules - const nodeModulesPath = path.join(nodeModulesBaseDir, packageName); - - if (fs.existsSync(nodeModulesPath)) { - console.log(`Processing: ${packageName}`); - - try { - // 2. Remove the existing link/junction in node_modules - // Use fs.rmSync to delete the directory (the link/junction) - fs.rmSync(nodeModulesPath, { recursive: true, force: true }); - - // 3. Copy the actual source package content into the node_modules location - if (fs.existsSync(sourcePath)) { - // Copy the source package directory into the node_modules directory - copyRecursiveSync(sourcePath, nodeModulesPath); - console.log(` -> Copied files from ${sourcePath} to ${nodeModulesPath}`); - } else { - console.warn( - ` -> WARNING: Source directory not found for ${packageName} at ${sourcePath}` - ); - } - } catch (e) { - console.error(`Error processing ${packageName}:`, e); - // Fail the build if a critical file operation fails - process.exit(1); - } - } - } - - console.log('Link conversion complete. node_modules is ready for caching.'); -} - -// Execute the async function -fixCacheLinks().catch((err) => { - console.error('An error occurred during link fixing:', err); - process.exit(1); -}); From dfc1802e938426499af711105f6bbd582ad18d79 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 8 Dec 2025 13:50:47 +0100 Subject: [PATCH 163/310] Refactor CircleCI configuration for Windows build: comment out cache persist and attach, switch npm install to yarn install --- .circleci/config.generated.yml | 18 ++++-------------- scripts/ci/data.ts | 20 +++++++++++++------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index fe35c1e039a4..5d530e2f344a 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -148,7 +148,7 @@ jobs: pkg-manager: yarn cache-only-lockfile: true - save_cache: - paths: &a1 + paths: - .yarn/cache - .yarn/unplugged - .yarn/build-state.yml @@ -292,9 +292,6 @@ jobs: name: Convert symlinks to real directories command: yarn windows:unlink working_directory: scripts - - save_cache: - paths: *a1 - key: v4-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Publish to Verdaccio working_directory: code @@ -491,16 +488,9 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project - - restore_cache: - keys: - - v4-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-windows-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-windows-node_modules/{{ checksum ".nvmrc" }} - - v4-windows-node_modules - - node/install-packages: - app-dir: . - pkg-manager: yarn - cache-only-lockfile: true + - run: + command: yarn install + name: Install dependencies - run: command: yarn test name: Run unit tests diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 632243b590a5..45ccf3965a46 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -414,11 +414,11 @@ const windows_build = defineJob('build-windows', { working_directory: `scripts`, }, }, - cache.persist( - // CACHE_PATHS.map((path) => 'C:\\Users\\circleci\\project\\' + path), - CACHE_PATHS, - CACHE_KEYS('windows')[0] - ), + // cache.persist( + // // CACHE_PATHS.map((path) => 'C:\\Users\\circleci\\project\\' + path), + // CACHE_PATHS, + // CACHE_KEYS('windows')[0] + // ), { run: { name: 'Publish to Verdaccio', @@ -557,7 +557,7 @@ const windows_unitTests = defineJob( git.checkout({ forceHttps: true }), node.installOnWindows(), workspace.attach('C:\\Users\\circleci\\project'), - cache.attach(CACHE_KEYS('windows')), + // cache.attach(CACHE_KEYS('windows')), /** * I really wish this wasn't needed, but it is. I tried a lot of things to get it to not be * needed, but ultimately, something kept failing. At this point I gave up: @@ -565,7 +565,13 @@ const windows_unitTests = defineJob( * * So if you see a way to debug/solve those failing tests, please do so. */ - npm.install('.'), + // npm.install('.'), + { + run: { + command: 'yarn install', + name: 'Install dependencies', + }, + }, { run: { command: 'yarn test', From f7be30ead3141209dc0d72c3bcecca6dfb8d4c56 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 8 Dec 2025 15:10:26 +0100 Subject: [PATCH 164/310] Enhance CircleCI configuration for Windows: add sandbox creation, build, and dev jobs; refactor Linux sandbox flow; remove unnecessary symlink conversion step. --- .circleci/config.generated.yml | 137 +++++++++++++++++-- scripts/ci/data.ts | 242 +++++++++++++++++++++++++++++---- 2 files changed, 342 insertions(+), 37 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 5d530e2f344a..10e8f228aa9b 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -288,10 +288,6 @@ jobs: name: Compile working_directory: code command: yarn task --task compile --start-from=auto --no-link --debug - - run: - name: Convert symlinks to real directories - command: yarn windows:unlink - working_directory: scripts - run: name: Publish to Verdaccio working_directory: code @@ -495,13 +491,6 @@ jobs: command: yarn test name: Run unit tests working_directory: code - - store_test_results: - path: test-results - - run: - name: Ensure no changes pending - command: git diff --exit-code - - report-workflow-on-failure - - cancel-workflow-on-failure package-benchmarks: description: package-benchmarks executor: @@ -548,8 +537,118 @@ jobs: name: Prettier working_directory: scripts command: yarn docs:prettier:check - sandboxes: + linux_sandboxes: type: no-op + windows_sandboxes: + type: no-op + react-vite-default-ts--create---windows: + description: react-vite/default-ts (create) (windows) + executor: + name: win/default + size: large + shell: bash.exe + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: C:\Users\circleci\project + - run: + name: install dependencies + command: yarn install + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Start Event Collector + working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + yarn wait-on tcp:127.0.0.1:6007 + - run: + name: Create Sandboxes + command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log + - store_artifacts: + path: C:\Users\circleci\storybook-sandboxes/react-vite-default-ts/debug-storybook.log + destination: logs + - persist_to_workspace: + paths: + - storybook-sandboxes/react-vite-default-ts + root: C:\Users\circleci + react-vite-default-ts--build---windows: + description: react-vite/default-ts (build) (windows) + executor: + name: win/default + size: xlarge + shell: bash.exe + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: C:\Users\circleci\project + - run: + name: install dependencies + command: yarn install + - run: + name: Build storybook + command: yarn task build --template react-vite/default-ts --no-link -s build + - run: + name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-ts --no-link -s serve + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 + - run: + name: install playwright + command: yarn playwright install chromium --with-deps + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + react-vite-default-ts--dev---windows: + description: react-vite/default-ts (dev) (windows) + executor: + name: win/default + size: xlarge + shell: bash.exe + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: C:\Users\circleci\project + - run: + name: install dependencies + command: yarn install + - run: + name: Run storybook + working_directory: code + background: true + command: yarn task dev --template react-vite/default-ts --no-link -s dev + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:6006 + - run: + name: install playwright + command: yarn playwright install chromium --with-deps + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 workflows: generated: jobs: @@ -568,12 +667,24 @@ workflows: - unit-tests-windows: requires: - build-windows - - sandboxes: + - linux_sandboxes: requires: - build-linux + - windows_sandboxes: + requires: + - build-windows - ui: requires: - build-linux + - react-vite-default-ts--create---windows: + requires: + - windows_sandboxes + - react-vite-default-ts--build---windows: + requires: + - react-vite-default-ts--create---windows + - react-vite-default-ts--dev---windows: + requires: + - react-vite-default-ts--create---windows when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 45ccf3965a46..5ee550251fdc 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -202,7 +202,7 @@ function defineJob( }; } -function defineSandboxFlow(name: K) { +function defineSandboxFlowLinux(name: K) { const id = toId(name); const names = { create: `${name} (create)`, @@ -261,7 +261,7 @@ function defineSandboxFlow(name: K) { workspace.persist([`${SANDBOX_DIR}/${id}`]), ], }, - ['sandboxes'] + ['linux_sandboxes'] ), defineJob( names.build, @@ -347,6 +347,184 @@ function defineSandboxFlow(name: K) { }; } +function defineSandboxFlowWindows(name: K) { + const id = toId(name); + const names = { + create: `${name} (create) (windows)`, + build: `${name} (build) (windows)`, + dev: `${name} (dev) (windows)`, + }; + const ids = { + create: `${toId(names.create)}`, + build: `${toId(names.build)}`, + dev: `${toId(names.dev)}`, + }; + const jobs = [ + defineJob( + names.create, + { + executor: { + name: 'win/default', + size: 'large', + shell: 'bash.exe', + }, + steps: [ + git.checkout(), + workspace.attach('C:\\Users\\circleci\\project'), + // cache.attach(CACHE_KEYS()), + { + run: { + name: 'install dependencies', + command: 'yarn install', + }, + }, + verdaccio.start(), + { + run: { + name: 'Start Event Collector', + working_directory: `scripts`, + background: true, + command: 'yarn jiti ./event-log-collector.ts', + }, + }, + server.wait([...verdaccio.ports, '6007']), + // { + // run: { + // name: 'Setup Corepack', + // command: [ + // // + // 'sudo corepack enable', + // 'which yarn', + // 'yarn --version', + // ].join('\n'), + // }, + // }, + { + run: { + name: 'Create Sandboxes', + command: `yarn task sandbox --template ${name} --no-link -s sandbox --debug`, + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', + }, + }, + }, + artifact.persist(`C:\\Users\\circleci\\${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), + workspace.persist([`${SANDBOX_DIR}/${id}`], 'C:\\Users\\circleci'), + ], + }, + ['windows_sandboxes'] + ), + defineJob( + names.build, + { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + git.checkout(), + workspace.attach('C:\\Users\\circleci\\project'), + // cache.attach(CACHE_KEYS()), + { + run: { + name: 'install dependencies', + command: 'yarn install', + }, + }, + { + run: { + name: 'Build storybook', + command: `yarn task build --template ${name} --no-link -s build`, + }, + }, + { + run: { + name: 'Serve storybook', + background: true, + command: `yarn task serve --template ${name} --no-link -s serve`, + }, + }, + server.wait(['8001']), + { + run: { + name: 'install playwright', + command: 'yarn playwright install chromium --with-deps', + }, + }, + { + run: { + name: 'Running E2E Tests', + command: [ + `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s never" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + ], + }, + [ids.create] + ), + defineJob( + names.dev, + { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + git.checkout(), + workspace.attach('C:\\Users\\circleci\\project'), + // cache.attach(CACHE_KEYS()), + { + run: { + name: 'install dependencies', + command: 'yarn install', + }, + }, + { + run: { + name: 'Run storybook', + working_directory: 'code', + background: true, + command: `yarn task dev --template ${name} --no-link -s dev`, + }, + }, + server.wait(['6006']), + { + run: { + name: 'install playwright', + command: 'yarn playwright install chromium --with-deps', + }, + }, + { + run: { + name: 'Running E2E Tests', + command: [ + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${name} --no-link -s never" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + ], + }, + [ids.create] + ), + ]; + return { + jobs, + workflow: jobs.map((job) => { + return { + [job.id]: { + requires: job.requires, + }, + }; + }), + }; +} + const linux_build = defineJob('build-linux', { executor: { name: 'sb_node_22_classic', @@ -407,13 +585,13 @@ const windows_build = defineJob('build-windows', { command: 'yarn task --task compile --start-from=auto --no-link --debug', }, }, - { - run: { - name: 'Convert symlinks to real directories', - command: 'yarn windows:unlink', - working_directory: `scripts`, - }, - }, + // { + // run: { + // name: 'Convert symlinks to real directories', + // command: 'yarn windows:unlink', + // working_directory: `scripts`, + // }, + // }, // cache.persist( // // CACHE_PATHS.map((path) => 'C:\\Users\\circleci\\project\\' + path), // CACHE_PATHS, @@ -565,7 +743,6 @@ const windows_unitTests = defineJob( * * So if you see a way to debug/solve those failing tests, please do so. */ - // npm.install('.'), { run: { command: 'yarn install', @@ -579,14 +756,6 @@ const windows_unitTests = defineJob( working_directory: `code`, }, }, - { - store_test_results: { - path: `test-results`, - }, - }, - git.check(), - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', ], }, [windows_build.id] @@ -618,11 +787,17 @@ const packageBenchmarks = defineJob( [linux_build.id] ); -const sandboxes = [ +const linux_sandboxes = [ // // 'react-vite/default-ts', // 'react-vite/default-js', -].map(defineSandboxFlow); +].map(defineSandboxFlowLinux); + +const windows_sandboxes = [ + // + 'react-vite/default-ts', + // 'react-vite/default-js', +].map(defineSandboxFlowWindows); const jobs = { [linux_build.id]: linux_build.implementation, @@ -650,10 +825,23 @@ const jobs = { ], }, - sandboxes: { + linux_sandboxes: { + type: 'no-op', + }, + windows_sandboxes: { type: 'no-op', }, - ...sandboxes.reduce( + ...linux_sandboxes.reduce( + (acc, sandbox) => { + for (const job of sandbox.jobs) { + acc[job.id] = job.implementation; + } + + return acc; + }, + {} as Record + ), + ...windows_sandboxes.reduce( (acc, sandbox) => { for (const job of sandbox.jobs) { acc[job.id] = job.implementation; @@ -721,16 +909,22 @@ const workflows = { }, }, { - sandboxes: { + linux_sandboxes: { requires: [linux_build.id], }, }, + { + windows_sandboxes: { + requires: [windows_build.id], + }, + }, { [uiTests.id]: { requires: uiTests.requires, }, }, - ...sandboxes.flatMap((sandbox) => sandbox.workflow), + ...linux_sandboxes.flatMap((sandbox) => sandbox.workflow), + ...windows_sandboxes.flatMap((sandbox) => sandbox.workflow), ], when: { equal: ['docs', '<< pipeline.parameters.workflow >>'], From 1a81a9dba65862bf3229dfdef1ddfdd82d3ea2e0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 8 Dec 2025 15:33:15 +0100 Subject: [PATCH 165/310] Update CircleCI configuration for Windows: enforce HTTPS during git checkout in sandbox flow --- .circleci/config.generated.yml | 6 +++--- scripts/ci/data.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 10e8f228aa9b..30c0ab4348db 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -549,7 +549,7 @@ jobs: shell: bash.exe steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - attach_workspace: at: C:\Users\circleci\project - run: @@ -593,7 +593,7 @@ jobs: shell: bash.exe steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - attach_workspace: at: C:\Users\circleci\project - run: @@ -626,7 +626,7 @@ jobs: shell: bash.exe steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - attach_workspace: at: C:\Users\circleci\project - run: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 5ee550251fdc..3dba5b49b267 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -369,7 +369,7 @@ function defineSandboxFlowWindows(name: K) { shell: 'bash.exe', }, steps: [ - git.checkout(), + git.checkout({ forceHttps: true }), workspace.attach('C:\\Users\\circleci\\project'), // cache.attach(CACHE_KEYS()), { @@ -424,7 +424,7 @@ function defineSandboxFlowWindows(name: K) { shell: 'bash.exe', }, steps: [ - git.checkout(), + git.checkout({ forceHttps: true }), workspace.attach('C:\\Users\\circleci\\project'), // cache.attach(CACHE_KEYS()), { @@ -475,7 +475,7 @@ function defineSandboxFlowWindows(name: K) { shell: 'bash.exe', }, steps: [ - git.checkout(), + git.checkout({ forceHttps: true }), workspace.attach('C:\\Users\\circleci\\project'), // cache.attach(CACHE_KEYS()), { From 94b2e248aedbf4da69875a192c12843562d2359f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 8 Dec 2025 15:51:01 +0100 Subject: [PATCH 166/310] Enhance CircleCI configuration for Windows: add Node and Yarn installation steps in the CI pipeline --- .circleci/config.generated.yml | 27 +++++++++++++++++++++++++++ scripts/ci/data.ts | 3 +++ 2 files changed, 30 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 30c0ab4348db..6c65bf0b1bb5 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -550,6 +550,15 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project - run: @@ -594,6 +603,15 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project - run: @@ -627,6 +645,15 @@ jobs: steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project - run: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3dba5b49b267..e50b148780f2 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -370,6 +370,7 @@ function defineSandboxFlowWindows(name: K) { }, steps: [ git.checkout({ forceHttps: true }), + node.installOnWindows(), workspace.attach('C:\\Users\\circleci\\project'), // cache.attach(CACHE_KEYS()), { @@ -425,6 +426,7 @@ function defineSandboxFlowWindows(name: K) { }, steps: [ git.checkout({ forceHttps: true }), + node.installOnWindows(), workspace.attach('C:\\Users\\circleci\\project'), // cache.attach(CACHE_KEYS()), { @@ -476,6 +478,7 @@ function defineSandboxFlowWindows(name: K) { }, steps: [ git.checkout({ forceHttps: true }), + node.installOnWindows(), workspace.attach('C:\\Users\\circleci\\project'), // cache.attach(CACHE_KEYS()), { From f7200aa2ff26f8a13afa7c908d1664b0048cc9aa Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 8 Dec 2025 16:35:34 +0100 Subject: [PATCH 167/310] Refactor CircleCI configuration: consolidate Windows sandbox jobs, enhance dependency installation steps, and streamline job definitions for improved clarity and maintainability. --- .circleci/config.generated.yml | 154 ++++++++++--------- scripts/ci/data.ts | 270 ++++++++------------------------- 2 files changed, 143 insertions(+), 281 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 6c65bf0b1bb5..660171a26468 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -522,6 +522,29 @@ jobs: name: Benchmarking packages against base branch command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload working_directory: scripts + windows-sandbox-build: + description: windows-sandbox-build + executor: + name: win/default + size: xlarge + shell: bash.exe + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate + - attach_workspace: + at: C:\Users\circleci\project + - run: + name: Install dependencies + command: yarn install pretty-docs: executor: name: sb_node_22_classic @@ -537,33 +560,24 @@ jobs: name: Prettier working_directory: scripts command: yarn docs:prettier:check - linux_sandboxes: - type: no-op - windows_sandboxes: + sandboxes: type: no-op - react-vite-default-ts--create---windows: - description: react-vite/default-ts (create) (windows) + react-vite-default-ts--create: + description: react-vite/default-ts (create) executor: - name: win/default - size: large - shell: bash.exe + name: sb_node_22_browsers + class: large steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate + clone_options: --depth 1 - attach_workspace: - at: C:\Users\circleci\project - - run: - name: install dependencies - command: yarn install + at: /tmp + - restore_cache: + keys: + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }} + - v4-linux-node_modules - run: name: Verdaccio working_directory: code @@ -581,6 +595,12 @@ jobs: yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 yarn wait-on tcp:127.0.0.1:6007 + - run: + name: Setup Corepack + command: |- + sudo corepack enable + which yarn + yarn --version - run: name: Create Sandboxes command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug @@ -588,35 +608,28 @@ jobs: STORYBOOK_TELEMETRY_DEBUG: 1 STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - store_artifacts: - path: C:\Users\circleci\storybook-sandboxes/react-vite-default-ts/debug-storybook.log + path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log destination: logs - persist_to_workspace: paths: - storybook-sandboxes/react-vite-default-ts - root: C:\Users\circleci - react-vite-default-ts--build---windows: - description: react-vite/default-ts (build) (windows) + root: /tmp + react-vite-default-ts--build: + description: react-vite/default-ts (build) executor: - name: win/default - size: xlarge - shell: bash.exe + name: sb_playwright + class: xlarge steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate + clone_options: --depth 1 - attach_workspace: - at: C:\Users\circleci\project - - run: - name: install dependencies - command: yarn install + at: /tmp + - restore_cache: + keys: + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }} + - v4-linux-node_modules - run: name: Build storybook command: yarn task build --template react-vite/default-ts --no-link -s build @@ -628,37 +641,27 @@ jobs: name: Wait on servers working_directory: code command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: install playwright - command: yarn playwright install chromium --with-deps - run: name: Running E2E Tests command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - react-vite-default-ts--dev---windows: - description: react-vite/default-ts (dev) (windows) + react-vite-default-ts--dev: + description: react-vite/default-ts (dev) executor: - name: win/default - size: xlarge - shell: bash.exe + class: xlarge + name: sb_playwright steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate + clone_options: --depth 1 - attach_workspace: - at: C:\Users\circleci\project - - run: - name: install dependencies - command: yarn install + at: /tmp + - restore_cache: + keys: + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v4-linux-node_modules/{{ checksum ".nvmrc" }} + - v4-linux-node_modules - run: name: Run storybook working_directory: code @@ -668,9 +671,6 @@ jobs: name: Wait on servers working_directory: code command: yarn wait-on tcp:127.0.0.1:6006 - - run: - name: install playwright - command: yarn playwright install chromium --with-deps - run: name: Running E2E Tests command: |- @@ -703,15 +703,21 @@ workflows: - ui: requires: - build-linux - - react-vite-default-ts--create---windows: + - react-vite-default-ts--create: + requires: + - linux_sandboxes + - react-vite-default-ts--build: + requires: + - react-vite-default-ts--create + - react-vite-default-ts--dev: requires: - - windows_sandboxes - - react-vite-default-ts--build---windows: + - react-vite-default-ts--create + - windows-sandbox-dev: requires: - - react-vite-default-ts--create---windows - - react-vite-default-ts--dev---windows: + - react-vite-default-ts--create + - windows-sandbox-build: requires: - - react-vite-default-ts--create---windows + - react-vite-default-ts--create when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index e50b148780f2..c7919de1b0c9 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -202,7 +202,7 @@ function defineJob( }; } -function defineSandboxFlowLinux(name: K) { +function defineSandboxFlow(name: K) { const id = toId(name); const names = { create: `${name} (create)`, @@ -347,187 +347,6 @@ function defineSandboxFlowLinux(name: K) { }; } -function defineSandboxFlowWindows(name: K) { - const id = toId(name); - const names = { - create: `${name} (create) (windows)`, - build: `${name} (build) (windows)`, - dev: `${name} (dev) (windows)`, - }; - const ids = { - create: `${toId(names.create)}`, - build: `${toId(names.build)}`, - dev: `${toId(names.dev)}`, - }; - const jobs = [ - defineJob( - names.create, - { - executor: { - name: 'win/default', - size: 'large', - shell: 'bash.exe', - }, - steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - workspace.attach('C:\\Users\\circleci\\project'), - // cache.attach(CACHE_KEYS()), - { - run: { - name: 'install dependencies', - command: 'yarn install', - }, - }, - verdaccio.start(), - { - run: { - name: 'Start Event Collector', - working_directory: `scripts`, - background: true, - command: 'yarn jiti ./event-log-collector.ts', - }, - }, - server.wait([...verdaccio.ports, '6007']), - // { - // run: { - // name: 'Setup Corepack', - // command: [ - // // - // 'sudo corepack enable', - // 'which yarn', - // 'yarn --version', - // ].join('\n'), - // }, - // }, - { - run: { - name: 'Create Sandboxes', - command: `yarn task sandbox --template ${name} --no-link -s sandbox --debug`, - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', - }, - }, - }, - artifact.persist(`C:\\Users\\circleci\\${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), - workspace.persist([`${SANDBOX_DIR}/${id}`], 'C:\\Users\\circleci'), - ], - }, - ['windows_sandboxes'] - ), - defineJob( - names.build, - { - executor: { - name: 'win/default', - size: 'xlarge', - shell: 'bash.exe', - }, - steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - workspace.attach('C:\\Users\\circleci\\project'), - // cache.attach(CACHE_KEYS()), - { - run: { - name: 'install dependencies', - command: 'yarn install', - }, - }, - { - run: { - name: 'Build storybook', - command: `yarn task build --template ${name} --no-link -s build`, - }, - }, - { - run: { - name: 'Serve storybook', - background: true, - command: `yarn task serve --template ${name} --no-link -s serve`, - }, - }, - server.wait(['8001']), - { - run: { - name: 'install playwright', - command: 'yarn playwright install chromium --with-deps', - }, - }, - { - run: { - name: 'Running E2E Tests', - command: [ - `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s never" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - ], - }, - [ids.create] - ), - defineJob( - names.dev, - { - executor: { - name: 'win/default', - size: 'xlarge', - shell: 'bash.exe', - }, - steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - workspace.attach('C:\\Users\\circleci\\project'), - // cache.attach(CACHE_KEYS()), - { - run: { - name: 'install dependencies', - command: 'yarn install', - }, - }, - { - run: { - name: 'Run storybook', - working_directory: 'code', - background: true, - command: `yarn task dev --template ${name} --no-link -s dev`, - }, - }, - server.wait(['6006']), - { - run: { - name: 'install playwright', - command: 'yarn playwright install chromium --with-deps', - }, - }, - { - run: { - name: 'Running E2E Tests', - command: [ - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${name} --no-link -s never" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - ], - }, - [ids.create] - ), - ]; - return { - jobs, - workflow: jobs.map((job) => { - return { - [job.id]: { - requires: job.requires, - }, - }; - }), - }; -} - const linux_build = defineJob('build-linux', { executor: { name: 'sb_node_22_classic', @@ -790,17 +609,57 @@ const packageBenchmarks = defineJob( [linux_build.id] ); -const linux_sandboxes = [ - // - // 'react-vite/default-ts', - // 'react-vite/default-js', -].map(defineSandboxFlowLinux); - -const windows_sandboxes = [ +const sandboxes = [ // 'react-vite/default-ts', // 'react-vite/default-js', -].map(defineSandboxFlowWindows); +].map(defineSandboxFlow); + +const windows_sandbox_build = defineJob( + 'windows-sandbox-build', + { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + git.checkout({ forceHttps: true }), + node.installOnWindows(), + workspace.attach('C:\\Users\\circleci\\project'), + { + run: { + name: 'Install dependencies', + command: 'yarn install', + }, + }, + ], + }, + [sandboxes[0].jobs[0].id] +); + +const windows_sandbox_dev = defineJob( + 'windows-sandbox-dev', + { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + git.checkout({ forceHttps: true }), + node.installOnWindows(), + workspace.attach('C:\\Users\\circleci\\project'), + { + run: { + name: 'Install dependencies', + command: 'yarn install', + }, + }, + ], + }, + [sandboxes[0].jobs[0].id] +); const jobs = { [linux_build.id]: linux_build.implementation, @@ -810,6 +669,7 @@ const jobs = { [linux_unitTests.id]: linux_unitTests.implementation, [windows_unitTests.id]: windows_unitTests.implementation, [packageBenchmarks.id]: packageBenchmarks.implementation, + [windows_sandbox_build.id]: windows_sandbox_build.implementation, 'pretty-docs': { executor: { name: 'sb_node_22_classic', @@ -828,23 +688,10 @@ const jobs = { ], }, - linux_sandboxes: { + sandboxes: { type: 'no-op', }, - windows_sandboxes: { - type: 'no-op', - }, - ...linux_sandboxes.reduce( - (acc, sandbox) => { - for (const job of sandbox.jobs) { - acc[job.id] = job.implementation; - } - - return acc; - }, - {} as Record - ), - ...windows_sandboxes.reduce( + ...sandboxes.reduce( (acc, sandbox) => { for (const job of sandbox.jobs) { acc[job.id] = job.implementation; @@ -926,8 +773,17 @@ const workflows = { requires: uiTests.requires, }, }, - ...linux_sandboxes.flatMap((sandbox) => sandbox.workflow), - ...windows_sandboxes.flatMap((sandbox) => sandbox.workflow), + ...sandboxes.flatMap((sandbox) => sandbox.workflow), + { + [windows_sandbox_dev.id]: { + requires: windows_sandbox_dev.requires, + }, + }, + { + [windows_sandbox_build.id]: { + requires: windows_sandbox_build.requires, + }, + }, ], when: { equal: ['docs', '<< pipeline.parameters.workflow >>'], From 98e760a13add54258ef14b381a395749e8e934ba Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 8 Dec 2025 16:39:57 +0100 Subject: [PATCH 168/310] Refactor CircleCI configuration: update sandbox dependencies and streamline workflow definitions for improved clarity and maintainability. --- scripts/ci/data.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index c7919de1b0c9..1963b33c37e7 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -759,18 +759,13 @@ const workflows = { }, }, { - linux_sandboxes: { - requires: [linux_build.id], - }, - }, - { - windows_sandboxes: { - requires: [windows_build.id], + [uiTests.id]: { + requires: uiTests.requires, }, }, { - [uiTests.id]: { - requires: uiTests.requires, + sandboxes: { + requires: [linux_build.id], }, }, ...sandboxes.flatMap((sandbox) => sandbox.workflow), From 0a0ba4dfc83146246fc01dfb8014b5e520efa9ff Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 00:08:13 +0100 Subject: [PATCH 169/310] Add Windows sandbox job to CircleCI configuration: implement Node and Yarn installation steps, and update workflow definitions for improved CI pipeline management. --- .circleci/config.generated.yml | 30 +++++++++++++++++++++++++----- scripts/ci/data.ts | 2 ++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 660171a26468..96d1c6aa61c0 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -676,6 +676,29 @@ jobs: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + windows-sandbox-dev: + description: windows-sandbox-dev + executor: + name: win/default + size: xlarge + shell: bash.exe + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate + - attach_workspace: + at: C:\Users\circleci\project + - run: + name: Install dependencies + command: yarn install workflows: generated: jobs: @@ -694,13 +717,10 @@ workflows: - unit-tests-windows: requires: - build-windows - - linux_sandboxes: + - ui: requires: - build-linux - - windows_sandboxes: - requires: - - build-windows - - ui: + - sandboxes: requires: - build-linux - react-vite-default-ts--create: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 1963b33c37e7..5045ef8065a2 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -701,6 +701,8 @@ const jobs = { }, {} as Record ), + [windows_sandbox_dev.id]: windows_sandbox_dev.implementation, + [windows_sandbox_build.id]: windows_sandbox_build.implementation, }; const orbs = { From a37e5a8c51da8b600a1655ec2916db15a4627889 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 09:53:25 +0100 Subject: [PATCH 170/310] Refactor CircleCI configuration: update sandbox dependency names for improved clarity and consistency in workflow definitions. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 96d1c6aa61c0..02bd63e129d9 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -725,7 +725,7 @@ workflows: - build-linux - react-vite-default-ts--create: requires: - - linux_sandboxes + - sandboxes - react-vite-default-ts--build: requires: - react-vite-default-ts--create diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 5045ef8065a2..a8a42f698ba6 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -261,7 +261,7 @@ function defineSandboxFlow(name: K) { workspace.persist([`${SANDBOX_DIR}/${id}`]), ], }, - ['linux_sandboxes'] + ['sandboxes'] ), defineJob( names.build, From 2743bec0ed38b6dcd25b34840beceaa453c1a23a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 10:05:14 +0100 Subject: [PATCH 171/310] Refactor CircleCI configuration: rename Windows sandbox jobs for consistency and clarity in job definitions. --- .circleci/config.generated.yml | 12 ++++++------ scripts/ci/data.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 02bd63e129d9..5febee1f9f09 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -522,8 +522,8 @@ jobs: name: Benchmarking packages against base branch command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload working_directory: scripts - windows-sandbox-build: - description: windows-sandbox-build + react-vite-default-ts--build-windows: + description: react-vite-default-ts--build-windows executor: name: win/default size: xlarge @@ -676,8 +676,8 @@ jobs: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 - windows-sandbox-dev: - description: windows-sandbox-dev + react-vite-default-ts--dev-windows: + description: react-vite-default-ts--dev-windows executor: name: win/default size: xlarge @@ -732,10 +732,10 @@ workflows: - react-vite-default-ts--dev: requires: - react-vite-default-ts--create - - windows-sandbox-dev: + - react-vite-default-ts--dev-windows: requires: - react-vite-default-ts--create - - windows-sandbox-build: + - react-vite-default-ts--build-windows: requires: - react-vite-default-ts--create when: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index a8a42f698ba6..6bbda3feae96 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -616,7 +616,7 @@ const sandboxes = [ ].map(defineSandboxFlow); const windows_sandbox_build = defineJob( - 'windows-sandbox-build', + `${sandboxes[0].jobs[1].id}-windows`, { executor: { name: 'win/default', @@ -639,7 +639,7 @@ const windows_sandbox_build = defineJob( ); const windows_sandbox_dev = defineJob( - 'windows-sandbox-dev', + `${sandboxes[0].jobs[2].id}-windows`, { executor: { name: 'win/default', From 66b40f521211277d8c09febcdae61bb95cbe4315 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 12:03:28 +0100 Subject: [PATCH 172/310] Enhance CircleCI configuration: add Verdaccio setup, wait for servers, and build Storybook in Windows sandbox jobs for improved CI workflow. --- .circleci/config.generated.yml | 25 ++++++++++++++++++++++++- scripts/ci/data.ts | 25 ++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 5febee1f9f09..eaa8fffed90e 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -541,10 +541,33 @@ jobs: corepack enable corepack prepare yarn@stable --activate - attach_workspace: - at: C:\Users\circleci\project + at: C:\Users\circleci - run: name: Install dependencies command: yarn install + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Run Install + working_directory: C:\Users\circleci\sandbox\react-vite\default-ts + command: yarn install + - run: + name: Install playwright + working_directory: C:\Users\circleci\sandbox\react-vite\default-ts + command: yarn playwright install chromium --with-deps + - run: + name: Build storybook + working_directory: C:\Users\circleci\sandbox\react-vite\default-ts + command: yarn build-storybook pretty-docs: executor: name: sb_node_22_classic diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 6bbda3feae96..3f14097f2ac1 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -626,13 +626,36 @@ const windows_sandbox_build = defineJob( steps: [ git.checkout({ forceHttps: true }), node.installOnWindows(), - workspace.attach('C:\\Users\\circleci\\project'), + workspace.attach('C:\\Users\\circleci'), { run: { name: 'Install dependencies', command: 'yarn install', }, }, + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Run Install', + working_directory: `C:\\Users\\circleci\\sandbox\\react-vite\\default-ts`, + command: 'yarn install', + }, + }, + { + run: { + name: 'Install playwright', + working_directory: `C:\\Users\\circleci\\sandbox\\react-vite\\default-ts`, + command: 'yarn playwright install chromium --with-deps', + }, + }, + { + run: { + name: 'Build storybook', + working_directory: `C:\\Users\\circleci\\sandbox\\react-vite\\default-ts`, + command: 'yarn build-storybook', + }, + }, ], }, [sandboxes[0].jobs[0].id] From 5d75fa7e90e069c96d308edf2bbd48ef4c0c63c2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 12:21:58 +0100 Subject: [PATCH 173/310] Update CircleCI configuration: change working directory paths from 'sandbox' to 'sandboxes' for consistency in Windows jobs. --- .circleci/config.generated.yml | 6 +++--- scripts/ci/data.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index eaa8fffed90e..b783f73b182e 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -558,15 +558,15 @@ jobs: yarn wait-on tcp:127.0.0.1:6002 - run: name: Run Install - working_directory: C:\Users\circleci\sandbox\react-vite\default-ts + working_directory: C:\Users\circleci\sandboxes\react-vite\default-ts command: yarn install - run: name: Install playwright - working_directory: C:\Users\circleci\sandbox\react-vite\default-ts + working_directory: C:\Users\circleci\sandboxes\react-vite\default-ts command: yarn playwright install chromium --with-deps - run: name: Build storybook - working_directory: C:\Users\circleci\sandbox\react-vite\default-ts + working_directory: C:\Users\circleci\sandboxes\react-vite\default-ts command: yarn build-storybook pretty-docs: executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3f14097f2ac1..0450e965f184 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -638,21 +638,21 @@ const windows_sandbox_build = defineJob( { run: { name: 'Run Install', - working_directory: `C:\\Users\\circleci\\sandbox\\react-vite\\default-ts`, + working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, command: 'yarn install', }, }, { run: { name: 'Install playwright', - working_directory: `C:\\Users\\circleci\\sandbox\\react-vite\\default-ts`, + working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, command: 'yarn playwright install chromium --with-deps', }, }, { run: { name: 'Build storybook', - working_directory: `C:\\Users\\circleci\\sandbox\\react-vite\\default-ts`, + working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, command: 'yarn build-storybook', }, }, From 208e7131cb4feb16038af57f272927e1fb437ccf Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 13:29:26 +0100 Subject: [PATCH 174/310] Update CircleCI configuration: add TAR_OPTIONS environment variable for improved file extraction handling in Windows jobs and comment out unnecessary install steps for clarity. --- .circleci/config.generated.yml | 32 ++++++++++++++++---------- scripts/ci/data.ts | 42 +++++++++++++++++----------------- scripts/ci/utils.ts | 3 +++ 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index b783f73b182e..79b3096e3b51 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -389,6 +389,8 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp + environment: + TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -418,6 +420,8 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp + environment: + TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -445,6 +449,8 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp + environment: + TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -484,6 +490,8 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project + environment: + TAR_OPTIONS: --no-same-owner - run: command: yarn install name: Install dependencies @@ -501,6 +509,8 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp + environment: + TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -542,6 +552,8 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci + environment: + TAR_OPTIONS: --no-same-owner - run: name: Install dependencies command: yarn install @@ -556,18 +568,6 @@ jobs: command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Run Install - working_directory: C:\Users\circleci\sandboxes\react-vite\default-ts - command: yarn install - - run: - name: Install playwright - working_directory: C:\Users\circleci\sandboxes\react-vite\default-ts - command: yarn playwright install chromium --with-deps - - run: - name: Build storybook - working_directory: C:\Users\circleci\sandboxes\react-vite\default-ts - command: yarn build-storybook pretty-docs: executor: name: sb_node_22_classic @@ -595,6 +595,8 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp + environment: + TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -647,6 +649,8 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp + environment: + TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -679,6 +683,8 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp + environment: + TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -719,6 +725,8 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project + environment: + TAR_OPTIONS: --no-same-owner - run: name: Install dependencies command: yarn install diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 0450e965f184..bc434176f1db 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -635,27 +635,27 @@ const windows_sandbox_build = defineJob( }, verdaccio.start(), server.wait([...verdaccio.ports]), - { - run: { - name: 'Run Install', - working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, - command: 'yarn install', - }, - }, - { - run: { - name: 'Install playwright', - working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, - command: 'yarn playwright install chromium --with-deps', - }, - }, - { - run: { - name: 'Build storybook', - working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, - command: 'yarn build-storybook', - }, - }, + // { + // run: { + // name: 'Run Install', + // working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, + // command: 'yarn install', + // }, + // }, + // { + // run: { + // name: 'Install playwright', + // working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, + // command: 'yarn playwright install chromium --with-deps', + // }, + // }, + // { + // run: { + // name: 'Build storybook', + // working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, + // command: 'yarn build-storybook', + // }, + // }, ], }, [sandboxes[0].jobs[0].id] diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 311625462dc2..856283024bec 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -8,6 +8,9 @@ export const workspace = { attach_workspace: { at, }, + environment: { + TAR_OPTIONS: '--no-same-owner', + }, }; }, persist: (paths: string[], root = ROOT_DIR) => { From 10a226a62f6f5faa26cc81ed7541f29a94ac2508 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 13:33:21 +0100 Subject: [PATCH 175/310] Refactor CircleCI configuration: remove TAR_OPTIONS environment variable from jobs to streamline configuration and improve clarity. --- .circleci/config.generated.yml | 20 -------------------- scripts/ci/utils.ts | 3 --- 2 files changed, 23 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 79b3096e3b51..7da0bfd2b102 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -389,8 +389,6 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp - environment: - TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -420,8 +418,6 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp - environment: - TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -449,8 +445,6 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp - environment: - TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -490,8 +484,6 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project - environment: - TAR_OPTIONS: --no-same-owner - run: command: yarn install name: Install dependencies @@ -509,8 +501,6 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp - environment: - TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -552,8 +542,6 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci - environment: - TAR_OPTIONS: --no-same-owner - run: name: Install dependencies command: yarn install @@ -595,8 +583,6 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp - environment: - TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -649,8 +635,6 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp - environment: - TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -683,8 +667,6 @@ jobs: clone_options: --depth 1 - attach_workspace: at: /tmp - environment: - TAR_OPTIONS: --no-same-owner - restore_cache: keys: - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} @@ -725,8 +707,6 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci\project - environment: - TAR_OPTIONS: --no-same-owner - run: name: Install dependencies command: yarn install diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 856283024bec..311625462dc2 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -8,9 +8,6 @@ export const workspace = { attach_workspace: { at, }, - environment: { - TAR_OPTIONS: '--no-same-owner', - }, }; }, persist: (paths: string[], root = ROOT_DIR) => { From a31c5444cb9186a5a545f43ce8af8f5e9d1c329b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 13:54:15 +0100 Subject: [PATCH 176/310] Update CircleCI configuration: change working directory from '/tmp/storybook' to '/tmp/project' for consistency and update paths in job definitions to reflect the new structure. --- .circleci/config.generated.yml | 178 ++++++++++++++++----------------- scripts/ci/utils.ts | 2 +- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 7da0bfd2b102..fc7ae2dd0330 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -60,7 +60,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: /tmp/project sb_node_22_browsers: docker: - environment: @@ -78,7 +78,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: /tmp/project sb_node_22_classic: docker: - environment: @@ -96,7 +96,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: /tmp/project sb_playwright: docker: - environment: @@ -114,7 +114,7 @@ executors: - xlarge type: enum resource_class: <> - working_directory: /tmp/storybook + working_directory: /tmp/project parameters: ghBaseBranch: default: next @@ -177,90 +177,90 @@ jobs: destination: bench - persist_to_workspace: paths: - - storybook/code/core/dist - - storybook/code/core/node_modules - - storybook/code/addons/a11y/dist - - storybook/code/addons/a11y/node_modules - - storybook/code/addons/docs/dist - - storybook/code/addons/docs/node_modules - - storybook/code/addons/links/dist - - storybook/code/addons/links/node_modules - - storybook/code/addons/onboarding/dist - - storybook/code/addons/onboarding/node_modules - - storybook/code/addons/pseudo-states/dist - - storybook/code/addons/pseudo-states/node_modules - - storybook/code/addons/themes/dist - - storybook/code/addons/themes/node_modules - - storybook/code/addons/vitest/dist - - storybook/code/addons/vitest/node_modules - - storybook/code/builders/builder-vite/dist - - storybook/code/builders/builder-vite/node_modules - - storybook/code/builders/builder-webpack5/dist - - storybook/code/builders/builder-webpack5/node_modules - - storybook/code/frameworks/angular/dist - - storybook/code/frameworks/angular/node_modules - - storybook/code/frameworks/ember/dist - - storybook/code/frameworks/ember/node_modules - - storybook/code/frameworks/html-vite/dist - - storybook/code/frameworks/html-vite/node_modules - - storybook/code/frameworks/nextjs/dist - - storybook/code/frameworks/nextjs/node_modules - - storybook/code/frameworks/nextjs-vite/dist - - storybook/code/frameworks/nextjs-vite/node_modules - - storybook/code/frameworks/preact-vite/dist - - storybook/code/frameworks/preact-vite/node_modules - - storybook/code/frameworks/react-native-web-vite/dist - - storybook/code/frameworks/react-native-web-vite/node_modules - - storybook/code/frameworks/react-vite/dist - - storybook/code/frameworks/react-vite/node_modules - - storybook/code/frameworks/react-webpack5/dist - - storybook/code/frameworks/react-webpack5/node_modules - - storybook/code/frameworks/server-webpack5/dist - - storybook/code/frameworks/server-webpack5/node_modules - - storybook/code/frameworks/svelte-vite/dist - - storybook/code/frameworks/svelte-vite/node_modules - - storybook/code/frameworks/sveltekit/dist - - storybook/code/frameworks/sveltekit/node_modules - - storybook/code/frameworks/vue3-vite/dist - - storybook/code/frameworks/vue3-vite/node_modules - - storybook/code/frameworks/web-components-vite/dist - - storybook/code/frameworks/web-components-vite/node_modules - - storybook/code/lib/cli-storybook/dist - - storybook/code/lib/cli-storybook/node_modules - - storybook/code/lib/codemod/dist - - storybook/code/lib/codemod/node_modules - - storybook/code/lib/core-webpack/dist - - storybook/code/lib/core-webpack/node_modules - - storybook/code/lib/create-storybook/dist - - storybook/code/lib/create-storybook/node_modules - - storybook/code/lib/csf-plugin/dist - - storybook/code/lib/csf-plugin/node_modules - - storybook/code/lib/eslint-plugin/dist - - storybook/code/lib/eslint-plugin/node_modules - - storybook/code/lib/react-dom-shim/dist - - storybook/code/lib/react-dom-shim/node_modules - - storybook/code/presets/create-react-app/dist - - storybook/code/presets/create-react-app/node_modules - - storybook/code/presets/react-webpack/dist - - storybook/code/presets/react-webpack/node_modules - - storybook/code/presets/server-webpack/dist - - storybook/code/presets/server-webpack/node_modules - - storybook/code/renderers/html/dist - - storybook/code/renderers/html/node_modules - - storybook/code/renderers/preact/dist - - storybook/code/renderers/preact/node_modules - - storybook/code/renderers/react/dist - - storybook/code/renderers/react/node_modules - - storybook/code/renderers/server/dist - - storybook/code/renderers/server/node_modules - - storybook/code/renderers/svelte/dist - - storybook/code/renderers/svelte/node_modules - - storybook/code/renderers/vue3/dist - - storybook/code/renderers/vue3/node_modules - - storybook/code/renderers/web-components/dist - - storybook/code/renderers/web-components/node_modules - - storybook/.verdaccio-cache - - storybook/code/bench + - project/code/core/dist + - project/code/core/node_modules + - project/code/addons/a11y/dist + - project/code/addons/a11y/node_modules + - project/code/addons/docs/dist + - project/code/addons/docs/node_modules + - project/code/addons/links/dist + - project/code/addons/links/node_modules + - project/code/addons/onboarding/dist + - project/code/addons/onboarding/node_modules + - project/code/addons/pseudo-states/dist + - project/code/addons/pseudo-states/node_modules + - project/code/addons/themes/dist + - project/code/addons/themes/node_modules + - project/code/addons/vitest/dist + - project/code/addons/vitest/node_modules + - project/code/builders/builder-vite/dist + - project/code/builders/builder-vite/node_modules + - project/code/builders/builder-webpack5/dist + - project/code/builders/builder-webpack5/node_modules + - project/code/frameworks/angular/dist + - project/code/frameworks/angular/node_modules + - project/code/frameworks/ember/dist + - project/code/frameworks/ember/node_modules + - project/code/frameworks/html-vite/dist + - project/code/frameworks/html-vite/node_modules + - project/code/frameworks/nextjs/dist + - project/code/frameworks/nextjs/node_modules + - project/code/frameworks/nextjs-vite/dist + - project/code/frameworks/nextjs-vite/node_modules + - project/code/frameworks/preact-vite/dist + - project/code/frameworks/preact-vite/node_modules + - project/code/frameworks/react-native-web-vite/dist + - project/code/frameworks/react-native-web-vite/node_modules + - project/code/frameworks/react-vite/dist + - project/code/frameworks/react-vite/node_modules + - project/code/frameworks/react-webpack5/dist + - project/code/frameworks/react-webpack5/node_modules + - project/code/frameworks/server-webpack5/dist + - project/code/frameworks/server-webpack5/node_modules + - project/code/frameworks/svelte-vite/dist + - project/code/frameworks/svelte-vite/node_modules + - project/code/frameworks/sveltekit/dist + - project/code/frameworks/sveltekit/node_modules + - project/code/frameworks/vue3-vite/dist + - project/code/frameworks/vue3-vite/node_modules + - project/code/frameworks/web-components-vite/dist + - project/code/frameworks/web-components-vite/node_modules + - project/code/lib/cli-storybook/dist + - project/code/lib/cli-storybook/node_modules + - project/code/lib/codemod/dist + - project/code/lib/codemod/node_modules + - project/code/lib/core-webpack/dist + - project/code/lib/core-webpack/node_modules + - project/code/lib/create-storybook/dist + - project/code/lib/create-storybook/node_modules + - project/code/lib/csf-plugin/dist + - project/code/lib/csf-plugin/node_modules + - project/code/lib/eslint-plugin/dist + - project/code/lib/eslint-plugin/node_modules + - project/code/lib/react-dom-shim/dist + - project/code/lib/react-dom-shim/node_modules + - project/code/presets/create-react-app/dist + - project/code/presets/create-react-app/node_modules + - project/code/presets/react-webpack/dist + - project/code/presets/react-webpack/node_modules + - project/code/presets/server-webpack/dist + - project/code/presets/server-webpack/node_modules + - project/code/renderers/html/dist + - project/code/renderers/html/node_modules + - project/code/renderers/preact/dist + - project/code/renderers/preact/node_modules + - project/code/renderers/react/dist + - project/code/renderers/react/node_modules + - project/code/renderers/server/dist + - project/code/renderers/server/node_modules + - project/code/renderers/svelte/dist + - project/code/renderers/svelte/node_modules + - project/code/renderers/vue3/dist + - project/code/renderers/vue3/node_modules + - project/code/renderers/web-components/dist + - project/code/renderers/web-components/node_modules + - project/.verdaccio-cache + - project/code/bench root: /tmp build-windows: description: build-windows @@ -458,7 +458,7 @@ jobs: TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - store_test_results: - path: storybook/test-results + path: project/test-results - run: name: Ensure no changes pending command: git diff --exit-code diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 311625462dc2..697c20ff91c2 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -1,5 +1,5 @@ export const ROOT_DIR = '/tmp'; -export const WORKING_DIR = `storybook`; +export const WORKING_DIR = `project`; export const SANDBOX_DIR = `storybook-sandboxes`; export const workspace = { From ba7f4ce0f12f1a656390145ac5810cc6fcefa93d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 14:34:53 +0100 Subject: [PATCH 177/310] Update CircleCI configuration: migrate cache keys from v4 to v5 for node_modules and add steps to install dependencies and build Storybook in Windows sandbox jobs. --- .circleci/config.generated.yml | 12 ++++++++++ scripts/ci/data.ts | 44 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index fc7ae2dd0330..cf5adce10b31 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -556,6 +556,18 @@ jobs: command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Run Install + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite\default-ts + command: yarn install + - run: + name: Install playwright + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite\default-ts + command: yarn playwright install chromium --with-deps + - run: + name: Build storybook + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite\default-ts + command: yarn build-storybook pretty-docs: executor: name: sb_node_22_classic diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index bc434176f1db..4f7ec15e7faf 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -20,7 +20,7 @@ import { const CACHE_KEYS = (platform = 'linux') => [ - `v4-${platform}-node_modules`, + `v5-${platform}-node_modules`, '{{ checksum ".nvmrc" }}', '{{ checksum ".yarnrc.yml" }}', '{{ checksum "yarn.lock" }}', @@ -635,27 +635,27 @@ const windows_sandbox_build = defineJob( }, verdaccio.start(), server.wait([...verdaccio.ports]), - // { - // run: { - // name: 'Run Install', - // working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, - // command: 'yarn install', - // }, - // }, - // { - // run: { - // name: 'Install playwright', - // working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, - // command: 'yarn playwright install chromium --with-deps', - // }, - // }, - // { - // run: { - // name: 'Build storybook', - // working_directory: `C:\\Users\\circleci\\sandboxes\\react-vite\\default-ts`, - // command: 'yarn build-storybook', - // }, - // }, + { + run: { + name: 'Run Install', + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite\\default-ts`, + command: 'yarn install', + }, + }, + { + run: { + name: 'Install playwright', + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite\\default-ts`, + command: 'yarn playwright install chromium --with-deps', + }, + }, + { + run: { + name: 'Build storybook', + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite\\default-ts`, + command: 'yarn build-storybook', + }, + }, ], }, [sandboxes[0].jobs[0].id] From 3cbc1bb58348a447c0ba338db9a65491bc6b37fa Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 15:08:49 +0100 Subject: [PATCH 178/310] Update CircleCI configuration: migrate cache keys to v5 for node_modules, adjust working directory paths for Windows sandbox jobs, and enhance build and E2E testing steps for improved CI workflow. --- .circleci/config.generated.yml | 77 +++++++++++++++++++--------------- scripts/ci/data.ts | 24 ++++++++--- 2 files changed, 63 insertions(+), 38 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index cf5adce10b31..6f1a17fa95ea 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -156,7 +156,7 @@ jobs: - node_modules - code/node_modules - scripts/node_modules - key: v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + key: v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - run: name: Ensure no changes pending command: git diff --exit-code @@ -391,10 +391,10 @@ jobs: at: /tmp - restore_cache: keys: - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }} - - v4-linux-node_modules + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules - run: name: TypeCheck code working_directory: code @@ -420,10 +420,10 @@ jobs: at: /tmp - restore_cache: keys: - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }} - - v4-linux-node_modules + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules - run: name: Build internal storybook command: yarn storybook:ui:build @@ -447,10 +447,10 @@ jobs: at: /tmp - restore_cache: keys: - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }} - - v4-linux-node_modules + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules - run: name: Run tests working_directory: code @@ -503,10 +503,10 @@ jobs: at: /tmp - restore_cache: keys: - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }} - - v4-linux-node_modules + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules - run: name: Verdaccio working_directory: code @@ -558,16 +558,27 @@ jobs: yarn wait-on tcp:127.0.0.1:6002 - run: name: Run Install - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite\default-ts + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts command: yarn install - run: name: Install playwright - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite\default-ts command: yarn playwright install chromium --with-deps - run: name: Build storybook - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite\default-ts - command: yarn build-storybook + command: yarn task build --template react-vite/default-ts --no-link -s build + - run: + name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-ts --no-link -s serve + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 pretty-docs: executor: name: sb_node_22_classic @@ -597,10 +608,10 @@ jobs: at: /tmp - restore_cache: keys: - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }} - - v4-linux-node_modules + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules - run: name: Verdaccio working_directory: code @@ -649,10 +660,10 @@ jobs: at: /tmp - restore_cache: keys: - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }} - - v4-linux-node_modules + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules - run: name: Build storybook command: yarn task build --template react-vite/default-ts --no-link -s build @@ -681,10 +692,10 @@ jobs: at: /tmp - restore_cache: keys: - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v4-linux-node_modules/{{ checksum ".nvmrc" }} - - v4-linux-node_modules + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules - run: name: Run storybook working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 4f7ec15e7faf..b4c0bf48dde6 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -638,22 +638,37 @@ const windows_sandbox_build = defineJob( { run: { name: 'Run Install', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite\\default-ts`, + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, command: 'yarn install', }, }, { run: { name: 'Install playwright', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite\\default-ts`, command: 'yarn playwright install chromium --with-deps', }, }, { run: { name: 'Build storybook', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite\\default-ts`, - command: 'yarn build-storybook', + command: `yarn task build --template react-vite/default-ts --no-link -s build`, + }, + }, + { + run: { + name: 'Serve storybook', + background: true, + command: `yarn task serve --template react-vite/default-ts --no-link -s serve`, + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + command: [ + `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1`, + ].join('\n'), }, }, ], @@ -710,7 +725,6 @@ const jobs = { }, ], }, - sandboxes: { type: 'no-op', }, From 0979f5979027dee3a700fae3af65b9fd675fbd09 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 16:22:47 +0100 Subject: [PATCH 179/310] modify `ensureSymlinkOrCopy` to copy files instead of symlinking on CI to prevent issues with Windows workspaces. --- scripts/ci/data.ts | 6 +++--- scripts/tasks/sandbox-parts.ts | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index b4c0bf48dde6..d623236866d2 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -171,7 +171,7 @@ const executors = { }, } as const; -type SomethingImplementation = { +type JobImplementation = { executor: | { name: keyof typeof executors; @@ -186,7 +186,7 @@ type SomethingImplementation = { parallelism?: number; }; -function defineJob( +function defineJob( name: K, implementation: I, requires = [] as string[] @@ -736,7 +736,7 @@ const jobs = { return acc; }, - {} as Record + {} as Record ), [windows_sandbox_dev.id]: windows_sandbox_dev.implementation, [windows_sandbox_build.id]: windows_sandbox_build.implementation, diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 195885d8eee3..11fd6885c7c8 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -57,6 +57,14 @@ async function ensureSymlink(src: string, dest: string): Promise { // Windows-compatible symlink function that falls back to copying async function ensureSymlinkOrCopy(source: string, target: string): Promise { + if (process.env.CI) { + /** + * On CI, we don't need to symlink, we can just copy the files because there's no benefit in + * having a symlink on CI, but it does cause issues if we persist the workspace to windows. + */ + await cp(source, target, { recursive: true, force: true }); + return; + } try { await ensureSymlink(source, target); } catch (error: any) { From d87acc9dcd0c428352b1d62845f74afe365e4b11 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 17:59:07 +0100 Subject: [PATCH 180/310] Refactor CircleCI E2E testing commands: simplify test execution by removing unnecessary globbing and echoing, and set working directory for improved clarity and consistency. --- .circleci/config.generated.yml | 38 +++++++++++++++++++++++++++++---- scripts/ci/data.ts | 39 +++++++++++++++++++++++++++++----- 2 files changed, 68 insertions(+), 9 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 6f1a17fa95ea..7ae8d28c340d 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -576,9 +576,8 @@ jobs: command: yarn wait-on tcp:127.0.0.1:8001 - run: name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + working_directory: code + command: yarn task e2e-tests --template react-vite/default-ts --no-link -s never pretty-docs: executor: name: sb_node_22_classic @@ -729,10 +728,41 @@ jobs: corepack enable corepack prepare yarn@stable --activate - attach_workspace: - at: C:\Users\circleci\project + at: C:\Users\circleci - run: name: Install dependencies command: yarn install + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Run Install + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts + command: yarn install + - run: + name: Install playwright + command: yarn playwright install chromium --with-deps + - run: + name: Run storybook + background: true + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts + command: yarn install + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 + - run: + name: Running E2E Tests + working_directory: code + command: yarn task e2e-tests --template react-vite/default-ts --no-link -s never workflows: generated: jobs: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index d623236866d2..455553df532a 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -665,10 +665,8 @@ const windows_sandbox_build = defineJob( { run: { name: 'Running E2E Tests', - command: [ - `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1`, - ].join('\n'), + working_directory: 'code', + command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s never', }, }, ], @@ -687,13 +685,44 @@ const windows_sandbox_dev = defineJob( steps: [ git.checkout({ forceHttps: true }), node.installOnWindows(), - workspace.attach('C:\\Users\\circleci\\project'), + workspace.attach('C:\\Users\\circleci'), { run: { name: 'Install dependencies', command: 'yarn install', }, }, + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Run Install', + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, + command: 'yarn install', + }, + }, + { + run: { + name: 'Install playwright', + command: 'yarn playwright install chromium --with-deps', + }, + }, + { + run: { + name: 'Run storybook', + background: true, + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, + command: 'yarn install', + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + working_directory: 'code', + command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s never', + }, + }, ], }, [sandboxes[0].jobs[0].id] From 9d535aaa0fa9e879e855210bd52a2a8741fa2b92 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 20:08:58 +0100 Subject: [PATCH 181/310] Update CircleCI configuration: change command to run Storybook on port 8001 instead of installing dependencies, enhancing the CI workflow for E2E testing. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 7ae8d28c340d..4b7b4dcbde48 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -754,7 +754,7 @@ jobs: name: Run storybook background: true working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts - command: yarn install + command: yarn storybook --port 8001 - run: name: Wait on servers working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 455553df532a..a42795b42f39 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -712,7 +712,7 @@ const windows_sandbox_dev = defineJob( name: 'Run storybook', background: true, working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, - command: 'yarn install', + command: 'yarn storybook --port 8001', }, }, server.wait(['8001']), From 385f5fa10c015be00074ddbd5278537c0a693a55 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 9 Dec 2025 21:12:26 +0100 Subject: [PATCH 182/310] Update CircleCI configuration: change E2E test command to use 'e2e-tests-dev' for improved testing in development environments. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 4b7b4dcbde48..bb3c0d5f25c5 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -762,7 +762,7 @@ jobs: - run: name: Running E2E Tests working_directory: code - command: yarn task e2e-tests --template react-vite/default-ts --no-link -s never + command: yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never workflows: generated: jobs: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index a42795b42f39..59dbe49d87be 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -720,7 +720,7 @@ const windows_sandbox_dev = defineJob( run: { name: 'Running E2E Tests', working_directory: 'code', - command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s never', + command: 'yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never', }, }, ], From 24b60abc83f75571ea19fcf3d9ad634e9176f5fe Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 10 Dec 2025 13:19:19 +0100 Subject: [PATCH 183/310] Refactor CircleCI configuration: streamline sandbox job definitions by introducing helper functions for build and dev jobs, enhancing maintainability and clarity in CI workflow. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 219 ++++++++++++++++++++++----------- 2 files changed, 149 insertions(+), 72 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index bb3c0d5f25c5..9ef3166b12af 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -682,8 +682,8 @@ jobs: react-vite-default-ts--dev: description: react-vite/default-ts (dev) executor: - class: xlarge name: sb_playwright + class: xlarge steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 59dbe49d87be..72c893c4a698 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -3,6 +3,7 @@ import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; +import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; import { ROOT_DIR, SANDBOX_DIR, @@ -204,6 +205,9 @@ function defineJob( function defineSandboxFlow(name: K) { const id = toId(name); + const data = allTemplates[name as keyof typeof allTemplates]; + const { skipTasks } = data; + const names = { create: `${name} (create)`, build: `${name} (build)`, @@ -214,6 +218,7 @@ function defineSandboxFlow(name: K) { build: `${toId(names.build)}`, dev: `${toId(names.dev)}`, }; + const jobs = [ defineJob( names.create, @@ -263,77 +268,18 @@ function defineSandboxFlow(name: K) { }, ['sandboxes'] ), - defineJob( - names.build, - { - executor: { - name: 'sb_playwright', - class: 'xlarge', - }, - steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), - { - run: { - name: 'Build storybook', - command: `yarn task build --template ${name} --no-link -s build`, - }, - }, - { - run: { - name: 'Serve storybook', - background: true, - command: `yarn task serve --template ${name} --no-link -s serve`, - }, - }, - server.wait(['8001']), - { - run: { - name: 'Running E2E Tests', - command: [ - `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s never" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - ], - }, - [ids.create] - ), - defineJob( - names.dev, - { - executor: { - class: 'xlarge', - name: 'sb_playwright', - }, - steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), - { - run: { - name: 'Run storybook', - working_directory: 'code', - background: true, - command: `yarn task dev --template ${name} --no-link -s dev`, - }, - }, - server.wait(['6006']), - { - run: { - name: 'Running E2E Tests', - command: [ - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${name} --no-link -s never" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - ], - }, - [ids.create] - ), + defineSandboxJob_build({ + name: names.build, + template: name, + needs: [ids.create], + options: { e2e: !skipTasks?.includes('e2e-tests') }, + }), + defineSandboxJob_dev({ + name: names.dev, + template: name, + needs: [ids.create], + options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, + }), ]; return { jobs, @@ -864,3 +810,134 @@ export const data = { jobs, workflows, }; + +function defineSandboxJob_build({ + name, + template, + needs, + options, +}: { + name: string; + needs: string[]; + template: string; + options: { + e2e: boolean; + }; +}) { + const executor: JobImplementation['executor'] = options.e2e + ? { + name: 'sb_playwright', + class: 'xlarge', + } + : { + name: 'sb_node_22_classic', + class: 'large', + }; + + return defineJob( + name, + { + executor, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Build storybook', + command: `yarn task build --template ${template} --no-link -s build`, + }, + }, + ...(options.e2e + ? [ + { + run: { + name: 'Serve storybook', + background: true, + command: `yarn task serve --template ${template} --no-link -s serve`, + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + command: [ + `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${template} --no-link -s never" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + ] + : []), + ], + }, + needs + ); +} +function defineSandboxJob_dev({ + name, + template, + needs, + options, +}: { + name: string; + needs: string[]; + template: string; + options: { + e2e: boolean; + }; +}) { + const executor: JobImplementation['executor'] = options.e2e + ? { + name: 'sb_playwright', + class: 'xlarge', + } + : { + name: 'sb_node_22_classic', + class: 'large', + }; + + return defineJob( + name, + { + executor, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + ...(options.e2e + ? [ + { + run: { + name: 'Run storybook', + working_directory: 'code', + background: true, + command: `yarn task dev --template ${template} --no-link -s dev`, + }, + }, + server.wait(['6006']), + { + run: { + name: 'Running E2E Tests', + command: [ + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${template} --no-link -s never" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + ] + : [ + { + run: { + name: 'Run storybook smoke test', + working_directory: 'code', + background: true, + command: `yarn task smoke-test --template ${template} --no-link -s dev`, + }, + }, + ]), + ], + }, + needs + ); +} From 79f9aa38e6d4deb0d3cf4a9741a010bf45a1e902 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 10 Dec 2025 21:05:26 +0100 Subject: [PATCH 184/310] Add CircleCI jobs for Storybook testing: implement smoke tests and Playwright E2E tests for PNP and React Vite configurations, enhancing CI workflow for Storybook projects. --- .circleci/config.generated.yml | 63 +++++++++++++++++++++++++ scripts/ci/data.ts | 86 ++++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 9ef3166b12af..d7d467cc71bc 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -763,6 +763,60 @@ jobs: name: Running E2E Tests working_directory: code command: yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never + test-storybooks: + type: no-op + test-storybooks-pnp: + description: test-storybooks-pnp + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Install dependencies + working_directory: test-storybooks/yarn-pnp + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + - run: + name: Run Storybook smoke test + working_directory: test-storybooks/yarn-pnp + command: yarn storybook --smoke-test + test-storybooks-react-vite-default-ts: + description: test-storybooks-react-vite-default-ts + executor: + name: sb_playwright + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + - run: + name: Run Playwright E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn playwright-e2e workflows: generated: jobs: @@ -802,6 +856,15 @@ workflows: - react-vite-default-ts--build-windows: requires: - react-vite-default-ts--create + - test-storybooks: + requires: + - build-linux + - test-storybooks-pnp: + requires: + - test-storybooks + - test-storybooks-react-vite-default-ts: + requires: + - test-storybooks when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 72c893c4a698..d27304ec78d4 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -555,6 +555,71 @@ const packageBenchmarks = defineJob( [linux_build.id] ); +const testStorybooksPNP = defineJob( + 'test-storybooks-pnp', + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Install dependencies', + working_directory: 'test-storybooks/yarn-pnp', + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + }, + }, + { + run: { + name: 'Run Storybook smoke test', + working_directory: 'test-storybooks/yarn-pnp', + command: 'yarn storybook --smoke-test', + }, + }, + ], + }, + ['test-storybooks'] +); +const testStorybooksPortableReact = defineJob( + 'test-storybooks-react-vite-default-ts', + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Install dependencies', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + }, + }, + { + run: { + name: 'Run Playwright E2E tests', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + command: 'yarn playwright-e2e', + }, + }, + ], + }, + ['test-storybooks'] +); + const sandboxes = [ // 'react-vite/default-ts', @@ -715,6 +780,12 @@ const jobs = { ), [windows_sandbox_dev.id]: windows_sandbox_dev.implementation, [windows_sandbox_build.id]: windows_sandbox_build.implementation, + + ['test-storybooks']: { + type: 'no-op', + }, + [testStorybooksPNP.id]: testStorybooksPNP.implementation, + [testStorybooksPortableReact.id]: testStorybooksPortableReact.implementation, }; const orbs = { @@ -793,6 +864,21 @@ const workflows = { requires: windows_sandbox_build.requires, }, }, + { + ['test-storybooks']: { + requires: [linux_build.id], + }, + }, + { + [testStorybooksPNP.id]: { + requires: testStorybooksPNP.requires, + }, + }, + { + [testStorybooksPortableReact.id]: { + requires: testStorybooksPortableReact.requires, + }, + }, ], when: { equal: ['docs', '<< pipeline.parameters.workflow >>'], From 85f52e6019ba80b480616be2ff9d5bdb86db72bd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 10 Dec 2025 23:44:26 +0100 Subject: [PATCH 185/310] Enhance CircleCI configuration by adding portable Storybook test jobs for React and Vue3, including Jest, Vitest, Playwright, and Cypress tests. Update existing job definitions for improved clarity and organization. --- .circleci/config.generated.yml | 92 +++++++++++++++++++++++++++++- scripts/ci/data.ts | 101 ++++++++++++++++++++++++++++++--- 2 files changed, 183 insertions(+), 10 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index d7d467cc71bc..74538e0d1419 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -791,8 +791,8 @@ jobs: name: Run Storybook smoke test working_directory: test-storybooks/yarn-pnp command: yarn storybook --smoke-test - test-storybooks-react-vite-default-ts: - description: test-storybooks-react-vite-default-ts + test-storybooks-portable-react: + description: test-storybooks-portable-react executor: name: sb_playwright class: medium @@ -813,10 +813,90 @@ jobs: command: yarn install --no-immutable environment: YARN_ENABLE_IMMUTABLE_INSTALLS: false + - run: + name: Run Jest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn jest + - run: + name: Run Vitest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn vitest + - run: + name: Run Playwright CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn playwright-ct - run: name: Run Playwright E2E tests working_directory: test-storybooks/portable-stories-kitchen-sink/react command: yarn playwright-e2e + - run: + name: Run Cypress CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react + command: yarn cypress + test-storybooks-portable-vue3: + description: test-storybooks-portable-vue3 + executor: + name: sb_playwright + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + - run: + name: Run Jest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn jest + - run: + name: Run Vitest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn vitest + - run: + name: Run Playwright CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn playwright-ct + - run: + name: Run Cypress CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn cypress + test-storybooks-portable-vitest3: + description: test-storybooks-portable-vitest3 + executor: + name: sb_playwright + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Install dependencies + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + command: yarn install --no-immutable + environment: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + - run: + name: Run Playwright E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + command: yarn playwright-e2e workflows: generated: jobs: @@ -862,7 +942,13 @@ workflows: - test-storybooks-pnp: requires: - test-storybooks - - test-storybooks-react-vite-default-ts: + - test-storybooks-portable-react: + requires: + - test-storybooks + - test-storybooks-portable-vue3: + requires: + - test-storybooks + - test-storybooks-portable-vitest3: requires: - test-storybooks when: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index d27304ec78d4..764c8b24c52f 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1,3 +1,4 @@ +import { readFileSync } from 'node:fs'; import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies @@ -587,8 +588,10 @@ const testStorybooksPNP = defineJob( }, ['test-storybooks'] ); -const testStorybooksPortableReact = defineJob( - 'test-storybooks-react-vite-default-ts', + +const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); +const testStorybooksPortableVitest3 = defineJob( + 'test-storybooks-portable-vitest3', { executor: { name: 'sb_playwright', @@ -601,7 +604,7 @@ const testStorybooksPortableReact = defineJob( { run: { name: 'Install dependencies', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', command: 'yarn install --no-immutable', environment: { YARN_ENABLE_IMMUTABLE_INSTALLS: false, @@ -611,7 +614,7 @@ const testStorybooksPortableReact = defineJob( { run: { name: 'Run Playwright E2E tests', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', command: 'yarn playwright-e2e', }, }, @@ -785,7 +788,14 @@ const jobs = { type: 'no-op', }, [testStorybooksPNP.id]: testStorybooksPNP.implementation, - [testStorybooksPortableReact.id]: testStorybooksPortableReact.implementation, + ...testStorybooksPortables.reduce( + (acc, test) => { + acc[test.id] = test.implementation; + return acc; + }, + {} as Record + ), + [testStorybooksPortableVitest3.id]: testStorybooksPortableVitest3.implementation, }; const orbs = { @@ -874,9 +884,14 @@ const workflows = { requires: testStorybooksPNP.requires, }, }, + ...testStorybooksPortables.map((test) => ({ + [test.id]: { + requires: test.requires, + }, + })), { - [testStorybooksPortableReact.id]: { - requires: testStorybooksPortableReact.requires, + [testStorybooksPortableVitest3.id]: { + requires: testStorybooksPortableVitest3.requires, }, }, ], @@ -897,6 +912,78 @@ export const data = { workflows, }; +function definePortableStoryTest(directory: string) { + const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; + + const scripts = JSON.parse( + readFileSync(join(import.meta.dirname, '..', '..', working_directory, 'package.json'), 'utf8') + ).scripts; + return defineJob( + `test-storybooks-portable-${directory}`, + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Install dependencies', + working_directory, + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + }, + }, + { + run: { + name: 'Run Jest tests', + working_directory, + command: 'yarn jest', + }, + }, + { + run: { + name: 'Run Vitest tests', + working_directory, + command: 'yarn vitest', + }, + }, + { + run: { + name: 'Run Playwright CT tests', + working_directory, + command: 'yarn playwright-ct', + }, + }, + ...(scripts['playwright-e2e'] + ? [ + { + run: { + name: 'Run Playwright E2E tests', + working_directory, + command: 'yarn playwright-e2e', + }, + }, + ] + : []), + { + run: { + name: 'Run Cypress CT tests', + working_directory, + command: 'yarn cypress', + }, + }, + ], + }, + ['test-storybooks'] + ); +} + function defineSandboxJob_build({ name, template, From 841168b8c00be100439b5801f6a2aa058c01a79f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 11 Dec 2025 00:25:31 +0100 Subject: [PATCH 186/310] Update CircleCI configuration to add a new 'knip' job for dependency analysis and enhance existing jobs with Chromatic integration. Adjust job definitions for improved clarity and functionality. --- .circleci/config.generated.yml | 29 ++++++++++-- scripts/ci/data.ts | 82 +++++++++++++++++++++++++--------- 2 files changed, 88 insertions(+), 23 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 74538e0d1419..2847ff0bc17b 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -403,11 +403,28 @@ jobs: name: TypeCheck scripts working_directory: scripts command: yarn check - - run: - name: Ensure no changes pending - command: git diff --exit-code - report-workflow-on-failure - cancel-workflow-on-failure + knip: + description: knip + executor: + name: sb_node_22_classic + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Run Knip + working_directory: code + command: yarn knip ui: description: ui executor: @@ -666,6 +683,9 @@ jobs: - run: name: Build storybook command: yarn task build --template react-vite/default-ts --no-link -s build + - run: + name: Running Chromatic + command: yarn task chromatic --template react-vite/default-ts --no-link -s chromatic - run: name: Serve storybook background: true @@ -906,6 +926,9 @@ workflows: - check: requires: - build-linux + - knip: + requires: + - build-linux - package-benchmarks: requires: - build-linux diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 764c8b24c52f..8da792637c6b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -273,7 +273,10 @@ function defineSandboxFlow(name: K) { name: names.build, template: name, needs: [ids.create], - options: { e2e: !skipTasks?.includes('e2e-tests') }, + options: { + e2e: !skipTasks?.includes('e2e-tests'), + chromatic: !skipTasks?.includes('chromatic'), + }, }), defineSandboxJob_dev({ name: names.dev, @@ -453,7 +456,6 @@ const check = defineJob( command: 'yarn check', }, }, - git.check(), 'report-workflow-on-failure', 'cancel-workflow-on-failure', ], @@ -461,6 +463,29 @@ const check = defineJob( [linux_build.id] ); +const knip = defineJob( + 'knip', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Run Knip', + working_directory: `code`, + command: 'yarn knip', + }, + }, + ], + }, + [linux_build.id] +); + const linux_unitTests = defineJob( 'unit-tests-linux', { @@ -556,11 +581,12 @@ const packageBenchmarks = defineJob( [linux_build.id] ); -const testStorybooksPNP = defineJob( - 'test-storybooks-pnp', +const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); +const testStorybooksPortableVitest3 = defineJob( + 'test-storybooks-portable-vitest3', { executor: { - name: 'sb_node_22_classic', + name: 'sb_playwright', class: 'medium', }, steps: [ @@ -570,7 +596,7 @@ const testStorybooksPNP = defineJob( { run: { name: 'Install dependencies', - working_directory: 'test-storybooks/yarn-pnp', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', command: 'yarn install --no-immutable', environment: { YARN_ENABLE_IMMUTABLE_INSTALLS: false, @@ -579,22 +605,20 @@ const testStorybooksPNP = defineJob( }, { run: { - name: 'Run Storybook smoke test', - working_directory: 'test-storybooks/yarn-pnp', - command: 'yarn storybook --smoke-test', + name: 'Run Playwright E2E tests', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + command: 'yarn playwright-e2e', }, }, ], }, ['test-storybooks'] ); - -const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); -const testStorybooksPortableVitest3 = defineJob( - 'test-storybooks-portable-vitest3', +const testStorybooksPNP = defineJob( + 'test-storybooks-pnp', { executor: { - name: 'sb_playwright', + name: 'sb_node_22_classic', class: 'medium', }, steps: [ @@ -604,7 +628,7 @@ const testStorybooksPortableVitest3 = defineJob( { run: { name: 'Install dependencies', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + working_directory: 'test-storybooks/yarn-pnp', command: 'yarn install --no-immutable', environment: { YARN_ENABLE_IMMUTABLE_INSTALLS: false, @@ -613,9 +637,9 @@ const testStorybooksPortableVitest3 = defineJob( }, { run: { - name: 'Run Playwright E2E tests', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - command: 'yarn playwright-e2e', + name: 'Run Storybook smoke test', + working_directory: 'test-storybooks/yarn-pnp', + command: 'yarn storybook --smoke-test', }, }, ], @@ -746,6 +770,7 @@ const jobs = { [linux_build.id]: linux_build.implementation, [windows_build.id]: windows_build.implementation, [check.id]: check.implementation, + [knip.id]: knip.implementation, [uiTests.id]: uiTests.implementation, [linux_unitTests.id]: linux_unitTests.implementation, [windows_unitTests.id]: windows_unitTests.implementation, @@ -838,6 +863,11 @@ const workflows = { requires: check.requires, }, }, + { + [knip.id]: { + requires: knip.requires, + }, + }, { [packageBenchmarks.id]: { requires: packageBenchmarks.requires, @@ -915,9 +945,10 @@ export const data = { function definePortableStoryTest(directory: string) { const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; - const scripts = JSON.parse( + const { scripts } = JSON.parse( readFileSync(join(import.meta.dirname, '..', '..', working_directory, 'package.json'), 'utf8') - ).scripts; + ); + return defineJob( `test-storybooks-portable-${directory}`, { @@ -995,6 +1026,7 @@ function defineSandboxJob_build({ template: string; options: { e2e: boolean; + chromatic: boolean; }; }) { const executor: JobImplementation['executor'] = options.e2e @@ -1021,6 +1053,16 @@ function defineSandboxJob_build({ command: `yarn task build --template ${template} --no-link -s build`, }, }, + ...(options.chromatic + ? [ + { + run: { + name: 'Running Chromatic', + command: `yarn task chromatic --template ${template} --no-link -s chromatic`, + }, + }, + ] + : []), ...(options.e2e ? [ { From 4a2eaa38ff8e660bf193a18a2f91b5aa7080654a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 11 Dec 2025 17:29:35 +0100 Subject: [PATCH 187/310] Update CircleCI configuration to modify the 'knip' job command for improved error handling and adjust git checkout depth for better performance. Refactor git checkout options for clarity. --- .circleci/config.generated.yml | 4 ++-- scripts/ci/data.ts | 4 ++-- scripts/ci/utils.ts | 20 +++++++++++--------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 2847ff0bc17b..76b53a009f80 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -424,7 +424,7 @@ jobs: - run: name: Run Knip working_directory: code - command: yarn knip + command: yarn knip --no-exit-code ui: description: ui executor: @@ -671,7 +671,7 @@ jobs: class: xlarge steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 + clone_options: --depth 500 - attach_workspace: at: /tmp - restore_cache: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 8da792637c6b..8af871280862 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -478,7 +478,7 @@ const knip = defineJob( run: { name: 'Run Knip', working_directory: `code`, - command: 'yarn knip', + command: 'yarn knip --no-exit-code', }, }, ], @@ -1044,7 +1044,7 @@ function defineSandboxJob_build({ { executor, steps: [ - git.checkout(), + git.checkout({ shallow: false }), workspace.attach(), cache.attach(CACHE_KEYS()), { diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 697c20ff91c2..a88cadcb9e9a 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -51,18 +51,20 @@ export const artifact = { export const git = { checkout: ({ forceHttps = false, shallow = true } = {}) => { - const configs = forceHttps - ? [ - '--config url."https://github.com/".insteadOf=ssh://git@github.com/', - '--config url."https://github.com/".insteadOf=git@github.com:', - ].join(' ') - : ''; - - const depth = shallow ? '--depth 1' : ''; + const flags = []; + if (shallow) { + flags.push('--depth 1'); + } else { + flags.push('--depth 500'); + } + if (forceHttps) { + flags.push('--config url."https://github.com/".insteadOf=ssh://git@github.com/'); + flags.push('--config url."https://github.com/".insteadOf=git@github.com:'); + } return { 'git-shallow-clone/checkout_advanced': { - clone_options: `${depth} ${configs}`.trim(), + clone_options: flags.join(' '), }, }; }, From 339dcc5db5c928f36b9ba6b729d7042f584ac5ef Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 11 Dec 2025 18:03:22 +0100 Subject: [PATCH 188/310] Refactor CircleCI configuration to reintroduce the Chromatic job for Storybook, enhancing the build process. Update job definitions to improve clarity and functionality, while removing redundant Chromatic steps from the build job. --- .circleci/config.generated.yml | 24 ++++++++++++++++++--- scripts/ci/data.ts | 39 ++++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 76b53a009f80..f35ac18f7055 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -683,9 +683,6 @@ jobs: - run: name: Build storybook command: yarn task build --template react-vite/default-ts --no-link -s build - - run: - name: Running Chromatic - command: yarn task chromatic --template react-vite/default-ts --no-link -s chromatic - run: name: Serve storybook background: true @@ -729,6 +726,24 @@ jobs: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + react-vite-default-ts--chromatic: + description: react-vite/default-ts (chromatic) + executor: + name: sb_node_22_classic + class: medium + steps: + - checkout + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Running Chromatic + command: yarn task chromatic --template react-vite/default-ts --no-link -s chromatic react-vite-default-ts--dev-windows: description: react-vite-default-ts--dev-windows executor: @@ -953,6 +968,9 @@ workflows: - react-vite-default-ts--dev: requires: - react-vite-default-ts--create + - react-vite-default-ts--chromatic: + requires: + - react-vite-default-ts--build - react-vite-default-ts--dev-windows: requires: - react-vite-default-ts--create diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 8af871280862..d33d4fa342dc 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -213,11 +213,13 @@ function defineSandboxFlow(name: K) { create: `${name} (create)`, build: `${name} (build)`, dev: `${name} (dev)`, + chromatic: `${name} (chromatic)`, }; const ids = { create: `${toId(names.create)}`, build: `${toId(names.build)}`, dev: `${toId(names.dev)}`, + chromatic: `${toId(names.chromatic)}`, }; const jobs = [ @@ -275,7 +277,6 @@ function defineSandboxFlow(name: K) { needs: [ids.create], options: { e2e: !skipTasks?.includes('e2e-tests'), - chromatic: !skipTasks?.includes('chromatic'), }, }), defineSandboxJob_dev({ @@ -284,7 +285,30 @@ function defineSandboxFlow(name: K) { needs: [ids.create], options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, }), - ]; + !skipTasks?.includes('chromatic') + ? defineJob( + names.chromatic, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + 'checkout', + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Running Chromatic', + command: `yarn task chromatic --template ${name} --no-link -s chromatic`, + }, + }, + ], + }, + [ids.build] + ) + : undefined, + ].filter(Boolean); return { jobs, workflow: jobs.map((job) => { @@ -1026,7 +1050,6 @@ function defineSandboxJob_build({ template: string; options: { e2e: boolean; - chromatic: boolean; }; }) { const executor: JobImplementation['executor'] = options.e2e @@ -1053,16 +1076,6 @@ function defineSandboxJob_build({ command: `yarn task build --template ${template} --no-link -s build`, }, }, - ...(options.chromatic - ? [ - { - run: { - name: 'Running Chromatic', - command: `yarn task chromatic --template ${template} --no-link -s chromatic`, - }, - }, - ] - : []), ...(options.e2e ? [ { From bacf63efccc91ee34bf85654f0f5e24b8979303b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 12 Dec 2025 10:24:24 +0100 Subject: [PATCH 189/310] Enhance CircleCI configuration by adding workspace persistence for Storybook build artifacts and updating the sandbox job to include a Chromatic option. This improves the build process and artifact management. --- .circleci/config.generated.yml | 4 ++++ scripts/ci/data.ts | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index f35ac18f7055..e76df1a27cee 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -683,6 +683,10 @@ jobs: - run: name: Build storybook command: yarn task build --template react-vite/default-ts --no-link -s build + - persist_to_workspace: + paths: + - storybook-sandboxes/react-vite-default-ts--build/storybook-static + root: /tmp - run: name: Serve storybook background: true diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index d33d4fa342dc..2c6a8b48ecfe 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -272,11 +272,13 @@ function defineSandboxFlow(name: K) { ['sandboxes'] ), defineSandboxJob_build({ + id: ids.build, name: names.build, template: name, needs: [ids.create], options: { e2e: !skipTasks?.includes('e2e-tests'), + chromatic: !skipTasks?.includes('chromatic'), }, }), defineSandboxJob_dev({ @@ -1040,16 +1042,19 @@ function definePortableStoryTest(directory: string) { } function defineSandboxJob_build({ + id, name, template, needs, options, }: { + id: string; name: string; needs: string[]; template: string; options: { e2e: boolean; + chromatic: boolean; }; }) { const executor: JobImplementation['executor'] = options.e2e @@ -1076,6 +1081,9 @@ function defineSandboxJob_build({ command: `yarn task build --template ${template} --no-link -s build`, }, }, + ...(options.chromatic + ? [workspace.persist([`${SANDBOX_DIR}/${id}/storybook-static`])] + : []), ...(options.e2e ? [ { From 4ce6b6ef5cca2a5891b81f2ee5b3b713dbe25a45 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 12 Dec 2025 10:56:05 +0100 Subject: [PATCH 190/310] Update CircleCI configuration to change resource class for the generate-and-run-config job and modify dependency installation step for improved clarity and efficiency. --- .circleci/config.generated.yml | 2 +- .circleci/config.yml | 9 ++++----- scripts/ci/data.ts | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index e76df1a27cee..bf293f8f8e59 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -685,7 +685,7 @@ jobs: command: yarn task build --template react-vite/default-ts --no-link -s build - persist_to_workspace: paths: - - storybook-sandboxes/react-vite-default-ts--build/storybook-static + - storybook-sandboxes/react-vite-default-ts/storybook-static root: /tmp - run: name: Serve storybook diff --git a/.circleci/config.yml b/.circleci/config.yml index 70a9a489dbfc..fff5ca5a59f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,16 +32,15 @@ jobs: generate-and-run-config: executor: name: node/default - resource_class: medium+ + resource_class: medium steps: - node/install: install-yarn: true - git-shallow-clone/checkout_advanced: clone_options: '--depth 1' - - node/install-packages: - app-dir: . - cache-only-lockfile: true - pkg-manager: yarn + - run: + name: Install dependencies + command: yarn workspaces focus @storybook/scripts - run: name: Generate config command: | diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 2c6a8b48ecfe..9194be1a81c4 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -272,7 +272,7 @@ function defineSandboxFlow(name: K) { ['sandboxes'] ), defineSandboxJob_build({ - id: ids.build, + directory: id, name: names.build, template: name, needs: [ids.create], @@ -1042,13 +1042,13 @@ function definePortableStoryTest(directory: string) { } function defineSandboxJob_build({ - id, + directory, name, template, needs, options, }: { - id: string; + directory: string; name: string; needs: string[]; template: string; @@ -1082,7 +1082,7 @@ function defineSandboxJob_build({ }, }, ...(options.chromatic - ? [workspace.persist([`${SANDBOX_DIR}/${id}/storybook-static`])] + ? [workspace.persist([`${SANDBOX_DIR}/${directory}/storybook-static`])] : []), ...(options.e2e ? [ From e1c8dc91dd179b523bab4387a3ab10983efc8b96 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 12 Dec 2025 15:47:40 +0100 Subject: [PATCH 191/310] Enhance CircleCI configuration by adding a step to copy the sandbox to the working directory, ensuring Git history is preserved for Chromatic baselines. Update the Chromatic job to set the STORYBOOK_SANDBOX_ROOT environment variable for improved functionality. --- .circleci/config.generated.yml | 5 +++++ scripts/ci/data.ts | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index bf293f8f8e59..e8b2e7955104 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -745,9 +745,14 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules + - run: + name: Copy sandbox to working directory + command: cp /tmp/storybook-sandboxes /tmp/project/sandbox -r --remove-destination - run: name: Running Chromatic command: yarn task chromatic --template react-vite/default-ts --no-link -s chromatic + environment: + STORYBOOK_SANDBOX_ROOT: ./sandbox react-vite-default-ts--dev-windows: description: react-vite-default-ts--dev-windows executor: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 9194be1a81c4..0d23396c840f 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -299,10 +299,20 @@ function defineSandboxFlow(name: K) { 'checkout', workspace.attach(), cache.attach(CACHE_KEYS()), + { + // we copy to the working directory to get git history, which chromatic needs for baselines + run: { + name: 'Copy sandbox to working directory', + command: `cp ${join(ROOT_DIR, SANDBOX_DIR)} ${join(ROOT_DIR, WORKING_DIR, 'sandbox')} -r --remove-destination`, + }, + }, { run: { name: 'Running Chromatic', command: `yarn task chromatic --template ${name} --no-link -s chromatic`, + environment: { + STORYBOOK_SANDBOX_ROOT: `./sandbox`, + }, }, }, ], From fa06cc9f26856a2bc4d5036e5b2926f6a32e68af Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Dec 2025 13:41:25 +0100 Subject: [PATCH 192/310] Add Windows job to initialize empty Storybook directory and run smoke tests in CircleCI configuration --- .circleci/config.generated.yml | 55 ++++++++++++++++++++++++++++++++ scripts/ci/data.ts | 57 ++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index e8b2e7955104..a7554bcd6b35 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -941,6 +941,55 @@ jobs: name: Run Playwright E2E tests working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 command: yarn playwright-e2e + init-empty: + type: no-op + init-empty-windows: + description: init-empty-windows + executor: + name: win/default + size: xlarge + shell: bash.exe + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate + - attach_workspace: + at: C:\Users\circleci + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Windows NPM) + working_directory: C:\Users\circleci + command: |- + mkdir empty-react-vite-ts + cd empty-react-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + - run: + name: Run storybook smoke test + working_directory: C:\Users\circleci\empty-react-vite-ts + command: npm run storybook -- --smoke-test workflows: generated: jobs: @@ -1001,6 +1050,12 @@ workflows: - test-storybooks-portable-vitest3: requires: - test-storybooks + - empty-init: + requires: + - build-linux + - init-empty-windows: + requires: + - init-empty when: equal: - docs diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 0d23396c840f..29d16184e3d9 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -802,6 +802,49 @@ const windows_sandbox_dev = defineJob( [sandboxes[0].jobs[0].id] ); +const initEmptyWindows = defineJob( + 'init-empty-windows', + { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + git.checkout({ forceHttps: true }), + node.installOnWindows(), + workspace.attach('C:\\Users\\circleci'), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Windows NPM)', + working_directory: 'C:\\Users\\circleci', + command: [ + `mkdir empty-react-vite-ts`, + `cd empty-react-vite-ts`, + `npm set registry http://localhost:6001`, + `npx storybook init --yes --package-manager npm`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, + }, + }, + { + run: { + name: 'Run storybook smoke test', + working_directory: 'C:\\Users\\circleci\\empty-react-vite-ts', + command: 'npm run storybook -- --smoke-test', + }, + }, + ], + }, + ['init-empty'] +); + const jobs = { [linux_build.id]: linux_build.implementation, [windows_build.id]: windows_build.implementation, @@ -857,6 +900,10 @@ const jobs = { {} as Record ), [testStorybooksPortableVitest3.id]: testStorybooksPortableVitest3.implementation, + ['init-empty']: { + type: 'no-op', + }, + [initEmptyWindows.id]: initEmptyWindows.implementation, }; const orbs = { @@ -960,6 +1007,16 @@ const workflows = { requires: testStorybooksPortableVitest3.requires, }, }, + { + ['empty-init']: { + requires: [linux_build.id], + }, + }, + { + [initEmptyWindows.id]: { + requires: initEmptyWindows.requires, + }, + }, ], when: { equal: ['docs', '<< pipeline.parameters.workflow >>'], From 81c6eb7ccfcbcf82f7cbfbf7be17fa1445ff14a1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Dec 2025 13:43:30 +0100 Subject: [PATCH 193/310] Rename 'empty-init' to 'init-empty' in CircleCI configuration for consistency across workflows. --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index a7554bcd6b35..761171035675 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1050,7 +1050,7 @@ workflows: - test-storybooks-portable-vitest3: requires: - test-storybooks - - empty-init: + - init-empty: requires: - build-linux - init-empty-windows: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 29d16184e3d9..46bcc846b0cb 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1008,7 +1008,7 @@ const workflows = { }, }, { - ['empty-init']: { + ['init-empty']: { requires: [linux_build.id], }, }, From b3cd7f3fd7c985289be2171731d3f3ff36898fe9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Dec 2025 13:58:49 +0100 Subject: [PATCH 194/310] Add installation step in CircleCI configuration for Windows job to ensure dependencies are installed before running tests. --- .circleci/config.generated.yml | 4 ++++ scripts/ci/data.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 761171035675..980a489892aa 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -963,6 +963,10 @@ jobs: corepack prepare yarn@stable --activate - attach_workspace: at: C:\Users\circleci + - run: + name: Run Install + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts + command: yarn install - run: name: Verdaccio working_directory: code diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 46bcc846b0cb..3f1db203d612 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -814,6 +814,13 @@ const initEmptyWindows = defineJob( git.checkout({ forceHttps: true }), node.installOnWindows(), workspace.attach('C:\\Users\\circleci'), + { + run: { + name: 'Run Install', + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, + command: 'yarn install', + }, + }, verdaccio.start(), server.wait([...verdaccio.ports]), { From f304602c2a1f4cefb5d57ebec95105eefdf57fa2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Dec 2025 14:13:06 +0100 Subject: [PATCH 195/310] Remove hardcoded working directory path in CircleCI configuration for Windows job to improve portability and flexibility. --- scripts/ci/data.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 3f1db203d612..a7c07f088680 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -817,7 +817,6 @@ const initEmptyWindows = defineJob( { run: { name: 'Run Install', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, command: 'yarn install', }, }, From 21a43eb7276360587700197ac835ee5da3d57fce Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Dec 2025 14:22:25 +0100 Subject: [PATCH 196/310] Update CircleCI configuration to change executor resource size from 'xlarge' to 'medium' for Windows job, optimizing resource allocation. --- .circleci/config.generated.yml | 3 +-- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 980a489892aa..9bea1e405b38 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -947,7 +947,7 @@ jobs: description: init-empty-windows executor: name: win/default - size: xlarge + size: medium shell: bash.exe steps: - git-shallow-clone/checkout_advanced: @@ -965,7 +965,6 @@ jobs: at: C:\Users\circleci - run: name: Run Install - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts command: yarn install - run: name: Verdaccio diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index a7c07f088680..ede4daa1461c 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -807,7 +807,7 @@ const initEmptyWindows = defineJob( { executor: { name: 'win/default', - size: 'xlarge', + size: 'medium', shell: 'bash.exe', }, steps: [ From 224e6ff02367b5b9889a21d0f825b66d955d21d0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Dec 2025 14:40:09 +0100 Subject: [PATCH 197/310] Update CircleCI configuration to modify E2E test commands, changing the flag from 'never' to 'e2e-tests' and 'e2e-tests-dev' for improved clarity and consistency in test execution. --- .circleci/config.generated.yml | 8 ++++---- scripts/ci/data.ts | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 9bea1e405b38..90feffd804bb 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -594,7 +594,7 @@ jobs: - run: name: Running E2E Tests working_directory: code - command: yarn task e2e-tests --template react-vite/default-ts --no-link -s never + command: yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests pretty-docs: executor: name: sb_node_22_classic @@ -699,7 +699,7 @@ jobs: name: Running E2E Tests command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests" --verbose --index=0 --total=1 react-vite-default-ts--dev: description: react-vite/default-ts (dev) executor: @@ -729,7 +729,7 @@ jobs: name: Running E2E Tests command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never" --verbose --index=0 --total=1 + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev" --verbose --index=0 --total=1 react-vite-default-ts--chromatic: description: react-vite/default-ts (chromatic) executor: @@ -806,7 +806,7 @@ jobs: - run: name: Running E2E Tests working_directory: code - command: yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never + command: yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev test-storybooks: type: no-op test-storybooks-pnp: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index ede4daa1461c..ef79ce00059a 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -740,7 +740,7 @@ const windows_sandbox_build = defineJob( run: { name: 'Running E2E Tests', working_directory: 'code', - command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s never', + command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests', }, }, ], @@ -794,7 +794,8 @@ const windows_sandbox_dev = defineJob( run: { name: 'Running E2E Tests', working_directory: 'code', - command: 'yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s never', + command: + 'yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev', }, }, ], @@ -1172,7 +1173,7 @@ function defineSandboxJob_build({ name: 'Running E2E Tests', command: [ `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${template} --no-link -s never" --verbose --index=0 --total=1`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${template} --no-link -s e2e-tests" --verbose --index=0 --total=1`, ].join('\n'), }, }, @@ -1230,7 +1231,7 @@ function defineSandboxJob_dev({ name: 'Running E2E Tests', command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${template} --no-link -s never" --verbose --index=0 --total=1`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${template} --no-link -s e2e-tests-dev" --verbose --index=0 --total=1`, ].join('\n'), }, }, From 6a3ff384040dbd300ebae7c788e57c427c456072 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 15 Dec 2025 14:49:16 +0100 Subject: [PATCH 198/310] Update yarn.lock to reflect changes in es-abstract versions and remove obsolete entries for improved dependency management. --- yarn.lock | 72 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 70 deletions(-) diff --git a/yarn.lock b/yarn.lock index 130bfdd6b3f5..79577b30bacb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15741,7 +15741,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.24.0": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9, es-abstract@npm:^1.24.0": version: 1.24.0 resolution: "es-abstract@npm:1.24.0" dependencies: @@ -15803,65 +15803,6 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.9": - version: 1.23.9 - resolution: "es-abstract@npm:1.23.9" - dependencies: - array-buffer-byte-length: "npm:^1.0.2" - arraybuffer.prototype.slice: "npm:^1.0.4" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - data-view-buffer: "npm:^1.0.2" - data-view-byte-length: "npm:^1.0.2" - data-view-byte-offset: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-set-tostringtag: "npm:^2.1.0" - es-to-primitive: "npm:^1.3.0" - function.prototype.name: "npm:^1.1.8" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.0" - get-symbol-description: "npm:^1.1.0" - globalthis: "npm:^1.0.4" - gopd: "npm:^1.2.0" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - internal-slot: "npm:^1.1.0" - is-array-buffer: "npm:^3.0.5" - is-callable: "npm:^1.2.7" - is-data-view: "npm:^1.0.2" - is-regex: "npm:^1.2.1" - is-shared-array-buffer: "npm:^1.0.4" - is-string: "npm:^1.1.1" - is-typed-array: "npm:^1.1.15" - is-weakref: "npm:^1.1.0" - math-intrinsics: "npm:^1.1.0" - object-inspect: "npm:^1.13.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.7" - own-keys: "npm:^1.0.1" - regexp.prototype.flags: "npm:^1.5.3" - safe-array-concat: "npm:^1.1.3" - safe-push-apply: "npm:^1.0.0" - safe-regex-test: "npm:^1.1.0" - set-proto: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.10" - string.prototype.trimend: "npm:^1.0.9" - string.prototype.trimstart: "npm:^1.0.8" - typed-array-buffer: "npm:^1.0.3" - typed-array-byte-length: "npm:^1.0.3" - typed-array-byte-offset: "npm:^1.0.4" - typed-array-length: "npm:^1.0.7" - unbox-primitive: "npm:^1.1.0" - which-typed-array: "npm:^1.1.18" - checksum: 10c0/1de229c9e08fe13c17fe5abaec8221545dfcd57e51f64909599a6ae896df84b8fd2f7d16c60cb00d7bf495b9298ca3581aded19939d4b7276854a4b066f8422b - languageName: node - linkType: hard - "es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": version: 1.0.1 resolution: "es-define-property@npm:1.0.1" @@ -20156,15 +20097,6 @@ __metadata: languageName: node linkType: hard -"is-weakref@npm:^1.1.0": - version: 1.1.0 - resolution: "is-weakref@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - checksum: 10c0/aa835f62e29cb60132ecb3ec7d11bd0f39ec7322325abe8412b805aef47153ec2daefdb21759b049711c674f49b13202a31d8d126bcdff7d8671c78babd4ae5b - languageName: node - linkType: hard - "is-weakset@npm:^2.0.3": version: 2.0.4 resolution: "is-weakset@npm:2.0.4" @@ -31703,7 +31635,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18, which-typed-array@npm:^1.1.19, which-typed-array@npm:^1.1.2": +"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.19, which-typed-array@npm:^1.1.2": version: 1.1.19 resolution: "which-typed-array@npm:1.1.19" dependencies: From f59715887fea0b53eeebeb17382f1734b8d6cb1b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 11:11:26 +0100 Subject: [PATCH 199/310] Add Linux jobs to CircleCI configuration for initializing empty Storybook directories and running smoke tests --- .circleci/config.generated.yml | 184 ++++++++++++++++++++++++++++++++- scripts/ci/data.ts | 60 ++++++++++- 2 files changed, 237 insertions(+), 7 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 90feffd804bb..098891a5f0aa 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -993,6 +993,174 @@ jobs: name: Run storybook smoke test working_directory: C:\Users\circleci\empty-react-vite-ts command: npm run storybook -- --smoke-test + init-empty-react-vite-ts: + description: init-empty-react-vite-ts + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Linux NPM) + command: |- + mkdir empty-react-vite-ts + cd empty-react-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + - run: + name: Run storybook smoke test + working_directory: empty-react-vite-ts + command: npm run storybook -- --smoke-test + init-empty-nextjs-ts: + description: init-empty-nextjs-ts + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Linux NPM) + command: |- + mkdir empty-nextjs-ts + cd empty-nextjs-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: nextjs-ts + - run: + name: Run storybook smoke test + working_directory: empty-nextjs-ts + command: npm run storybook -- --smoke-test + init-empty-vue-vite-ts: + description: init-empty-vue-vite-ts + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Linux NPM) + command: |- + mkdir empty-vue-vite-ts + cd empty-vue-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: vue-vite-ts + - run: + name: Run storybook smoke test + working_directory: empty-vue-vite-ts + command: npm run storybook -- --smoke-test + init-empty-lit-vite-ts: + description: init-empty-lit-vite-ts + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Linux NPM) + command: |- + mkdir empty-lit-vite-ts + cd empty-lit-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: lit-vite-ts + - run: + name: Run storybook smoke test + working_directory: empty-lit-vite-ts + command: npm run storybook -- --smoke-test workflows: generated: jobs: @@ -1059,7 +1227,15 @@ workflows: - init-empty-windows: requires: - init-empty - when: - equal: - - docs - - << pipeline.parameters.workflow >> + - init-empty-react-vite-ts: + requires: + - init-empty + - init-empty-nextjs-ts: + requires: + - init-empty + - init-empty-vue-vite-ts: + requires: + - init-empty + - init-empty-lit-vite-ts: + requires: + - init-empty diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index ef79ce00059a..a47807a445ea 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -852,6 +852,51 @@ const initEmptyWindows = defineJob( ['init-empty'] ); +const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map( + (template) => + defineJob( + `init-empty-${template}`, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Linux NPM)', + command: [ + `mkdir empty-${template}`, + `cd empty-${template}`, + `npm set registry http://localhost:6001`, + `npx storybook init --yes --package-manager npm`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: template, + }, + }, + }, + { + run: { + name: 'Run storybook smoke test', + working_directory: `empty-${template}`, + command: 'npm run storybook -- --smoke-test', + }, + }, + ], + }, + + ['init-empty'] + ) +); + const jobs = { [linux_build.id]: linux_build.implementation, [windows_build.id]: windows_build.implementation, @@ -911,6 +956,13 @@ const jobs = { type: 'no-op', }, [initEmptyWindows.id]: initEmptyWindows.implementation, + ...initEmptyLinux.reduce( + (acc, init) => { + acc[init.id] = init.implementation; + return acc; + }, + {} as Record + ), }; const orbs = { @@ -1024,10 +1076,12 @@ const workflows = { requires: initEmptyWindows.requires, }, }, + ...initEmptyLinux.map((init) => ({ + [init.id]: { + requires: init.requires, + }, + })), ], - when: { - equal: ['docs', '<< pipeline.parameters.workflow >>'], - }, }, }; From 02ad233294b6ad5b337014e13d8079eda4bdfee2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 11:48:07 +0100 Subject: [PATCH 200/310] Add working directory specification for Linux Storybook initialization in CircleCI configuration --- .circleci/config.generated.yml | 4 ++++ scripts/ci/data.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 098891a5f0aa..a32c5a1a5172 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1022,6 +1022,7 @@ jobs: yarn wait-on tcp:127.0.0.1:6002 - run: name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp command: |- mkdir empty-react-vite-ts cd empty-react-vite-ts @@ -1064,6 +1065,7 @@ jobs: yarn wait-on tcp:127.0.0.1:6002 - run: name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp command: |- mkdir empty-nextjs-ts cd empty-nextjs-ts @@ -1106,6 +1108,7 @@ jobs: yarn wait-on tcp:127.0.0.1:6002 - run: name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp command: |- mkdir empty-vue-vite-ts cd empty-vue-vite-ts @@ -1148,6 +1151,7 @@ jobs: yarn wait-on tcp:127.0.0.1:6002 - run: name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp command: |- mkdir empty-lit-vite-ts cd empty-lit-vite-ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index a47807a445ea..b26899dc2dca 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -870,6 +870,7 @@ const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-t { run: { name: 'Storybook init from empty directory (Linux NPM)', + working_directory: '/tmp', command: [ `mkdir empty-${template}`, `cd empty-${template}`, From 4ddc3500213e43ec3b305d4f73ca233872fc8c4e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 11:57:27 +0100 Subject: [PATCH 201/310] Update working directory paths for Storybook smoke tests in CircleCI configuration --- .circleci/config.generated.yml | 8 ++++---- scripts/ci/data.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index a32c5a1a5172..ec7d0cd6e174 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1034,7 +1034,7 @@ jobs: STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - run: name: Run storybook smoke test - working_directory: empty-react-vite-ts + working_directory: /tmp/empty-react-vite-ts command: npm run storybook -- --smoke-test init-empty-nextjs-ts: description: init-empty-nextjs-ts @@ -1077,7 +1077,7 @@ jobs: STORYBOOK_INIT_EMPTY_TYPE: nextjs-ts - run: name: Run storybook smoke test - working_directory: empty-nextjs-ts + working_directory: /tmp/empty-nextjs-ts command: npm run storybook -- --smoke-test init-empty-vue-vite-ts: description: init-empty-vue-vite-ts @@ -1120,7 +1120,7 @@ jobs: STORYBOOK_INIT_EMPTY_TYPE: vue-vite-ts - run: name: Run storybook smoke test - working_directory: empty-vue-vite-ts + working_directory: /tmp/empty-vue-vite-ts command: npm run storybook -- --smoke-test init-empty-lit-vite-ts: description: init-empty-lit-vite-ts @@ -1163,7 +1163,7 @@ jobs: STORYBOOK_INIT_EMPTY_TYPE: lit-vite-ts - run: name: Run storybook smoke test - working_directory: empty-lit-vite-ts + working_directory: /tmp/empty-lit-vite-ts command: npm run storybook -- --smoke-test workflows: generated: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index b26899dc2dca..62cf382cbd9e 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -887,7 +887,7 @@ const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-t { run: { name: 'Run storybook smoke test', - working_directory: `empty-${template}`, + working_directory: `/tmp/empty-${template}`, command: 'npm run storybook -- --smoke-test', }, }, From 575d4d803d22b93280c6e51def7e8813cec3a10e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 12:18:52 +0100 Subject: [PATCH 202/310] Add init-features job to CircleCI configuration for Storybook setup and smoke testing --- .circleci/config.generated.yml | 46 ++++++++++++++++++++++++++++++++ scripts/ci/data.ts | 48 ++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index ec7d0cd6e174..b611ed3b2e02 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1165,6 +1165,49 @@ jobs: name: Run storybook smoke test working_directory: /tmp/empty-lit-vite-ts command: npm run storybook -- --smoke-test + init-features: + description: init-features + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp + command: |- + mkdir empty-react-vite-ts + cd empty-react-vite-ts + npm set registry http://localhost:6001 + npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + - run: + name: Run storybook smoke test + working_directory: /tmp/empty-react-vite-ts + command: npx vitest workflows: generated: jobs: @@ -1243,3 +1286,6 @@ workflows: - init-empty-lit-vite-ts: requires: - init-empty + - init-features: + requires: + - init-empty diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 62cf382cbd9e..6533447bdc2d 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -898,6 +898,48 @@ const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-t ) ); +const initFeatures = defineJob( + 'init-features', + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Linux NPM)', + working_directory: '/tmp', + command: [ + `mkdir empty-react-vite-ts`, + `cd empty-react-vite-ts`, + `npm set registry http://localhost:6001`, + `npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, + }, + }, + { + run: { + name: 'Run storybook smoke test', + working_directory: `/tmp/empty-react-vite-ts`, + command: 'npx vitest', + }, + }, + ], + }, + ['init-empty'] +); + const jobs = { [linux_build.id]: linux_build.implementation, [windows_build.id]: windows_build.implementation, @@ -964,6 +1006,7 @@ const jobs = { }, {} as Record ), + [initFeatures.id]: initFeatures.implementation, }; const orbs = { @@ -1082,6 +1125,11 @@ const workflows = { requires: init.requires, }, })), + { + [initFeatures.id]: { + requires: initFeatures.requires, + }, + }, ], }, }; From 2e4a912fdd25c4392ad459504e8c203ca357a60c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 14:25:31 +0100 Subject: [PATCH 203/310] Add test-runner job to CircleCI configuration for enhanced testing capabilities --- .circleci/config.generated.yml | 22 +++++++++ scripts/ci/data.ts | 81 ++++++++++++++++++++++++++++++---- 2 files changed, 95 insertions(+), 8 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index b611ed3b2e02..9e298726d078 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1208,6 +1208,25 @@ jobs: name: Run storybook smoke test working_directory: /tmp/empty-react-vite-ts command: npx vitest + test-runner: + description: test-runner + executor: + name: sb_playwright + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Running test-runner + command: yarn task test-runner --template react-vite/default-ts --no-link -s test-runner workflows: generated: jobs: @@ -1289,3 +1308,6 @@ workflows: - init-features: requires: - init-empty + - test-runner: + requires: + - react-vite-default-ts--build diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 6533447bdc2d..c8f7cfa31c7b 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -209,17 +209,21 @@ function defineSandboxFlow(name: K) { const data = allTemplates[name as keyof typeof allTemplates]; const { skipTasks } = data; + const path = name.replace('/', '-'); + const names = { create: `${name} (create)`, build: `${name} (build)`, dev: `${name} (dev)`, chromatic: `${name} (chromatic)`, + ['test-runner']: `${name} (test-runner)`, }; const ids = { create: `${toId(names.create)}`, build: `${toId(names.build)}`, dev: `${toId(names.dev)}`, chromatic: `${toId(names.chromatic)}`, + ['test-runner']: `${toId(names['test-runner'])}`, }; const jobs = [ @@ -320,8 +324,42 @@ function defineSandboxFlow(name: K) { [ids.build] ) : undefined, + + /** + * Question: What is this for? Do we want to know if the test-runner works? Or do we want to + * know if the sandbox works? + * + * If it's the first, we actually only need to run the test-runner job once, on any sandbox. If + * it's the second, we need to run the test-runner job for each sandbox, but then we don't need + * to run it when we're already running the chromatic job. + */ + !skipTasks?.includes('test-runner') && skipTasks.includes('chromatic') + ? defineJob( + names['test-runner'], + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + 'checkout', + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Running test-runner', + command: `yarn task test-runner --template ${name} --no-link -s test-runner`, + }, + }, + ], + }, + [ids.build] + ) + : undefined, ].filter(Boolean); return { + name, + path, jobs, workflow: jobs.map((job) => { return { @@ -689,6 +727,28 @@ const sandboxes = [ // 'react-vite/default-js', ].map(defineSandboxFlow); +const testRunner = defineJob( + 'test-runner', + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Running test-runner', + command: `yarn task test-runner --template ${sandboxes[0].name} --no-link -s test-runner`, + }, + }, + ], + }, + [sandboxes[0].jobs[1].id] +); + const windows_sandbox_build = defineJob( `${sandboxes[0].jobs[1].id}-windows`, { @@ -712,7 +772,7 @@ const windows_sandbox_build = defineJob( { run: { name: 'Run Install', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandboxes[0].path}`, command: 'yarn install', }, }, @@ -725,14 +785,14 @@ const windows_sandbox_build = defineJob( { run: { name: 'Build storybook', - command: `yarn task build --template react-vite/default-ts --no-link -s build`, + command: `yarn task build --template ${sandboxes[0].name} --no-link -s build`, }, }, { run: { name: 'Serve storybook', background: true, - command: `yarn task serve --template react-vite/default-ts --no-link -s serve`, + command: `yarn task serve --template ${sandboxes[0].name} --no-link -s serve`, }, }, server.wait(['8001']), @@ -740,7 +800,7 @@ const windows_sandbox_build = defineJob( run: { name: 'Running E2E Tests', working_directory: 'code', - command: 'yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests', + command: `yarn task e2e-tests --template ${sandboxes[0].name} --no-link -s e2e-tests`, }, }, ], @@ -771,7 +831,7 @@ const windows_sandbox_dev = defineJob( { run: { name: 'Run Install', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandboxes[0].path}`, command: 'yarn install', }, }, @@ -785,7 +845,7 @@ const windows_sandbox_dev = defineJob( run: { name: 'Run storybook', background: true, - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\react-vite-default-ts`, + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandboxes[0].path}`, command: 'yarn storybook --port 8001', }, }, @@ -794,8 +854,7 @@ const windows_sandbox_dev = defineJob( run: { name: 'Running E2E Tests', working_directory: 'code', - command: - 'yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev', + command: `yarn task e2e-tests-dev --template ${sandboxes[0].name} --no-link -s e2e-tests-dev`, }, }, ], @@ -1007,6 +1066,7 @@ const jobs = { {} as Record ), [initFeatures.id]: initFeatures.implementation, + [testRunner.id]: testRunner.implementation, }; const orbs = { @@ -1130,6 +1190,11 @@ const workflows = { requires: initFeatures.requires, }, }, + { + [testRunner.id]: { + requires: testRunner.requires, + }, + }, ], }, }; From 9770f9669215d893224db32639fd759b1d675cf2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 14:34:21 +0100 Subject: [PATCH 204/310] Add vitest job to CircleCI configuration for integration testing --- .circleci/config.generated.yml | 28 +++++++++++++++++++++++++--- scripts/ci/data.ts | 29 ++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 9e298726d078..a4003ae113f4 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -753,6 +753,25 @@ jobs: command: yarn task chromatic --template react-vite/default-ts --no-link -s chromatic environment: STORYBOOK_SANDBOX_ROOT: ./sandbox + react-vite-default-ts--vitest: + description: react-vite/default-ts (vitest) + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Running Vitest + command: yarn task vitest-integration --template react-vite/default-ts --no-link -s vitest-integration react-vite-default-ts--dev-windows: description: react-vite-default-ts--dev-windows executor: @@ -1208,8 +1227,8 @@ jobs: name: Run storybook smoke test working_directory: /tmp/empty-react-vite-ts command: npx vitest - test-runner: - description: test-runner + react-vite-default-ts--build-test-runner: + description: react-vite-default-ts--build-test-runner executor: name: sb_playwright class: medium @@ -1266,6 +1285,9 @@ workflows: - react-vite-default-ts--chromatic: requires: - react-vite-default-ts--build + - react-vite-default-ts--vitest: + requires: + - react-vite-default-ts--build - react-vite-default-ts--dev-windows: requires: - react-vite-default-ts--create @@ -1308,6 +1330,6 @@ workflows: - init-features: requires: - init-empty - - test-runner: + - react-vite-default-ts--build-test-runner: requires: - react-vite-default-ts--build diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index c8f7cfa31c7b..c4b2934a6212 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -216,6 +216,7 @@ function defineSandboxFlow(name: K) { build: `${name} (build)`, dev: `${name} (dev)`, chromatic: `${name} (chromatic)`, + vitest: `${name} (vitest)`, ['test-runner']: `${name} (test-runner)`, }; const ids = { @@ -223,6 +224,7 @@ function defineSandboxFlow(name: K) { build: `${toId(names.build)}`, dev: `${toId(names.dev)}`, chromatic: `${toId(names.chromatic)}`, + vitest: `${toId(names.vitest)}`, ['test-runner']: `${toId(names['test-runner'])}`, }; @@ -324,6 +326,29 @@ function defineSandboxFlow(name: K) { [ids.build] ) : undefined, + !skipTasks?.includes('vitest-integration') + ? defineJob( + names.vitest, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Running Vitest', + command: `yarn task vitest-integration --template ${name} --no-link -s vitest-integration`, + }, + }, + ], + }, + [ids.build] + ) + : undefined, /** * Question: What is this for? Do we want to know if the test-runner works? Or do we want to @@ -728,7 +753,7 @@ const sandboxes = [ ].map(defineSandboxFlow); const testRunner = defineJob( - 'test-runner', + `${sandboxes[0].jobs[1].id}-test-runner`, { executor: { name: 'sb_playwright', @@ -1208,6 +1233,8 @@ export const data = { jobs, workflows, + // jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), + // workflows: Object.fromEntries(Object.entries(workflows).sort(([a], [b]) => a.localeCompare(b))), }; function definePortableStoryTest(directory: string) { From 9ac3e7ac9444ba9d70f5d9bea439b6c0a31e44c0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 14:46:00 +0100 Subject: [PATCH 205/310] sorting --- .circleci/config.generated.yml | 900 ++++++++++++++++----------------- scripts/ci/data.ts | 23 +- 2 files changed, 469 insertions(+), 454 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index a4003ae113f4..c638fe652570 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -405,11 +405,13 @@ jobs: command: yarn check - report-workflow-on-failure - cancel-workflow-on-failure - knip: - description: knip + init-empty: + type: no-op + init-empty-lit-vite-ts: + description: init-empty-lit-vite-ts executor: name: sb_node_22_classic - class: xlarge + class: medium steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -422,14 +424,37 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules - run: - name: Run Knip + name: Verdaccio working_directory: code - command: yarn knip --no-exit-code - ui: - description: ui + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp + command: |- + mkdir empty-lit-vite-ts + cd empty-lit-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: lit-vite-ts + - run: + name: Run storybook smoke test + working_directory: /tmp/empty-lit-vite-ts + command: npm run storybook -- --smoke-test + init-empty-nextjs-ts: + description: init-empty-nextjs-ts executor: name: sb_node_22_classic - class: medium+ + class: medium steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -442,21 +467,37 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules - run: - name: Build internal storybook - command: yarn storybook:ui:build + name: Verdaccio working_directory: code + background: true + command: yarn local-registry --open - run: - name: Run Chromatic - command: yarn storybook:ui:chromatic + name: Wait on servers working_directory: code - - report-workflow-on-failure - - store_test_results: - path: test-results - unit-tests-linux: - description: unit-tests-linux + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp + command: |- + mkdir empty-nextjs-ts + cd empty-nextjs-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: nextjs-ts + - run: + name: Run storybook smoke test + working_directory: /tmp/empty-nextjs-ts + command: npm run storybook -- --smoke-test + init-empty-react-vite-ts: + description: init-empty-react-vite-ts executor: name: sb_node_22_classic - class: xlarge + class: medium steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -469,50 +510,37 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules - run: - name: Run tests + name: Verdaccio working_directory: code - command: |- - TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - - store_test_results: - path: project/test-results - - run: - name: Ensure no changes pending - command: git diff --exit-code - - report-workflow-on-failure - - cancel-workflow-on-failure - unit-tests-windows: - description: unit-tests-windows - executor: - name: win/default - size: medium - shell: bash.exe - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + background: true + command: yarn local-registry --open - run: - name: Install Node + Yarn - shell: powershell.exe + name: Wait on servers + working_directory: code command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate - - attach_workspace: - at: C:\Users\circleci\project + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 - run: - command: yarn install - name: Install dependencies + name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp + command: |- + mkdir empty-react-vite-ts + cd empty-react-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - run: - command: yarn test - name: Run unit tests - working_directory: code - package-benchmarks: - description: package-benchmarks + name: Run storybook smoke test + working_directory: /tmp/empty-react-vite-ts + command: npm run storybook -- --smoke-test + init-empty-vue-vite-ts: + description: init-empty-vue-vite-ts executor: name: sb_node_22_classic - class: xlarge + class: medium steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -536,14 +564,26 @@ jobs: yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 - run: - name: Benchmarking packages against base branch - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - working_directory: scripts - react-vite-default-ts--build-windows: - description: react-vite-default-ts--build-windows + name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp + command: |- + mkdir empty-vue-vite-ts + cd empty-vue-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: vue-vite-ts + - run: + name: Run storybook smoke test + working_directory: /tmp/empty-vue-vite-ts + command: npm run storybook -- --smoke-test + init-empty-windows: + description: init-empty-windows executor: name: win/default - size: xlarge + size: medium shell: bash.exe steps: - git-shallow-clone/checkout_advanced: @@ -560,7 +600,7 @@ jobs: - attach_workspace: at: C:\Users\circleci - run: - name: Install dependencies + name: Run Install command: yarn install - run: name: Verdaccio @@ -574,49 +614,26 @@ jobs: yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 - run: - name: Run Install - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts - command: yarn install - - run: - name: Install playwright - command: yarn playwright install chromium --with-deps - - run: - name: Build storybook - command: yarn task build --template react-vite/default-ts --no-link -s build - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-ts --no-link -s serve - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 + name: Storybook init from empty directory (Windows NPM) + working_directory: C:\Users\circleci + command: |- + mkdir empty-react-vite-ts + cd empty-react-vite-ts + npm set registry http://localhost:6001 + npx storybook init --yes --package-manager npm + environment: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - run: - name: Running E2E Tests - working_directory: code - command: yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests - pretty-docs: + name: Run storybook smoke test + working_directory: C:\Users\circleci\empty-react-vite-ts + command: npm run storybook -- --smoke-test + init-features: + description: init-features executor: name: sb_node_22_classic - class: medium+ - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - node/install-packages: - app-dir: . - pkg-manager: yarn - cache-only-lockfile: true - - run: - name: Prettier - working_directory: scripts - command: yarn docs:prettier:check - sandboxes: - type: no-op - react-vite-default-ts--create: - description: react-vite/default-ts (create) - executor: - name: sb_node_22_browsers - class: large + class: medium steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -633,44 +650,101 @@ jobs: working_directory: code background: true command: yarn local-registry --open - - run: - name: Start Event Collector - working_directory: scripts - background: true - command: yarn jiti ./event-log-collector.ts - run: name: Wait on servers working_directory: code command: |- yarn wait-on tcp:127.0.0.1:6001 yarn wait-on tcp:127.0.0.1:6002 - yarn wait-on tcp:127.0.0.1:6007 - run: - name: Setup Corepack + name: Storybook init from empty directory (Linux NPM) + working_directory: /tmp command: |- - sudo corepack enable - which yarn - yarn --version - - run: - name: Create Sandboxes - command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug + mkdir empty-react-vite-ts + cd empty-react-vite-ts + npm set registry http://localhost:6001 + npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - - store_artifacts: - path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log - destination: logs - - persist_to_workspace: - paths: - - storybook-sandboxes/react-vite-default-ts - root: /tmp - react-vite-default-ts--build: - description: react-vite/default-ts (build) - executor: - name: sb_playwright - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: + IN_STORYBOOK_SANDBOX: true + STORYBOOK_DISABLE_TELEMETRY: true + STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + - run: + name: Run storybook smoke test + working_directory: /tmp/empty-react-vite-ts + command: npx vitest + knip: + description: knip + executor: + name: sb_node_22_classic + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Run Knip + working_directory: code + command: yarn knip --no-exit-code + package-benchmarks: + description: package-benchmarks + executor: + name: sb_node_22_classic + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Benchmarking packages against base branch + command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload + working_directory: scripts + pretty-docs: + executor: + name: sb_node_22_classic + class: medium+ + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - node/install-packages: + app-dir: . + pkg-manager: yarn + cache-only-lockfile: true + - run: + name: Prettier + working_directory: scripts + command: yarn docs:prettier:check + react-vite-default-ts--build: + description: react-vite/default-ts (build) + executor: + name: sb_playwright + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: clone_options: --depth 500 - attach_workspace: at: /tmp @@ -700,11 +774,11 @@ jobs: command: |- TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests" --verbose --index=0 --total=1 - react-vite-default-ts--dev: - description: react-vite/default-ts (dev) + react-vite-default-ts--build-test-runner: + description: react-vite-default-ts--build-test-runner executor: name: sb_playwright - class: xlarge + class: medium steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -717,19 +791,64 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules - run: - name: Run storybook + name: Running test-runner + command: yarn task test-runner --template react-vite/default-ts --no-link -s test-runner + react-vite-default-ts--build-windows: + description: react-vite-default-ts--build-windows + executor: + name: win/default + size: xlarge + shell: bash.exe + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' + - run: + name: Install Node + Yarn + shell: powershell.exe + command: |- + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate + - attach_workspace: + at: C:\Users\circleci + - run: + name: Install dependencies + command: yarn install + - run: + name: Verdaccio working_directory: code background: true - command: yarn task dev --template react-vite/default-ts --no-link -s dev + command: yarn local-registry --open - run: name: Wait on servers working_directory: code - command: yarn wait-on tcp:127.0.0.1:6006 + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + - run: + name: Run Install + working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts + command: yarn install + - run: + name: Install playwright + command: yarn playwright install chromium --with-deps + - run: + name: Build storybook + command: yarn task build --template react-vite/default-ts --no-link -s build + - run: + name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-ts --no-link -s serve + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 - run: name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev" --verbose --index=0 --total=1 + working_directory: code + command: yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests react-vite-default-ts--chromatic: description: react-vite/default-ts (chromatic) executor: @@ -753,11 +872,11 @@ jobs: command: yarn task chromatic --template react-vite/default-ts --no-link -s chromatic environment: STORYBOOK_SANDBOX_ROOT: ./sandbox - react-vite-default-ts--vitest: - description: react-vite/default-ts (vitest) + react-vite-default-ts--create: + description: react-vite/default-ts (create) executor: - name: sb_node_22_classic - class: medium + name: sb_node_22_browsers + class: large steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -770,8 +889,71 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules - run: - name: Running Vitest - command: yarn task vitest-integration --template react-vite/default-ts --no-link -s vitest-integration + name: Verdaccio + working_directory: code + background: true + command: yarn local-registry --open + - run: + name: Start Event Collector + working_directory: scripts + background: true + command: yarn jiti ./event-log-collector.ts + - run: + name: Wait on servers + working_directory: code + command: |- + yarn wait-on tcp:127.0.0.1:6001 + yarn wait-on tcp:127.0.0.1:6002 + yarn wait-on tcp:127.0.0.1:6007 + - run: + name: Setup Corepack + command: |- + sudo corepack enable + which yarn + yarn --version + - run: + name: Create Sandboxes + command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug + environment: + STORYBOOK_TELEMETRY_DEBUG: 1 + STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log + - store_artifacts: + path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log + destination: logs + - persist_to_workspace: + paths: + - storybook-sandboxes/react-vite-default-ts + root: /tmp + react-vite-default-ts--dev: + description: react-vite/default-ts (dev) + executor: + name: sb_playwright + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Run storybook + working_directory: code + background: true + command: yarn task dev --template react-vite/default-ts --no-link -s dev + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:6006 + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev" --verbose --index=0 --total=1 react-vite-default-ts--dev-windows: description: react-vite-default-ts--dev-windows executor: @@ -826,6 +1008,27 @@ jobs: name: Running E2E Tests working_directory: code command: yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev + react-vite-default-ts--vitest: + description: react-vite/default-ts (vitest) + executor: + name: sb_node_22_classic + class: medium + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Running Vitest + command: yarn task vitest-integration --template react-vite/default-ts --no-link -s vitest-integration + sandboxes: + type: no-op test-storybooks: type: no-op test-storybooks-pnp: @@ -896,8 +1099,8 @@ jobs: name: Run Cypress CT tests working_directory: test-storybooks/portable-stories-kitchen-sink/react command: yarn cypress - test-storybooks-portable-vue3: - description: test-storybooks-portable-vue3 + test-storybooks-portable-vitest3: + description: test-storybooks-portable-vitest3 executor: name: sb_playwright class: medium @@ -914,28 +1117,16 @@ jobs: - v5-linux-node_modules - run: name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 command: yarn install --no-immutable environment: YARN_ENABLE_IMMUTABLE_INSTALLS: false - run: - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn jest - - run: - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn vitest - - run: - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn playwright-ct - - run: - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn cypress - test-storybooks-portable-vitest3: - description: test-storybooks-portable-vitest3 + name: Run Playwright E2E tests + working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + command: yarn playwright-e2e + test-storybooks-portable-vue3: + description: test-storybooks-portable-vue3 executor: name: sb_playwright class: medium @@ -952,114 +1143,31 @@ jobs: - v5-linux-node_modules - run: name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 command: yarn install --no-immutable environment: YARN_ENABLE_IMMUTABLE_INSTALLS: false - run: - name: Run Playwright E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - command: yarn playwright-e2e - init-empty: - type: no-op - init-empty-windows: - description: init-empty-windows - executor: - name: win/default - size: medium - shell: bash.exe - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate - - attach_workspace: - at: C:\Users\circleci - - run: - name: Run Install - command: yarn install - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Windows NPM) - working_directory: C:\Users\circleci - command: |- - mkdir empty-react-vite-ts - cd empty-react-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - - run: - name: Run storybook smoke test - working_directory: C:\Users\circleci\empty-react-vite-ts - command: npm run storybook -- --smoke-test - init-empty-react-vite-ts: - description: init-empty-react-vite-ts - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open + name: Run Jest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn jest - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 + name: Run Vitest tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn vitest - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-react-vite-ts - cd empty-react-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts + name: Run Playwright CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn playwright-ct - run: - name: Run storybook smoke test - working_directory: /tmp/empty-react-vite-ts - command: npm run storybook -- --smoke-test - init-empty-nextjs-ts: - description: init-empty-nextjs-ts + name: Run Cypress CT tests + working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 + command: yarn cypress + ui: + description: ui executor: name: sb_node_22_classic - class: medium + class: medium+ steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -1072,37 +1180,21 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules - run: - name: Verdaccio + name: Build internal storybook + command: yarn storybook:ui:build working_directory: code - background: true - command: yarn local-registry --open - run: - name: Wait on servers + name: Run Chromatic + command: yarn storybook:ui:chromatic working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-nextjs-ts - cd empty-nextjs-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: nextjs-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-nextjs-ts - command: npm run storybook -- --smoke-test - init-empty-vue-vite-ts: - description: init-empty-vue-vite-ts + - report-workflow-on-failure + - store_test_results: + path: test-results + unit-tests-linux: + description: unit-tests-linux executor: name: sb_node_22_classic - class: medium + class: xlarge steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -1115,185 +1207,108 @@ jobs: - v5-linux-node_modules/{{ checksum ".nvmrc" }} - v5-linux-node_modules - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers + name: Run tests working_directory: code command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-vue-vite-ts - cd empty-vue-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: vue-vite-ts + TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose + - store_test_results: + path: project/test-results - run: - name: Run storybook smoke test - working_directory: /tmp/empty-vue-vite-ts - command: npm run storybook -- --smoke-test - init-empty-lit-vite-ts: - description: init-empty-lit-vite-ts + name: Ensure no changes pending + command: git diff --exit-code + - report-workflow-on-failure + - cancel-workflow-on-failure + unit-tests-windows: + description: unit-tests-windows executor: - name: sb_node_22_classic - class: medium + name: win/default + size: medium + shell: bash.exe steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 + clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp + name: Install Node + Yarn + shell: powershell.exe command: |- - mkdir empty-lit-vite-ts - cd empty-lit-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: lit-vite-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-lit-vite-ts - command: npm run storybook -- --smoke-test - init-features: - description: init-features - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 + $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 + nvm install $nodeVersion + nvm use $nodeVersion + corepack enable + corepack prepare yarn@stable --activate - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules + at: C:\Users\circleci\project - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open + command: yarn install + name: Install dependencies - run: - name: Wait on servers + command: yarn test + name: Run unit tests working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-react-vite-ts - cd empty-react-vite-ts - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-react-vite-ts - command: npx vitest - react-vite-default-ts--build-test-runner: - description: react-vite-default-ts--build-test-runner - executor: - name: sb_playwright - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Running test-runner - command: yarn task test-runner --template react-vite/default-ts --no-link -s test-runner workflows: generated: jobs: - - pretty-docs - build-linux - build-windows + - pretty-docs - check: requires: - build-linux - - knip: + - init-empty: requires: - build-linux - - package-benchmarks: + - init-empty-lit-vite-ts: requires: - - build-linux - - unit-tests-linux: + - init-empty + - init-empty-nextjs-ts: requires: - - build-linux - - unit-tests-windows: + - init-empty + - init-empty-react-vite-ts: requires: - - build-windows - - ui: + - init-empty + - init-empty-vue-vite-ts: requires: - - build-linux - - sandboxes: + - init-empty + - init-empty-windows: + requires: + - init-empty + - init-features: + requires: + - init-empty + - knip: requires: - build-linux - - react-vite-default-ts--create: + - package-benchmarks: requires: - - sandboxes + - build-linux - react-vite-default-ts--build: requires: - react-vite-default-ts--create - - react-vite-default-ts--dev: + - react-vite-default-ts--build-test-runner: + requires: + - react-vite-default-ts--build + - react-vite-default-ts--build-windows: requires: - react-vite-default-ts--create - react-vite-default-ts--chromatic: requires: - react-vite-default-ts--build - - react-vite-default-ts--vitest: + - react-vite-default-ts--create: requires: - - react-vite-default-ts--build - - react-vite-default-ts--dev-windows: + - sandboxes + - react-vite-default-ts--dev: requires: - react-vite-default-ts--create - - react-vite-default-ts--build-windows: + - react-vite-default-ts--dev-windows: requires: - react-vite-default-ts--create + - react-vite-default-ts--vitest: + requires: + - react-vite-default-ts--build + - sandboxes: + requires: + - build-linux - test-storybooks: requires: - build-linux @@ -1303,33 +1318,18 @@ workflows: - test-storybooks-portable-react: requires: - test-storybooks - - test-storybooks-portable-vue3: + - test-storybooks-portable-vitest3: requires: - test-storybooks - - test-storybooks-portable-vitest3: + - test-storybooks-portable-vue3: requires: - test-storybooks - - init-empty: + - ui: requires: - build-linux - - init-empty-windows: - requires: - - init-empty - - init-empty-react-vite-ts: - requires: - - init-empty - - init-empty-nextjs-ts: - requires: - - init-empty - - init-empty-vue-vite-ts: - requires: - - init-empty - - init-empty-lit-vite-ts: - requires: - - init-empty - - init-features: + - unit-tests-linux: requires: - - init-empty - - react-vite-default-ts--build-test-runner: + - build-linux + - unit-tests-windows: requires: - - react-vite-default-ts--build + - build-windows diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index c4b2934a6212..83bce1fe491f 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1231,10 +1231,25 @@ export const data = { executors, parameters, - jobs, - workflows, - // jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), - // workflows: Object.fromEntries(Object.entries(workflows).sort(([a], [b]) => a.localeCompare(b))), + // jobs, + // workflows, + jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), + workflows: { + generated: { + jobs: workflows.generated.jobs.sort((a, b) => { + if (typeof a == 'string' && typeof b == 'string') { + return a.localeCompare(b); + } + if (typeof a == 'string') { + return -1; + } + if (typeof b == 'string') { + return 1; + } + return Object.keys(a)[0].localeCompare(Object.keys(b)[0]); + }), + }, + }, }; function definePortableStoryTest(directory: string) { From 7f1469f97040643602b2bbfba680b252d126e32d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 14:46:11 +0100 Subject: [PATCH 206/310] Remove commented-out jobs and workflows from CI data configuration --- scripts/ci/data.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 83bce1fe491f..be34629a0c75 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1231,8 +1231,6 @@ export const data = { executors, parameters, - // jobs, - // workflows, jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), workflows: { generated: { From bd53f412948fed6e72544b1eec03adcecde980c1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 14:48:42 +0100 Subject: [PATCH 207/310] Remove generated CircleCI configuration file to streamline CI setup --- .circleci/config.generated.json | 2322 ------------------------------- 1 file changed, 2322 deletions(-) delete mode 100644 .circleci/config.generated.json diff --git a/.circleci/config.generated.json b/.circleci/config.generated.json deleted file mode 100644 index 7d2549cb30c8..000000000000 --- a/.circleci/config.generated.json +++ /dev/null @@ -1,2322 +0,0 @@ -{ - "commands": { - "cancel-workflow-on-failure": { - "description": "Cancels the entire workflow in case the previous step has failed", - "steps": [ - { - "run": { - "command": "echo \"Canceling workflow as previous step resulted in failure.\"\necho \"To execute all checks locally, please run yarn ci-tests\"\ncurl -X POST --header \"Content-Type: application/json\" \"https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}\"\n", - "name": "Cancel current workflow", - "when": "on_fail" - } - } - ] - }, - "report-workflow-on-failure": { - "description": "Reports failures to discord", - "parameters": { - "template": { - "default": "none", - "description": "Which template to report in discord. Applicable for parallel sandbox jobs\n", - "type": "string" - } - }, - "steps": [ - { - "run": { - "command": "git fetch --unshallow", - "when": "on_fail" - } - }, - { - "discord/status": { - "fail_only": true, - "failure_message": "$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)", - "only_for_branches": "main,next,next-release,latest-release" - } - } - ] - }, - "start-event-collector": { - "description": "Starts the event collector", - "steps": [ - { - "run": { - "background": true, - "command": "yarn jiti ./event-log-collector.ts", - "name": "Start Event Collector", - "working_directory": "scripts" - } - } - ] - } - }, - "executors": { - "sb_node_18_browsers": { - "docker": [ - { - "environment": { - "NODE_OPTIONS": "--max_old_space_size=6144" - }, - "image": "cimg/node:18.20.3-browsers" - } - ], - "parameters": { - "class": { - "default": "small", - "description": "The Resource class", - "enum": [ - "small", - "medium", - "medium+", - "large", - "xlarge" - ], - "type": "enum" - } - }, - "resource_class": "<>", - "working_directory": "/tmp/storybook" - }, - "sb_node_22_browsers": { - "docker": [ - { - "environment": { - "NODE_OPTIONS": "--max_old_space_size=6144" - }, - "image": "cimg/node:22.15.0-browsers" - } - ], - "parameters": { - "class": { - "default": "small", - "description": "The Resource class", - "enum": [ - "small", - "medium", - "medium+", - "large", - "xlarge" - ], - "type": "enum" - } - }, - "resource_class": "<>", - "working_directory": "/tmp/storybook" - }, - "sb_node_22_classic": { - "docker": [ - { - "environment": { - "NODE_OPTIONS": "--max_old_space_size=6144" - }, - "image": "cimg/node:22.15.0" - } - ], - "parameters": { - "class": { - "default": "small", - "description": "The Resource class", - "enum": [ - "small", - "medium", - "medium+", - "large", - "xlarge" - ], - "type": "enum" - } - }, - "resource_class": "<>", - "working_directory": "/tmp/storybook" - }, - "sb_playwright": { - "docker": [ - { - "environment": { - "NODE_OPTIONS": "--max_old_space_size=6144" - }, - "image": "mcr.microsoft.com/playwright:v1.52.0-noble" - } - ], - "parameters": { - "class": { - "default": "small", - "description": "The Resource class", - "enum": [ - "small", - "medium", - "medium+", - "large", - "xlarge" - ], - "type": "enum" - } - }, - "resource_class": "<>", - "working_directory": "/tmp/storybook" - } - }, - "jobs": { - "bench-packages": { - "executor": { - "class": "small", - "name": "sb_node_22_classic" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "when": { - "condition": { - "and": [ - "<< pipeline.parameters.ghBaseBranch >>", - "<< pipeline.parameters.ghPrNumber >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio" - } - }, - { - "run": { - "command": "yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload", - "name": "Benchmarking packages against base branch", - "working_directory": "scripts" - } - } - ] - } - }, - { - "when": { - "condition": { - "or": [ - { - "not": "<< pipeline.parameters.ghBaseBranch >>" - }, - { - "not": "<< pipeline.parameters.ghPrNumber >>" - } - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio" - } - }, - { - "run": { - "command": "yarn bench-packages --upload", - "name": "Uploading package benchmarks for branch", - "working_directory": "scripts" - } - } - ] - } - }, - { - "store_artifacts": { - "path": "bench/packages/results.json" - } - }, - "report-workflow-on-failure", - "cancel-workflow-on-failure" - ] - }, - "bench-sandboxes": { - "executor": { - "class": "small", - "name": "sb_playwright" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", - "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", - "name": "Running Bench" - } - }, - { - "run": { - "command": "yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >>", - "name": "Uploading results" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)" - } - } - ] - }, - "build": { - "executor": { - "class": "large", - "name": "sb_node_22_classic" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "restore_cache": { - "keys": [ - "build-yarn-2-cache-v5--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}" - ], - "name": "Restore Yarn cache" - } - }, - { - "run": { - "command": "yarn task --task compile --start-from=auto --no-link --debug\ngit diff --exit-code\nyarn dedupe --check\n", - "name": "Compile" - } - }, - { - "run": { - "command": "cd code\nyarn local-registry --publish\n", - "name": "Publish to Verdaccio" - } - }, - "report-workflow-on-failure", - { - "store_artifacts": { - "path": "code/bench/esbuild-metafiles" - } - }, - { - "save_cache": { - "key": "build-yarn-2-cache-v5--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}", - "name": "Save Yarn cache", - "paths": [ - "~/.yarn/berry/cache" - ] - } - }, - { - "persist_to_workspace": { - "paths": [ - "code/node_modules", - "code/addons", - "scripts/node_modules", - "code/bench", - "code/examples", - "code/frameworks", - "code/lib", - "code/core", - "code/builders", - "code/renderers", - "code/presets", - ".verdaccio-cache" - ], - "root": "." - } - } - ] - }, - "check": { - "executor": { - "class": "large", - "name": "sb_node_22_classic" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "nx/set-shas": { - "main-branch-name": "next", - "workflow-name": "<< pipeline.parameters.workflow >>" - } - }, - { - "restore_cache": { - "keys": [ - "build-yarn-2-cache-v5--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}" - ], - "name": "Restore Yarn cache" - } - }, - { - "run": { - "command": "yarn task --task compile --start-from=auto --no-link --debug\n", - "name": "Compile" - } - }, - { - "run": { - "command": "yarn task --task check --start-from=auto --no-link --debug\n", - "name": "Check" - } - }, - { - "run": { - "command": "git diff --exit-code\n", - "name": "Ensure no changes pending" - } - }, - "report-workflow-on-failure", - "cancel-workflow-on-failure" - ] - }, - "check-sandboxes": { - "executor": { - "class": "medium", - "name": "sb_node_22_classic" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", - "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", - "name": "Type check Sandboxes" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - } - ] - }, - "chromatic-internal-storybook": { - "environment": { - "NODE_OPTIONS": "--max_old_space_size=4096" - }, - "executor": { - "class": "large", - "name": "sb_node_22_browsers" - }, - "steps": [ - "checkout", - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "yarn storybook:ui:chromatic", - "name": "Running Chromatic", - "working_directory": "code" - } - }, - "report-workflow-on-failure", - { - "store_test_results": { - "path": "test-results" - } - } - ] - }, - "chromatic-sandboxes": { - "executor": { - "class": "medium", - "name": "sb_node_22_browsers" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - "checkout", - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", - "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", - "name": "Running Chromatic" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - } - ] - }, - "coverage": { - "executor": { - "class": "small", - "name": "sb_node_22_browsers" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - "codecov/upload", - "report-workflow-on-failure" - ] - }, - "create-sandboxes": { - "executor": { - "class": "large", - "name": "sb_node_22_browsers" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "# Enable corepack\nsudo corepack enable\n\n# Verify yarn is working\nwhich yarn\nyarn --version\n", - "name": "Setup Corepack" - } - }, - "start-event-collector", - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)\nyarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit\nif [[ $TEMPLATE != bench/* ]]; then\n yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE\nfi\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules\n", - "environment": { - "STORYBOOK_TELEMETRY_DEBUG": 1, - "STORYBOOK_TELEMETRY_URL": "http://localhost:6007/event-log" - }, - "name": "Create Sandboxes" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox)" - } - }, - { - "persist_to_workspace": { - "paths": [ - "sandbox/**" - ], - "root": "." - } - }, - { - "store_test_results": { - "path": "test-results" - } - } - ] - }, - "e2e-dev": { - "executor": { - "class": "medium+", - "name": "sb_playwright" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", - "name": "Install sandbox dependencies" - } - }, - { - "run": { - "command": "TEST_FILES=$(circleci tests glob \"code/e2e-tests/*.{test,spec}.{ts,js,mjs}\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit\" --verbose --index=0 --total=1\n", - "name": "Running E2E Tests" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - }, - { - "store_artifacts": { - "destination": "playwright", - "path": "code/playwright-results/" - } - } - ] - }, - "e2e-production": { - "executor": { - "class": "medium", - "name": "sb_playwright" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", - "name": "Install sandbox dependencies" - } - }, - { - "run": { - "command": "TEST_FILES=$(circleci tests glob \"code/e2e-tests/*.{test,spec}.{ts,js,mjs}\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit\" --verbose --index=0 --total=1\n", - "name": "Running E2E Tests" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - }, - { - "store_artifacts": { - "destination": "playwright", - "path": "code/playwright-results/" - } - } - ] - }, - "e2e-ui": { - "executor": { - "class": "medium", - "name": "sb_playwright" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "yarn install --no-immutable", - "environment": { - "YARN_ENABLE_IMMUTABLE_INSTALLS": false - }, - "name": "Install dependencies", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/react" - } - }, - { - "run": { - "command": "yarn playwright-e2e", - "name": "Run E2E tests", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/react" - } - }, - { - "store_test_results": { - "path": "test-results" - } - }, - { - "store_artifacts": { - "destination": "playwright", - "path": "test-storybooks/portable-stories-kitchen-sink/react/test-results/" - } - }, - "report-workflow-on-failure" - ] - }, - "e2e-ui-vitest-3": { - "executor": { - "class": "medium", - "name": "sb_playwright" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "yarn install --no-immutable", - "environment": { - "YARN_ENABLE_IMMUTABLE_INSTALLS": false - }, - "name": "Install dependencies", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/react-vitest-3" - } - }, - { - "run": { - "command": "yarn playwright-e2e", - "name": "Run E2E tests", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/react-vitest-3" - } - }, - { - "store_test_results": { - "path": "test-results" - } - }, - { - "store_artifacts": { - "destination": "playwright", - "path": "test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/" - } - }, - "report-workflow-on-failure" - ] - }, - "knip": { - "executor": { - "class": "large", - "name": "sb_node_22_classic" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "cd code\nyarn knip --no-exit-code\n", - "name": "Knip" - } - }, - "report-workflow-on-failure", - "cancel-workflow-on-failure" - ] - }, - "lint": { - "executor": { - "class": "medium+", - "name": "sb_node_22_classic" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "cd code\nyarn lint\n", - "name": "Lint" - } - }, - "report-workflow-on-failure", - "cancel-workflow-on-failure" - ] - }, - "pretty-docs": { - "executor": { - "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\" }}" - ], - "name": "Restore Yarn cache" - } - }, - { - "run": { - "command": "cd scripts\nyarn install\n", - "name": "Install" - } - }, - { - "save_cache": { - "key": "prettydocs-yarn-2-cache-v8--{{ checksum \"code/yarn.lock\" }}--{{ checksum \"scripts/yarn.lock\" }}", - "name": "Save Yarn cache", - "paths": [ - "~/.yarn/berry/cache" - ] - } - }, - { - "run": { - "command": "cd scripts\nyarn docs:prettier:check\n", - "name": "Prettier" - } - } - ] - }, - "script-checks": { - "executor": "sb_node_22_browsers", - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "cd scripts\nyarn get-template --check\n", - "name": "Check parallelism count" - } - }, - { - "run": { - "command": "cd scripts\nyarn check\n", - "name": "Type check" - } - }, - { - "run": { - "command": "cd scripts\nyarn test --coverage\n", - "name": "Run tests" - } - }, - { - "store_test_results": { - "path": "scripts/junit.xml" - } - }, - "report-workflow-on-failure", - "cancel-workflow-on-failure" - ] - }, - "smoke-test-sandboxes": { - "executor": { - "class": "medium", - "name": "sb_node_18_browsers" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit", - "name": "Smoke Testing Sandboxes" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - } - ] - }, - "stories-tests": { - "executor": { - "class": "xlarge", - "name": "sb_playwright" - }, - "parallelism": 2, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "cd code\nTEST_FILES=$(circleci tests glob \"**/*.{stories}.{ts,tsx,js,jsx,cjs}\" | sed \"/^e2e-tests\\//d\" | sed \"/^node_modules\\//d\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml\" --verbose\n", - "name": "Run tests" - } - }, - { - "store_test_results": { - "path": "test-results" - } - }, - "report-workflow-on-failure", - "cancel-workflow-on-failure" - ] - }, - "test-init-empty": { - "executor": { - "class": "small", - "name": "sb_node_22_browsers" - }, - "parameters": { - "packageManager": { - "type": "string" - }, - "template": { - "type": "string" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "when": { - "condition": { - "equal": [ - "npm", - "<< parameters.packageManager >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (NPM)" - } - } - ] - } - }, - { - "when": { - "condition": { - "equal": [ - "yarn2", - "<< parameters.packageManager >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (Yarn 2)" - } - } - ] - } - }, - { - "when": { - "condition": { - "equal": [ - "pnpm", - "<< parameters.packageManager >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (PNPM)" - } - } - ] - } - }, - { - "when": { - "condition": { - "equal": [ - "react-vite-ts", - "<< parameters.template >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (--skip-install)" - } - } - ] - } - }, - "report-workflow-on-failure" - ] - }, - "test-init-empty-windows": { - "executor": "win/default", - "parameters": { - "packageManager": { - "type": "string" - }, - "template": { - "type": "string" - } - }, - "steps": [ - "checkout", - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "choco install nodejs-lts --version=22.11.0 -y\ncorepack enable\n", - "name": "Setup Node & Yarn on Windows", - "shell": "bash.exe" - } - }, - { - "run": { - "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": [ - "npm", - "<< parameters.packageManager >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm set registry http://localhost:6001\nnpx storybook init --yes --package-manager npm\nnpm run storybook -- --smoke-test\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (Windows NPM)", - "shell": "bash.exe" - } - } - ] - } - }, - { - "when": { - "condition": { - "equal": [ - "yarn2", - "<< parameters.packageManager >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nyarn set version berry\nyarn config set registry http://localhost:6001\nyarn dlx storybook init --yes --package-manager yarn2\nyarn storybook --smoke-test\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (Windows Yarn 2)", - "shell": "bash.exe" - } - } - ] - } - }, - { - "when": { - "condition": { - "equal": [ - "pnpm", - "<< parameters.packageManager >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>\ncd empty-<< parameters.template >>\nnpm i -g pnpm\npnpm config set registry http://localhost:6001\npnpm dlx storybook init --yes --package-manager pnpm\npnpm run storybook --smoke-test\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (Windows PNPM)", - "shell": "bash.exe" - } - } - ] - } - }, - { - "when": { - "condition": { - "equal": [ - "react-vite-ts", - "<< parameters.template >>" - ] - }, - "steps": [ - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio", - "shell": "bash.exe" - } - }, - { - "run": { - "command": "cd ..\nmkdir empty-<< parameters.template >>-no-install\ncd empty-<< parameters.template >>-no-install\nnpx storybook init --yes --skip-install\nnpm install\nnpm run build-storybook\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "<< parameters.template >>" - }, - "name": "Storybook init from empty directory (Windows --skip-install)", - "shell": "bash.exe" - } - } - ] - } - } - ] - }, - "test-init-features": { - "executor": { - "class": "small", - "name": "sb_node_22_browsers" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "background": true, - "command": "cd code\nyarn local-registry --open\n", - "name": "Verdaccio" - } - }, - { - "run": { - "command": "cd code\nyarn wait-on tcp:127.0.0.1:6001\nyarn wait-on tcp:127.0.0.1:6002\n", - "name": "Wait on Verdaccio" - } - }, - { - "run": { - "command": "cd ..\nmkdir features-1\ncd features-1\nnpm set registry http://localhost:6001\nnpx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug\nnpx vitest\n", - "environment": { - "IN_STORYBOOK_SANDBOX": true, - "STORYBOOK_DISABLE_TELEMETRY": true, - "STORYBOOK_INIT_EMPTY_TYPE": "react-vite-ts" - }, - "name": "Storybook init for features" - } - } - ] - }, - "test-portable-stories": { - "executor": { - "class": "medium", - "name": "sb_playwright" - }, - "parameters": { - "directory": { - "type": "string" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "yarn install --no-immutable", - "environment": { - "YARN_ENABLE_IMMUTABLE_INSTALLS": false - }, - "name": "Install dependencies", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" - } - }, - { - "run": { - "command": "yarn jest", - "name": "Run Jest tests", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" - } - }, - { - "run": { - "command": "yarn vitest", - "name": "Run Vitest tests", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" - } - }, - { - "run": { - "command": "yarn playwright-ct", - "name": "Run Playwright CT tests", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" - } - }, - { - "run": { - "command": "yarn cypress", - "name": "Run Cypress CT tests", - "working_directory": "test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>" - } - }, - "report-workflow-on-failure" - ] - }, - "test-runner-dev": { - "executor": { - "class": "large", - "name": "sb_playwright" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit", - "name": "Running Test Runner in Dev mode" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - } - ] - }, - "test-runner-production": { - "executor": { - "class": "medium+", - "name": "sb_playwright" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", - "name": "Install sandbox dependencies" - } - }, - "start-event-collector", - { - "run": { - "command": "yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit", - "environment": { - "STORYBOOK_TELEMETRY_DEBUG": 1, - "STORYBOOK_TELEMETRY_URL": "http://localhost:6007/event-log" - }, - "name": "Running Test Runner" - } - }, - { - "run": { - "command": "yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)", - "name": "Check Telemetry" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - } - ] - }, - "test-yarn-pnp": { - "executor": { - "class": "medium", - "name": "sb_playwright" - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "yarn install --no-immutable", - "environment": { - "YARN_ENABLE_IMMUTABLE_INSTALLS": false - }, - "name": "Install dependencies", - "working_directory": "test-storybooks/yarn-pnp" - } - }, - { - "run": { - "command": "yarn storybook --smoke-test", - "name": "Run Storybook smoke test", - "working_directory": "test-storybooks/yarn-pnp" - } - }, - "report-workflow-on-failure" - ] - }, - "unit-tests": { - "executor": { - "class": "xlarge", - "name": "sb_playwright" - }, - "parallelism": 2, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "cd code\nTEST_FILES=$(circleci tests glob \"**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}\" | sed \"/^e2e-tests\\//d\" | sed \"/^node_modules\\//d\")\necho \"$TEST_FILES\" | circleci tests run --command=\"xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml\" --verbose\n", - "name": "Run tests" - } - }, - { - "store_test_results": { - "path": "test-results" - } - }, - "report-workflow-on-failure", - "cancel-workflow-on-failure" - ] - }, - "vitest-integration": { - "executor": { - "class": "xlarge", - "name": "sb_playwright" - }, - "parallelism": "<< parameters.parallelism >>", - "parameters": { - "parallelism": { - "type": "integer" - } - }, - "steps": [ - { - "git-shallow-clone/checkout_advanced": { - "clone_options": "--depth 1 --verbose" - } - }, - { - "attach_workspace": { - "at": "." - } - }, - { - "run": { - "command": "TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)\ncd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn\n", - "name": "Install sandbox dependencies" - } - }, - "start-event-collector", - { - "run": { - "command": "yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit", - "environment": { - "STORYBOOK_TELEMETRY_DEBUG": 1, - "STORYBOOK_TELEMETRY_URL": "http://localhost:6007/event-log" - }, - "name": "Running story tests in Vitest" - } - }, - { - "run": { - "command": "yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)", - "name": "Check Telemetry" - } - }, - { - "report-workflow-on-failure": { - "template": "$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)" - } - }, - { - "store_test_results": { - "path": "test-results" - } - } - ] - } - }, - "orbs": { - "browser-tools": "circleci/browser-tools@1.4.1", - "codecov": "codecov/codecov@3.2.4", - "discord": "antonioned/discord@0.1.0", - "git-shallow-clone": "guitarrapc/git-shallow-clone@2.5.0", - "node": "circleci/node@5.2.0", - "nx": "nrwl/nx@1.6.2", - "win": "circleci/windows@5.0.0" - }, - "parameters": { - "ghBaseBranch": { - "default": "next", - "description": "The name of the base branch (the target of the PR)", - "type": "string" - }, - "ghPrNumber": { - "default": "", - "description": "The PR number", - "type": "string" - }, - "workflow": { - "default": "skipped", - "description": "Which workflow to run", - "enum": [ - "normal", - "merged", - "daily", - "skipped", - "docs" - ], - "type": "enum" - } - }, - "version": 2.1, - "workflows": { - "daily": { - "jobs": [ - "pretty-docs", - "build", - { - "lint": { - "requires": [ - "build" - ] - } - }, - { - "knip": { - "requires": [ - "build" - ] - } - }, - { - "bench-packages": { - "requires": [ - "build" - ] - } - }, - "check", - { - "unit-tests": { - "requires": [ - "build" - ] - } - }, - { - "stories-tests": { - "requires": [ - "build" - ] - } - }, - { - "script-checks": { - "requires": [ - "build" - ] - } - }, - { - "chromatic-internal-storybook": { - "requires": [ - "build" - ] - } - }, - { - "create-sandboxes": { - "parallelism": 38, - "requires": [ - "build" - ] - } - }, - { - "check-sandboxes": { - "parallelism": 1, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "chromatic-sandboxes": { - "parallelism": 35, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "e2e-production": { - "parallelism": 7, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "e2e-dev": { - "parallelism": 28, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "test-runner-production": { - "parallelism": 33, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "vitest-integration": { - "parallelism": 13, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "test-portable-stories": { - "matrix": { - "parameters": { - "directory": [ - "react", - "vue3", - "nextjs", - "svelte" - ] - } - }, - "requires": [ - "build" - ] - } - }, - { - "test-yarn-pnp": { - "requires": [ - "build" - ] - } - }, - { - "e2e-ui": { - "requires": [ - "build" - ] - } - }, - { - "e2e-ui-vitest-3": { - "requires": [ - "build" - ] - } - }, - { - "test-init-features": { - "requires": [ - "build" - ] - } - }, - { - "test-init-empty": { - "matrix": { - "parameters": { - "packageManager": [ - "npm" - ], - "template": [ - "react-vite-ts", - "nextjs-ts", - "vue-vite-ts", - "lit-vite-ts" - ] - } - }, - "requires": [ - "build" - ] - } - }, - { - "test-init-empty-windows": { - "matrix": { - "parameters": { - "packageManager": [ - "npm" - ], - "template": [ - "react-vite-ts", - "nextjs-ts", - "vue-vite-ts", - "lit-vite-ts" - ] - } - }, - "requires": [ - "build" - ] - } - } - ], - "when": { - "equal": [ - "daily", - "<< pipeline.parameters.workflow >>" - ] - } - }, - "docs": { - "jobs": [ - "pretty-docs" - ], - "when": { - "equal": [ - "docs", - "<< pipeline.parameters.workflow >>" - ] - } - }, - "merged": { - "jobs": [ - "pretty-docs", - "build", - { - "lint": { - "requires": [ - "build" - ] - } - }, - { - "knip": { - "requires": [ - "build" - ] - } - }, - { - "bench-packages": { - "requires": [ - "build" - ] - } - }, - "check", - { - "unit-tests": { - "requires": [ - "build" - ] - } - }, - { - "stories-tests": { - "requires": [ - "build" - ] - } - }, - { - "script-checks": { - "requires": [ - "build" - ] - } - }, - { - "chromatic-internal-storybook": { - "requires": [ - "build" - ] - } - }, - { - "coverage": { - "requires": [ - "unit-tests" - ] - } - }, - { - "create-sandboxes": { - "parallelism": 21, - "requires": [ - "build" - ] - } - }, - { - "chromatic-sandboxes": { - "parallelism": 18, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "e2e-production": { - "parallelism": 6, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "e2e-dev": { - "parallelism": 14, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "test-runner-production": { - "parallelism": 16, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "vitest-integration": { - "parallelism": 7, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "check-sandboxes": { - "parallelism": 1, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "test-portable-stories": { - "matrix": { - "parameters": { - "directory": [ - "react", - "vue3", - "nextjs", - "svelte" - ] - } - }, - "requires": [ - "build" - ] - } - }, - { - "test-yarn-pnp": { - "requires": [ - "build" - ] - } - }, - { - "e2e-ui": { - "requires": [ - "build" - ] - } - }, - { - "e2e-ui-vitest-3": { - "requires": [ - "build" - ] - } - }, - { - "test-init-features": { - "requires": [ - "build" - ] - } - }, - { - "test-init-empty-windows": { - "matrix": { - "parameters": { - "packageManager": [ - "npm" - ], - "template": [ - "react-vite-ts", - "nextjs-ts", - "vue-vite-ts", - "lit-vite-ts" - ] - } - }, - "requires": [ - "build" - ] - } - } - ], - "when": { - "equal": [ - "merged", - "<< pipeline.parameters.workflow >>" - ] - } - }, - "normal": { - "jobs": [ - "pretty-docs", - "build", - { - "lint": { - "requires": [ - "build" - ] - } - }, - { - "knip": { - "requires": [ - "build" - ] - } - }, - { - "bench-packages": { - "requires": [ - "build" - ] - } - }, - "check", - { - "unit-tests": { - "requires": [ - "build" - ] - } - }, - { - "stories-tests": { - "requires": [ - "build" - ] - } - }, - { - "script-checks": { - "requires": [ - "build" - ] - } - }, - { - "chromatic-internal-storybook": { - "requires": [ - "build" - ] - } - }, - { - "coverage": { - "requires": [ - "unit-tests" - ] - } - }, - { - "create-sandboxes": { - "parallelism": 14, - "requires": [ - "build" - ] - } - }, - { - "chromatic-sandboxes": { - "parallelism": 11, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "e2e-production": { - "parallelism": 6, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "e2e-dev": { - "parallelism": 8, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "test-runner-production": { - "parallelism": 9, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "vitest-integration": { - "parallelism": 5, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "check-sandboxes": { - "parallelism": 1, - "requires": [ - "create-sandboxes" - ] - } - }, - { - "test-yarn-pnp": { - "requires": [ - "build" - ] - } - }, - { - "e2e-ui": { - "requires": [ - "build" - ] - } - }, - { - "e2e-ui-vitest-3": { - "requires": [ - "build" - ] - } - }, - { - "test-init-features": { - "requires": [ - "build" - ] - } - }, - { - "test-portable-stories": { - "matrix": { - "parameters": { - "directory": [ - "react", - "vue3", - "nextjs", - "svelte" - ] - } - }, - "requires": [ - "build" - ] - } - } - ], - "when": { - "equal": [ - "normal", - "<< pipeline.parameters.workflow >>" - ] - } - } - } -} \ No newline at end of file From 54027c931f1bd2bc79f80143b0e72927ba560039 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 15:08:38 +0100 Subject: [PATCH 208/310] cleanup --- .circleci/config.generated.yml | 9 ++-- scripts/ci/data.ts | 99 +++++++--------------------------- scripts/ci/utils.ts | 24 +++++++++ 3 files changed, 50 insertions(+), 82 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index c638fe652570..8d52ffe8cf6c 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -600,7 +600,7 @@ jobs: - attach_workspace: at: C:\Users\circleci - run: - name: Run Install + name: Install dependencies command: yarn install - run: name: Verdaccio @@ -745,7 +745,7 @@ jobs: class: xlarge steps: - git-shallow-clone/checkout_advanced: - clone_options: --depth 500 + clone_options: --depth 1 - attach_workspace: at: /tmp - restore_cache: @@ -1238,7 +1238,10 @@ jobs: corepack enable corepack prepare yarn@stable --activate - attach_workspace: - at: C:\Users\circleci\project + at: C:\Users\circleci + - run: + name: Install dependencies + command: yarn install - run: command: yarn install name: Install dependencies diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index be34629a0c75..f7a072454d50 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -14,13 +14,14 @@ import { git, node, npm, + restore, server, toId, verdaccio, workspace, } from './utils'; -const CACHE_KEYS = (platform = 'linux') => +export const CACHE_KEYS = (platform = 'linux') => [ `v5-${platform}-node_modules`, '{{ checksum ".nvmrc" }}', @@ -237,9 +238,7 @@ function defineSandboxFlow(name: K) { class: 'large', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), verdaccio.start(), { run: { @@ -302,7 +301,7 @@ function defineSandboxFlow(name: K) { class: 'medium', }, steps: [ - 'checkout', + 'checkout', // we need the full git history for chromatic workspace.attach(), cache.attach(CACHE_KEYS()), { @@ -335,9 +334,7 @@ function defineSandboxFlow(name: K) { class: 'medium', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Running Vitest', @@ -502,9 +499,7 @@ const uiTests = defineJob( class: 'medium+', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Build internal storybook', @@ -538,9 +533,7 @@ const check = defineJob( class: 'xlarge', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'TypeCheck code', @@ -570,9 +563,7 @@ const knip = defineJob( class: 'xlarge', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Run Knip', @@ -593,9 +584,7 @@ const linux_unitTests = defineJob( class: 'xlarge', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Run tests', @@ -625,17 +614,7 @@ const windows_unitTests = defineJob( shell: 'bash.exe', }, steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - workspace.attach('C:\\Users\\circleci\\project'), - // cache.attach(CACHE_KEYS('windows')), - /** - * I really wish this wasn't needed, but it is. I tried a lot of things to get it to not be - * needed, but ultimately, something kept failing. At this point I gave up: - * https://app.circleci.com/pipelines/github/storybookjs/storybook/110923/workflows/50076187-a5a7-4955-bff4-30bf9aec465c/jobs/976355 - * - * So if you see a way to debug/solve those failing tests, please do so. - */ + ...restore.windows(), { run: { command: 'yarn install', @@ -662,9 +641,7 @@ const packageBenchmarks = defineJob( class: 'xlarge', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -689,9 +666,7 @@ const testStorybooksPortableVitest3 = defineJob( class: 'medium', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Install dependencies', @@ -721,9 +696,7 @@ const testStorybooksPNP = defineJob( class: 'medium', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Install dependencies', @@ -760,9 +733,7 @@ const testRunner = defineJob( class: 'medium', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Running test-runner', @@ -783,15 +754,7 @@ const windows_sandbox_build = defineJob( shell: 'bash.exe', }, steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - workspace.attach('C:\\Users\\circleci'), - { - run: { - name: 'Install dependencies', - command: 'yarn install', - }, - }, + ...restore.windows(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -842,15 +805,7 @@ const windows_sandbox_dev = defineJob( shell: 'bash.exe', }, steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - workspace.attach('C:\\Users\\circleci'), - { - run: { - name: 'Install dependencies', - command: 'yarn install', - }, - }, + ...restore.windows(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -896,15 +851,7 @@ const initEmptyWindows = defineJob( shell: 'bash.exe', }, steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - workspace.attach('C:\\Users\\circleci'), - { - run: { - name: 'Run Install', - command: 'yarn install', - }, - }, + ...restore.windows(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -946,9 +893,7 @@ const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-t class: 'medium', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -1354,9 +1299,7 @@ function defineSandboxJob_build({ { executor, steps: [ - git.checkout({ shallow: false }), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Build storybook', @@ -1420,9 +1363,7 @@ function defineSandboxJob_dev({ { executor, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), ...(options.e2e ? [ { diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index a88cadcb9e9a..5bc26d911af9 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -1,3 +1,5 @@ +import { CACHE_KEYS } from './data'; + export const ROOT_DIR = '/tmp'; export const WORKING_DIR = `project`; export const SANDBOX_DIR = `storybook-sandboxes`; @@ -167,3 +169,25 @@ export const verdaccio = { }, ports: ['6001', '6002'], }; + +export const restore = { + linux: () => [git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS())], + windows: () => [ + git.checkout({ forceHttps: true }), + node.installOnWindows(), + workspace.attach('C:\\Users\\circleci'), + /** + * I really wish this wasn't needed, but it is. I tried a lot of things to get it to not be + * needed, but ultimately, something kept failing. At this point I gave up: + * https://app.circleci.com/pipelines/github/storybookjs/storybook/110923/workflows/50076187-a5a7-4955-bff4-30bf9aec465c/jobs/976355 + * + * So if you see a way to debug/solve those failing tests, please do so. + */ + { + run: { + name: 'Install dependencies', + command: 'yarn install', + }, + }, + ], +}; From 20af1b5debeb53730ec5ffed4d3db251157f2e7b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 15:09:32 +0100 Subject: [PATCH 209/310] Update CircleCI configuration to use sb_playwright executor for vitest jobs --- .circleci/config.generated.yml | 2 +- scripts/ci/data.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 8d52ffe8cf6c..3be4fca102b6 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -1011,7 +1011,7 @@ jobs: react-vite-default-ts--vitest: description: react-vite/default-ts (vitest) executor: - name: sb_node_22_classic + name: sb_playwright class: medium steps: - git-shallow-clone/checkout_advanced: diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index f7a072454d50..ace3b60fc4a7 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -330,7 +330,7 @@ function defineSandboxFlow(name: K) { names.vitest, { executor: { - name: 'sb_node_22_classic', + name: 'sb_playwright', class: 'medium', }, steps: [ From 0f3451f10537d93f183b2d2aee2f656a55afbb31 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 15:27:14 +0100 Subject: [PATCH 210/310] refactor code structure --- scripts/ci/commands.ts | 51 +++ scripts/ci/data.ts | 789 +++------------------------------- scripts/ci/executors.ts | 84 ++++ scripts/ci/sandboxes.ts | 459 ++++++++++++++++++++ scripts/ci/test-storybooks.ts | 77 ++++ scripts/ci/utils.ts | 49 ++- 6 files changed, 775 insertions(+), 734 deletions(-) create mode 100644 scripts/ci/commands.ts create mode 100644 scripts/ci/executors.ts create mode 100644 scripts/ci/sandboxes.ts create mode 100644 scripts/ci/test-storybooks.ts diff --git a/scripts/ci/commands.ts b/scripts/ci/commands.ts new file mode 100644 index 000000000000..cf62fc0dc420 --- /dev/null +++ b/scripts/ci/commands.ts @@ -0,0 +1,51 @@ +import { git } from './utils'; + +export const commands = { + 'cancel-workflow-on-failure': { + description: 'Cancels the entire workflow in case the previous step has failed', + steps: [ + { + run: { + command: + 'echo "Canceling workflow as previous step resulted in failure."\necho "To execute all checks locally, please run yarn ci-tests"\ncurl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"\n', + name: 'Cancel current workflow', + when: 'on_fail', + }, + }, + ], + }, + 'report-workflow-on-failure': { + description: 'Reports failures to discord', + parameters: { + template: { + default: 'none', + description: 'Which template to report in discord. Applicable for parallel sandbox jobs\n', + type: 'string', + }, + }, + steps: [ + git.unshallow(), + { + 'discord/status': { + fail_only: true, + failure_message: + '$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)', + only_for_branches: 'main,next,next-release,latest-release', + }, + }, + ], + }, + 'start-event-collector': { + description: 'Starts the event collector', + steps: [ + { + run: { + background: true, + command: 'yarn jiti ./event-log-collector.ts', + name: 'Start Event Collector', + working_directory: 'scripts', + }, + }, + ], + }, +}; diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index ace3b60fc4a7..2413573d5c5c 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1,398 +1,37 @@ -import { readFileSync } from 'node:fs'; import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; -import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; +import { commands } from './commands'; +import { executors } from './executors'; +// import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; import { - ROOT_DIR, - SANDBOX_DIR, + defineSandboxFlow, + defineSandboxTestRunner, + defineWindowsSandboxBuild, + defineWindowsSandboxDev, +} from './sandboxes'; +import { definePortableStoryTest } from './test-storybooks'; +import { + CACHE_KEYS, + CACHE_PATHS, + type JobImplementation, WORKING_DIR, artifact, cache, + defineJob, git, node, npm, restore, server, - toId, verdaccio, workspace, } from './utils'; -export const CACHE_KEYS = (platform = 'linux') => - [ - `v5-${platform}-node_modules`, - '{{ checksum ".nvmrc" }}', - '{{ checksum ".yarnrc.yml" }}', - '{{ checksum "yarn.lock" }}', - ].map((_, index, list) => { - return list.slice(0, list.length - index).join('/'); - }); -const CACHE_PATHS = [ - '.yarn/cache', - '.yarn/unplugged', - '.yarn/build-state.yml', - '.yarn/root-install-state.gz', - 'node_modules', - 'code/node_modules', - 'scripts/node_modules', -]; - const dirname = import.meta.dirname; -const commands = { - 'cancel-workflow-on-failure': { - description: 'Cancels the entire workflow in case the previous step has failed', - steps: [ - { - run: { - command: - 'echo "Canceling workflow as previous step resulted in failure."\necho "To execute all checks locally, please run yarn ci-tests"\ncurl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"\n', - name: 'Cancel current workflow', - when: 'on_fail', - }, - }, - ], - }, - 'report-workflow-on-failure': { - description: 'Reports failures to discord', - parameters: { - template: { - default: 'none', - description: 'Which template to report in discord. Applicable for parallel sandbox jobs\n', - type: 'string', - }, - }, - steps: [ - git.unshallow(), - { - 'discord/status': { - fail_only: true, - failure_message: - '$(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)', - only_for_branches: 'main,next,next-release,latest-release', - }, - }, - ], - }, - 'start-event-collector': { - description: 'Starts the event collector', - steps: [ - { - run: { - background: true, - command: 'yarn jiti ./event-log-collector.ts', - name: 'Start Event Collector', - working_directory: 'scripts', - }, - }, - ], - }, -}; -const executors = { - sb_node_18_browsers: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'cimg/node:18.20.3-browsers', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, - }, - sb_node_22_browsers: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'cimg/node:22.15.0-browsers', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, - }, - sb_node_22_classic: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'cimg/node:22.15.0', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, - }, - sb_playwright: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'mcr.microsoft.com/playwright:v1.52.0-noble', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, - }, -} as const; - -type JobImplementation = { - executor: - | { - name: keyof typeof executors; - class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - } - | { - name: 'win/default'; - size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - }; - steps: unknown[]; - parameters?: Record; - parallelism?: number; -}; - -function defineJob( - name: K, - implementation: I, - requires = [] as string[] -) { - return { - id: toId(name), - name, - implementation: { - description: name, - ...implementation, - }, - requires, - }; -} - -function defineSandboxFlow(name: K) { - const id = toId(name); - const data = allTemplates[name as keyof typeof allTemplates]; - const { skipTasks } = data; - - const path = name.replace('/', '-'); - - const names = { - create: `${name} (create)`, - build: `${name} (build)`, - dev: `${name} (dev)`, - chromatic: `${name} (chromatic)`, - vitest: `${name} (vitest)`, - ['test-runner']: `${name} (test-runner)`, - }; - const ids = { - create: `${toId(names.create)}`, - build: `${toId(names.build)}`, - dev: `${toId(names.dev)}`, - chromatic: `${toId(names.chromatic)}`, - vitest: `${toId(names.vitest)}`, - ['test-runner']: `${toId(names['test-runner'])}`, - }; - - const jobs = [ - defineJob( - names.create, - { - executor: { - name: 'sb_node_22_browsers', - class: 'large', - }, - steps: [ - ...restore.linux(), - verdaccio.start(), - { - run: { - name: 'Start Event Collector', - working_directory: `scripts`, - background: true, - command: 'yarn jiti ./event-log-collector.ts', - }, - }, - server.wait([...verdaccio.ports, '6007']), - { - run: { - name: 'Setup Corepack', - command: [ - // - 'sudo corepack enable', - 'which yarn', - 'yarn --version', - ].join('\n'), - }, - }, - { - run: { - name: 'Create Sandboxes', - command: `yarn task sandbox --template ${name} --no-link -s sandbox --debug`, - environment: { - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', - }, - }, - }, - artifact.persist(`${ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), - workspace.persist([`${SANDBOX_DIR}/${id}`]), - ], - }, - ['sandboxes'] - ), - defineSandboxJob_build({ - directory: id, - name: names.build, - template: name, - needs: [ids.create], - options: { - e2e: !skipTasks?.includes('e2e-tests'), - chromatic: !skipTasks?.includes('chromatic'), - }, - }), - defineSandboxJob_dev({ - name: names.dev, - template: name, - needs: [ids.create], - options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, - }), - !skipTasks?.includes('chromatic') - ? defineJob( - names.chromatic, - { - executor: { - name: 'sb_node_22_classic', - class: 'medium', - }, - steps: [ - 'checkout', // we need the full git history for chromatic - workspace.attach(), - cache.attach(CACHE_KEYS()), - { - // we copy to the working directory to get git history, which chromatic needs for baselines - run: { - name: 'Copy sandbox to working directory', - command: `cp ${join(ROOT_DIR, SANDBOX_DIR)} ${join(ROOT_DIR, WORKING_DIR, 'sandbox')} -r --remove-destination`, - }, - }, - { - run: { - name: 'Running Chromatic', - command: `yarn task chromatic --template ${name} --no-link -s chromatic`, - environment: { - STORYBOOK_SANDBOX_ROOT: `./sandbox`, - }, - }, - }, - ], - }, - [ids.build] - ) - : undefined, - !skipTasks?.includes('vitest-integration') - ? defineJob( - names.vitest, - { - executor: { - name: 'sb_playwright', - class: 'medium', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Running Vitest', - command: `yarn task vitest-integration --template ${name} --no-link -s vitest-integration`, - }, - }, - ], - }, - [ids.build] - ) - : undefined, - - /** - * Question: What is this for? Do we want to know if the test-runner works? Or do we want to - * know if the sandbox works? - * - * If it's the first, we actually only need to run the test-runner job once, on any sandbox. If - * it's the second, we need to run the test-runner job for each sandbox, but then we don't need - * to run it when we're already running the chromatic job. - */ - !skipTasks?.includes('test-runner') && skipTasks.includes('chromatic') - ? defineJob( - names['test-runner'], - { - executor: { - name: 'sb_playwright', - class: 'medium', - }, - steps: [ - 'checkout', - workspace.attach(), - cache.attach(CACHE_KEYS()), - { - run: { - name: 'Running test-runner', - command: `yarn task test-runner --template ${name} --no-link -s test-runner`, - }, - }, - ], - }, - [ids.build] - ) - : undefined, - ].filter(Boolean); - return { - name, - path, - jobs, - workflow: jobs.map((job) => { - return { - [job.id]: { - requires: job.requires, - }, - }; - }), - }; -} - const linux_build = defineJob('build-linux', { executor: { name: 'sb_node_22_classic', @@ -725,122 +364,11 @@ const sandboxes = [ // 'react-vite/default-js', ].map(defineSandboxFlow); -const testRunner = defineJob( - `${sandboxes[0].jobs[1].id}-test-runner`, - { - executor: { - name: 'sb_playwright', - class: 'medium', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Running test-runner', - command: `yarn task test-runner --template ${sandboxes[0].name} --no-link -s test-runner`, - }, - }, - ], - }, - [sandboxes[0].jobs[1].id] -); +const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); -const windows_sandbox_build = defineJob( - `${sandboxes[0].jobs[1].id}-windows`, - { - executor: { - name: 'win/default', - size: 'xlarge', - shell: 'bash.exe', - }, - steps: [ - ...restore.windows(), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Run Install', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandboxes[0].path}`, - command: 'yarn install', - }, - }, - { - run: { - name: 'Install playwright', - command: 'yarn playwright install chromium --with-deps', - }, - }, - { - run: { - name: 'Build storybook', - command: `yarn task build --template ${sandboxes[0].name} --no-link -s build`, - }, - }, - { - run: { - name: 'Serve storybook', - background: true, - command: `yarn task serve --template ${sandboxes[0].name} --no-link -s serve`, - }, - }, - server.wait(['8001']), - { - run: { - name: 'Running E2E Tests', - working_directory: 'code', - command: `yarn task e2e-tests --template ${sandboxes[0].name} --no-link -s e2e-tests`, - }, - }, - ], - }, - [sandboxes[0].jobs[0].id] -); +const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); -const windows_sandbox_dev = defineJob( - `${sandboxes[0].jobs[2].id}-windows`, - { - executor: { - name: 'win/default', - size: 'xlarge', - shell: 'bash.exe', - }, - steps: [ - ...restore.windows(), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Run Install', - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandboxes[0].path}`, - command: 'yarn install', - }, - }, - { - run: { - name: 'Install playwright', - command: 'yarn playwright install chromium --with-deps', - }, - }, - { - run: { - name: 'Run storybook', - background: true, - working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandboxes[0].path}`, - command: 'yarn storybook --port 8001', - }, - }, - server.wait(['8001']), - { - run: { - name: 'Running E2E Tests', - working_directory: 'code', - command: `yarn task e2e-tests-dev --template ${sandboxes[0].name} --no-link -s e2e-tests-dev`, - }, - }, - ], - }, - [sandboxes[0].jobs[0].id] -); +const testRunner = defineSandboxTestRunner(sandboxes[0]); const initEmptyWindows = defineJob( 'init-empty-windows', @@ -883,48 +411,49 @@ const initEmptyWindows = defineJob( ['init-empty'] ); -const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map( - (template) => - defineJob( - `init-empty-${template}`, - { - executor: { - name: 'sb_node_22_classic', - class: 'medium', - }, - steps: [ - ...restore.linux(), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Storybook init from empty directory (Linux NPM)', - working_directory: '/tmp', - command: [ - `mkdir empty-${template}`, - `cd empty-${template}`, - `npm set registry http://localhost:6001`, - `npx storybook init --yes --package-manager npm`, - ].join('\n'), - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: template, - }, +const defineEmptyInitFlow = (template: string) => + defineJob( + `init-empty-${template}`, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + ...restore.linux(), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Linux NPM)', + working_directory: '/tmp', + command: [ + `mkdir empty-${template}`, + `cd empty-${template}`, + `npm set registry http://localhost:6001`, + `npx storybook init --yes --package-manager npm`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: template, }, }, - { - run: { - name: 'Run storybook smoke test', - working_directory: `/tmp/empty-${template}`, - command: 'npm run storybook -- --smoke-test', - }, + }, + { + run: { + name: 'Run storybook smoke test', + working_directory: `/tmp/empty-${template}`, + command: 'npm run storybook -- --smoke-test', }, - ], - }, + }, + ], + }, - ['init-empty'] - ) + ['init-empty'] + ); +const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map( + defineEmptyInitFlow ); const initFeatures = defineJob( @@ -1194,209 +723,3 @@ export const data = { }, }, }; - -function definePortableStoryTest(directory: string) { - const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; - - const { scripts } = JSON.parse( - readFileSync(join(import.meta.dirname, '..', '..', working_directory, 'package.json'), 'utf8') - ); - - return defineJob( - `test-storybooks-portable-${directory}`, - { - executor: { - name: 'sb_playwright', - class: 'medium', - }, - steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), - { - run: { - name: 'Install dependencies', - working_directory, - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - }, - }, - { - run: { - name: 'Run Jest tests', - working_directory, - command: 'yarn jest', - }, - }, - { - run: { - name: 'Run Vitest tests', - working_directory, - command: 'yarn vitest', - }, - }, - { - run: { - name: 'Run Playwright CT tests', - working_directory, - command: 'yarn playwright-ct', - }, - }, - ...(scripts['playwright-e2e'] - ? [ - { - run: { - name: 'Run Playwright E2E tests', - working_directory, - command: 'yarn playwright-e2e', - }, - }, - ] - : []), - { - run: { - name: 'Run Cypress CT tests', - working_directory, - command: 'yarn cypress', - }, - }, - ], - }, - ['test-storybooks'] - ); -} - -function defineSandboxJob_build({ - directory, - name, - template, - needs, - options, -}: { - directory: string; - name: string; - needs: string[]; - template: string; - options: { - e2e: boolean; - chromatic: boolean; - }; -}) { - const executor: JobImplementation['executor'] = options.e2e - ? { - name: 'sb_playwright', - class: 'xlarge', - } - : { - name: 'sb_node_22_classic', - class: 'large', - }; - - return defineJob( - name, - { - executor, - steps: [ - ...restore.linux(), - { - run: { - name: 'Build storybook', - command: `yarn task build --template ${template} --no-link -s build`, - }, - }, - ...(options.chromatic - ? [workspace.persist([`${SANDBOX_DIR}/${directory}/storybook-static`])] - : []), - ...(options.e2e - ? [ - { - run: { - name: 'Serve storybook', - background: true, - command: `yarn task serve --template ${template} --no-link -s serve`, - }, - }, - server.wait(['8001']), - { - run: { - name: 'Running E2E Tests', - command: [ - `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${template} --no-link -s e2e-tests" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - ] - : []), - ], - }, - needs - ); -} -function defineSandboxJob_dev({ - name, - template, - needs, - options, -}: { - name: string; - needs: string[]; - template: string; - options: { - e2e: boolean; - }; -}) { - const executor: JobImplementation['executor'] = options.e2e - ? { - name: 'sb_playwright', - class: 'xlarge', - } - : { - name: 'sb_node_22_classic', - class: 'large', - }; - - return defineJob( - name, - { - executor, - steps: [ - ...restore.linux(), - ...(options.e2e - ? [ - { - run: { - name: 'Run storybook', - working_directory: 'code', - background: true, - command: `yarn task dev --template ${template} --no-link -s dev`, - }, - }, - server.wait(['6006']), - { - run: { - name: 'Running E2E Tests', - command: [ - 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${template} --no-link -s e2e-tests-dev" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - ] - : [ - { - run: { - name: 'Run storybook smoke test', - working_directory: 'code', - background: true, - command: `yarn task smoke-test --template ${template} --no-link -s dev`, - }, - }, - ]), - ], - }, - needs - ); -} diff --git a/scripts/ci/executors.ts b/scripts/ci/executors.ts new file mode 100644 index 000000000000..9d89994e0274 --- /dev/null +++ b/scripts/ci/executors.ts @@ -0,0 +1,84 @@ +import { ROOT_DIR, WORKING_DIR } from './utils'; + +export const executors = { + sb_node_18_browsers: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:18.20.3-browsers', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + }, + sb_node_22_browsers: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:22.15.0-browsers', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + }, + sb_node_22_classic: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'cimg/node:22.15.0', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + }, + sb_playwright: { + docker: [ + { + environment: { + NODE_OPTIONS: '--max_old_space_size=6144', + }, + image: 'mcr.microsoft.com/playwright:v1.52.0-noble', + }, + ], + parameters: { + class: { + default: 'small', + description: 'The Resource class', + enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], + type: 'enum', + }, + }, + resource_class: '<>', + working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + }, +} as const; diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts new file mode 100644 index 000000000000..5da83f0b17fc --- /dev/null +++ b/scripts/ci/sandboxes.ts @@ -0,0 +1,459 @@ +import { join } from 'path'; + +import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; +import { defineJob } from './utils'; +import type { JobImplementation } from './utils'; +import { + CACHE_KEYS, + ROOT_DIR, + SANDBOX_DIR, + WORKING_DIR, + artifact, + cache, + restore, + server, + toId, + verdaccio, + workspace, +} from './utils'; + +function defineSandboxJob_build({ + directory, + name, + template, + needs, + options, +}: { + directory: string; + name: string; + needs: string[]; + template: string; + options: { + e2e: boolean; + chromatic: boolean; + }; +}) { + const executor: JobImplementation['executor'] = options.e2e + ? { + name: 'sb_playwright', + class: 'xlarge', + } + : { + name: 'sb_node_22_classic', + class: 'large', + }; + + return defineJob( + name, + { + executor, + steps: [ + ...restore.linux(), + { + run: { + name: 'Build storybook', + command: `yarn task build --template ${template} --no-link -s build`, + }, + }, + ...(options.chromatic + ? [workspace.persist([`${SANDBOX_DIR}/${directory}/storybook-static`])] + : []), + ...(options.e2e + ? [ + { + run: { + name: 'Serve storybook', + background: true, + command: `yarn task serve --template ${template} --no-link -s serve`, + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + command: [ + `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${template} --no-link -s e2e-tests" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + ] + : []), + ], + }, + needs + ); +} +function defineSandboxJob_dev({ + name, + template, + needs, + options, +}: { + name: string; + needs: string[]; + template: string; + options: { + e2e: boolean; + }; +}) { + const executor: JobImplementation['executor'] = options.e2e + ? { + name: 'sb_playwright', + class: 'xlarge', + } + : { + name: 'sb_node_22_classic', + class: 'large', + }; + + return defineJob( + name, + { + executor, + steps: [ + ...restore.linux(), + ...(options.e2e + ? [ + { + run: { + name: 'Run storybook', + working_directory: 'code', + background: true, + command: `yarn task dev --template ${template} --no-link -s dev`, + }, + }, + server.wait(['6006']), + { + run: { + name: 'Running E2E Tests', + command: [ + 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${template} --no-link -s e2e-tests-dev" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + ] + : [ + { + run: { + name: 'Run storybook smoke test', + working_directory: 'code', + background: true, + command: `yarn task smoke-test --template ${template} --no-link -s dev`, + }, + }, + ]), + ], + }, + needs + ); +} + +export function defineSandboxFlow(name: K) { + const id = toId(name); + const data = allTemplates[name as keyof typeof allTemplates]; + const { skipTasks } = data; + + const path = name.replace('/', '-'); + + const names = { + create: `${name} (create)`, + build: `${name} (build)`, + dev: `${name} (dev)`, + chromatic: `${name} (chromatic)`, + vitest: `${name} (vitest)`, + ['test-runner']: `${name} (test-runner)`, + }; + const ids = { + create: `${toId(names.create)}`, + build: `${toId(names.build)}`, + dev: `${toId(names.dev)}`, + chromatic: `${toId(names.chromatic)}`, + vitest: `${toId(names.vitest)}`, + ['test-runner']: `${toId(names['test-runner'])}`, + }; + + const jobs = [ + defineJob( + names.create, + { + executor: { + name: 'sb_node_22_browsers', + class: 'large', + }, + steps: [ + ...restore.linux(), + verdaccio.start(), + { + run: { + name: 'Start Event Collector', + working_directory: `scripts`, + background: true, + command: 'yarn jiti ./event-log-collector.ts', + }, + }, + server.wait([...verdaccio.ports, '6007']), + { + run: { + name: 'Setup Corepack', + command: [ + // + 'sudo corepack enable', + 'which yarn', + 'yarn --version', + ].join('\n'), + }, + }, + { + run: { + name: 'Create Sandboxes', + command: `yarn task sandbox --template ${name} --no-link -s sandbox --debug`, + environment: { + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', + }, + }, + }, + artifact.persist(`${ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), + workspace.persist([`${SANDBOX_DIR}/${id}`]), + ], + }, + ['sandboxes'] + ), + defineSandboxJob_build({ + directory: id, + name: names.build, + template: name, + needs: [ids.create], + options: { + e2e: !skipTasks?.includes('e2e-tests'), + chromatic: !skipTasks?.includes('chromatic'), + }, + }), + defineSandboxJob_dev({ + name: names.dev, + template: name, + needs: [ids.create], + options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, + }), + !skipTasks?.includes('chromatic') + ? defineJob( + names.chromatic, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + 'checkout', // we need the full git history for chromatic + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + // we copy to the working directory to get git history, which chromatic needs for baselines + run: { + name: 'Copy sandbox to working directory', + command: `cp ${join(ROOT_DIR, SANDBOX_DIR)} ${join(ROOT_DIR, WORKING_DIR, 'sandbox')} -r --remove-destination`, + }, + }, + { + run: { + name: 'Running Chromatic', + command: `yarn task chromatic --template ${name} --no-link -s chromatic`, + environment: { + STORYBOOK_SANDBOX_ROOT: `./sandbox`, + }, + }, + }, + ], + }, + [ids.build] + ) + : undefined, + !skipTasks?.includes('vitest-integration') + ? defineJob( + names.vitest, + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Running Vitest', + command: `yarn task vitest-integration --template ${name} --no-link -s vitest-integration`, + }, + }, + ], + }, + [ids.build] + ) + : undefined, + + /** + * Question: What is this for? Do we want to know if the test-runner works? Or do we want to + * know if the sandbox works? + * + * If it's the first, we actually only need to run the test-runner job once, on any sandbox. If + * it's the second, we need to run the test-runner job for each sandbox, but then we don't need + * to run it when we're already running the chromatic job. + */ + !skipTasks?.includes('test-runner') && skipTasks.includes('chromatic') + ? defineJob( + names['test-runner'], + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + 'checkout', + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Running test-runner', + command: `yarn task test-runner --template ${name} --no-link -s test-runner`, + }, + }, + ], + }, + [ids.build] + ) + : undefined, + ].filter(Boolean); + return { + name, + path, + jobs, + workflow: jobs.map((job) => { + return { + [job.id]: { + requires: job.requires, + }, + }; + }), + }; +} +export function defineSandboxTestRunner(sandbox: ReturnType) { + return defineJob( + `${sandbox.jobs[1].id}-test-runner`, + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Running test-runner', + command: `yarn task test-runner --template ${sandbox.name} --no-link -s test-runner`, + }, + }, + ], + }, + [sandbox.jobs[1].id] + ); +} +export function defineWindowsSandboxDev(sandbox: ReturnType) { + return defineJob( + `${sandbox.jobs[2].id}-windows`, + { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + ...restore.windows(), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Run Install', + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandbox.path}`, + command: 'yarn install', + }, + }, + { + run: { + name: 'Install playwright', + command: 'yarn playwright install chromium --with-deps', + }, + }, + { + run: { + name: 'Run storybook', + background: true, + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandbox.path}`, + command: 'yarn storybook --port 8001', + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + working_directory: 'code', + command: `yarn task e2e-tests-dev --template ${sandbox.name} --no-link -s e2e-tests-dev`, + }, + }, + ], + }, + [sandbox.jobs[0].id] + ); +} +export function defineWindowsSandboxBuild(sandbox: ReturnType) { + return defineJob( + `${sandbox.jobs[1].id}-windows`, + { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + ...restore.windows(), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Run Install', + working_directory: `C:\\Users\\circleci\\storybook-sandboxes\\${sandbox.path}`, + command: 'yarn install', + }, + }, + { + run: { + name: 'Install playwright', + command: 'yarn playwright install chromium --with-deps', + }, + }, + { + run: { + name: 'Build storybook', + command: `yarn task build --template ${sandbox.name} --no-link -s build`, + }, + }, + { + run: { + name: 'Serve storybook', + background: true, + command: `yarn task serve --template ${sandbox.name} --no-link -s serve`, + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + working_directory: 'code', + command: `yarn task e2e-tests --template ${sandbox.name} --no-link -s e2e-tests`, + }, + }, + ], + }, + [sandbox.jobs[0].id] + ); +} diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts new file mode 100644 index 000000000000..06c2839f5593 --- /dev/null +++ b/scripts/ci/test-storybooks.ts @@ -0,0 +1,77 @@ +import { readFileSync } from 'fs'; +import { join } from 'path/posix'; + +import { CACHE_KEYS, cache, defineJob, git, workspace } from './utils'; + +export function definePortableStoryTest(directory: string) { + const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; + + const { scripts } = JSON.parse( + readFileSync(join(import.meta.dirname, '..', '..', working_directory, 'package.json'), 'utf8') + ); + + return defineJob( + `test-storybooks-portable-${directory}`, + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + run: { + name: 'Install dependencies', + working_directory, + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + }, + }, + { + run: { + name: 'Run Jest tests', + working_directory, + command: 'yarn jest', + }, + }, + { + run: { + name: 'Run Vitest tests', + working_directory, + command: 'yarn vitest', + }, + }, + { + run: { + name: 'Run Playwright CT tests', + working_directory, + command: 'yarn playwright-ct', + }, + }, + ...(scripts['playwright-e2e'] + ? [ + { + run: { + name: 'Run Playwright E2E tests', + working_directory, + command: 'yarn playwright-e2e', + }, + }, + ] + : []), + { + run: { + name: 'Run Cypress CT tests', + working_directory, + command: 'yarn cypress', + }, + }, + ], + }, + ['test-storybooks'] + ); +} diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index 5bc26d911af9..e56be2094df7 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -1,4 +1,4 @@ -import { CACHE_KEYS } from './data'; +import type { executors } from './executors'; export const ROOT_DIR = '/tmp'; export const WORKING_DIR = `project`; @@ -191,3 +191,50 @@ export const restore = { }, ], }; +export const CACHE_KEYS = (platform = 'linux') => + [ + `v5-${platform}-node_modules`, + '{{ checksum ".nvmrc" }}', + '{{ checksum ".yarnrc.yml" }}', + '{{ checksum "yarn.lock" }}', + ].map((_, index, list) => { + return list.slice(0, list.length - index).join('/'); + }); +export const CACHE_PATHS = [ + '.yarn/cache', + '.yarn/unplugged', + '.yarn/build-state.yml', + '.yarn/root-install-state.gz', + 'node_modules', + 'code/node_modules', + 'scripts/node_modules', +]; +export function defineJob( + name: K, + implementation: I, + requires = [] as string[] +) { + return { + id: toId(name), + name, + implementation: { + description: name, + ...implementation, + }, + requires, + }; +} +export type JobImplementation = { + executor: + | { + name: keyof typeof executors; + class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + } + | { + name: 'win/default'; + size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + }; + steps: unknown[]; + parameters?: Record; + parallelism?: number; +}; From f3eba1783b2e079b138a29d3c08f1ce74d5bd346 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 15:41:44 +0100 Subject: [PATCH 211/310] Add new utility functions for initializing empty Storybook projects and define additional test jobs in CircleCI configuration --- scripts/ci/data.ts | 229 +++--------------------------- scripts/ci/defineEmptyInitFlow.ts | 127 +++++++++++++++++ scripts/ci/orbs.ts | 9 ++ scripts/ci/parameters.ts | 18 +++ scripts/ci/test-storybooks.ts | 66 ++++++++- 5 files changed, 235 insertions(+), 214 deletions(-) create mode 100644 scripts/ci/defineEmptyInitFlow.ts create mode 100644 scripts/ci/orbs.ts create mode 100644 scripts/ci/parameters.ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 2413573d5c5c..d891633e656d 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -4,7 +4,14 @@ import { join } from 'node:path'; import glob from 'fast-glob'; import { commands } from './commands'; +import { + defineEmptyInitFeatures, + defineEmptyInitFlow, + defineEmptyInitWindows, +} from './defineEmptyInitFlow'; import { executors } from './executors'; +import { orbs } from './orbs'; +import { parameters } from './parameters'; // import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; import { defineSandboxFlow, @@ -12,7 +19,11 @@ import { defineWindowsSandboxBuild, defineWindowsSandboxDev, } from './sandboxes'; -import { definePortableStoryTest } from './test-storybooks'; +import { + definePortableStoryTest, + definePortableStoryTestPNP, + definePortableStoryTestVitest3, +} from './test-storybooks'; import { CACHE_KEYS, CACHE_PATHS, @@ -297,66 +308,8 @@ const packageBenchmarks = defineJob( ); const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); -const testStorybooksPortableVitest3 = defineJob( - 'test-storybooks-portable-vitest3', - { - executor: { - name: 'sb_playwright', - class: 'medium', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Install dependencies', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - }, - }, - { - run: { - name: 'Run Playwright E2E tests', - working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', - command: 'yarn playwright-e2e', - }, - }, - ], - }, - ['test-storybooks'] -); -const testStorybooksPNP = defineJob( - 'test-storybooks-pnp', - { - executor: { - name: 'sb_node_22_classic', - class: 'medium', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Install dependencies', - working_directory: 'test-storybooks/yarn-pnp', - command: 'yarn install --no-immutable', - environment: { - YARN_ENABLE_IMMUTABLE_INSTALLS: false, - }, - }, - }, - { - run: { - name: 'Run Storybook smoke test', - working_directory: 'test-storybooks/yarn-pnp', - command: 'yarn storybook --smoke-test', - }, - }, - ], - }, - ['test-storybooks'] -); +const testStorybooksPortableVitest3 = definePortableStoryTestVitest3(); +const testStorybooksPNP = definePortableStoryTestPNP(); const sandboxes = [ // @@ -370,133 +323,13 @@ const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); const testRunner = defineSandboxTestRunner(sandboxes[0]); -const initEmptyWindows = defineJob( - 'init-empty-windows', - { - executor: { - name: 'win/default', - size: 'medium', - shell: 'bash.exe', - }, - steps: [ - ...restore.windows(), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Storybook init from empty directory (Windows NPM)', - working_directory: 'C:\\Users\\circleci', - command: [ - `mkdir empty-react-vite-ts`, - `cd empty-react-vite-ts`, - `npm set registry http://localhost:6001`, - `npx storybook init --yes --package-manager npm`, - ].join('\n'), - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - }, - }, - }, - { - run: { - name: 'Run storybook smoke test', - working_directory: 'C:\\Users\\circleci\\empty-react-vite-ts', - command: 'npm run storybook -- --smoke-test', - }, - }, - ], - }, - ['init-empty'] -); +const initEmptyWindows = defineEmptyInitWindows(); -const defineEmptyInitFlow = (template: string) => - defineJob( - `init-empty-${template}`, - { - executor: { - name: 'sb_node_22_classic', - class: 'medium', - }, - steps: [ - ...restore.linux(), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Storybook init from empty directory (Linux NPM)', - working_directory: '/tmp', - command: [ - `mkdir empty-${template}`, - `cd empty-${template}`, - `npm set registry http://localhost:6001`, - `npx storybook init --yes --package-manager npm`, - ].join('\n'), - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: template, - }, - }, - }, - { - run: { - name: 'Run storybook smoke test', - working_directory: `/tmp/empty-${template}`, - command: 'npm run storybook -- --smoke-test', - }, - }, - ], - }, - - ['init-empty'] - ); const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map( defineEmptyInitFlow ); -const initFeatures = defineJob( - 'init-features', - { - executor: { - name: 'sb_node_22_classic', - class: 'medium', - }, - steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Storybook init from empty directory (Linux NPM)', - working_directory: '/tmp', - command: [ - `mkdir empty-react-vite-ts`, - `cd empty-react-vite-ts`, - `npm set registry http://localhost:6001`, - `npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug`, - ].join('\n'), - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', - }, - }, - }, - { - run: { - name: 'Run storybook smoke test', - working_directory: `/tmp/empty-react-vite-ts`, - command: 'npx vitest', - }, - }, - ], - }, - ['init-empty'] -); +const initFeatures = defineEmptyInitFeatures(); const jobs = { [linux_build.id]: linux_build.implementation, @@ -568,35 +401,6 @@ const jobs = { [testRunner.id]: testRunner.implementation, }; -const orbs = { - 'browser-tools': 'circleci/browser-tools@2.3.2', - codecov: 'codecov/codecov@5.4.3', - discord: 'antonioned/discord@0.1.0', - 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.8.0', - node: 'circleci/node@7.2.1', - nx: 'nrwl/nx@1.7.0', - win: 'circleci/windows@5.1.1', -}; - -const parameters = { - ghBaseBranch: { - default: 'next', - description: 'The name of the base branch (the target of the PR)', - type: 'string', - }, - ghPrNumber: { - default: '', - description: 'The PR number', - type: 'string', - }, - workflow: { - default: 'skipped', - description: 'Which workflow to run', - enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], - type: 'enum', - }, -}; - const workflows = { generated: { jobs: [ @@ -704,7 +508,6 @@ export const data = { commands, executors, parameters, - jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), workflows: { generated: { diff --git a/scripts/ci/defineEmptyInitFlow.ts b/scripts/ci/defineEmptyInitFlow.ts new file mode 100644 index 000000000000..e2c4b71c572d --- /dev/null +++ b/scripts/ci/defineEmptyInitFlow.ts @@ -0,0 +1,127 @@ +import { defineJob, restore, verdaccio, server, cache, CACHE_KEYS, git, workspace } from './utils'; + +export const defineEmptyInitFlow = (template: string) => defineJob( + `init-empty-${template}`, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + ...restore.linux(), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Linux NPM)', + working_directory: '/tmp', + command: [ + `mkdir empty-${template}`, + `cd empty-${template}`, + `npm set registry http://localhost:6001`, + `npx storybook init --yes --package-manager npm`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: template, + }, + }, + }, + { + run: { + name: 'Run storybook smoke test', + working_directory: `/tmp/empty-${template}`, + command: 'npm run storybook -- --smoke-test', + }, + }, + ], + }, + + ['init-empty'] +);export function defineEmptyInitFeatures() { + return defineJob( + 'init-features', + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Linux NPM)', + working_directory: '/tmp', + command: [ + `mkdir empty-react-vite-ts`, + `cd empty-react-vite-ts`, + `npm set registry http://localhost:6001`, + `npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, + }, + }, + { + run: { + name: 'Run storybook smoke test', + working_directory: `/tmp/empty-react-vite-ts`, + command: 'npx vitest', + }, + }, + ], + }, + ['init-empty'] + ); +} +export function defineEmptyInitWindows() { + return defineJob( + 'init-empty-windows', + { + executor: { + name: 'win/default', + size: 'medium', + shell: 'bash.exe', + }, + steps: [ + ...restore.windows(), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Windows NPM)', + working_directory: 'C:\\Users\\circleci', + command: [ + `mkdir empty-react-vite-ts`, + `cd empty-react-vite-ts`, + `npm set registry http://localhost:6001`, + `npx storybook init --yes --package-manager npm`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: 'react-vite-ts', + }, + }, + }, + { + run: { + name: 'Run storybook smoke test', + working_directory: 'C:\\Users\\circleci\\empty-react-vite-ts', + command: 'npm run storybook -- --smoke-test', + }, + }, + ], + }, + ['init-empty'] + ); +} + diff --git a/scripts/ci/orbs.ts b/scripts/ci/orbs.ts new file mode 100644 index 000000000000..0a311d1d68a9 --- /dev/null +++ b/scripts/ci/orbs.ts @@ -0,0 +1,9 @@ +export const orbs = { + 'browser-tools': 'circleci/browser-tools@2.3.2', + codecov: 'codecov/codecov@5.4.3', + discord: 'antonioned/discord@0.1.0', + 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.8.0', + node: 'circleci/node@7.2.1', + nx: 'nrwl/nx@1.7.0', + win: 'circleci/windows@5.1.1', +}; diff --git a/scripts/ci/parameters.ts b/scripts/ci/parameters.ts new file mode 100644 index 000000000000..282310a3e135 --- /dev/null +++ b/scripts/ci/parameters.ts @@ -0,0 +1,18 @@ +export const parameters = { + ghBaseBranch: { + default: 'next', + description: 'The name of the base branch (the target of the PR)', + type: 'string', + }, + ghPrNumber: { + default: '', + description: 'The PR number', + type: 'string', + }, + workflow: { + default: 'skipped', + description: 'Which workflow to run', + enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], + type: 'enum', + }, +}; diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index 06c2839f5593..0c147b055a27 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -1,7 +1,7 @@ import { readFileSync } from 'fs'; import { join } from 'path/posix'; -import { CACHE_KEYS, cache, defineJob, git, workspace } from './utils'; +import { CACHE_KEYS, cache, defineJob, git, restore, workspace } from './utils'; export function definePortableStoryTest(directory: string) { const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; @@ -75,3 +75,67 @@ export function definePortableStoryTest(directory: string) { ['test-storybooks'] ); } +export function definePortableStoryTestPNP() { + return defineJob( + 'test-storybooks-pnp', + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Install dependencies', + working_directory: 'test-storybooks/yarn-pnp', + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + }, + }, + { + run: { + name: 'Run Storybook smoke test', + working_directory: 'test-storybooks/yarn-pnp', + command: 'yarn storybook --smoke-test', + }, + }, + ], + }, + ['test-storybooks'] + ); +} +export function definePortableStoryTestVitest3() { + return defineJob( + 'test-storybooks-portable-vitest3', + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Install dependencies', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + command: 'yarn install --no-immutable', + environment: { + YARN_ENABLE_IMMUTABLE_INSTALLS: false, + }, + }, + }, + { + run: { + name: 'Run Playwright E2E tests', + working_directory: 'test-storybooks/portable-stories-kitchen-sink/react-vitest-3', + command: 'yarn playwright-e2e', + }, + }, + ], + }, + ['test-storybooks'] + ); +} From fb59cb2761f2763786e1fb6d9f0a1df40d990c83 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 16:06:58 +0100 Subject: [PATCH 212/310] Update CircleCI configuration to add E2E testing job and refactor existing jobs for improved clarity and functionality --- .circleci/config.generated.yml | 51 ++++++++++++++------- scripts/ci/data.ts | 2 +- scripts/ci/sandboxes.ts | 82 +++++++++++++++++----------------- scripts/ci/utils.ts | 14 ++++-- 4 files changed, 87 insertions(+), 62 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 3be4fca102b6..561515064f19 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -741,8 +741,8 @@ jobs: react-vite-default-ts--build: description: react-vite/default-ts (build) executor: - name: sb_playwright - class: xlarge + name: sb_node_22_classic + class: large steps: - git-shallow-clone/checkout_advanced: clone_options: --depth 1 @@ -761,19 +761,6 @@ jobs: paths: - storybook-sandboxes/react-vite-default-ts/storybook-static root: /tmp - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-ts --no-link -s serve - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests" --verbose --index=0 --total=1 react-vite-default-ts--build-test-runner: description: react-vite-default-ts--build-test-runner executor: @@ -1008,6 +995,35 @@ jobs: name: Running E2E Tests working_directory: code command: yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev + react-vite-default-ts--e2e: + description: react-vite/default-ts (e2e) + executor: + name: sb_playwright + class: xlarge + steps: + - git-shallow-clone/checkout_advanced: + clone_options: --depth 1 + - attach_workspace: + at: /tmp + - restore_cache: + keys: + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} + - v5-linux-node_modules/{{ checksum ".nvmrc" }} + - v5-linux-node_modules + - run: + name: Serve storybook + background: true + command: yarn task serve --template react-vite/default-ts --no-link -s serve + - run: + name: Wait on servers + working_directory: code + command: yarn wait-on tcp:127.0.0.1:8001 + - run: + name: Running E2E Tests + command: |- + TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") + echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests" --verbose --index=0 --total=1 react-vite-default-ts--vitest: description: react-vite/default-ts (vitest) executor: @@ -1238,7 +1254,7 @@ jobs: corepack enable corepack prepare yarn@stable --activate - attach_workspace: - at: C:\Users\circleci + at: C:\Users\circleci\project - run: name: Install dependencies command: yarn install @@ -1306,6 +1322,9 @@ workflows: - react-vite-default-ts--dev-windows: requires: - react-vite-default-ts--create + - react-vite-default-ts--e2e: + requires: + - react-vite-default-ts--build - react-vite-default-ts--vitest: requires: - react-vite-default-ts--build diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index d891633e656d..fb691d0e2df8 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -264,7 +264,7 @@ const windows_unitTests = defineJob( shell: 'bash.exe', }, steps: [ - ...restore.windows(), + ...restore.windows('C:\\Users\\circleci\\project'), { run: { command: 'yarn install', diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 5da83f0b17fc..e99640f87304 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -22,26 +22,16 @@ function defineSandboxJob_build({ name, template, needs, - options, }: { directory: string; name: string; needs: string[]; template: string; - options: { - e2e: boolean; - chromatic: boolean; - }; }) { - const executor: JobImplementation['executor'] = options.e2e - ? { - name: 'sb_playwright', - class: 'xlarge', - } - : { - name: 'sb_node_22_classic', - class: 'large', - }; + const executor: JobImplementation['executor'] = { + name: 'sb_node_22_classic', + class: 'large', + }; return defineJob( name, @@ -55,30 +45,7 @@ function defineSandboxJob_build({ command: `yarn task build --template ${template} --no-link -s build`, }, }, - ...(options.chromatic - ? [workspace.persist([`${SANDBOX_DIR}/${directory}/storybook-static`])] - : []), - ...(options.e2e - ? [ - { - run: { - name: 'Serve storybook', - background: true, - command: `yarn task serve --template ${template} --no-link -s serve`, - }, - }, - server.wait(['8001']), - { - run: { - name: 'Running E2E Tests', - command: [ - `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${template} --no-link -s e2e-tests" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - ] - : []), + workspace.persist([`${SANDBOX_DIR}/${directory}/storybook-static`]), ], }, needs @@ -161,6 +128,7 @@ export function defineSandboxFlow(name: K) { create: `${name} (create)`, build: `${name} (build)`, dev: `${name} (dev)`, + e2e: `${name} (e2e)`, chromatic: `${name} (chromatic)`, vitest: `${name} (vitest)`, ['test-runner']: `${name} (test-runner)`, @@ -169,6 +137,7 @@ export function defineSandboxFlow(name: K) { create: `${toId(names.create)}`, build: `${toId(names.build)}`, dev: `${toId(names.dev)}`, + e2e: `${toId(names.e2e)}`, chromatic: `${toId(names.chromatic)}`, vitest: `${toId(names.vitest)}`, ['test-runner']: `${toId(names['test-runner'])}`, @@ -226,10 +195,6 @@ export function defineSandboxFlow(name: K) { name: names.build, template: name, needs: [ids.create], - options: { - e2e: !skipTasks?.includes('e2e-tests'), - chromatic: !skipTasks?.includes('chromatic'), - }, }), defineSandboxJob_dev({ name: names.dev, @@ -292,6 +257,39 @@ export function defineSandboxFlow(name: K) { ) : undefined, + !skipTasks?.includes('e2e-tests') + ? defineJob( + names.e2e, + { + executor: { + name: 'sb_playwright', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Serve storybook', + background: true, + command: `yarn task serve --template ${name} --no-link -s serve`, + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + command: [ + `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s e2e-tests" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + ], + }, + [ids.build] + ) + : undefined, + /** * Question: What is this for? Do we want to know if the test-runner works? Or do we want to * know if the sandbox works? diff --git a/scripts/ci/utils.ts b/scripts/ci/utils.ts index e56be2094df7..017b91f13417 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils.ts @@ -171,11 +171,16 @@ export const verdaccio = { }; export const restore = { - linux: () => [git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS())], - windows: () => [ + linux: () => [ + // + git.checkout(), + workspace.attach(), + cache.attach(CACHE_KEYS()), + ], + windows: (at = 'C:\\Users\\circleci') => [ git.checkout({ forceHttps: true }), node.installOnWindows(), - workspace.attach('C:\\Users\\circleci'), + workspace.attach(at), /** * I really wish this wasn't needed, but it is. I tried a lot of things to get it to not be * needed, but ultimately, something kept failing. At this point I gave up: @@ -200,6 +205,7 @@ export const CACHE_KEYS = (platform = 'linux') => ].map((_, index, list) => { return list.slice(0, list.length - index).join('/'); }); + export const CACHE_PATHS = [ '.yarn/cache', '.yarn/unplugged', @@ -209,6 +215,7 @@ export const CACHE_PATHS = [ 'code/node_modules', 'scripts/node_modules', ]; + export function defineJob( name: K, implementation: I, @@ -224,6 +231,7 @@ export function defineJob( requires, }; } + export type JobImplementation = { executor: | { From ac91ad5b8045a46e39231688382b05aa02ee01a7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 16:08:21 +0100 Subject: [PATCH 213/310] Refactor CircleCI configuration by removing unused job definitions and updating Linux initialization flows for empty Storybook projects --- .circleci/config.generated.yml | 138 --------------------------------- scripts/ci/data.ts | 10 ++- 2 files changed, 7 insertions(+), 141 deletions(-) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 561515064f19..79c9f2b7d661 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -407,92 +407,6 @@ jobs: - cancel-workflow-on-failure init-empty: type: no-op - init-empty-lit-vite-ts: - description: init-empty-lit-vite-ts - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-lit-vite-ts - cd empty-lit-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: lit-vite-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-lit-vite-ts - command: npm run storybook -- --smoke-test - init-empty-nextjs-ts: - description: init-empty-nextjs-ts - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-nextjs-ts - cd empty-nextjs-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: nextjs-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-nextjs-ts - command: npm run storybook -- --smoke-test init-empty-react-vite-ts: description: init-empty-react-vite-ts executor: @@ -536,49 +450,6 @@ jobs: name: Run storybook smoke test working_directory: /tmp/empty-react-vite-ts command: npm run storybook -- --smoke-test - init-empty-vue-vite-ts: - description: init-empty-vue-vite-ts - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-vue-vite-ts - cd empty-vue-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: vue-vite-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-vue-vite-ts - command: npm run storybook -- --smoke-test init-empty-windows: description: init-empty-windows executor: @@ -1277,18 +1148,9 @@ workflows: - init-empty: requires: - build-linux - - init-empty-lit-vite-ts: - requires: - - init-empty - - init-empty-nextjs-ts: - requires: - - init-empty - init-empty-react-vite-ts: requires: - init-empty - - init-empty-vue-vite-ts: - requires: - - init-empty - init-empty-windows: requires: - init-empty diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index fb691d0e2df8..6ede91a9ea94 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -325,9 +325,13 @@ const testRunner = defineSandboxTestRunner(sandboxes[0]); const initEmptyWindows = defineEmptyInitWindows(); -const initEmptyLinux = ['react-vite-ts', 'nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map( - defineEmptyInitFlow -); +const initEmptyLinux = [ + // + 'react-vite-ts', + // 'nextjs-ts', + // 'vue-vite-ts', + // 'lit-vite-ts', +].map(defineEmptyInitFlow); const initFeatures = defineEmptyInitFeatures(); From deaa0de1b8ab193e06658c1b2426804fae336c8b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 16 Dec 2025 16:22:47 +0100 Subject: [PATCH 214/310] cleanup --- .circleci/README.md | 73 --------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 .circleci/README.md diff --git a/.circleci/README.md b/.circleci/README.md deleted file mode 100644 index 20c66ce653fe..000000000000 --- a/.circleci/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# CircleCI configuration - -This directory contains the CircleCI configuration for the Storybook project. The CircleCI configuration is split across multiple files and packed into a single `config.yml` using the `circleci config pack` command. This approach follows the [FYAML specification](https://github.com/CircleCI-Public/fyaml) for decomposing large YAML documents into multiple files. - -### Packing process - -To regenerate (pack) the CircleCI config file and validate it: - -```bash -circleci config pack .circleci/src > .circleci/config.yml -circleci config validate .circleci/config.yml -``` - -Commit the updated `config.yml` like any other file. - -You will need the [CircleCI local CLI](https://circleci.com/docs/local-cli/#installation). For more details on config packing, see the [CircleCI documentation](https://circleci.com/docs/how-to-use-the-circleci-local-cli/#packing-a-config). - -### Local testing - -To test individual jobs locally: - -```bash -circleci config process .circleci/config.yml > process.yml -circleci local execute -c process.yml -``` - -You will need to have Docker installed to be able to do this. See the [CircleCI docs](https://circleci.com/docs/how-to-use-the-circleci-local-cli/#run-a-job-in-a-container-on-your-machine) for details and limitations. - -## Configuration overview - -The Storybook CircleCI setup is a multi-workflow system designed to test Storybook across multiple frameworks, bundlers, and package managers. - -### Parameters - -The configuration accepts several pipeline parameters: - -- **`workflow`**: Which workflow to run (`normal`, `merged`, `daily`, `skipped`, `docs`) -- **`ghPrNumber`**: GitHub PR number for PR-specific testing -- **`ghBaseBranch`**: Base branch name for comparison testing - -### Workflows - -- **`normal`**: Standard PR checks, running the most important sandboxes -- **`merged`**: Post-merge PR checks, running against more sandboxes -- **`daily`**: Daily job, running against even more sandboxes and empty directory -- **`docs`**: Documentation checks - -### Jobs - -- **`build`**: Compiles code, publishes to local Verdaccio registry -- **`lint`**: ESLint + Prettier checks -- **`knip`**: Unused dependency detection -- **`check`**: Type checking and validation -- **`unit-tests`**: Vitest-based unit tests -- **`e2e-ui`**: End-to-end tests for Storybook's manager UI -- **`e2e-ui-vitest-3`**: End-to-end tests for Storybook's manager UI using Vitest 3 -- **`test-init-empty`**: Tests Storybook init from empty directories -- **`test-init-features`**: Tests Storybook initialization with features -- **`test-portable-stories`**: Tests portable stories across frameworks -- **`create-sandboxes`**: Generates framework-specific test environments (sandboxes) -- **`chromatic-sandboxes`**: Visual regression testing against each sandbox -- **`e2e-dev`**: End-to-end tests against a Storybook dev server for each sandbox -- **`e2e-production`**: End-to-end tests against static production Storybooks for each sandbox -- **`test-runner-production`**: Run the Test Runner against each sandbox -- **`vitest-integration`**: Run the Vitest tests of each sandbox - -### TODOs - -Several jobs are currently disabled due to flakiness: -- `bench-sandboxes`: Performance benchmarking -- `test-runner-dev`: Dev mode test runner -- `smoke-test-sandboxes`: Quick smoke tests -- Some package managers in daily workflow From 61be1e7a1d493ab8722551f6c6eba05ff1e31e09 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 18 Dec 2025 12:35:13 +0100 Subject: [PATCH 215/310] restructure code, in prep for generation based on label --- .circleci/config.generated.yml | 1 + scripts/ci/data.ts | 303 ++++++------------ .../{defineEmptyInitFlow.ts => empty-init.ts} | 88 ++--- scripts/ci/generate.ts | 7 +- scripts/ci/sandboxes.ts | 18 +- scripts/ci/test-storybooks.ts | 3 +- scripts/ci/utils.ts | 15 +- 7 files changed, 183 insertions(+), 252 deletions(-) rename scripts/ci/{defineEmptyInitFlow.ts => empty-init.ts} (64%) diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml index 79c9f2b7d661..7da1b8f5dd58 100644 --- a/.circleci/config.generated.yml +++ b/.circleci/config.generated.yml @@ -595,6 +595,7 @@ jobs: command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload working_directory: scripts pretty-docs: + description: pretty-docs executor: name: sb_node_22_classic class: medium+ diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 6ede91a9ea94..93e6747482fc 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -8,7 +8,8 @@ import { defineEmptyInitFeatures, defineEmptyInitFlow, defineEmptyInitWindows, -} from './defineEmptyInitFlow'; + initEmptyHub, +} from './empty-init'; import { executors } from './executors'; import { orbs } from './orbs'; import { parameters } from './parameters'; @@ -18,11 +19,13 @@ import { defineSandboxTestRunner, defineWindowsSandboxBuild, defineWindowsSandboxDev, + sandboxesHub, } from './sandboxes'; import { definePortableStoryTest, definePortableStoryTestPNP, definePortableStoryTestVitest3, + testStorybooksHub, } from './test-storybooks'; import { CACHE_KEYS, @@ -86,6 +89,24 @@ const linux_build = defineJob('build-linux', { ], }); +const prettyDocs = defineJob('pretty-docs', { + executor: { + name: 'sb_node_22_classic', + class: 'medium+', + }, + steps: [ + git.checkout(), + npm.install('.'), + { + run: { + name: 'Prettier', + working_directory: `scripts`, + command: 'yarn docs:prettier:check', + }, + }, + ], +}); + const windows_build = defineJob('build-windows', { executor: { name: 'win/default', @@ -311,18 +332,6 @@ const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); const testStorybooksPortableVitest3 = definePortableStoryTestVitest3(); const testStorybooksPNP = definePortableStoryTestPNP(); -const sandboxes = [ - // - 'react-vite/default-ts', - // 'react-vite/default-js', -].map(defineSandboxFlow); - -const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); - -const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); - -const testRunner = defineSandboxTestRunner(sandboxes[0]); - const initEmptyWindows = defineEmptyInitWindows(); const initEmptyLinux = [ @@ -335,198 +344,90 @@ const initEmptyLinux = [ const initFeatures = defineEmptyInitFeatures(); -const jobs = { - [linux_build.id]: linux_build.implementation, - [windows_build.id]: windows_build.implementation, - [check.id]: check.implementation, - [knip.id]: knip.implementation, - [uiTests.id]: uiTests.implementation, - [linux_unitTests.id]: linux_unitTests.implementation, - [windows_unitTests.id]: windows_unitTests.implementation, - [packageBenchmarks.id]: packageBenchmarks.implementation, - [windows_sandbox_build.id]: windows_sandbox_build.implementation, - 'pretty-docs': { - executor: { - name: 'sb_node_22_classic', - class: 'medium+', - }, - steps: [ - git.checkout(), - npm.install('.'), - { - run: { - name: 'Prettier', - working_directory: `scripts`, - command: 'yarn docs:prettier:check', - }, - }, - ], - }, - sandboxes: { - type: 'no-op', - }, - ...sandboxes.reduce( - (acc, sandbox) => { - for (const job of sandbox.jobs) { - acc[job.id] = job.implementation; - } +function getSandboxes(workflow: string) { + const sandboxes = [ + // + 'react-vite/default-ts', + // 'react-vite/default-js', + ].map(defineSandboxFlow); - return acc; - }, - {} as Record - ), - [windows_sandbox_dev.id]: windows_sandbox_dev.implementation, - [windows_sandbox_build.id]: windows_sandbox_build.implementation, + const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); + const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); + const testRunner = defineSandboxTestRunner(sandboxes[0]); - ['test-storybooks']: { - type: 'no-op', - }, - [testStorybooksPNP.id]: testStorybooksPNP.implementation, - ...testStorybooksPortables.reduce( - (acc, test) => { - acc[test.id] = test.implementation; - return acc; - }, - {} as Record - ), - [testStorybooksPortableVitest3.id]: testStorybooksPortableVitest3.implementation, - ['init-empty']: { - type: 'no-op', - }, - [initEmptyWindows.id]: initEmptyWindows.implementation, - ...initEmptyLinux.reduce( - (acc, init) => { - acc[init.id] = init.implementation; + return [ + ...sandboxes.flatMap((sandbox) => sandbox.jobs), + windows_sandbox_build, + windows_sandbox_dev, + testRunner, + ]; +} + +export default function generateConfig(workflow: string) { + const sandboxes = getSandboxes(workflow); + + const todos = [ + linux_build, + windows_build, + check, + knip, + prettyDocs, + uiTests, + linux_unitTests, + windows_unitTests, + packageBenchmarks, + + sandboxesHub, + ...sandboxes, + + testStorybooksHub, + ...testStorybooksPortables, + testStorybooksPNP, + testStorybooksPortableVitest3, + + initEmptyHub, + initEmptyWindows, + initFeatures, + ...initEmptyLinux, + ]; + + const jobs = todos.reduce( + (acc, job) => { + acc[job.id] = job.implementation; return acc; }, - {} as Record - ), - [initFeatures.id]: initFeatures.implementation, - [testRunner.id]: testRunner.implementation, -}; + {} as Record + ); -const workflows = { - generated: { - jobs: [ - 'pretty-docs', - linux_build.id, - windows_build.id, - { - [check.id]: { - requires: check.requires, - }, - }, - { - [knip.id]: { - requires: knip.requires, - }, - }, - { - [packageBenchmarks.id]: { - requires: packageBenchmarks.requires, - }, - }, - { - [linux_unitTests.id]: { - requires: linux_unitTests.requires, - }, - }, - { - [windows_unitTests.id]: { - requires: windows_unitTests.requires, - }, - }, - { - [uiTests.id]: { - requires: uiTests.requires, - }, - }, - { - sandboxes: { - requires: [linux_build.id], - }, - }, - ...sandboxes.flatMap((sandbox) => sandbox.workflow), - { - [windows_sandbox_dev.id]: { - requires: windows_sandbox_dev.requires, - }, - }, - { - [windows_sandbox_build.id]: { - requires: windows_sandbox_build.requires, - }, - }, - { - ['test-storybooks']: { - requires: [linux_build.id], - }, - }, - { - [testStorybooksPNP.id]: { - requires: testStorybooksPNP.requires, - }, - }, - ...testStorybooksPortables.map((test) => ({ - [test.id]: { - requires: test.requires, - }, - })), - { - [testStorybooksPortableVitest3.id]: { - requires: testStorybooksPortableVitest3.requires, - }, - }, - { - ['init-empty']: { - requires: [linux_build.id], - }, - }, - { - [initEmptyWindows.id]: { - requires: initEmptyWindows.requires, - }, - }, - ...initEmptyLinux.map((init) => ({ - [init.id]: { - requires: init.requires, - }, - })), - { - [initFeatures.id]: { - requires: initFeatures.requires, - }, - }, - { - [testRunner.id]: { - requires: testRunner.requires, - }, - }, - ], - }, -}; - -export const data = { - version: 2.1, - orbs, - commands, - executors, - parameters, - jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), - workflows: { + const workflows = { generated: { - jobs: workflows.generated.jobs.sort((a, b) => { - if (typeof a == 'string' && typeof b == 'string') { - return a.localeCompare(b); - } - if (typeof a == 'string') { - return -1; - } - if (typeof b == 'string') { - return 1; - } - return Object.keys(a)[0].localeCompare(Object.keys(b)[0]); - }), + jobs: todos + .map((t) => + t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires } } : t.id + ) + .sort((a, b) => { + if (typeof a == 'string' && typeof b == 'string') { + return a.localeCompare(b); + } + if (typeof a == 'string') { + return -1; + } + if (typeof b == 'string') { + return 1; + } + return Object.keys(a)[0].localeCompare(Object.keys(b)[0]); + }), }, - }, -}; + }; + + return { + version: 2.1, + orbs, + commands, + executors, + parameters, + + jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), + workflows, + }; +} diff --git a/scripts/ci/defineEmptyInitFlow.ts b/scripts/ci/empty-init.ts similarity index 64% rename from scripts/ci/defineEmptyInitFlow.ts rename to scripts/ci/empty-init.ts index e2c4b71c572d..5ff42891224e 100644 --- a/scripts/ci/defineEmptyInitFlow.ts +++ b/scripts/ci/empty-init.ts @@ -1,45 +1,57 @@ -import { defineJob, restore, verdaccio, server, cache, CACHE_KEYS, git, workspace } from './utils'; +import { + CACHE_KEYS, + cache, + defineHub, + defineJob, + git, + restore, + server, + verdaccio, + workspace, +} from './utils'; -export const defineEmptyInitFlow = (template: string) => defineJob( - `init-empty-${template}`, - { - executor: { - name: 'sb_node_22_classic', - class: 'medium', - }, - steps: [ - ...restore.linux(), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Storybook init from empty directory (Linux NPM)', - working_directory: '/tmp', - command: [ - `mkdir empty-${template}`, - `cd empty-${template}`, - `npm set registry http://localhost:6001`, - `npx storybook init --yes --package-manager npm`, - ].join('\n'), - environment: { - IN_STORYBOOK_SANDBOX: true, - STORYBOOK_DISABLE_TELEMETRY: true, - STORYBOOK_INIT_EMPTY_TYPE: template, +export const defineEmptyInitFlow = (template: string) => + defineJob( + `init-empty-${template}`, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + ...restore.linux(), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Storybook init from empty directory (Linux NPM)', + working_directory: '/tmp', + command: [ + `mkdir empty-${template}`, + `cd empty-${template}`, + `npm set registry http://localhost:6001`, + `npx storybook init --yes --package-manager npm`, + ].join('\n'), + environment: { + IN_STORYBOOK_SANDBOX: true, + STORYBOOK_DISABLE_TELEMETRY: true, + STORYBOOK_INIT_EMPTY_TYPE: template, + }, }, }, - }, - { - run: { - name: 'Run storybook smoke test', - working_directory: `/tmp/empty-${template}`, - command: 'npm run storybook -- --smoke-test', + { + run: { + name: 'Run storybook smoke test', + working_directory: `/tmp/empty-${template}`, + command: 'npm run storybook -- --smoke-test', + }, }, - }, - ], - }, + ], + }, - ['init-empty'] -);export function defineEmptyInitFeatures() { + ['init-empty'] + ); +export function defineEmptyInitFeatures() { return defineJob( 'init-features', { @@ -124,4 +136,4 @@ export function defineEmptyInitWindows() { ['init-empty'] ); } - +export const initEmptyHub = defineHub('init-empty', ['build-linux']); diff --git a/scripts/ci/generate.ts b/scripts/ci/generate.ts index 35adae60c62f..5feaca39ef74 100644 --- a/scripts/ci/generate.ts +++ b/scripts/ci/generate.ts @@ -4,7 +4,7 @@ import { join } from 'node:path'; import { program } from 'commander'; import yml from 'yaml'; -import { data } from './data'; +import generateConfig from './data'; console.log('Generating CircleCI config...'); console.log('--------------------------------'); @@ -18,5 +18,8 @@ program await fs.writeFile( join(dirname, '../../.circleci/config.generated.yml'), - yml.stringify(data, null, { lineWidth: 1200, indent: 4 }) + yml.stringify(generateConfig(program.opts().workflow), null, { + lineWidth: 1200, + indent: 4, + }) ); diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index e99640f87304..c2c014014bcb 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -1,7 +1,7 @@ import { join } from 'path'; import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; -import { defineJob } from './utils'; +import { defineHub, defineJob } from './utils'; import type { JobImplementation } from './utils'; import { CACHE_KEYS, @@ -326,13 +326,13 @@ export function defineSandboxFlow(name: K) { name, path, jobs, - workflow: jobs.map((job) => { - return { - [job.id]: { - requires: job.requires, - }, - }; - }), + // workflow: jobs.map((job) => { + // return { + // [job.id]: { + // requires: job.requires, + // }, + // }; + // }), }; } export function defineSandboxTestRunner(sandbox: ReturnType) { @@ -455,3 +455,5 @@ export function defineWindowsSandboxBuild(sandbox: ReturnType( ) { return { id: toId(name), - name, + name: name as string, implementation: { description: name, ...implementation, - }, + } as JobImplementation, requires, }; } @@ -246,3 +246,14 @@ export type JobImplementation = { parameters?: Record; parallelism?: number; }; + +export function defineHub(name: string, requires = [] as string[]) { + return { + id: toId(name), + name, + implementation: { + type: 'no-op', + } as const, + requires, + }; +} From 462b9efa278aa3e89c5dbd8cb7dec12014a63304 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 18 Dec 2025 12:58:41 +0100 Subject: [PATCH 216/310] re-order code --- scripts/ci/data.ts | 81 ++++---------------- scripts/ci/{empty-init.ts => init-empty.ts} | 27 ++++--- scripts/ci/sandboxes.ts | 25 +++++- scripts/ci/test-storybooks.ts | 9 ++- scripts/ci/unlink-windows.ts | 84 --------------------- scripts/ci/{ => utils}/commands.ts | 2 +- scripts/ci/{ => utils}/executors.ts | 2 +- scripts/ci/{utils.ts => utils/helpers.ts} | 45 +---------- scripts/ci/{ => utils}/orbs.ts | 0 scripts/ci/{ => utils}/parameters.ts | 0 scripts/ci/utils/types.ts | 44 +++++++++++ 11 files changed, 106 insertions(+), 213 deletions(-) rename scripts/ci/{empty-init.ts => init-empty.ts} (87%) delete mode 100644 scripts/ci/unlink-windows.ts rename scripts/ci/{ => utils}/commands.ts (97%) rename scripts/ci/{ => utils}/executors.ts (97%) rename scripts/ci/{utils.ts => utils/helpers.ts} (83%) rename scripts/ci/{ => utils}/orbs.ts (100%) rename scripts/ci/{ => utils}/parameters.ts (100%) create mode 100644 scripts/ci/utils/types.ts diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 93e6747482fc..208974e75403 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -3,38 +3,17 @@ import { join } from 'node:path'; // eslint-disable-next-line depend/ban-dependencies import glob from 'fast-glob'; -import { commands } from './commands'; -import { - defineEmptyInitFeatures, - defineEmptyInitFlow, - defineEmptyInitWindows, - initEmptyHub, -} from './empty-init'; -import { executors } from './executors'; -import { orbs } from './orbs'; -import { parameters } from './parameters'; -// import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; -import { - defineSandboxFlow, - defineSandboxTestRunner, - defineWindowsSandboxBuild, - defineWindowsSandboxDev, - sandboxesHub, -} from './sandboxes'; -import { - definePortableStoryTest, - definePortableStoryTestPNP, - definePortableStoryTestVitest3, - testStorybooksHub, -} from './test-storybooks'; +import { getInitEmpty, initEmptyHub } from './init-empty'; +import { getSandboxes, sandboxesHub } from './sandboxes'; +import { getTestStorybooks, testStorybooksHub } from './test-storybooks'; +import { commands } from './utils/commands'; +import { executors } from './utils/executors'; import { CACHE_KEYS, CACHE_PATHS, - type JobImplementation, WORKING_DIR, artifact, cache, - defineJob, git, node, npm, @@ -42,7 +21,10 @@ import { server, verdaccio, workspace, -} from './utils'; +} from './utils/helpers'; +import { orbs } from './utils/orbs'; +import { parameters } from './utils/parameters'; +import { type JobImplementation, defineJob } from './utils/types'; const dirname = import.meta.dirname; @@ -328,43 +310,10 @@ const packageBenchmarks = defineJob( [linux_build.id] ); -const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); -const testStorybooksPortableVitest3 = definePortableStoryTestVitest3(); -const testStorybooksPNP = definePortableStoryTestPNP(); - -const initEmptyWindows = defineEmptyInitWindows(); - -const initEmptyLinux = [ - // - 'react-vite-ts', - // 'nextjs-ts', - // 'vue-vite-ts', - // 'lit-vite-ts', -].map(defineEmptyInitFlow); - -const initFeatures = defineEmptyInitFeatures(); - -function getSandboxes(workflow: string) { - const sandboxes = [ - // - 'react-vite/default-ts', - // 'react-vite/default-js', - ].map(defineSandboxFlow); - - const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); - const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); - const testRunner = defineSandboxTestRunner(sandboxes[0]); - - return [ - ...sandboxes.flatMap((sandbox) => sandbox.jobs), - windows_sandbox_build, - windows_sandbox_dev, - testRunner, - ]; -} - export default function generateConfig(workflow: string) { const sandboxes = getSandboxes(workflow); + const testStorybooks = getTestStorybooks(workflow); + const initEmpty = getInitEmpty(workflow); const todos = [ linux_build, @@ -381,14 +330,10 @@ export default function generateConfig(workflow: string) { ...sandboxes, testStorybooksHub, - ...testStorybooksPortables, - testStorybooksPNP, - testStorybooksPortableVitest3, + ...testStorybooks, initEmptyHub, - initEmptyWindows, - initFeatures, - ...initEmptyLinux, + ...initEmpty, ]; const jobs = todos.reduce( diff --git a/scripts/ci/empty-init.ts b/scripts/ci/init-empty.ts similarity index 87% rename from scripts/ci/empty-init.ts rename to scripts/ci/init-empty.ts index 5ff42891224e..bab1818e3ee1 100644 --- a/scripts/ci/empty-init.ts +++ b/scripts/ci/init-empty.ts @@ -1,14 +1,5 @@ -import { - CACHE_KEYS, - cache, - defineHub, - defineJob, - git, - restore, - server, - verdaccio, - workspace, -} from './utils'; +import { CACHE_KEYS, cache, git, restore, server, verdaccio, workspace } from './utils/helpers'; +import { defineHub, defineJob } from './utils/types'; export const defineEmptyInitFlow = (template: string) => defineJob( @@ -137,3 +128,17 @@ export function defineEmptyInitWindows() { ); } export const initEmptyHub = defineHub('init-empty', ['build-linux']); +export function getInitEmpty(workflow: string) { + const initEmptyWindows = defineEmptyInitWindows(); + + const initEmptyLinux = [ + // + 'react-vite-ts', + // 'nextjs-ts', + // 'vue-vite-ts', + // 'lit-vite-ts', + ].map(defineEmptyInitFlow); + + const initFeatures = defineEmptyInitFeatures(); + return [initEmptyWindows, initFeatures, ...initEmptyLinux]; +} diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index c2c014014bcb..6d1c28d220b5 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -1,8 +1,6 @@ import { join } from 'path'; import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; -import { defineHub, defineJob } from './utils'; -import type { JobImplementation } from './utils'; import { CACHE_KEYS, ROOT_DIR, @@ -15,7 +13,9 @@ import { toId, verdaccio, workspace, -} from './utils'; +} from './utils/helpers'; +import { defineHub, defineJob } from './utils/types'; +import type { JobImplementation } from './utils/types'; function defineSandboxJob_build({ directory, @@ -457,3 +457,22 @@ export function defineWindowsSandboxBuild(sandbox: ReturnType sandbox.jobs), + windows_sandbox_build, + windows_sandbox_dev, + testRunner, + ]; +} diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index e0462abcac27..d1631be2834b 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -1,7 +1,8 @@ import { readFileSync } from 'fs'; import { join } from 'path/posix'; -import { CACHE_KEYS, cache, defineHub, defineJob, git, restore, workspace } from './utils'; +import { CACHE_KEYS, cache, git, restore, workspace } from './utils/helpers'; +import { defineHub, defineJob } from './utils/types'; export function definePortableStoryTest(directory: string) { const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; @@ -140,3 +141,9 @@ export function definePortableStoryTestVitest3() { ); } export const testStorybooksHub = defineHub('test-storybooks', ['build-linux']); +export function getTestStorybooks(workflow: string) { + const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); + const testStorybooksPortableVitest3 = definePortableStoryTestVitest3(); + const testStorybooksPNP = definePortableStoryTestPNP(); + return [...testStorybooksPortables, testStorybooksPNP, testStorybooksPortableVitest3]; +} diff --git a/scripts/ci/unlink-windows.ts b/scripts/ci/unlink-windows.ts deleted file mode 100644 index bbc941e4800b..000000000000 --- a/scripts/ci/unlink-windows.ts +++ /dev/null @@ -1,84 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; - -import { getWorkspace } from '../utils/tools'; - -/** - * This script converts symlinks/junctions in node_modules to real directories by copying the source - * package content into the node_modules location. - * - * Why this is needed: Cache persistence in Windows boxes on CircleCI fails to persist our monorepo - * node_modules/ folders because they are symlinks/junctions, and the zipping - * tool fails to handle them. In order to prevent having to run yarn install in every job running on - * Windows, and to have the same or similar-enough setup for cache across Linux/Windows, we need to - * convert the symlinks/junctions to real directories. This script does that. - * - * Note: This script has not fully eliminated the need to run yarn install in subsequent Windows - * jobs. We're keeping it in the hope that we'll eventually figure out what's wrong or missing from - * the cache persistence in Windows boxes on CircleCI, so we won't have to run yarn install in - * subsequent jobs running on Windows. - */ - -console.log('Starting dynamic retrieval of workspace packages...'); - -// 1. Get the list of packages -const packages = await getWorkspace(); -const nodeModulesBaseDir = path.resolve(import.meta.dirname, '..', '..', 'node_modules'); - -console.log(`Found ${packages.length} workspace packages to process.`); - -for (const pkg of packages) { - if (pkg.private) { - continue; - } - const packageName = pkg.name; - // pkg.path is the absolute path to the package directory (e.g., C:\Users\circleci\project\packages\my-package) - const sourcePath = pkg.path; - - // The link/junction location inside node_modules - const nodeModulesPath = path.join(nodeModulesBaseDir, packageName); - - if (fs.existsSync(nodeModulesPath)) { - console.log(`Processing: ${packageName}`); - - try { - // 2. Remove the existing link/junction in node_modules - // Use fs.rmSync to delete the directory (the link/junction) - fs.rmSync(nodeModulesPath, { recursive: true, force: true }); - - // 3. Copy the actual source package content into the node_modules location - if (fs.existsSync(sourcePath)) { - // Copy the source package directory into the node_modules directory - copyRecursiveSync(sourcePath, nodeModulesPath); - console.log(` -> Copied files from ${sourcePath} to ${nodeModulesPath}`); - } else { - console.warn( - ` -> WARNING: Source directory not found for ${packageName} at ${sourcePath}` - ); - } - } catch (e) { - console.error(`Error processing ${packageName}:`, e); - // Fail the build if a critical file operation fails - process.exit(1); - } - } -} - -console.log('Link conversion complete. node_modules is ready for caching.'); - -function copyRecursiveSync(src: string, dest: string) { - const exists = fs.existsSync(src); - const stats = exists && fs.statSync(src); - const isDirectory = exists && stats.isDirectory(); - - if (isDirectory) { - if (!fs.existsSync(dest)) { - fs.mkdirSync(dest); - } - fs.readdirSync(src).forEach((childItemName) => { - copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName)); - }); - } else if (exists) { - fs.copyFileSync(src, dest); - } -} diff --git a/scripts/ci/commands.ts b/scripts/ci/utils/commands.ts similarity index 97% rename from scripts/ci/commands.ts rename to scripts/ci/utils/commands.ts index cf62fc0dc420..ae79a36b9c44 100644 --- a/scripts/ci/commands.ts +++ b/scripts/ci/utils/commands.ts @@ -1,4 +1,4 @@ -import { git } from './utils'; +import { git } from './helpers'; export const commands = { 'cancel-workflow-on-failure': { diff --git a/scripts/ci/executors.ts b/scripts/ci/utils/executors.ts similarity index 97% rename from scripts/ci/executors.ts rename to scripts/ci/utils/executors.ts index 9d89994e0274..f1be1d390a21 100644 --- a/scripts/ci/executors.ts +++ b/scripts/ci/utils/executors.ts @@ -1,4 +1,4 @@ -import { ROOT_DIR, WORKING_DIR } from './utils'; +import { ROOT_DIR, WORKING_DIR } from './helpers'; export const executors = { sb_node_18_browsers: { diff --git a/scripts/ci/utils.ts b/scripts/ci/utils/helpers.ts similarity index 83% rename from scripts/ci/utils.ts rename to scripts/ci/utils/helpers.ts index f9f541e0ec49..2c8a3567c687 100644 --- a/scripts/ci/utils.ts +++ b/scripts/ci/utils/helpers.ts @@ -1,5 +1,3 @@ -import type { executors } from './executors'; - export const ROOT_DIR = '/tmp'; export const WORKING_DIR = `project`; export const SANDBOX_DIR = `storybook-sandboxes`; @@ -196,6 +194,7 @@ export const restore = { }, ], }; + export const CACHE_KEYS = (platform = 'linux') => [ `v5-${platform}-node_modules`, @@ -215,45 +214,3 @@ export const CACHE_PATHS = [ 'code/node_modules', 'scripts/node_modules', ]; - -export function defineJob( - name: K, - implementation: I, - requires = [] as string[] -) { - return { - id: toId(name), - name: name as string, - implementation: { - description: name, - ...implementation, - } as JobImplementation, - requires, - }; -} - -export type JobImplementation = { - executor: - | { - name: keyof typeof executors; - class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - } - | { - name: 'win/default'; - size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - }; - steps: unknown[]; - parameters?: Record; - parallelism?: number; -}; - -export function defineHub(name: string, requires = [] as string[]) { - return { - id: toId(name), - name, - implementation: { - type: 'no-op', - } as const, - requires, - }; -} diff --git a/scripts/ci/orbs.ts b/scripts/ci/utils/orbs.ts similarity index 100% rename from scripts/ci/orbs.ts rename to scripts/ci/utils/orbs.ts diff --git a/scripts/ci/parameters.ts b/scripts/ci/utils/parameters.ts similarity index 100% rename from scripts/ci/parameters.ts rename to scripts/ci/utils/parameters.ts diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts new file mode 100644 index 000000000000..3a2ac76dae1f --- /dev/null +++ b/scripts/ci/utils/types.ts @@ -0,0 +1,44 @@ +import type { executors } from './executors'; +import { toId } from './helpers'; + +export function defineJob( + name: K, + implementation: I, + requires = [] as string[] +) { + return { + id: toId(name), + name: name as string, + implementation: { + description: name, + ...implementation, + } as JobImplementation, + requires, + }; +} + +export type JobImplementation = { + executor: + | { + name: keyof typeof executors; + class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + } + | { + name: 'win/default'; + size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + }; + steps: unknown[]; + parameters?: Record; + parallelism?: number; +}; + +export function defineHub(name: string, requires = [] as string[]) { + return { + id: toId(name), + name, + implementation: { + type: 'no-op', + } as const, + requires, + }; +} From f41c8315ea8aa70b0e62ae81bd04cfacc274e5dd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 18 Dec 2025 19:46:43 +0100 Subject: [PATCH 217/310] dynamic generation --- .circleci/config.generated.yml | 1220 --------------------------- .circleci/config.original.yml | 1436 -------------------------------- scripts/ci/data.ts | 144 ++-- scripts/ci/init-empty.ts | 27 +- scripts/ci/sandboxes.ts | 60 +- scripts/ci/test-storybooks.ts | 19 +- scripts/ci/utils/helpers.ts | 8 + scripts/ci/utils/parameters.ts | 2 +- scripts/ci/utils/types.ts | 16 + 9 files changed, 178 insertions(+), 2754 deletions(-) delete mode 100644 .circleci/config.generated.yml delete mode 100644 .circleci/config.original.yml diff --git a/.circleci/config.generated.yml b/.circleci/config.generated.yml deleted file mode 100644 index 7da1b8f5dd58..000000000000 --- a/.circleci/config.generated.yml +++ /dev/null @@ -1,1220 +0,0 @@ -version: 2.1 -orbs: - browser-tools: circleci/browser-tools@2.3.2 - codecov: codecov/codecov@5.4.3 - discord: antonioned/discord@0.1.0 - git-shallow-clone: guitarrapc/git-shallow-clone@2.8.0 - node: circleci/node@7.2.1 - nx: nrwl/nx@1.7.0 - win: circleci/windows@5.1.1 -commands: - cancel-workflow-on-failure: - description: Cancels the entire workflow in case the previous step has failed - steps: - - run: - command: | - echo "Canceling workflow as previous step resulted in failure." - echo "To execute all checks locally, please run yarn ci-tests" - curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" - name: Cancel current workflow - when: on_fail - report-workflow-on-failure: - description: Reports failures to discord - parameters: - template: - default: none - description: | - Which template to report in discord. Applicable for parallel sandbox jobs - type: string - steps: - - run: - command: git fetch --unshallow - when: on_fail - - discord/status: - fail_only: true - failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) - only_for_branches: main,next,next-release,latest-release - start-event-collector: - description: Starts the event collector - steps: - - run: - background: true - command: yarn jiti ./event-log-collector.ts - name: Start Event Collector - working_directory: scripts -executors: - sb_node_18_browsers: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:18.20.3-browsers - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/project - sb_node_22_browsers: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:22.15.0-browsers - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/project - sb_node_22_classic: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:22.15.0 - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/project - sb_playwright: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: mcr.microsoft.com/playwright:v1.52.0-noble - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/project -parameters: - ghBaseBranch: - default: next - description: The name of the base branch (the target of the PR) - type: string - ghPrNumber: - default: "" - description: The PR number - type: string - workflow: - default: skipped - description: Which workflow to run - enum: - - normal - - merged - - daily - - skipped - - docs - type: enum -jobs: - build-linux: - description: build-linux - executor: - name: sb_node_22_classic - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - node/install-packages: - app-dir: . - pkg-manager: yarn - cache-only-lockfile: true - - save_cache: - paths: - - .yarn/cache - - .yarn/unplugged - - .yarn/build-state.yml - - .yarn/root-install-state.gz - - node_modules - - code/node_modules - - scripts/node_modules - key: v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - run: - name: Ensure no changes pending - command: git diff --exit-code - - run: - name: Check for dedupe - command: yarn dedupe --check - - run: - command: yarn task --task compile --start-from=auto --no-link --debug - name: Compile - working_directory: code - - run: - command: yarn local-registry --publish - name: Publish to Verdaccio - working_directory: code - - report-workflow-on-failure - - store_artifacts: - path: code/bench/esbuild-metafiles - destination: bench - - persist_to_workspace: - paths: - - project/code/core/dist - - project/code/core/node_modules - - project/code/addons/a11y/dist - - project/code/addons/a11y/node_modules - - project/code/addons/docs/dist - - project/code/addons/docs/node_modules - - project/code/addons/links/dist - - project/code/addons/links/node_modules - - project/code/addons/onboarding/dist - - project/code/addons/onboarding/node_modules - - project/code/addons/pseudo-states/dist - - project/code/addons/pseudo-states/node_modules - - project/code/addons/themes/dist - - project/code/addons/themes/node_modules - - project/code/addons/vitest/dist - - project/code/addons/vitest/node_modules - - project/code/builders/builder-vite/dist - - project/code/builders/builder-vite/node_modules - - project/code/builders/builder-webpack5/dist - - project/code/builders/builder-webpack5/node_modules - - project/code/frameworks/angular/dist - - project/code/frameworks/angular/node_modules - - project/code/frameworks/ember/dist - - project/code/frameworks/ember/node_modules - - project/code/frameworks/html-vite/dist - - project/code/frameworks/html-vite/node_modules - - project/code/frameworks/nextjs/dist - - project/code/frameworks/nextjs/node_modules - - project/code/frameworks/nextjs-vite/dist - - project/code/frameworks/nextjs-vite/node_modules - - project/code/frameworks/preact-vite/dist - - project/code/frameworks/preact-vite/node_modules - - project/code/frameworks/react-native-web-vite/dist - - project/code/frameworks/react-native-web-vite/node_modules - - project/code/frameworks/react-vite/dist - - project/code/frameworks/react-vite/node_modules - - project/code/frameworks/react-webpack5/dist - - project/code/frameworks/react-webpack5/node_modules - - project/code/frameworks/server-webpack5/dist - - project/code/frameworks/server-webpack5/node_modules - - project/code/frameworks/svelte-vite/dist - - project/code/frameworks/svelte-vite/node_modules - - project/code/frameworks/sveltekit/dist - - project/code/frameworks/sveltekit/node_modules - - project/code/frameworks/vue3-vite/dist - - project/code/frameworks/vue3-vite/node_modules - - project/code/frameworks/web-components-vite/dist - - project/code/frameworks/web-components-vite/node_modules - - project/code/lib/cli-storybook/dist - - project/code/lib/cli-storybook/node_modules - - project/code/lib/codemod/dist - - project/code/lib/codemod/node_modules - - project/code/lib/core-webpack/dist - - project/code/lib/core-webpack/node_modules - - project/code/lib/create-storybook/dist - - project/code/lib/create-storybook/node_modules - - project/code/lib/csf-plugin/dist - - project/code/lib/csf-plugin/node_modules - - project/code/lib/eslint-plugin/dist - - project/code/lib/eslint-plugin/node_modules - - project/code/lib/react-dom-shim/dist - - project/code/lib/react-dom-shim/node_modules - - project/code/presets/create-react-app/dist - - project/code/presets/create-react-app/node_modules - - project/code/presets/react-webpack/dist - - project/code/presets/react-webpack/node_modules - - project/code/presets/server-webpack/dist - - project/code/presets/server-webpack/node_modules - - project/code/renderers/html/dist - - project/code/renderers/html/node_modules - - project/code/renderers/preact/dist - - project/code/renderers/preact/node_modules - - project/code/renderers/react/dist - - project/code/renderers/react/node_modules - - project/code/renderers/server/dist - - project/code/renderers/server/node_modules - - project/code/renderers/svelte/dist - - project/code/renderers/svelte/node_modules - - project/code/renderers/vue3/dist - - project/code/renderers/vue3/node_modules - - project/code/renderers/web-components/dist - - project/code/renderers/web-components/node_modules - - project/.verdaccio-cache - - project/code/bench - root: /tmp - build-windows: - description: build-windows - executor: - name: win/default - size: xlarge - shell: bash.exe - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate - - node/install-packages: - app-dir: . - pkg-manager: yarn - cache-only-lockfile: true - - run: - name: Compile - working_directory: code - command: yarn task --task compile --start-from=auto --no-link --debug - - run: - name: Publish to Verdaccio - working_directory: code - command: yarn local-registry --publish - - persist_to_workspace: - paths: - - code/core/dist - - code/core/node_modules - - code/addons/a11y/dist - - code/addons/a11y/node_modules - - code/addons/docs/dist - - code/addons/docs/node_modules - - code/addons/links/dist - - code/addons/links/node_modules - - code/addons/onboarding/dist - - code/addons/onboarding/node_modules - - code/addons/pseudo-states/dist - - code/addons/pseudo-states/node_modules - - code/addons/themes/dist - - code/addons/themes/node_modules - - code/addons/vitest/dist - - code/addons/vitest/node_modules - - code/builders/builder-vite/dist - - code/builders/builder-vite/node_modules - - code/builders/builder-webpack5/dist - - code/builders/builder-webpack5/node_modules - - code/frameworks/angular/dist - - code/frameworks/angular/node_modules - - code/frameworks/ember/dist - - code/frameworks/ember/node_modules - - code/frameworks/html-vite/dist - - code/frameworks/html-vite/node_modules - - code/frameworks/nextjs/dist - - code/frameworks/nextjs/node_modules - - code/frameworks/nextjs-vite/dist - - code/frameworks/nextjs-vite/node_modules - - code/frameworks/preact-vite/dist - - code/frameworks/preact-vite/node_modules - - code/frameworks/react-native-web-vite/dist - - code/frameworks/react-native-web-vite/node_modules - - code/frameworks/react-vite/dist - - code/frameworks/react-vite/node_modules - - code/frameworks/react-webpack5/dist - - code/frameworks/react-webpack5/node_modules - - code/frameworks/server-webpack5/dist - - code/frameworks/server-webpack5/node_modules - - code/frameworks/svelte-vite/dist - - code/frameworks/svelte-vite/node_modules - - code/frameworks/sveltekit/dist - - code/frameworks/sveltekit/node_modules - - code/frameworks/vue3-vite/dist - - code/frameworks/vue3-vite/node_modules - - code/frameworks/web-components-vite/dist - - code/frameworks/web-components-vite/node_modules - - code/lib/cli-storybook/dist - - code/lib/cli-storybook/node_modules - - code/lib/codemod/dist - - code/lib/codemod/node_modules - - code/lib/core-webpack/dist - - code/lib/core-webpack/node_modules - - code/lib/create-storybook/dist - - code/lib/create-storybook/node_modules - - code/lib/csf-plugin/dist - - code/lib/csf-plugin/node_modules - - code/lib/eslint-plugin/dist - - code/lib/eslint-plugin/node_modules - - code/lib/react-dom-shim/dist - - code/lib/react-dom-shim/node_modules - - code/presets/create-react-app/dist - - code/presets/create-react-app/node_modules - - code/presets/react-webpack/dist - - code/presets/react-webpack/node_modules - - code/presets/server-webpack/dist - - code/presets/server-webpack/node_modules - - code/renderers/html/dist - - code/renderers/html/node_modules - - code/renderers/preact/dist - - code/renderers/preact/node_modules - - code/renderers/react/dist - - code/renderers/react/node_modules - - code/renderers/server/dist - - code/renderers/server/node_modules - - code/renderers/svelte/dist - - code/renderers/svelte/node_modules - - code/renderers/vue3/dist - - code/renderers/vue3/node_modules - - code/renderers/web-components/dist - - code/renderers/web-components/node_modules - - .verdaccio-cache - - code/bench - root: C:\Users\circleci\project - check: - description: check - executor: - name: sb_node_22_classic - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: TypeCheck code - working_directory: code - command: yarn task --task check --no-link - - run: - name: TypeCheck scripts - working_directory: scripts - command: yarn check - - report-workflow-on-failure - - cancel-workflow-on-failure - init-empty: - type: no-op - init-empty-react-vite-ts: - description: init-empty-react-vite-ts - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-react-vite-ts - cd empty-react-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-react-vite-ts - command: npm run storybook -- --smoke-test - init-empty-windows: - description: init-empty-windows - executor: - name: win/default - size: medium - shell: bash.exe - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate - - attach_workspace: - at: C:\Users\circleci - - run: - name: Install dependencies - command: yarn install - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Windows NPM) - working_directory: C:\Users\circleci - command: |- - mkdir empty-react-vite-ts - cd empty-react-vite-ts - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - - run: - name: Run storybook smoke test - working_directory: C:\Users\circleci\empty-react-vite-ts - command: npm run storybook -- --smoke-test - init-features: - description: init-features - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Storybook init from empty directory (Linux NPM) - working_directory: /tmp - command: |- - mkdir empty-react-vite-ts - cd empty-react-vite-ts - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - - run: - name: Run storybook smoke test - working_directory: /tmp/empty-react-vite-ts - command: npx vitest - knip: - description: knip - executor: - name: sb_node_22_classic - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Run Knip - working_directory: code - command: yarn knip --no-exit-code - package-benchmarks: - description: package-benchmarks - executor: - name: sb_node_22_classic - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Benchmarking packages against base branch - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - working_directory: scripts - pretty-docs: - description: pretty-docs - executor: - name: sb_node_22_classic - class: medium+ - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - node/install-packages: - app-dir: . - pkg-manager: yarn - cache-only-lockfile: true - - run: - name: Prettier - working_directory: scripts - command: yarn docs:prettier:check - react-vite-default-ts--build: - description: react-vite/default-ts (build) - executor: - name: sb_node_22_classic - class: large - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Build storybook - command: yarn task build --template react-vite/default-ts --no-link -s build - - persist_to_workspace: - paths: - - storybook-sandboxes/react-vite-default-ts/storybook-static - root: /tmp - react-vite-default-ts--build-test-runner: - description: react-vite-default-ts--build-test-runner - executor: - name: sb_playwright - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Running test-runner - command: yarn task test-runner --template react-vite/default-ts --no-link -s test-runner - react-vite-default-ts--build-windows: - description: react-vite-default-ts--build-windows - executor: - name: win/default - size: xlarge - shell: bash.exe - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate - - attach_workspace: - at: C:\Users\circleci - - run: - name: Install dependencies - command: yarn install - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Run Install - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts - command: yarn install - - run: - name: Install playwright - command: yarn playwright install chromium --with-deps - - run: - name: Build storybook - command: yarn task build --template react-vite/default-ts --no-link -s build - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-ts --no-link -s serve - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - working_directory: code - command: yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests - react-vite-default-ts--chromatic: - description: react-vite/default-ts (chromatic) - executor: - name: sb_node_22_classic - class: medium - steps: - - checkout - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Copy sandbox to working directory - command: cp /tmp/storybook-sandboxes /tmp/project/sandbox -r --remove-destination - - run: - name: Running Chromatic - command: yarn task chromatic --template react-vite/default-ts --no-link -s chromatic - environment: - STORYBOOK_SANDBOX_ROOT: ./sandbox - react-vite-default-ts--create: - description: react-vite/default-ts (create) - executor: - name: sb_node_22_browsers - class: large - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Start Event Collector - working_directory: scripts - background: true - command: yarn jiti ./event-log-collector.ts - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - yarn wait-on tcp:127.0.0.1:6007 - - run: - name: Setup Corepack - command: |- - sudo corepack enable - which yarn - yarn --version - - run: - name: Create Sandboxes - command: yarn task sandbox --template react-vite/default-ts --no-link -s sandbox --debug - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://127.0.0.1:6007/event-log - - store_artifacts: - path: /tmp/storybook-sandboxes/react-vite-default-ts/debug-storybook.log - destination: logs - - persist_to_workspace: - paths: - - storybook-sandboxes/react-vite-default-ts - root: /tmp - react-vite-default-ts--dev: - description: react-vite/default-ts (dev) - executor: - name: sb_playwright - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Run storybook - working_directory: code - background: true - command: yarn task dev --template react-vite/default-ts --no-link -s dev - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:6006 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev" --verbose --index=0 --total=1 - react-vite-default-ts--dev-windows: - description: react-vite-default-ts--dev-windows - executor: - name: win/default - size: xlarge - shell: bash.exe - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate - - attach_workspace: - at: C:\Users\circleci - - run: - name: Install dependencies - command: yarn install - - run: - name: Verdaccio - working_directory: code - background: true - command: yarn local-registry --open - - run: - name: Wait on servers - working_directory: code - command: |- - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - - run: - name: Run Install - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts - command: yarn install - - run: - name: Install playwright - command: yarn playwright install chromium --with-deps - - run: - name: Run storybook - background: true - working_directory: C:\Users\circleci\storybook-sandboxes\react-vite-default-ts - command: yarn storybook --port 8001 - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - working_directory: code - command: yarn task e2e-tests-dev --template react-vite/default-ts --no-link -s e2e-tests-dev - react-vite-default-ts--e2e: - description: react-vite/default-ts (e2e) - executor: - name: sb_playwright - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Serve storybook - background: true - command: yarn task serve --template react-vite/default-ts --no-link -s serve - - run: - name: Wait on servers - working_directory: code - command: yarn wait-on tcp:127.0.0.1:8001 - - run: - name: Running E2E Tests - command: |- - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template react-vite/default-ts --no-link -s e2e-tests" --verbose --index=0 --total=1 - react-vite-default-ts--vitest: - description: react-vite/default-ts (vitest) - executor: - name: sb_playwright - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Running Vitest - command: yarn task vitest-integration --template react-vite/default-ts --no-link -s vitest-integration - sandboxes: - type: no-op - test-storybooks: - type: no-op - test-storybooks-pnp: - description: test-storybooks-pnp - executor: - name: sb_node_22_classic - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Install dependencies - working_directory: test-storybooks/yarn-pnp - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run Storybook smoke test - working_directory: test-storybooks/yarn-pnp - command: yarn storybook --smoke-test - test-storybooks-portable-react: - description: test-storybooks-portable-react - executor: - name: sb_playwright - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - command: yarn jest - - run: - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - command: yarn vitest - - run: - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - command: yarn playwright-ct - - run: - name: Run Playwright E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - command: yarn playwright-e2e - - run: - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - command: yarn cypress - test-storybooks-portable-vitest3: - description: test-storybooks-portable-vitest3 - executor: - name: sb_playwright - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run Playwright E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - command: yarn playwright-e2e - test-storybooks-portable-vue3: - description: test-storybooks-portable-vue3 - executor: - name: sb_playwright - class: medium - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - - run: - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn jest - - run: - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn vitest - - run: - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn playwright-ct - - run: - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/vue3 - command: yarn cypress - ui: - description: ui - executor: - name: sb_node_22_classic - class: medium+ - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Build internal storybook - command: yarn storybook:ui:build - working_directory: code - - run: - name: Run Chromatic - command: yarn storybook:ui:chromatic - working_directory: code - - report-workflow-on-failure - - store_test_results: - path: test-results - unit-tests-linux: - description: unit-tests-linux - executor: - name: sb_node_22_classic - class: xlarge - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 - - attach_workspace: - at: /tmp - - restore_cache: - keys: - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }}/{{ checksum "yarn.lock" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }}/{{ checksum ".yarnrc.yml" }} - - v5-linux-node_modules/{{ checksum ".nvmrc" }} - - v5-linux-node_modules - - run: - name: Run tests - working_directory: code - command: |- - TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - - store_test_results: - path: project/test-results - - run: - name: Ensure no changes pending - command: git diff --exit-code - - report-workflow-on-failure - - cancel-workflow-on-failure - unit-tests-windows: - description: unit-tests-windows - executor: - name: win/default - size: medium - shell: bash.exe - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --config url."https://github.com/".insteadOf=ssh://git@github.com/ --config url."https://github.com/".insteadOf=git@github.com:' - - run: - name: Install Node + Yarn - shell: powershell.exe - command: |- - $nodeVersion = Get-Content .nvmrc | Select-Object -First 1 - nvm install $nodeVersion - nvm use $nodeVersion - corepack enable - corepack prepare yarn@stable --activate - - attach_workspace: - at: C:\Users\circleci\project - - run: - name: Install dependencies - command: yarn install - - run: - command: yarn install - name: Install dependencies - - run: - command: yarn test - name: Run unit tests - working_directory: code -workflows: - generated: - jobs: - - build-linux - - build-windows - - pretty-docs - - check: - requires: - - build-linux - - init-empty: - requires: - - build-linux - - init-empty-react-vite-ts: - requires: - - init-empty - - init-empty-windows: - requires: - - init-empty - - init-features: - requires: - - init-empty - - knip: - requires: - - build-linux - - package-benchmarks: - requires: - - build-linux - - react-vite-default-ts--build: - requires: - - react-vite-default-ts--create - - react-vite-default-ts--build-test-runner: - requires: - - react-vite-default-ts--build - - react-vite-default-ts--build-windows: - requires: - - react-vite-default-ts--create - - react-vite-default-ts--chromatic: - requires: - - react-vite-default-ts--build - - react-vite-default-ts--create: - requires: - - sandboxes - - react-vite-default-ts--dev: - requires: - - react-vite-default-ts--create - - react-vite-default-ts--dev-windows: - requires: - - react-vite-default-ts--create - - react-vite-default-ts--e2e: - requires: - - react-vite-default-ts--build - - react-vite-default-ts--vitest: - requires: - - react-vite-default-ts--build - - sandboxes: - requires: - - build-linux - - test-storybooks: - requires: - - build-linux - - test-storybooks-pnp: - requires: - - test-storybooks - - test-storybooks-portable-react: - requires: - - test-storybooks - - test-storybooks-portable-vitest3: - requires: - - test-storybooks - - test-storybooks-portable-vue3: - requires: - - test-storybooks - - ui: - requires: - - build-linux - - unit-tests-linux: - requires: - - build-linux - - unit-tests-windows: - requires: - - build-windows diff --git a/.circleci/config.original.yml b/.circleci/config.original.yml deleted file mode 100644 index deb3e6768b11..000000000000 --- a/.circleci/config.original.yml +++ /dev/null @@ -1,1436 +0,0 @@ -commands: - cancel-workflow-on-failure: - description: Cancels the entire workflow in case the previous step has failed - steps: - - run: - command: | - echo "Canceling workflow as previous step resulted in failure." - echo "To execute all checks locally, please run yarn ci-tests" - curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" - name: Cancel current workflow - when: on_fail - report-workflow-on-failure: - description: Reports failures to discord - parameters: - template: - default: none - description: | - Which template to report in discord. Applicable for parallel sandbox jobs - type: string - steps: - - run: - command: git fetch --unshallow - when: on_fail - - discord/status: - fail_only: true - failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) - only_for_branches: main,next,next-release,latest-release - start-event-collector: - description: Starts the event collector - steps: - - run: - background: true - command: yarn jiti ./event-log-collector.ts - name: Start Event Collector - working_directory: scripts -executors: - sb_node_18_browsers: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:18.20.3-browsers - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook - sb_node_22_browsers: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:22.15.0-browsers - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook - sb_node_22_classic: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: cimg/node:22.15.0 - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook - sb_playwright: - docker: - - environment: - NODE_OPTIONS: --max_old_space_size=6144 - image: mcr.microsoft.com/playwright:v1.52.0-noble - parameters: - class: - default: small - description: The Resource class - enum: - - small - - medium - - medium+ - - large - - xlarge - type: enum - resource_class: <> - working_directory: /tmp/storybook -jobs: - bench-packages: - executor: - class: small - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - when: - condition: - and: - - << pipeline.parameters.ghBaseBranch >> - - << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload - name: Benchmarking packages against base branch - working_directory: scripts - - when: - condition: - or: - - not: << pipeline.parameters.ghBaseBranch >> - - not: << pipeline.parameters.ghPrNumber >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: yarn bench-packages --upload - name: Uploading package benchmarks for branch - working_directory: scripts - - store_artifacts: - path: storybook/bench/packages/results.json - - report-workflow-on-failure - - cancel-workflow-on-failure - bench-sandboxes: - executor: - class: small - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 - name: Running Bench - - run: - command: yarn upload-bench $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) << pipeline.parameters.ghPrNumber >> << pipeline.parameters.ghBaseBranch >> - name: Uploading results - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) - build: - executor: - class: large - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - restore_cache: - keys: - - 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 - name: Compile - - run: - command: | - cd code - yarn local-registry --publish - name: Publish to Verdaccio - - report-workflow-on-failure - - store_artifacts: - path: storybook/code/bench/esbuild-metafiles - - save_cache: - key: build-yarn-2-cache-v5--{{ checksum "yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache - - persist_to_workspace: - paths: - - storybook/node_modules - - storybook/code/node_modules - - storybook/code/addons - - storybook/scripts/node_modules - - storybook/code/bench - - storybook/code/examples - - storybook/code/frameworks - - storybook/code/lib - - storybook/code/core - - storybook/code/builders - - storybook/code/renderers - - storybook/code/presets - - storybook/.verdaccio-cache - root: /tmp - check: - executor: - class: large - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - nx/set-shas: - main-branch-name: next - workflow-name: << pipeline.parameters.workflow >> - - restore_cache: - keys: - - build-yarn-2-cache-v5--{{ checksum "yarn.lock" }} - name: Restore Yarn cache - - run: - command: | - yarn - yarn task --task check --start-from=auto --no-link --debug - name: Check - - run: - command: | - git diff --exit-code - name: Ensure no changes pending - - report-workflow-on-failure - - cancel-workflow-on-failure - check-sandboxes: - executor: - class: medium - name: sb_node_22_classic - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - 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 - name: Type check Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) - - store_test_results: - path: storybook/test-results - chromatic-internal-storybook: - environment: - NODE_OPTIONS: --max_old_space_size=4096 - executor: - class: large - name: sb_node_22_browsers - steps: - - checkout - - attach_workspace: - at: /tmp - - run: - command: yarn storybook:ui:chromatic - name: Running Chromatic - working_directory: code - - report-workflow-on-failure - - store_test_results: - path: storybook/test-results - chromatic-sandboxes: - executor: - class: medium - name: sb_node_22_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - checkout - - attach_workspace: - at: /tmp - - run: - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - cp /tmp/storybook-sandboxes /tmp/storybook/sandbox -r --remove-destination - name: Install sandbox dependencies - - run: - 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) - - store_test_results: - path: storybook/test-results - coverage: - executor: - class: small - name: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - codecov/upload - - report-workflow-on-failure - create-sandboxes: - executor: - class: large - name: sb_node_22_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - # Enable corepack - sudo corepack enable - - # Verify yarn is working - which yarn - yarn --version - name: Setup Corepack - - start-event-collector - - run: - command: | - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - yarn task --task build --template $TEMPLATE --no-link --start-from=sandbox --junit - if [[ $TEMPLATE != bench/* ]]; then - yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE - fi - cd $(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Create Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) - - persist_to_workspace: - paths: storybook-sandboxes/** - root: /tmp - - store_test_results: - path: storybook/test-results - e2e-dev: - executor: - class: medium+ - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) - - store_test_results: - path: storybook/test-results - - store_artifacts: - destination: playwright - path: storybook/code/playwright-results/ - e2e-production: - executor: - class: medium - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - run: - command: | - TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit" --verbose --index=0 --total=1 - name: Running E2E Tests - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) - - store_test_results: - path: storybook/test-results - - store_artifacts: - destination: playwright - path: storybook/code/playwright-results/ - e2e-ui: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react - - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react - - store_test_results: - path: storybook/test-results - - store_artifacts: - destination: playwright - path: storybook/test-storybooks/portable-stories-kitchen-sink/react/test-results/ - - report-workflow-on-failure - e2e-ui-vitest-3: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - - run: - command: yarn playwright-e2e - name: Run E2E tests - working_directory: test-storybooks/portable-stories-kitchen-sink/react-vitest-3 - - store_test_results: - path: storybook/test-results - - store_artifacts: - destination: playwright - path: storybook/test-storybooks/portable-stories-kitchen-sink/react-vitest-3/test-results/ - - report-workflow-on-failure - knip: - executor: - class: large - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - cd code - yarn knip --no-exit-code - name: Knip - - report-workflow-on-failure - - cancel-workflow-on-failure - lint: - executor: - class: medium+ - name: sb_node_22_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - cd code - yarn lint - name: Lint - - report-workflow-on-failure - - cancel-workflow-on-failure - pretty-docs: - executor: - 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 "yarn.lock" }} - name: Restore Yarn cache - - run: - command: | - yarn install - name: Install - - save_cache: - key: prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }} - name: Save Yarn cache - paths: - - ~/.yarn/berry/cache - - run: - command: | - cd scripts - yarn docs:prettier:check - name: Prettier - script-checks: - executor: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - cd scripts - yarn get-template --check - name: Check parallelism count - - run: - command: | - cd scripts - yarn check - name: Type check - - run: - command: | - cd scripts - yarn test --coverage - name: Run tests - - store_test_results: - path: storybook/scripts/junit.xml - - report-workflow-on-failure - - cancel-workflow-on-failure - smoke-test-sandboxes: - executor: - class: medium - name: sb_node_18_browsers - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: yarn task --task smoke-test --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) --no-link --start-from=never --junit - name: Smoke Testing Sandboxes - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task smoke-test) - - store_test_results: - path: storybook/test-results - stories-tests: - executor: - class: xlarge - name: sb_playwright - parallelism: 2 - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests - - store_test_results: - path: storybook/test-results - - report-workflow-on-failure - - cancel-workflow-on-failure - test-init-empty: - executor: - class: small - name: sb_node_22_browsers - parameters: - packageManager: - type: string - template: - type: string - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - when: - condition: - equal: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (NPM) - - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Yarn 2) - - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (PNPM) - - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (--skip-install) - - report-workflow-on-failure - test-init-empty-windows: - executor: win/default - parameters: - packageManager: - type: string - template: - type: string - steps: - - checkout - - attach_workspace: - at: C:\Users\circleci - - run: - command: | - choco install nodejs-lts --version=22.11.0 -y - corepack enable - name: Setup Node & Yarn on Windows - shell: bash.exe - - run: - command: yarn install - name: Install dependencies - shell: bash.exe - - when: - condition: - equal: - - npm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm set registry http://localhost:6001 - npx storybook init --yes --package-manager npm - npm run storybook -- --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows NPM) - shell: bash.exe - - when: - condition: - equal: - - yarn2 - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - yarn set version berry - yarn config set registry http://localhost:6001 - yarn dlx storybook init --yes --package-manager yarn2 - yarn storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows Yarn 2) - shell: bash.exe - - when: - condition: - equal: - - pnpm - - << parameters.packageManager >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >> - cd empty-<< parameters.template >> - npm i -g pnpm - pnpm config set registry http://localhost:6001 - pnpm dlx storybook init --yes --package-manager pnpm - pnpm run storybook --smoke-test - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows PNPM) - shell: bash.exe - - when: - condition: - equal: - - react-vite-ts - - << parameters.template >> - steps: - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - shell: bash.exe - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - shell: bash.exe - - run: - command: | - cd .. - mkdir empty-<< parameters.template >>-no-install - cd empty-<< parameters.template >>-no-install - npx storybook init --yes --skip-install - npm install - npm run build-storybook - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> - name: Storybook init from empty directory (Windows --skip-install) - shell: bash.exe - working_directory: C:\Users\circleci\storybook - test-init-features: - executor: - class: small - name: sb_node_22_browsers - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - background: true - command: | - cd code - yarn local-registry --open - name: Verdaccio - - run: - command: | - cd code - yarn wait-on tcp:127.0.0.1:6001 - yarn wait-on tcp:127.0.0.1:6002 - name: Wait on Verdaccio - - run: - command: | - cd .. - mkdir features-1 - cd features-1 - npm set registry http://localhost:6001 - npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug - npx vitest - environment: - IN_STORYBOOK_SANDBOX: true - STORYBOOK_DISABLE_TELEMETRY: true - STORYBOOK_INIT_EMPTY_TYPE: react-vite-ts - name: Storybook init for features - test-portable-stories: - executor: - class: medium+ - name: sb_playwright - parameters: - directory: - type: string - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn jest - name: Run Jest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn vitest - name: Run Vitest tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn playwright-ct - name: Run Playwright CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - run: - command: yarn cypress - name: Run Cypress CT tests - working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >> - - report-workflow-on-failure - test-runner-dev: - executor: - class: large - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit - name: Running Test Runner in Dev mode - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) - - store_test_results: - path: storybook/test-results - test-runner-production: - executor: - class: medium+ - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - start-event-collector - - run: - command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running Test Runner - - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - name: Check Telemetry - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) - - store_test_results: - path: storybook/test-results - test-yarn-pnp: - executor: - class: medium - name: sb_playwright - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: yarn install --no-immutable - environment: - YARN_ENABLE_IMMUTABLE_INSTALLS: false - name: Install dependencies - working_directory: test-storybooks/yarn-pnp - - run: - command: yarn storybook --smoke-test - name: Run Storybook smoke test - working_directory: test-storybooks/yarn-pnp - - report-workflow-on-failure - unit-tests: - executor: - class: xlarge - name: sb_playwright - parallelism: 2 - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - cd code - TEST_FILES=$(circleci tests glob "**/*.{test,spec,stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\//d" | sed "/^node_modules\//d") - echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose - name: Run tests - - store_test_results: - path: storybook/test-results - - report-workflow-on-failure - - cancel-workflow-on-failure - vitest-integration: - executor: - class: xlarge - name: sb_playwright - parallelism: << parameters.parallelism >> - parameters: - parallelism: - type: integer - steps: - - git-shallow-clone/checkout_advanced: - clone_options: --depth 1 --verbose - - attach_workspace: - at: /tmp - - run: - command: | - corepack enable - TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn - name: Install sandbox dependencies - - start-event-collector - - run: - command: yarn task --task vitest-integration --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) --no-link --start-from=never --junit - environment: - STORYBOOK_TELEMETRY_DEBUG: 1 - STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log - name: Running story tests in Vitest - - run: - command: yarn --cwd scripts jiti ./event-log-checker.ts test-run $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - name: Check Telemetry - - report-workflow-on-failure: - template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration) - - store_test_results: - path: storybook/test-results -orbs: - browser-tools: circleci/browser-tools@1.4.1 - codecov: codecov/codecov@3.2.4 - discord: antonioned/discord@0.1.0 - git-shallow-clone: guitarrapc/git-shallow-clone@2.5.0 - node: circleci/node@5.2.0 - nx: nrwl/nx@1.6.2 - win: circleci/windows@5.0.0 -parameters: - ghBaseBranch: - default: next - description: The name of the base branch (the target of the PR) - type: string - ghPrNumber: - default: "" - description: The PR number - type: string - workflow: - default: skipped - description: Which workflow to run - enum: - - normal - - merged - - daily - - skipped - - docs - type: enum -version: 2.1 -workflows: - daily: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - create-sandboxes: - parallelism: 39 - requires: - - build - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - - chromatic-sandboxes: - parallelism: 36 - requires: - - create-sandboxes - - e2e-production: - parallelism: 7 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 28 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 34 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 13 - requires: - - create-sandboxes - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-init-empty: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build - - test-init-empty-windows: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build - when: - equal: - - daily - - << pipeline.parameters.workflow >> - docs: - jobs: - - pretty-docs - when: - equal: - - docs - - << pipeline.parameters.workflow >> - merged: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 22 - requires: - - build - - chromatic-sandboxes: - parallelism: 19 - requires: - - create-sandboxes - - e2e-production: - parallelism: 6 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 14 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 17 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 7 - requires: - - create-sandboxes - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-init-empty-windows: - matrix: - parameters: - packageManager: - - npm - template: - - react-vite-ts - - nextjs-ts - - vue-vite-ts - - lit-vite-ts - requires: - - build - when: - equal: - - merged - - << pipeline.parameters.workflow >> - normal: - jobs: - - pretty-docs - - build - - lint: - requires: - - build - - knip: - requires: - - build - - bench-packages: - requires: - - build - - check - - unit-tests: - requires: - - build - - stories-tests: - requires: - - build - - script-checks: - requires: - - build - - chromatic-internal-storybook: - requires: - - build - - coverage: - requires: - - unit-tests - - create-sandboxes: - parallelism: 14 - requires: - - build - - chromatic-sandboxes: - parallelism: 11 - requires: - - create-sandboxes - - e2e-production: - parallelism: 6 - requires: - - create-sandboxes - - e2e-dev: - parallelism: 8 - requires: - - create-sandboxes - - test-runner-production: - parallelism: 9 - requires: - - create-sandboxes - - vitest-integration: - parallelism: 5 - requires: - - create-sandboxes - - check-sandboxes: - parallelism: 1 - requires: - - create-sandboxes - - test-yarn-pnp: - requires: - - build - - e2e-ui: - requires: - - build - - e2e-ui-vitest-3: - requires: - - build - - test-init-features: - requires: - - build - - test-portable-stories: - matrix: - parameters: - directory: - - react - - vue3 - - nextjs - - svelte - requires: - - build - when: - equal: - - normal - - << pipeline.parameters.workflow >> diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 208974e75403..51cafe7e53fe 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -24,7 +24,13 @@ import { } from './utils/helpers'; import { orbs } from './utils/orbs'; import { parameters } from './utils/parameters'; -import { type JobImplementation, defineJob } from './utils/types'; +import { + type JobImplementation, + type Workflow, + type defineHub, + defineJob, + isWorkflowOrAbove, +} from './utils/types'; const dirname = import.meta.dirname; @@ -78,7 +84,7 @@ const prettyDocs = defineJob('pretty-docs', { }, steps: [ git.checkout(), - npm.install('.'), + npm.installScripts(), { run: { name: 'Prettier', @@ -208,6 +214,36 @@ const check = defineJob( [linux_build.id] ); +const lint = defineJob( + 'lint', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Lint code', + working_directory: `code`, + command: 'yarn lint', + }, + }, + { + run: { + name: 'Lint scripts', + working_directory: `scripts`, + command: 'yarn lint', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [linux_build.id] +); + const knip = defineJob( 'knip', { @@ -258,6 +294,7 @@ const linux_unitTests = defineJob( }, [linux_build.id] ); + const windows_unitTests = defineJob( 'unit-tests-windows', { @@ -310,60 +347,51 @@ const packageBenchmarks = defineJob( [linux_build.id] ); -export default function generateConfig(workflow: string) { - const sandboxes = getSandboxes(workflow); - const testStorybooks = getTestStorybooks(workflow); - const initEmpty = getInitEmpty(workflow); +export default function generateConfig(workflow: Workflow) { + const todos: (ReturnType | ReturnType)[] = []; + if (isWorkflowOrAbove(workflow, 'docs')) { + todos.push(prettyDocs); + } else { + const sandboxes = getSandboxes(workflow); + const testStorybooks = getTestStorybooks(workflow); + const initEmpty = getInitEmpty(workflow); - const todos = [ - linux_build, - windows_build, - check, - knip, - prettyDocs, - uiTests, - linux_unitTests, - windows_unitTests, - packageBenchmarks, + if (isWorkflowOrAbove(workflow, 'merged')) { + todos.push(windows_build, windows_unitTests); + } - sandboxesHub, - ...sandboxes, + todos.push( + linux_build, + lint, + check, + knip, + uiTests, + linux_unitTests, + packageBenchmarks, - testStorybooksHub, - ...testStorybooks, + sandboxesHub, + ...sandboxes, - initEmptyHub, - ...initEmpty, - ]; + testStorybooksHub, + ...testStorybooks, - const jobs = todos.reduce( - (acc, job) => { - acc[job.id] = job.implementation; - return acc; - }, - {} as Record - ); + initEmptyHub, + ...initEmpty + ); + } - const workflows = { - generated: { - jobs: todos - .map((t) => - t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires } } : t.id - ) - .sort((a, b) => { - if (typeof a == 'string' && typeof b == 'string') { - return a.localeCompare(b); - } - if (typeof a == 'string') { - return -1; - } - if (typeof b == 'string') { - return 1; - } - return Object.keys(a)[0].localeCompare(Object.keys(b)[0]); - }), - }, - }; + const sorted = todos.sort((a, b) => { + if (a.requires.length && b.requires.length) { + return a.requires.length - b.requires.length; + } + if (a.requires.length) { + return 1; + } + if (b.requires.length) { + return -1; + } + return a.id.localeCompare(b.id); + }); return { version: 2.1, @@ -372,7 +400,19 @@ export default function generateConfig(workflow: string) { executors, parameters, - jobs: Object.fromEntries(Object.entries(jobs).sort(([a], [b]) => a.localeCompare(b))), - workflows, + jobs: sorted.reduce( + (acc, job) => { + acc[job.id] = job.implementation; + return acc; + }, + {} as Record + ), + workflows: { + generated: { + jobs: sorted.map((t) => + t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires } } : t.id + ), + }, + }, }; } diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index bab1818e3ee1..a1c173025809 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,5 +1,5 @@ import { CACHE_KEYS, cache, git, restore, server, verdaccio, workspace } from './utils/helpers'; -import { defineHub, defineJob } from './utils/types'; +import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; export const defineEmptyInitFlow = (template: string) => defineJob( @@ -127,18 +127,21 @@ export function defineEmptyInitWindows() { ['init-empty'] ); } + export const initEmptyHub = defineHub('init-empty', ['build-linux']); -export function getInitEmpty(workflow: string) { - const initEmptyWindows = defineEmptyInitWindows(); - const initEmptyLinux = [ - // - 'react-vite-ts', - // 'nextjs-ts', - // 'vue-vite-ts', - // 'lit-vite-ts', - ].map(defineEmptyInitFlow); +export function getInitEmpty(workflow: Workflow) { + const initEmpty = ['react-vite-ts'].map(defineEmptyInitFlow); + + if (isWorkflowOrAbove(workflow, 'merged')) { + initEmpty.push(...['nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map(defineEmptyInitFlow)); + + initEmpty.push(defineEmptyInitWindows()); + } + + if (isWorkflowOrAbove(workflow, 'normal')) { + initEmpty.push(defineEmptyInitFeatures()); + } - const initFeatures = defineEmptyInitFeatures(); - return [initEmptyWindows, initFeatures, ...initEmptyLinux]; + return initEmpty; } diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 6d1c28d220b5..ea32ab0c33d5 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -1,6 +1,6 @@ import { join } from 'path'; -import { allTemplates } from '../../code/lib/cli-storybook/src/sandbox-templates'; +import * as sandboxTemplates from '../../code/lib/cli-storybook/src/sandbox-templates'; import { CACHE_KEYS, ROOT_DIR, @@ -14,8 +14,8 @@ import { verdaccio, workspace, } from './utils/helpers'; -import { defineHub, defineJob } from './utils/types'; -import type { JobImplementation } from './utils/types'; +import { defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; +import type { JobImplementation, Workflow } from './utils/types'; function defineSandboxJob_build({ directory, @@ -119,8 +119,11 @@ function defineSandboxJob_dev({ export function defineSandboxFlow(name: K) { const id = toId(name); - const data = allTemplates[name as keyof typeof allTemplates]; - const { skipTasks } = data; + const data = sandboxTemplates.allTemplates[name as keyof typeof sandboxTemplates.allTemplates]; + if (!data) { + throw new Error(`Sandbox template ${name} not found`); + } + const { skipTasks = [] } = data; const path = name.replace('/', '-'); @@ -326,13 +329,6 @@ export function defineSandboxFlow(name: K) { name, path, jobs, - // workflow: jobs.map((job) => { - // return { - // [job.id]: { - // requires: job.requires, - // }, - // }; - // }), }; } export function defineSandboxTestRunner(sandbox: ReturnType) { @@ -458,21 +454,31 @@ export function defineWindowsSandboxBuild(sandbox: ReturnType { + switch (workflow) { + case 'normal': + return sandboxTemplates.normal; + case 'merged': + return sandboxTemplates.merged; + case 'daily': + return sandboxTemplates.daily; + default: + return []; + } +}; - const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); - const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); - const testRunner = defineSandboxTestRunner(sandboxes[0]); +export function getSandboxes(workflow: Workflow) { + const sandboxes = getListOfSandboxes(workflow).map(defineSandboxFlow); - return [ - ...sandboxes.flatMap((sandbox) => sandbox.jobs), - windows_sandbox_build, - windows_sandbox_dev, - testRunner, - ]; + const list = sandboxes.flatMap((sandbox) => sandbox.jobs); + + if (isWorkflowOrAbove(workflow, 'merged')) { + const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); + const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); + const testRunner = defineSandboxTestRunner(sandboxes[0]); + + list.push(windows_sandbox_build, windows_sandbox_dev, testRunner); + } + + return list; } diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index d1631be2834b..6f02b31c4504 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -2,7 +2,7 @@ import { readFileSync } from 'fs'; import { join } from 'path/posix'; import { CACHE_KEYS, cache, git, restore, workspace } from './utils/helpers'; -import { defineHub, defineJob } from './utils/types'; +import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; export function definePortableStoryTest(directory: string) { const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; @@ -141,9 +141,16 @@ export function definePortableStoryTestVitest3() { ); } export const testStorybooksHub = defineHub('test-storybooks', ['build-linux']); -export function getTestStorybooks(workflow: string) { - const testStorybooksPortables = ['react', 'vue3'].map(definePortableStoryTest); - const testStorybooksPortableVitest3 = definePortableStoryTestVitest3(); - const testStorybooksPNP = definePortableStoryTestPNP(); - return [...testStorybooksPortables, testStorybooksPNP, testStorybooksPortableVitest3]; +export function getTestStorybooks(workflow: Workflow) { + const testStorybooks = ['react', 'vue3'].map(definePortableStoryTest); + + if (isWorkflowOrAbove(workflow, 'daily')) { + testStorybooks.push(definePortableStoryTestPNP()); + } + + if (isWorkflowOrAbove(workflow, 'merged')) { + testStorybooks.push(definePortableStoryTestVitest3()); + } + + return testStorybooks; } diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 2c8a3567c687..42471eaead41 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -105,6 +105,14 @@ export const node = { }; export const npm = { + installScripts: () => { + return { + run: { + name: 'Install scripts', + command: 'yarn workspaces focus @storybook/scripts', + }, + }; + }, install: (appDir: string, pkgManager: string = 'yarn') => { return { 'node/install-packages': { diff --git a/scripts/ci/utils/parameters.ts b/scripts/ci/utils/parameters.ts index 282310a3e135..8da679eccc31 100644 --- a/scripts/ci/utils/parameters.ts +++ b/scripts/ci/utils/parameters.ts @@ -12,7 +12,7 @@ export const parameters = { workflow: { default: 'skipped', description: 'Which workflow to run', - enum: ['normal', 'merged', 'daily', 'skipped', 'docs'], + enum: ['normal', 'merged', 'daily', 'skipped', 'docs'] as const, type: 'enum', }, }; diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index 3a2ac76dae1f..f82ce62e4354 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -1,5 +1,6 @@ import type { executors } from './executors'; import { toId } from './helpers'; +import type { parameters } from './parameters'; export function defineJob( name: K, @@ -42,3 +43,18 @@ export function defineHub(name: string, requires = [] as string[]) { requires, }; } + +export type Workflow = (typeof parameters.workflow.enum)[number]; + +export function isWorkflowOrAbove(current: Workflow, minimum: Workflow): boolean { + switch (current) { + case 'normal': + return minimum === 'normal'; + case 'merged': + return minimum === 'normal' || minimum === 'merged'; + case 'daily': + return minimum === 'normal' || minimum === 'merged' || minimum === 'daily'; + case 'docs': + return minimum === 'docs'; + } +} From 6c054a9a13a07cf22e579574dbfc2cf7b2f6d184 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 18 Dec 2025 20:17:45 +0100 Subject: [PATCH 218/310] fix type issue & linting --- code/lib/eslint-plugin/README.md | 2 +- scripts/ci/utils/types.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/lib/eslint-plugin/README.md b/code/lib/eslint-plugin/README.md index db2681688122..5edd7bf44e15 100644 --- a/code/lib/eslint-plugin/README.md +++ b/code/lib/eslint-plugin/README.md @@ -65,7 +65,7 @@ If you are using [flat config style](https://eslint.org/docs/latest/use/configur import { defineConfig, globalIgnores } from 'eslint/config'; export default defineConfig([ - globalIgnores(['!.storybook'], "Include Storybook Directory"), + globalIgnores(['!.storybook'], 'Include Storybook Directory'), // ... ]); ``` diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index f82ce62e4354..cad86994823b 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -56,5 +56,7 @@ export function isWorkflowOrAbove(current: Workflow, minimum: Workflow): boolean return minimum === 'normal' || minimum === 'merged' || minimum === 'daily'; case 'docs': return minimum === 'docs'; + default: + return false; } } From fb379f0ade6ef1dd9e6ea9ed62154453cf02d252 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 18 Dec 2025 20:38:54 +0100 Subject: [PATCH 219/310] Update package.json and yarn.lock to include eslint version 8.57.1 --- code/package.json | 1 + yarn.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/code/package.json b/code/package.json index f823cd9e5805..dda1203f5880 100644 --- a/code/package.json +++ b/code/package.json @@ -130,6 +130,7 @@ "es-toolkit": "^1.42.0", "esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0", "esbuild-loader": "^4.3.0", + "eslint": "^8.57.1", "happy-dom": "^17.6.3", "http-server": "^14.1.1", "husky": "^4.3.7", diff --git a/yarn.lock b/yarn.lock index 79577b30bacb..79b7d709473c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7978,6 +7978,7 @@ __metadata: es-toolkit: "npm:^1.42.0" esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0" esbuild-loader: "npm:^4.3.0" + eslint: "npm:^8.57.1" happy-dom: "npm:^17.6.3" http-server: "npm:^14.1.1" husky: "npm:^4.3.7" From 4546d4c1221d93fd341d85935a636c7f53f8f1c5 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 18 Dec 2025 21:07:25 +0100 Subject: [PATCH 220/310] Refactor sandbox-templates and update test-storybooks to include artifact persistence - Commented out 'ember/default-js' in sandbox-templates.ts. - Added artifact persistence for Playwright test results in test-storybooks.ts. --- code/lib/cli-storybook/src/sandbox-templates.ts | 2 +- scripts/ci/test-storybooks.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index c6a7f29ebbcd..3f86790f8dc0 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -997,7 +997,7 @@ export const normal: TemplateKey[] = [ 'bench/react-vite-default-ts-nodocs', 'bench/react-vite-default-ts-test-build', 'bench/react-webpack-18-ts-test-build', - 'ember/default-js', + // 'ember/default-js', 'react-rsbuild/default-ts', ]; diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index 6f02b31c4504..163dbd903376 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -1,7 +1,7 @@ import { readFileSync } from 'fs'; import { join } from 'path/posix'; -import { CACHE_KEYS, cache, git, restore, workspace } from './utils/helpers'; +import { CACHE_KEYS, artifact, cache, git, restore, workspace } from './utils/helpers'; import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; export function definePortableStoryTest(directory: string) { @@ -62,6 +62,7 @@ export function definePortableStoryTest(directory: string) { command: 'yarn playwright-e2e', }, }, + artifact.persist(join(working_directory, 'test-results'), 'playwright'), ] : []), { From 0920c8df1e33040b7468ac6dafd294740ba6efdd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 18 Dec 2025 22:44:59 +0100 Subject: [PATCH 221/310] Update package.json and yarn.lock to include prettier version 3.7.1 --- code/package.json | 1 + yarn.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/code/package.json b/code/package.json index dda1203f5880..feed26a210b9 100644 --- a/code/package.json +++ b/code/package.json @@ -137,6 +137,7 @@ "knip": "^5.70.2", "lint-staged": "^16.2.7", "mock-require": "^3.0.3", + "prettier": "^3.7.1", "process": "^0.11.10", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/yarn.lock b/yarn.lock index 79b7d709473c..a8e13403fc92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7985,6 +7985,7 @@ __metadata: knip: "npm:^5.70.2" lint-staged: "npm:^16.2.7" mock-require: "npm:^3.0.3" + prettier: "npm:^3.7.1" process: "npm:^0.11.10" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" From a3b9d8562a98b0c959599e830b89791e9899793c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 09:06:55 +0100 Subject: [PATCH 222/310] Refactor import order in exec.ts for improved readability --- scripts/utils/exec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/exec.ts b/scripts/utils/exec.ts index c4824b757123..122983cd2273 100644 --- a/scripts/utils/exec.ts +++ b/scripts/utils/exec.ts @@ -1,5 +1,5 @@ // eslint-disable-next-line depend/ban-dependencies -import { type ResultPromise, type Options, execa } from 'execa'; +import { type Options, type ResultPromise, execa } from 'execa'; import picocolors from 'picocolors'; const logger = console; From 54139a11087d892f447fc2aa731fdce8fd5db290 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 11:42:03 +0100 Subject: [PATCH 223/310] persist test results to circleci --- scripts/ci/data.ts | 44 +++++++++++++++++++++++++++---------- scripts/ci/sandboxes.ts | 8 +++++++ scripts/ci/utils/helpers.ts | 10 +++++++++ 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index 51cafe7e53fe..dfbd27754823 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -19,6 +19,7 @@ import { npm, restore, server, + testResults, verdaccio, workspace, } from './utils/helpers'; @@ -173,12 +174,6 @@ const uiTests = defineJob( working_directory: 'code', }, }, - 'report-workflow-on-failure', - { - store_test_results: { - path: `test-results`, - }, - }, ], }, [linux_build.id] @@ -237,8 +232,6 @@ const lint = defineJob( command: 'yarn lint', }, }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', ], }, [linux_build.id] @@ -279,14 +272,38 @@ const linux_unitTests = defineJob( name: 'Run tests', working_directory: `code`, command: - 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=../test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', }, }, + testResults.persist(`test-results`), + + git.check(), + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [linux_build.id] +); + +const linux_storiesTests = defineJob( + 'stories-tests-linux', + { + executor: { + name: 'sb_playwright', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), { - store_test_results: { - path: `${WORKING_DIR}/test-results`, + run: { + name: 'Run stories tests', + working_directory: `code`, + command: + 'TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', }, }, + testResults.persist(`test-results`), + git.check(), 'report-workflow-on-failure', 'cancel-workflow-on-failure', @@ -362,11 +379,14 @@ export default function generateConfig(workflow: Workflow) { todos.push( linux_build, + linux_unitTests, + linux_storiesTests, + lint, check, knip, + uiTests, - linux_unitTests, packageBenchmarks, sandboxesHub, diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index ea32ab0c33d5..c71aa46a2ba6 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -53,11 +53,13 @@ function defineSandboxJob_build({ } function defineSandboxJob_dev({ name, + directory, template, needs, options, }: { name: string; + directory: string; needs: string[]; template: string; options: { @@ -100,6 +102,10 @@ function defineSandboxJob_dev({ ].join('\n'), }, }, + artifact.persist( + join(ROOT_DIR, SANDBOX_DIR, directory, 'test-results'), + 'test-results' + ), ] : [ { @@ -201,6 +207,7 @@ export function defineSandboxFlow(name: K) { }), defineSandboxJob_dev({ name: names.dev, + directory: id, template: name, needs: [ids.create], options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, @@ -287,6 +294,7 @@ export function defineSandboxFlow(name: K) { ].join('\n'), }, }, + artifact.persist(join(ROOT_DIR, SANDBOX_DIR, id, 'test-results'), 'test-results'), ], }, [ids.build] diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 42471eaead41..5468edd8fff8 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -222,3 +222,13 @@ export const CACHE_PATHS = [ 'code/node_modules', 'scripts/node_modules', ]; + +export const testResults = { + persist: (path: string) => { + return { + store_test_results: { + path, + }, + }; + }, +}; From 9c1ea6d200716a290fb47f4fcb6c6daff289d67e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 13:42:03 +0100 Subject: [PATCH 224/310] Enhance sandbox flow by adding Svelte Kit preparation step and removing template existence check - Added a conditional step to run 'yarn prepare' for Svelte Kit sandboxes. - Removed the check for sandbox template existence to streamline the flow. --- scripts/ci/sandboxes.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index c71aa46a2ba6..27514a9780c0 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -126,9 +126,6 @@ function defineSandboxJob_dev({ export function defineSandboxFlow(name: K) { const id = toId(name); const data = sandboxTemplates.allTemplates[name as keyof typeof sandboxTemplates.allTemplates]; - if (!data) { - throw new Error(`Sandbox template ${name} not found`); - } const { skipTasks = [] } = data; const path = name.replace('/', '-'); @@ -183,6 +180,16 @@ export function defineSandboxFlow(name: K) { ].join('\n'), }, }, + ...(id.includes('svelte-kit') + ? [ + { + run: { + name: 'Run prepare', + command: `yarn prepare`, + }, + }, + ] + : []), { run: { name: 'Create Sandboxes', From 4c243b27090b3828a2c75c07c6d1d8002d360d0b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 14:06:09 +0100 Subject: [PATCH 225/310] Refactor CI configuration to introduce codeHub and update job dependencies - Replaced references to linux_build with codeHub in multiple job definitions. - Renamed unit and stories test jobs for clarity. - Updated sandbox flow to ensure proper job execution order. --- scripts/ci/data.ts | 27 +++++++++++++++------------ scripts/ci/sandboxes.ts | 26 +++++++++++++++----------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index dfbd27754823..cb04090d90a8 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -28,7 +28,7 @@ import { parameters } from './utils/parameters'; import { type JobImplementation, type Workflow, - type defineHub, + defineHub, defineJob, isWorkflowOrAbove, } from './utils/types'; @@ -151,8 +151,10 @@ const windows_build = defineJob('build-windows', { ], }); -const uiTests = defineJob( - 'ui', +const codeHub = defineHub('code', [linux_build.id]); + +const storybookChromatic = defineJob( + 'storybook-chromatic', { executor: { name: 'sb_node_22_classic', @@ -176,7 +178,7 @@ const uiTests = defineJob( }, ], }, - [linux_build.id] + [codeHub.id] ); const check = defineJob( @@ -206,7 +208,7 @@ const check = defineJob( 'cancel-workflow-on-failure', ], }, - [linux_build.id] + [codeHub.id] ); const lint = defineJob( @@ -234,7 +236,7 @@ const lint = defineJob( }, ], }, - [linux_build.id] + [codeHub.id] ); const knip = defineJob( @@ -255,11 +257,11 @@ const knip = defineJob( }, ], }, - [linux_build.id] + [codeHub.id] ); const linux_unitTests = defineJob( - 'unit-tests-linux', + 'tests-unit-linux', { executor: { name: 'sb_node_22_classic', @@ -282,11 +284,11 @@ const linux_unitTests = defineJob( 'cancel-workflow-on-failure', ], }, - [linux_build.id] + [codeHub.id] ); const linux_storiesTests = defineJob( - 'stories-tests-linux', + 'tests-stories-linux', { executor: { name: 'sb_playwright', @@ -309,7 +311,7 @@ const linux_storiesTests = defineJob( 'cancel-workflow-on-failure', ], }, - [linux_build.id] + [codeHub.id] ); const windows_unitTests = defineJob( @@ -382,11 +384,12 @@ export default function generateConfig(workflow: Workflow) { linux_unitTests, linux_storiesTests, + codeHub, lint, check, knip, - uiTests, + storybookChromatic, packageBenchmarks, sandboxesHub, diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 27514a9780c0..83fac035acc0 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -180,16 +180,6 @@ export function defineSandboxFlow(name: K) { ].join('\n'), }, }, - ...(id.includes('svelte-kit') - ? [ - { - run: { - name: 'Run prepare', - command: `yarn prepare`, - }, - }, - ] - : []), { run: { name: 'Create Sandboxes', @@ -200,11 +190,22 @@ export function defineSandboxFlow(name: K) { }, }, }, + ...(id.includes('svelte-kit') + ? [ + { + run: { + name: 'Run prepare', + working_directory: `${SANDBOX_DIR}/${id}`, + command: `yarn prepare`, + }, + }, + ] + : []), artifact.persist(`${ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), workspace.persist([`${SANDBOX_DIR}/${id}`]), ], }, - ['sandboxes'] + [sandboxesHub.id] ), defineSandboxJob_build({ directory: id, @@ -346,6 +347,7 @@ export function defineSandboxFlow(name: K) { jobs, }; } + export function defineSandboxTestRunner(sandbox: ReturnType) { return defineJob( `${sandbox.jobs[1].id}-test-runner`, @@ -367,6 +369,7 @@ export function defineSandboxTestRunner(sandbox: ReturnType) { return defineJob( `${sandbox.jobs[2].id}-windows`, @@ -414,6 +417,7 @@ export function defineWindowsSandboxDev(sandbox: ReturnType) { return defineJob( `${sandbox.jobs[1].id}-windows`, From 922d5ce82b85db253846af7fa9e6fa9a5502e900 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 14:11:54 +0100 Subject: [PATCH 226/310] Update CI configuration to replace linux_build with codeHub in package benchmarks --- scripts/ci/data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index cb04090d90a8..fed0b4d40e74 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -363,7 +363,7 @@ const packageBenchmarks = defineJob( }, ], }, - [linux_build.id] + [codeHub.id] ); export default function generateConfig(workflow: Workflow) { From 542583d435772732a15a10f28997148b52894149 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 14:24:45 +0100 Subject: [PATCH 227/310] Update working directory path in sandbox flow for CI configuration --- scripts/ci/sandboxes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 83fac035acc0..145340db1b15 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -195,7 +195,7 @@ export function defineSandboxFlow(name: K) { { run: { name: 'Run prepare', - working_directory: `${SANDBOX_DIR}/${id}`, + working_directory: `${WORKING_DIR}/${SANDBOX_DIR}/${id}`, command: `yarn prepare`, }, }, From b989368466c54ae08dcb9a48e79233e87f18a784 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 15:34:48 +0100 Subject: [PATCH 228/310] Update working directory path in sandbox flow to use ROOT_DIR for CI configuration --- scripts/ci/sandboxes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 145340db1b15..ae4b612df3e7 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -195,7 +195,7 @@ export function defineSandboxFlow(name: K) { { run: { name: 'Run prepare', - working_directory: `${WORKING_DIR}/${SANDBOX_DIR}/${id}`, + working_directory: `${ROOT_DIR}/${SANDBOX_DIR}/${id}`, command: `yarn prepare`, }, }, From e41e1a133f11a53521d920d7696a56a658e1c6e6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 21:06:48 +0100 Subject: [PATCH 229/310] improve code readability --- scripts/ci/code.ts | 330 ++++++++++++++++++++++++++++ scripts/ci/data.ts | 386 ++------------------------------- scripts/ci/sandboxes.ts | 50 ++--- scripts/ci/utils/commands.ts | 5 + scripts/ci/utils/constants.ts | 4 + scripts/ci/utils/executors.ts | 2 +- scripts/ci/utils/helpers.ts | 4 +- scripts/ci/utils/orbs.ts | 1 + scripts/ci/utils/parameters.ts | 1 + scripts/ci/utils/types.ts | 50 +++-- scripts/package.json | 1 - 11 files changed, 424 insertions(+), 410 deletions(-) create mode 100644 scripts/ci/code.ts create mode 100644 scripts/ci/utils/constants.ts diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts new file mode 100644 index 000000000000..5fda25993a75 --- /dev/null +++ b/scripts/ci/code.ts @@ -0,0 +1,330 @@ +// eslint-disable-next-line depend/ban-dependencies +import glob from 'fast-glob'; +import { join } from 'path/posix'; + +import { WORKING_DIR } from './utils/constants'; +import { + CACHE_KEYS, + CACHE_PATHS, + artifact, + cache, + git, + node, + npm, + restore, + server, + testResults, + verdaccio, + workspace, +} from './utils/helpers'; +import { defineHub, defineJob } from './utils/types'; + +const dirname = import.meta.dirname; + +export const build_linux = defineJob('Build (linux)', { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + git.checkout(), + npm.install('.'), + cache.persist(CACHE_PATHS, CACHE_KEYS()[0]), + git.check(), + npm.check(), + { + run: { + command: 'yarn task --task compile --start-from=auto --no-link --debug', + name: 'Compile', + working_directory: `code`, + }, + }, + { + run: { + command: 'yarn local-registry --publish', + name: 'Publish to Verdaccio', + working_directory: `code`, + }, + }, + 'report-workflow-on-failure', + artifact.persist(`code/bench/esbuild-metafiles`, 'bench'), + workspace.persist([ + ...glob + .sync(['*/src', '*/*/src'], { + cwd: join(dirname, '../../code'), + onlyDirectories: true, + }) + .flatMap((p) => [ + `${WORKING_DIR}/code/${p.replace('src', 'dist')}`, + `${WORKING_DIR}/code/${p.replace('src', 'node_modules')}`, + ]), + `${WORKING_DIR}/.verdaccio-cache`, + `${WORKING_DIR}/code/bench`, + ]), + ], +}); +export const prettyDocs = defineJob('Prettify docs', { + executor: { + name: 'sb_node_22_classic', + class: 'medium+', + }, + steps: [ + git.checkout(), + npm.installScripts(), + { + run: { + name: 'Prettier', + working_directory: `scripts`, + command: 'yarn docs:prettier:check', + }, + }, + ], +}); +export const build_windows = defineJob('Build (windows)', { + executor: { + name: 'win/default', + size: 'xlarge', + shell: 'bash.exe', + }, + steps: [ + git.checkout({ forceHttps: true }), + node.installOnWindows(), + npm.install('.'), + { + run: { + name: 'Compile', + working_directory: `code`, + command: 'yarn task --task compile --start-from=auto --no-link --debug', + }, + }, + { + run: { + name: 'Publish to Verdaccio', + working_directory: `code`, + command: 'yarn local-registry --publish', + }, + }, + workspace.persist( + [ + ...glob + .sync(['*/src', '*/*/src'], { + cwd: join(dirname, '../../code'), + onlyDirectories: true, + }) + .flatMap((p) => [ + `code/${p.replace('src', 'dist')}`, + `code/${p.replace('src', 'node_modules')}`, + ]), + `.verdaccio-cache`, + `code/bench`, + ], + 'C:\\Users\\circleci\\project' + ), + ], +}); +export const codeHub = defineHub('code', [build_linux.id]); +export const storybookChromatic = defineJob( + 'Local storybook & chromatic', + { + executor: { + name: 'sb_node_22_classic', + class: 'medium+', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Build internal storybook', + command: 'yarn storybook:ui:build', + working_directory: 'code', + }, + }, + { + run: { + name: 'Run Chromatic', + command: 'yarn storybook:ui:chromatic', + working_directory: 'code', + }, + }, + ], + }, + [codeHub.id] +); +export const check = defineJob( + 'TypeScript validation', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'TypeCheck code', + working_directory: `code`, + command: 'yarn task --task check --no-link', + }, + }, + { + run: { + name: 'TypeCheck scripts', + working_directory: `scripts`, + command: 'yarn check', + }, + }, + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [codeHub.id] +); +export const lint = defineJob( + 'EsLint & Prettier validation', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Lint code', + working_directory: `code`, + command: 'yarn lint', + }, + }, + { + run: { + name: 'Lint scripts', + working_directory: `scripts`, + command: 'yarn lint', + }, + }, + ], + }, + [codeHub.id] +); +export const knip = defineJob( + 'Knip validation', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Run Knip', + working_directory: `code`, + command: 'yarn knip --no-exit-code', + }, + }, + ], + }, + [codeHub.id] +); +export const testsUnit_linux = defineJob( + 'Tests (linux)', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Run tests', + working_directory: `code`, + command: + 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + }, + }, + testResults.persist(`test-results`), + + git.check(), + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [codeHub.id] +); +export const testsStories_linux = defineJob( + 'Tests stories (linux)', + { + executor: { + name: 'sb_playwright', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + { + run: { + name: 'Run stories tests', + working_directory: `code`, + command: + 'TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + }, + }, + testResults.persist(`test-results`), + + git.check(), + 'report-workflow-on-failure', + 'cancel-workflow-on-failure', + ], + }, + [codeHub.id] +); +export const testUnit_windows = defineJob( + 'Tests unit (windows)', + { + executor: { + name: 'win/default', + size: 'medium', + shell: 'bash.exe', + }, + steps: [ + ...restore.windows('C:\\Users\\circleci\\project'), + { + run: { + command: 'yarn install', + name: 'Install dependencies', + }, + }, + { + run: { + command: 'yarn test', + name: 'Run unit tests', + working_directory: `code`, + }, + }, + ], + }, + [build_windows.id] +); +export const benchmarkPackages = defineJob( + 'Benchmark packages', + { + executor: { + name: 'sb_node_22_classic', + class: 'xlarge', + }, + steps: [ + ...restore.linux(), + verdaccio.start(), + server.wait([...verdaccio.ports]), + { + run: { + name: 'Benchmarking packages against base branch', + command: + 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', + working_directory: 'scripts', + }, + }, + ], + }, + [codeHub.id] +); diff --git a/scripts/ci/data.ts b/scripts/ci/data.ts index fed0b4d40e74..ca68d63fd084 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/data.ts @@ -1,370 +1,28 @@ -import { join } from 'node:path'; - -// eslint-disable-next-line depend/ban-dependencies -import glob from 'fast-glob'; - +import { + benchmarkPackages, + build_linux, + build_windows, + check, + codeHub, + knip, + lint, + prettyDocs, + storybookChromatic, + testUnit_windows, + testsStories_linux, + testsUnit_linux, +} from './code'; import { getInitEmpty, initEmptyHub } from './init-empty'; import { getSandboxes, sandboxesHub } from './sandboxes'; import { getTestStorybooks, testStorybooksHub } from './test-storybooks'; import { commands } from './utils/commands'; import { executors } from './utils/executors'; -import { - CACHE_KEYS, - CACHE_PATHS, - WORKING_DIR, - artifact, - cache, - git, - node, - npm, - restore, - server, - testResults, - verdaccio, - workspace, -} from './utils/helpers'; import { orbs } from './utils/orbs'; import { parameters } from './utils/parameters'; -import { - type JobImplementation, - type Workflow, - defineHub, - defineJob, - isWorkflowOrAbove, -} from './utils/types'; - -const dirname = import.meta.dirname; - -const linux_build = defineJob('build-linux', { - executor: { - name: 'sb_node_22_classic', - class: 'xlarge', - }, - steps: [ - git.checkout(), - npm.install('.'), - cache.persist(CACHE_PATHS, CACHE_KEYS()[0]), - git.check(), - npm.check(), - { - run: { - command: 'yarn task --task compile --start-from=auto --no-link --debug', - name: 'Compile', - working_directory: `code`, - }, - }, - { - run: { - command: 'yarn local-registry --publish', - name: 'Publish to Verdaccio', - working_directory: `code`, - }, - }, - 'report-workflow-on-failure', - artifact.persist(`code/bench/esbuild-metafiles`, 'bench'), - workspace.persist([ - ...glob - .sync(['*/src', '*/*/src'], { - cwd: join(dirname, '../../code'), - onlyDirectories: true, - }) - .flatMap((p) => [ - `${WORKING_DIR}/code/${p.replace('src', 'dist')}`, - `${WORKING_DIR}/code/${p.replace('src', 'node_modules')}`, - ]), - `${WORKING_DIR}/.verdaccio-cache`, - `${WORKING_DIR}/code/bench`, - ]), - ], -}); - -const prettyDocs = defineJob('pretty-docs', { - executor: { - name: 'sb_node_22_classic', - class: 'medium+', - }, - steps: [ - git.checkout(), - npm.installScripts(), - { - run: { - name: 'Prettier', - working_directory: `scripts`, - command: 'yarn docs:prettier:check', - }, - }, - ], -}); - -const windows_build = defineJob('build-windows', { - executor: { - name: 'win/default', - size: 'xlarge', - shell: 'bash.exe', - }, - steps: [ - git.checkout({ forceHttps: true }), - node.installOnWindows(), - npm.install('.'), - { - run: { - name: 'Compile', - working_directory: `code`, - command: 'yarn task --task compile --start-from=auto --no-link --debug', - }, - }, - // { - // run: { - // name: 'Convert symlinks to real directories', - // command: 'yarn windows:unlink', - // working_directory: `scripts`, - // }, - // }, - // cache.persist( - // // CACHE_PATHS.map((path) => 'C:\\Users\\circleci\\project\\' + path), - // CACHE_PATHS, - // CACHE_KEYS('windows')[0] - // ), - { - run: { - name: 'Publish to Verdaccio', - working_directory: `code`, - command: 'yarn local-registry --publish', - }, - }, - workspace.persist( - [ - ...glob - .sync(['*/src', '*/*/src'], { - cwd: join(dirname, '../../code'), - onlyDirectories: true, - }) - .flatMap((p) => [ - `code/${p.replace('src', 'dist')}`, - `code/${p.replace('src', 'node_modules')}`, - ]), - `.verdaccio-cache`, - `code/bench`, - ], - 'C:\\Users\\circleci\\project' - ), - ], -}); - -const codeHub = defineHub('code', [linux_build.id]); - -const storybookChromatic = defineJob( - 'storybook-chromatic', - { - executor: { - name: 'sb_node_22_classic', - class: 'medium+', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Build internal storybook', - command: 'yarn storybook:ui:build', - working_directory: 'code', - }, - }, - { - run: { - name: 'Run Chromatic', - command: 'yarn storybook:ui:chromatic', - working_directory: 'code', - }, - }, - ], - }, - [codeHub.id] -); +import type { defineHub, defineJob } from './utils/types'; +import { type JobImplementation, type Workflow, isWorkflowOrAbove } from './utils/types'; -const check = defineJob( - 'check', - { - executor: { - name: 'sb_node_22_classic', - class: 'xlarge', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'TypeCheck code', - working_directory: `code`, - command: 'yarn task --task check --no-link', - }, - }, - { - run: { - name: 'TypeCheck scripts', - working_directory: `scripts`, - command: 'yarn check', - }, - }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - [codeHub.id] -); - -const lint = defineJob( - 'lint', - { - executor: { - name: 'sb_node_22_classic', - class: 'xlarge', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Lint code', - working_directory: `code`, - command: 'yarn lint', - }, - }, - { - run: { - name: 'Lint scripts', - working_directory: `scripts`, - command: 'yarn lint', - }, - }, - ], - }, - [codeHub.id] -); - -const knip = defineJob( - 'knip', - { - executor: { - name: 'sb_node_22_classic', - class: 'xlarge', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Run Knip', - working_directory: `code`, - command: 'yarn knip --no-exit-code', - }, - }, - ], - }, - [codeHub.id] -); - -const linux_unitTests = defineJob( - 'tests-unit-linux', - { - executor: { - name: 'sb_node_22_classic', - class: 'xlarge', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Run tests', - working_directory: `code`, - command: - 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', - }, - }, - testResults.persist(`test-results`), - - git.check(), - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - [codeHub.id] -); - -const linux_storiesTests = defineJob( - 'tests-stories-linux', - { - executor: { - name: 'sb_playwright', - class: 'xlarge', - }, - steps: [ - ...restore.linux(), - { - run: { - name: 'Run stories tests', - working_directory: `code`, - command: - 'TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', - }, - }, - testResults.persist(`test-results`), - - git.check(), - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', - ], - }, - [codeHub.id] -); - -const windows_unitTests = defineJob( - 'unit-tests-windows', - { - executor: { - name: 'win/default', - size: 'medium', - shell: 'bash.exe', - }, - steps: [ - ...restore.windows('C:\\Users\\circleci\\project'), - { - run: { - command: 'yarn install', - name: 'Install dependencies', - }, - }, - { - run: { - command: 'yarn test', - name: 'Run unit tests', - working_directory: `code`, - }, - }, - ], - }, - [windows_build.id] -); - -const packageBenchmarks = defineJob( - 'package-benchmarks', - { - executor: { - name: 'sb_node_22_classic', - class: 'xlarge', - }, - steps: [ - ...restore.linux(), - verdaccio.start(), - server.wait([...verdaccio.ports]), - { - run: { - name: 'Benchmarking packages against base branch', - command: - 'yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload', - working_directory: 'scripts', - }, - }, - ], - }, - [codeHub.id] -); +export const dirname = import.meta.dirname; export default function generateConfig(workflow: Workflow) { const todos: (ReturnType | ReturnType)[] = []; @@ -376,13 +34,13 @@ export default function generateConfig(workflow: Workflow) { const initEmpty = getInitEmpty(workflow); if (isWorkflowOrAbove(workflow, 'merged')) { - todos.push(windows_build, windows_unitTests); + todos.push(build_windows, testUnit_windows); } todos.push( - linux_build, - linux_unitTests, - linux_storiesTests, + build_linux, + testsUnit_linux, + testsStories_linux, codeHub, lint, @@ -390,7 +48,7 @@ export default function generateConfig(workflow: Workflow) { knip, storybookChromatic, - packageBenchmarks, + benchmarkPackages, sandboxesHub, ...sandboxes, diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index ae4b612df3e7..f9784d1fd353 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -1,11 +1,9 @@ import { join } from 'path'; import * as sandboxTemplates from '../../code/lib/cli-storybook/src/sandbox-templates'; +import { ROOT_DIR, SANDBOX_DIR, WORKING_DIR } from './utils/constants'; import { CACHE_KEYS, - ROOT_DIR, - SANDBOX_DIR, - WORKING_DIR, artifact, cache, restore, @@ -123,12 +121,12 @@ function defineSandboxJob_dev({ ); } -export function defineSandboxFlow(name: K) { - const id = toId(name); - const data = sandboxTemplates.allTemplates[name as keyof typeof sandboxTemplates.allTemplates]; - const { skipTasks = [] } = data; +export function defineSandboxFlow(key: Key) { + const id = toId(key); + const data = sandboxTemplates.allTemplates[key as keyof typeof sandboxTemplates.allTemplates]; + const { skipTasks = [], name } = data; - const path = name.replace('/', '-'); + const path = key.replace('/', '-'); const names = { create: `${name} (create)`, @@ -137,16 +135,16 @@ export function defineSandboxFlow(name: K) { e2e: `${name} (e2e)`, chromatic: `${name} (chromatic)`, vitest: `${name} (vitest)`, - ['test-runner']: `${name} (test-runner)`, + testRunner: `${name} (test-runner)`, }; const ids = { - create: `${toId(names.create)}`, - build: `${toId(names.build)}`, - dev: `${toId(names.dev)}`, - e2e: `${toId(names.e2e)}`, - chromatic: `${toId(names.chromatic)}`, - vitest: `${toId(names.vitest)}`, - ['test-runner']: `${toId(names['test-runner'])}`, + create: `${id}-create`, + build: `${id}-build`, + dev: `${id}-dev`, + e2e: `${id}-e2e`, + chromatic: `${id}-chromatic`, + vitest: `${id}-vitest`, + testRunner: `${id}-test-runner`, }; const jobs = [ @@ -183,7 +181,7 @@ export function defineSandboxFlow(name: K) { { run: { name: 'Create Sandboxes', - command: `yarn task sandbox --template ${name} --no-link -s sandbox --debug`, + command: `yarn task sandbox --template ${key} --no-link -s sandbox --debug`, environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', @@ -210,13 +208,13 @@ export function defineSandboxFlow(name: K) { defineSandboxJob_build({ directory: id, name: names.build, - template: name, + template: key, needs: [ids.create], }), defineSandboxJob_dev({ name: names.dev, directory: id, - template: name, + template: key, needs: [ids.create], options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, }), @@ -242,7 +240,7 @@ export function defineSandboxFlow(name: K) { { run: { name: 'Running Chromatic', - command: `yarn task chromatic --template ${name} --no-link -s chromatic`, + command: `yarn task chromatic --template ${key} --no-link -s chromatic`, environment: { STORYBOOK_SANDBOX_ROOT: `./sandbox`, }, @@ -266,7 +264,7 @@ export function defineSandboxFlow(name: K) { { run: { name: 'Running Vitest', - command: `yarn task vitest-integration --template ${name} --no-link -s vitest-integration`, + command: `yarn task vitest-integration --template ${key} --no-link -s vitest-integration`, }, }, ], @@ -289,7 +287,7 @@ export function defineSandboxFlow(name: K) { run: { name: 'Serve storybook', background: true, - command: `yarn task serve --template ${name} --no-link -s serve`, + command: `yarn task serve --template ${key} --no-link -s serve`, }, }, server.wait(['8001']), @@ -298,7 +296,7 @@ export function defineSandboxFlow(name: K) { name: 'Running E2E Tests', command: [ `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${name} --no-link -s e2e-tests" --verbose --index=0 --total=1`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${key} --no-link -s e2e-tests" --verbose --index=0 --total=1`, ].join('\n'), }, }, @@ -319,7 +317,7 @@ export function defineSandboxFlow(name: K) { */ !skipTasks?.includes('test-runner') && skipTasks.includes('chromatic') ? defineJob( - names['test-runner'], + names.testRunner, { executor: { name: 'sb_playwright', @@ -332,7 +330,7 @@ export function defineSandboxFlow(name: K) { { run: { name: 'Running test-runner', - command: `yarn task test-runner --template ${name} --no-link -s test-runner`, + command: `yarn task test-runner --template ${key} --no-link -s test-runner`, }, }, ], @@ -342,7 +340,7 @@ export function defineSandboxFlow(name: K) { : undefined, ].filter(Boolean); return { - name, + name: key, path, jobs, }; diff --git a/scripts/ci/utils/commands.ts b/scripts/ci/utils/commands.ts index ae79a36b9c44..062490a72219 100644 --- a/scripts/ci/utils/commands.ts +++ b/scripts/ci/utils/commands.ts @@ -1,5 +1,10 @@ import { git } from './helpers'; +/** + * TODO: I think we should long-term remove all these The shorthands are not useful within the + * dynamic config generation context. I propose these get changed to be helpers inside the + * `scripts/ci/utils/helpers.ts` file. + */ export const commands = { 'cancel-workflow-on-failure': { description: 'Cancels the entire workflow in case the previous step has failed', diff --git a/scripts/ci/utils/constants.ts b/scripts/ci/utils/constants.ts new file mode 100644 index 000000000000..db5fd0fcbb88 --- /dev/null +++ b/scripts/ci/utils/constants.ts @@ -0,0 +1,4 @@ +/** This is the root directory for Linux CI jobs. Windows CI jobs use a different root directory! */ +export const ROOT_DIR = '/tmp'; +export const WORKING_DIR = `project`; +export const SANDBOX_DIR = `storybook-sandboxes`; diff --git a/scripts/ci/utils/executors.ts b/scripts/ci/utils/executors.ts index f1be1d390a21..32dba767149d 100644 --- a/scripts/ci/utils/executors.ts +++ b/scripts/ci/utils/executors.ts @@ -1,4 +1,4 @@ -import { ROOT_DIR, WORKING_DIR } from './helpers'; +import { ROOT_DIR, WORKING_DIR } from './constants'; export const executors = { sb_node_18_browsers: { diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 5468edd8fff8..dcf88e92297c 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -1,6 +1,4 @@ -export const ROOT_DIR = '/tmp'; -export const WORKING_DIR = `project`; -export const SANDBOX_DIR = `storybook-sandboxes`; +import { ROOT_DIR } from './constants'; export const workspace = { attach: (at = ROOT_DIR) => { diff --git a/scripts/ci/utils/orbs.ts b/scripts/ci/utils/orbs.ts index 0a311d1d68a9..f190be482bee 100644 --- a/scripts/ci/utils/orbs.ts +++ b/scripts/ci/utils/orbs.ts @@ -1,3 +1,4 @@ +/** @see https://circleci.com/developer/orbs */ export const orbs = { 'browser-tools': 'circleci/browser-tools@2.3.2', codecov: 'codecov/codecov@5.4.3', diff --git a/scripts/ci/utils/parameters.ts b/scripts/ci/utils/parameters.ts index 8da679eccc31..1518f67a1f49 100644 --- a/scripts/ci/utils/parameters.ts +++ b/scripts/ci/utils/parameters.ts @@ -1,3 +1,4 @@ +/** These are parameters that the CircleCI API is called with. */ export const parameters = { ghBaseBranch: { default: 'next', diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index cad86994823b..b63db50678f4 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -2,6 +2,21 @@ import type { executors } from './executors'; import { toId } from './helpers'; import type { parameters } from './parameters'; +export type JobImplementation = { + executor: + | { + name: keyof typeof executors; + class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + } + | { + name: 'win/default'; + size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; + }; + steps: unknown[]; // Make this more type-strict, maybe + parameters?: Record; + parallelism?: number; +}; + export function defineJob( name: K, implementation: I, @@ -18,21 +33,10 @@ export function defineJob( }; } -export type JobImplementation = { - executor: - | { - name: keyof typeof executors; - class: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - } - | { - name: 'win/default'; - size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; - }; - steps: unknown[]; - parameters?: Record; - parallelism?: number; -}; - +/** + * A hub is a special type of job that is used to group other jobs together. It cannot contain any + * steps/implementation. + */ export function defineHub(name: string, requires = [] as string[]) { return { id: toId(name), @@ -46,6 +50,22 @@ export function defineHub(name: string, requires = [] as string[]) { export type Workflow = (typeof parameters.workflow.enum)[number]; +/** + * Checks if the current workflow is at least the minimum workflow. + * + * @example + * + * ```ts + * isWorkflowOrAbove('normal', 'normal'); // true + * isWorkflowOrAbove('normal', 'merged'); // false + * isWorkflowOrAbove('normal', 'daily'); // false + * isWorkflowOrAbove('daily', 'normal'); // true + * ``` + * + * @param current - The current workflow + * @param minimum - The minimum workflow + * @returns True if the current workflow is at least the minimum workflow, false otherwise + */ export function isWorkflowOrAbove(current: Workflow, minimum: Workflow): boolean { switch (current) { case 'normal': diff --git a/scripts/package.json b/scripts/package.json index ee08e8b7cf62..9ffa9aa632ec 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -22,7 +22,6 @@ "local-registry": "jiti ./run-registry.ts", "prepare-sandbox": "jiti ./prepare-sandbox.ts", "publish": "jiti ./sandbox/publish.ts", - "windows:unlink": "jiti ./ci/unlink-windows.ts", "release:cancel-preparation-runs": "jiti ./release/cancel-preparation-runs.ts", "release:generate-pr-description": "jiti ./release/generate-pr-description.ts", "release:get-changelog-from-file": "jiti ./release/get-changelog-from-file.ts", From 519c45b75ce3bd552a3cf612c28d63f389c1b000 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 21:07:22 +0100 Subject: [PATCH 230/310] remove warning from ts --- scripts/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 86f7042c66a5..c8082acb3897 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -2,6 +2,7 @@ "compileOnSave": false, "compilerOptions": { "baseUrl": ".", + "noEmit": true, "incremental": false, "noImplicitAny": true, "allowJs": true, From 2f28b4e0f8fbc604ac4e746ed548d53cf8328dbc Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 21:10:51 +0100 Subject: [PATCH 231/310] improve code simplicity --- .circleci/config.yml | 2 +- scripts/ci/generate.ts | 25 ------------------------- scripts/ci/{data.ts => main.ts} | 26 ++++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 28 deletions(-) delete mode 100644 scripts/ci/generate.ts rename scripts/ci/{data.ts => main.ts} (77%) diff --git a/.circleci/config.yml b/.circleci/config.yml index fff5ca5a59f9..4a7ca4089c94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,7 +44,7 @@ jobs: - run: name: Generate config command: | - yarn dlx jiti ./scripts/ci/generate.js --workflow=<< pipeline.parameters.workflow >> + yarn dlx jiti ./scripts/ci/main.ts --workflow=<< pipeline.parameters.workflow >> - continuation/continue: configuration_path: .circleci/config.generated.yml workflows: diff --git a/scripts/ci/generate.ts b/scripts/ci/generate.ts deleted file mode 100644 index 5feaca39ef74..000000000000 --- a/scripts/ci/generate.ts +++ /dev/null @@ -1,25 +0,0 @@ -import fs from 'node:fs/promises'; -import { join } from 'node:path'; - -import { program } from 'commander'; -import yml from 'yaml'; - -import generateConfig from './data'; - -console.log('Generating CircleCI config...'); -console.log('--------------------------------'); - -const dirname = import.meta.dirname; - -program - .description('Generate CircleCI config') - .requiredOption('-w, --workflow ', 'Workflow to generate config for') - .parse(process.argv); - -await fs.writeFile( - join(dirname, '../../.circleci/config.generated.yml'), - yml.stringify(generateConfig(program.opts().workflow), null, { - lineWidth: 1200, - indent: 4, - }) -); diff --git a/scripts/ci/data.ts b/scripts/ci/main.ts similarity index 77% rename from scripts/ci/data.ts rename to scripts/ci/main.ts index ca68d63fd084..19e0f4a60ba5 100644 --- a/scripts/ci/data.ts +++ b/scripts/ci/main.ts @@ -1,3 +1,9 @@ +import fs from 'node:fs/promises'; +import { join } from 'node:path'; + +import { program } from 'commander'; +import yml from 'yaml'; + import { benchmarkPackages, build_linux, @@ -22,9 +28,9 @@ import { parameters } from './utils/parameters'; import type { defineHub, defineJob } from './utils/types'; import { type JobImplementation, type Workflow, isWorkflowOrAbove } from './utils/types'; -export const dirname = import.meta.dirname; +const dirname = import.meta.dirname; -export default function generateConfig(workflow: Workflow) { +function generateConfig(workflow: Workflow) { const todos: (ReturnType | ReturnType)[] = []; if (isWorkflowOrAbove(workflow, 'docs')) { todos.push(prettyDocs); @@ -97,3 +103,19 @@ export default function generateConfig(workflow: Workflow) { }, }; } + +console.log('Generating CircleCI config...'); +console.log('--------------------------------'); + +program + .description('Generate CircleCI config') + .requiredOption('-w, --workflow ', 'Workflow to generate config for') + .parse(process.argv); + +await fs.writeFile( + join(dirname, '../../.circleci/config.generated.yml'), + yml.stringify(generateConfig(program.opts().workflow), null, { + lineWidth: 1200, + indent: 4, + }) +); From 5aba6bb48da548c3b9ec1f9e436cda3d9ff15304 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Dec 2025 21:57:30 +0100 Subject: [PATCH 232/310] remove use of magic strings --- scripts/ci/init-empty.ts | 6 +++--- scripts/ci/test-storybooks.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index a1c173025809..83626bb0a668 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -40,7 +40,7 @@ export const defineEmptyInitFlow = (template: string) => ], }, - ['init-empty'] + [initEmptyHub.id] ); export function defineEmptyInitFeatures() { return defineJob( @@ -82,7 +82,7 @@ export function defineEmptyInitFeatures() { }, ], }, - ['init-empty'] + [initEmptyHub.id] ); } export function defineEmptyInitWindows() { @@ -124,7 +124,7 @@ export function defineEmptyInitWindows() { }, ], }, - ['init-empty'] + [initEmptyHub.id] ); } diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index 163dbd903376..49af5b36ff03 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -74,7 +74,7 @@ export function definePortableStoryTest(directory: string) { }, ], }, - ['test-storybooks'] + [testStorybooksHub.id] ); } export function definePortableStoryTestPNP() { @@ -106,7 +106,7 @@ export function definePortableStoryTestPNP() { }, ], }, - ['test-storybooks'] + [testStorybooksHub.id] ); } export function definePortableStoryTestVitest3() { @@ -138,7 +138,7 @@ export function definePortableStoryTestVitest3() { }, ], }, - ['test-storybooks'] + [testStorybooksHub.id] ); } export const testStorybooksHub = defineHub('test-storybooks', ['build-linux']); From ef79eab9d9367fead82ffc62cf0d11e0b6a99333 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 09:57:09 +0100 Subject: [PATCH 233/310] white space --- scripts/ci/init-empty.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 83626bb0a668..c0dd7b652004 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -42,6 +42,7 @@ export const defineEmptyInitFlow = (template: string) => [initEmptyHub.id] ); + export function defineEmptyInitFeatures() { return defineJob( 'init-features', @@ -85,6 +86,7 @@ export function defineEmptyInitFeatures() { [initEmptyHub.id] ); } + export function defineEmptyInitWindows() { return defineJob( 'init-empty-windows', From 2ebf0cbc3dc922d35a8849fc556519a2b4b1e426 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 10:14:43 +0100 Subject: [PATCH 234/310] sort package.json --- package.json | 4 ++-- test-storybooks/ember-cli/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1006f0bab346..c3c5f85b7bf4 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "workspaces": { "packages": [ "code", - "code/core", "code/addons/*", + "code/builders/*", + "code/core", "code/frameworks/*", "code/lib/*", - "code/builders/*", "code/presets/*", "code/renderers/*", "scripts" diff --git a/test-storybooks/ember-cli/package.json b/test-storybooks/ember-cli/package.json index cff81fa1cfaa..97e2ab74a9f2 100644 --- a/test-storybooks/ember-cli/package.json +++ b/test-storybooks/ember-cli/package.json @@ -7,8 +7,8 @@ "build": "ember build --output-path ember-output", "dev": "ember serve", "storybook": "yarn build && storybook dev -p 9009", - "storybook:dev": "yarn dev & NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 9009", - "storybook-prebuild": "yarn build && shx cp -r public/* ember-output" + "storybook-prebuild": "yarn build && shx cp -r public/* ember-output", + "storybook:dev": "yarn dev & NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" storybook dev -p 9009" }, "resolutions": { "@storybook/addon-a11y": "file:../../code/addons/a11y", From 138c0c1b1f4acea6498fa057e2c6b91e0b6533bc Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 11:42:29 +0100 Subject: [PATCH 235/310] remove magic strings --- scripts/ci/init-empty.ts | 3 ++- scripts/ci/sandboxes.ts | 3 ++- scripts/ci/test-storybooks.ts | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index c0dd7b652004..0c8c091faaeb 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,3 +1,4 @@ +import { build_linux } from './code'; import { CACHE_KEYS, cache, git, restore, server, verdaccio, workspace } from './utils/helpers'; import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; @@ -130,7 +131,7 @@ export function defineEmptyInitWindows() { ); } -export const initEmptyHub = defineHub('init-empty', ['build-linux']); +export const initEmptyHub = defineHub('init-empty', [build_linux.id]); export function getInitEmpty(workflow: Workflow) { const initEmpty = ['react-vite-ts'].map(defineEmptyInitFlow); diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index f9784d1fd353..e649a4d2aec4 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -1,6 +1,7 @@ import { join } from 'path'; import * as sandboxTemplates from '../../code/lib/cli-storybook/src/sandbox-templates'; +import { build_linux } from './code'; import { ROOT_DIR, SANDBOX_DIR, WORKING_DIR } from './utils/constants'; import { CACHE_KEYS, @@ -469,7 +470,7 @@ export function defineWindowsSandboxBuild(sandbox: ReturnType { switch (workflow) { diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index 49af5b36ff03..8b5ea798c451 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -1,6 +1,7 @@ import { readFileSync } from 'fs'; import { join } from 'path/posix'; +import { build_linux } from './code'; import { CACHE_KEYS, artifact, cache, git, restore, workspace } from './utils/helpers'; import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; @@ -109,6 +110,7 @@ export function definePortableStoryTestPNP() { [testStorybooksHub.id] ); } + export function definePortableStoryTestVitest3() { return defineJob( 'test-storybooks-portable-vitest3', @@ -141,7 +143,9 @@ export function definePortableStoryTestVitest3() { [testStorybooksHub.id] ); } -export const testStorybooksHub = defineHub('test-storybooks', ['build-linux']); + +export const testStorybooksHub = defineHub('test-storybooks', [build_linux.id]); + export function getTestStorybooks(workflow: Workflow) { const testStorybooks = ['react', 'vue3'].map(definePortableStoryTest); From f4c23e7381c72829fbb47b390a3046b95383429d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 12:09:48 +0100 Subject: [PATCH 236/310] fix unsynced ids --- scripts/ci/sandboxes.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index e649a4d2aec4..d6b600d627bd 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -138,15 +138,7 @@ export function defineSandboxFlow(key: Key) { vitest: `${name} (vitest)`, testRunner: `${name} (test-runner)`, }; - const ids = { - create: `${id}-create`, - build: `${id}-build`, - dev: `${id}-dev`, - e2e: `${id}-e2e`, - chromatic: `${id}-chromatic`, - vitest: `${id}-vitest`, - testRunner: `${id}-test-runner`, - }; + const ids = Object.fromEntries(Object.entries(names).map(([key, value]) => [key, toId(value)])); const jobs = [ defineJob( From c720c31a08e17a62679d170e1cf1afa4005234ed Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 12:24:16 +0100 Subject: [PATCH 237/310] refactor CI config to use dynamic workflow names --- scripts/ci/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 19e0f4a60ba5..91eb9fff8503 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -95,7 +95,7 @@ function generateConfig(workflow: Workflow) { {} as Record ), workflows: { - generated: { + [workflow]: { jobs: sorted.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires } } : t.id ), From 15057d2cfd9008327af1817fa41b4a0940d92a15 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 12:24:56 +0100 Subject: [PATCH 238/310] update CI config to append '-generated' suffix to workflow names --- scripts/ci/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 91eb9fff8503..81602b761703 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -95,7 +95,7 @@ function generateConfig(workflow: Workflow) { {} as Record ), workflows: { - [workflow]: { + [`${workflow}-generated`]: { jobs: sorted.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires } } : t.id ), From 86846843763b446267d38fe5e5e44cd3f39424be Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 13:45:30 +0100 Subject: [PATCH 239/310] refactor CI scripts to streamline job definitions and remove unnecessary imports --- scripts/ci/code.ts | 11 +++++++++++ scripts/ci/init-empty.ts | 6 ++---- scripts/ci/sandboxes.ts | 4 +--- scripts/ci/test-storybooks.ts | 7 +++---- scripts/ci/utils/types.ts | 13 +++++++++++++ 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index 5fda25993a75..54a9de9036b3 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -63,6 +63,7 @@ export const build_linux = defineJob('Build (linux)', { ]), ], }); + export const prettyDocs = defineJob('Prettify docs', { executor: { name: 'sb_node_22_classic', @@ -80,6 +81,7 @@ export const prettyDocs = defineJob('Prettify docs', { }, ], }); + export const build_windows = defineJob('Build (windows)', { executor: { name: 'win/default', @@ -122,7 +124,9 @@ export const build_windows = defineJob('Build (windows)', { ), ], }); + export const codeHub = defineHub('code', [build_linux.id]); + export const storybookChromatic = defineJob( 'Local storybook & chromatic', { @@ -150,6 +154,7 @@ export const storybookChromatic = defineJob( }, [codeHub.id] ); + export const check = defineJob( 'TypeScript validation', { @@ -179,6 +184,7 @@ export const check = defineJob( }, [codeHub.id] ); + export const lint = defineJob( 'EsLint & Prettier validation', { @@ -206,6 +212,7 @@ export const lint = defineJob( }, [codeHub.id] ); + export const knip = defineJob( 'Knip validation', { @@ -226,6 +233,7 @@ export const knip = defineJob( }, [codeHub.id] ); + export const testsUnit_linux = defineJob( 'Tests (linux)', { @@ -252,6 +260,7 @@ export const testsUnit_linux = defineJob( }, [codeHub.id] ); + export const testsStories_linux = defineJob( 'Tests stories (linux)', { @@ -278,6 +287,7 @@ export const testsStories_linux = defineJob( }, [codeHub.id] ); + export const testUnit_windows = defineJob( 'Tests unit (windows)', { @@ -305,6 +315,7 @@ export const testUnit_windows = defineJob( }, [build_windows.id] ); + export const benchmarkPackages = defineJob( 'Benchmark packages', { diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 0c8c091faaeb..6ea5746afd5d 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,5 +1,5 @@ import { build_linux } from './code'; -import { CACHE_KEYS, cache, git, restore, server, verdaccio, workspace } from './utils/helpers'; +import { restore, server, verdaccio } from './utils/helpers'; import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; export const defineEmptyInitFlow = (template: string) => @@ -53,9 +53,7 @@ export function defineEmptyInitFeatures() { class: 'medium', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), verdaccio.start(), server.wait([...verdaccio.ports]), { diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index d6b600d627bd..6ce919db4832 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -317,9 +317,7 @@ export function defineSandboxFlow(key: Key) { class: 'medium', }, steps: [ - 'checkout', - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Running test-runner', diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index 8b5ea798c451..2f882c998a97 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -2,7 +2,7 @@ import { readFileSync } from 'fs'; import { join } from 'path/posix'; import { build_linux } from './code'; -import { CACHE_KEYS, artifact, cache, git, restore, workspace } from './utils/helpers'; +import { artifact, restore } from './utils/helpers'; import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; export function definePortableStoryTest(directory: string) { @@ -20,9 +20,7 @@ export function definePortableStoryTest(directory: string) { class: 'medium', }, steps: [ - git.checkout(), - workspace.attach(), - cache.attach(CACHE_KEYS()), + ...restore.linux(), { run: { name: 'Install dependencies', @@ -78,6 +76,7 @@ export function definePortableStoryTest(directory: string) { [testStorybooksHub.id] ); } + export function definePortableStoryTestPNP() { return defineJob( 'test-storybooks-pnp', diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index b63db50678f4..3f788de57ffb 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -17,6 +17,16 @@ export type JobImplementation = { parallelism?: number; }; +/** + * This function ensures the jobs adhere to the expected interface and that the job's ID is valid. + * (i.e. no special characters, no spaces, etc.) Thus the ID can be referenced by other jobs in the + * `requires` field. + * + * @param name - The name of the job + * @param implementation - The implementation of the job + * @param requires - The jobs that this job depends on + * @returns The job's id, name, implementation, requires + */ export function defineJob( name: K, implementation: I, @@ -36,6 +46,9 @@ export function defineJob( /** * A hub is a special type of job that is used to group other jobs together. It cannot contain any * steps/implementation. + * + * @param name - The name of the hub + * @param requires - The jobs that this hub depends on */ export function defineHub(name: string, requires = [] as string[]) { return { From 67e779442e42583cca041d21e6feec7f3a25f3dd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 14:49:21 +0100 Subject: [PATCH 240/310] cleanup & remove commands, which served little use, due to dynamic generation it's another layer of abstraction, and blocks finding usages, the preferred method of creating re-usable chucks on config is using helpers.ts --- scripts/ci/code.ts | 32 ++++++++++---------- scripts/ci/init-empty.ts | 8 ++--- scripts/ci/main.ts | 2 -- scripts/ci/sandboxes.ts | 20 ++++++------- scripts/ci/test-storybooks.ts | 8 ++--- scripts/ci/utils/commands.ts | 56 ----------------------------------- scripts/ci/utils/helpers.ts | 44 ++++++++++++++++++++------- scripts/ci/utils/orbs.ts | 21 ++++++++++++- 8 files changed, 87 insertions(+), 104 deletions(-) delete mode 100644 scripts/ci/utils/commands.ts diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index 54a9de9036b3..21b00622dde8 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -11,10 +11,10 @@ import { git, node, npm, - restore, server, testResults, verdaccio, + workflow, workspace, } from './utils/helpers'; import { defineHub, defineJob } from './utils/types'; @@ -46,7 +46,7 @@ export const build_linux = defineJob('Build (linux)', { working_directory: `code`, }, }, - 'report-workflow-on-failure', + ...workflow.report_on_failure(), artifact.persist(`code/bench/esbuild-metafiles`, 'bench'), workspace.persist([ ...glob @@ -135,7 +135,7 @@ export const storybookChromatic = defineJob( class: 'medium+', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Build internal storybook', @@ -163,7 +163,7 @@ export const check = defineJob( class: 'xlarge', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'TypeCheck code', @@ -178,8 +178,8 @@ export const check = defineJob( command: 'yarn check', }, }, - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', + ...workflow.report_on_failure(), + ...workflow.cancel_on_failure(), ], }, [codeHub.id] @@ -193,7 +193,7 @@ export const lint = defineJob( class: 'xlarge', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Lint code', @@ -221,7 +221,7 @@ export const knip = defineJob( class: 'xlarge', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Run Knip', @@ -242,7 +242,7 @@ export const testsUnit_linux = defineJob( class: 'xlarge', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Run tests', @@ -254,8 +254,8 @@ export const testsUnit_linux = defineJob( testResults.persist(`test-results`), git.check(), - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', + ...workflow.report_on_failure(), + ...workflow.cancel_on_failure(), ], }, [codeHub.id] @@ -269,7 +269,7 @@ export const testsStories_linux = defineJob( class: 'xlarge', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Run stories tests', @@ -281,8 +281,8 @@ export const testsStories_linux = defineJob( testResults.persist(`test-results`), git.check(), - 'report-workflow-on-failure', - 'cancel-workflow-on-failure', + ...workflow.report_on_failure(), + ...workflow.cancel_on_failure(), ], }, [codeHub.id] @@ -297,7 +297,7 @@ export const testUnit_windows = defineJob( shell: 'bash.exe', }, steps: [ - ...restore.windows('C:\\Users\\circleci\\project'), + ...workflow.restore_windows('C:\\Users\\circleci\\project'), { run: { command: 'yarn install', @@ -324,7 +324,7 @@ export const benchmarkPackages = defineJob( class: 'xlarge', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), verdaccio.start(), server.wait([...verdaccio.ports]), { diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 6ea5746afd5d..26a94041404b 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,5 +1,5 @@ import { build_linux } from './code'; -import { restore, server, verdaccio } from './utils/helpers'; +import { workflow, server, verdaccio } from './utils/helpers'; import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; export const defineEmptyInitFlow = (template: string) => @@ -11,7 +11,7 @@ export const defineEmptyInitFlow = (template: string) => class: 'medium', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -53,7 +53,7 @@ export function defineEmptyInitFeatures() { class: 'medium', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -96,7 +96,7 @@ export function defineEmptyInitWindows() { shell: 'bash.exe', }, steps: [ - ...restore.windows(), + ...workflow.restore_windows(), verdaccio.start(), server.wait([...verdaccio.ports]), { diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 81602b761703..66fd89b4a29d 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -21,7 +21,6 @@ import { import { getInitEmpty, initEmptyHub } from './init-empty'; import { getSandboxes, sandboxesHub } from './sandboxes'; import { getTestStorybooks, testStorybooksHub } from './test-storybooks'; -import { commands } from './utils/commands'; import { executors } from './utils/executors'; import { orbs } from './utils/orbs'; import { parameters } from './utils/parameters'; @@ -83,7 +82,6 @@ function generateConfig(workflow: Workflow) { return { version: 2.1, orbs, - commands, executors, parameters, diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 6ce919db4832..6258038d2a84 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -7,7 +7,7 @@ import { CACHE_KEYS, artifact, cache, - restore, + workflow, server, toId, verdaccio, @@ -37,7 +37,7 @@ function defineSandboxJob_build({ { executor, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Build storybook', @@ -80,7 +80,7 @@ function defineSandboxJob_dev({ { executor, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), ...(options.e2e ? [ { @@ -149,7 +149,7 @@ export function defineSandboxFlow(key: Key) { class: 'large', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), verdaccio.start(), { run: { @@ -253,7 +253,7 @@ export function defineSandboxFlow(key: Key) { class: 'medium', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Running Vitest', @@ -275,7 +275,7 @@ export function defineSandboxFlow(key: Key) { class: 'xlarge', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Serve storybook', @@ -317,7 +317,7 @@ export function defineSandboxFlow(key: Key) { class: 'medium', }, steps: [ - ...restore.linux(), + ...workflow.restore_linux(), { run: { name: 'Running test-runner', @@ -346,7 +346,7 @@ export function defineSandboxTestRunner(sandbox: ReturnType> << parameters.template >>)', - only_for_branches: 'main,next,next-release,latest-release', - }, - }, - ], - }, - 'start-event-collector': { - description: 'Starts the event collector', - steps: [ - { - run: { - background: true, - command: 'yarn jiti ./event-log-collector.ts', - name: 'Start Event Collector', - working_directory: 'scripts', - }, - }, - ], - }, -}; diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index dcf88e92297c..68666a6ea5eb 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -74,14 +74,6 @@ export const git = { }, }; }, - unshallow: () => { - return { - run: { - command: 'git fetch --unshallow', - when: 'on_fail', - }, - }; - }, }; export const node = { @@ -174,14 +166,14 @@ export const verdaccio = { ports: ['6001', '6002'], }; -export const restore = { - linux: () => [ +export const workflow = { + restore_linux: () => [ // git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS()), ], - windows: (at = 'C:\\Users\\circleci') => [ + restore_windows: (at = 'C:\\Users\\circleci') => [ git.checkout({ forceHttps: true }), node.installOnWindows(), workspace.attach(at), @@ -199,6 +191,36 @@ export const restore = { }, }, ], + cancel_on_failure: () => { + return [ + { + run: { + name: 'Cancel current workflow', + when: 'on_fail', + command: + 'curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"', + }, + }, + ]; + }, + report_on_failure: () => { + return [ + { + run: { + name: 'Un-shallow git', + when: 'on_fail', + command: 'git fetch --unshallow', + }, + }, + { + run: { + name: 'Report failure', + when: 'on_fail', + command: 'echo "Workflow failed"', + }, + }, + ]; + }, }; export const CACHE_KEYS = (platform = 'linux') => diff --git a/scripts/ci/utils/orbs.ts b/scripts/ci/utils/orbs.ts index f190be482bee..9c6306a6ddc7 100644 --- a/scripts/ci/utils/orbs.ts +++ b/scripts/ci/utils/orbs.ts @@ -1,10 +1,29 @@ -/** @see https://circleci.com/developer/orbs */ +/** + * This is the list of orbs that are used in the CI config. + * + * These should be regularly updated to the latest version. + * + * @see https://circleci.com/developer/orbs + */ export const orbs = { + // https://circleci.com/developer/orbs/orb/circleci/browser-tools 'browser-tools': 'circleci/browser-tools@2.3.2', + + // https://circleci.com/developer/orbs/orb/codecov/codecov codecov: 'codecov/codecov@5.4.3', + + // https://circleci.com/developer/orbs/orb/antonioned/discord discord: 'antonioned/discord@0.1.0', + + // https://circleci.com/developer/orbs/orb/guitarrapc/git-shallow-clone 'git-shallow-clone': 'guitarrapc/git-shallow-clone@2.8.0', + + // https://circleci.com/developer/orbs/orb/circleci/node node: 'circleci/node@7.2.1', + + // https://circleci.com/developer/orbs/orb/nrwl/nx nx: 'nrwl/nx@1.7.0', + + // https://circleci.com/developer/orbs/orb/circleci/windows win: 'circleci/windows@5.1.1', }; From ee41dd4fcf8a345e442b54885e760a8ac576ed78 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Dec 2025 14:52:31 +0100 Subject: [PATCH 241/310] add comment --- scripts/ci/utils/constants.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/ci/utils/constants.ts b/scripts/ci/utils/constants.ts index db5fd0fcbb88..53e2813aabb3 100644 --- a/scripts/ci/utils/constants.ts +++ b/scripts/ci/utils/constants.ts @@ -1,4 +1,18 @@ -/** This is the root directory for Linux CI jobs. Windows CI jobs use a different root directory! */ +/** + * This is the root directory for Linux CI jobs. + * + * Windows CI jobs use a different root directory! + * + * @example /tmp/project/code + * + * @example C:\Users\circleci\project\code + * + * @example /tmp/storybook-sandboxes + * + * @example C:\Users\circleci\storybook-sandboxes + * + * To ensure the correct paths are used across config generation, we use the following constants. + */ export const ROOT_DIR = '/tmp'; export const WORKING_DIR = `project`; export const SANDBOX_DIR = `storybook-sandboxes`; From 3f9a805c154a716bc494d9c83a4c91bb6870e54e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Dec 2025 15:14:10 +0100 Subject: [PATCH 242/310] Discard changes to scripts/tasks/sandbox-parts.ts --- scripts/tasks/sandbox-parts.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 11fd6885c7c8..b4e22ef1e988 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -116,7 +116,6 @@ export const create: Task['run'] = async ({ key, template, sandboxDir }, { dryRu } await cp(srcDir, sandboxDir, { recursive: true }); } else { - console.log({ key, sandboxDir, parentDir, dryRun, debug }); await executeCLIStep(steps.repro, { argument: key, optionValues: { output: sandboxDir, init: false, debug, loglevel: 'debug' }, From 72573c3be7f903a4faf55032d14f72ed6d1004f3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Dec 2025 15:14:20 +0100 Subject: [PATCH 243/310] Discard changes to scripts/utils/cli-step.ts --- scripts/utils/cli-step.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/utils/cli-step.ts b/scripts/utils/cli-step.ts index 608b866d14c7..bee4a7a89c80 100644 --- a/scripts/utils/cli-step.ts +++ b/scripts/utils/cli-step.ts @@ -21,7 +21,7 @@ export type CLIStep = { export const steps = { repro: { - command: 'sandbox', + command: 'repro', description: 'Bootstrapping Template', icon: '👷', hasArgument: true, @@ -123,8 +123,6 @@ export async function executeCLIStep( options.optionValues || {} ); - console.log({ command, options }); - await exec( command, { From 99d4d5db67a851e25177b46dd763228f5a0069d8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Dec 2025 15:14:42 +0100 Subject: [PATCH 244/310] Discard changes to scripts/utils/cli-step.ts From 5c4776ce78c805b8f4aa24a4ab0a007d1fac4482 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Dec 2025 16:00:05 +0100 Subject: [PATCH 245/310] Refactor import order in init-empty.ts for consistency --- scripts/ci/init-empty.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 26a94041404b..6c758265b715 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,5 +1,5 @@ import { build_linux } from './code'; -import { workflow, server, verdaccio } from './utils/helpers'; +import { server, verdaccio, workflow } from './utils/helpers'; import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; export const defineEmptyInitFlow = (template: string) => From 016fed4173267698893df495f6c6cb08b164b988 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Dec 2025 16:15:52 +0100 Subject: [PATCH 246/310] Reorder imports in sandboxes.ts for improved clarity --- scripts/ci/sandboxes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 6258038d2a84..4be15a582ece 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -7,10 +7,10 @@ import { CACHE_KEYS, artifact, cache, - workflow, server, toId, verdaccio, + workflow, workspace, } from './utils/helpers'; import { defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; From 5e830ef5d86bd6f96c95f3150d3dead0e75cec92 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 29 Dec 2025 13:33:46 +0100 Subject: [PATCH 247/310] remove get-template code --- .../cli-storybook/src/sandbox-templates.ts | 14 +- code/lib/cli-storybook/src/sandbox.ts | 4 +- scripts/get-template.ts | 327 ------------------ scripts/package.json | 1 - scripts/tasks/dev.ts | 4 +- scripts/tasks/serve.ts | 4 +- scripts/utils/yarn.ts | 6 +- 7 files changed, 18 insertions(+), 342 deletions(-) delete mode 100644 scripts/get-template.ts diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index 3f86790f8dc0..ffb55e4b4700 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -18,6 +18,7 @@ export type TemplateKey = | keyof typeof baseTemplates | keyof typeof internalTemplates | keyof typeof benchTemplates; + export type Cadence = keyof typeof templatesByCadence; // Some properties e.g. experimentalTestSyntax are only available in framework specific types for StorybookConfig, therefore we loosen the type here otherwise it would always fail @@ -27,7 +28,7 @@ type LoosenedStorybookConfig = Omit, 'features'> & { | undefined; }; -export type Template = { +export type AbstractTemplate = { /** * Readable name for the template, which will be used for feedback and the status page Follows the * naming scheme when it makes sense: <"v"version|"Latest"|"Prerelease"> @@ -105,7 +106,7 @@ export type Template = { isInternal?: boolean; }; -type BaseTemplates = Template & { +type BaseTemplates = AbstractTemplate & { name: `${string} ${`v${number}` | 'Latest' | 'Prerelease'} (${'Webpack' | 'Vite' | 'RsBuild'} | ${ | 'JavaScript' | 'TypeScript'})`; @@ -880,7 +881,7 @@ const internalTemplates = { type: ProjectType.SERVER, }, }, -} satisfies Record<`internal/${string}`, Template & { isInternal: true }>; +} satisfies Record<`internal/${string}`, AbstractTemplate & { isInternal: true }>; const benchTemplates = { 'bench/react-vite-default-ts': { @@ -972,9 +973,9 @@ const benchTemplates = { 'vitest-integration', ], }, -} satisfies Record; +} satisfies Record; -export const allTemplates: Record = { +export const allTemplates: Record = { ...baseTemplates, ...internalTemplates, ...benchTemplates, @@ -1039,3 +1040,6 @@ export const daily: TemplateKey[] = [ ]; export const templatesByCadence = { normal, merged, daily }; +export type TemplateType = Pick; +export type AllTemplatesKey = keyof typeof allTemplates; +export type AllTemplatesType = Record; diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index 5bfcc854048f..c296072c4cc8 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -18,7 +18,7 @@ import { lt, prerelease } from 'semver'; import invariant from 'tiny-invariant'; import { dedent } from 'ts-dedent'; -import type { Template, TemplateKey } from './sandbox-templates'; +import type { AbstractTemplate, TemplateKey } from './sandbox-templates'; import { allTemplates as TEMPLATES } from './sandbox-templates'; interface SandboxOptions { @@ -39,7 +39,7 @@ export const sandbox = async ({ ...options }: SandboxOptions) => { // Either get a direct match when users pass a template id, or filter through all templates - let selectedConfig: Template | undefined = TEMPLATES[filterValue as TemplateKey]; + let selectedConfig: AbstractTemplate | undefined = TEMPLATES[filterValue as TemplateKey]; let templateId: Choice | null = selectedConfig ? (filterValue as TemplateKey) : null; const { packageManager: pkgMgr } = options; diff --git a/scripts/get-template.ts b/scripts/get-template.ts deleted file mode 100644 index f8dd1aa1cdcf..000000000000 --- a/scripts/get-template.ts +++ /dev/null @@ -1,327 +0,0 @@ -import { readFile, writeFile } from 'node:fs/promises'; - -import { program } from 'commander'; -import picocolors from 'picocolors'; -import { dedent } from 'ts-dedent'; -import yaml from 'yaml'; - -import { - type Cadence, - type SkippableTask, - type Template as TTemplate, - allTemplates, - templatesByCadence, -} from '../code/lib/cli-storybook/src/sandbox-templates'; -import { esMain } from './utils/esmain'; - -type Template = Pick; -export type TemplateKey = keyof typeof allTemplates; -export type Templates = Record; - -function isTaskSkipped(template: Template, script: string): boolean { - return ( - template.inDevelopment !== true && - !template.skipTasks?.includes(script as SkippableTask) && - (script !== 'check-sandbox' || template.typeCheck) - ); -} - -export async function getTemplate( - cadence: Cadence, - scriptName: string, - { index, total }: { index: number; total: number } -) { - const cadenceTemplates = Object.entries(allTemplates).filter(([key]) => - templatesByCadence[cadence].includes(key as TemplateKey) - ); - - const potentialTemplateKeys = (cadenceTemplates.map(([k]) => k) as TemplateKey[]).filter((t) => { - const currentTemplate = allTemplates[t] as Template; - return isTaskSkipped(currentTemplate, scriptName); - }); - - if (potentialTemplateKeys.length !== total) { - throw new Error(dedent`Circle parallelism set incorrectly. - - Parallelism is set to ${total}, but there are ${ - potentialTemplateKeys.length - } templates to run for the "${scriptName}" task: - ${potentialTemplateKeys.map((v) => `- ${v}`).join('\n')} - - ${await checkParallelism(cadence)} - `); - } - - return potentialTemplateKeys[index]; -} - -const tasksMap = { - sandbox: 'create-sandboxes', - build: 'build-sandboxes', - 'check-sandbox': 'check-sandboxes', - chromatic: 'chromatic-sandboxes', - 'e2e-tests': 'e2e-production', - 'e2e-tests-dev': 'e2e-dev', - 'test-runner': 'test-runner-production', - // 'test-runner-dev', TODO: bring this back when the task is enabled again - bench: 'bench', - 'vitest-integration': 'vitest-integration', -} as const; - -type TaskKey = keyof typeof tasksMap; - -const tasks = Object.keys(tasksMap) as TaskKey[]; - -const CONFIG_YML_FILE = '../.circleci/config.yml'; -const WORKFLOWS_DIR = '../.circleci/src/workflows'; - -async function checkParallelism(cadence?: Cadence, scriptName?: TaskKey, fix: boolean = false) { - const configYml = await readFile(CONFIG_YML_FILE, 'utf-8'); - const data = yaml.parse(configYml); - - let potentialTemplateKeys: TemplateKey[] = []; - const cadences = cadence ? [cadence] : (Object.keys(templatesByCadence) as Cadence[]); - const scripts = scriptName ? [scriptName] : tasks; - const summary = []; - let isIncorrect = false; - const fixes: Array<{ - cadence: string; - job: string; - oldParallelism: number; - newParallelism: number; - }> = []; - - cadences.forEach((cad) => { - summary.push(`\n${picocolors.bold(cad)}`); - const cadenceTemplates = Object.entries(allTemplates).filter(([key]) => - templatesByCadence[cad].includes(key as TemplateKey) - ); - potentialTemplateKeys = cadenceTemplates.map(([k]) => k) as TemplateKey[]; - - scripts.forEach((script) => { - const templateKeysPerScript = potentialTemplateKeys.filter((t) => { - const currentTemplate = allTemplates[t] as Template; - - return isTaskSkipped(currentTemplate, script); - }); - const workflowJobsRaw: (string | { [key: string]: any })[] = data.workflows[cad].jobs; - const workflowJobs = workflowJobsRaw - .filter((item) => typeof item === 'object' && item !== null) - .reduce((result, item) => Object.assign(result, item), {}) as Record; - - if (templateKeysPerScript.length > 0 && workflowJobs[tasksMap[script]]) { - const currentParallelism = workflowJobs[tasksMap[script]].parallelism || 2; - const newParallelism = templateKeysPerScript.length; - - if (newParallelism !== currentParallelism) { - summary.push( - `-- ❌ ${tasksMap[script]} - parallelism: ${currentParallelism} ${picocolors.bgRed( - `(should be ${newParallelism})` - )}` - ); - fixes.push({ - cadence: cad, - job: tasksMap[script], - oldParallelism: currentParallelism, - newParallelism, - }); - isIncorrect = true; - } else { - summary.push( - `-- ✅ ${tasksMap[script]} - parallelism: ${templateKeysPerScript.length}${ - templateKeysPerScript.length === 2 ? ' (default)' : '' - }` - ); - } - } else { - summary.push(`-- ${script} - this script is fully skipped for this cadence.`); - } - }); - }); - - if (isIncorrect) { - if (fix) { - // Apply fixes to individual workflow files - const fixesByFile: Record< - string, - Array<{ job: string; oldParallelism: number; newParallelism: number }> - > = {}; - - // Group fixes by workflow file - fixes.forEach(({ cadence: fixCadence, job, oldParallelism, newParallelism }) => { - const workflowFile = `${fixCadence}.yml`; - if (!fixesByFile[workflowFile]) { - fixesByFile[workflowFile] = []; - } - fixesByFile[workflowFile].push({ job, oldParallelism, newParallelism }); - }); - - // Apply fixes to each workflow file - for (const [workflowFile, fileFixes] of Object.entries(fixesByFile)) { - const workflowPath = `${WORKFLOWS_DIR}/${workflowFile}`; - let workflowContent = await readFile(workflowPath, 'utf-8'); - - // Apply fixes using string manipulation to preserve comments and formatting - fileFixes.forEach(({ job, newParallelism }) => { - // Find the job definition in the YAML content - const jobRegex = new RegExp(`^\\s*-\\s+${job}:\\s*$`, 'm'); - const jobMatch = workflowContent.match(jobRegex); - - if (jobMatch) { - const jobStartIndex = jobMatch.index!; - const jobStartLine = workflowContent.substring(0, jobStartIndex).split('\n').length - 1; - const lines = workflowContent.split('\n'); - - // Find the parallelism line for this job - let parallelismLineIndex = -1; - let indentLevel = 0; - - for (let i = jobStartLine + 1; i < lines.length; i++) { - const line = lines[i]; - const trimmedLine = line.trim(); - - // If we hit another job or top-level key, stop looking - if ( - trimmedLine.startsWith('- ') || - (trimmedLine && !line.startsWith(' ') && !trimmedLine.startsWith('#')) - ) { - break; - } - - // Track indentation level - if (trimmedLine && !trimmedLine.startsWith('#')) { - const currentIndent = line.length - line.trimStart().length; - if (indentLevel === 0) { - indentLevel = currentIndent; - } - } - - // Look for parallelism line - if (trimmedLine.startsWith('parallelism:')) { - parallelismLineIndex = i; - break; - } - } - - if (parallelismLineIndex !== -1) { - // Update existing parallelism line - const indent = lines[parallelismLineIndex].match(/^(\s*)/)?.[1] || ''; - lines[parallelismLineIndex] = `${indent}parallelism: ${newParallelism}`; - } else { - // Add parallelism line after the job name - const indent = lines[jobStartLine].match(/^(\s*)/)?.[1] || ''; - const jobIndent = indent + ' '; - lines.splice(jobStartLine + 1, 0, `${jobIndent}parallelism: ${newParallelism}`); - } - - workflowContent = lines.join('\n'); - } - }); - - // Write the updated workflow file back with preserved comments and formatting - await writeFile(workflowPath, workflowContent, 'utf-8'); - } - - summary.unshift( - `🔧 ${picocolors.green('Fixed')} parallelism counts for ${fixes.length} job${fixes.length === 1 ? '' : 's'} in workflow files:` - ); - summary.push(''); - summary.push('✅ The parallelism of the following jobs was fixed:'); - fixes.forEach(({ job, oldParallelism, newParallelism, cadence }) => { - summary.push(` - ${cadence}/${job}: ${oldParallelism} → ${newParallelism}`); - }); - summary.push(''); - summary.push( - `${picocolors.yellow('⚠️ Important:')} You must regenerate the main config file by running:` - ); - summary.push(''); - summary.push( - `${picocolors.cyan(' circleci config pack .circleci/src > .circleci/config.yml')}` - ); - summary.push(`${picocolors.cyan(' circleci config validate .circleci/config.yml')}`); - summary.push(''); - summary.push( - `${picocolors.gray('See .circleci/README.md for more details about the packing process.')}` - ); - console.log(summary.concat('\n').join('\n')); - } else { - summary.unshift( - 'The parallelism count is incorrect for some jobs in .circleci/config.yml, you have to update them:' - ); - summary.push(''); - summary.push( - `${picocolors.yellow('💡 Tip:')} Use the ${picocolors.cyan('--fix')} flag to automatically fix these issues.` - ); - summary.push(''); - summary.push( - `${picocolors.gray('Note: The fix will update the workflow files in .circleci/src/workflows/ and you will need to regenerate the main config.yml file. See .circleci/README.md for details.')}` - ); - throw new Error(summary.concat('\n').join('\n')); - } - } else { - summary.unshift('✅ The parallelism count is correct for all jobs in .circleci/config.yml:'); - console.log(summary.concat('\n').join('\n')); - } - - const inDevelopmentTemplates = Object.entries(allTemplates) - .filter(([, t]) => t.inDevelopment) - .map(([k]) => k); - - if (inDevelopmentTemplates.length > 0) { - console.log( - `👇 Some templates were skipped as they are flagged to be in development. Please review if they should still contain this flag:\n${inDevelopmentTemplates - .map((k) => `- ${k}`) - .join('\n')}` - ); - } -} - -type RunOptions = { - cadence?: Cadence; - task?: TaskKey; - check: boolean; - fix: boolean; -}; -async function run({ cadence, task, check, fix }: RunOptions) { - if (check || fix) { - if (task && !tasks.includes(task)) { - throw new Error( - dedent`The "${task}" task you provided is not valid. Valid tasks (found in .circleci/config.yml) are: - ${tasks.map((v) => `- ${v}`).join('\n')}` - ); - } - await checkParallelism(cadence as Cadence, task, fix); - return; - } - - if (!cadence) { - throw new Error('Need to supply cadence to get template script'); - } - - const { CIRCLE_NODE_INDEX = 0, CIRCLE_NODE_TOTAL = 1 } = process.env; - console.log( - await getTemplate(cadence as Cadence, task, { - // Convert to integer - index: +CIRCLE_NODE_INDEX, - total: +CIRCLE_NODE_TOTAL, - }) - ); -} - -if (esMain(import.meta.url)) { - program - .description('Retrieve the template to run for a given cadence and task') - .option('--cadence ', 'Which cadence you want to run the script for') - .option('--task ', 'Which task you want to run the script for') - .option('--check', 'Throws an error when the parallelism counts for tasks are incorrect', false) - .option('--fix', 'Automatically fix parallelism counts in workflow files', false); - - program.parse(process.argv); - - const options = program.opts() as RunOptions; - - run(options).catch((err) => { - console.error(err); - process.exit(1); - }); -} diff --git a/scripts/package.json b/scripts/package.json index d8bfcb34fddf..79b3a1f2ca54 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -14,7 +14,6 @@ "generate-sandboxes": "jiti ./sandbox/generate.ts", "get-report-message": "jiti ./get-report-message.ts", "get-sandbox-dir": "jiti ./get-sandbox-dir.ts", - "get-template": "jiti ./get-template.ts", "lint": "yarn lint:js", "lint:js": "yarn lint:js:cmd . --quiet", "lint:js:cmd": "cross-env NODE_ENV=production eslint --cache --cache-location=../.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives", diff --git a/scripts/tasks/dev.ts b/scripts/tasks/dev.ts index f070d147fe51..71c0bc8f6a0c 100644 --- a/scripts/tasks/dev.ts +++ b/scripts/tasks/dev.ts @@ -1,8 +1,8 @@ import detectFreePort from 'detect-port'; import waitOn from 'wait-on'; +import type { AllTemplatesKey } from '../../code/lib/cli-storybook/src/sandbox-templates'; import { now, saveBench } from '../bench/utils'; -import type { TemplateKey } from '../get-template'; import { getPort } from '../sandbox/utils/getPort'; import type { Task } from '../task'; import { exec } from '../utils/exec'; @@ -11,7 +11,7 @@ export const PORT = process.env.STORYBOOK_SERVE_PORT ? parseInt(process.env.STORYBOOK_SERVE_PORT, 10) : 6006; -function getDevPort(key: TemplateKey) { +function getDevPort(key: AllTemplatesKey) { return process.env.NX_CLI_SET === 'true' ? getPort({ selectedTask: 'dev', key }) : PORT; } diff --git a/scripts/tasks/serve.ts b/scripts/tasks/serve.ts index c70ded8a4a48..05e80006d620 100644 --- a/scripts/tasks/serve.ts +++ b/scripts/tasks/serve.ts @@ -1,7 +1,7 @@ import detectFreePort from 'detect-port'; import waitOn from 'wait-on'; -import type { TemplateKey } from '../get-template'; +import type { AllTemplatesKey } from '../../code/lib/cli-storybook/src/sandbox-templates'; import { getPort } from '../sandbox/utils/getPort'; import { type Task } from '../task'; import { ROOT_DIRECTORY } from '../utils/constants'; @@ -11,7 +11,7 @@ export const PORT = process.env.STORYBOOK_SERVE_PORT ? parseInt(process.env.STORYBOOK_SERVE_PORT, 10) : 8001; -function getServePort(key: TemplateKey) { +function getServePort(key: AllTemplatesKey) { return process.env.NX_CLI_SET === 'true' ? getPort({ selectedTask: 'serve', key }) : PORT; } diff --git a/scripts/utils/yarn.ts b/scripts/utils/yarn.ts index 9e7237713a08..16015b518f81 100644 --- a/scripts/utils/yarn.ts +++ b/scripts/utils/yarn.ts @@ -3,7 +3,7 @@ import { join } from 'node:path'; // TODO -- should we generate this file a second time outside of CLI? import storybookVersions from '../../code/core/src/common/versions'; -import type { TemplateKey } from '../get-template'; +import type { AllTemplatesKey } from '../../code/lib/cli-storybook/src/sandbox-templates'; import { exec } from './exec'; export type YarnOptions = { @@ -84,7 +84,7 @@ export const addWorkaroundResolutions = async ({ cwd, dryRun, key, -}: YarnOptions & { key?: TemplateKey }) => { +}: YarnOptions & { key?: AllTemplatesKey }) => { logger.info(`🔢 Adding resolutions for workarounds`); if (dryRun) { @@ -131,7 +131,7 @@ export const configureYarn2ForVerdaccio = async ({ dryRun, debug, key, -}: YarnOptions & { key: TemplateKey }) => { +}: YarnOptions & { key: AllTemplatesKey }) => { const command = [ // We don't want to use the cache or we might get older copies of our built packages // (with identical versions), as yarn (correctly I guess) assumes the same version hasn't changed From 4fe9a0a52b3b07bebf50b45700ca74d55033cf4a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 29 Dec 2025 14:24:29 +0100 Subject: [PATCH 248/310] Rename AbstractTemplate to Template --- code/lib/cli-storybook/src/sandbox-templates.ts | 12 ++++++------ code/lib/cli-storybook/src/sandbox.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index ffb55e4b4700..c62f081122cf 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -28,7 +28,7 @@ type LoosenedStorybookConfig = Omit, 'features'> & { | undefined; }; -export type AbstractTemplate = { +export type Template = { /** * Readable name for the template, which will be used for feedback and the status page Follows the * naming scheme when it makes sense: <"v"version|"Latest"|"Prerelease"> @@ -106,7 +106,7 @@ export type AbstractTemplate = { isInternal?: boolean; }; -type BaseTemplates = AbstractTemplate & { +type BaseTemplates = Template & { name: `${string} ${`v${number}` | 'Latest' | 'Prerelease'} (${'Webpack' | 'Vite' | 'RsBuild'} | ${ | 'JavaScript' | 'TypeScript'})`; @@ -881,7 +881,7 @@ const internalTemplates = { type: ProjectType.SERVER, }, }, -} satisfies Record<`internal/${string}`, AbstractTemplate & { isInternal: true }>; +} satisfies Record<`internal/${string}`, Template & { isInternal: true }>; const benchTemplates = { 'bench/react-vite-default-ts': { @@ -973,9 +973,9 @@ const benchTemplates = { 'vitest-integration', ], }, -} satisfies Record; +} satisfies Record; -export const allTemplates: Record = { +export const allTemplates: Record = { ...baseTemplates, ...internalTemplates, ...benchTemplates, @@ -1040,6 +1040,6 @@ export const daily: TemplateKey[] = [ ]; export const templatesByCadence = { normal, merged, daily }; -export type TemplateType = Pick; +export type TemplateType = Pick; export type AllTemplatesKey = keyof typeof allTemplates; export type AllTemplatesType = Record; diff --git a/code/lib/cli-storybook/src/sandbox.ts b/code/lib/cli-storybook/src/sandbox.ts index c296072c4cc8..5bfcc854048f 100644 --- a/code/lib/cli-storybook/src/sandbox.ts +++ b/code/lib/cli-storybook/src/sandbox.ts @@ -18,7 +18,7 @@ import { lt, prerelease } from 'semver'; import invariant from 'tiny-invariant'; import { dedent } from 'ts-dedent'; -import type { AbstractTemplate, TemplateKey } from './sandbox-templates'; +import type { Template, TemplateKey } from './sandbox-templates'; import { allTemplates as TEMPLATES } from './sandbox-templates'; interface SandboxOptions { @@ -39,7 +39,7 @@ export const sandbox = async ({ ...options }: SandboxOptions) => { // Either get a direct match when users pass a template id, or filter through all templates - let selectedConfig: AbstractTemplate | undefined = TEMPLATES[filterValue as TemplateKey]; + let selectedConfig: Template | undefined = TEMPLATES[filterValue as TemplateKey]; let templateId: Choice | null = selectedConfig ? (filterValue as TemplateKey) : null; const { packageManager: pkgMgr } = options; From ce67e46ecf64fcb84471b2ce236e2018191d2355 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 29 Dec 2025 14:32:58 +0100 Subject: [PATCH 249/310] Remove unused `get-template` script from package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index c3c5f85b7bf4..f4873d84f2e8 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "ci-tests": "cd code; yarn ci-tests", "get-report-message": "cd scripts; yarn get-report-message", "get-sandbox-dir": "cd scripts; yarn get-sandbox-dir", - "get-template": "cd scripts; yarn get-template", "i": "yarn", "knip": "cd code; yarn knip", "lint": "cd code; yarn lint", From c42b5c1133d9a37d17b78481cf492eee726844c3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 29 Dec 2025 14:58:07 +0100 Subject: [PATCH 250/310] Update CircleCI configuration to unify JUnit output file naming and enable JUnit reporting for various test commands --- scripts/ci/code.ts | 16 +++++++++++----- scripts/ci/sandboxes.ts | 18 ++++++++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index 21b00622dde8..788926aec9e7 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -247,8 +247,10 @@ export const testsUnit_linux = defineJob( run: { name: 'Run tests', working_directory: `code`, - command: - 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + command: [ + 'TEST_FILES=$(circleci tests glob "**/*.{test,spec}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit.xml" --verbose', + ].join('\n'), }, }, testResults.persist(`test-results`), @@ -274,8 +276,10 @@ export const testsStories_linux = defineJob( run: { name: 'Run stories tests', working_directory: `code`, - command: - 'TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")\necho "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit-${CIRCLE_NODE_INDEX}.xml" --verbose', + command: [ + 'TEST_FILES=$(circleci tests glob "**/*.{stories}.{ts,tsx,js,jsx,cjs}" | sed "/^e2e-tests\\//d" | sed "/^node_modules\\//d")', + 'echo "$TEST_FILES" | circleci tests run --command="xargs yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit.xml" --verbose', + ].join('\n'), }, }, testResults.persist(`test-results`), @@ -306,11 +310,13 @@ export const testUnit_windows = defineJob( }, { run: { - command: 'yarn test', + command: + 'yarn test --reporter=junit --reporter=default --outputFile=./test-results/junit.xml', name: 'Run unit tests', working_directory: `code`, }, }, + testResults.persist(`test-results`), ], }, [build_windows.id] diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 4be15a582ece..0efb7e863981 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -8,6 +8,7 @@ import { artifact, cache, server, + testResults, toId, verdaccio, workflow, @@ -97,7 +98,7 @@ function defineSandboxJob_dev({ name: 'Running E2E Tests', command: [ 'TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")', - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${template} --no-link -s e2e-tests-dev" --verbose --index=0 --total=1`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests-dev --template ${template} --no-link -s e2e-tests-dev --junit" --verbose --index=0 --total=1`, ].join('\n'), }, }, @@ -105,6 +106,7 @@ function defineSandboxJob_dev({ join(ROOT_DIR, SANDBOX_DIR, directory, 'test-results'), 'test-results' ), + testResults.persist(join(ROOT_DIR, SANDBOX_DIR, directory, 'test-results')), ] : [ { @@ -257,7 +259,7 @@ export function defineSandboxFlow(key: Key) { { run: { name: 'Running Vitest', - command: `yarn task vitest-integration --template ${key} --no-link -s vitest-integration`, + command: `yarn task vitest-integration --template ${key} --no-link -s vitest-integration --junit`, }, }, ], @@ -289,10 +291,11 @@ export function defineSandboxFlow(key: Key) { name: 'Running E2E Tests', command: [ `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${key} --no-link -s e2e-tests" --verbose --index=0 --total=1`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${key} --no-link -s e2e-tests --junit" --verbose --index=0 --total=1`, ].join('\n'), }, }, + testResults.persist(join(ROOT_DIR, SANDBOX_DIR, id, 'test-results')), artifact.persist(join(ROOT_DIR, SANDBOX_DIR, id, 'test-results'), 'test-results'), ], }, @@ -321,9 +324,10 @@ export function defineSandboxFlow(key: Key) { { run: { name: 'Running test-runner', - command: `yarn task test-runner --template ${key} --no-link -s test-runner`, + command: `yarn task test-runner --template ${key} --no-link -s test-runner --junit`, }, }, + testResults.persist(join(ROOT_DIR, SANDBOX_DIR, id, 'test-results')), ], }, [ids.build] @@ -350,9 +354,10 @@ export function defineSandboxTestRunner(sandbox: ReturnType Date: Mon, 29 Dec 2025 15:54:45 +0100 Subject: [PATCH 251/310] Refactor CircleCI configuration to standardize test result paths across various jobs --- scripts/ci/code.ts | 6 +++--- scripts/ci/sandboxes.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index 788926aec9e7..517c081e5568 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -253,7 +253,7 @@ export const testsUnit_linux = defineJob( ].join('\n'), }, }, - testResults.persist(`test-results`), + testResults.persist(`code/test-results`), git.check(), ...workflow.report_on_failure(), @@ -282,7 +282,7 @@ export const testsStories_linux = defineJob( ].join('\n'), }, }, - testResults.persist(`test-results`), + testResults.persist(`code/test-results`), git.check(), ...workflow.report_on_failure(), @@ -316,7 +316,7 @@ export const testUnit_windows = defineJob( working_directory: `code`, }, }, - testResults.persist(`test-results`), + testResults.persist(`code/test-results`), ], }, [build_windows.id] diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 0efb7e863981..df64c332fe07 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -106,7 +106,7 @@ function defineSandboxJob_dev({ join(ROOT_DIR, SANDBOX_DIR, directory, 'test-results'), 'test-results' ), - testResults.persist(join(ROOT_DIR, SANDBOX_DIR, directory, 'test-results')), + testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), ] : [ { @@ -262,6 +262,7 @@ export function defineSandboxFlow(key: Key) { command: `yarn task vitest-integration --template ${key} --no-link -s vitest-integration --junit`, }, }, + testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), ], }, [ids.build] @@ -295,8 +296,7 @@ export function defineSandboxFlow(key: Key) { ].join('\n'), }, }, - testResults.persist(join(ROOT_DIR, SANDBOX_DIR, id, 'test-results')), - artifact.persist(join(ROOT_DIR, SANDBOX_DIR, id, 'test-results'), 'test-results'), + testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), ], }, [ids.build] @@ -327,7 +327,7 @@ export function defineSandboxFlow(key: Key) { command: `yarn task test-runner --template ${key} --no-link -s test-runner --junit`, }, }, - testResults.persist(join(ROOT_DIR, SANDBOX_DIR, id, 'test-results')), + testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), ], }, [ids.build] @@ -357,7 +357,7 @@ export function defineSandboxTestRunner(sandbox: ReturnType Date: Wed, 31 Dec 2025 12:36:13 +0100 Subject: [PATCH 252/310] Enhance sandbox job configuration to include 'inDevelopment' flag for dynamic command generation --- scripts/ci/sandboxes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index df64c332fe07..54486b9470e2 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -127,7 +127,7 @@ function defineSandboxJob_dev({ export function defineSandboxFlow(key: Key) { const id = toId(key); const data = sandboxTemplates.allTemplates[key as keyof typeof sandboxTemplates.allTemplates]; - const { skipTasks = [], name } = data; + const { skipTasks = [], name, inDevelopment } = data; const path = key.replace('/', '-'); @@ -176,7 +176,7 @@ export function defineSandboxFlow(key: Key) { { run: { name: 'Create Sandboxes', - command: `yarn task sandbox --template ${key} --no-link -s sandbox --debug`, + command: `yarn task sandbox --template ${key} --no-link -s ${inDevelopment ? 'generate' : 'sandbox'} --debug`, environment: { STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', From 4f5ad51d386f36ead70c39574195d31bc6a7afe9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 12:36:18 +0100 Subject: [PATCH 253/310] Enhance JobImplementation type definition with detailed steps documentation and future use notes --- scripts/ci/utils/types.ts | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index 3f788de57ffb..ebcf0067119c 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -12,8 +12,40 @@ export type JobImplementation = { name: 'win/default'; size: 'small' | 'medium' | 'medium+' | 'large' | 'xlarge'; }; - steps: unknown[]; // Make this more type-strict, maybe + /** + * The steps to run in the job. + * + * @example + * + * ```ts + * { + * run: { + * name: string, + * working_directory: string, + * command: string, + * background: boolean, + * shell: string, + * env: Record, + * timeout: number, + * retries: number, + * retry_delay: number, + * retry_delay_max: number, + * }, + * } + * ``` + * + * @todo Make this more type-strict, maybe with a union type of step objects. See the example + * above. + */ + steps: unknown[]; + + /** I think we generally want to avoid this, since we're generating the jobs dynamically. */ parameters?: Record; + + /** + * We don't use this today, but it's available for future use. We might want to use it when + * running many many unit tests in parallel. + */ parallelism?: number; }; From fff399387d0212ba5387dcd0126bfd92a829f10b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 12:51:19 +0100 Subject: [PATCH 254/310] Update sandbox generator logic to allow generation in CI environments when STORYBOOK_SANDBOX_GENERATE is set --- scripts/sandbox/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index c64fa191d4fd..75d105ae4260 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -321,7 +321,7 @@ const runGenerators = async ( const hasGenerationErrors = generationResults.some((result) => result.status === 'rejected'); - if (!isCI) { + if (!isCI || process.env.STORYBOOK_SANDBOX_GENERATE) { if (hasGenerationErrors) { console.log('failed:'); console.log( From 947f5200be13bbd05fef080dd08f503745d8f80e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 13:09:15 +0100 Subject: [PATCH 255/310] Add STORYBOOK_SANDBOX_GENERATE environment variable to sandbox flow for CI generation --- scripts/ci/sandboxes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 54486b9470e2..00838d2b0245 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -178,6 +178,7 @@ export function defineSandboxFlow(key: Key) { name: 'Create Sandboxes', command: `yarn task sandbox --template ${key} --no-link -s ${inDevelopment ? 'generate' : 'sandbox'} --debug`, environment: { + STORYBOOK_SANDBOX_GENERATE: 1, STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, From 225b727685e57b64a2e535b46320797f755533b4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 15:25:55 +0100 Subject: [PATCH 256/310] Refactor CI job definitions to use JobsOrHub type and simplify dependencies in hub configurations --- scripts/ci/code.ts | 18 +- scripts/ci/init-empty.ts | 18 +- scripts/ci/main.ts | 29 ++- scripts/ci/sandboxes.ts | 394 +++++++++++++++++----------------- scripts/ci/test-storybooks.ts | 18 +- scripts/ci/utils/helpers.ts | 20 ++ scripts/ci/utils/types.ts | 29 ++- 7 files changed, 292 insertions(+), 234 deletions(-) diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index 517c081e5568..4cfc2a9a648d 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -125,7 +125,7 @@ export const build_windows = defineJob('Build (windows)', { ], }); -export const codeHub = defineHub('code', [build_linux.id]); +export const codeHub = defineHub('code', [build_linux]); export const storybookChromatic = defineJob( 'Local storybook & chromatic', @@ -152,7 +152,7 @@ export const storybookChromatic = defineJob( }, ], }, - [codeHub.id] + [codeHub] ); export const check = defineJob( @@ -182,7 +182,7 @@ export const check = defineJob( ...workflow.cancel_on_failure(), ], }, - [codeHub.id] + [codeHub] ); export const lint = defineJob( @@ -210,7 +210,7 @@ export const lint = defineJob( }, ], }, - [codeHub.id] + [codeHub] ); export const knip = defineJob( @@ -231,7 +231,7 @@ export const knip = defineJob( }, ], }, - [codeHub.id] + [codeHub] ); export const testsUnit_linux = defineJob( @@ -260,7 +260,7 @@ export const testsUnit_linux = defineJob( ...workflow.cancel_on_failure(), ], }, - [codeHub.id] + [codeHub] ); export const testsStories_linux = defineJob( @@ -289,7 +289,7 @@ export const testsStories_linux = defineJob( ...workflow.cancel_on_failure(), ], }, - [codeHub.id] + [codeHub] ); export const testUnit_windows = defineJob( @@ -319,7 +319,7 @@ export const testUnit_windows = defineJob( testResults.persist(`code/test-results`), ], }, - [build_windows.id] + [build_windows] ); export const benchmarkPackages = defineJob( @@ -343,5 +343,5 @@ export const benchmarkPackages = defineJob( }, ], }, - [codeHub.id] + [codeHub] ); diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 6c758265b715..59c91368f5db 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,6 +1,12 @@ import { build_linux } from './code'; import { server, verdaccio, workflow } from './utils/helpers'; -import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; +import { + type JobsOrHub, + type Workflow, + defineHub, + defineJob, + isWorkflowOrAbove, +} from './utils/types'; export const defineEmptyInitFlow = (template: string) => defineJob( @@ -41,7 +47,7 @@ export const defineEmptyInitFlow = (template: string) => ], }, - [initEmptyHub.id] + [initEmptyHub] ); export function defineEmptyInitFeatures() { @@ -82,7 +88,7 @@ export function defineEmptyInitFeatures() { }, ], }, - [initEmptyHub.id] + [initEmptyHub] ); } @@ -125,14 +131,14 @@ export function defineEmptyInitWindows() { }, ], }, - [initEmptyHub.id] + [initEmptyHub] ); } -export const initEmptyHub = defineHub('init-empty', [build_linux.id]); +export const initEmptyHub = defineHub('init-empty', [build_linux]); export function getInitEmpty(workflow: Workflow) { - const initEmpty = ['react-vite-ts'].map(defineEmptyInitFlow); + const initEmpty: JobsOrHub[] = ['react-vite-ts'].map(defineEmptyInitFlow); if (isWorkflowOrAbove(workflow, 'merged')) { initEmpty.push(...['nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map(defineEmptyInitFlow)); diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 66fd89b4a29d..12000857c7df 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -22,15 +22,16 @@ import { getInitEmpty, initEmptyHub } from './init-empty'; import { getSandboxes, sandboxesHub } from './sandboxes'; import { getTestStorybooks, testStorybooksHub } from './test-storybooks'; import { executors } from './utils/executors'; +import { ensureRequiredJobs } from './utils/helpers'; import { orbs } from './utils/orbs'; import { parameters } from './utils/parameters'; -import type { defineHub, defineJob } from './utils/types'; +import type { HubImplementation, JobsOrHub } from './utils/types'; import { type JobImplementation, type Workflow, isWorkflowOrAbove } from './utils/types'; const dirname = import.meta.dirname; function generateConfig(workflow: Workflow) { - const todos: (ReturnType | ReturnType)[] = []; + const todos: JobsOrHub[] = []; if (isWorkflowOrAbove(workflow, 'docs')) { todos.push(prettyDocs); } else { @@ -66,7 +67,23 @@ function generateConfig(workflow: Workflow) { ); } - const sorted = todos.sort((a, b) => { + /** + * If you want to filter down to a particular job, e.g.for debugging purposes.. you can do that + * here. + * + * You can filter on the `job.id` for example. + * + * Though is also possible to comment-out certain sandboxes in`sandbox-templates.ts`, or comment + * out `todos.push`-statements above. + * + * You do not need to consider the `requires` field, as the `ensureRequiredJobs` function will + * handle that for you. + */ + const filteredTodos = todos.filter((job) => !!job); + + const ensured = ensureRequiredJobs(filteredTodos); + + const sorted = ensured.sort((a, b) => { if (a.requires.length && b.requires.length) { return a.requires.length - b.requires.length; } @@ -90,12 +107,14 @@ function generateConfig(workflow: Workflow) { acc[job.id] = job.implementation; return acc; }, - {} as Record + {} as Record ), workflows: { [`${workflow}-generated`]: { jobs: sorted.map((t) => - t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires } } : t.id + t.requires && t.requires.length > 0 + ? { [t.id]: { requires: t.requires.map((r) => r.id) } } + : t.id ), }, }, diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 00838d2b0245..461d8d2ee1a9 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -15,28 +15,26 @@ import { workspace, } from './utils/helpers'; import { defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; -import type { JobImplementation, Workflow } from './utils/types'; +import type { JobsOrHub, Workflow } from './utils/types'; function defineSandboxJob_build({ directory, name, template, - needs, + requires, }: { directory: string; name: string; - needs: string[]; + requires: JobsOrHub[]; template: string; }) { - const executor: JobImplementation['executor'] = { - name: 'sb_node_22_classic', - class: 'large', - }; - return defineJob( name, { - executor, + executor: { + name: 'sb_node_22_classic', + class: 'large', + }, steps: [ ...workflow.restore_linux(), { @@ -48,38 +46,36 @@ function defineSandboxJob_build({ workspace.persist([`${SANDBOX_DIR}/${directory}/storybook-static`]), ], }, - needs + requires ); } function defineSandboxJob_dev({ name, directory, template, - needs, + requires, options, }: { name: string; directory: string; - needs: string[]; + requires: JobsOrHub[]; template: string; options: { e2e: boolean; }; }) { - const executor: JobImplementation['executor'] = options.e2e - ? { - name: 'sb_playwright', - class: 'xlarge', - } - : { - name: 'sb_node_22_classic', - class: 'large', - }; - return defineJob( name, { - executor, + executor: options.e2e + ? { + name: 'sb_playwright', + class: 'xlarge', + } + : { + name: 'sb_node_22_classic', + class: 'large', + }, steps: [ ...workflow.restore_linux(), ...(options.e2e @@ -120,7 +116,7 @@ function defineSandboxJob_dev({ ]), ], }, - needs + requires ); } @@ -140,169 +136,188 @@ export function defineSandboxFlow(key: Key) { vitest: `${name} (vitest)`, testRunner: `${name} (test-runner)`, }; - const ids = Object.fromEntries(Object.entries(names).map(([key, value]) => [key, toId(value)])); - const jobs = [ - defineJob( - names.create, - { - executor: { - name: 'sb_node_22_browsers', - class: 'large', - }, - steps: [ - ...workflow.restore_linux(), - verdaccio.start(), - { - run: { - name: 'Start Event Collector', - working_directory: `scripts`, - background: true, - command: 'yarn jiti ./event-log-collector.ts', - }, + const createJob = defineJob( + names.create, + { + executor: { + name: 'sb_node_22_browsers', + class: 'large', + }, + steps: [ + ...workflow.restore_linux(), + verdaccio.start(), + { + run: { + name: 'Start Event Collector', + working_directory: `scripts`, + background: true, + command: 'yarn jiti ./event-log-collector.ts', }, - server.wait([...verdaccio.ports, '6007']), - { - run: { - name: 'Setup Corepack', - command: [ - // - 'sudo corepack enable', - 'which yarn', - 'yarn --version', - ].join('\n'), - }, + }, + server.wait([...verdaccio.ports, '6007']), + { + run: { + name: 'Setup Corepack', + command: [ + // + 'sudo corepack enable', + 'which yarn', + 'yarn --version', + ].join('\n'), }, - { - run: { - name: 'Create Sandboxes', - command: `yarn task sandbox --template ${key} --no-link -s ${inDevelopment ? 'generate' : 'sandbox'} --debug`, - environment: { - STORYBOOK_SANDBOX_GENERATE: 1, - STORYBOOK_TELEMETRY_DEBUG: 1, - STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', - }, + }, + { + run: { + name: 'Create Sandboxes', + command: `yarn task sandbox --template ${key} --no-link -s ${inDevelopment ? 'generate' : 'sandbox'} --debug`, + environment: { + STORYBOOK_SANDBOX_GENERATE: 1, + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, }, - ...(id.includes('svelte-kit') - ? [ - { - run: { - name: 'Run prepare', - working_directory: `${ROOT_DIR}/${SANDBOX_DIR}/${id}`, - command: `yarn prepare`, - }, - }, - ] - : []), - artifact.persist(`${ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), - workspace.persist([`${SANDBOX_DIR}/${id}`]), - ], - }, - [sandboxesHub.id] - ), - defineSandboxJob_build({ - directory: id, - name: names.build, - template: key, - needs: [ids.create], - }), - defineSandboxJob_dev({ - name: names.dev, - directory: id, - template: key, - needs: [ids.create], - options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, - }), - !skipTasks?.includes('chromatic') - ? defineJob( - names.chromatic, - { - executor: { - name: 'sb_node_22_classic', - class: 'medium', - }, - steps: [ - 'checkout', // we need the full git history for chromatic - workspace.attach(), - cache.attach(CACHE_KEYS()), - { - // we copy to the working directory to get git history, which chromatic needs for baselines - run: { - name: 'Copy sandbox to working directory', - command: `cp ${join(ROOT_DIR, SANDBOX_DIR)} ${join(ROOT_DIR, WORKING_DIR, 'sandbox')} -r --remove-destination`, - }, - }, + }, + ...(id.includes('svelte-kit') + ? [ { run: { - name: 'Running Chromatic', - command: `yarn task chromatic --template ${key} --no-link -s chromatic`, - environment: { - STORYBOOK_SANDBOX_ROOT: `./sandbox`, - }, + name: 'Run prepare', + working_directory: `${ROOT_DIR}/${SANDBOX_DIR}/${id}`, + command: `yarn prepare`, }, }, - ], + ] + : []), + artifact.persist(`${ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), + workspace.persist([`${SANDBOX_DIR}/${id}`]), + ], + }, + [sandboxesHub] + ); + const buildJob = defineSandboxJob_build({ + directory: id, + name: names.build, + template: key, + requires: [createJob], + }); + const devJob = defineSandboxJob_dev({ + name: names.dev, + directory: id, + template: key, + requires: [createJob], + options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, + }); + const chromaticJob = defineJob( + names.chromatic, + { + executor: { + name: 'sb_node_22_classic', + class: 'medium', + }, + steps: [ + 'checkout', // we need the full git history for chromatic + workspace.attach(), + cache.attach(CACHE_KEYS()), + { + // we copy to the working directory to get git history, which chromatic needs for baselines + run: { + name: 'Copy sandbox to working directory', + command: `cp ${join(ROOT_DIR, SANDBOX_DIR)} ${join(ROOT_DIR, WORKING_DIR, 'sandbox')} -r --remove-destination`, }, - [ids.build] - ) - : undefined, - !skipTasks?.includes('vitest-integration') - ? defineJob( - names.vitest, - { - executor: { - name: 'sb_playwright', - class: 'medium', + }, + { + run: { + name: 'Running Chromatic', + command: `yarn task chromatic --template ${key} --no-link -s chromatic`, + environment: { + STORYBOOK_SANDBOX_ROOT: `./sandbox`, }, - steps: [ - ...workflow.restore_linux(), - { - run: { - name: 'Running Vitest', - command: `yarn task vitest-integration --template ${key} --no-link -s vitest-integration --junit`, - }, - }, - testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), - ], }, - [ids.build] - ) - : undefined, - - !skipTasks?.includes('e2e-tests') - ? defineJob( - names.e2e, - { - executor: { - name: 'sb_playwright', - class: 'xlarge', - }, - steps: [ - ...workflow.restore_linux(), - { - run: { - name: 'Serve storybook', - background: true, - command: `yarn task serve --template ${key} --no-link -s serve`, - }, - }, - server.wait(['8001']), - { - run: { - name: 'Running E2E Tests', - command: [ - `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, - `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${key} --no-link -s e2e-tests --junit" --verbose --index=0 --total=1`, - ].join('\n'), - }, - }, - testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), - ], + }, + ], + }, + [buildJob] + ); + const vitestJob = defineJob( + names.vitest, + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + ...workflow.restore_linux(), + { + run: { + name: 'Running Vitest', + command: `yarn task vitest-integration --template ${key} --no-link -s vitest-integration --junit`, }, - [ids.build] - ) - : undefined, + }, + testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), + ], + }, + [buildJob] + ); + const e2eJob = defineJob( + names.e2e, + { + executor: { + name: 'sb_playwright', + class: 'xlarge', + }, + steps: [ + ...workflow.restore_linux(), + { + run: { + name: 'Serve storybook', + background: true, + command: `yarn task serve --template ${key} --no-link -s serve`, + }, + }, + server.wait(['8001']), + { + run: { + name: 'Running E2E Tests', + command: [ + `TEST_FILES=$(circleci tests glob "code/e2e-tests/*.{test,spec}.{ts,js,mjs}")`, + `echo "$TEST_FILES" | circleci tests run --command="xargs yarn task e2e-tests --template ${key} --no-link -s e2e-tests --junit" --verbose --index=0 --total=1`, + ].join('\n'), + }, + }, + testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), + ], + }, + [buildJob] + ); + const testRunnerJob = defineJob( + names.testRunner, + { + executor: { + name: 'sb_playwright', + class: 'medium', + }, + steps: [ + ...workflow.restore_linux(), + { + run: { + name: 'Running test-runner', + command: `yarn task test-runner --template ${key} --no-link -s test-runner --junit`, + }, + }, + testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), + ], + }, + [buildJob] + ); + + const jobs = [ + createJob, + buildJob, + devJob, + !skipTasks?.includes('chromatic') ? chromaticJob : undefined, + !skipTasks?.includes('vitest-integration') ? vitestJob : undefined, + !skipTasks?.includes('e2e-tests') ? e2eJob : undefined, /** * Question: What is this for? Do we want to know if the test-runner works? Or do we want to @@ -313,26 +328,7 @@ export function defineSandboxFlow(key: Key) { * to run it when we're already running the chromatic job. */ !skipTasks?.includes('test-runner') && skipTasks.includes('chromatic') - ? defineJob( - names.testRunner, - { - executor: { - name: 'sb_playwright', - class: 'medium', - }, - steps: [ - ...workflow.restore_linux(), - { - run: { - name: 'Running test-runner', - command: `yarn task test-runner --template ${key} --no-link -s test-runner --junit`, - }, - }, - testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), - ], - }, - [ids.build] - ) + ? testRunnerJob : undefined, ].filter(Boolean); return { @@ -361,7 +357,7 @@ export function defineSandboxTestRunner(sandbox: ReturnType { switch (workflow) { @@ -485,7 +481,7 @@ const getListOfSandboxes = (workflow: Workflow) => { export function getSandboxes(workflow: Workflow) { const sandboxes = getListOfSandboxes(workflow).map(defineSandboxFlow); - const list = sandboxes.flatMap((sandbox) => sandbox.jobs); + const list: JobsOrHub[] = sandboxes.flatMap((sandbox) => sandbox.jobs); if (isWorkflowOrAbove(workflow, 'merged')) { const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index c06aeff030e9..de518de46b13 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -3,7 +3,13 @@ import { join } from 'path/posix'; import { build_linux } from './code'; import { artifact, workflow } from './utils/helpers'; -import { type Workflow, defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; +import { + type JobsOrHub, + type Workflow, + defineHub, + defineJob, + isWorkflowOrAbove, +} from './utils/types'; export function definePortableStoryTest(directory: string) { const working_directory = `test-storybooks/portable-stories-kitchen-sink/${directory}`; @@ -73,7 +79,7 @@ export function definePortableStoryTest(directory: string) { }, ], }, - [testStorybooksHub.id] + [testStorybooksHub] ); } @@ -106,7 +112,7 @@ export function definePortableStoryTestPNP() { }, ], }, - [testStorybooksHub.id] + [testStorybooksHub] ); } @@ -139,14 +145,14 @@ export function definePortableStoryTestVitest3() { }, ], }, - [testStorybooksHub.id] + [testStorybooksHub] ); } -export const testStorybooksHub = defineHub('test-storybooks', [build_linux.id]); +export const testStorybooksHub = defineHub('test-storybooks', [build_linux]); export function getTestStorybooks(workflow: Workflow) { - const testStorybooks = ['react', 'vue3'].map(definePortableStoryTest); + const testStorybooks: JobsOrHub[] = ['react', 'vue3'].map(definePortableStoryTest); if (isWorkflowOrAbove(workflow, 'daily')) { testStorybooks.push(definePortableStoryTestPNP()); diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 68666a6ea5eb..7fcd3f13e611 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -1,4 +1,5 @@ import { ROOT_DIR } from './constants'; +import { type Job, type JobsOrHub } from './types'; export const workspace = { attach: (at = ROOT_DIR) => { @@ -252,3 +253,22 @@ export const testResults = { }; }, }; + +/** + * We ensure that if (due to filtering for example) any required jobs are not present in the todos + * array, we add them back in. This is recursive, as a required job can have required jobs itself. + */ +export function ensureRequiredJobs(jobs: JobsOrHub[]): JobsOrHub[] { + const results: JobsOrHub[] = []; + while (jobs.length > 0) { + const job = jobs.shift(); + if (job) { + if (results.find((r) => r.id === job.id)) { + continue; + } + results.push(job); + jobs.push(...job.requires); + } + } + return results; +} diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index ebcf0067119c..ff25743d2b12 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -2,6 +2,21 @@ import type { executors } from './executors'; import { toId } from './helpers'; import type { parameters } from './parameters'; +export type Job = { + id: string; + name: K; + implementation: I; + requires: JobsOrHub[]; +}; + +export type Hub = Job; + +export type JobsOrHub = Job; + +export type HubImplementation = { + type: 'no-op'; +}; + export type JobImplementation = { executor: | { @@ -26,10 +41,6 @@ export type JobImplementation = { * background: boolean, * shell: string, * env: Record, - * timeout: number, - * retries: number, - * retry_delay: number, - * retry_delay_max: number, * }, * } * ``` @@ -62,15 +73,15 @@ export type JobImplementation = { export function defineJob( name: K, implementation: I, - requires = [] as string[] -) { + requires = [] as JobsOrHub[] +): Job { return { id: toId(name), - name: name as string, + name: name, implementation: { description: name, ...implementation, - } as JobImplementation, + } satisfies JobImplementation, requires, }; } @@ -82,7 +93,7 @@ export function defineJob( * @param name - The name of the hub * @param requires - The jobs that this hub depends on */ -export function defineHub(name: string, requires = [] as string[]) { +export function defineHub(name: K, requires = [] as JobsOrHub[]): Hub { return { id: toId(name), name, From 1554b7075ae2859fa786c2ed76e8c916ef90cdd6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 15:42:51 +0100 Subject: [PATCH 257/310] Add check for existing paths in generate task to prevent linking in development templates --- scripts/tasks/generate.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/tasks/generate.ts b/scripts/tasks/generate.ts index 97d02f15f1dc..aaa70ecec937 100644 --- a/scripts/tasks/generate.ts +++ b/scripts/tasks/generate.ts @@ -25,6 +25,9 @@ export const generate: Task = { return isReady; } if ('inDevelopment' in template && template.inDevelopment && link) { + if (pathExists(join(REPROS_DIRECTORY, key))) { + return true; + } throw new Error('Cannot link an in development template'); } return isReady; From 0d63663a8acd8d581fbc173a32df953881680fb2 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 15:58:50 +0100 Subject: [PATCH 258/310] Refactor sandbox task to include path existence check for template linking --- scripts/ci/utils/helpers.ts | 2 +- scripts/tasks/generate.ts | 3 --- scripts/tasks/sandbox.ts | 8 ++++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 7fcd3f13e611..2ed1a65e7258 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -1,5 +1,5 @@ import { ROOT_DIR } from './constants'; -import { type Job, type JobsOrHub } from './types'; +import { type JobsOrHub } from './types'; export const workspace = { attach: (at = ROOT_DIR) => { diff --git a/scripts/tasks/generate.ts b/scripts/tasks/generate.ts index aaa70ecec937..97d02f15f1dc 100644 --- a/scripts/tasks/generate.ts +++ b/scripts/tasks/generate.ts @@ -25,9 +25,6 @@ export const generate: Task = { return isReady; } if ('inDevelopment' in template && template.inDevelopment && link) { - if (pathExists(join(REPROS_DIRECTORY, key))) { - return true; - } throw new Error('Cannot link an in development template'); } return isReady; diff --git a/scripts/tasks/sandbox.ts b/scripts/tasks/sandbox.ts index d02d798a8b78..ccccf847fdde 100644 --- a/scripts/tasks/sandbox.ts +++ b/scripts/tasks/sandbox.ts @@ -6,7 +6,7 @@ import dirSize from 'fast-folder-size'; import { now, saveBench } from '../bench/utils'; import type { Task, TaskKey } from '../task'; -import { ROOT_DIRECTORY } from '../utils/constants'; +import { REPROS_DIRECTORY, ROOT_DIRECTORY } from '../utils/constants'; const logger = console; @@ -21,7 +21,11 @@ const pathExists = async (path: string) => { export const sandbox: Task = { description: 'Create the sandbox from a template', - dependsOn: ({ template }, { link }) => { + dependsOn: ({ template, key }, { link }) => { + if (pathExists(join(REPROS_DIRECTORY, key))) { + return ['run-registry']; + } + if ('inDevelopment' in template && template.inDevelopment) { return ['run-registry', 'generate']; } From ef1351a528eb781e7c67f36c5b7f872e77c5c9d1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 16:19:52 +0100 Subject: [PATCH 259/310] Enhance sandbox flow to conditionally generate sandbox in development mode with updated command structure --- scripts/ci/sandboxes.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 461d8d2ee1a9..fea8146ffd11 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -123,7 +123,7 @@ function defineSandboxJob_dev({ export function defineSandboxFlow(key: Key) { const id = toId(key); const data = sandboxTemplates.allTemplates[key as keyof typeof sandboxTemplates.allTemplates]; - const { skipTasks = [], name, inDevelopment } = data; + const { skipTasks = [], name } = data; const path = key.replace('/', '-'); @@ -167,10 +167,25 @@ export function defineSandboxFlow(key: Key) { ].join('\n'), }, }, + ...('inDevelopment' in data && data.inDevelopment + ? [ + { + run: { + name: 'Generate Sandbox', + command: `yarn task generate --template ${key} --no-link -s generate --debug`, + environment: { + STORYBOOK_SANDBOX_GENERATE: 1, + STORYBOOK_TELEMETRY_DEBUG: 1, + STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', + }, + }, + }, + ] + : []), { run: { - name: 'Create Sandboxes', - command: `yarn task sandbox --template ${key} --no-link -s ${inDevelopment ? 'generate' : 'sandbox'} --debug`, + name: 'Create Sandbox', + command: `yarn task sandbox --template ${key} --no-link -s sandbox --debug`, environment: { STORYBOOK_SANDBOX_GENERATE: 1, STORYBOOK_TELEMETRY_DEBUG: 1, From 589f02f18906ea744615bc74a8f8ff3a241a60cb Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 16:21:01 +0100 Subject: [PATCH 260/310] Update CI job filtering to include only jobs with 'qwik' in their ID and remove unused environment variable from sandbox flow --- scripts/ci/main.ts | 2 +- scripts/ci/sandboxes.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 12000857c7df..a1195d9fa7e0 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -79,7 +79,7 @@ function generateConfig(workflow: Workflow) { * You do not need to consider the `requires` field, as the `ensureRequiredJobs` function will * handle that for you. */ - const filteredTodos = todos.filter((job) => !!job); + const filteredTodos = todos.filter((job) => !!job.id.includes('qwik')); const ensured = ensureRequiredJobs(filteredTodos); diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index fea8146ffd11..a50567a92633 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -187,7 +187,6 @@ export function defineSandboxFlow(key: Key) { name: 'Create Sandbox', command: `yarn task sandbox --template ${key} --no-link -s sandbox --debug`, environment: { - STORYBOOK_SANDBOX_GENERATE: 1, STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, From bc9ca75eff71b439a889066efd3deccdf68b131c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 16:22:30 +0100 Subject: [PATCH 261/310] Update CI configuration to append '-debug' suffix for workflows when debugging is enabled based on job filtering --- scripts/ci/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index a1195d9fa7e0..109e530a16e1 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -81,6 +81,8 @@ function generateConfig(workflow: Workflow) { */ const filteredTodos = todos.filter((job) => !!job.id.includes('qwik')); + const isDebugging = filteredTodos.length !== todos.length; + const ensured = ensureRequiredJobs(filteredTodos); const sorted = ensured.sort((a, b) => { @@ -110,7 +112,7 @@ function generateConfig(workflow: Workflow) { {} as Record ), workflows: { - [`${workflow}-generated`]: { + [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { jobs: sorted.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires.map((r) => r.id) } } From 1bc683240cd6a5cead6cc27cb0d3fa149959fc89 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 17:10:04 +0100 Subject: [PATCH 262/310] Refactor extendPreview task to conditionally append mock imports based on renderer type and update sandbox task to use SANDBOX_DIRECTORY for path checks --- scripts/tasks/sandbox-parts.ts | 40 +++++++++++++++++++--------------- scripts/tasks/sandbox.ts | 10 ++++----- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index b4e22ef1e988..a036904a5e15 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -861,7 +861,7 @@ export const extendMain: Task['run'] = async ({ template, sandboxDir, key }, { d await writeConfig(mainConfig); }; -export const extendPreview: Task['run'] = async ({ template, sandboxDir }) => { +export const extendPreview: Task['run'] = async ({ template, sandboxDir, key }) => { logger.log('📝 Extending preview.js'); const previewConfig = await readConfig({ cwd: sandboxDir, fileName: 'preview' }); @@ -889,22 +889,28 @@ export const extendPreview: Task['run'] = async ({ template, sandboxDir }) => { previewConfig.setImport(['sb'], 'storybook/test'); let config = formatConfig(previewConfig); - const mockBlock = [ - "sb.mock('../template-stories/core/test/ModuleMocking.utils.ts');", - "sb.mock('../template-stories/core/test/ModuleSpyMocking.utils.ts', { spy: true });", - "sb.mock('../template-stories/core/test/ModuleAutoMocking.utils.ts');", - "sb.mock(import('lodash-es'));", - "sb.mock(import('lodash-es/add'));", - "sb.mock(import('lodash-es/sum'));", - "sb.mock(import('uuid'));", - '', - ].join('\n'); - - // find last import statement and append sb.mock calls - config = config.replace( - 'import { sb } from "storybook/test";', - `import { sb } from 'storybook/test';\n\n${mockBlock}` - ); + const isCoreRenderer = + template.expected.renderer.startsWith('@storybook/') && + template.expected.renderer !== '@storybook/server'; + + if (isCoreRenderer) { + const mockBlock = [ + "sb.mock('../template-stories/core/test/ModuleMocking.utils.ts');", + "sb.mock('../template-stories/core/test/ModuleSpyMocking.utils.ts', { spy: true });", + "sb.mock('../template-stories/core/test/ModuleAutoMocking.utils.ts');", + "sb.mock(import('lodash-es'));", + "sb.mock(import('lodash-es/add'));", + "sb.mock(import('lodash-es/sum'));", + "sb.mock(import('uuid'));", + '', + ].join('\n'); + + // find last import statement and append sb.mock calls + config = config.replace( + 'import { sb } from "storybook/test";', + `import { sb } from 'storybook/test';\n\n${mockBlock}` + ); + } await writeFile(previewConfig.fileName, config); }; diff --git a/scripts/tasks/sandbox.ts b/scripts/tasks/sandbox.ts index ccccf847fdde..e11c13ec1330 100644 --- a/scripts/tasks/sandbox.ts +++ b/scripts/tasks/sandbox.ts @@ -6,7 +6,7 @@ import dirSize from 'fast-folder-size'; import { now, saveBench } from '../bench/utils'; import type { Task, TaskKey } from '../task'; -import { REPROS_DIRECTORY, ROOT_DIRECTORY } from '../utils/constants'; +import { ROOT_DIRECTORY, SANDBOX_DIRECTORY } from '../utils/constants'; const logger = console; @@ -22,11 +22,11 @@ const pathExists = async (path: string) => { export const sandbox: Task = { description: 'Create the sandbox from a template', dependsOn: ({ template, key }, { link }) => { - if (pathExists(join(REPROS_DIRECTORY, key))) { - return ['run-registry']; - } - if ('inDevelopment' in template && template.inDevelopment) { + if (pathExists(join(SANDBOX_DIRECTORY, key))) { + return ['run-registry']; + } + return ['run-registry', 'generate']; } From 485799671c05dac171326645d3850350c5a20e2e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 17:50:02 +0100 Subject: [PATCH 263/310] Update sandbox templates to include 'chromatic' in the skipTasks array for improved task management --- code/lib/cli-storybook/src/sandbox-templates.ts | 2 +- scripts/ci/main.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index c62f081122cf..cb723299c43e 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -740,7 +740,7 @@ export const baseTemplates = { builder: 'storybook-framework-qwik', }, // TODO: The community template does not provide standard stories, which is required for e2e tests. - skipTasks: ['e2e-tests-dev', 'e2e-tests', 'bench', 'vitest-integration'], + skipTasks: ['e2e-tests-dev', 'e2e-tests', 'bench', 'vitest-integration', 'chromatic'], }, 'ember/3-js': { name: 'Ember v3 (Webpack | JavaScript)', diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 109e530a16e1..3a0a45ec8c2f 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -78,8 +78,14 @@ function generateConfig(workflow: Workflow) { * * You do not need to consider the `requires` field, as the `ensureRequiredJobs` function will * handle that for you. + * + * @example + * + * ```ts + * const filteredTodos = todos.filter((job) => !!job.id.includes('qwik')); + * ``` */ - const filteredTodos = todos.filter((job) => !!job.id.includes('qwik')); + const filteredTodos = todos.filter((job) => !!job); const isDebugging = filteredTodos.length !== todos.length; From 8f885ef4af2e80c0120dee92995e252005b6d56d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 17:52:41 +0100 Subject: [PATCH 264/310] Update CircleCI configuration to change resource class from 'medium' to 'small' for the generate-and-run-config job --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4a7ca4089c94..59dd245f7676 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ jobs: generate-and-run-config: executor: name: node/default - resource_class: medium + resource_class: small steps: - node/install: install-yarn: true From 08390fffe98737789722ca56595cfd11f353162e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 18:12:00 +0100 Subject: [PATCH 265/310] Refactor extendPreview task to remove unused 'key' parameter for improved clarity and maintainability --- scripts/check/check-package.ts | 4 ++-- scripts/tasks/sandbox-parts.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check/check-package.ts b/scripts/check/check-package.ts index a433078a644e..1fa0d89e1923 100755 --- a/scripts/check/check-package.ts +++ b/scripts/check/check-package.ts @@ -26,8 +26,8 @@ const tsDiagnostics = getTSDiagnostics(program, normalizedCwd, host); if (tsDiagnostics.length > 0) { console.log(tsDiagnostics); process.exit(1); -} else { - console.log('no type errors'); +} else if (!process.env.CI) { + console.log('✅ No type errors'); } // TODO, add more package checks here, like: diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index a036904a5e15..5aee72f565fb 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -861,7 +861,7 @@ export const extendMain: Task['run'] = async ({ template, sandboxDir, key }, { d await writeConfig(mainConfig); }; -export const extendPreview: Task['run'] = async ({ template, sandboxDir, key }) => { +export const extendPreview: Task['run'] = async ({ template, sandboxDir }) => { logger.log('📝 Extending preview.js'); const previewConfig = await readConfig({ cwd: sandboxDir, fileName: 'preview' }); From bcd59c12a2cd227207bff320ee7903d95d952b1e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 18:14:59 +0100 Subject: [PATCH 266/310] Update generateTypesFiles function to conditionally log success message based on CI environment --- scripts/build/utils/generate-types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/utils/generate-types.ts b/scripts/build/utils/generate-types.ts index 937afb46c1e5..28cfd0004852 100644 --- a/scripts/build/utils/generate-types.ts +++ b/scripts/build/utils/generate-types.ts @@ -83,7 +83,7 @@ export async function generateTypesFiles(cwd: string, data: BuildEntries) { processes.forEach((p) => p.kill()); processes = []; process.exit(dtsProcess.exitCode || 1); - } else { + } else if(!process.env.CI) { console.log('✅ Generated types for', picocolors.cyan(join(DIR_REL, entryPoint))); } }); From 28418a46868ad181c79cd0aa321195eb072f9ece Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 20:22:35 +0100 Subject: [PATCH 267/310] disable qwik sandbox --- .../cli-storybook/src/sandbox-templates.ts | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index cb723299c43e..08c0c9f70411 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -729,19 +729,20 @@ export const baseTemplates = { }, skipTasks: ['e2e-tests', 'bench'], }, - 'qwik-vite/default-ts': { - name: 'Qwik CLI Latest (Vite | TypeScript)', - script: 'npm create qwik playground {{beforeDir}}', - // TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does. - inDevelopment: true, - expected: { - framework: 'storybook-framework-qwik', - renderer: 'storybook-framework-qwik', - builder: 'storybook-framework-qwik', - }, - // TODO: The community template does not provide standard stories, which is required for e2e tests. - skipTasks: ['e2e-tests-dev', 'e2e-tests', 'bench', 'vitest-integration', 'chromatic'], - }, + /** This is currently broken, we generate components and stories that do not work */ + // 'qwik-vite/default-ts': { + // name: 'Qwik CLI Latest (Vite | TypeScript)', + // script: 'npm create qwik playground {{beforeDir}}', + // // TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does. + // inDevelopment: true, + // expected: { + // framework: 'storybook-framework-qwik', + // renderer: 'storybook-framework-qwik', + // builder: 'storybook-framework-qwik', + // }, + // // TODO: The community template does not provide standard stories, which is required for e2e tests. + // skipTasks: ['e2e-tests-dev', 'e2e-tests', 'bench', 'vitest-integration', 'chromatic'], + // }, 'ember/3-js': { name: 'Ember v3 (Webpack | JavaScript)', script: 'npx --package ember-cli@3.28.1 ember new {{beforeDir}}', From 6c137b745cbd56152d414bdf916ce898af94a49e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 31 Dec 2025 21:33:38 +0100 Subject: [PATCH 268/310] Comment out 'qwik-vite/default-ts' in sandbox templates to disable Qwik sandbox integration --- code/lib/cli-storybook/src/sandbox-templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index 08c0c9f70411..cf381faf1a5f 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -1029,7 +1029,7 @@ export const daily: TemplateKey[] = [ 'lit-vite/default-js', 'svelte-vite/default-js', 'nextjs/prerelease', - 'qwik-vite/default-ts', + // 'qwik-vite/default-ts', 'preact-vite/default-js', 'html-vite/default-js', 'internal/react16-webpack', From f76167c8b96f5e553caa00f79a2d83bea7778655 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 09:52:39 +0100 Subject: [PATCH 269/310] cleanup --- scripts/ci/sandboxes.ts | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index a50567a92633..4a459a00a5ea 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -127,18 +127,8 @@ export function defineSandboxFlow(key: Key) { const path = key.replace('/', '-'); - const names = { - create: `${name} (create)`, - build: `${name} (build)`, - dev: `${name} (dev)`, - e2e: `${name} (e2e)`, - chromatic: `${name} (chromatic)`, - vitest: `${name} (vitest)`, - testRunner: `${name} (test-runner)`, - }; - const createJob = defineJob( - names.create, + `${name} (create)`, { executor: { name: 'sb_node_22_browsers', @@ -210,20 +200,20 @@ export function defineSandboxFlow(key: Key) { [sandboxesHub] ); const buildJob = defineSandboxJob_build({ - directory: id, - name: names.build, + name: `${name} (build)`, template: key, + directory: id, requires: [createJob], }); const devJob = defineSandboxJob_dev({ - name: names.dev, + name: `${name} (dev)`, directory: id, template: key, requires: [createJob], options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, }); const chromaticJob = defineJob( - names.chromatic, + `${name} (chromatic)`, { executor: { name: 'sb_node_22_classic', @@ -254,7 +244,7 @@ export function defineSandboxFlow(key: Key) { [buildJob] ); const vitestJob = defineJob( - names.vitest, + `${name} (vitest)`, { executor: { name: 'sb_playwright', @@ -274,7 +264,7 @@ export function defineSandboxFlow(key: Key) { [buildJob] ); const e2eJob = defineJob( - names.e2e, + `${name} (e2e)`, { executor: { name: 'sb_playwright', @@ -305,7 +295,7 @@ export function defineSandboxFlow(key: Key) { [buildJob] ); const testRunnerJob = defineJob( - names.testRunner, + `${name} (test-runner)`, { executor: { name: 'sb_playwright', From fd6d4bb48e228cf5edfd1fe4106c908d63219011 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 09:55:41 +0100 Subject: [PATCH 270/310] delete unused executor --- scripts/ci/utils/executors.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/scripts/ci/utils/executors.ts b/scripts/ci/utils/executors.ts index 32dba767149d..29bd9b7ae4b3 100644 --- a/scripts/ci/utils/executors.ts +++ b/scripts/ci/utils/executors.ts @@ -1,26 +1,6 @@ import { ROOT_DIR, WORKING_DIR } from './constants'; export const executors = { - sb_node_18_browsers: { - docker: [ - { - environment: { - NODE_OPTIONS: '--max_old_space_size=6144', - }, - image: 'cimg/node:18.20.3-browsers', - }, - ], - parameters: { - class: { - default: 'small', - description: 'The Resource class', - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'], - type: 'enum', - }, - }, - resource_class: '<>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, - }, sb_node_22_browsers: { docker: [ { From 93c72eafce4dc54039b53ed72266adca3cd14348 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 10:11:19 +0100 Subject: [PATCH 271/310] add a helper note what the order workflows are --- scripts/ci/utils/types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index ff25743d2b12..2964b73335c5 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -109,6 +109,8 @@ export type Workflow = (typeof parameters.workflow.enum)[number]; /** * Checks if the current workflow is at least the minimum workflow. * + * `docs` → `normal` → `merged` → `daily` + * * @example * * ```ts From 48c58cad5731ecadfb8352272c5f79ada9dd06d4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 10:13:28 +0100 Subject: [PATCH 272/310] I need a completely unique workflow ID, to run, so I can compare that single run CI credit usage --- scripts/ci/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 3a0a45ec8c2f..f6a2cfa0c580 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -118,7 +118,7 @@ function generateConfig(workflow: Workflow) { {} as Record ), workflows: { - [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { + [`${workflow}-generated${isDebugging ? '-debug' : ''}-comparison`]: { jobs: sorted.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires.map((r) => r.id) } } From e14b5ffe47e788383ed083d0a4e7c59ece71a459 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 11:12:45 +0100 Subject: [PATCH 273/310] Discard changes to yarn.lock --- yarn.lock | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/yarn.lock b/yarn.lock index 03bc76ea4125..93ec6bf941cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10915,12 +10915,12 @@ __metadata: languageName: node linkType: hard -"@volar/language-core@npm:2.4.23": - version: 2.4.23 - resolution: "@volar/language-core@npm:2.4.23" +"@volar/language-core@npm:2.4.27": + version: 2.4.27 + resolution: "@volar/language-core@npm:2.4.27" dependencies: - "@volar/source-map": "npm:2.4.23" - checksum: 10c0/1b8d60c7c0faa29ef5ec46dd2b673227592d0697753767e4df088f7c2d93843828116fe59472bb9d604ba653400be32a538e985730844b1af4f42a7075e62049 + "@volar/source-map": "npm:2.4.27" + checksum: 10c0/8fe021ecb0654dde1e221bba4d456d681454fa06a4aff16d0b027d5a1b0514be72bf899c6a515d8e9254ffbd468690e296ffb4cae7e63f6a4ec359d5e8a718be languageName: node linkType: hard @@ -10931,10 +10931,10 @@ __metadata: languageName: node linkType: hard -"@volar/source-map@npm:2.4.23": - version: 2.4.23 - resolution: "@volar/source-map@npm:2.4.23" - checksum: 10c0/08af690093b811d0a37bdd8d306755b4e7f1535b67625c26f6fa6eb9ae081e24c55dabc8231ce8856aa1b731a5ac137b3f0449b34c093923c3545afdbe462c7a +"@volar/source-map@npm:2.4.27": + version: 2.4.27 + resolution: "@volar/source-map@npm:2.4.27" + checksum: 10c0/717db4d98cf70a9a12fcde71fb92854d19d3aa0e62b7343865c7bb624a5f691579e5f8b8d33f851cf6bebb8a69de372d12586b6f66947ed65b9ad58fdad941bf languageName: node linkType: hard @@ -10949,14 +10949,14 @@ __metadata: languageName: node linkType: hard -"@volar/typescript@npm:2.4.23": - version: 2.4.23 - resolution: "@volar/typescript@npm:2.4.23" +"@volar/typescript@npm:2.4.27": + version: 2.4.27 + resolution: "@volar/typescript@npm:2.4.27" dependencies: - "@volar/language-core": "npm:2.4.23" + "@volar/language-core": "npm:2.4.27" path-browserify: "npm:^1.0.1" vscode-uri: "npm:^3.0.8" - checksum: 10c0/dbb449b66e627a75f8f6df98b3210c32edff62747a12d1e6237a6dc2a75f26432833d4d3646d6fbd60ed21fa52d7e342437377973b80cf4bbeacee1980ffd0cb + checksum: 10c0/63127dc16c5f2eb346f53d62b6414418935cd48b81f82152c755e8bac61d28eb17ee47e6adcea535c74b84830ca5b78862b9f8fa1574dcd4abec1c50ae935a7a languageName: node linkType: hard @@ -11041,23 +11041,18 @@ __metadata: languageName: node linkType: hard -"@vue/language-core@npm:3.1.4": - version: 3.1.4 - resolution: "@vue/language-core@npm:3.1.4" +"@vue/language-core@npm:3.2.1": + version: 3.2.1 + resolution: "@vue/language-core@npm:3.2.1" dependencies: - "@volar/language-core": "npm:2.4.23" + "@volar/language-core": "npm:2.4.27" "@vue/compiler-dom": "npm:^3.5.0" "@vue/shared": "npm:^3.5.0" alien-signals: "npm:^3.0.0" muggle-string: "npm:^0.4.1" path-browserify: "npm:^1.0.1" picomatch: "npm:^4.0.2" - peerDependencies: - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/8d2b4b9ed332920bdc0bebc9a11ccd83fd286666d398222ffec7f104a3b0e2b15dc44d69359497a7e98c6bfd5a9bbd2d16b08ee9384d992841ea7cb26e82275e + checksum: 10c0/d83021599d6efbd8a54e8f8ac0c8eed3af44ada111a5f403c0c44537adc66a6bf03668de5786828d41dc38226d8372e821be23df4cc0ea506155985440e74406 languageName: node linkType: hard @@ -31080,16 +31075,16 @@ __metadata: linkType: hard "vue-tsc@npm:latest": - version: 3.1.4 - resolution: "vue-tsc@npm:3.1.4" + version: 3.2.1 + resolution: "vue-tsc@npm:3.2.1" dependencies: - "@volar/typescript": "npm:2.4.23" - "@vue/language-core": "npm:3.1.4" + "@volar/typescript": "npm:2.4.27" + "@vue/language-core": "npm:3.2.1" peerDependencies: typescript: ">=5.0.0" bin: - vue-tsc: ./bin/vue-tsc.js - checksum: 10c0/486134e018705abd791215093842846d54faaf4dc143a52651dd3fd3874683bc0faa8d5c6942b66338487fa371004d9901930b0d500c62345dc326686b6e0fbe + vue-tsc: bin/vue-tsc.js + checksum: 10c0/f04d4586c78d234955ab2bff1ac4ef5065fc2f84bc88a2838df8f1a6e15373c01c4c24ae8deeb6c0a68cb192c3774f478220ece0fcce273c6d2a28d3d9c3b303 languageName: node linkType: hard From 3d49093954243d4d520774243866de840f298bf4 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 11:54:21 +0100 Subject: [PATCH 274/310] use platform-specific root directories and improve working directory paths for Windows and Linux environments --- .../cli-storybook/src/sandbox-templates.ts | 7 +++-- scripts/ci/code.ts | 14 +++++----- scripts/ci/init-empty.ts | 6 ++-- scripts/ci/main.ts | 2 +- scripts/ci/sandboxes.ts | 28 +++++++++---------- scripts/ci/utils/constants.ts | 3 +- scripts/ci/utils/executors.ts | 8 +++--- scripts/ci/utils/helpers.ts | 8 +++--- scripts/ci/utils/types.ts | 1 + 9 files changed, 40 insertions(+), 37 deletions(-) diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index cf381faf1a5f..d50953324e42 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -4,6 +4,10 @@ import { type StoriesEntry, type StorybookConfigRaw } from 'storybook/internal/t import { ProjectType } from '../../../core/src/cli/projectTypes'; import { SupportedBuilder } from '../../../core/src/types/modules/builders'; +export type TemplateType = Pick; +export type AllTemplatesKey = keyof typeof allTemplates; +export type AllTemplatesType = Record; + export type SkippableTask = | 'smoke-test' | 'test-runner' @@ -1041,6 +1045,3 @@ export const daily: TemplateKey[] = [ ]; export const templatesByCadence = { normal, merged, daily }; -export type TemplateType = Pick; -export type AllTemplatesKey = keyof typeof allTemplates; -export type AllTemplatesType = Record; diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index 4cfc2a9a648d..0c0abbcd6b6c 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -2,7 +2,7 @@ import glob from 'fast-glob'; import { join } from 'path/posix'; -import { WORKING_DIR } from './utils/constants'; +import { WINDOWS_ROOT_DIR, WORKING_DIR } from './utils/constants'; import { CACHE_KEYS, CACHE_PATHS, @@ -120,7 +120,7 @@ export const build_windows = defineJob('Build (windows)', { `.verdaccio-cache`, `code/bench`, ], - 'C:\\Users\\circleci\\project' + `${WINDOWS_ROOT_DIR}\\${WORKING_DIR}` ), ], }); @@ -218,7 +218,7 @@ export const knip = defineJob( { executor: { name: 'sb_node_22_classic', - class: 'xlarge', + class: 'medium', }, steps: [ ...workflow.restore_linux(), @@ -239,7 +239,7 @@ export const testsUnit_linux = defineJob( { executor: { name: 'sb_node_22_classic', - class: 'xlarge', + class: 'large', }, steps: [ ...workflow.restore_linux(), @@ -297,11 +297,11 @@ export const testUnit_windows = defineJob( { executor: { name: 'win/default', - size: 'medium', + size: 'large', shell: 'bash.exe', }, steps: [ - ...workflow.restore_windows('C:\\Users\\circleci\\project'), + ...workflow.restore_windows(`${WINDOWS_ROOT_DIR}\\${WORKING_DIR}`), { run: { command: 'yarn install', @@ -327,7 +327,7 @@ export const benchmarkPackages = defineJob( { executor: { name: 'sb_node_22_classic', - class: 'xlarge', + class: 'large', }, steps: [ ...workflow.restore_linux(), diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 59c91368f5db..0d7ab50c920c 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,4 +1,5 @@ import { build_linux } from './code'; +import { WINDOWS_ROOT_DIR } from './utils/constants'; import { server, verdaccio, workflow } from './utils/helpers'; import { type JobsOrHub, @@ -108,7 +109,7 @@ export function defineEmptyInitWindows() { { run: { name: 'Storybook init from empty directory (Windows NPM)', - working_directory: 'C:\\Users\\circleci', + working_directory: WINDOWS_ROOT_DIR, command: [ `mkdir empty-react-vite-ts`, `cd empty-react-vite-ts`, @@ -125,7 +126,7 @@ export function defineEmptyInitWindows() { { run: { name: 'Run storybook smoke test', - working_directory: 'C:\\Users\\circleci\\empty-react-vite-ts', + working_directory: `${WINDOWS_ROOT_DIR}\\empty-react-vite-ts`, command: 'npm run storybook -- --smoke-test', }, }, @@ -142,7 +143,6 @@ export function getInitEmpty(workflow: Workflow) { if (isWorkflowOrAbove(workflow, 'merged')) { initEmpty.push(...['nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map(defineEmptyInitFlow)); - initEmpty.push(defineEmptyInitWindows()); } diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index f6a2cfa0c580..3a0a45ec8c2f 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -118,7 +118,7 @@ function generateConfig(workflow: Workflow) { {} as Record ), workflows: { - [`${workflow}-generated${isDebugging ? '-debug' : ''}-comparison`]: { + [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { jobs: sorted.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires.map((r) => r.id) } } diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 4a459a00a5ea..751ce2619ef9 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -2,7 +2,7 @@ import { join } from 'path'; import * as sandboxTemplates from '../../code/lib/cli-storybook/src/sandbox-templates'; import { build_linux } from './code'; -import { ROOT_DIR, SANDBOX_DIR, WORKING_DIR } from './utils/constants'; +import { LINUX_ROOT_DIR, SANDBOX_DIR, WINDOWS_ROOT_DIR, WORKING_DIR } from './utils/constants'; import { CACHE_KEYS, artifact, @@ -99,10 +99,10 @@ function defineSandboxJob_dev({ }, }, artifact.persist( - join(ROOT_DIR, SANDBOX_DIR, directory, 'test-results'), + join(LINUX_ROOT_DIR, SANDBOX_DIR, directory, 'test-results'), 'test-results' ), - testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), + testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ] : [ { @@ -187,13 +187,13 @@ export function defineSandboxFlow(key: Key) { { run: { name: 'Run prepare', - working_directory: `${ROOT_DIR}/${SANDBOX_DIR}/${id}`, + working_directory: `${LINUX_ROOT_DIR}/${SANDBOX_DIR}/${id}`, command: `yarn prepare`, }, }, ] : []), - artifact.persist(`${ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), + artifact.persist(`${LINUX_ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), workspace.persist([`${SANDBOX_DIR}/${id}`]), ], }, @@ -227,7 +227,7 @@ export function defineSandboxFlow(key: Key) { // we copy to the working directory to get git history, which chromatic needs for baselines run: { name: 'Copy sandbox to working directory', - command: `cp ${join(ROOT_DIR, SANDBOX_DIR)} ${join(ROOT_DIR, WORKING_DIR, 'sandbox')} -r --remove-destination`, + command: `cp ${join(LINUX_ROOT_DIR, SANDBOX_DIR)} ${join(LINUX_ROOT_DIR, WORKING_DIR, 'sandbox')} -r --remove-destination`, }, }, { @@ -258,7 +258,7 @@ export function defineSandboxFlow(key: Key) { command: `yarn task vitest-integration --template ${key} --no-link -s vitest-integration --junit`, }, }, - testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), + testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ], }, [buildJob] @@ -289,7 +289,7 @@ export function defineSandboxFlow(key: Key) { ].join('\n'), }, }, - testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), + testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ], }, [buildJob] @@ -309,7 +309,7 @@ export function defineSandboxFlow(key: Key) { command: `yarn task test-runner --template ${key} --no-link -s test-runner --junit`, }, }, - testResults.persist(join(ROOT_DIR, WORKING_DIR, 'test-results')), + testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ], }, [buildJob] @@ -358,7 +358,7 @@ export function defineSandboxTestRunner(sandbox: ReturnType>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + working_directory: `${LINUX_ROOT_DIR}/${WORKING_DIR}`, }, sb_node_22_classic: { docker: [ @@ -39,7 +39,7 @@ export const executors = { }, }, resource_class: '<>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + working_directory: `${LINUX_ROOT_DIR}/${WORKING_DIR}`, }, sb_playwright: { docker: [ @@ -59,6 +59,6 @@ export const executors = { }, }, resource_class: '<>', - working_directory: `${ROOT_DIR}/${WORKING_DIR}`, + working_directory: `${LINUX_ROOT_DIR}/${WORKING_DIR}`, }, } as const; diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 2ed1a65e7258..18f59039c213 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -1,15 +1,15 @@ -import { ROOT_DIR } from './constants'; +import { LINUX_ROOT_DIR, WINDOWS_ROOT_DIR } from './constants'; import { type JobsOrHub } from './types'; export const workspace = { - attach: (at = ROOT_DIR) => { + attach: (at = LINUX_ROOT_DIR) => { return { attach_workspace: { at, }, }; }, - persist: (paths: string[], root = ROOT_DIR) => { + persist: (paths: string[], root = LINUX_ROOT_DIR) => { return { persist_to_workspace: { paths, @@ -174,7 +174,7 @@ export const workflow = { workspace.attach(), cache.attach(CACHE_KEYS()), ], - restore_windows: (at = 'C:\\Users\\circleci') => [ + restore_windows: (at = WINDOWS_ROOT_DIR) => [ git.checkout({ forceHttps: true }), node.installOnWindows(), workspace.attach(at), diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index 2964b73335c5..e6a325bb1b19 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -45,6 +45,7 @@ export type JobImplementation = { * } * ``` * + * @see https://circleci.com/docs/guides/orchestrate/jobs-steps/#steps-overview * @todo Make this more type-strict, maybe with a union type of step objects. See the example * above. */ From 49d57e8fb4b6f5b0c609c2dd219818405a4fec45 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 11:54:46 +0100 Subject: [PATCH 275/310] check if logbox is working now --- code/core/src/node-logger/logger/logger.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/core/src/node-logger/logger/logger.ts b/code/core/src/node-logger/logger/logger.ts index dd282c50da95..0f698d13be73 100644 --- a/code/core/src/node-logger/logger/logger.ts +++ b/code/core/src/node-logger/logger/logger.ts @@ -166,9 +166,9 @@ type BoxOptions = { } & clack.BoxOptions; export const logBox = (message: string, { title, ...options }: BoxOptions = {}) => { - if (process.env.CI) { - return; - } + // if (process.env.CI) { + // return; + // } if (shouldLog('info')) { logTracker.addLog('info', message); if (isClackEnabled()) { From 0bb1dec6994ad1bf6bb758f684470bf473a526d8 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 12:12:27 +0100 Subject: [PATCH 276/310] add comment about filtering capabilities of CI --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3fa90bab337..5472f281b06e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -206,6 +206,17 @@ yarn build --prod --watch angular storybook addon-docs You can pick a specific template to use as your sandbox by running `yarn task`, which will prompt you to make further choices about which template you want and which task you want to run. +### Focussing on fixing a sandbox in CI + +Our CI runs many sandboxes, especially when selecting the `ci:daily` workflow. + +When a particular sandbox is failing, it's preferred to debug locally, but if this is somehow not possible, you can force the Ci to focus on a selection of sandboxes instead of running all. Here's the process of how: + +Inside of here you can edit the filter-function: +https://github.com/storybookjs/storybook/blob/3d49093954243d4d520774243866de840f298bf4/scripts/ci/main.ts#L70-L88 + +In fact you can filter on any job you wish, only running `test-runner`, `e2e`, `vite`-sandboxes, etc. + ## Troubleshooting ### The initialization process throws an error From 340119454a0b4d4514ed7f668a85bb4d7450e83d Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 12:17:37 +0100 Subject: [PATCH 277/310] re-enable logBox with catch --- code/core/src/node-logger/logger/logger.ts | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/code/core/src/node-logger/logger/logger.ts b/code/core/src/node-logger/logger/logger.ts index 0f698d13be73..8295d8d43e18 100644 --- a/code/core/src/node-logger/logger/logger.ts +++ b/code/core/src/node-logger/logger/logger.ts @@ -166,19 +166,21 @@ type BoxOptions = { } & clack.BoxOptions; export const logBox = (message: string, { title, ...options }: BoxOptions = {}) => { - // if (process.env.CI) { - // return; - // } - if (shouldLog('info')) { - logTracker.addLog('info', message); - if (isClackEnabled()) { - clack.box(message, title, { - ...options, - width: options.width ?? 'auto', - }); - } else { - console.log(message); + try { + if (shouldLog('info')) { + logTracker.addLog('info', message); + if (isClackEnabled()) { + clack.box(message, title, { + ...options, + width: options.width ?? 'auto', + }); + } else { + console.log(message); + } } + } catch (error) { + console.error(error); + console.log(message); } }; From 5f1ced5ea9ecd0f7ca105b69576a846dd47f5435 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 2 Jan 2026 12:51:37 +0100 Subject: [PATCH 278/310] Simplify conditinal preview adjustments for mocks --- scripts/tasks/sandbox-parts.ts | 44 ++++++++++++++++------------------ 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index 5aee72f565fb..300f0845b986 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -881,7 +881,11 @@ export const extendPreview: Task['run'] = async ({ template, sandboxDir }) => { previewConfig.setFieldValue(['tags'], ['vitest']); } - if (template.modifications?.skipMocking) { + const isCoreRenderer = + template.expected.renderer.startsWith('@storybook/') && + template.expected.renderer !== '@storybook/server'; + + if (template.modifications?.skipMocking || !isCoreRenderer) { await writeConfig(previewConfig); return; } @@ -889,28 +893,22 @@ export const extendPreview: Task['run'] = async ({ template, sandboxDir }) => { previewConfig.setImport(['sb'], 'storybook/test'); let config = formatConfig(previewConfig); - const isCoreRenderer = - template.expected.renderer.startsWith('@storybook/') && - template.expected.renderer !== '@storybook/server'; - - if (isCoreRenderer) { - const mockBlock = [ - "sb.mock('../template-stories/core/test/ModuleMocking.utils.ts');", - "sb.mock('../template-stories/core/test/ModuleSpyMocking.utils.ts', { spy: true });", - "sb.mock('../template-stories/core/test/ModuleAutoMocking.utils.ts');", - "sb.mock(import('lodash-es'));", - "sb.mock(import('lodash-es/add'));", - "sb.mock(import('lodash-es/sum'));", - "sb.mock(import('uuid'));", - '', - ].join('\n'); - - // find last import statement and append sb.mock calls - config = config.replace( - 'import { sb } from "storybook/test";', - `import { sb } from 'storybook/test';\n\n${mockBlock}` - ); - } + const mockBlock = [ + "sb.mock('../template-stories/core/test/ModuleMocking.utils.ts');", + "sb.mock('../template-stories/core/test/ModuleSpyMocking.utils.ts', { spy: true });", + "sb.mock('../template-stories/core/test/ModuleAutoMocking.utils.ts');", + "sb.mock(import('lodash-es'));", + "sb.mock(import('lodash-es/add'));", + "sb.mock(import('lodash-es/sum'));", + "sb.mock(import('uuid'));", + '', + ].join('\n'); + + // find last import statement and append sb.mock calls + config = config.replace( + 'import { sb } from "storybook/test";', + `import { sb } from 'storybook/test';\n\n${mockBlock}` + ); await writeFile(previewConfig.fileName, config); }; From 8207ee435357f43c11bf55a7a6c6739cdef18815 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 12:54:23 +0100 Subject: [PATCH 279/310] Update logBox error handling to log message on catch without throwing --- code/core/src/node-logger/logger/logger.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/code/core/src/node-logger/logger/logger.ts b/code/core/src/node-logger/logger/logger.ts index 8295d8d43e18..8e23147e6f66 100644 --- a/code/core/src/node-logger/logger/logger.ts +++ b/code/core/src/node-logger/logger/logger.ts @@ -178,9 +178,14 @@ export const logBox = (message: string, { title, ...options }: BoxOptions = {}) console.log(message); } } - } catch (error) { - console.error(error); - console.log(message); + } catch { + /** + * Clack.logBox can throw with "Invalid count value"-errors + * + * Possibly it may only happen on CI, but considering rendering a box is not critical, we will + * just log the message to the console and discard the error. + */ + clack.log.message(message); } }; From 90a64c594dcdcbdb6128b02b2c7aca5498c22849 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 15:24:41 +0100 Subject: [PATCH 280/310] add comment --- scripts/ci/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 3a0a45ec8c2f..c27ce368e51b 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -30,6 +30,12 @@ import { type JobImplementation, type Workflow, isWorkflowOrAbove } from './util const dirname = import.meta.dirname; +/** + * Generate the CircleCI config for a given workflow. + * + * @param workflow - The workflow to generate the config for. + * @returns The generated config for CircleCI in JS format. + */ function generateConfig(workflow: Workflow) { const todos: JobsOrHub[] = []; if (isWorkflowOrAbove(workflow, 'docs')) { From e4a931412a95525faaa29c2795e2f5f3d1d2d72e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 2 Jan 2026 16:09:53 +0100 Subject: [PATCH 281/310] add a way to skip playwright install on CI --- code/core/src/cli/AddonVitestService.ts | 5 +++++ scripts/ci/code.ts | 4 ++-- scripts/ci/sandboxes.ts | 1 + scripts/ci/utils/types.ts | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/core/src/cli/AddonVitestService.ts b/code/core/src/cli/AddonVitestService.ts index b4c2a8e64c5f..a8375d0fa5f0 100644 --- a/code/core/src/cli/AddonVitestService.ts +++ b/code/core/src/cli/AddonVitestService.ts @@ -124,6 +124,11 @@ export class AddonVitestService { let result: 'installed' | 'skipped' | 'aborted' | 'failed'; + if (process.env.STORYBOOK_CLI_SKIP_PLAYWRIGHT_INSTALLATION) { + result = 'skipped'; + return { errors, result }; + } + try { const shouldBeInstalled = options.yes ? true diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index 0c0abbcd6b6c..cbe64e326fb2 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -34,16 +34,16 @@ export const build_linux = defineJob('Build (linux)', { npm.check(), { run: { - command: 'yarn task --task compile --start-from=auto --no-link --debug', name: 'Compile', working_directory: `code`, + command: 'yarn task --task compile --start-from=auto --no-link --debug', }, }, { run: { - command: 'yarn local-registry --publish', name: 'Publish to Verdaccio', working_directory: `code`, + command: 'yarn local-registry --publish', }, }, ...workflow.report_on_failure(), diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 751ce2619ef9..f15bc6f5e52f 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -177,6 +177,7 @@ export function defineSandboxFlow(key: Key) { name: 'Create Sandbox', command: `yarn task sandbox --template ${key} --no-link -s sandbox --debug`, environment: { + STORYBOOK_CLI_SKIP_PLAYWRIGHT_INSTALLATION: 1, STORYBOOK_TELEMETRY_DEBUG: 1, STORYBOOK_TELEMETRY_URL: 'http://127.0.0.1:6007/event-log', }, diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index e6a325bb1b19..6cc673d3c758 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -110,7 +110,9 @@ export type Workflow = (typeof parameters.workflow.enum)[number]; /** * Checks if the current workflow is at least the minimum workflow. * - * `docs` → `normal` → `merged` → `daily` + * `normal` → `merged` → `daily` + * + * `docs` is unique, in that it's not considered below of above anything. * * @example * From 9f013b9c2071a6598048cab2c3896610a01fc14a Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 13:45:08 +0100 Subject: [PATCH 282/310] consistent casing/naming --- scripts/ci/code.ts | 30 +++++++++++++++--------------- scripts/ci/init-empty.ts | 6 +++--- scripts/ci/sandboxes.ts | 18 +++++++++--------- scripts/ci/test-storybooks.ts | 6 +++--- scripts/ci/utils/helpers.ts | 8 ++++---- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/scripts/ci/code.ts b/scripts/ci/code.ts index cbe64e326fb2..72069aea7bd5 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/code.ts @@ -46,7 +46,7 @@ export const build_linux = defineJob('Build (linux)', { command: 'yarn local-registry --publish', }, }, - ...workflow.report_on_failure(), + ...workflow.reportOnFailure(), artifact.persist(`code/bench/esbuild-metafiles`, 'bench'), workspace.persist([ ...glob @@ -135,7 +135,7 @@ export const storybookChromatic = defineJob( class: 'medium+', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Build internal storybook', @@ -163,7 +163,7 @@ export const check = defineJob( class: 'xlarge', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'TypeCheck code', @@ -178,8 +178,8 @@ export const check = defineJob( command: 'yarn check', }, }, - ...workflow.report_on_failure(), - ...workflow.cancel_on_failure(), + ...workflow.reportOnFailure(), + ...workflow.cancelOnFailure(), ], }, [codeHub] @@ -193,7 +193,7 @@ export const lint = defineJob( class: 'xlarge', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Lint code', @@ -221,7 +221,7 @@ export const knip = defineJob( class: 'medium', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Run Knip', @@ -242,7 +242,7 @@ export const testsUnit_linux = defineJob( class: 'large', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Run tests', @@ -256,8 +256,8 @@ export const testsUnit_linux = defineJob( testResults.persist(`code/test-results`), git.check(), - ...workflow.report_on_failure(), - ...workflow.cancel_on_failure(), + ...workflow.reportOnFailure(), + ...workflow.cancelOnFailure(), ], }, [codeHub] @@ -271,7 +271,7 @@ export const testsStories_linux = defineJob( class: 'xlarge', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Run stories tests', @@ -285,8 +285,8 @@ export const testsStories_linux = defineJob( testResults.persist(`code/test-results`), git.check(), - ...workflow.report_on_failure(), - ...workflow.cancel_on_failure(), + ...workflow.reportOnFailure(), + ...workflow.cancelOnFailure(), ], }, [codeHub] @@ -301,7 +301,7 @@ export const testUnit_windows = defineJob( shell: 'bash.exe', }, steps: [ - ...workflow.restore_windows(`${WINDOWS_ROOT_DIR}\\${WORKING_DIR}`), + ...workflow.restoreWindows(`${WINDOWS_ROOT_DIR}\\${WORKING_DIR}`), { run: { command: 'yarn install', @@ -330,7 +330,7 @@ export const benchmarkPackages = defineJob( class: 'large', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), verdaccio.start(), server.wait([...verdaccio.ports]), { diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 0d7ab50c920c..410ef5fa14e0 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -18,7 +18,7 @@ export const defineEmptyInitFlow = (template: string) => class: 'medium', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -60,7 +60,7 @@ export function defineEmptyInitFeatures() { class: 'medium', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), verdaccio.start(), server.wait([...verdaccio.ports]), { @@ -103,7 +103,7 @@ export function defineEmptyInitWindows() { shell: 'bash.exe', }, steps: [ - ...workflow.restore_windows(), + ...workflow.restoreWindows(), verdaccio.start(), server.wait([...verdaccio.ports]), { diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index f15bc6f5e52f..a9f8acf81b4b 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -36,7 +36,7 @@ function defineSandboxJob_build({ class: 'large', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Build storybook', @@ -77,7 +77,7 @@ function defineSandboxJob_dev({ class: 'large', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), ...(options.e2e ? [ { @@ -135,7 +135,7 @@ export function defineSandboxFlow(key: Key) { class: 'large', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), verdaccio.start(), { run: { @@ -252,7 +252,7 @@ export function defineSandboxFlow(key: Key) { class: 'medium', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Running Vitest', @@ -272,7 +272,7 @@ export function defineSandboxFlow(key: Key) { class: 'xlarge', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Serve storybook', @@ -303,7 +303,7 @@ export function defineSandboxFlow(key: Key) { class: 'medium', }, steps: [ - ...workflow.restore_linux(), + ...workflow.restoreLinux(), { run: { name: 'Running test-runner', @@ -352,7 +352,7 @@ export function defineSandboxTestRunner(sandbox: ReturnType [ + restoreLinux: () => [ // git.checkout(), workspace.attach(), cache.attach(CACHE_KEYS()), ], - restore_windows: (at = WINDOWS_ROOT_DIR) => [ + restoreWindows: (at = WINDOWS_ROOT_DIR) => [ git.checkout({ forceHttps: true }), node.installOnWindows(), workspace.attach(at), @@ -192,7 +192,7 @@ export const workflow = { }, }, ], - cancel_on_failure: () => { + cancelOnFailure: () => { return [ { run: { @@ -204,7 +204,7 @@ export const workflow = { }, ]; }, - report_on_failure: () => { + reportOnFailure: () => { return [ { run: { From a65bc9cf39cac28075d4537dfacebdf4b97df510 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 13:45:34 +0100 Subject: [PATCH 283/310] add comment explaining sveltekit unique step --- scripts/ci/sandboxes.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index a9f8acf81b4b..4dbf20c73932 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -183,6 +183,10 @@ export function defineSandboxFlow(key: Key) { }, }, }, + /** + * Due to the way we create sandboxes, a unique situation arises where a sveltekit + * cache-config-file is missing. This generates it. + */ ...(id.includes('svelte-kit') ? [ { From dcbc1390b8ff66dc275d111db570af15b6a98bb0 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 13:59:31 +0100 Subject: [PATCH 284/310] rename code to common-jobs --- scripts/ci/{code.ts => common-jobs.ts} | 24 +++++++++--------------- scripts/ci/init-empty.ts | 2 +- scripts/ci/main.ts | 6 +++--- scripts/ci/sandboxes.ts | 2 +- scripts/ci/test-storybooks.ts | 2 +- 5 files changed, 15 insertions(+), 21 deletions(-) rename scripts/ci/{code.ts => common-jobs.ts} (96%) diff --git a/scripts/ci/code.ts b/scripts/ci/common-jobs.ts similarity index 96% rename from scripts/ci/code.ts rename to scripts/ci/common-jobs.ts index 72069aea7bd5..ee77447d1fe5 100644 --- a/scripts/ci/code.ts +++ b/scripts/ci/common-jobs.ts @@ -99,13 +99,7 @@ export const build_windows = defineJob('Build (windows)', { command: 'yarn task --task compile --start-from=auto --no-link --debug', }, }, - { - run: { - name: 'Publish to Verdaccio', - working_directory: `code`, - command: 'yarn local-registry --publish', - }, - }, + verdaccio.start(), workspace.persist( [ ...glob @@ -125,7 +119,7 @@ export const build_windows = defineJob('Build (windows)', { ], }); -export const codeHub = defineHub('code', [build_linux]); +export const commonJobsHub = defineHub('Common Jobs', [build_linux]); export const storybookChromatic = defineJob( 'Local storybook & chromatic', @@ -152,7 +146,7 @@ export const storybookChromatic = defineJob( }, ], }, - [codeHub] + [commonJobsHub] ); export const check = defineJob( @@ -182,7 +176,7 @@ export const check = defineJob( ...workflow.cancelOnFailure(), ], }, - [codeHub] + [commonJobsHub] ); export const lint = defineJob( @@ -210,7 +204,7 @@ export const lint = defineJob( }, ], }, - [codeHub] + [commonJobsHub] ); export const knip = defineJob( @@ -231,7 +225,7 @@ export const knip = defineJob( }, ], }, - [codeHub] + [commonJobsHub] ); export const testsUnit_linux = defineJob( @@ -260,7 +254,7 @@ export const testsUnit_linux = defineJob( ...workflow.cancelOnFailure(), ], }, - [codeHub] + [commonJobsHub] ); export const testsStories_linux = defineJob( @@ -289,7 +283,7 @@ export const testsStories_linux = defineJob( ...workflow.cancelOnFailure(), ], }, - [codeHub] + [commonJobsHub] ); export const testUnit_windows = defineJob( @@ -343,5 +337,5 @@ export const benchmarkPackages = defineJob( }, ], }, - [codeHub] + [commonJobsHub] ); diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 410ef5fa14e0..80b53ab53acb 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -1,4 +1,4 @@ -import { build_linux } from './code'; +import { build_linux } from './common-jobs'; import { WINDOWS_ROOT_DIR } from './utils/constants'; import { server, verdaccio, workflow } from './utils/helpers'; import { diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index c27ce368e51b..4069a751262f 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -9,7 +9,7 @@ import { build_linux, build_windows, check, - codeHub, + commonJobsHub, knip, lint, prettyDocs, @@ -17,7 +17,7 @@ import { testUnit_windows, testsStories_linux, testsUnit_linux, -} from './code'; +} from './common-jobs'; import { getInitEmpty, initEmptyHub } from './init-empty'; import { getSandboxes, sandboxesHub } from './sandboxes'; import { getTestStorybooks, testStorybooksHub } from './test-storybooks'; @@ -54,7 +54,7 @@ function generateConfig(workflow: Workflow) { testsUnit_linux, testsStories_linux, - codeHub, + commonJobsHub, lint, check, knip, diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 4dbf20c73932..0e6f74b0c50f 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -1,7 +1,7 @@ import { join } from 'path'; import * as sandboxTemplates from '../../code/lib/cli-storybook/src/sandbox-templates'; -import { build_linux } from './code'; +import { build_linux } from './common-jobs'; import { LINUX_ROOT_DIR, SANDBOX_DIR, WINDOWS_ROOT_DIR, WORKING_DIR } from './utils/constants'; import { CACHE_KEYS, diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index f3cd87250974..9bb1154ab87e 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -1,7 +1,7 @@ import { readFileSync } from 'fs'; import { join } from 'path/posix'; -import { build_linux } from './code'; +import { build_linux } from './common-jobs'; import { artifact, workflow } from './utils/helpers'; import { type JobsOrHub, From 7fb9cd586a382f5bd4355da9c7a3f1dffae18ff1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 14:04:27 +0100 Subject: [PATCH 285/310] rename --- scripts/ci/main.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 4069a751262f..c3c5373bbf51 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -37,19 +37,19 @@ const dirname = import.meta.dirname; * @returns The generated config for CircleCI in JS format. */ function generateConfig(workflow: Workflow) { - const todos: JobsOrHub[] = []; + const jobs: JobsOrHub[] = []; if (isWorkflowOrAbove(workflow, 'docs')) { - todos.push(prettyDocs); + jobs.push(prettyDocs); } else { const sandboxes = getSandboxes(workflow); const testStorybooks = getTestStorybooks(workflow); const initEmpty = getInitEmpty(workflow); if (isWorkflowOrAbove(workflow, 'merged')) { - todos.push(build_windows, testUnit_windows); + jobs.push(build_windows, testUnit_windows); } - todos.push( + jobs.push( build_linux, testsUnit_linux, testsStories_linux, @@ -91,13 +91,13 @@ function generateConfig(workflow: Workflow) { * const filteredTodos = todos.filter((job) => !!job.id.includes('qwik')); * ``` */ - const filteredTodos = todos.filter((job) => !!job); + const filteredJobs = jobs.filter((job) => !!job); - const isDebugging = filteredTodos.length !== todos.length; + const isDebugging = filteredJobs.length !== jobs.length; - const ensured = ensureRequiredJobs(filteredTodos); + const ensuredJobs = ensureRequiredJobs(filteredJobs); - const sorted = ensured.sort((a, b) => { + const sortedJobs = ensuredJobs.sort((a, b) => { if (a.requires.length && b.requires.length) { return a.requires.length - b.requires.length; } @@ -116,7 +116,7 @@ function generateConfig(workflow: Workflow) { executors, parameters, - jobs: sorted.reduce( + jobs: sortedJobs.reduce( (acc, job) => { acc[job.id] = job.implementation; return acc; @@ -125,7 +125,7 @@ function generateConfig(workflow: Workflow) { ), workflows: { [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { - jobs: sorted.map((t) => + jobs: sortedJobs.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires.map((r) => r.id) } } : t.id From 7e573851110faadfea7f6ec632a2ddd374f91015 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 14:08:16 +0100 Subject: [PATCH 286/310] rename hub to noOpJob --- scripts/ci/common-jobs.ts | 18 +++++++++--------- scripts/ci/init-empty.ts | 14 +++++++------- scripts/ci/main.ts | 22 +++++++++++----------- scripts/ci/sandboxes.ts | 14 +++++++------- scripts/ci/test-storybooks.ts | 14 +++++++------- scripts/ci/utils/helpers.ts | 6 +++--- scripts/ci/utils/types.ts | 17 ++++++++++------- 7 files changed, 54 insertions(+), 51 deletions(-) diff --git a/scripts/ci/common-jobs.ts b/scripts/ci/common-jobs.ts index ee77447d1fe5..c9ba49ebb4f9 100644 --- a/scripts/ci/common-jobs.ts +++ b/scripts/ci/common-jobs.ts @@ -17,7 +17,7 @@ import { workflow, workspace, } from './utils/helpers'; -import { defineHub, defineJob } from './utils/types'; +import { defineJob, defineNoOpJob } from './utils/types'; const dirname = import.meta.dirname; @@ -119,7 +119,7 @@ export const build_windows = defineJob('Build (windows)', { ], }); -export const commonJobsHub = defineHub('Common Jobs', [build_linux]); +export const commonJobsNoOpJob = defineNoOpJob('Common Jobs', [build_linux]); export const storybookChromatic = defineJob( 'Local storybook & chromatic', @@ -146,7 +146,7 @@ export const storybookChromatic = defineJob( }, ], }, - [commonJobsHub] + [commonJobsNoOpJob] ); export const check = defineJob( @@ -176,7 +176,7 @@ export const check = defineJob( ...workflow.cancelOnFailure(), ], }, - [commonJobsHub] + [commonJobsNoOpJob] ); export const lint = defineJob( @@ -204,7 +204,7 @@ export const lint = defineJob( }, ], }, - [commonJobsHub] + [commonJobsNoOpJob] ); export const knip = defineJob( @@ -225,7 +225,7 @@ export const knip = defineJob( }, ], }, - [commonJobsHub] + [commonJobsNoOpJob] ); export const testsUnit_linux = defineJob( @@ -254,7 +254,7 @@ export const testsUnit_linux = defineJob( ...workflow.cancelOnFailure(), ], }, - [commonJobsHub] + [commonJobsNoOpJob] ); export const testsStories_linux = defineJob( @@ -283,7 +283,7 @@ export const testsStories_linux = defineJob( ...workflow.cancelOnFailure(), ], }, - [commonJobsHub] + [commonJobsNoOpJob] ); export const testUnit_windows = defineJob( @@ -337,5 +337,5 @@ export const benchmarkPackages = defineJob( }, ], }, - [commonJobsHub] + [commonJobsNoOpJob] ); diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 80b53ab53acb..0eee8fd7c30c 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -2,10 +2,10 @@ import { build_linux } from './common-jobs'; import { WINDOWS_ROOT_DIR } from './utils/constants'; import { server, verdaccio, workflow } from './utils/helpers'; import { - type JobsOrHub, + type JobOrNoOpJob, type Workflow, - defineHub, defineJob, + defineNoOpJob, isWorkflowOrAbove, } from './utils/types'; @@ -48,7 +48,7 @@ export const defineEmptyInitFlow = (template: string) => ], }, - [initEmptyHub] + [initEmptyNoOpJob] ); export function defineEmptyInitFeatures() { @@ -89,7 +89,7 @@ export function defineEmptyInitFeatures() { }, ], }, - [initEmptyHub] + [initEmptyNoOpJob] ); } @@ -132,14 +132,14 @@ export function defineEmptyInitWindows() { }, ], }, - [initEmptyHub] + [initEmptyNoOpJob] ); } -export const initEmptyHub = defineHub('init-empty', [build_linux]); +export const initEmptyNoOpJob = defineNoOpJob('init-empty', [build_linux]); export function getInitEmpty(workflow: Workflow) { - const initEmpty: JobsOrHub[] = ['react-vite-ts'].map(defineEmptyInitFlow); + const initEmpty: JobOrNoOpJob[] = ['react-vite-ts'].map(defineEmptyInitFlow); if (isWorkflowOrAbove(workflow, 'merged')) { initEmpty.push(...['nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map(defineEmptyInitFlow)); diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index c3c5373bbf51..9b02c2644ee1 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -9,7 +9,7 @@ import { build_linux, build_windows, check, - commonJobsHub, + commonJobsNoOpJob, knip, lint, prettyDocs, @@ -18,14 +18,14 @@ import { testsStories_linux, testsUnit_linux, } from './common-jobs'; -import { getInitEmpty, initEmptyHub } from './init-empty'; -import { getSandboxes, sandboxesHub } from './sandboxes'; -import { getTestStorybooks, testStorybooksHub } from './test-storybooks'; +import { getInitEmpty, initEmptyNoOpJob } from './init-empty'; +import { getSandboxes, sandboxesNoOpJob } from './sandboxes'; +import { getTestStorybooks, testStorybooksNoOpJob } from './test-storybooks'; import { executors } from './utils/executors'; import { ensureRequiredJobs } from './utils/helpers'; import { orbs } from './utils/orbs'; import { parameters } from './utils/parameters'; -import type { HubImplementation, JobsOrHub } from './utils/types'; +import type { JobOrNoOpJob, NoOpJobImplementation } from './utils/types'; import { type JobImplementation, type Workflow, isWorkflowOrAbove } from './utils/types'; const dirname = import.meta.dirname; @@ -37,7 +37,7 @@ const dirname = import.meta.dirname; * @returns The generated config for CircleCI in JS format. */ function generateConfig(workflow: Workflow) { - const jobs: JobsOrHub[] = []; + const jobs: JobOrNoOpJob[] = []; if (isWorkflowOrAbove(workflow, 'docs')) { jobs.push(prettyDocs); } else { @@ -54,7 +54,7 @@ function generateConfig(workflow: Workflow) { testsUnit_linux, testsStories_linux, - commonJobsHub, + commonJobsNoOpJob, lint, check, knip, @@ -62,13 +62,13 @@ function generateConfig(workflow: Workflow) { storybookChromatic, benchmarkPackages, - sandboxesHub, + sandboxesNoOpJob, ...sandboxes, - testStorybooksHub, + testStorybooksNoOpJob, ...testStorybooks, - initEmptyHub, + initEmptyNoOpJob, ...initEmpty ); } @@ -121,7 +121,7 @@ function generateConfig(workflow: Workflow) { acc[job.id] = job.implementation; return acc; }, - {} as Record + {} as Record ), workflows: { [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 0e6f74b0c50f..a2c3e5ea0012 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -14,8 +14,8 @@ import { workflow, workspace, } from './utils/helpers'; -import { defineHub, defineJob, isWorkflowOrAbove } from './utils/types'; -import type { JobsOrHub, Workflow } from './utils/types'; +import { defineJob, defineNoOpJob, isWorkflowOrAbove } from './utils/types'; +import type { JobOrNoOpJob, Workflow } from './utils/types'; function defineSandboxJob_build({ directory, @@ -25,7 +25,7 @@ function defineSandboxJob_build({ }: { directory: string; name: string; - requires: JobsOrHub[]; + requires: JobOrNoOpJob[]; template: string; }) { return defineJob( @@ -58,7 +58,7 @@ function defineSandboxJob_dev({ }: { name: string; directory: string; - requires: JobsOrHub[]; + requires: JobOrNoOpJob[]; template: string; options: { e2e: boolean; @@ -202,7 +202,7 @@ export function defineSandboxFlow(key: Key) { workspace.persist([`${SANDBOX_DIR}/${id}`]), ], }, - [sandboxesHub] + [sandboxesNoOpJob] ); const buildJob = defineSandboxJob_build({ name: `${name} (build)`, @@ -472,7 +472,7 @@ export function defineWindowsSandboxBuild(sandbox: ReturnType { switch (workflow) { @@ -490,7 +490,7 @@ const getListOfSandboxes = (workflow: Workflow) => { export function getSandboxes(workflow: Workflow) { const sandboxes = getListOfSandboxes(workflow).map(defineSandboxFlow); - const list: JobsOrHub[] = sandboxes.flatMap((sandbox) => sandbox.jobs); + const list: JobOrNoOpJob[] = sandboxes.flatMap((sandbox) => sandbox.jobs); if (isWorkflowOrAbove(workflow, 'merged')) { const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); diff --git a/scripts/ci/test-storybooks.ts b/scripts/ci/test-storybooks.ts index 9bb1154ab87e..73abe67626db 100644 --- a/scripts/ci/test-storybooks.ts +++ b/scripts/ci/test-storybooks.ts @@ -4,10 +4,10 @@ import { join } from 'path/posix'; import { build_linux } from './common-jobs'; import { artifact, workflow } from './utils/helpers'; import { - type JobsOrHub, + type JobOrNoOpJob, type Workflow, - defineHub, defineJob, + defineNoOpJob, isWorkflowOrAbove, } from './utils/types'; @@ -79,7 +79,7 @@ export function definePortableStoryTest(directory: string) { }, ], }, - [testStorybooksHub] + [testStorybooksNoOpJob] ); } @@ -112,7 +112,7 @@ export function definePortableStoryTestPNP() { }, ], }, - [testStorybooksHub] + [testStorybooksNoOpJob] ); } @@ -145,14 +145,14 @@ export function definePortableStoryTestVitest3() { }, ], }, - [testStorybooksHub] + [testStorybooksNoOpJob] ); } -export const testStorybooksHub = defineHub('test-storybooks', [build_linux]); +export const testStorybooksNoOpJob = defineNoOpJob('test-storybooks', [build_linux]); export function getTestStorybooks(workflow: Workflow) { - const testStorybooks: JobsOrHub[] = ['react', 'vue3'].map(definePortableStoryTest); + const testStorybooks: JobOrNoOpJob[] = ['react', 'vue3'].map(definePortableStoryTest); if (isWorkflowOrAbove(workflow, 'daily')) { testStorybooks.push(definePortableStoryTestPNP()); diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 8b51c22afd3c..45d16637a7af 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -1,5 +1,5 @@ import { LINUX_ROOT_DIR, WINDOWS_ROOT_DIR } from './constants'; -import { type JobsOrHub } from './types'; +import { type JobOrNoOpJob } from './types'; export const workspace = { attach: (at = LINUX_ROOT_DIR) => { @@ -258,8 +258,8 @@ export const testResults = { * We ensure that if (due to filtering for example) any required jobs are not present in the todos * array, we add them back in. This is recursive, as a required job can have required jobs itself. */ -export function ensureRequiredJobs(jobs: JobsOrHub[]): JobsOrHub[] { - const results: JobsOrHub[] = []; +export function ensureRequiredJobs(jobs: JobOrNoOpJob[]): JobOrNoOpJob[] { + const results: JobOrNoOpJob[] = []; while (jobs.length > 0) { const job = jobs.shift(); if (job) { diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index 6cc673d3c758..5656f21cf241 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -2,18 +2,18 @@ import type { executors } from './executors'; import { toId } from './helpers'; import type { parameters } from './parameters'; -export type Job = { +export type Job = { id: string; name: K; implementation: I; - requires: JobsOrHub[]; + requires: JobOrNoOpJob[]; }; -export type Hub = Job; +export type NoOpJob = Job; -export type JobsOrHub = Job; +export type JobOrNoOpJob = Job; -export type HubImplementation = { +export type NoOpJobImplementation = { type: 'no-op'; }; @@ -74,7 +74,7 @@ export type JobImplementation = { export function defineJob( name: K, implementation: I, - requires = [] as JobsOrHub[] + requires = [] as JobOrNoOpJob[] ): Job { return { id: toId(name), @@ -94,7 +94,10 @@ export function defineJob( * @param name - The name of the hub * @param requires - The jobs that this hub depends on */ -export function defineHub(name: K, requires = [] as JobsOrHub[]): Hub { +export function defineNoOpJob( + name: K, + requires = [] as JobOrNoOpJob[] +): NoOpJob { return { id: toId(name), name, From 9e626e9b6f1481d127fb9dd5453ef653c4642042 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 14:10:18 +0100 Subject: [PATCH 287/310] add a unique measurement, removing unfair disadvantage for measuring --- scripts/ci/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 9b02c2644ee1..995c14c61624 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -46,7 +46,7 @@ function generateConfig(workflow: Workflow) { const initEmpty = getInitEmpty(workflow); if (isWorkflowOrAbove(workflow, 'merged')) { - jobs.push(build_windows, testUnit_windows); + // jobs.push(build_windows, testUnit_windows); } jobs.push( @@ -124,7 +124,7 @@ function generateConfig(workflow: Workflow) { {} as Record ), workflows: { - [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { + [`${workflow}-generated${isDebugging ? '-debug' : ''}-measured`]: { jobs: sortedJobs.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires.map((r) => r.id) } } From bca65d9564f9479a5fe5190947d5d227ae022275 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 14:28:06 +0100 Subject: [PATCH 288/310] disable it a another way, this is the second run to measure windows, disabling ALL windows (except empty init, to have a equal comparison --- scripts/ci/main.ts | 4 ++-- scripts/ci/sandboxes.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 995c14c61624..9aff774d446f 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -45,8 +45,8 @@ function generateConfig(workflow: Workflow) { const testStorybooks = getTestStorybooks(workflow); const initEmpty = getInitEmpty(workflow); - if (isWorkflowOrAbove(workflow, 'merged')) { - // jobs.push(build_windows, testUnit_windows); + if (isWorkflowOrAbove(workflow, 'merged') && process.env.NEVER_TRUE) { + jobs.push(build_windows, testUnit_windows); } jobs.push( diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index a2c3e5ea0012..3ff9294877d0 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -492,7 +492,7 @@ export function getSandboxes(workflow: Workflow) { const list: JobOrNoOpJob[] = sandboxes.flatMap((sandbox) => sandbox.jobs); - if (isWorkflowOrAbove(workflow, 'merged')) { + if (isWorkflowOrAbove(workflow, 'merged') && process.env.NEVER_TRUE) { const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); const testRunner = defineSandboxTestRunner(sandboxes[0]); From f166b06501b0db171294973062740bb479df9655 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 6 Jan 2026 15:36:29 +0100 Subject: [PATCH 289/310] Update sandbox job to persist test results in the working directory instead of the sandbox directory --- scripts/ci/sandboxes.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 3ff9294877d0..41ec2fa3ede1 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -51,13 +51,11 @@ function defineSandboxJob_build({ } function defineSandboxJob_dev({ name, - directory, template, requires, options, }: { name: string; - directory: string; requires: JobOrNoOpJob[]; template: string; options: { @@ -98,10 +96,7 @@ function defineSandboxJob_dev({ ].join('\n'), }, }, - artifact.persist( - join(LINUX_ROOT_DIR, SANDBOX_DIR, directory, 'test-results'), - 'test-results' - ), + artifact.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results'), 'test-results'), testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ] : [ @@ -212,7 +207,6 @@ export function defineSandboxFlow(key: Key) { }); const devJob = defineSandboxJob_dev({ name: `${name} (dev)`, - directory: id, template: key, requires: [createJob], options: { e2e: !skipTasks?.includes('e2e-tests-dev') }, @@ -294,6 +288,7 @@ export function defineSandboxFlow(key: Key) { ].join('\n'), }, }, + artifact.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results'), 'test-results'), testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ], }, From db2636694baa1a553804c62fe546d0236278e331 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 7 Jan 2026 12:50:13 +0100 Subject: [PATCH 290/310] move windows tests to daily only, because their costs are super high. --- scripts/ci/init-empty.ts | 3 ++- scripts/ci/main.ts | 4 ++-- scripts/ci/sandboxes.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index 0eee8fd7c30c..f05a0977079e 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -143,9 +143,10 @@ export function getInitEmpty(workflow: Workflow) { if (isWorkflowOrAbove(workflow, 'merged')) { initEmpty.push(...['nextjs-ts', 'vue-vite-ts', 'lit-vite-ts'].map(defineEmptyInitFlow)); + } + if (isWorkflowOrAbove(workflow, 'daily')) { initEmpty.push(defineEmptyInitWindows()); } - if (isWorkflowOrAbove(workflow, 'normal')) { initEmpty.push(defineEmptyInitFeatures()); } diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index 9aff774d446f..e32f947cd285 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -45,7 +45,7 @@ function generateConfig(workflow: Workflow) { const testStorybooks = getTestStorybooks(workflow); const initEmpty = getInitEmpty(workflow); - if (isWorkflowOrAbove(workflow, 'merged') && process.env.NEVER_TRUE) { + if (isWorkflowOrAbove(workflow, 'daily')) { jobs.push(build_windows, testUnit_windows); } @@ -124,7 +124,7 @@ function generateConfig(workflow: Workflow) { {} as Record ), workflows: { - [`${workflow}-generated${isDebugging ? '-debug' : ''}-measured`]: { + [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { jobs: sortedJobs.map((t) => t.requires && t.requires.length > 0 ? { [t.id]: { requires: t.requires.map((r) => r.id) } } diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 41ec2fa3ede1..8e537892a954 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -487,7 +487,7 @@ export function getSandboxes(workflow: Workflow) { const list: JobOrNoOpJob[] = sandboxes.flatMap((sandbox) => sandbox.jobs); - if (isWorkflowOrAbove(workflow, 'merged') && process.env.NEVER_TRUE) { + if (isWorkflowOrAbove(workflow, 'daily')) { const windows_sandbox_build = defineWindowsSandboxBuild(sandboxes[0]); const windows_sandbox_dev = defineWindowsSandboxDev(sandboxes[0]); const testRunner = defineSandboxTestRunner(sandboxes[0]); From b26a4ec69be11e8848446f2ae66c90662022fd17 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 8 Jan 2026 11:51:23 +0100 Subject: [PATCH 291/310] make all job implementations functions, so a workflowName can be passed in Add the discord notification to reporting --- scripts/ci/common-jobs.ts | 52 +++++++++++++++++------------------ scripts/ci/init-empty.ts | 12 ++++---- scripts/ci/main.ts | 14 ++++++++-- scripts/ci/sandboxes.ts | 40 +++++++++++++-------------- scripts/ci/test-storybooks.ts | 12 ++++---- scripts/ci/utils/helpers.ts | 11 ++++++-- scripts/ci/utils/types.ts | 15 ++++++---- 7 files changed, 88 insertions(+), 68 deletions(-) diff --git a/scripts/ci/common-jobs.ts b/scripts/ci/common-jobs.ts index c9ba49ebb4f9..47c3ff2471a6 100644 --- a/scripts/ci/common-jobs.ts +++ b/scripts/ci/common-jobs.ts @@ -21,7 +21,7 @@ import { defineJob, defineNoOpJob } from './utils/types'; const dirname = import.meta.dirname; -export const build_linux = defineJob('Build (linux)', { +export const build_linux = defineJob('Build (linux)', (workflowName) => ({ executor: { name: 'sb_node_22_classic', class: 'xlarge', @@ -46,7 +46,7 @@ export const build_linux = defineJob('Build (linux)', { command: 'yarn local-registry --publish', }, }, - ...workflow.reportOnFailure(), + ...workflow.reportOnFailure(workflowName), artifact.persist(`code/bench/esbuild-metafiles`, 'bench'), workspace.persist([ ...glob @@ -62,9 +62,9 @@ export const build_linux = defineJob('Build (linux)', { `${WORKING_DIR}/code/bench`, ]), ], -}); +})); -export const prettyDocs = defineJob('Prettify docs', { +export const prettyDocs = defineJob('Prettify docs', () => ({ executor: { name: 'sb_node_22_classic', class: 'medium+', @@ -80,9 +80,9 @@ export const prettyDocs = defineJob('Prettify docs', { }, }, ], -}); +})); -export const build_windows = defineJob('Build (windows)', { +export const build_windows = defineJob('Build (windows)', () => ({ executor: { name: 'win/default', size: 'xlarge', @@ -117,13 +117,13 @@ export const build_windows = defineJob('Build (windows)', { `${WINDOWS_ROOT_DIR}\\${WORKING_DIR}` ), ], -}); +})); export const commonJobsNoOpJob = defineNoOpJob('Common Jobs', [build_linux]); export const storybookChromatic = defineJob( 'Local storybook & chromatic', - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'medium+', @@ -145,13 +145,13 @@ export const storybookChromatic = defineJob( }, }, ], - }, + }), [commonJobsNoOpJob] ); export const check = defineJob( 'TypeScript validation', - { + (workflowName) => ({ executor: { name: 'sb_node_22_classic', class: 'xlarge', @@ -172,16 +172,16 @@ export const check = defineJob( command: 'yarn check', }, }, - ...workflow.reportOnFailure(), + ...workflow.reportOnFailure(workflowName), ...workflow.cancelOnFailure(), ], - }, + }), [commonJobsNoOpJob] ); export const lint = defineJob( 'EsLint & Prettier validation', - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'xlarge', @@ -203,13 +203,13 @@ export const lint = defineJob( }, }, ], - }, + }), [commonJobsNoOpJob] ); export const knip = defineJob( 'Knip validation', - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'medium', @@ -224,13 +224,13 @@ export const knip = defineJob( }, }, ], - }, + }), [commonJobsNoOpJob] ); export const testsUnit_linux = defineJob( 'Tests (linux)', - { + (workflowName) => ({ executor: { name: 'sb_node_22_classic', class: 'large', @@ -250,16 +250,16 @@ export const testsUnit_linux = defineJob( testResults.persist(`code/test-results`), git.check(), - ...workflow.reportOnFailure(), + ...workflow.reportOnFailure(workflowName), ...workflow.cancelOnFailure(), ], - }, + }), [commonJobsNoOpJob] ); export const testsStories_linux = defineJob( 'Tests stories (linux)', - { + (workflowName) => ({ executor: { name: 'sb_playwright', class: 'xlarge', @@ -279,16 +279,16 @@ export const testsStories_linux = defineJob( testResults.persist(`code/test-results`), git.check(), - ...workflow.reportOnFailure(), + ...workflow.reportOnFailure(workflowName), ...workflow.cancelOnFailure(), ], - }, + }), [commonJobsNoOpJob] ); export const testUnit_windows = defineJob( 'Tests unit (windows)', - { + () => ({ executor: { name: 'win/default', size: 'large', @@ -312,13 +312,13 @@ export const testUnit_windows = defineJob( }, testResults.persist(`code/test-results`), ], - }, + }), [build_windows] ); export const benchmarkPackages = defineJob( 'Benchmark packages', - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'large', @@ -336,6 +336,6 @@ export const benchmarkPackages = defineJob( }, }, ], - }, + }), [commonJobsNoOpJob] ); diff --git a/scripts/ci/init-empty.ts b/scripts/ci/init-empty.ts index f05a0977079e..caa22590a8dc 100644 --- a/scripts/ci/init-empty.ts +++ b/scripts/ci/init-empty.ts @@ -12,7 +12,7 @@ import { export const defineEmptyInitFlow = (template: string) => defineJob( `init-empty-${template}`, - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'medium', @@ -46,7 +46,7 @@ export const defineEmptyInitFlow = (template: string) => }, }, ], - }, + }), [initEmptyNoOpJob] ); @@ -54,7 +54,7 @@ export const defineEmptyInitFlow = (template: string) => export function defineEmptyInitFeatures() { return defineJob( 'init-features', - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'medium', @@ -88,7 +88,7 @@ export function defineEmptyInitFeatures() { }, }, ], - }, + }), [initEmptyNoOpJob] ); } @@ -96,7 +96,7 @@ export function defineEmptyInitFeatures() { export function defineEmptyInitWindows() { return defineJob( 'init-empty-windows', - { + () => ({ executor: { name: 'win/default', size: 'medium', @@ -131,7 +131,7 @@ export function defineEmptyInitWindows() { }, }, ], - }, + }), [initEmptyNoOpJob] ); } diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index e32f947cd285..de7bdb887d31 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -25,7 +25,12 @@ import { executors } from './utils/executors'; import { ensureRequiredJobs } from './utils/helpers'; import { orbs } from './utils/orbs'; import { parameters } from './utils/parameters'; -import type { JobOrNoOpJob, NoOpJobImplementation } from './utils/types'; +import type { + JobImplementationObj, + JobOrNoOpJob, + NoOpJobImplementation, + NoOpJobImplementationObj, +} from './utils/types'; import { type JobImplementation, type Workflow, isWorkflowOrAbove } from './utils/types'; const dirname = import.meta.dirname; @@ -118,10 +123,13 @@ function generateConfig(workflow: Workflow) { jobs: sortedJobs.reduce( (acc, job) => { - acc[job.id] = job.implementation; + acc[job.id] = + typeof job.implementation === 'function' + ? job.implementation(workflow) + : job.implementation; return acc; }, - {} as Record + {} as Record ), workflows: { [`${workflow}-generated${isDebugging ? '-debug' : ''}`]: { diff --git a/scripts/ci/sandboxes.ts b/scripts/ci/sandboxes.ts index 8e537892a954..81c622d83506 100644 --- a/scripts/ci/sandboxes.ts +++ b/scripts/ci/sandboxes.ts @@ -30,7 +30,7 @@ function defineSandboxJob_build({ }) { return defineJob( name, - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'large', @@ -45,7 +45,7 @@ function defineSandboxJob_build({ }, workspace.persist([`${SANDBOX_DIR}/${directory}/storybook-static`]), ], - }, + }), requires ); } @@ -64,7 +64,7 @@ function defineSandboxJob_dev({ }) { return defineJob( name, - { + () => ({ executor: options.e2e ? { name: 'sb_playwright', @@ -110,7 +110,7 @@ function defineSandboxJob_dev({ }, ]), ], - }, + }), requires ); } @@ -124,7 +124,7 @@ export function defineSandboxFlow(key: Key) { const createJob = defineJob( `${name} (create)`, - { + () => ({ executor: { name: 'sb_node_22_browsers', class: 'large', @@ -196,7 +196,7 @@ export function defineSandboxFlow(key: Key) { artifact.persist(`${LINUX_ROOT_DIR}/${SANDBOX_DIR}/${id}/debug-storybook.log`, 'logs'), workspace.persist([`${SANDBOX_DIR}/${id}`]), ], - }, + }), [sandboxesNoOpJob] ); const buildJob = defineSandboxJob_build({ @@ -213,7 +213,7 @@ export function defineSandboxFlow(key: Key) { }); const chromaticJob = defineJob( `${name} (chromatic)`, - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'medium', @@ -239,12 +239,12 @@ export function defineSandboxFlow(key: Key) { }, }, ], - }, + }), [buildJob] ); const vitestJob = defineJob( `${name} (vitest)`, - { + () => ({ executor: { name: 'sb_playwright', class: 'medium', @@ -259,12 +259,12 @@ export function defineSandboxFlow(key: Key) { }, testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ], - }, + }), [buildJob] ); const e2eJob = defineJob( `${name} (e2e)`, - { + () => ({ executor: { name: 'sb_playwright', class: 'xlarge', @@ -291,12 +291,12 @@ export function defineSandboxFlow(key: Key) { artifact.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results'), 'test-results'), testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ], - }, + }), [buildJob] ); const testRunnerJob = defineJob( `${name} (test-runner)`, - { + () => ({ executor: { name: 'sb_playwright', class: 'medium', @@ -311,7 +311,7 @@ export function defineSandboxFlow(key: Key) { }, testResults.persist(join(LINUX_ROOT_DIR, WORKING_DIR, 'test-results')), ], - }, + }), [buildJob] ); @@ -345,7 +345,7 @@ export function defineSandboxFlow(key: Key) { export function defineSandboxTestRunner(sandbox: ReturnType) { return defineJob( `${sandbox.jobs[1].id}-test-runner`, - { + () => ({ executor: { name: 'sb_playwright', class: 'medium', @@ -360,7 +360,7 @@ export function defineSandboxTestRunner(sandbox: ReturnType) { return defineJob( `${sandbox.jobs[2].id}-windows`, - { + () => ({ executor: { name: 'win/default', size: 'xlarge', @@ -409,7 +409,7 @@ export function defineWindowsSandboxDev(sandbox: ReturnType) { return defineJob( `${sandbox.jobs[1].id}-windows`, - { + () => ({ executor: { name: 'win/default', size: 'xlarge', @@ -462,7 +462,7 @@ export function defineWindowsSandboxBuild(sandbox: ReturnType ({ executor: { name: 'sb_playwright', class: 'medium', @@ -78,7 +78,7 @@ export function definePortableStoryTest(directory: string) { }, }, ], - }, + }), [testStorybooksNoOpJob] ); } @@ -86,7 +86,7 @@ export function definePortableStoryTest(directory: string) { export function definePortableStoryTestPNP() { return defineJob( 'test-storybooks-pnp', - { + () => ({ executor: { name: 'sb_node_22_classic', class: 'medium', @@ -111,7 +111,7 @@ export function definePortableStoryTestPNP() { }, }, ], - }, + }), [testStorybooksNoOpJob] ); } @@ -119,7 +119,7 @@ export function definePortableStoryTestPNP() { export function definePortableStoryTestVitest3() { return defineJob( 'test-storybooks-portable-vitest3', - { + () => ({ executor: { name: 'sb_playwright', class: 'medium', @@ -144,7 +144,7 @@ export function definePortableStoryTestVitest3() { }, }, ], - }, + }), [testStorybooksNoOpJob] ); } diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 45d16637a7af..953141866932 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -1,5 +1,5 @@ import { LINUX_ROOT_DIR, WINDOWS_ROOT_DIR } from './constants'; -import { type JobOrNoOpJob } from './types'; +import { type JobOrNoOpJob, type Workflow } from './types'; export const workspace = { attach: (at = LINUX_ROOT_DIR) => { @@ -204,7 +204,7 @@ export const workflow = { }, ]; }, - reportOnFailure: () => { + reportOnFailure: (workflow: Workflow, template: string = 'none') => { return [ { run: { @@ -220,6 +220,13 @@ export const workflow = { command: 'echo "Workflow failed"', }, }, + { + 'discord/status': { + only_for_branches: ['main', 'next', 'next-release', 'latest-release'], + fail_only: true, + failure_message: `yarn get-report-message ${workflow} ${template}`, + }, + }, ]; }, }; diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index 5656f21cf241..6fb56b07cfbd 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -13,11 +13,13 @@ export type NoOpJob = Job; export type JobOrNoOpJob = Job; -export type NoOpJobImplementation = { +export type NoOpJobImplementationObj = { type: 'no-op'; }; -export type JobImplementation = { +export type NoOpJobImplementation = (workflow: Workflow) => NoOpJobImplementationObj; + +export type JobImplementationObj = { executor: | { name: keyof typeof executors; @@ -61,6 +63,8 @@ export type JobImplementation = { parallelism?: number; }; +export type JobImplementation = (workflow: Workflow) => JobImplementationObj; + /** * This function ensures the jobs adhere to the expected interface and that the job's ID is valid. * (i.e. no special characters, no spaces, etc.) Thus the ID can be referenced by other jobs in the @@ -101,9 +105,10 @@ export function defineNoOpJob( return { id: toId(name), name, - implementation: { - type: 'no-op', - } as const, + implementation: () => + ({ + type: 'no-op', + }) as const, requires, }; } From 9cabbfef68fc4dfb66a448df393c5ab178961d9b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 8 Jan 2026 12:15:49 +0100 Subject: [PATCH 292/310] fix & simplify --- scripts/ci/utils/helpers.ts | 2 +- scripts/ci/utils/types.ts | 21 ++++++++------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/scripts/ci/utils/helpers.ts b/scripts/ci/utils/helpers.ts index 953141866932..bfac9289b28e 100644 --- a/scripts/ci/utils/helpers.ts +++ b/scripts/ci/utils/helpers.ts @@ -222,7 +222,7 @@ export const workflow = { }, { 'discord/status': { - only_for_branches: ['main', 'next', 'next-release', 'latest-release'], + only_for_branches: ['main', 'next', 'next-release', 'latest-release'].join(','), fail_only: true, failure_message: `yarn get-report-message ${workflow} ${template}`, }, diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index 6fb56b07cfbd..fe6d8df61c42 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -2,16 +2,14 @@ import type { executors } from './executors'; import { toId } from './helpers'; import type { parameters } from './parameters'; -export type Job = { +export type Job = { id: string; name: K; - implementation: I; + implementation: (workflow: Workflow) => JobImplementationObj | NoOpJobImplementationObj; requires: JobOrNoOpJob[]; }; -export type NoOpJob = Job; - -export type JobOrNoOpJob = Job; +export type JobOrNoOpJob = Job; export type NoOpJobImplementationObj = { type: 'no-op'; @@ -79,14 +77,14 @@ export function defineJob( name: K, implementation: I, requires = [] as JobOrNoOpJob[] -): Job { +): Job { return { id: toId(name), name: name, - implementation: { + implementation: (workflow) => ({ description: name, - ...implementation, - } satisfies JobImplementation, + ...implementation(workflow), + }), requires, }; } @@ -98,10 +96,7 @@ export function defineJob( * @param name - The name of the hub * @param requires - The jobs that this hub depends on */ -export function defineNoOpJob( - name: K, - requires = [] as JobOrNoOpJob[] -): NoOpJob { +export function defineNoOpJob(name: K, requires = [] as JobOrNoOpJob[]): Job { return { id: toId(name), name, From e570321ab53cdafd2956d142fbbe73900f694df5 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 8 Jan 2026 12:17:53 +0100 Subject: [PATCH 293/310] Update documentation for NoOpJob to clarify naming and purpose --- scripts/ci/utils/types.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ci/utils/types.ts b/scripts/ci/utils/types.ts index fe6d8df61c42..1cb87a4ae856 100644 --- a/scripts/ci/utils/types.ts +++ b/scripts/ci/utils/types.ts @@ -90,11 +90,11 @@ export function defineJob( } /** - * A hub is a special type of job that is used to group other jobs together. It cannot contain any - * steps/implementation. + * A NoOpJob is a special type of job that is used to group other jobs together. It cannot contain + * any steps/implementation. * - * @param name - The name of the hub - * @param requires - The jobs that this hub depends on + * @param name - The name of the NoOpJob + * @param requires - The jobs that this NoOpJob depends on */ export function defineNoOpJob(name: K, requires = [] as JobOrNoOpJob[]): Job { return { From 223a3950bacb77045a8efc29f2eb4e6ab49267c9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 8 Jan 2026 12:42:37 +0100 Subject: [PATCH 294/310] Refactor type imports in CI main script for clarity and simplicity --- scripts/ci/main.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/ci/main.ts b/scripts/ci/main.ts index de7bdb887d31..ee479158b032 100644 --- a/scripts/ci/main.ts +++ b/scripts/ci/main.ts @@ -25,13 +25,8 @@ import { executors } from './utils/executors'; import { ensureRequiredJobs } from './utils/helpers'; import { orbs } from './utils/orbs'; import { parameters } from './utils/parameters'; -import type { - JobImplementationObj, - JobOrNoOpJob, - NoOpJobImplementation, - NoOpJobImplementationObj, -} from './utils/types'; -import { type JobImplementation, type Workflow, isWorkflowOrAbove } from './utils/types'; +import type { JobImplementationObj, JobOrNoOpJob, NoOpJobImplementationObj } from './utils/types'; +import { type Workflow, isWorkflowOrAbove } from './utils/types'; const dirname = import.meta.dirname; From 704cf4d507c64f54766165191a0902d378c7c627 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Mon, 12 Jan 2026 14:58:45 +0100 Subject: [PATCH 295/310] add e2e tests for MCP and manifests --- code/e2e-tests/addon-mcp.spec.ts | 281 ++++++++++++++++++ .../cli-storybook/src/sandbox-templates.ts | 4 +- 2 files changed, 284 insertions(+), 1 deletion(-) create mode 100644 code/e2e-tests/addon-mcp.spec.ts diff --git a/code/e2e-tests/addon-mcp.spec.ts b/code/e2e-tests/addon-mcp.spec.ts new file mode 100644 index 000000000000..bcbcacf9a252 --- /dev/null +++ b/code/e2e-tests/addon-mcp.spec.ts @@ -0,0 +1,281 @@ +/* eslint-disable local-rules/no-uncategorized-errors */ +import type { APIRequestContext } from '@playwright/test'; +import { expect, test } from '@playwright/test'; +import process from 'process'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; +const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; +const type = process.env.STORYBOOK_TYPE || 'dev'; + +const MCP_ENDPOINT = `${storybookUrl}/mcp`; + +/** Helper to make MCP requests and parse SSE response */ +async function mcpRequest( + request: APIRequestContext, + method: string, + params: Record = {}, + id = 1, + headers: Record = {} +) { + const response = await request.post(MCP_ENDPOINT, { + headers: { + 'Content-Type': 'application/json', + ...headers, + }, + data: { + jsonrpc: '2.0', + id, + method, + params, + }, + }); + + if (!response.ok()) { + throw new Error(`HTTP error! status: ${response.status()}`); + } + + // MCP responses come as SSE (Server-Sent Events) format + // Format: "event: message\ndata: {...}" + const text = await response.text(); + // Extract the JSON from the "data: " line + const dataMatch = text.match(/^data: (.+)$/m); + if (!dataMatch) { + throw new Error(`Invalid SSE response format: ${text}`); + } + return JSON.parse(dataMatch[1]); +} + +test.describe('addon-mcp', () => { + test.skip( + !templateName?.includes('react-vite/default-ts'), + 'Only run for sandboxes with addon-mcp configured' + ); + + test.describe('Manifests', () => { + test.describe('Component Manifest', () => { + test('should have valid components.json structure', async ({ page }) => { + const json = await page.evaluate(async (url) => { + const res = await fetch(`${url}/manifests/components.json`); + return res.json(); + }, storybookUrl); + + // Check basic structure + expect(json).toHaveProperty('v'); + expect(typeof json.v).toBe('number'); + expect(json).toHaveProperty('components'); + expect(typeof json.components).toBe('object'); + }); + + test('should contain the example Button component', async ({ page }) => { + const json = await page.evaluate(async (url) => { + const res = await fetch(`${url}/manifests/components.json`); + return res.json(); + }, storybookUrl); + + // Check for example-button component + expect(json.components).toHaveProperty('example-button'); + + const button = json.components['example-button']; + expect(button).toMatchObject({ + id: 'example-button', + name: 'Button', + path: expect.stringContaining('Button.stories'), + }); + + // Should have stories + expect(button.stories).toBeInstanceOf(Array); + expect(button.stories.length).toBeGreaterThan(0); + + // Should have reactDocgen info with props + expect(button).toHaveProperty('reactDocgen'); + expect(button.reactDocgen).toHaveProperty('props'); + expect(button.reactDocgen.props).toHaveProperty('primary'); + }); + }); + + test.describe('Docs Manifest', () => { + test('should have valid docs.json structure', async ({ page }) => { + const json = await page.evaluate(async (url) => { + const res = await fetch(`${url}/manifests/docs.json`); + return res.json(); + }, storybookUrl); + + // Check basic structure + expect(json).toHaveProperty('v'); + expect(typeof json.v).toBe('number'); + expect(json).toHaveProperty('docs'); + expect(typeof json.docs).toBe('object'); + }); + + test('should contain the "Configure your project" docs entry', async ({ page }) => { + const json = await page.evaluate(async (url) => { + const res = await fetch(`${url}/manifests/docs.json`); + return res.json(); + }, storybookUrl); + + // Check for configure-your-project--docs entry + expect(json.docs).toHaveProperty('configure-your-project--docs'); + + const configureDoc = json.docs['configure-your-project--docs']; + expect(configureDoc).toMatchObject({ + id: 'configure-your-project--docs', + name: 'Docs', + path: expect.stringContaining('Configure.mdx'), + title: 'Configure your project', + }); + + // Should have content + expect(configureDoc).toHaveProperty('content'); + expect(typeof configureDoc.content).toBe('string'); + expect(configureDoc.content.length).toBeGreaterThan(0); + }); + }); + }); + + test.describe('MCP', () => { + test.skip(type !== 'dev', 'MCP server only runs in dev mode'); + + test.describe('Info Page', () => { + test('should show both toolsets as enabled', async ({ page }) => { + await page.goto(MCP_ENDPOINT); + + // Both toolsets should show as enabled + const enabledStatuses = page.locator('.toolset-status.enabled'); + await expect(enabledStatuses).toHaveCount(2); + + // Check that dev toolset is listed with its tools + const devToolset = page.locator('.toolset', { has: page.locator('text=dev') }); + await expect(devToolset).toBeVisible(); + await expect(devToolset.locator('.toolset-status')).toHaveText('enabled'); + + // Check that docs toolset is listed with its tools + const docsToolset = page.locator('.toolset', { has: page.locator('text=docs') }); + await expect(docsToolset).toBeVisible(); + await expect(docsToolset.locator('.toolset-status')).toHaveText('enabled'); + }); + }); + + test.describe('Session Initialization', () => { + test('should successfully initialize an MCP session', async ({ request }) => { + const response = await mcpRequest(request, 'initialize', { + protocolVersion: '2025-06-18', + capabilities: {}, + clientInfo: { + name: 'e2e-test-client', + version: '1.0.0', + }, + }); + + expect(response).toMatchObject({ + jsonrpc: '2.0', + id: 1, + result: { + protocolVersion: '2025-06-18', + capabilities: { + tools: { listChanged: true }, + }, + serverInfo: { + name: '@storybook/addon-mcp', + description: expect.stringContaining('agents'), + }, + }, + }); + + expect(response.result.serverInfo.version).toBeDefined(); + }); + }); + + test.describe('Tools Discovery', () => { + test('should list all available tools', async ({ request }) => { + const response = await mcpRequest(request, 'tools/list'); + + expect(response.result).toHaveProperty('tools'); + // Dev and docs tools should be present (4 total) + expect(response.result.tools).toHaveLength(4); + + const toolNames = response.result.tools.map((tool: { name: string }) => tool.name); + expect(toolNames).toContain('get-story-urls'); + expect(toolNames).toContain('get-ui-building-instructions'); + expect(toolNames).toContain('list-all-documentation'); + expect(toolNames).toContain('get-documentation'); + }); + }); + + test.describe('Tool: get-story-urls', () => { + test('should return story URLs for valid stories', async ({ request }) => { + // Use a path pattern that works regardless of sandbox location + const response = await mcpRequest(request, 'tools/call', { + name: 'get-story-urls', + arguments: { + stories: [ + { + exportName: 'Primary', + // Use a relative-style path that the tool should recognize + absoluteStoryPath: '/src/stories/Button.stories.ts', + }, + ], + }, + }); + + expect(response.result).toHaveProperty('content'); + expect(response.result.content).toHaveLength(1); + // Should contain either a valid URL or an error message about the story + expect(response.result.content[0]).toHaveProperty('text'); + }); + }); + + test.describe('Tool: get-ui-building-instructions', () => { + test('should return UI building instructions', async ({ request }) => { + const response = await mcpRequest(request, 'tools/call', { + name: 'get-ui-building-instructions', + arguments: {}, + }); + + expect(response.result).toHaveProperty('content'); + expect(response.result.content[0]).toHaveProperty('type', 'text'); + + const text = response.result.content[0].text; + expect(text).toContain('stories'); + expect(text.length).toBeGreaterThan(100); + }); + }); + + test.describe('Tool: list-all-documentation', () => { + test('should list all documentation from manifest', async ({ request }) => { + const response = await mcpRequest(request, 'tools/call', { + name: 'list-all-documentation', + arguments: {}, + }); + + expect(response.result).toHaveProperty('content'); + expect(response.result.content[0]).toHaveProperty('type', 'text'); + + const text = response.result.content[0].text; + // Should contain components section with Button + expect(text).toContain('Button'); + expect(text).toContain('example-button'); + }); + }); + + test.describe('Tool: get-documentation', () => { + test('should return documentation for a specific component', async ({ request }) => { + const response = await mcpRequest(request, 'tools/call', { + name: 'get-documentation', + arguments: { + id: 'example-button', + }, + }); + + expect(response.result).toHaveProperty('content'); + expect(response.result.content[0]).toHaveProperty('type', 'text'); + + const text = response.result.content[0].text; + // Should contain component info + expect(text).toContain('Button'); + expect(text).toContain('example-button'); + // Should contain stories + expect(text).toContain('Primary'); + }); + }); + }); +}); diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index 3f86790f8dc0..db16ab5b180a 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -369,11 +369,13 @@ export const baseTemplates = { }, modifications: { useCsfFactory: true, - extraDependencies: ['prop-types', '@types/prop-types'], + extraDependencies: ['prop-types', '@types/prop-types', '@storybook/addon-mcp'], + editAddons: (addons) => [...addons, '@storybook/addon-mcp'], mainConfig: { features: { developmentModeForBuild: true, experimentalTestSyntax: true, + experimentalComponentsManifest: true, }, }, }, From 8430d780ac077086ff3e78aba2c7bfe5b707a949 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Mon, 12 Jan 2026 15:03:19 +0100 Subject: [PATCH 296/310] simplify json-based tests --- code/e2e-tests/addon-mcp.spec.ts | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/code/e2e-tests/addon-mcp.spec.ts b/code/e2e-tests/addon-mcp.spec.ts index bcbcacf9a252..1746a1948332 100644 --- a/code/e2e-tests/addon-mcp.spec.ts +++ b/code/e2e-tests/addon-mcp.spec.ts @@ -53,11 +53,9 @@ test.describe('addon-mcp', () => { test.describe('Manifests', () => { test.describe('Component Manifest', () => { - test('should have valid components.json structure', async ({ page }) => { - const json = await page.evaluate(async (url) => { - const res = await fetch(`${url}/manifests/components.json`); - return res.json(); - }, storybookUrl); + test('should have valid components.json structure', async ({ request }) => { + const response = await request.get(`${storybookUrl}/manifests/components.json`); + const json = await response.json(); // Check basic structure expect(json).toHaveProperty('v'); @@ -66,11 +64,9 @@ test.describe('addon-mcp', () => { expect(typeof json.components).toBe('object'); }); - test('should contain the example Button component', async ({ page }) => { - const json = await page.evaluate(async (url) => { - const res = await fetch(`${url}/manifests/components.json`); - return res.json(); - }, storybookUrl); + test('should contain the example Button component', async ({ request }) => { + const response = await request.get(`${storybookUrl}/manifests/components.json`); + const json = await response.json(); // Check for example-button component expect(json.components).toHaveProperty('example-button'); @@ -94,11 +90,9 @@ test.describe('addon-mcp', () => { }); test.describe('Docs Manifest', () => { - test('should have valid docs.json structure', async ({ page }) => { - const json = await page.evaluate(async (url) => { - const res = await fetch(`${url}/manifests/docs.json`); - return res.json(); - }, storybookUrl); + test('should have valid docs.json structure', async ({ request }) => { + const response = await request.get(`${storybookUrl}/manifests/docs.json`); + const json = await response.json(); // Check basic structure expect(json).toHaveProperty('v'); @@ -107,11 +101,9 @@ test.describe('addon-mcp', () => { expect(typeof json.docs).toBe('object'); }); - test('should contain the "Configure your project" docs entry', async ({ page }) => { - const json = await page.evaluate(async (url) => { - const res = await fetch(`${url}/manifests/docs.json`); - return res.json(); - }, storybookUrl); + test('should contain the "Configure your project" docs entry', async ({ request }) => { + const response = await request.get(`${storybookUrl}/manifests/docs.json`); + const json = await response.json(); // Check for configure-your-project--docs entry expect(json.docs).toHaveProperty('configure-your-project--docs'); From e2263b86f8408974740bb0a0dd7db2f1bffd5fcf Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 14 Jan 2026 14:16:08 +0100 Subject: [PATCH 297/310] fix system query params (id, viewMode) being overridable if they are set as manager query params --- code/core/src/manager-api/modules/url.ts | 14 ++++++++++---- code/core/src/manager-api/tests/url.test.js | 13 ++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/code/core/src/manager-api/modules/url.ts b/code/core/src/manager-api/modules/url.ts index c37e95537bf3..9e4e3570b58a 100644 --- a/code/core/src/manager-api/modules/url.ts +++ b/code/core/src/manager-api/modules/url.ts @@ -12,6 +12,7 @@ import type { API_Layout, API_UI, API_ViewMode, Args } from 'storybook/internal/ import { global } from '@storybook/global'; import { dequal as deepEqual } from 'dequal'; +import { omit } from 'es-toolkit/object'; import { stringify } from 'picoquery'; import type { ModuleArgs, ModuleFn } from '../lib/types'; @@ -261,18 +262,23 @@ export const init: ModuleFn = (moduleArgs) => { let globalsParam = inheritGlobals ? mergeSerializedParams(customQueryParams?.globals ?? '', globals) : globals; - let customParams = stringify(otherParams, { + let customManagerParams = stringify(otherParams, { + nesting: true, + nestingSyntax: 'js', + }); + let customPreviewParams = stringify(omit(otherParams, ['id', 'viewMode']), { nesting: true, nestingSyntax: 'js', }); argsParam = argsParam && `&args=${argsParam}`; globalsParam = globalsParam && `&globals=${globalsParam}`; - customParams = customParams && `&${customParams}`; + customManagerParams = customManagerParams && `&${customManagerParams}`; + customPreviewParams = customPreviewParams && `&${customPreviewParams}`; return { - managerHref: `${managerBase}?path=/${viewMode}/${refId ? `${refId}_` : ''}${storyId}${argsParam}${globalsParam}${customParams}`, - previewHref: `${previewBase}?id=${storyId}&viewMode=${viewMode}${refParam}${argsParam}${refId ? '' : globalsParam}${customParams}`, + managerHref: `${managerBase}?path=/${viewMode}/${refId ? `${refId}_` : ''}${storyId}${argsParam}${globalsParam}${customManagerParams}`, + previewHref: `${previewBase}?id=${storyId}&viewMode=${viewMode}${refParam}${argsParam}${refId ? '' : globalsParam}${customPreviewParams}`, }; }, getQueryParam(key) { diff --git a/code/core/src/manager-api/tests/url.test.js b/code/core/src/manager-api/tests/url.test.js index 1b095ff0de11..c17db1bf357e 100644 --- a/code/core/src/manager-api/tests/url.test.js +++ b/code/core/src/manager-api/tests/url.test.js @@ -364,10 +364,21 @@ describe('getStoryHrefs', () => { store.setState(state); const { managerHref, previewHref } = api.getStoryHrefs('test--story', { - queryParams: { one: 1, foo: { bar: 'baz' } }, + queryParams: { + one: 1, + foo: { bar: 'baz' }, + id: 'not-allowed-in-preview', + viewMode: 'not-allowed-in-preview', + }, }); expect(managerHref).toContain('&args=a:1&globals=b:2&one=1&foo.bar=baz'); expect(previewHref).toContain('&args=a:1&globals=b:2&one=1&foo.bar=baz'); + + expect(managerHref).toContain('id=not-allowed-in-preview'); + expect(previewHref).not.toContain('id=not-allowed-in-preview'); + + expect(managerHref).toContain('viewMode=not-allowed-in-preview'); + expect(previewHref).not.toContain('viewMode=not-allowed-in-preview'); }); it('correctly preserves args and globals encoding', () => { From f4baa047f9722c7ec4721a4ec015c610169668ca Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 14 Jan 2026 14:08:32 +0100 Subject: [PATCH 298/310] add mcp packages to ignore list in verdaccio config --- scripts/verdaccio.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/verdaccio.yaml b/scripts/verdaccio.yaml index 1854b60bfc41..ca2064f8f25a 100644 --- a/scripts/verdaccio.yaml +++ b/scripts/verdaccio.yaml @@ -186,6 +186,14 @@ packages: access: $all publish: $all proxy: npmjs + '@storybook/addon-mcp': + access: $all + publish: $all + proxy: npmjs + '@storybook/mcp': + access: $all + publish: $all + proxy: npmjs # storybook packages are NOT proxied to global registry # allowing us to republish any version during tests From 9d33b412615dc8c9719d7deb5f67b20d3713601b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 14 Jan 2026 16:30:47 +0100 Subject: [PATCH 299/310] upgrade vite plugin storybook nextjs --- code/frameworks/nextjs-vite/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/frameworks/nextjs-vite/package.json b/code/frameworks/nextjs-vite/package.json index c616cdb4592c..2510fd2fc6b8 100644 --- a/code/frameworks/nextjs-vite/package.json +++ b/code/frameworks/nextjs-vite/package.json @@ -79,7 +79,7 @@ "@storybook/react": "workspace:*", "@storybook/react-vite": "workspace:*", "styled-jsx": "5.1.6", - "vite-plugin-storybook-nextjs": "^3.1.7" + "vite-plugin-storybook-nextjs": "^3.1.9" }, "devDependencies": { "@types/node": "^22.19.1", diff --git a/yarn.lock b/yarn.lock index 11a301fbd37d..9b83c0ecf2e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8156,7 +8156,7 @@ __metadata: semver: "npm:^7.7.3" styled-jsx: "npm:5.1.6" typescript: "npm:^5.9.3" - vite-plugin-storybook-nextjs: "npm:^3.1.7" + vite-plugin-storybook-nextjs: "npm:^3.1.9" peerDependencies: next: ^14.1.0 || ^15.0.0 || ^16.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -30720,9 +30720,9 @@ __metadata: languageName: node linkType: hard -"vite-plugin-storybook-nextjs@npm:^3.1.7": - version: 3.1.7 - resolution: "vite-plugin-storybook-nextjs@npm:3.1.7" +"vite-plugin-storybook-nextjs@npm:^3.1.9": + version: 3.1.9 + resolution: "vite-plugin-storybook-nextjs@npm:3.1.9" dependencies: "@next/env": "npm:16.0.0" image-size: "npm:^2.0.0" @@ -30734,7 +30734,7 @@ __metadata: next: ^14.1.0 || ^15.0.0 || ^16.0.0 storybook: ^0.0.0-0 || ^9.0.0 || ^10.0.0 || ^10.0.0-0 || ^10.1.0-0 || ^10.2.0-0 vite: ^5.0.0 || ^6.0.0 || ^7.0.0 - checksum: 10c0/5254ff5cd9168740659752053316b7d14f270ebc41134926adc02cb2d162674f268b0b4a808b01694d1d7a3f958b694de3dc4132137d6e337c78f4a5b8fee50c + checksum: 10c0/2d854d47debd556154bd575f1e0d962561a73a88e2cdeb0b1719e3510a6b77475a75667213568466866c08e6c21c3c4a50e982814823f24de00e3759c30872d5 languageName: node linkType: hard From 80b4dd39aa1ed03fe45f7a9983fbd7129fa61d25 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 09:48:39 +0100 Subject: [PATCH 300/310] Fix port flag handling in runStorybookDev function to ensure correct port assignment when using an alternative port. --- code/lib/create-storybook/src/initiate.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index 3377dc488495..972c43b27e23 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -201,8 +201,12 @@ async function runStorybookDev(result: { const availablePort = await getServerPort(defaultPort); const useAlternativePort = availablePort !== defaultPort; - if (useAlternativePort) { - flags.push(`--port=${availablePort}`); + const portFlag = flags.findIndex((flag) => flag.startsWith('-p')); + + if (useAlternativePort && portFlag === -1) { + flags.push(`-p ${availablePort}`); + } else if (useAlternativePort && portFlag !== -1) { + flags[portFlag] = `-p ${availablePort}`; } flags.push('--quiet'); From f7e9934d7313e144df6523a8f1d74e569589a567 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 09:52:26 +0100 Subject: [PATCH 301/310] add space for precise matching --- code/lib/create-storybook/src/initiate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index 972c43b27e23..36117d29b2ab 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -201,7 +201,7 @@ async function runStorybookDev(result: { const availablePort = await getServerPort(defaultPort); const useAlternativePort = availablePort !== defaultPort; - const portFlag = flags.findIndex((flag) => flag.startsWith('-p')); + const portFlag = flags.findIndex((flag) => flag.startsWith('-p ')); if (useAlternativePort && portFlag === -1) { flags.push(`-p ${availablePort}`); From af8ac1a0e664264f0c8a7ba303ea70a557624ddc Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 15 Jan 2026 10:57:41 +0100 Subject: [PATCH 302/310] strict equal react sandbox to not match preact sandbox --- code/e2e-tests/addon-mcp.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/e2e-tests/addon-mcp.spec.ts b/code/e2e-tests/addon-mcp.spec.ts index 1746a1948332..4f7db4fdc984 100644 --- a/code/e2e-tests/addon-mcp.spec.ts +++ b/code/e2e-tests/addon-mcp.spec.ts @@ -47,7 +47,7 @@ async function mcpRequest( test.describe('addon-mcp', () => { test.skip( - !templateName?.includes('react-vite/default-ts'), + templateName !== 'react-vite/default-ts', 'Only run for sandboxes with addon-mcp configured' ); From 65c61e3e04aaabc81cde820400e0fd2405fe68f1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 11:04:42 +0100 Subject: [PATCH 303/310] Refactor runStorybookDev to use parts array for command flags, improving port handling and command execution. --- code/lib/create-storybook/src/initiate.ts | 25 +++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index 36117d29b2ab..c37a786ff716 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -176,10 +176,10 @@ async function runStorybookDev(result: { try { const supportsOnboarding = FeatureCompatibilityService.supportsOnboarding(projectType); - const flags = []; + const parts = storybookCommand.split(' '); if (packageManager.type === 'npm') { - flags.push('--silent'); + parts.push('--silent'); } // npm needs extra -- to pass flags to the command @@ -189,11 +189,11 @@ async function runStorybookDev(result: { packageManager.type === PackageManagerName.BUN; if (doesNeedExtraDash && projectType !== ProjectType.ANGULAR) { - flags.push('--'); + parts.push('--'); } if (supportsOnboarding && shouldOnboard) { - flags.push('--initial-path=/onboarding'); + parts.push('--initial-path=/onboarding'); } // Check if default port 6006 is available @@ -201,20 +201,23 @@ async function runStorybookDev(result: { const availablePort = await getServerPort(defaultPort); const useAlternativePort = availablePort !== defaultPort; - const portFlag = flags.findIndex((flag) => flag.startsWith('-p ')); + if (useAlternativePort) { + const numberString = defaultPort.toString(); + const findPortNumberIndex = parts.findIndex((flag) => flag === numberString); - if (useAlternativePort && portFlag === -1) { - flags.push(`-p ${availablePort}`); - } else if (useAlternativePort && portFlag !== -1) { - flags[portFlag] = `-p ${availablePort}`; + if (findPortNumberIndex !== -1) { + parts[findPortNumberIndex] = availablePort.toString(); + } else { + parts.push(`-p`, `${availablePort}`); + } } - flags.push('--quiet'); + parts.push('--quiet'); // instead of calling 'dev' automatically, we spawn a subprocess so that it gets // executed directly in the user's project directory. This avoid potential issues // with packages running in npxs' node_modules - const [command, ...args] = [...storybookCommand.split(' '), ...flags]; + const [command, ...args] = [...parts]; await executeCommand({ command: command, args, From 2f27aba2a78dc5f69ea4cd45bacbb17d02e4c374 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 12:08:30 +0100 Subject: [PATCH 304/310] move the code to initiate, make it more fault tolerant (cannot add the same argument twice) Add a wrapper preventing adding any sbFLags when this is not supported (angular was broken) --- code/lib/create-storybook/src/initiate.ts | 51 +++++++++++------------ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index c37a786ff716..98f296d38f19 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -156,6 +156,17 @@ export async function initiate(options: CommandOptions): Promise { }); if (initiateResult?.shouldRunDev) { + const defaultPort = 6006; + const availablePort = await getServerPort(defaultPort); + const useAlternativePort = availablePort !== defaultPort; + + if (useAlternativePort) { + initiateResult.storybookCommand = initiateResult.storybookCommand?.replace( + `-p ${defaultPort}`, + `-p ${availablePort}` + ); + } + await runStorybookDev(initiateResult); } } @@ -182,37 +193,25 @@ async function runStorybookDev(result: { parts.push('--silent'); } - // npm needs extra -- to pass flags to the command - // in the case of Angular, we are calling `ng run` which doesn't need the extra `--` - const doesNeedExtraDash = - packageManager.type === PackageManagerName.NPM || - packageManager.type === PackageManagerName.BUN; - - if (doesNeedExtraDash && projectType !== ProjectType.ANGULAR) { - parts.push('--'); - } - - if (supportsOnboarding && shouldOnboard) { - parts.push('--initial-path=/onboarding'); - } + const supportSbFlags = projectType !== ProjectType.ANGULAR; - // Check if default port 6006 is available - const defaultPort = 6006; - const availablePort = await getServerPort(defaultPort); - const useAlternativePort = availablePort !== defaultPort; + if (supportSbFlags) { + // npm needs extra -- to pass flags to the command + // in the case of Angular, we are calling `ng run` which doesn't need the extra `--` + const doesNeedExtraDash = + packageManager.type === PackageManagerName.NPM || + packageManager.type === PackageManagerName.BUN; - if (useAlternativePort) { - const numberString = defaultPort.toString(); - const findPortNumberIndex = parts.findIndex((flag) => flag === numberString); + if (doesNeedExtraDash) { + parts.push('--'); + } - if (findPortNumberIndex !== -1) { - parts[findPortNumberIndex] = availablePort.toString(); - } else { - parts.push(`-p`, `${availablePort}`); + if (supportsOnboarding && shouldOnboard) { + parts.push('--initial-path=/onboarding'); } - } - parts.push('--quiet'); + parts.push('--quiet'); + } // instead of calling 'dev' automatically, we spawn a subprocess so that it gets // executed directly in the user's project directory. This avoid potential issues From 817fbda005911991c1cf5bd16384643531a303d9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 12:26:04 +0100 Subject: [PATCH 305/310] fix unit test --- code/lib/create-storybook/src/initiate.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/lib/create-storybook/src/initiate.test.ts b/code/lib/create-storybook/src/initiate.test.ts index 17c50007e59c..7d9b1799ef4e 100644 --- a/code/lib/create-storybook/src/initiate.test.ts +++ b/code/lib/create-storybook/src/initiate.test.ts @@ -18,6 +18,10 @@ const getCliIntegrationFromAncestry = vi.mock('storybook/internal/telemetry'); +vi.mock('storybook/internal/core-server', () => ({ + getServerPort: vi.fn().mockResolvedValue(6006), +})); + describe('getStorybookVersionFromAncestry', () => { it('possible storybook path', () => { const ancestry = [{ command: 'node' }, { command: 'storybook@7.0.0' }, { command: 'npm' }]; From f9530561da2a7d22434ddc6d318bc2d78d45c265 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 12:49:06 +0100 Subject: [PATCH 306/310] move back to a system where we simply inject, since the command doesn't actually include the `-p` part, it just has `npm run storybook` in it, so the duplicate `-p` argument is unavoidable --- code/lib/create-storybook/src/initiate.ts | 29 +++++++++++------------ 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index 98f296d38f19..bf1cf5f926fb 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -156,17 +156,6 @@ export async function initiate(options: CommandOptions): Promise { }); if (initiateResult?.shouldRunDev) { - const defaultPort = 6006; - const availablePort = await getServerPort(defaultPort); - const useAlternativePort = availablePort !== defaultPort; - - if (useAlternativePort) { - initiateResult.storybookCommand = initiateResult.storybookCommand?.replace( - `-p ${defaultPort}`, - `-p ${availablePort}` - ); - } - await runStorybookDev(initiateResult); } } @@ -206,17 +195,27 @@ async function runStorybookDev(result: { parts.push('--'); } - if (supportsOnboarding && shouldOnboard) { - parts.push('--initial-path=/onboarding'); - } + const defaultPort = 6006; + const availablePort = await getServerPort(defaultPort); + const useAlternativePort = availablePort !== defaultPort; + + if (useAlternativePort) { + parts.push(`-p ${availablePort}`); - parts.push('--quiet'); + if (supportsOnboarding && shouldOnboard) { + parts.push('--initial-path=/onboarding'); + } + + parts.push('--quiet'); + } } // instead of calling 'dev' automatically, we spawn a subprocess so that it gets // executed directly in the user's project directory. This avoid potential issues // with packages running in npxs' node_modules const [command, ...args] = [...parts]; + + console.log({ args }); await executeCommand({ command: command, args, From 69c5a36ed2c169c5be7f80a7b2a6d289ee0bd438 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 12:58:30 +0100 Subject: [PATCH 307/310] remove debug logs --- code/lib/create-storybook/src/initiate.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index bf1cf5f926fb..9265220b1b40 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -215,7 +215,6 @@ async function runStorybookDev(result: { // with packages running in npxs' node_modules const [command, ...args] = [...parts]; - console.log({ args }); await executeCommand({ command: command, args, From 629696cdaa2028080573364f233675c6c0ede5f7 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 12:59:39 +0100 Subject: [PATCH 308/310] fix comment from coder abbitai --- code/lib/create-storybook/src/initiate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/create-storybook/src/initiate.ts b/code/lib/create-storybook/src/initiate.ts index 9265220b1b40..c94160f0d65d 100644 --- a/code/lib/create-storybook/src/initiate.ts +++ b/code/lib/create-storybook/src/initiate.ts @@ -200,7 +200,7 @@ async function runStorybookDev(result: { const useAlternativePort = availablePort !== defaultPort; if (useAlternativePort) { - parts.push(`-p ${availablePort}`); + parts.push(`-p`, `${availablePort}`); if (supportsOnboarding && shouldOnboard) { parts.push('--initial-path=/onboarding'); From 8a870abb1d8cc8229785d329229fdf542bd691ac Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Thu, 15 Jan 2026 12:58:21 +0000 Subject: [PATCH 309/310] Write changelog for 10.2.0-beta.0 [skip ci] --- CHANGELOG.prerelease.md | 7 +++++++ code/package.json | 3 ++- docs/versions/next.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index 2eda235c9da1..7645bb9d4a12 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,10 @@ +## 10.2.0-beta.0 + +- CLIInitiate: Simplify the CLI init port flag detection - [#33546](https://github.com/storybookjs/storybook/pull/33546), thanks @ndelangen! +- Initiate: Fix used port flag handling - [#33544](https://github.com/storybookjs/storybook/pull/33544), thanks @ndelangen! +- Manager: Fix system query parameters being overridable - [#33535](https://github.com/storybookjs/storybook/pull/33535), thanks @JReinhold! +- NextJSVite: Upgrade plugin - [#33538](https://github.com/storybookjs/storybook/pull/33538), thanks @ndelangen! + ## 10.2.0-alpha.18 - Build: Fix `ejslint` execution path in lint-staged - [#33504](https://github.com/storybookjs/storybook/pull/33504), thanks @Yeonny0723! diff --git a/code/package.json b/code/package.json index 0ad1cad39cd2..a0f1e37203c0 100644 --- a/code/package.json +++ b/code/package.json @@ -220,5 +220,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "10.2.0-beta.0" } diff --git a/docs/versions/next.json b/docs/versions/next.json index 3463827282f5..ee1e4f0d7b2a 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"10.2.0-alpha.18","info":{"plain":"- Build: Fix `ejslint` execution path in lint-staged - [#33504](https://github.com/storybookjs/storybook/pull/33504), thanks @Yeonny0723!\n- CLI: Detect free port when running dev during initiate - [#33532](https://github.com/storybookjs/storybook/pull/33532), thanks @ndelangen!\n- Core: Improve path handling in arg types data extraction - [#33536](https://github.com/storybookjs/storybook/pull/33536), thanks @yannbf!\n- Core: Refactor channel initialization - [#33520](https://github.com/storybookjs/storybook/pull/33520), thanks @yannbf!\n- Telemetry: Add `packageJson.type` - [#33525](https://github.com/storybookjs/storybook/pull/33525), thanks @ndelangen!\n- UI: Improve landmark navigation - [#33457](https://github.com/storybookjs/storybook/pull/33457), thanks @Sidnioulz!"}} \ No newline at end of file +{"version":"10.2.0-beta.0","info":{"plain":"- CLIInitiate: Simplify the CLI init port flag detection - [#33546](https://github.com/storybookjs/storybook/pull/33546), thanks @ndelangen!\n- Initiate: Fix used port flag handling - [#33544](https://github.com/storybookjs/storybook/pull/33544), thanks @ndelangen!\n- Manager: Fix system query parameters being overridable - [#33535](https://github.com/storybookjs/storybook/pull/33535), thanks @JReinhold!\n- NextJSVite: Upgrade plugin - [#33538](https://github.com/storybookjs/storybook/pull/33538), thanks @ndelangen!"}} \ No newline at end of file From 562c99eeb78483ce9d7a8d97489166c6471e9a5f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Jan 2026 14:01:21 +0100 Subject: [PATCH 310/310] Update CHANGELOG for 10.2.0-beta.0: Remove entries for CLIInitiate port flag detection and used port flag handling --- CHANGELOG.prerelease.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index 7645bb9d4a12..3a2aeed6987e 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,7 +1,5 @@ ## 10.2.0-beta.0 -- CLIInitiate: Simplify the CLI init port flag detection - [#33546](https://github.com/storybookjs/storybook/pull/33546), thanks @ndelangen! -- Initiate: Fix used port flag handling - [#33544](https://github.com/storybookjs/storybook/pull/33544), thanks @ndelangen! - Manager: Fix system query parameters being overridable - [#33535](https://github.com/storybookjs/storybook/pull/33535), thanks @JReinhold! - NextJSVite: Upgrade plugin - [#33538](https://github.com/storybookjs/storybook/pull/33538), thanks @ndelangen!