Skip to content

Commit

Permalink
Merge pull request #1794 from SalesforceCommerceCloud/upgrade-isomorp…
Browse files Browse the repository at this point in the history
…hic-2.0.0

[commerce-sdk-react] upgrade isomorphic library version to 2.0.0
  • Loading branch information
kevinxh committed May 21, 2024
2 parents 8cdef3d + 0607293 commit 09e9c0f
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 20 deletions.
3 changes: 2 additions & 1 deletion packages/commerce-sdk-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## v1.5.0-dev (Apr 17, 2024)
## v2.0.0-dev (May 21, 2024)
- Upgrade to commerce-sdk-isomorphic v2.0.0 [#1794](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1794)
## v1.4.2 (Apr 17, 2024)
- Update SLAS private proxy path [#1752](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1752)

Expand Down
20 changes: 13 additions & 7 deletions packages/commerce-sdk-react/package-lock.json

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

4 changes: 2 additions & 2 deletions packages/commerce-sdk-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@salesforce/commerce-sdk-react",
"version": "1.5.0-dev",
"version": "2.0.0-dev",
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
"homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/ecom-react-hooks#readme",
"bugs": {
Expand Down Expand Up @@ -40,7 +40,7 @@
"version": "node ./scripts/version.js"
},
"dependencies": {
"commerce-sdk-isomorphic": "^1.13.1",
"commerce-sdk-isomorphic": "^2.0.0",
"js-cookie": "^3.0.1",
"jwt-decode": "^4.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ describe('Shopper Customers hooks', () => {
// 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([
'invalidateCustomerAuth', // DEPRECATED, not included
'authorizeCustomer', // DEPRECATED, not included
'authorizeTrustedSystem', // DEPRECATED, not included
'registerExternalProfile', // TODO: Implement when the endpoint exits closed beta
'getExternalProfile' // TODO: Implement when the endpoint exits closed beta
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Shopper Orders hooks', () => {
const unimplemented = getUnimplementedEndpoints(ShopperOrders, 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([])
expect(unimplemented).toEqual(['guestOrderLookup'])
})
test('all mutations have cache update logic', () => {
// unimplemented = value in mutations enum, but no method in cache update matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const OPTIONS = {parameters: {campaignId: 'campaignId', ids: 'a,b'}}
type TestMap = {[K in keyof Queries]: NonNullable<ReturnType<Queries[K]>['data']>}
// This is an object rather than an array to more easily ensure we cover all hooks
const testMap: TestMap = {
usePromotions: {count: 0, data: [], total: 0},
usePromotionsForCampaign: {count: 0, data: [], total: 0}
usePromotions: {limit: 0, data: [], total: 0},
usePromotionsForCampaign: {limit: 0, data: [], total: 0}
}
// Type assertion is necessary because `Object.entries` is limited
const testCases = Object.entries(testMap) as Array<[keyof TestMap, TestMap[keyof TestMap]]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bundlesize": [
{
"path": "build/main.js",
"maxSize": "43 kB"
"maxSize": "44 kB"
},
{
"path": "build/vendor.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/template-retail-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@lhci/cli": "^0.11.0",
"@loadable/component": "^5.15.3",
"@peculiar/webcrypto": "^1.4.2",
"@salesforce/commerce-sdk-react": "1.5.0-dev",
"@salesforce/commerce-sdk-react": "2.0.0-dev",
"@salesforce/pwa-kit-dev": "3.6.0-dev",
"@salesforce/pwa-kit-react-sdk": "3.6.0-dev",
"@salesforce/pwa-kit-runtime": "3.6.0-dev",
Expand Down Expand Up @@ -93,7 +93,7 @@
"bundlesize": [
{
"path": "build/main.js",
"maxSize": "43 kB"
"maxSize": "44 kB"
},
{
"path": "build/vendor.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/test-commerce-sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"@loadable/component": "^5.15.3",
"@salesforce/commerce-sdk-react": "1.5.0-dev",
"@salesforce/commerce-sdk-react": "2.0.0-dev",
"@salesforce/pwa-kit-dev": "3.6.0-dev",
"@salesforce/pwa-kit-react-sdk": "3.6.0-dev",
"@salesforce/pwa-kit-runtime": "3.6.0-dev",
Expand Down

0 comments on commit 09e9c0f

Please sign in to comment.