Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 0 additions & 23 deletions .changeset/ltrac-2085-cart-shipping-form-refresh.md

This file was deleted.

22 changes: 0 additions & 22 deletions .changeset/ltrac-2154-kv-read-cache-ttl.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ltrac-2164-retry-transient-graphql-errors.md

This file was deleted.

48 changes: 48 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# Changelog

## 1.12.3

### Patch Changes

- [#3254](https://github.com/bigcommerce/catalyst/pull/3254) [`75aa709`](https://github.com/bigcommerce/catalyst/commit/75aa7099f9da397aac96eae1e24f0cdda6d7ffad) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Fix the cart shipping estimator not updating until a page reload. After "View shipping options", "Add shipping", or a quantity change, the shipping form now reflects the new address, quote, and selected option immediately.

## Migration

In `core/vibes/soul/sections/cart/client.tsx`, key the `ShippingForm` on the server's shipping state so it remounts when that state changes:

```tsx
{
shipping && (
<ShippingForm
key={JSON.stringify([
shipping.address,
shipping.shippingOptions,
shipping.shippingOption?.value,
shipping.showShippingForm,
])}
{...shipping}
/>
);
}
```

- [#3261](https://github.com/bigcommerce/catalyst/pull/3261) [`24dacae`](https://github.com/bigcommerce/catalyst/commit/24dacaebb7fcdb8956dafcf0aaecb0c10071e5fe) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Speed up routing cache reads on BigCommerce Native Hosting. The Cloudflare KV adapter now caches reads at each Cloudflare location for 5 minutes instead of Workers KV's 60-second default, so most `with-routes` lookups that miss the in-process cache take a few milliseconds instead of a trip to central KV storage. The trade-off is staleness: in the worst case, a storefront status change (maintenance mode, launch) can take up to about 11 minutes to reach a location instead of about 7. It's usually sooner, since the background refresh's write is normally visible at once in the location that made it. Route changes have the same 4 extra minutes on top of their 30-minute window.

## Migration

In `core/lib/kv/adapters/cloudflare-kv.ts`, pass a `cacheTtl` when reading from the namespace:

```ts
const ROUTES_READ_CACHE_TTL_SECONDS = 60 * 5;

// RoutesKvNamespace
get(key: string, options: { type: 'json'; cacheTtl?: number }): Promise<unknown>;

// CloudflareKvAdapter.mget
const value = await this.namespace.get(key, {
type: 'json',
cacheTtl: ROUTES_READ_CACHE_TTL_SECONDS,
});
```

- Updated dependencies [[`4db7221`](https://github.com/bigcommerce/catalyst/commit/4db7221e2d2e9bbc4c2541306f7b50daabbef4b9)]:
- @bigcommerce/catalyst-client@1.0.4

## 1.12.2

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@bigcommerce/catalyst-core",
"description": "BigCommerce Catalyst is a Next.js starter kit for building headless BigCommerce storefronts.",
"version": "1.12.2",
"version": "1.12.3",
"catalyst": {
"version": "1.12.2",
"ref": "@bigcommerce/catalyst-core@1.12.2"
"version": "1.12.3",
"ref": "@bigcommerce/catalyst-core@1.12.3"
},
"private": true,
"engines": {
Expand Down
6 changes: 6 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.0.4

### Patch Changes

- [#3263](https://github.com/bigcommerce/catalyst/pull/3263) [`4db7221`](https://github.com/bigcommerce/catalyst/commit/4db7221e2d2e9bbc4c2541306f7b50daabbef4b9) Thanks [@jorgemoya](https://github.com/jorgemoya)! - Retry Storefront GraphQL queries that fail on a dropped connection or a `502`, `503`, or `504`. Previously a single upstream hiccup threw straight to the error page ("There was a server error!"). Queries are now retried up to twice, after 100ms and 300ms, including when the connection drops while the response body is being read (`TypeError: terminated`). Mutations are never retried, since they aren't idempotent, and 4xx responses, GraphQL errors, and aborted requests fail immediately as before. Each retry logs a `console.warn` naming the operation, the attempt, and the failure (for example `[BigCommerce] Retrying query GetSite after HTTP 502 (attempt 2 of 3)`), so recovered failures still show up in server logs.

## 1.0.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bigcommerce/catalyst-client",
"description": "BigCommerce API client for Catalyst.",
"version": "1.0.3",
"version": "1.0.4",
"repository": {
"type": "git",
"url": "https://github.com/bigcommerce/catalyst",
Expand Down
Loading