@spree/docs 0.1.295 → 0.1.296

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,14 +76,6 @@ spree restart
76
76
 
77
77
  Not appropriate for Gemfile changes (use `spree bundle install`, then Ctrl+C and re-run `spree dev`), Dockerfile / `.ruby-version` changes (use `spree build`), or compose file changes (Ctrl+C and re-run `spree dev`).
78
78
 
79
- ### `spree update`
80
-
81
- Pull the latest Spree Docker image and recreate containers. Migrations run automatically on startup.
82
-
83
- ```bash
84
- spree update
85
- ```
86
-
87
79
  ### `spree build`
88
80
 
89
81
  Rebuild the dev image after Dockerfile or `.ruby-version` changes. Only relevant after `spree eject`.
@@ -100,17 +92,27 @@ spree build --yes # Skip confirmation prompts (for CI)
100
92
 
101
93
  ### `spree upgrade`
102
94
 
103
- Walk a Spree version upgrade end-to-end inside the dev stack. Runs `bundle update`, applies pending migrations, then walks the version-specific data backfills from the upgrade manifest.
95
+ Upgrade your project to the latest Spree release in one go. It works for both kinds of project:
96
+
97
+ 1. **Update the server**
98
+ - On a project that runs the prebuilt image, it pulls the latest Spree image and recreates the containers. Database migrations run as the containers start.
99
+ - On an [ejected](#spree-eject) project, it updates the Spree gems with `bundle update`, applies pending migrations, and restarts the app so it loads the new gems.
100
+ 2. **Run data backfills** — the version-specific steps from the upgrade manifest that convert existing records.
101
+ 3. **Update the `@spree/*` packages** — `@spree/cli` in the project root, and the dashboard packages and Admin SDK in `apps/dashboard` and `apps/seller-dashboard`. Each package moves to the newest release its declared range in `package.json` allows, the same way `bundle update` respects your `Gemfile`. To move to a new major version, change the range in `package.json` first.
104
102
 
105
103
  ```bash
106
- spree upgrade # Detect target, run the full sequence interactively
107
- spree upgrade --plan # Print the plan without executing (DRY_RUN=1)
108
- spree upgrade --to 5.5 # Cap the walk at a specific target version
109
- spree upgrade --step <id> # Re-run a single step idempotently (skips bundle + migrate)
110
- spree upgrade --yes # Skip the per-step prompts
104
+ spree upgrade # Run every step, asking before each one
105
+ spree upgrade --plan # List the data backfills without running anything
106
+ spree upgrade --to 6.1 # Set the target version for the data backfills
107
+ spree upgrade --step <id> # Re-run a single data backfill (runs nothing else)
108
+ spree upgrade --yes # Skip the prompts
111
109
  ```
112
110
 
113
- Production upgrades only need the third stage — `bundle install` and `db:migrate` happen in your deploy pipeline. The CLI runs all three for local development. See [Upgrades](../upgrades.md) for the manual production path.
111
+ Your storefront is your own code, so `spree upgrade` does not change it — it tells you which `@spree/sdk` version to move to.
112
+
113
+ Production upgrades only need the data backfills — installing gems and migrating happen in your deploy pipeline. See [Upgrades](../upgrades.md) for the manual production path.
114
+
115
+ > **NOTE:** `spree update` is the old name for this command. It still works, prints a deprecation warning, and will be removed in a future release.
114
116
 
115
117
  ### `spree eject`
116
118
 
@@ -204,7 +206,7 @@ spree encryption init # Add ACTIVE_RECORD_ENCRYPTION_* keys to the pr
204
206
  spree encryption init --print # Print a fresh set without writing anything (e.g. for your hosting provider)
205
207
  ```
206
208
 
207
- It never overwrites keys `.env` already sets, and there is no `--force`: changing the keys makes data encrypted with them unreadable. Afterwards, recreate the containers so they load the new `.env` (`spree update`, or `spree dev` for an ejected project — `spree restart` keeps the old environment), and back the keys up in your secret manager.
209
+ It never overwrites keys `.env` already sets, and there is no `--force`: changing the keys makes data encrypted with them unreadable. Afterwards, recreate the containers so they load the new `.env` (`spree dev` — `spree restart` keeps the old environment), and back the keys up in your secret manager.
208
210
 
209
211
  ### `spree api`
210
212
 
@@ -111,7 +111,7 @@ The project includes [@spree/cli](../cli/quickstart.md) for managing your Spree
111
111
  |---------|-------------|
112
112
  | `spree dev` | Run the app in the foreground — streams logs, Ctrl+C stops it. First run completes setup automatically; co-runs the Admin Dashboard dev server when `apps/dashboard` exists |
113
113
  | `spree stop` | Stop backend services |
114
- | `spree update` | Pull latest Spree image and restart (runs migrations automatically) |
114
+ | `spree upgrade` | Upgrade Spree — the server, database and `@spree/*` packages |
115
115
  | `spree eject` | Switch from prebuilt image to building from `server/` |
116
116
  | `spree add dashboard` | Add the Admin Dashboard to an existing project, to customize it |
117
117
  | `spree add seller-dashboard` | Add the marketplace seller panel to an existing project |
@@ -148,10 +148,10 @@ Open [http://localhost:3001](http://localhost:3001) to see your store.
148
148
  To update to the latest Spree version:
149
149
 
150
150
  ```bash
151
- spree update
151
+ spree upgrade
152
152
  ```
153
153
 
154
- This pulls the latest Docker image and recreates the containers. The entrypoint automatically runs database migrations.
154
+ This updates the server (the Docker image, or the Spree gems on an ejected project), runs database migrations and data backfills, and updates the `@spree/*` packages of the project and its dashboard apps. See [`spree upgrade`](../cli/quickstart.md#spree-upgrade) for details.
155
155
 
156
156
  To pin a specific version, edit `SPREE_VERSION_TAG` in `.env`:
157
157
 
@@ -226,7 +226,7 @@ bin/rails db:encryption:init # prints a set; put it in env vars or encrypted
226
226
  ```
227
227
 
228
228
 
229
- Recreate the containers so they pick up the new `.env` (`spree update`, or `spree dev` for an ejected project — `spree restart` keeps the old environment). Set the keys on your production host **before** deploying, and store them in your secret manager.
229
+ Recreate the containers so they pick up the new `.env` (`spree dev` — `spree restart` keeps the old environment). Set the keys on your production host **before** deploying, and store them in your secret manager.
230
230
 
231
231
  > **WARNING:** Never change or lose the keys once data is encrypted — the encrypted records become unreadable.
232
232
 
@@ -9,6 +9,38 @@ The upgrade process is fairly easy and well described. Of course, it all boils d
9
9
 
10
10
  We strongly advise upgrading Spree incrementally, rather than in one big go.
11
11
 
12
+ ## How to upgrade
13
+
14
+ An upgrade updates the server, migrates the database, runs the version's data backfills, and updates the `@spree/*` packages of your dashboard apps. Always read the guide for the version you're moving to first — it lists the behavior changes to review.
15
+
16
+ **Spree CLI:**
17
+
18
+ ```bash
19
+ spree upgrade
20
+ ```
21
+
22
+ One command for every project: it pulls the new image, or updates the Spree gems on an [ejected](../cli/quickstart.md#spree-eject) project, then runs migrations, data backfills and the package updates. See [`spree upgrade`](../cli/quickstart.md#spree-upgrade) for its options.
23
+
24
+ **Without CLI:**
25
+
26
+ Run from the project root:
27
+
28
+ ```bash
29
+ cd server
30
+ bundle update $(bundle list --name-only | grep ^spree)
31
+ bin/rails spree:install:migrations db:migrate
32
+ bin/rails spree:upgrade
33
+ cd ..
34
+
35
+ # The project root and each dashboard app have their own package.json
36
+ pnpm update "@spree/*"
37
+ (cd apps/dashboard && pnpm update "@spree/*")
38
+ (cd apps/seller-dashboard && pnpm update "@spree/*")
39
+ ```
40
+
41
+ On npm or Yarn, run `npm update` or `yarn upgrade` instead, naming each `@spree/*` package from that `package.json` (they do not accept the `"@spree/*"` pattern).
42
+
43
+
12
44
  ## Support
13
45
 
14
46
  If you're stuck and would want to get some professional help, you can [contact us directly](https://spreecommerce.org/contact/) and request a quote for our consulting services.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.295",
3
+ "version": "0.1.296",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",