From 5d5a897d3f2b736b8a20ee1264577963b0f6f761 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Wed, 10 Jan 2024 14:10:00 +0100 Subject: [PATCH 1/3] Update wait-on command to use TCP instead of HTTP --- .github/workflows/generate-sandboxes-main.yml | 2 +- .github/workflows/generate-sandboxes-next.yml | 2 +- scripts/tasks/run-registry.ts | 2 +- scripts/tasks/serve.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate-sandboxes-main.yml b/.github/workflows/generate-sandboxes-main.yml index 53814040f610..cc17376c57de 100644 --- a/.github/workflows/generate-sandboxes-main.yml +++ b/.github/workflows/generate-sandboxes-main.yml @@ -43,7 +43,7 @@ jobs: run: yarn local-registry --open & working-directory: ./code - name: Wait for registry - run: yarn wait-on http://localhost:6001 + run: yarn wait-on tcp:127.0.0.1:6001 working-directory: ./code - name: Generate run: yarn generate-sandboxes --local-registry diff --git a/.github/workflows/generate-sandboxes-next.yml b/.github/workflows/generate-sandboxes-next.yml index d9355f593dc8..2c0b592d024f 100644 --- a/.github/workflows/generate-sandboxes-next.yml +++ b/.github/workflows/generate-sandboxes-next.yml @@ -43,7 +43,7 @@ jobs: run: yarn local-registry --open & working-directory: ./code - name: Wait for registry - run: yarn wait-on http://localhost:6001 + run: yarn wait-on tcp:127.0.0.1:6001 working-directory: ./code - name: Generate run: yarn generate-sandboxes --local-registry --debug diff --git a/scripts/tasks/run-registry.ts b/scripts/tasks/run-registry.ts index 46cac80599e5..cdf6d4a227a1 100644 --- a/scripts/tasks/run-registry.ts +++ b/scripts/tasks/run-registry.ts @@ -15,7 +15,7 @@ export async function runRegistry({ dryRun, debug }: { dryRun?: boolean; debug?: // If aborted, we want to make sure the rejection is handled. if (!err.killed) throw err; }); - await exec('yarn wait-on http://localhost:6001', { cwd: CODE_DIRECTORY }, { dryRun, debug }); + await exec('yarn wait-on tcp:127.0.0.1:6001', { cwd: CODE_DIRECTORY }, { dryRun, debug }); return controller; } diff --git a/scripts/tasks/serve.ts b/scripts/tasks/serve.ts index 2b3a5cc8c4b9..609132261380 100644 --- a/scripts/tasks/serve.ts +++ b/scripts/tasks/serve.ts @@ -27,7 +27,7 @@ export const serve: Task = { throw err; } }); - await waitOn({ resources: [`http://localhost:${PORT}`], interval: 16 }); + await waitOn({ resources: [`tcp:127.0.0.1:${PORT}`], interval: 16 }); return controller; }, From fddd249d00ec0b34746fad0ee3591859b390b775 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 16 Jan 2024 13:44:48 +0100 Subject: [PATCH 2/3] Remove inDevelopment flag from internal webpack5-babel template --- .circleci/config.yml | 68 +++++++++++++-------------- code/lib/cli/src/sandbox-templates.ts | 1 - 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8e93487dd40a..b212c825ddc2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,8 +4,8 @@ parameters: workflow: description: Which workflow to run type: enum - enum: ['normal', 'merged', 'daily', 'skipped', 'docs'] - default: 'skipped' + enum: ["normal", "merged", "daily", "skipped", "docs"] + default: "skipped" executors: sb_node_16_classic: @@ -13,8 +13,8 @@ executors: class: description: The Resource class type: enum - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'small' + enum: ["small", "medium", "medium+", "large", "xlarge"] + default: "small" working_directory: /tmp/storybook docker: - image: cimg/node:18.18.0 @@ -26,8 +26,8 @@ executors: class: description: The Resource class type: enum - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'small' + enum: ["small", "medium", "medium+", "large", "xlarge"] + default: "small" working_directory: /tmp/storybook docker: - image: cimg/node:18.18.0-browsers @@ -39,8 +39,8 @@ executors: class: description: The Resource class type: enum - enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'small' + enum: ["small", "medium", "medium+", "large", "xlarge"] + default: "small" working_directory: /tmp/storybook docker: - image: mcr.microsoft.com/playwright:v1.36.0-focal @@ -56,7 +56,7 @@ orbs: commands: cancel-workflow-on-failure: - description: 'Cancels the entire workflow in case the previous step has failed' + description: "Cancels the entire workflow in case the previous step has failed" steps: - run: name: Cancel current workflow @@ -66,13 +66,13 @@ commands: 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}" report-workflow-on-failure: - description: 'Reports failures to discord' + description: "Reports failures to discord" parameters: template: description: | Which template to report in discord. Applicable for parallel sandbox jobs type: string - default: 'none' + default: "none" steps: - run: when: on_fail @@ -88,7 +88,7 @@ jobs: name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - restore_cache: name: Restore Yarn cache keys: @@ -114,7 +114,7 @@ jobs: name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - restore_cache: name: Restore Yarn cache keys: @@ -157,7 +157,7 @@ jobs: name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -173,7 +173,7 @@ jobs: name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -187,7 +187,7 @@ jobs: executor: sb_node_16_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -215,7 +215,7 @@ jobs: name: sb_node_16_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -237,7 +237,7 @@ jobs: name: sb_node_16_browsers steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - codecov/upload @@ -273,7 +273,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -297,7 +297,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -317,7 +317,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -356,7 +356,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -376,7 +376,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -415,7 +415,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -438,7 +438,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -461,7 +461,7 @@ jobs: parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - run: @@ -483,7 +483,7 @@ jobs: type: string steps: - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' + clone_options: "--depth 1 --verbose" - attach_workspace: at: . - when: @@ -706,22 +706,22 @@ workflows: requires: - build - create-sandboxes: - parallelism: 33 + parallelism: 34 requires: - build # - smoke-test-sandboxes: # disabled for now # requires: # - create-sandboxes - build-sandboxes: - parallelism: 33 + parallelism: 34 requires: - create-sandboxes - chromatic-sandboxes: - parallelism: 30 + parallelism: 31 requires: - build-sandboxes - e2e-production: - parallelism: 28 + parallelism: 29 requires: - build-sandboxes - e2e-dev: @@ -729,7 +729,7 @@ workflows: requires: - create-sandboxes - test-runner-production: - parallelism: 28 + parallelism: 29 requires: - build-sandboxes @@ -744,14 +744,14 @@ workflows: # - "yarn1" # - "yarn2" # - "pnpm" - template: + 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" - + # TODO: reenable once we find out the source of flakyness # - test-runner-dev: # parallelism: 4 diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 8451d086194e..d470e06e6ffe 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -499,7 +499,6 @@ const internalTemplates = { ), }, isInternal: true, - inDevelopment: true, skipTasks: ['e2e-tests-dev', 'bench'], }, 'internal/react16-webpack': { From fc05211a981cf4b2c6596d128adffde110ae5a95 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Tue, 16 Jan 2024 16:32:56 +0100 Subject: [PATCH 3/3] Only add @storybook/theming to resolutions --- code/package.json | 9 ++------- code/yarn.lock | 19 ++----------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/code/package.json b/code/package.json index f47fbb71b8ff..f1eaf0f85c44 100644 --- a/code/package.json +++ b/code/package.json @@ -77,12 +77,7 @@ ], "resolutions": { "@playwright/test": "1.36.0", - "@storybook/client-logger": "workspace:*", - "@storybook/core-events": "workspace:*", - "@storybook/instrumenter": "workspace:*", - "@storybook/preview-api": "workspace:*", - "@storybook/test": "workspace:*", - "@storybook/types": "workspace:*", + "@storybook/theming": "workspace:*", "@vitest/expect@1.1.3": "patch:@vitest/expect@npm%3A1.1.3#~/.yarn/patches/@vitest-expect-npm-1.1.3-2062bf533f.patch", "esbuild": "^0.18.0", "playwright": "1.36.0", @@ -162,7 +157,7 @@ "@storybook/svelte": "workspace:*", "@storybook/svelte-webpack5": "workspace:*", "@storybook/telemetry": "workspace:*", - "@storybook/test": "next", + "@storybook/test": "workspace:*", "@storybook/testing-library": "next", "@storybook/theming": "workspace:*", "@storybook/types": "workspace:*", diff --git a/code/yarn.lock b/code/yarn.lock index 54e625cf8ce0..04e71212fdee 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -2613,7 +2613,7 @@ __metadata: languageName: node linkType: hard -"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.0, @emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": +"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": version: 1.0.1 resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" peerDependencies: @@ -6448,7 +6448,7 @@ __metadata: "@storybook/svelte": "workspace:*" "@storybook/svelte-webpack5": "workspace:*" "@storybook/telemetry": "workspace:*" - "@storybook/test": "npm:next" + "@storybook/test": "workspace:*" "@storybook/testing-library": "npm:next" "@storybook/theming": "workspace:*" "@storybook/types": "workspace:*" @@ -6723,21 +6723,6 @@ __metadata: languageName: node linkType: hard -"@storybook/theming@npm:^7.0.2": - version: 7.5.0 - resolution: "@storybook/theming@npm:7.5.0" - dependencies: - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.0" - "@storybook/client-logger": "npm:7.5.0" - "@storybook/global": "npm:^5.0.0" - memoizerific: "npm:^1.11.3" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 57da8e27c748cbec4dc1661cdd2d449949d97476d8e97933696b31d07c7361cbbcca8d7225cc00ca078daa160023b8965ddec7c23519ce0a4ef2658246b062e7 - languageName: node - linkType: hard - "@storybook/theming@workspace:*, @storybook/theming@workspace:lib/theming": version: 0.0.0-use.local resolution: "@storybook/theming@workspace:lib/theming"