Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Added a CI check that new projects typecheck and lint (#14847)

Damian Legawiec4ca24b80ddff
diff --git a/.changeset/cli-starter-typecheck-lint.md b/.changeset/cli-starter-typecheck-lint.md
deleted file mode 100644
index 6d3093eb65..0000000000
--- a/.changeset/cli-starter-typecheck-lint.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@spree/cli": patch
----
-
-Dashboards and seller panels added with `spree add` now pass `typecheck` and `lint` out of the box: the seller panel no longer type-checks its Vite config without Node types, and the generated `biome.json` is formatted the way Biome expects.
diff --git a/.changeset/dashboard-single-tiptap.md b/.changeset/dashboard-single-tiptap.md
deleted file mode 100644
index f3b9ca5b65..0000000000
--- a/.changeset/dashboard-single-tiptap.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-"@spree/dashboard": patch
-"@spree/dashboard-ui": patch
----
-
-Projects that install the dashboard packages from npm now get a single copy of the rich text editor library. `@spree/dashboard` no longer declares its own, looser TipTap ranges next to the exact versions in `@spree/dashboard-ui`, so a newer TipTap release can no longer install beside the pinned one and break type checking.
diff --git a/.changeset/route-tree-real-paths.md b/.changeset/route-tree-real-paths.md
deleted file mode 100644
index 513fff5e33..0000000000
--- a/.changeset/route-tree-real-paths.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-"@spree/dashboard-core": patch
-"@spree/dashboard": patch
-"@spree/seller-dashboard": patch
----
-
-Fixed type checking in projects that install the dashboard or seller panel with pnpm. The generated route file imported the routes through the package's `node_modules` link, where TypeScript cannot find the dashboard's own dependencies, so `tsc` reported hundreds of "Cannot find module" errors. It now imports them from the installed location again. Under pnpm that location includes the package version, so an upgrade rewrites the import paths in `routeTree.gen.ts`.
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
index a34cd0a783..fa662121b4 100644
--- a/.github/workflows/packages.yml
+++ b/.github/workflows/packages.yml
@@ -12,6 +12,8 @@ on:
- "docs/integrations/**"
- "pnpm-lock.yaml"
- "turbo.json"
+ - "biome.json"
+ - "scripts/sync-starter.mjs"
- ".github/workflows/packages.yml"
pull_request:
paths:
@@ -23,6 +25,8 @@ on:
- "docs/integrations/**"
- "pnpm-lock.yaml"
- "turbo.json"
+ - "biome.json"
+ - "scripts/sync-starter.mjs"
- ".github/workflows/packages.yml"
concurrency:
@@ -74,6 +78,87 @@ jobs:
- run: pnpm turbo lint typecheck test build --cache-dir=.turbo
+ # Creates a new project with create-spree-app the way a user would, but from
+ # this commit's packages instead of the ones on npm, and checks that the
+ # generated Dashboard and Seller Panel build, typecheck and lint cleanly.
+ # The monorepo's own checks can't catch this: inside the workspace every
+ # @spree/* package is a symlink resolved under the root overrides, while a
+ # generated app installs packed tarballs on its own.
+ scaffolded-app:
+ name: "Scaffolded app - Typecheck & Lint"
+ runs-on: ubuntu-latest
+ steps:
+ # Runs the pull request's install and build scripts; nothing needs an
+ # authenticated git afterwards.
+ - uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+
+ - uses: pnpm/action-setup@v6
+
+ - uses: actions/setup-node@v7
+ with:
+ node-version: 22
+ cache: pnpm
+
+ # Same Turbo cache as the check job.
+ - name: Cache Turbo
+ uses: actions/cache@v6
+ with:
+ path: .turbo
+ key: turbo-${{ runner.os }}-${{ github.sha }}
+ restore-keys: |
+ turbo-${{ runner.os }}-
+
+ - run: pnpm install --frozen-lockfile
+
+ - run: pnpm turbo build --cache-dir=.turbo
+
+ # `pnpm pack` rewrites workspace: ranges to real versions, exactly as
+ # `pnpm publish` does in the release jobs below.
+ - name: Pack packages
+ run: |
+ for pkg in admin-sdk seller-sdk dashboard-ui dashboard-core dashboard seller-dashboard cli; do
+ pnpm --dir "packages/$pkg" pack --pack-destination "$RUNNER_TEMP/tarballs"
+ done
+
+ # Outside the checkout, so the project doesn't join this pnpm workspace.
+ # SPREE_CLI_VERSION points the project at the packed CLI, which carries
+ # the starter templates the apps are created from.
+ - name: Create project
+ run: |
+ CLI_TARBALL=$(ls "$RUNNER_TEMP"/tarballs/spree-cli-*.tgz)
+ SPREE_CLI_VERSION="file:$CLI_TARBALL" node packages/create-spree-app/dist/index.js "$RUNNER_TEMP/app" \
+ --no-start --no-storefront --seller-dashboard --use-pnpm
+
+ # The apps pin @spree/* to npm ranges. Overriding every package with its
+ # tarball also replaces the copies other @spree/* packages depend on.
+ - name: Point the apps at the packed packages
+ run: |
+ {
+ echo "overrides:"
+ for tarball in "$RUNNER_TEMP"/tarballs/*.tgz; do
+ NAME=$(tar -xOzf "$tarball" package/package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).name")
+ echo " '$NAME': 'file:$tarball'"
+ done
+ } > "$RUNNER_TEMP/overrides.yaml"
+ cat "$RUNNER_TEMP/overrides.yaml"
+
+ - name: Check Dashboard
+ working-directory: ${{ runner.temp }}/app/apps/dashboard
+ run: |
+ cat "$RUNNER_TEMP/overrides.yaml" >> pnpm-workspace.yaml
+ pnpm install --no-frozen-lockfile
+ pnpm build && pnpm typecheck && pnpm lint
+
+ - name: Check Seller Panel
+ if: ${{ !cancelled() }}
+ working-directory: ${{ runner.temp }}/app/apps/seller-dashboard
+ run: |
+ cat "$RUNNER_TEMP/overrides.yaml" >> pnpm-workspace.yaml
+ pnpm install --no-frozen-lockfile
+ pnpm build && pnpm typecheck && pnpm lint
+
sdk-integration:
name: "SDK Integration Tests"
runs-on: ubuntu-latest
@@ -309,7 +394,7 @@ jobs:
release-admin-sdk:
name: "Admin SDK - Release"
- needs: check
+ needs: [check, scaffolded-app]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
@@ -379,7 +464,7 @@ jobs:
# ranges floored at the @spree/dashboard{,-ui,-core} and @spree/seller-*
# versions being released — publishing it before those versions exist on
# npm would ship a scaffold whose install fails until they land.
- needs: [check, release-dashboard, release-seller]
+ needs: [check, scaffolded-app, release-dashboard, release-seller]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
@@ -466,7 +551,7 @@ jobs:
# same-push admin-sdk version bump must land on npm first, or installs of
# the just-published dashboard packages fail until it does. (release-cli
# waits on this job, completing the admin-sdk → dashboard → cli chain.)
- needs: [check, release-admin-sdk]
+ needs: [check, scaffolded-app, release-admin-sdk]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
@@ -528,7 +613,7 @@ jobs:
# starter with ranges floored at these versions.
release-seller:
name: "Seller packages - Release"
- needs: check
+ needs: [check, scaffolded-app]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
@@ -601,7 +686,7 @@ jobs:
# the dashboard must not publish before the CLI implementing that command
# (with the embedded starter) is on npm. Completes the release chain:
# admin-sdk → dashboard → cli → create-spree-app.
- needs: [check, release-cli]
+ needs: [check, scaffolded-app, release-cli]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
diff --git a/docs/developer/create-spree-app/quickstart.mdx b/docs/developer/create-spree-app/quickstart.mdx
index 9aa6ac13d1..01e0992b23 100644
--- a/docs/developer/create-spree-app/quickstart.mdx
+++ b/docs/developer/create-spree-app/quickstart.mdx
@@ -36,6 +36,7 @@ npx create-spree-app@latest my-store --no-seller-dashboard --no-storefront --no-
| Flag | Description |
|------|-------------|
| `--no-dashboard` | Skip the admin dashboard app — the API still serves the built-in one at `/dashboard` |
+| `--seller-dashboard` | Include the marketplace seller panel without asking |
| `--no-seller-dashboard` | Skip the marketplace seller panel |
| `--no-storefront` | Skip Next.js storefront setup |
| `--no-start` | Don't start Docker services after scaffolding |
diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md
index 967f05f4ee..a5847df0c8 100644
--- a/packages/cli/CHANGELOG.md
+++ b/packages/cli/CHANGELOG.md
@@ -1,5 +1,11 @@
# @spree/cli
+## 3.2.2
+
+### Patch Changes
+
+- [#14748](https://github.com/spree/spree/pull/14748) [`012fcdb`](https://github.com/spree/spree/commit/012fcdb5c258bd5268f880c296394e8ab3b52e08) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Dashboards and seller panels added with `spree add` now pass `typecheck` and `lint` out of the box: the seller panel no longer type-checks its Vite config without Node types, and the generated `biome.json` is formatted the way Biome expects.
+
## 3.2.1
### Patch Changes
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 8687282687..93385ec033 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@spree/cli",
- "version": "3.2.1",
+ "version": "3.2.2",
"description": "CLI for managing Spree Commerce projects",
"type": "module",
"bin": {
diff --git a/packages/cli/turbo.json b/packages/cli/turbo.json
new file mode 100644
index 0000000000..de65783e14
--- /dev/null
+++ b/packages/cli/turbo.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "https://turbo.build/schema.json",
+ "extends": ["//"],
+ "tasks": {
+ "build": {
+ "inputs": [
+ "$TURBO_DEFAULT$",
+ "$TURBO_ROOT$/docs/api-reference/admin.yaml",
+ "$TURBO_ROOT$/scripts/sync-starter.mjs",
+ "$TURBO_ROOT$/biome.json",
+ "$TURBO_ROOT$/packages/*/package.json",
+ "$TURBO_ROOT$/packages/dashboard-starter/**",
+ "$TURBO_ROOT$/packages/seller-dashboard-starter/**",
+ "!$TURBO_ROOT$/packages/*-starter/{node_modules,dist,.turbo,.tanstack}/**",
+ "!$TURBO_ROOT$/packages/*-starter/.env.local"
+ ]
+ }
+ }
+}
diff --git a/packages/create-spree-app/CHANGELOG.md b/packages/create-spree-app/CHANGELOG.md
index a2221544eb..b1440beb25 100644
--- a/packages/create-spree-app/CHANGELOG.md
+++ b/packages/create-spree-app/CHANGELOG.md
@@ -1,5 +1,11 @@
# create-spree-app
+## 2.3.0
+
+### Minor Changes
+
+- [#14847](https://github.com/spree/spree/pull/14847) [`7d9bc01`](https://github.com/spree/spree/commit/7d9bc01dd82ba12938453caf76aa04e1b0c2637f) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added the `--seller-dashboard` option, which includes the Seller Panel without asking. Together with `--no-start` and `--no-storefront` it lets scripts and CI create a project with no prompts.
+
## 2.2.0
### Minor Changes
diff --git a/packages/create-spree-app/README.md b/packages/create-spree-app/README.md
index ac9831eedb..ca8a4b3b08 100644
--- a/packages/create-spree-app/README.md
+++ b/packages/create-spree-app/README.md
@@ -11,6 +11,7 @@ npx create-spree-app my-store
| Flag | Description |
|------|-------------|
| `--no-dashboard` | Skip the Admin Dashboard app — the API still serves the built-in one at `/dashboard` (add your own copy later via `spree add dashboard`) |
+| `--seller-dashboard` | Include the marketplace seller panel without asking |
| `--no-seller-dashboard` | Skip the marketplace seller panel (also available later via `spree add seller-dashboard`) |
| `--no-storefront` | Skip Next.js storefront setup |
| `--no-start` | Don't start Docker services (the first `dev` run completes setup instead) |
diff --git a/packages/create-spree-app/package.json b/packages/create-spree-app/package.json
index 46103c3d61..7b744eb7f0 100644
--- a/packages/create-spree-app/package.json
+++ b/packages/create-spree-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-spree-app",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Create a new Spree Commerce project with a single command",
"type": "module",
"bin": "./dist/index.js",
diff --git a/packages/create-spree-app/src/index.ts b/packages/create-spree-app/src/index.ts
index 3cde725c57..8de72f4a15 100644
--- a/packages/create-spree-app/src/index.ts
+++ b/packages/create-spree-app/src/index.ts
@@ -13,6 +13,9 @@ const program = new Command()
.description('Create a new Spree Commerce project')
.argument('[directory]', 'project directory')
.option('--no-dashboard', 'skip the admin dashboard (the built-in one stays at /dashboard)')
+ // Defined before its negation so that passing neither leaves the value
+ // undefined and the prompt asks.
+ .option('--seller-dashboard', 'include the marketplace seller dashboard')
.option('--no-seller-dashboard', 'skip the marketplace seller dashboard')
.option('--no-storefront', 'skip Next.js storefront setup')
// Deprecated: the dashboard is included by default. Hidden, kept so
@@ -40,7 +43,8 @@ const program = new Command()
const options = await runPrompts({
directory,
noStorefront: flags.storefront === false ? true : undefined,
- noSellerDashboard: flags.sellerDashboard === false ? true : undefined,
+ noSellerDashboard:
+ flags.sellerDashboard === undefined ? undefined : flags.sellerDashboard === false,
noDashboard: flags.dashboard === false,
noStart: flags.start === false ? true : undefined,
packageManager,
diff --git a/packages/dashboard-core/CHANGELOG.md b/packages/dashboard-core/CHANGELOG.md
index f0b09bb7ba..875f6dd2a2 100644
--- a/packages/dashboard-core/CHANGELOG.md
+++ b/packages/dashboard-core/CHANGELOG.md
@@ -1,5 +1,11 @@
# @spree/dashboard-core
+## 1.0.0-rc.2
+
+### Patch Changes
+
+- [#14845](https://github.com/spree/spree/pull/14845) [`9a0a293`](https://github.com/spree/spree/commit/9a0a293e2e91dccce3024f74013ade4599bbff08) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Fixed type checking in projects that install the dashboard or seller panel with pnpm. The generated route file imported the routes through the package's `node_modules` link, where TypeScript cannot find the dashboard's own dependencies, so `tsc` reported hundreds of "Cannot find module" errors. It now imports them from the installed location again. Under pnpm that location includes the package version, so an upgrade rewrites the import paths in `routeTree.gen.ts`.
+
## 1.0.0-rc.1
### Minor Changes
diff --git a/packages/dashboard-core/package.json b/packages/dashboard-core/package.json
index bde6ee6908..bd78130d07 100644
--- a/packages/dashboard-core/package.json
+++ b/packages/dashboard-core/package.json
@@ -1,7 +1,7 @@
{
"name": "@spree/dashboard-core",
"license": "MIT",
- "version": "1.0.0-rc.1",
+ "version": "1.0.0-rc.2",
"description": "Spree Dashboard framework — registries (table, nav, slot, settings-nav), providers (auth, permission, store), admin SDK client, generic infra hooks, and the defineDashboardPlugin extension API. Developer Preview.",
"author": "Vendo Connect Inc.",
"homepage": "https://spreecommerce.org",
diff --git a/packages/dashboard-ui/CHANGELOG.md b/packages/dashboard-ui/CHANGELOG.md
index ecbc898b3e..c7f9a12162 100644
--- a/packages/dashboard-ui/CHANGELOG.md
+++ b/packages/dashboard-ui/CHANGELOG.md
@@ -1,5 +1,11 @@
# @spree/dashboard-ui
+## 1.0.0-rc.2
+
+### Patch Changes
+
+- [#14846](https://github.com/spree/spree/pull/14846) [`dca32db`](https://github.com/spree/spree/commit/dca32dbbca0b72705f89f8afb62721d3c6486728) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Projects that install the dashboard packages from npm now get a single copy of the rich text editor library. `@spree/dashboard` no longer declares its own, looser TipTap ranges next to the exact versions in `@spree/dashboard-ui`, so a newer TipTap release can no longer install beside the pinned one and break type checking.
+
## 1.0.0-rc.1
### Minor Changes
diff --git a/packages/dashboard-ui/package.json b/packages/dashboard-ui/package.json
index be6ac28a1a..20124c8ef0 100644
--- a/packages/dashboard-ui/package.json
+++ b/packages/dashboard-ui/package.json
@@ -1,7 +1,7 @@
{
"name": "@spree/dashboard-ui",
"license": "MIT",
- "version": "1.0.0-rc.1",
+ "version": "1.0.0-rc.2",
"description": "Spree Dashboard design system — shadcn primitives, headless composed components, and design tokens. Source-only package; consumers compile via their own Vite/Tailwind setup. Developer Preview.",
"author": "Vendo Connect Inc.",
"homepage": "https://spreecommerce.org",
diff --git a/packages/dashboard/CHANGELOG.md b/packages/dashboard/CHANGELOG.md
index 76dea5c7c9..00d68375b4 100644
--- a/packages/dashboard/CHANGELOG.md
+++ b/packages/dashboard/CHANGELOG.md
@@ -1,5 +1,17 @@
# @spree/dashboard
+## 1.0.0-rc.2
+
+### Patch Changes
+
+- [#14846](https://github.com/spree/spree/pull/14846) [`dca32db`](https://github.com/spree/spree/commit/dca32dbbca0b72705f89f8afb62721d3c6486728) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Projects that install the dashboard packages from npm now get a single copy of the rich text editor library. `@spree/dashboard` no longer declares its own, looser TipTap ranges next to the exact versions in `@spree/dashboard-ui`, so a newer TipTap release can no longer install beside the pinned one and break type checking.
+
+- [#14845](https://github.com/spree/spree/pull/14845) [`9a0a293`](https://github.com/spree/spree/commit/9a0a293e2e91dccce3024f74013ade4599bbff08) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Fixed type checking in projects that install the dashboard or seller panel with pnpm. The generated route file imported the routes through the package's `node_modules` link, where TypeScript cannot find the dashboard's own dependencies, so `tsc` reported hundreds of "Cannot find module" errors. It now imports them from the installed location again. Under pnpm that location includes the package version, so an upgrade rewrites the import paths in `routeTree.gen.ts`.
+
+- Updated dependencies [[`dca32db`](https://github.com/spree/spree/commit/dca32dbbca0b72705f89f8afb62721d3c6486728), [`9a0a293`](https://github.com/spree/spree/commit/9a0a293e2e91dccce3024f74013ade4599bbff08)]:
+
## 1.0.0-rc.1
### Minor Changes
diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json
index 53292564da..3d2a4aee12 100644
--- a/packages/dashboard/package.json
+++ b/packages/dashboard/package.json
@@ -1,7 +1,7 @@
{
"name": "@spree/dashboard",
"license": "MIT",
- "version": "1.0.0-rc.1",
+ "version": "1.0.0-rc.2",
"description": "Spree Dashboard app shell — the next-gen React admin for Spree Commerce. Routes, resource hooks, schemas, locales, and the <Dashboard /> component. Source-only package; hosts compile it via @spree/dashboard/vite. Developer Preview.",
"author": "Vendo Connect Inc.",
"homepage": "https://spreecommerce.org",
diff --git a/packages/seller-dashboard/CHANGELOG.md b/packages/seller-dashboard/CHANGELOG.md
index 78581b305d..1f16c21a61 100644
--- a/packages/seller-dashboard/CHANGELOG.md
+++ b/packages/seller-dashboard/CHANGELOG.md
@@ -1,5 +1,15 @@
# @spree/seller-dashboard
+## 1.0.0-rc.2
+
+### Patch Changes
+
+- [#14845](https://github.com/spree/spree/pull/14845) [`9a0a293`](https://github.com/spree/spree/commit/9a0a293e2e91dccce3024f74013ade4599bbff08) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Fixed type checking in projects that install the dashboard or seller panel with pnpm. The generated route file imported the routes through the package's `node_modules` link, where TypeScript cannot find the dashboard's own dependencies, so `tsc` reported hundreds of "Cannot find module" errors. It now imports them from the installed location again. Under pnpm that location includes the package version, so an upgrade rewrites the import paths in `routeTree.gen.ts`.
+
+- Updated dependencies [[`dca32db`](https://github.com/spree/spree/commit/dca32dbbca0b72705f89f8afb62721d3c6486728), [`9a0a293`](https://github.com/spree/spree/commit/9a0a293e2e91dccce3024f74013ade4599bbff08)]:
+
## 1.0.0-rc.1
### Minor Changes
diff --git a/packages/seller-dashboard/package.json b/packages/seller-dashboard/package.json
index ec5711ff9d..a6785a2eef 100644
--- a/packages/seller-dashboard/package.json
+++ b/packages/seller-dashboard/package.json
@@ -1,6 +1,6 @@
{
"name": "@spree/seller-dashboard",
- "version": "1.0.0-rc.1",
+ "version": "1.0.0-rc.2",
"license": "MIT",
"type": "module",
"description": "Spree marketplace seller panel — the seller-facing counterpart to the admin dashboard.",