From 7e4bf114343e4878b9745e87f6abdf86d97e4c4b Mon Sep 17 00:00:00 2001 From: Viktor Marinho <56888067+viktormarinho@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:54:35 -0300 Subject: [PATCH 1/4] fix(vtex): wishlist loader (#918) --- shopify/loaders/proxy.ts | 6 +++--- vtex/actions/wishlist/addItem.ts | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/shopify/loaders/proxy.ts b/shopify/loaders/proxy.ts index c334e3a53..740962a0b 100644 --- a/shopify/loaders/proxy.ts +++ b/shopify/loaders/proxy.ts @@ -40,9 +40,9 @@ const buildProxyRoutes = ( ctx: AppContext; }, ) => { - const urlToUse = publicUrl ? - new URL(publicUrl.startsWith("http") ? publicUrl : `https://${publicUrl}`) : - new URL(`https://${storeName}.myshopify.com`); + const urlToUse = publicUrl + ? new URL(publicUrl.startsWith("http") ? publicUrl : `https://${publicUrl}`) + : new URL(`https://${storeName}.myshopify.com`); const hostname = urlToUse.hostname; diff --git a/vtex/actions/wishlist/addItem.ts b/vtex/actions/wishlist/addItem.ts index 66de71dfd..fdc2ce1d2 100644 --- a/vtex/actions/wishlist/addItem.ts +++ b/vtex/actions/wishlist/addItem.ts @@ -1,4 +1,3 @@ -import wishlistLoader from "../../loaders/wishlist.ts"; import { AppContext } from "../../mod.ts"; import type { WishlistItem } from "../../utils/types.ts"; import { parseCookie } from "../../utils/vtexId.ts"; @@ -32,7 +31,7 @@ const action = async ( `mutation AddToWishlist($listItem: ListItemInputType!, $shopperId: String!, $name: String!, $public: Boolean) { addToList(listItem: $listItem, shopperId: $shopperId, name: $name, public: $public) @context(provider: "vtex.wish-list@1.x") }`, }, { headers: { cookie } }); - return wishlistLoader({ count: Infinity }, req, ctx); + return ctx.invoke.vtex.loaders.wishlist({ allRecords: true }); }; export default action; From 2a29cd2f1a00bf68a12b0712f652e1f524d9f31b Mon Sep 17 00:00:00 2001 From: decobot Date: Fri, 11 Oct 2024 14:54:49 +0000 Subject: [PATCH 2/4] Update version to 0.62.4 --- deno.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deno.json b/deno.json index 2e19c9230..f054c597b 100644 --- a/deno.json +++ b/deno.json @@ -62,5 +62,5 @@ "jsx": "react-jsx", "jsxImportSource": "preact" }, - "version": "0.62.3" + "version": "0.62.4" } From b1178e8b14834c27c22e5eddda0d09df2e4fa2b3 Mon Sep 17 00:00:00 2001 From: Matheus Trindade <104238483+MatheusTrindade5201@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:21:15 -0300 Subject: [PATCH 3/4] chore: add new update cart prop (#924) --- vtex/actions/cart/updateItems.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vtex/actions/cart/updateItems.ts b/vtex/actions/cart/updateItems.ts index 6bcc59613..8ad1ce477 100644 --- a/vtex/actions/cart/updateItems.ts +++ b/vtex/actions/cart/updateItems.ts @@ -12,6 +12,7 @@ export interface Item { export interface Props { orderItems: Item[]; allowedOutdatedData?: Array<"paymentData">; + noSplitItem?: boolean; } /** @@ -26,6 +27,7 @@ const action = async ( const { orderItems, allowedOutdatedData = ["paymentData"], + noSplitItem, } = props; const { orderFormId } = parseCookie(req.headers); const cookie = req.headers.get("cookie") ?? ""; @@ -37,7 +39,7 @@ const action = async ( allowedOutdatedData, sc: segment?.payload.channel, }, { - body: { orderItems }, + body: { orderItems, noSplitItem: Boolean(noSplitItem) }, headers: { "content-type": "application/json", accept: "application/json", From deae9c01e2343d5136fbd5836268d5697a8d46e8 Mon Sep 17 00:00:00 2001 From: decobot Date: Mon, 14 Oct 2024 21:21:31 +0000 Subject: [PATCH 4/4] Update version to 0.62.5 --- deno.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deno.json b/deno.json index f054c597b..571c78b0a 100644 --- a/deno.json +++ b/deno.json @@ -62,5 +62,5 @@ "jsx": "react-jsx", "jsxImportSource": "preact" }, - "version": "0.62.4" + "version": "0.62.5" }