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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
fix: Add includes to getCheckout and add require export to @spree/next
Damian Legawiec09aba3cdee53
diff --git a/packages/next/package-lock.json b/packages/next/package-lock.jsonindex a487552148..e8e03d373b 100644--- a/packages/next/package-lock.json+++ b/packages/next/package-lock.json@@ -38,17 +38,22 @@"tsup": "^8.0.0","tsx": "^4.0.0","typescript": "^5.3.0",- "vitest": "^4.0.18"+ "vitest": "^4.0.18",+ "zod": "^4.3.6"},"engines": {"node": ">=18.0.0"},"peerDependencies": {- "typescript": ">=4.7.0"+ "typescript": ">=4.7.0",+ "zod": ">=3.0.0"},"peerDependenciesMeta": {"typescript": {"optional": true+ },+ "zod": {+ "optional": true}}},diff --git a/packages/next/package.json b/packages/next/package.jsonindex 1609596a1d..7b27861f40 100644--- a/packages/next/package.json+++ b/packages/next/package.json@@ -10,7 +10,12 @@"import": {"types": "./dist/index.d.ts","default": "./dist/index.js"- }+ },+ "require": {+ "types": "./dist/index.d.ts",+ "default": "./dist/index.js"+ },+ "default": "./dist/index.js"}},"files": [diff --git a/packages/next/src/actions/checkout.ts b/packages/next/src/actions/checkout.tsindex 4dc2bb005a..e65824c804 100644--- a/packages/next/src/actions/checkout.ts+++ b/packages/next/src/actions/checkout.ts@@ -13,12 +13,17 @@ async function getCheckoutOptions() {/*** Get the current checkout order state.+ * Includes line_items, shipments, and addresses by default.*/export async function getCheckout(orderId: string): Promise<StoreOrder> {const options = await getCheckoutOptions();- return getClient().orders.get(orderId, undefined, options);+ return getClient().orders.get(+ orderId,+ { includes: 'line_items,shipments,ship_address,bill_address' },+ options+ );}/**