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.

Bump both SDK and next to 0.19.0

Damian Legawiece8f1a9718e35
diff --git a/packages/next/CHANGELOG.md b/packages/next/CHANGELOG.md
index 85b502bdcb..588bca4e58 100644
--- a/packages/next/CHANGELOG.md
+++ b/packages/next/CHANGELOG.md
@@ -1,5 +1,24 @@
# @spree/next
+## 0.19.0
+
+### Minor Changes
+
+- **Breaking:** Remove all server actions (`actions/*`) and data functions (`data/*`) from the package. The package now exports only the server-side plumbing: `getClient()`, `withAuthRefresh()`, cookie helpers, `getLocaleOptions()`, `createSpreeMiddleware()`, and `createWebhookHandler()`.
+
+ Storefronts should call `@spree/sdk` directly in their own server actions, using the auth and cookie helpers from `@spree/next`. This eliminates a double-wrapping abstraction layer and gives storefronts full control over caching, error handling, and cache invalidation.
+
+ New public exports:
+
+ - `withAuthRefresh`, `getAuthOptions` — JWT lifecycle with proactive refresh
+ - `getCartToken`, `getCartId`, `setCartCookies`, `clearCartCookies` — cart cookie management
+ - `getAccessToken`, `setAccessToken`, `clearAccessToken` — JWT cookie management
+ - `getRefreshToken`, `setRefreshToken`, `clearRefreshToken` — refresh token cookie management
+ - `getCartOptions`, `requireCartId` — combined cart + auth options for SDK calls
+ - `getLocaleOptions` — reads country/locale from cookies
+
+ Removed exports: `listProducts`, `getProduct`, `getProductFilters`, `listCategories`, `getCategory`, `listCategoryProducts`, `listCountries`, `getCountry`, `listCurrencies`, `listLocales`, `listMarkets`, `getMarket`, `resolveMarket`, `listMarketCountries`, `getMarketCountry`, `listPolicies`, `getPolicy`, `getCart`, `getOrCreateCart`, `addItem`, `updateItem`, `removeItem`, `clearCart`, `associateCart`, `updateCart`, `selectDeliveryRate`, `applyDiscountCode`, `removeDiscountCode`, `applyGiftCard`, `removeGiftCard`, `complete`, `login`, `register`, `logout`, `getCustomer`, `updateCustomer`, `requestPasswordReset`, `resetPassword`, `listAddresses`, `getAddress`, `createAddress`, `updateAddress`, `deleteAddress`, `listOrders`, `getOrder`, `setLocale`, `listCreditCards`, `deleteCreditCard`, `listGiftCards`, `getGiftCard`, `listStoreCredits`, `createPayment`, `createPaymentSession`, `getPaymentSession`, `updatePaymentSession`, `completePaymentSession`, `createPaymentSetupSession`, `getPaymentSetupSession`, `completePaymentSetupSession`, and all re-exported SDK types.
+
## 0.18.0
### Breaking Changes
@@ -21,6 +40,7 @@ Requires `@spree/sdk >= 0.16.0`.
### Breaking Changes
- **Renamed `applyCoupon` / `removeCoupon`** to `applyDiscountCode` / `removeDiscountCode`
+
### New Features
- **`applyGiftCard(code)`** — apply gift card to cart
@@ -91,13 +111,6 @@ Requires `@spree/sdk` >= 0.15.0.
- Allow `getCart()` to accept an optional `explicitCartId` parameter. When provided, fetches that specific cart directly by ID instead of reading from cookies. Needed for the confirm-payment flow where the cart ID is known from the URL but cookies may have been cleared.
-## 1.0.0
-
-### Patch Changes
-
-- Updated dependencies []:
-
## 0.12.0
### Minor Changes
diff --git a/packages/next/package.json b/packages/next/package.json
index f9d0609f00..7683241d0e 100644
--- a/packages/next/package.json
+++ b/packages/next/package.json
@@ -1,6 +1,6 @@
{
"name": "@spree/next",
- "version": "0.18.0",
+ "version": "0.19.0",
"description": "Next.js integration for Spree Commerce — cookie-based auth, middleware, and webhook helpers",
"type": "module",
"main": "./dist/index.js",
@@ -69,7 +69,7 @@
"url": "https://github.com/spree/spree/issues"
},
"peerDependencies": {
- "@spree/sdk": ">=0.18.0",
+ "@spree/sdk": ">=0.19.0",
"next": ">=16.0.0",
"react": ">=19.0.0"
},
diff --git a/packages/sdk/.changeset/category-filter-scopes.md b/packages/sdk/.changeset/category-filter-scopes.md
deleted file mode 100644
index c1eb393319..0000000000
--- a/packages/sdk/.changeset/category-filter-scopes.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@spree/sdk": minor
----
-
-Replace `categories_id_eq` filter and `categories.products.list()` with `in_category` / `in_categories` scopes on the `/products` endpoint. Category filters now include descendant categories.
diff --git a/packages/sdk/.changeset/metafields-to-custom-fields.md b/packages/sdk/.changeset/metafields-to-custom-fields.md
deleted file mode 100644
index 0b433aee2d..0000000000
--- a/packages/sdk/.changeset/metafields-to-custom-fields.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@spree/sdk": patch
----
-
-Rename metafields to custom_fields in Store API. The expand parameter changes from `metafields` to `custom_fields`, and the response key changes accordingly. Prefix IDs change from `mf_` to `cf_`. The `StoreMetafield` type is replaced by `StoreCustomField`.
diff --git a/packages/sdk/.changeset/remove-timestamps-store-api.md b/packages/sdk/.changeset/remove-timestamps-store-api.md
deleted file mode 100644
index a56117e134..0000000000
--- a/packages/sdk/.changeset/remove-timestamps-store-api.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@spree/sdk": patch
----
-
-Remove `created_at` and `updated_at` from Store API responses. These internal timestamps are now only available in Admin API responses. Business timestamps like `completed_at` and `expires_at` are unchanged.
diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md
index 396493dfaa..da93a9c2ec 100644
--- a/packages/sdk/CHANGELOG.md
+++ b/packages/sdk/CHANGELOG.md
@@ -1,5 +1,17 @@
# @spree/sdk
+## 0.19.0
+
+### Minor Changes
+
+- Replace `categories_id_eq` filter and `categories.products.list()` with `in_category` / `in_categories` scopes on the `/products` endpoint. Category filters now include descendant categories.
+
+### Patch Changes
+
+- Rename metafields to custom*fields in Store API. The expand parameter changes from `metafields` to `custom_fields`, and the response key changes accordingly. Prefix IDs change from `mf*`to`cf\_`. The `StoreMetafield`type is replaced by`StoreCustomField`.
+
+- Remove `created_at` and `updated_at` from Store API responses. These internal timestamps are now only available in Admin API responses. Business timestamps like `completed_at` and `expires_at` are unchanged.
+
## 0.18.0
### Breaking Changes
diff --git a/packages/sdk/package.json b/packages/sdk/package.json
index 605d20e6c9..ad7fd24b81 100644
--- a/packages/sdk/package.json
+++ b/packages/sdk/package.json
@@ -1,6 +1,6 @@
{
"name": "@spree/sdk",
- "version": "0.18.0",
+ "version": "0.19.0",
"description": "Official TypeScript SDK for Spree Commerce Store API",
"type": "module",
"main": "./dist/index.cjs",