Skip to content

Commit deb3091

Browse files
Feat: Consume new OAS Isomorphic SDK (@W-19105545@) (#2879)
* refactor * fix build issues * trim uncessarry changes * remove most usages of * fix tests * update test files * fix unit tests * Bump commerce-sdk-isomorphic * Fix tests and lint errors * Bump commerce-sdk-react major version * Revert "Bump commerce-sdk-react major version" This reverts commit a62fcdf. * Bump bundle size * Try with larger runner * Update imports * Update bootstrap config * Update tsconfig * Rename ShopperSeo directory to ShopperSEO & Fix test-commerce-sdk-react * Clean up * Major bump commerce-sdk-react * Create CHANGELOG.md * Remove changelog file from test-commerce-sdk-react * PR Feedback * PR Feedback address TODO * PR Feedback use `helpers.authorizeIDP` instead of manual URL * Use `ShopperLoginTypes.getPasswordResetTokenBodyType` in getPasswordResetToken * Use `ShopperLoginTypes.resetPasswordBodyType` in resetPassword * Use DATA_MAP token_type * Use `loginRegisteredUserB2C` in register() and updateCustomerPassword() * Restore original API interface for `authorizeIDP`, `loginIDPUser` and `authorizePasswordless` * Restore original type names removing Public * Restore `privateClient` parameter in `authorizeIDP` --------- Signed-off-by: Adam Raya <adamraya@users.noreply.github.com> Co-authored-by: Adam Raya Navarro <arayanavarro@salesforce.com> Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
1 parent a56693f commit deb3091

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+557
-420
lines changed

packages/commerce-sdk-react/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## v3.5.0-dev (Jul 22, 2025)
1+
## v4.0.0-dev (Aug 18, 2025)
2+
- Upgrade to commerce-sdk-isomorphic v4.0.0 [2879](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2879)
23
- Add support for environment level base paths on /mobify routes [#2892](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2892)
34
- Update USID expiry to match SLAS refresh token expiry[#2854](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2854)
45
- [Bugfix] Skip deleting dwsid on shopper login if hybrid auth is enabled for current site. [#3151](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3151)

packages/commerce-sdk-react/README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,27 @@ const Example = () => {
160160
const login = useAuthHelper(AuthHelpers.LoginRegisteredUserB2C)
161161
const logout = useAuthHelper(AuthHelpers.LogOut)
162162

163-
return <button onClick={() => {
164-
login.mutate({username: 'kevin', password: 'pa$$word'})
165-
}}>
163+
return (
164+
<div>
165+
{/* Simple login */}
166+
<button onClick={() => {
167+
login.mutate({username: 'kevin', password: 'pa$$word'})
168+
}}>
169+
Login
170+
</button>
171+
172+
{/* Login with custom parameters */}
173+
<button onClick={() => {
174+
login.mutate({
175+
username: 'kevin',
176+
password: 'pa$$word',
177+
customParameters: {c_customField: 'customValue'}
178+
})
179+
}}>
180+
Login with Custom Parameters
181+
</button>
182+
</div>
183+
)
166184
}
167185
```
168186

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

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

packages/commerce-sdk-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/commerce-sdk-react",
3-
"version": "3.5.0-dev",
3+
"version": "4.0.0-dev",
44
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
55
"homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/ecom-react-hooks#readme",
66
"bugs": {
@@ -40,7 +40,7 @@
4040
"version": "node ./scripts/version.js"
4141
},
4242
"dependencies": {
43-
"commerce-sdk-isomorphic": "^3.4.0",
43+
"commerce-sdk-isomorphic": "^4.0.0",
4444
"js-cookie": "^3.0.1",
4545
"jwt-decode": "^4.0.0"
4646
},

0 commit comments

Comments
 (0)