Skip to content

Commit 6e19eba

Browse files
Bump packages and use new naming - limit, expand
1 parent cd8136e commit 6e19eba

File tree

11 files changed

+29
-71
lines changed

11 files changed

+29
-71
lines changed

package-lock.json

Lines changed: 17 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"dependencies": {
1616
"@next/third-parties": "^16.1.6",
1717
"@sentry/nextjs": "^10.38.0",
18-
"@spree/next": "^0.6.4",
19-
"@spree/sdk": "^0.6.3",
18+
"@spree/next": "^0.6.6",
19+
"@spree/sdk": "^0.6.6",
2020
"@stripe/react-stripe-js": "^5.6.0",
2121
"@stripe/stripe-js": "^8.7.0",
2222
"next": "^16",

src/app/[country]/[locale]/(storefront)/account/orders/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function OrdersPage() {
5555

5656
useEffect(() => {
5757
async function loadOrders() {
58-
const response = await getOrders({ per_page: 50 });
58+
const response = await getOrders({ limit: 50 });
5959
// Filter to only show completed orders
6060
setOrders(response.data.filter((o) => o.state === "complete"));
6161
setLoading(false);

src/app/[country]/[locale]/(storefront)/products/[slug]/ProductDetailsWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function ProductDetailsWrapper({
2929
setLoading(true);
3030
try {
3131
const data = await getProduct(slug, {
32-
includes: "variants,images,option_types",
32+
expand: "variants,images,option_types",
3333
});
3434
if (!cancelled) {
3535
setProduct(data);

src/app/[country]/[locale]/(storefront)/t/[...permalink]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default async function CategoryPage({ params }: CategoryPageProps) {
2121

2222
let taxon;
2323
try {
24-
taxon = await getTaxon(fullPermalink, { includes: "ancestors,children" });
24+
taxon = await getTaxon(fullPermalink, { expand: "ancestors,children" });
2525
} catch (error) {
2626
console.error("Failed to fetch taxon:", error);
2727
notFound();

src/app/[country]/[locale]/(storefront)/taxonomies/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default async function CategoriesPage({ params }: CategoriesPageProps) {
2626
let taxonomies: StoreTaxonomy[] = [];
2727
try {
2828
const response = await getTaxonomies({
29-
per_page: 100,
30-
includes: "taxons",
29+
limit: 100,
30+
expand: "taxons",
3131
});
3232
taxonomies = response.data;
3333
} catch (error) {

src/components/search/SearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function SearchBar({ basePath }: SearchBarProps) {
3737
try {
3838
const response = await getProducts({
3939
multi_search: searchQuery,
40-
per_page: 6,
40+
limit: 6,
4141
});
4242
setSuggestions(response.data);
4343
if (response.data.length > 0) {

src/hooks/useCarouselProducts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function useCarouselProducts({
2828
setLoading(true);
2929
setError(null);
3030
try {
31-
const params = { per_page: limit };
31+
const params = { limit };
3232

3333
const response = taxonId
3434
? await getTaxonProducts(taxonId, params)

src/hooks/useProductListing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function useProductListing({
7272
async (page: number, filters: ActiveFilters, query: string) => {
7373
try {
7474
const queryParams = buildProductQueryParams(filters, query);
75-
return await fetchFn({ page, per_page: 12, ...queryParams });
75+
return await fetchFn({ page, limit: 12, ...queryParams });
7676
} catch (error) {
7777
console.error("Failed to fetch products:", error);
7878
return null;

src/lib/data/countries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ export async function getCountries() {
1010
}
1111

1212
export async function getCountry(iso: string) {
13-
return _getCountry(iso, { include: "states" });
13+
return _getCountry(iso, { expand: "states" });
1414
}

0 commit comments

Comments
 (0)