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.

Chore/root changesets and floating dashboard template (#14339)

Damian Legawiecb71e61326289
diff --git a/.changeset/README.md b/.changeset/README.md
new file mode 100644
index 0000000000..1d34cfcc07
--- /dev/null
+++ b/.changeset/README.md
@@ -0,0 +1,39 @@
+# Changesets
+
+One workspace-wide Changesets instance — add changesets here (`pnpm changeset`
+from the repo root), never in per-package `.changeset/` directories.
+
+The dashboard packages (`@spree/dashboard`, `@spree/dashboard-core`,
+`@spree/dashboard-ui`) are a `fixed` group: they version and release together
+under one version number, so a scaffolded app always installs a trio that was
+released as a set. `@spree/admin-sdk` versions independently — it's a
+standalone API client, not part of the dashboard release train.
+
+## Release trains
+
+`@spree/sdk` is a stable 1.x package whose releases track Spree releases;
+everything else (dashboard trio, admin-sdk, cli, create-spree-app) is the
+Developer Preview train releasing continuously. The two run on different
+schedules, so:
+
+- **Preview release** (the frequent one): `pnpm version:preview` — versions
+ everything pending except `@spree/sdk`, whose changesets stay queued.
+- **SDK release** (with a Spree release): plain `pnpm exec changeset version`.
+ The preview queues drain continuously, so on SDK release day they're
+ usually empty; if something preview-side is pending and shouldn't ship,
+ hold it back with additional `--ignore` flags.
+
+Held-back changesets are preserved, not deleted — `--ignore` defers, it
+doesn't discard.
+
+## Peer ranges between workspace packages
+
+Never use `workspace:^` for a peerDependency on another workspace package
+(e.g. dashboard-core → dashboard-ui). Changesets majors a peer-dependent
+whenever its peer's new version escapes the declared range, and on 0.x a
+caret range escapes on every minor — inside the fixed group that cascades a
+routine minor release into 1.0.0. Use wide literal ranges instead
+(`>=0.10.0 <2`), paired with `onlyUpdatePeerDependentsWhenOutOfRange` in
+`config.json`.
+
+Docs: https://github.com/changesets/changesets
diff --git a/.changeset/cli-floating-template-ranges.md b/.changeset/cli-floating-template-ranges.md
new file mode 100644
index 0000000000..4abef16cc6
--- /dev/null
+++ b/.changeset/cli-floating-template-ranges.md
@@ -0,0 +1,5 @@
+---
+"@spree/cli": patch
+---
+
+The embedded dashboard-starter template now floats its `@spree/*` dependency ranges to the newest published release (floored at the versions the template was built against) instead of pinning the minor — scaffolded apps pick up new dashboard releases without waiting for a CLI release. The template also slims to `@spree/dashboard` + `@spree/admin-sdk`: `defineDashboardPlugin` is re-exported from `@spree/dashboard`, and `@spree/dashboard-core` / `@spree/dashboard-ui` are added by the app only when building custom pages.
diff --git a/packages/admin-sdk/.changeset/config.json b/.changeset/config.json
similarity index 50%
rename from packages/admin-sdk/.changeset/config.json
rename to .changeset/config.json
index 0fbbd8c795..5df1367655 100644
--- a/packages/admin-sdk/.changeset/config.json
+++ b/.changeset/config.json
@@ -2,10 +2,14 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "spree/spree" }],
"commit": false,
- "fixed": [],
+ "fixed": [["@spree/dashboard", "@spree/dashboard-core", "@spree/dashboard-ui"]],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
- "ignore": []
+ "ignore": [],
+ "privatePackages": { "version": false, "tag": false },
+ "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
+ "onlyUpdatePeerDependentsWhenOutOfRange": true
+ }
}
diff --git a/.changeset/dashboard-plugin-facade-reexport.md b/.changeset/dashboard-plugin-facade-reexport.md
new file mode 100644
index 0000000000..bbb91bf015
--- /dev/null
+++ b/.changeset/dashboard-plugin-facade-reexport.md
@@ -0,0 +1,5 @@
+---
+"@spree/dashboard": minor
+---
+
+Re-export the plugin facade (`defineDashboardPlugin` and its types) from `@spree/dashboard`, so host apps can register in-app customizations without declaring `@spree/dashboard-core` as a direct dependency. Distributed plugins keep importing from `@spree/dashboard-core/plugin`.
diff --git a/packages/sdk/.changeset/newsletter-unsubscribe.md b/.changeset/newsletter-unsubscribe.md
similarity index 100%
rename from packages/sdk/.changeset/newsletter-unsubscribe.md
rename to .changeset/newsletter-unsubscribe.md
diff --git a/packages/sdk/.changeset/nullable-money-fields.md b/.changeset/nullable-money-fields.md
similarity index 100%
rename from packages/sdk/.changeset/nullable-money-fields.md
rename to .changeset/nullable-money-fields.md
diff --git a/packages/sdk/.changeset/preorder-fields.md b/.changeset/preorder-fields.md
similarity index 100%
rename from packages/sdk/.changeset/preorder-fields.md
rename to .changeset/preorder-fields.md
diff --git a/packages/sdk/.changeset/spicy-channels-arrive.md b/.changeset/spicy-channels-arrive.md
similarity index 100%
rename from packages/sdk/.changeset/spicy-channels-arrive.md
rename to .changeset/spicy-channels-arrive.md
diff --git a/packages/sdk/.changeset/storefront-access-gating.md b/.changeset/storefront-access-gating.md
similarity index 100%
rename from packages/sdk/.changeset/storefront-access-gating.md
rename to .changeset/storefront-access-gating.md
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index d8b75549a1..932818ba83 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -364,18 +364,17 @@ bundle exec rake typelizer:generate
### Releasing packages
-Published packages use [Changesets](https://github.com/changesets/changesets) for version management. Each package owns its own `.changeset/` folder, so changesets must be created from inside the package directory:
+Published packages use [Changesets](https://github.com/changesets/changesets) for version management — one workspace-wide instance rooted at `.changeset/`:
```bash
-cd packages/sdk # or packages/admin-sdk, packages/cli, packages/create-spree-app
-pnpm changeset
+pnpm changeset # from the repo root; select the affected package(s)
```
-This creates a changeset file describing your changes. Commit it with your PR.
+This creates a changeset file describing your changes. Commit it with your PR. The dashboard packages (`@spree/dashboard`, `@spree/dashboard-core`, `@spree/dashboard-ui`) are a fixed group and always release together under one version — a changeset naming any of them bumps all three. See `.changeset/README.md` for the release trains.
-Releasing is a two-step flow: a maintainer consumes the pending changesets (`changeset version` — writes the CHANGELOG and bumps `package.json`) and merges that bump to `main`; the release jobs in `.github/workflows/packages.yml` then detect the unpublished version and publish with npm provenance via Trusted Publishing. `@spree/admin-sdk` publishes under the `next` dist-tag while on the 0.x Developer Preview line; the others ship as `latest` (prereleases go to `beta`).
+Releasing is a two-step flow: a maintainer consumes the pending changesets (`pnpm version:preview` for the Developer Preview train, `pnpm changeset version` to include `@spree/sdk` — writes the CHANGELOGs and bumps `package.json`) and merges that bump to `main`; the release jobs in `.github/workflows/packages.yml` then detect the unpublished versions and publish with npm provenance via Trusted Publishing. Dist-tags follow the version, matching the rule in the release jobs: `0.x` versions (the Developer Preview line) publish under `next`, prerelease versions under `beta`, and stable versions as `latest`.
-Private packages (`@spree/dashboard`, `@spree/dashboard-core`, `@spree/dashboard-ui`, `@spree/sdk-core`) don't need changesets.
+Private packages (`@spree/dashboard-starter`, `@spree/dashboard-plugin-example`, `@spree/sdk-core`) are never published and don't need changesets.
## Code Style
@@ -445,7 +444,7 @@ To help us review your PR quickly:
- **Describe your changes.** Explain what you changed and why. Include screenshots for UI changes.
- **Add tests.** All new features and bug fixes should include appropriate test coverage.
- **Update documentation.** If your change affects user-facing behavior, update the relevant docs.
-- **Include a changeset** if your change affects a published TypeScript package (`@spree/sdk`, `@spree/admin-sdk`, `@spree/cli`, or `create-spree-app`). Run `pnpm changeset` from inside that package's directory — each package owns its own `.changeset/` folder.
+- **Include a changeset** if your change affects a published TypeScript package (`@spree/sdk`, `@spree/admin-sdk`, `@spree/cli`, `create-spree-app`, or the dashboard packages). Run `pnpm changeset` from the repo root and select the affected package(s).
- **Ensure CI passes.** PRs with failing CI will not be reviewed.
## Reporting Bugs
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
index 56b0356590..f6dda3d238 100644
--- a/.github/workflows/packages.yml
+++ b/.github/workflows/packages.yml
@@ -292,9 +292,10 @@ jobs:
release-cli:
name: "CLI - Release"
# Gated on release-dashboard: the CLI tarball embeds the dashboard-starter
- # template with ^x.y.z pins for @spree/dashboard{,-ui,-core} — publishing
- # it before those versions exist on npm would ship a scaffold whose
- # install fails until the dashboard release lands.
+ # template with floating ranges floored at the @spree/dashboard{,-ui,-core}
+ # versions being released — publishing it before those versions exist on
+ # npm would ship a scaffold whose install fails until the dashboard
+ # release lands.
needs: [check, release-dashboard]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
@@ -435,8 +436,10 @@ jobs:
# The dashboard-starter template is NOT distributed via a template repo:
# `@spree/cli` and `create-spree-app` embed it at build time
# (scripts/sync-dashboard-starter.mjs renders packages/dashboard-starter
- # with published version pins into their templates/ dir), so the template
- # and the released package versions are in lockstep by construction.
+ # with floating ranges floored at the released versions into their
+ # templates/ dir), so scaffolds install the newest dashboard release even
+ # from an older CLI, and never anything older than the template was built
+ # against.
release-create-spree-app:
name: "create-spree-app - Release"
diff --git a/CLAUDE.md b/CLAUDE.md
index 65e818a7d4..c2c3b76df5 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -581,7 +581,7 @@ A **Lefthook pre-commit hook** (`lefthook.yml`) regenerates types and Zod schema
### Changesets & Versioning
-Published packages use **Changesets** for versioning. Place changeset files in the package's `.changeset/` directory.
+Published packages use **Changesets** for versioning — one workspace-wide instance. Place changeset files in the root `.changeset/` directory (`pnpm changeset`), never in per-package directories. The dashboard packages (`@spree/dashboard`, `@spree/dashboard-core`, `@spree/dashboard-ui`) are a `fixed` group and always release together under one version; `@spree/admin-sdk` versions independently. Two release trains: `pnpm version:preview` cuts the Developer Preview packages while holding back `@spree/sdk` (stable, tracks Spree releases); `pnpm changeset version` includes it. `--ignore` defers changesets, it never discards them.
---
diff --git a/package.json b/package.json
index a6ace21d58..4304e1cd50 100644
--- a/package.json
+++ b/package.json
@@ -21,11 +21,15 @@
"server:console": "cd server && spree console",
"server:logs": "cd server && spree logs",
"server:seed": "cd server && spree rails db:seed",
- "server:load_sample_data": "cd server && spree task load_sample_data"
+ "server:load_sample_data": "cd server && spree task load_sample_data",
+ "changeset": "changeset",
+ "version:preview": "changeset version --ignore @spree/sdk"
},
"devDependencies": {
"@biomejs/biome": "^2.4.14",
- "turbo": "^2.9.14"
+ "turbo": "^2.9.14",
+ "@changesets/cli": "^2.31.0",
+ "@changesets/changelog-github": "^0.7.0"
},
"packageManager": "[email protected]",
"engines": {
diff --git a/packages/admin-sdk/package.json b/packages/admin-sdk/package.json
index c556edb3d3..c2be21b629 100644
--- a/packages/admin-sdk/package.json
+++ b/packages/admin-sdk/package.json
@@ -45,10 +45,7 @@
"lint:fix": "biome check --fix src tests",
"format": "biome format --write src tests",
"clean": "rm -rf dist",
- "prepublishOnly": "npm run build",
- "changeset": "changeset",
- "version": "changeset version",
- "release": "npm run build && changeset publish"
+ "prepublishOnly": "npm run build"
},
"keywords": [
"spree",
@@ -71,8 +68,6 @@
"url": "https://github.com/spree/spree/issues"
},
"devDependencies": {
- "@changesets/changelog-github": "^0.7.0",
- "@changesets/cli": "^2.31.0",
"@spree/sdk-core": "workspace:*",
"@types/node": "^25.6.0",
"@vitest/coverage-v8": "^4.1.5",
diff --git a/packages/cli/.changeset/config.json b/packages/cli/.changeset/config.json
deleted file mode 100644
index 0fbbd8c795..0000000000
--- a/packages/cli/.changeset/config.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
- "changelog": ["@changesets/changelog-github", { "repo": "spree/spree" }],
- "commit": false,
- "fixed": [],
- "linked": [],
- "access": "public",
- "baseBranch": "main",
- "updateInternalDependencies": "patch",
- "ignore": []
-}
diff --git a/packages/create-spree-app/.changeset/config.json b/packages/create-spree-app/.changeset/config.json
deleted file mode 100644
index 0fbbd8c795..0000000000
--- a/packages/create-spree-app/.changeset/config.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
- "changelog": ["@changesets/changelog-github", { "repo": "spree/spree" }],
- "commit": false,
- "fixed": [],
- "linked": [],
- "access": "public",
- "baseBranch": "main",
- "updateInternalDependencies": "patch",
- "ignore": []
-}
diff --git a/packages/create-spree-app/package.json b/packages/create-spree-app/package.json
index 12d85921a9..1c46450c55 100644
--- a/packages/create-spree-app/package.json
+++ b/packages/create-spree-app/package.json
@@ -18,10 +18,7 @@
"lint:fix": "biome check --fix src tests",
"format": "biome format --write src tests",
"clean": "rm -rf dist",
- "prepublishOnly": "npm run build",
- "changeset": "changeset",
- "version": "changeset version",
- "release": "npm run build && changeset publish"
+ "prepublishOnly": "npm run build"
},
"keywords": [
"spree",
@@ -54,8 +51,6 @@
"picocolors": "^1.1.1"
},
"devDependencies": {
- "@changesets/changelog-github": "^0.7.0",
- "@changesets/cli": "^2.31.0",
"@types/node": "^25.6.0",
"tsup": "^8.5.1",
"typescript": "^6.0.3",
diff --git a/packages/dashboard-core/.changeset/config.json b/packages/dashboard-core/.changeset/config.json
deleted file mode 100644
index 0fbbd8c795..0000000000
--- a/packages/dashboard-core/.changeset/config.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
- "changelog": ["@changesets/changelog-github", { "repo": "spree/spree" }],
- "commit": false,
- "fixed": [],
- "linked": [],
- "access": "public",
- "baseBranch": "main",
- "updateInternalDependencies": "patch",
- "ignore": []
-}
diff --git a/packages/dashboard-core/package.json b/packages/dashboard-core/package.json
index b635888b79..3385bab50a 100644
--- a/packages/dashboard-core/package.json
+++ b/packages/dashboard-core/package.json
@@ -2,7 +2,7 @@
"name": "@spree/dashboard-core",
"license": "MIT",
"version": "0.10.2",
- "description": "Spree Dashboard framework \u2014 registries (table, nav, slot, settings-nav), providers (auth, permission, store), admin SDK client, generic infra hooks, and the defineDashboardPlugin extension API. Developer Preview.",
+ "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",
"repository": {
@@ -57,8 +57,8 @@
},
"peerDependencies": {
"@hookform/resolvers": "^5.2.2",
- "@spree/admin-sdk": "workspace:^",
- "@spree/dashboard-ui": "workspace:^",
+ "@spree/admin-sdk": ">=0.7.0 <2",
+ "@spree/dashboard-ui": ">=0.10.0 <2",
"@tanstack/react-hotkeys": "^0.10.0",
"@tanstack/react-query": "^5.100.9",
"@tanstack/react-router": "^1.169.2",
diff --git a/packages/dashboard-starter/package.json b/packages/dashboard-starter/package.json
index ae77edfd12..0915e7abe6 100644
--- a/packages/dashboard-starter/package.json
+++ b/packages/dashboard-starter/package.json
@@ -15,8 +15,6 @@
"dependencies": {
"@spree/admin-sdk": "workspace:^",
"@spree/dashboard": "workspace:^",
- "@spree/dashboard-core": "workspace:^",
- "@spree/dashboard-ui": "workspace:^",
"@tanstack/react-query": "^5.100.9",
"@tanstack/react-router": "^1.169.2",
"react": "^19.2.6",
diff --git a/packages/dashboard-starter/src/plugins.ts b/packages/dashboard-starter/src/plugins.ts
index 97f293ca7f..cf5508adaa 100644
--- a/packages/dashboard-starter/src/plugins.ts
+++ b/packages/dashboard-starter/src/plugins.ts
@@ -6,7 +6,7 @@
//
// Example:
//
-// import { defineDashboardPlugin } from '@spree/dashboard-core'
+// import { defineDashboardPlugin } from '@spree/dashboard'
// import { AnalyticsPage } from './pages/analytics'
//
// defineDashboardPlugin({
@@ -14,6 +14,10 @@
// routes: [{ key: 'analytics', path: '/analytics', component: AnalyticsPage }],
// })
//
+// Building custom pages? Add the framework and design-system packages first —
+// `pnpm add @spree/dashboard-core @spree/dashboard-ui` — then import hooks,
+// providers, and UI primitives from those.
+//
// Docs: https://spreecommerce.org/docs/developer/dashboard/customization/quickstart
export {}
diff --git a/packages/dashboard-ui/.changeset/config.json b/packages/dashboard-ui/.changeset/config.json
deleted file mode 100644
index 0fbbd8c795..0000000000
--- a/packages/dashboard-ui/.changeset/config.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
- "changelog": ["@changesets/changelog-github", { "repo": "spree/spree" }],
- "commit": false,
- "fixed": [],
- "linked": [],
- "access": "public",
- "baseBranch": "main",
- "updateInternalDependencies": "patch",
- "ignore": []
-}
diff --git a/packages/dashboard/.changeset/config.json b/packages/dashboard/.changeset/config.json
deleted file mode 100644
index 0fbbd8c795..0000000000
--- a/packages/dashboard/.changeset/config.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
- "changelog": ["@changesets/changelog-github", { "repo": "spree/spree" }],
- "commit": false,
- "fixed": [],
- "linked": [],
- "access": "public",
- "baseBranch": "main",
- "updateInternalDependencies": "patch",
- "ignore": []
-}
diff --git a/packages/dashboard/src/index.ts b/packages/dashboard/src/index.ts
index 1fd1cf25af..3127d48ce3 100644
--- a/packages/dashboard/src/index.ts
+++ b/packages/dashboard/src/index.ts
@@ -4,5 +4,11 @@
// generated route tree (see `@spree/dashboard/vite` for the generation):
//
// import { createDashboardRouter, Dashboard } from '@spree/dashboard'
+
+// Plugin facade re-export — lets a host register in-app customizations
+// (nav entries, routes, slot widgets) without declaring @spree/dashboard-core
+// as a direct dependency. Distributed plugins keep importing from
+// `@spree/dashboard-core/plugin`.
+export * from '@spree/dashboard-core/plugin'
export { createDashboardRouter } from './create-router'
export { Dashboard } from './dashboard'
diff --git a/packages/sdk/.changeset/config.json b/packages/sdk/.changeset/config.json
deleted file mode 100644
index 0fbbd8c795..0000000000
--- a/packages/sdk/.changeset/config.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
- "changelog": ["@changesets/changelog-github", { "repo": "spree/spree" }],
- "commit": false,
- "fixed": [],
- "linked": [],
- "access": "public",
- "baseBranch": "main",
- "updateInternalDependencies": "patch",
- "ignore": []
-}
diff --git a/packages/sdk/package.json b/packages/sdk/package.json
index 392998f603..d68c3c42f4 100644
--- a/packages/sdk/package.json
+++ b/packages/sdk/package.json
@@ -68,10 +68,7 @@
"lint:fix": "biome check --fix src tests",
"format": "biome format --write src tests",
"clean": "rm -rf dist",
- "prepublishOnly": "npm run build",
- "changeset": "changeset",
- "version": "changeset version",
- "release": "npm run build && changeset publish"
+ "prepublishOnly": "npm run build"
},
"keywords": [
"spree",
@@ -94,8 +91,6 @@
"url": "https://github.com/spree/spree/issues"
},
"devDependencies": {
- "@changesets/changelog-github": "^0.7.0",
- "@changesets/cli": "^2.31.0",
"@spree/sdk-core": "workspace:*",
"@types/node": "^25.6.0",
"@vitest/coverage-v8": "^4.1.5",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 974261ef74..bb50034feb 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -28,18 +28,18 @@ importers:
'@biomejs/biome':
specifier: ^2.4.14
version: 2.4.14
- turbo:
- specifier: ^2.9.14
- version: 2.9.18
-
- packages/admin-sdk:
- devDependencies:
'@changesets/changelog-github':
specifier: ^0.7.0
version: 0.7.0
'@changesets/cli':
specifier: ^2.31.0
version: 2.31.0(@types/[email protected])
+ turbo:
+ specifier: ^2.9.14
+ version: 2.9.18
+
+ packages/admin-sdk:
+ devDependencies:
'@spree/sdk-core':
specifier: workspace:*
version: link:../sdk-core
@@ -129,12 +129,6 @@ importers:
specifier: ^1.1.1
version: 1.1.1
devDependencies:
- '@changesets/changelog-github':
- specifier: ^0.7.0
- version: 0.7.0
- '@changesets/cli':
- specifier: ^2.31.0
- version: 2.31.0(@types/[email protected])
'@types/node':
specifier: ^25.6.0
version: 25.6.0
@@ -459,12 +453,6 @@ importers:
'@spree/dashboard':
specifier: workspace:^
version: link:../dashboard
- '@spree/dashboard-core':
- specifier: workspace:^
- version: link:../dashboard-core
- '@spree/dashboard-ui':
- specifier: workspace:^
- version: link:../dashboard-ui
'@tanstack/react-query':
specifier: ^5.100.9
version: 5.100.9([email protected])
@@ -620,12 +608,6 @@ importers:
packages/sdk:
devDependencies:
- '@changesets/changelog-github':
- specifier: ^0.7.0
- version: 0.7.0
- '@changesets/cli':
- specifier: ^2.31.0
- version: 2.31.0(@types/[email protected])
'@spree/sdk-core':
specifier: workspace:*
version: link:../sdk-core
diff --git a/scripts/sync-dashboard-starter.mjs b/scripts/sync-dashboard-starter.mjs
index 6863e51746..9ce4ad7ded 100644
--- a/scripts/sync-dashboard-starter.mjs
+++ b/scripts/sync-dashboard-starter.mjs
@@ -3,7 +3,9 @@
// doubles as the plugin pipeline's CI consumer test) into a standalone
// template, rewriting the bits that only make sense inside the monorepo:
//
-// - `workspace:^` dependency ranges → `^<version>` of the published packages
+// - `workspace:^` dependency ranges → floating ranges on the published
+// packages (newest release through 1.x, floored at the version being
+// released)
// - monorepo-only devDependencies dropped (the example plugin isn't on npm)
// - biome.json extends the workspace root config → replaced with a
// self-contained equivalent
@@ -13,10 +15,10 @@
//
// Runs at build time in @spree/cli and create-spree-app, targeting their
// `templates/dashboard-starter/` (gitignored; shipped inside the tarball via
-// the dist copy). `prepublishOnly` rebuilds on publish, so the version pins
-// are always stamped from the versions being released — Vendure-style
-// lockstep, no template repo to keep in sync. (A public template repo can
-// reuse this script as a second target later.)
+// the dist copy). `prepublishOnly` rebuilds on publish, so the floor is
+// always stamped from the versions being released — no template repo to keep
+// in sync. (A public template repo can reuse this script as a second target
+// later.)
//
// Usage: node scripts/sync-dashboard-starter.mjs <target-dir>
import fs from 'node:fs'
@@ -69,7 +71,14 @@ function publishedRange(name) {
if (manifest.private) {
throw new Error(`${name} is private — it can't be a dependency of the synced template`)
}
- return `^${manifest.version}`
+ // On 0.x, `^` never crosses a minor, so scaffolds stay frozen on whatever
+ // minor the CLI happened to be published against — a dashboard release
+ // without a CLI release in the same train would never reach users. Float
+ // instead, floored at the version this template was built against, through
+ // all of 0.x AND into 1.x so preview-era apps migrate to stable on their
+ // own. After 1.0, `^` floats within the major on its own.
+ const { version } = manifest
+ return version.startsWith('0.') ? `>=${version} <2.0.0` : `^${version}`
}
const pkgPath = path.join(targetDir, 'package.json')