Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b4215f0
TRAC-640: fix(core) - Scope consent cookie to host instead of root do…
jorgemoya Jun 2, 2026
8bc379d
fix(core): rewrite WYSIWYG /content image URLs to absolute CDN URLs (…
jorgemoya Jun 2, 2026
15e365a
feat(core): TRAC-421 consume merchant-configured locale subfolders fr…
mfaris9 Jun 4, 2026
097eea7
feat: enables client-side navigation in Makeswift builder (#2913)
agurtovoy Jun 9, 2026
874e332
fix(product): BACK-400 Fix BO data on PDP for complex products (#3031)
Tharaae Jun 11, 2026
4d511dc
fix(core): strip trailing slash when looking up localized Makeswift p…
agurtovoy Jun 11, 2026
3cec674
feat(core): TRAC-188 out-of-the-box inclusive and exclusive tax price…
mfaris9 Jun 11, 2026
5034ea3
feat(core): TRAC-813 Gate analytics cookies behind shopper consent (#…
chanceaclark Jun 12, 2026
1ab2c82
fix(core): TRAC-814 Make session token cookies expire with the sessio…
chanceaclark Jun 16, 2026
226f2f3
Update translations (#3048)
bc-svc-local Jun 17, 2026
854aab5
LTRAC-467: chore(create-catalyst) - Deprecate the `integration` comma…
jorgemoya Jun 22, 2026
2c99731
LTRAC-466: feat(core) - Track Catalyst version in a dedicated package…
jorgemoya Jun 22, 2026
94c503e
Update translations (#3058)
bc-svc-local Jun 22, 2026
98d5b87
TRAC-887: fix - reset password no longer working (#3059)
parthshahp Jun 23, 2026
81b88df
Version Packages (`canary`) (#3037)
github-actions[bot] Jun 26, 2026
842a323
Merge remote-tracking branch 'origin/canary' into sync-integrations-m…
jorgemoya Jun 26, 2026
6d1eafa
fix(makeswift): resolve sync typecheck failures
jorgemoya Jun 26, 2026
fce3519
Version Packages (`integrations/makeswift`)
github-actions[bot] Jun 26, 2026
b2a9855
Merge tag '@bigcommerce/catalyst-makeswift@1.8.0' into sync-integrati…
chanceaclark Jul 29, 2026
71cff26
fix: revert silent package.json/CHANGELOG.md clobber from 1.8.0 merge
chanceaclark Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sync-makeswift-1-8-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-b2b-makeswift": minor
---

Pulls in changes from the `@bigcommerce/catalyst-makeswift@1.8.0` release. For more information, see the [changelog entry](https://github.com/bigcommerce/catalyst/blob/829c3c5cd2e6b46b39d11252a2b2e42edda23468/core/CHANGELOG.md#180).
63 changes: 63 additions & 0 deletions .github/scripts/__tests__/sync-catalyst-version.test.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import assert from 'node:assert/strict';
import { describe, it } from 'node:test';

import { buildCatalystField, syncCatalystField } from '../sync-catalyst-version.mts';

describe('buildCatalystField', () => {
it('derives version and ref from name + version', () => {
assert.deepEqual(
buildCatalystField({ name: '@bigcommerce/catalyst-core', version: '1.7.0' }),
{ version: '1.7.0', ref: '@bigcommerce/catalyst-core@1.7.0' },
);
});
});

describe('syncCatalystField', () => {
it('adds the catalyst field mirroring version when absent', () => {
const input = `${JSON.stringify(
{ name: '@bigcommerce/catalyst-core', version: '1.8.0' },
null,
2,
)}\n`;

const output = JSON.parse(syncCatalystField(input));

assert.deepEqual(output.catalyst, {
version: '1.8.0',
ref: '@bigcommerce/catalyst-core@1.8.0',
});
});

it('updates a stale catalyst field to the current version', () => {
const input = `${JSON.stringify(
{
name: '@bigcommerce/catalyst-core',
version: '2.0.0',
catalyst: { version: '1.9.0', ref: '@bigcommerce/catalyst-core@1.9.0' },
},
null,
2,
)}\n`;

const output = JSON.parse(syncCatalystField(input));

assert.deepEqual(output.catalyst, {
version: '2.0.0',
ref: '@bigcommerce/catalyst-core@2.0.0',
});
});

it('is idempotent and preserves the trailing newline', () => {
const input = `${JSON.stringify(
{
name: '@bigcommerce/catalyst-core',
version: '1.7.0',
catalyst: { version: '1.7.0', ref: '@bigcommerce/catalyst-core@1.7.0' },
},
null,
2,
)}\n`;

assert.equal(syncCatalystField(input), input);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const BrandPageQuery = graphql(`
reviews {
enabled
}
tax {
plp
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions core/app/[locale]/(default)/(faceted)/brand/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export default async function Brand(props: Props) {
const productComparisonsEnabled =
settings?.storefront.catalog?.productComparisonsEnabled ?? false;

const taxDisplay = settings?.tax?.plp;

const streamableFacetedSearch = Streamable.from(async () => {
const searchParams = await props.searchParams;
const currencyCode = await getPreferredCurrencyCode();
Expand Down Expand Up @@ -151,6 +153,7 @@ export default async function Brand(props: Props) {
format,
showOutOfStockMessage ? defaultOutOfStockMessage : undefined,
showBackorderMessage,
taxDisplay,
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { useEffect, useRef } from 'react';

import { FragmentOf } from '~/client/graphql';
import { ProductCardFragment } from '~/components/product-card/fragment';
import { TaxDisplay } from '~/data-transformers/prices-transformer';
import { useAnalytics } from '~/lib/analytics/react';
import { pickPricesForTaxDisplay } from '~/lib/tax-pricing';

import { getCategoryPageData } from '../page-data';

Expand All @@ -15,9 +17,10 @@ type productSearchItem = FragmentOf<typeof ProductCardFragment>;
interface Props {
category: NonNullable<Category>;
products: productSearchItem[];
taxDisplay?: TaxDisplay | null;
}

export const CategoryViewed = ({ category, products }: Props) => {
export const CategoryViewed = ({ category, products, taxDisplay }: Props) => {
const isMounted = useRef(false);
const analytics = useAnalytics();

Expand All @@ -28,21 +31,27 @@ export const CategoryViewed = ({ category, products }: Props) => {

isMounted.current = true;

const firstProductPrices = products[0]
? pickPricesForTaxDisplay(products[0], taxDisplay)
: undefined;

analytics?.navigation.categoryViewed({
id: category.entityId,
name: category.name,
currency: products[0]?.prices?.price.currencyCode || 'USD',
currency: firstProductPrices?.price.currencyCode || 'USD',
items: products.map((p) => {
const prices = pickPricesForTaxDisplay(p, taxDisplay);

return {
id: p.entityId.toString(),
name: p.name,
brand: p.brand?.name,
price: p.prices?.price.value,
price: prices?.price.value,
categories: removeEdgesAndNodes(category.breadcrumbs).map(({ name }) => name),
};
}),
});
}, [analytics, category, products]);
}, [analytics, category, products, taxDisplay]);

return null;
};
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const CategoryPageQuery = graphql(
reviews {
enabled
}
tax {
plp
}
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion core/app/[locale]/(default)/(faceted)/category/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ export default async function Category(props: Props) {
const productComparisonsEnabled =
settings?.storefront.catalog?.productComparisonsEnabled ?? false;

const taxDisplay = settings?.tax?.plp;

const streamableFacetedSearch = Streamable.from(async () => {
const searchParams = await props.searchParams;
const currencyCode = await getPreferredCurrencyCode();
Expand Down Expand Up @@ -168,6 +170,7 @@ export default async function Category(props: Props) {
format,
showOutOfStockMessage ? defaultOutOfStockMessage : undefined,
showBackorderMessage,
taxDisplay,
);
});

Expand Down Expand Up @@ -298,7 +301,13 @@ export default async function Category(props: Props) {
snapshotId={`category-${categoryId}-bottom-content`}
/>
<Stream value={streamableFacetedSearch}>
{(search) => <CategoryViewed category={category} products={search.products.items} />}
{(search) => (
<CategoryViewed
category={category}
products={search.products.items}
taxDisplay={taxDisplay}
/>
)}
</Stream>
</>
);
Expand Down
3 changes: 3 additions & 0 deletions core/app/[locale]/(default)/(faceted)/search/page-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const SearchPageQuery = graphql(`
reviews {
enabled
}
tax {
plp
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions core/app/[locale]/(default)/(faceted)/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export default async function Search(props: Props) {
const productComparisonsEnabled =
settings?.storefront.catalog?.productComparisonsEnabled ?? false;

const taxDisplay = settings?.tax?.plp;

const streamableFacetedSearch = Streamable.from(async () => {
const searchParams = await props.searchParams;
const customerAccessToken = await getSessionCustomerAccessToken();
Expand Down Expand Up @@ -130,6 +132,7 @@ export default async function Search(props: Props) {
format,
showOutOfStockMessage ? defaultOutOfStockMessage : undefined,
showBackorderMessage,
taxDisplay,
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ const WishlistDetailsQuery = graphql(
}
}
}
site {
settings {
tax {
plp
}
}
}
}
`,
[WishlistPaginatedItemsFragment],
Expand Down Expand Up @@ -55,5 +62,5 @@ export const getCustomerWishlist = cache(async (entityId: number, pagination: Pa
return null;
}

return wishlist;
return { wishlist, taxDisplay: response.data.site.settings?.tax?.plp };
});
23 changes: 13 additions & 10 deletions core/app/[locale]/(default)/account/wishlists/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ExistingResultType } from '~/client/util';
import { defaultPageInfo, pageInfoTransformer } from '~/data-transformers/page-info-transformer';
import { wishlistDetailsTransformer } from '~/data-transformers/wishlists-transformer';
import { redirect } from '~/i18n/routing';
import { pickPricesForTaxDisplay } from '~/lib/tax-pricing';
import { isMobileUser } from '~/lib/user-agent';

import { removeWishlistItem } from '../_actions/remove-wishlist-item';
Expand Down Expand Up @@ -43,35 +44,37 @@ async function getWishlist(
const entityId = Number(id);
const searchParamsParsed = searchParamsCache.parse(await searchParamsPromise);
const formatter = await getFormatter();
const wishlist = await getCustomerWishlist(entityId, searchParamsParsed);
const result = await getCustomerWishlist(entityId, searchParamsParsed);

if (!wishlist) {
if (!result) {
return redirect({ href: '/account/wishlists/', locale });
}

return wishlistDetailsTransformer(wishlist, t, pt, formatter);
return wishlistDetailsTransformer(result.wishlist, t, pt, formatter, result.taxDisplay);
}

const getAnalyticsData = async (id: string, searchParamsPromise: Promise<SearchParams>) => {
const entityId = Number(id);
const searchParamsParsed = searchParamsCache.parse(await searchParamsPromise);
const wishlist = await getCustomerWishlist(entityId, searchParamsParsed);
const result = await getCustomerWishlist(entityId, searchParamsParsed);

if (!wishlist) {
if (!result) {
return [];
}

return removeEdgesAndNodes(wishlist.items)
return removeEdgesAndNodes(result.wishlist.items)
.map(({ product }) => product)
.filter((product) => product !== null)
.map((product) => {
const prices = pickPricesForTaxDisplay(product, result.taxDisplay);

return {
id: product.entityId,
name: product.name,
sku: product.sku,
brand: product.brand?.name ?? '',
price: product.prices?.price.value ?? 0,
currency: product.prices?.price.currencyCode ?? '',
price: prices?.price.value ?? 0,
currency: prices?.price.currencyCode ?? '',
};
});
};
Expand All @@ -82,9 +85,9 @@ async function getPaginationInfo(
): Promise<CursorPaginationInfo> {
const entityId = Number(id);
const searchParamsParsed = searchParamsCache.parse(await searchParamsPromise);
const wishlist = await getCustomerWishlist(entityId, searchParamsParsed);
const result = await getCustomerWishlist(entityId, searchParamsParsed);

return pageInfoTransformer(wishlist?.items.pageInfo ?? defaultPageInfo);
return pageInfoTransformer(result?.wishlist.items.pageInfo ?? defaultPageInfo);
}

export default async function WishlistPage({ params, searchParams }: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ const WishlistsPageQuery = graphql(
...WishlistsFragment
}
}
site {
settings {
tax {
plp
}
}
}
}
`,
[WishlistsFragment],
Expand Down Expand Up @@ -50,5 +57,5 @@ export const getCustomerWishlists = cache(async ({ limit = 9, before, after }: P
return null;
}

return wishlists;
return { wishlists, taxDisplay: response.data.site.settings?.tax?.plp };
});
10 changes: 5 additions & 5 deletions core/app/[locale]/(default)/account/wishlists/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ async function listWishlists(
): Promise<Wishlist[]> {
const searchParamsParsed = searchParamsCache.parse(await searchParamsPromise);
const formatter = await getFormatter();
const wishlists = await getCustomerWishlists(searchParamsParsed);
const result = await getCustomerWishlists(searchParamsParsed);

if (!wishlists) {
if (!result) {
return [];
}

return wishlistsTransformer(wishlists, t, formatter);
return wishlistsTransformer(result.wishlists, t, formatter, result.taxDisplay);
}

async function getPaginationInfo(
searchParamsPromise: Promise<SearchParams>,
): Promise<CursorPaginationInfo> {
const searchParamsParsed = searchParamsCache.parse(await searchParamsPromise);
const wishlists = await getCustomerWishlists(searchParamsParsed);
const result = await getCustomerWishlists(searchParamsParsed);

return pageInfoTransformer(wishlists?.pageInfo ?? defaultPageInfo);
return pageInfoTransformer(result?.wishlists.pageInfo ?? defaultPageInfo);
}

export default async function Wishlists({ params, searchParams }: Props) {
Expand Down
3 changes: 2 additions & 1 deletion core/app/[locale]/(default)/blog/[blogId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { cache } from 'react';

import { BlogPostContent, BlogPostContentBlogPost } from '@/vibes/soul/sections/blog-post-content';
import { Breadcrumb } from '@/vibes/soul/sections/breadcrumbs';
import { rewriteWysiwygContentUrls } from '~/data-transformers/html-content-transformer';
import { getMakeswiftPageMetadata } from '~/lib/makeswift';
import { getMetadataAlternates } from '~/lib/seo/canonical';

Expand Down Expand Up @@ -63,7 +64,7 @@ async function getBlogPost(props: Props): Promise<BlogPostContentBlogPost> {
return {
author: blogPost.author ?? undefined,
title: blogPost.name,
content: blogPost.htmlBody,
content: rewriteWysiwygContentUrls(blogPost.htmlBody),
date: format.dateTime(new Date(blogPost.publishedDate.utc)),
image: blogPost.thumbnailImage
? { alt: blogPost.thumbnailImage.altText, src: blogPost.thumbnailImage.url }
Expand Down
Loading
Loading