Skip to content

Commit 9a7fc21

Browse files
authored
W-21354832 increase bundle size, fix the package.json lock file surgically and other changes (#3704)
* W-21354832 increase bundle size, fix the package.json lock file surgically for now, add change log * W-21354832 increase bundle size for vendor,js * W-21354832 address additional linting errors in handle bars, change log * W-21354832 add another change log * fix failing unit tests afte isomorphic bump * Fix mocks for failing unit tests * Revert default.js to original state and add only the sfpayments section
1 parent fc0297e commit 9a7fc21

File tree

23 files changed

+103
-55
lines changed

23 files changed

+103
-55
lines changed

packages/commerce-sdk-react/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## v5.1.0-dev
2+
- Bump commerce-sdk-isomorphic to 5.1.0-unstable-20260226081656
23
- Add Node 24 support. Drop Node 16 support. [#3652](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3652)
34

45
## v5.0.0 (Feb 12, 2026)

packages/commerce-sdk-react/package-lock.json

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

packages/commerce-sdk-react/src/hooks/ShopperBaskets/cache.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import {
8-
ShopperBasketsTypes,
9-
ShopperCustomers,
10-
ShopperCustomersTypes
11-
} from 'commerce-sdk-isomorphic'
7+
import {ShopperBasketsTypes, ShopperCustomers, ShopperCustomersTypes} from 'commerce-sdk-isomorphic'
128
import {
139
ApiClients,
1410
Argument,

packages/commerce-sdk-react/src/hooks/ShopperBasketsV2/cache.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
7-
import {ShopperBasketsV2Types, ShopperCustomers, ShopperCustomersTypes} from 'commerce-sdk-isomorphic'
7+
import {
8+
ShopperBasketsV2Types,
9+
ShopperCustomers,
10+
ShopperCustomersTypes
11+
} from 'commerce-sdk-isomorphic'
812
import {
913
ApiClients,
1014
Argument,

packages/commerce-sdk-react/src/hooks/ShopperBasketsV2/query.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ export const useBasket = (
4040
// Parameters can be set in `apiOptions` or `client.clientConfig`;
4141
// we must merge them in order to generate the correct query key.
4242
const netOptions = omitNullableParameters(mergeOptions(client, apiOptions))
43-
const parameters = pickValidParams(netOptions.parameters, ShopperBasketsV2.paramKeys[methodName])
43+
const parameters = pickValidParams(
44+
netOptions.parameters,
45+
ShopperBasketsV2.paramKeys[methodName]
46+
)
4447
const queryKey = queryKeyHelpers[methodName].queryKey(netOptions.parameters)
4548
// We don't use `netOptions` here because we manipulate the options in `useQuery`.
4649
const method = async (options: Options) => await client[methodName](options)
@@ -82,7 +85,10 @@ export const usePaymentMethodsForBasket = (
8285
// Parameters can be set in `apiOptions` or `client.clientConfig`;
8386
// we must merge them in order to generate the correct query key.
8487
const netOptions = omitNullableParameters(mergeOptions(client, apiOptions))
85-
const parameters = pickValidParams(netOptions.parameters, ShopperBasketsV2.paramKeys[methodName])
88+
const parameters = pickValidParams(
89+
netOptions.parameters,
90+
ShopperBasketsV2.paramKeys[methodName]
91+
)
8692
const queryKey = queryKeyHelpers[methodName].queryKey(netOptions.parameters)
8793
// We don't use `netOptions` here because we manipulate the options in `useQuery`.
8894
const method = async (options: Options) => await client[methodName](options)
@@ -124,7 +130,10 @@ export const usePriceBooksForBasket = (
124130
// Parameters can be set in `apiOptions` or `client.clientConfig`;
125131
// we must merge them in order to generate the correct query key.
126132
const netOptions = omitNullableParameters(mergeOptions(client, apiOptions))
127-
const parameters = pickValidParams(netOptions.parameters, ShopperBasketsV2.paramKeys[methodName])
133+
const parameters = pickValidParams(
134+
netOptions.parameters,
135+
ShopperBasketsV2.paramKeys[methodName]
136+
)
128137
const queryKey = queryKeyHelpers[methodName].queryKey(netOptions.parameters)
129138
// We don't use `netOptions` here because we manipulate the options in `useQuery`.
130139
const method = async (options: Options) => await client[methodName](options)
@@ -166,7 +175,10 @@ export const useShippingMethodsForShipment = (
166175
// Parameters can be set in `apiOptions` or `client.clientConfig`;
167176
// we must merge them in order to generate the correct query key.
168177
const netOptions = omitNullableParameters(mergeOptions(client, apiOptions))
169-
const parameters = pickValidParams(netOptions.parameters, ShopperBasketsV2.paramKeys[methodName])
178+
const parameters = pickValidParams(
179+
netOptions.parameters,
180+
ShopperBasketsV2.paramKeys[methodName]
181+
)
170182
const queryKey = queryKeyHelpers[methodName].queryKey(netOptions.parameters)
171183
// We don't use `netOptions` here because we manipulate the options in `useQuery`.
172184
const method = async (options: Options) => await client[methodName](options)
@@ -208,7 +220,10 @@ export const useTaxesFromBasket = (
208220
// Parameters can be set in `apiOptions` or `client.clientConfig`;
209221
// we must merge them in order to generate the correct query key.
210222
const netOptions = omitNullableParameters(mergeOptions(client, apiOptions))
211-
const parameters = pickValidParams(netOptions.parameters, ShopperBasketsV2.paramKeys[methodName])
223+
const parameters = pickValidParams(
224+
netOptions.parameters,
225+
ShopperBasketsV2.paramKeys[methodName]
226+
)
212227
const queryKey = queryKeyHelpers[methodName].queryKey(netOptions.parameters)
213228
// We don't use `netOptions` here because we manipulate the options in `useQuery`.
214229
const method = async (options: Options) => await client[methodName](options)

packages/commerce-sdk-react/src/hooks/ShopperCustomers/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ describe('Shopper Customers hooks', () => {
1717
// If this test fails: create a new query hook, add the endpoint to the mutations enum,
1818
// or add it to the `expected` array with a comment explaining "TODO" or "never" (and why).
1919
expect(unimplemented).toEqual([
20+
'deleteCustomerPaymentMethodReference', // TODO: Implement when the endpoint exits closed beta
2021
'getExternalProfile', // TODO: Implement when the endpoint exits closed beta
2122
'getPublicProductListItems', // TODO: Implement when the endpoint exits closed beta
22-
'registerExternalProfile', // TODO: Implement when the endpoint exits closed beta
23+
'registerExternalProfile' // TODO: Implement when the endpoint exits closed beta
2324
])
2425
})
2526
test('all mutations have cache update logic', () => {

packages/commerce-sdk-react/src/hooks/ShopperLogin/index.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ describe('Shopper Login hooks', () => {
2121
// don't work well with the current implementation of mutation hooks.
2222
'authenticateCustomer',
2323
'authorizeWebauthnRegistration',
24+
'deletePasskeyCredential',
25+
'deletePasskeyUser',
2426
'finishWebauthnAuthentication',
2527
'finishWebauthnUserRegistration',
28+
'getPasskeyUserByLoginId',
2629
'getTrustedAgentAuthorizationToken',
2730
'startWebauthnAuthentication',
2831
'startWebauthnUserRegistration'

packages/commerce-sdk-react/src/hooks/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ export {
1414
useTaxesFromBasket as useTaxesFromBasketV2,
1515
ShopperBasketsMutations as ShopperBasketsV2Mutations,
1616
useShopperBasketsMutation as useShopperBasketsV2Mutation,
17-
useShopperBasketsMutationHelper as useShopperBasketsV2MutationHelper,
17+
useShopperBasketsMutationHelper as useShopperBasketsV2MutationHelper
1818
} from './ShopperBasketsV2'
1919
// Only needed if consumers want to type-annotate variables with it.
20-
export type { ShopperBasketsMutation as ShopperBasketsV2Mutation } from './ShopperBasketsV2'
20+
export type {ShopperBasketsMutation as ShopperBasketsV2Mutation} from './ShopperBasketsV2'
2121

2222
export * from './ShopperContexts'
2323
export * from './ShopperCustomers'

packages/pwa-kit-create-app/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## v3.17.0-dev
2+
- Add Salesforce Payments configuration to generated projects
23
- Clear verdaccio npm cache during project generation [#3652](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3652)
34
- Add Node 24 support, remove legacy `url` module import. Drop Node 16 support [#3652](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3652)
45

packages/pwa-kit-create-app/assets/bootstrap/js/config/default.js.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ module.exports = {
165165
enabled: true,
166166
sdkUrl: '',
167167
metadataUrl: ''
168-
},
168+
},
169169
// Google Cloud api config
170170
googleCloudAPI: {
171171
apiKey: process.env.GOOGLE_CLOUD_API_KEY

0 commit comments

Comments
 (0)