From 7835c12f04e09386c9b8770bdb706465da9f03a5 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 25 Sep 2025 13:45:10 +0200 Subject: [PATCH 1/8] add svelte-ecosystem-ci script --- package.json | 7 +++++-- .../{vite-ecosystem-ci => ecosystem-ci}/before-test.js | 10 ++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) rename scripts/{vite-ecosystem-ci => ecosystem-ci}/before-test.js (77%) diff --git a/package.json b/package.json index c4c5b1057f07..91eb436f58aa 100644 --- a/package.json +++ b/package.json @@ -3,19 +3,22 @@ "scripts": { "ci-tests": "cd code; yarn ci-tests", "get-report-message": "cd scripts; yarn get-report-message", - "get-template": "cd scripts; yarn get-template", "get-sandbox-dir": "cd scripts; yarn get-sandbox-dir", + "get-template": "cd scripts; yarn get-template", "i": "yarn --cwd scripts && yarn --cwd code", "knip": "cd code; yarn knip", "lint": "cd code; yarn lint", "nx": "cd code; yarn nx", "pretty-docs": "cd scripts; yarn install >/dev/null; yarn docs:prettier:write", "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", + "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit/skeleton-ts && yarn install", + "svelte-ecosystem-ci:build": "yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install", + "svelte-ecosystem-ci:test": "yarn task --task test-runner-dev --template svelte-kit/skeleton-ts --start-from=dev && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", "test": "cd code; yarn test", "test:watch": "cd code; yarn test:watch", "upload-bench": "cd scripts; yarn upload-bench", - "vite-ecosystem-ci:before-test": "node ./scripts/vite-ecosystem-ci/before-test.js && cd ./sandbox/react-vite-default-ts && yarn install", + "vite-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js react-vite/default-ts && cd ./sandbox/react-vite-default-ts && yarn install", "vite-ecosystem-ci:build": "yarn task --task sandbox --template react-vite/default-ts --start-from=install", "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" }, diff --git a/scripts/vite-ecosystem-ci/before-test.js b/scripts/ecosystem-ci/before-test.js similarity index 77% rename from scripts/vite-ecosystem-ci/before-test.js rename to scripts/ecosystem-ci/before-test.js index 0dbeb783f27c..21171474b1eb 100644 --- a/scripts/vite-ecosystem-ci/before-test.js +++ b/scripts/ecosystem-ci/before-test.js @@ -14,10 +14,12 @@ import { execaCommand } from 'execa'; const filename = fileURLToPath(import.meta.url); const __dirname = dirname(filename); +const sandbox = process.argv[2] ?? 'react-vite/default-ts'; + const rootPackageJsonPath = resolve(__dirname, '../../package.json'); const sandboxPackageJsonPath = resolve( __dirname, - '../../sandbox/react-vite-default-ts/package.json' + `../../sandbox/${sandbox.replace('/', '-')}/package.json` ); const rootPackageJson = JSON.parse(await readFile(rootPackageJsonPath, 'utf-8')); @@ -29,7 +31,7 @@ sandboxPackageJson.resolutions = { }; await writeFile(sandboxPackageJsonPath, JSON.stringify(sandboxPackageJson, null, 2)); -const sandboxFolder = dirname(sandboxPackageJsonPath); +const sandboxDir = dirname(sandboxPackageJsonPath); -await execaCommand('yarn add playwright', { cwd: sandboxFolder, shell: true }); -await execaCommand('yarn playwright install', { cwd: sandboxFolder, shell: true }); +await execaCommand('yarn add playwright', { cwd: sandboxDir, shell: true }); +await execaCommand('yarn playwright install', { cwd: sandboxDir, shell: true }); From 142c7f571f8135492053788061872f70345e3592 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 25 Sep 2025 14:02:07 +0200 Subject: [PATCH 2/8] fix path typo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 91eb436f58aa..7b74f19e533c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "nx": "cd code; yarn nx", "pretty-docs": "cd scripts; yarn install >/dev/null; yarn docs:prettier:write", "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", - "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit/skeleton-ts && yarn install", + "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit-skeleton-ts && yarn install", "svelte-ecosystem-ci:build": "yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install", "svelte-ecosystem-ci:test": "yarn task --task test-runner-dev --template svelte-kit/skeleton-ts --start-from=dev && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", From 4432d7b919b12ef8e257fbafcadf726d6b6b163c Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 25 Sep 2025 14:31:49 +0200 Subject: [PATCH 3/8] use build mode for test runner instead --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b74f19e533c..87fa95f88194 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit-skeleton-ts && yarn install", "svelte-ecosystem-ci:build": "yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install", - "svelte-ecosystem-ci:test": "yarn task --task test-runner-dev --template svelte-kit/skeleton-ts --start-from=dev && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration", + "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", "test": "cd code; yarn test", "test:watch": "cd code; yarn test:watch", From f66da1abbc8c61154419ecae4fb2b6ad2592ed3c Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 25 Sep 2025 14:39:32 +0200 Subject: [PATCH 4/8] try no-link mode --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 87fa95f88194..9be9cc60edba 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "pretty-docs": "cd scripts; yarn install >/dev/null; yarn docs:prettier:write", "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit-skeleton-ts && yarn install", - "svelte-ecosystem-ci:build": "yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install", - "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration", + "svelte-ecosystem-ci:build": "yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install --no-link", + "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration --no-link", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", "test": "cd code; yarn test", "test:watch": "cd code; yarn test:watch", From 4733ea26b1e8dc5f45f0f654679670173705f439 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 25 Sep 2025 16:46:51 +0200 Subject: [PATCH 5/8] try building @storybook/svelte separately --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9be9cc60edba..cb61c6ae662d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "pretty-docs": "cd scripts; yarn install >/dev/null; yarn docs:prettier:write", "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit-skeleton-ts && yarn install", - "svelte-ecosystem-ci:build": "yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install --no-link", + "svelte-ecosystem-ci:build": "yarn --cwd code build svelte && yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install --no-link", "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration --no-link", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", "test": "cd code; yarn test", From 31f99af9817c28a1cb8ac12c57edc3100d8bfafb Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 25 Sep 2025 16:49:45 +0200 Subject: [PATCH 6/8] =?UTF-8?q?install=20deps=20first=20=F0=9F=A4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb61c6ae662d..f6a31dc8b38b 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "pretty-docs": "cd scripts; yarn install >/dev/null; yarn docs:prettier:write", "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit-skeleton-ts && yarn install", - "svelte-ecosystem-ci:build": "yarn --cwd code build svelte && yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=install --no-link", + "svelte-ecosystem-ci:build": "yarn task --task install && yarn --cwd code build svelte && yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=compile --no-link", "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration --no-link", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", "test": "cd code; yarn test", From 9dd0cd4d4e700f504b46fcd185a11235fa6bc333 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Thu, 25 Sep 2025 16:59:13 +0200 Subject: [PATCH 7/8] =?UTF-8?q?don't=20run=20test-runner=20twice=20?= =?UTF-8?q?=F0=9F=A4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6a31dc8b38b..9d3b78135482 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit-skeleton-ts && yarn install", "svelte-ecosystem-ci:build": "yarn task --task install && yarn --cwd code build svelte && yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=compile --no-link", - "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration --no-link", + "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration --no-link", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", "test": "cd code; yarn test", "test:watch": "cd code; yarn test:watch", From 60a567c522919859c80215b76c97e6fe8a4630f2 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Mon, 29 Sep 2025 11:19:24 +0200 Subject: [PATCH 8/8] skip nx remote cache for compilation --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9d3b78135482..67fd64d39a4e 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,14 @@ "pretty-docs": "cd scripts; yarn install >/dev/null; yarn docs:prettier:write", "start": "yarn task --task dev --template react-vite/default-ts --start-from=install", "svelte-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js svelte-kit/skeleton-ts && cd ./sandbox/svelte-kit-skeleton-ts && yarn install", - "svelte-ecosystem-ci:build": "yarn task --task install && yarn --cwd code build svelte && yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=compile --no-link", - "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration --no-link", + "svelte-ecosystem-ci:build": "yarn task --task install && yarn --cwd code build svelte && yarn task --task sandbox --template svelte-kit/skeleton-ts --start-from=compile --no-link --skip-cache", + "svelte-ecosystem-ci:test": "yarn task --task test-runner --template svelte-kit/skeleton-ts --start-from=build --no-link --skip-cache && yarn task --task vitest-integration --template svelte-kit/skeleton-ts --start-from vitest-integration --no-link --skip-cache", "task": "echo 'Installing Script Dependencies...'; cd scripts; yarn install >/dev/null; cd ..; yarn --cwd=./scripts task", "test": "cd code; yarn test", "test:watch": "cd code; yarn test:watch", "upload-bench": "cd scripts; yarn upload-bench", "vite-ecosystem-ci:before-test": "node ./scripts/ecosystem-ci/before-test.js react-vite/default-ts && cd ./sandbox/react-vite-default-ts && yarn install", - "vite-ecosystem-ci:build": "yarn task --task sandbox --template react-vite/default-ts --start-from=install", + "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.9.1",