Skip to content
Merged
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
4,689 changes: 1,061 additions & 3,628 deletions e2e/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@aws-sdk/client-s3": "3.450.0",
"@aws-sdk/client-sts": "3.450.0",
"@salesforce/pwa-kit-dev": "3.17.0-dev",
"jest": "^26.6.3"
"jest": "^29.7.0"
},
"jest": {
"setupFilesAfterEnv": [
Expand Down
3 changes: 2 additions & 1 deletion e2e/tests/a11y/desktop/a11y-snapshot-test-guest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ test.describe('Accessibility Tests with Snapshots for guest user', () => {
await runAccessibilityTest(page, ['guest', 'cart-a11y-violations.json'])
})

test('Checkout should not have new accessibility issues', async ({page}) => {
// TODO: Remove skip and regenerate snapshots.
test.skip('Checkout should not have new accessibility issues', async ({page}) => {
await addProductToCart({page})

// cart
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/commerce-sdk-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## v5.1.0-dev
- Bump commerce-sdk-isomorphic to 5.1.0-unstable-20260226081656
- Add Node 24 support. Drop Node 16 support. [#3652](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3652)
- Add Shopper Consents API support [#3674](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3674)

## v5.0.0 (Feb 12, 2026)
- Upgrade to commerce-sdk-isomorphic v5.0.0 and introduce Payment Instrument SCAPI integration [#3552](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3552)
Expand All @@ -15,7 +16,7 @@
## v4.2.0 (Nov 04, 2025)

- Upgrade to commerce-sdk-isomorphic v4.0.1 [#3449](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3449)
- Prevent headers from being overriden in `generateCustomEndpointOptions` [#3405](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3405/)
- Prevent headers from being overridden in `generateCustomEndpointOptions` [#3405](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3405/)

## v4.1.0 (Sep 25, 2025)

Expand Down
3 changes: 2 additions & 1 deletion packages/commerce-sdk-react/src/constant.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Salesforce, Inc.
* Copyright (c) 2025, Salesforce, Inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
Expand Down Expand Up @@ -48,6 +48,7 @@ export const CLIENT_KEYS = {
SHOPPER_BASKETS: 'shopperBaskets',
SHOPPER_BASKETS_V2: 'shopperBasketsV2',
SHOPPER_CONFIGURATIONS: 'shopperConfigurations',
SHOPPER_CONSENTS: 'shopperConsents',
SHOPPER_CONTEXTS: 'shopperContexts',
SHOPPER_CUSTOMERS: 'shopperCustomers',
SHOPPER_EXPERIENCE: 'shopperExperience',
Expand Down
29 changes: 29 additions & 0 deletions packages/commerce-sdk-react/src/hooks/ShopperConsents/cache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2025, Salesforce, Inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import {ApiClients, CacheUpdateMatrix} from '../types'
import {getSubscriptions} from './queryKeyHelpers'
import {CLIENT_KEYS} from '../../constant'

const CLIENT_KEY = CLIENT_KEYS.SHOPPER_CONSENTS
type Client = NonNullable<ApiClients[typeof CLIENT_KEY]>

export const cacheUpdateMatrix: CacheUpdateMatrix<Client> = {
updateSubscription(customerId, {parameters}, response) {
// When a subscription is updated, we invalidate the getSubscriptions query
// to ensure the UI reflects the latest subscription state
return {
invalidate: [{queryKey: getSubscriptions.queryKey(parameters)}]
}
},
updateSubscriptions(customerId, {parameters}, response) {
// When multiple subscriptions are updated, we invalidate the getSubscriptions query
// to ensure the UI reflects the latest subscription states
return {
invalidate: [{queryKey: getSubscriptions.queryKey(parameters)}]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2025, Salesforce, Inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import {ShopperConsents} from 'commerce-sdk-isomorphic'
import {getUnimplementedEndpoints} from '../../test-utils'
import {cacheUpdateMatrix} from './cache'
import {ShopperConsentsMutations as mutations} from './mutation'
import * as queries from './query'

describe('Shopper Consents hooks', () => {
test('all endpoints have hooks', () => {
// unimplemented = SDK method exists, but no query hook or value in mutations enum
const unimplemented = getUnimplementedEndpoints(ShopperConsents, queries, mutations)
// If this test fails: create a new query hook, add the endpoint to the mutations enum,
// or add it to the `expected` array with a comment explaining "TODO" or "never" (and why).
expect(unimplemented).toEqual([])
})
test('all mutations have cache update logic', () => {
// unimplemented = value in mutations enum, but no method in cache update matrix
const unimplemented = new Set<string>(Object.values(mutations))
Object.entries(cacheUpdateMatrix).forEach(([method, implementation]) => {
if (implementation) unimplemented.delete(method)
})
// If this test fails: add cache update logic, remove the endpoint from the mutations enum,
// or add it to the `expected` array to indicate that it is still a TODO.
expect([...unimplemented]).toEqual([])
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2025, Salesforce, Inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
export * from './mutation'
export * from './query'
Loading
Loading