From 25cb6e06bba46774239b7adb77ad685590f44aa8 Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Thu, 27 Aug 2026 13:16:37 +0800 Subject: [PATCH 1/8] missed a spot from #1124 --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ef53d4f1..5c838ce97 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -152,7 +152,7 @@ To run svelte-migrate locally: ```sh # from root of project -node ./packages/migrate/bin.js +pnpm sv migrate ``` ## Deprecation From 4245ed5ae2a80c8341909af490466141763d4b99 Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Thu, 27 Aug 2026 13:28:51 +0800 Subject: [PATCH 2/8] update section higher up --- CONTRIBUTING.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c838ce97..f8a106a89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -154,6 +154,10 @@ To run svelte-migrate locally: # from root of project pnpm sv migrate ``` +## Updating dependencies + +Run `pnpm update-deps` to recursively update the dependencies of all addons and create templates. +After that run `pnpm update -r --latest` to recursively update all dependencies of package.json files to their latest version. ## Deprecation @@ -208,8 +212,3 @@ Choose a scope that identifies the part of the project affected by the change. O - `migrate` for migrations and migration tasks - `addons` for behavior shared across add-ons, or the add-on name such as `drizzle`, `eslint`, or `better-auth` for a specific add-on - `deps` for dependency-only changes - -## Updating dependencies - -Run `pnpm update-deps` to recursively update the dependencies of all addons and create templates. -After that run `pnpm update -r --latest` to recursively update all dependencies of package.json files to their latest version. From 0e30d914fec51651661baf04d3446bf2ad9270fb Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Thu, 27 Aug 2026 13:29:35 +0800 Subject: [PATCH 3/8] promptless command --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8a106a89..e64673d3b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,8 +114,7 @@ Some snapshots are testing the output of `sv` directly from the generated binary In one command: ```sh -pnpm build && pnpm test:ui --project cli -# Press `u` when prompted to update snapshots. +pnpm build && pnpm test --project cli --update all ``` ## Style Guide From a766d37e703390d45106377d07cc3297cd1a00dc Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Thu, 27 Aug 2026 13:30:29 +0800 Subject: [PATCH 4/8] visual diff --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e64673d3b..4bb428321 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,10 +74,11 @@ pnpm test --project addons eslint # Just eslint add-on tests pnpm build && pnpm test --project cli # CLI tests ``` -Run with vitest ui for interactive debugging: +For interactive debugging, append `:ui`: -```sh -pnpm test:ui --project cli +```diff +-pnpm test --project cli ++pnpm test:ui --project cli ``` Run all tests (slow, typically for CI): From 47dfe695e3512aaa7d4b3e46d7535201c3154b1f Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Thu, 27 Aug 2026 13:39:41 +0800 Subject: [PATCH 5/8] combine --- CONTRIBUTING.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bb428321..6ef45a107 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,6 +47,11 @@ Run the 'cli' package: ```sh pnpm sv +pnpm sv create +pnpm sv add +pnpm sv migrate +pnpm sv check +pnpm sv help ``` Run build with watch mode: @@ -146,14 +151,6 @@ pnpm format pnpm check ``` -## svelte-migrate - -To run svelte-migrate locally: - -```sh -# from root of project -pnpm sv migrate -``` ## Updating dependencies Run `pnpm update-deps` to recursively update the dependencies of all addons and create templates. From b0feb8c1923f504ab06487795cf478e117737153 Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Thu, 27 Aug 2026 13:40:40 +0800 Subject: [PATCH 6/8] concise --- CONTRIBUTING.md | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ef45a107..7b6e18ab4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,16 +15,11 @@ Please keep your pull requests focused to feature or issue. Focused smaller chan ## Preparing -This is a monorepo, meaning the repo holds multiple packages. It requires the use of [pnpm](https://pnpm.io/). You can [install pnpm](https://pnpm.io/installation) with: +This project is a monorepo managed with pnpm workspaces. Install it [here](https://pnpm.io/installation). -```sh -npm i -g pnpm -``` +For testing, [docker](https://docs.docker.com/get-started/get-docker) is also required. For linux users, you will have to ensure 'sudo' is not required. See [docker post install](https://docs.docker.com/engine/install/linux-postinstall/) -_(Optional)_ For running certain packages and tests locally you will need to install [docker](https://docs.docker.com/get-started/get-docker). -Linux users, you will have to ensure 'sudo' is not required. See [docker post install](https://docs.docker.com/engine/install/linux-postinstall/) - -`pnpm` commands run in the project's root directory will run on all sub-projects. You can checkout the code and install the dependencies with: +Checkout the code and install the dependencies with: ```sh git clone https://github.com/sveltejs/cli.git @@ -127,29 +122,12 @@ pnpm build && pnpm test --project cli --update all ### Coding style -There are a few guidelines we follow: - -- Ensure `pnpm lint` and `pnpm check` pass. You can run `pnpm format` to format the code -- linting - -```sh -# from root of project -pnpm lint -``` - -- formatting - -```sh -# from root of project -pnpm format -``` +Ensure the following passes: -- type checking +- `pnpm lint` +- `pnpm check` -```sh -# from root of project -pnpm check -``` +Use `pnpm format` to format the code. ## Updating dependencies From 7b9f5aca2c782211007a881e93a455605ff72d08 Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Thu, 27 Aug 2026 13:42:57 +0800 Subject: [PATCH 7/8] full command --- CONTRIBUTING.md | 58 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b6e18ab4..ad6cbdde6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ Checkout the code and install the dependencies with: ```sh git clone https://github.com/sveltejs/cli.git cd cli -pnpm i +pnpm install ``` ## Build and run @@ -33,7 +33,7 @@ To build the project and all packages. Run the 'build' script: ```sh # from root of project -pnpm build +pnpm run build ``` This outputs into /packages/PACKAGE/dist/. @@ -41,18 +41,18 @@ This outputs into /packages/PACKAGE/dist/. Run the 'cli' package: ```sh -pnpm sv -pnpm sv create -pnpm sv add -pnpm sv migrate -pnpm sv check -pnpm sv help +pnpm exec sv +pnpm exec sv create +pnpm exec sv add +pnpm exec sv migrate +pnpm exec sv check +pnpm exec sv help ``` Run build with watch mode: ```sh -pnpm dev +pnpm run dev ``` ## Testing @@ -64,27 +64,27 @@ Because the add-on integration tests take a long time, CI only runs them when a Tests are split into projects: `cli`, `core`, `sv-utils`, `addons`, `create`, `migrate`. **Always run tests by project** for faster feedback: ```sh -pnpm test --project migrate # Migrate tests -pnpm test --project core # Core tests -pnpm test --project create # Project creation tests -pnpm test --project addons # Add-on tests -pnpm test --project sv-utils # sv-utils tests - -pnpm test --project addons eslint # Just eslint add-on tests -pnpm build && pnpm test --project cli # CLI tests +pnpm run test --project migrate # Migrate tests +pnpm run test --project core # Core tests +pnpm run test --project create # Project creation tests +pnpm run test --project addons # Add-on tests +pnpm run test --project sv-utils # sv-utils tests + +pnpm run test --project addons eslint # Just eslint add-on tests +pnpm run build && pnpm run test --project cli # CLI tests ``` For interactive debugging, append `:ui`: ```diff --pnpm test --project cli -+pnpm test:ui --project cli +-pnpm run test --project cli ++pnpm run test:ui --project cli ``` Run all tests (slow, typically for CI): ```sh -pnpm test +pnpm run test ``` ### Debugging @@ -92,17 +92,17 @@ pnpm test Example of how to debug an addon failing test. Once you run the test command, you will have a directory in `.test-output` with the test id. A good starting point is to `cd` into the failing tests dir and run the app directly. E.g.: ```sh -pnpm test --project addons better-auth # Run the failing test first +pnpm run test --project addons better-auth # Run the failing test first # Each test generates a standalone app in .test-output cd packages/sv/.test-output/addons/better-auth/default-kit-ts # Option 1: Run dev server for interactive debugging -pnpm dev +pnpm run dev # Open http://localhost:5173 and use browser DevTools to inspect # Option 2: Build and preview (matches production behavior) -pnpm build +pnpm run build pnpm preview ``` @@ -115,7 +115,7 @@ Some snapshots are testing the output of `sv` directly from the generated binary In one command: ```sh -pnpm build && pnpm test --project cli --update all +pnpm run build && pnpm run test --project cli --update all ``` ## Style Guide @@ -124,14 +124,14 @@ pnpm build && pnpm test --project cli --update all Ensure the following passes: -- `pnpm lint` -- `pnpm check` +- `pnpm run lint` +- `pnpm run check` -Use `pnpm format` to format the code. +Use `pnpm run format` to format the code. ## Updating dependencies -Run `pnpm update-deps` to recursively update the dependencies of all addons and create templates. +Run `pnpm run update-deps` to recursively update the dependencies of all addons and create templates. After that run `pnpm update -r --latest` to recursively update all dependencies of package.json files to their latest version. ## Deprecation @@ -164,7 +164,7 @@ Here is the command to generate a change set: ```sh # from root of project -pnpm changeset +pnpm exec changeset # select package # choose the level of change (patch, minor, major) From 001bf145bc5b484351c4186f55e31effb79f37b4 Mon Sep 17 00:00:00 2001 From: Scott Wu Date: Sat, 29 Aug 2026 00:44:45 +0800 Subject: [PATCH 8/8] Revert "full command" This reverts commit 7b9f5aca2c782211007a881e93a455605ff72d08. --- CONTRIBUTING.md | 58 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad6cbdde6..7b6e18ab4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ Checkout the code and install the dependencies with: ```sh git clone https://github.com/sveltejs/cli.git cd cli -pnpm install +pnpm i ``` ## Build and run @@ -33,7 +33,7 @@ To build the project and all packages. Run the 'build' script: ```sh # from root of project -pnpm run build +pnpm build ``` This outputs into /packages/PACKAGE/dist/. @@ -41,18 +41,18 @@ This outputs into /packages/PACKAGE/dist/. Run the 'cli' package: ```sh -pnpm exec sv -pnpm exec sv create -pnpm exec sv add -pnpm exec sv migrate -pnpm exec sv check -pnpm exec sv help +pnpm sv +pnpm sv create +pnpm sv add +pnpm sv migrate +pnpm sv check +pnpm sv help ``` Run build with watch mode: ```sh -pnpm run dev +pnpm dev ``` ## Testing @@ -64,27 +64,27 @@ Because the add-on integration tests take a long time, CI only runs them when a Tests are split into projects: `cli`, `core`, `sv-utils`, `addons`, `create`, `migrate`. **Always run tests by project** for faster feedback: ```sh -pnpm run test --project migrate # Migrate tests -pnpm run test --project core # Core tests -pnpm run test --project create # Project creation tests -pnpm run test --project addons # Add-on tests -pnpm run test --project sv-utils # sv-utils tests - -pnpm run test --project addons eslint # Just eslint add-on tests -pnpm run build && pnpm run test --project cli # CLI tests +pnpm test --project migrate # Migrate tests +pnpm test --project core # Core tests +pnpm test --project create # Project creation tests +pnpm test --project addons # Add-on tests +pnpm test --project sv-utils # sv-utils tests + +pnpm test --project addons eslint # Just eslint add-on tests +pnpm build && pnpm test --project cli # CLI tests ``` For interactive debugging, append `:ui`: ```diff --pnpm run test --project cli -+pnpm run test:ui --project cli +-pnpm test --project cli ++pnpm test:ui --project cli ``` Run all tests (slow, typically for CI): ```sh -pnpm run test +pnpm test ``` ### Debugging @@ -92,17 +92,17 @@ pnpm run test Example of how to debug an addon failing test. Once you run the test command, you will have a directory in `.test-output` with the test id. A good starting point is to `cd` into the failing tests dir and run the app directly. E.g.: ```sh -pnpm run test --project addons better-auth # Run the failing test first +pnpm test --project addons better-auth # Run the failing test first # Each test generates a standalone app in .test-output cd packages/sv/.test-output/addons/better-auth/default-kit-ts # Option 1: Run dev server for interactive debugging -pnpm run dev +pnpm dev # Open http://localhost:5173 and use browser DevTools to inspect # Option 2: Build and preview (matches production behavior) -pnpm run build +pnpm build pnpm preview ``` @@ -115,7 +115,7 @@ Some snapshots are testing the output of `sv` directly from the generated binary In one command: ```sh -pnpm run build && pnpm run test --project cli --update all +pnpm build && pnpm test --project cli --update all ``` ## Style Guide @@ -124,14 +124,14 @@ pnpm run build && pnpm run test --project cli --update all Ensure the following passes: -- `pnpm run lint` -- `pnpm run check` +- `pnpm lint` +- `pnpm check` -Use `pnpm run format` to format the code. +Use `pnpm format` to format the code. ## Updating dependencies -Run `pnpm run update-deps` to recursively update the dependencies of all addons and create templates. +Run `pnpm update-deps` to recursively update the dependencies of all addons and create templates. After that run `pnpm update -r --latest` to recursively update all dependencies of package.json files to their latest version. ## Deprecation @@ -164,7 +164,7 @@ Here is the command to generate a change set: ```sh # from root of project -pnpm exec changeset +pnpm changeset # select package # choose the level of change (patch, minor, major)