@salesforce/commerce-sdk-react 3.5.0-preview.0 → 3.5.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -2
- package/auth/index.js +3 -3
- package/constant.js +2 -1
- package/package.json +4 -4
- package/provider.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
## v3.5.0-preview.
|
|
2
|
-
|
|
1
|
+
## v3.5.0-preview.1 (Aug 11, 2025)
|
|
3
2
|
- Add support for environment level base paths on /mobify routes [#2892](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2892)
|
|
4
3
|
- Update USID expiry to match SLAS refresh token expiry[#2854](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2854)
|
|
5
4
|
|
package/auth/index.js
CHANGED
|
@@ -148,9 +148,9 @@ const DEFAULT_SLAS_REFRESH_TOKEN_GUEST_TTL = exports.DEFAULT_SLAS_REFRESH_TOKEN_
|
|
|
148
148
|
class Auth {
|
|
149
149
|
constructor(config) {
|
|
150
150
|
// Special proxy endpoint for injecting SLAS private client secret.
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
// We should remove this in the next major release so we do not have a hard coded proxy path inside commerce-sdk-react
|
|
151
|
+
// We prioritize config.privateClientProxyEndpoint since that allows us to use the new envBasePath feature
|
|
152
|
+
// The preexisting hard coded privateClientEndpoint is kept here for now to prevent a breaking change.
|
|
153
|
+
// TODO: We should remove this in the next major release so we do not have a hard coded proxy path inside commerce-sdk-react
|
|
154
154
|
const baseUrl = config.proxy.split(_constant.MOBIFY_PATH)[0];
|
|
155
155
|
const privateClientEndpoint = `${baseUrl}${_constant.SLAS_PRIVATE_PROXY_PATH}`;
|
|
156
156
|
this.client = new _commerceSdkIsomorphic.ShopperLogin({
|
package/constant.js
CHANGED
|
@@ -16,7 +16,8 @@ exports.SLAS_SECRET_WARNING_MSG = exports.SLAS_SECRET_PLACEHOLDER = exports.SLAS
|
|
|
16
16
|
*/
|
|
17
17
|
const IFRAME_HOST_ALLOW_LIST = exports.IFRAME_HOST_ALLOW_LIST = Object.freeze(['https://runtime.commercecloud.com', 'https://runtime-admin-staging.mobify-storefront.com', 'https://runtime-admin-preview.mobify-storefront.com']);
|
|
18
18
|
|
|
19
|
-
/*
|
|
19
|
+
/* Deprecating the following path constants since, outside of storefront preview,
|
|
20
|
+
* the paths they are used for can be passed in via the provider. */
|
|
20
21
|
/**
|
|
21
22
|
* @deprecated
|
|
22
23
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/commerce-sdk-react",
|
|
3
|
-
"version": "3.5.0-preview.
|
|
3
|
+
"version": "3.5.0-preview.1",
|
|
4
4
|
"description": "A library that provides react hooks for fetching data from Commerce Cloud",
|
|
5
5
|
"homepage": "https://github.com/SalesforceCommerceCloud/pwa-kit/tree/develop/packages/ecom-react-hooks#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"jwt-decode": "^4.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@salesforce/pwa-kit-dev": "3.12.0-preview.
|
|
48
|
+
"@salesforce/pwa-kit-dev": "3.12.0-preview.1",
|
|
49
49
|
"@tanstack/react-query": "^4.28.0",
|
|
50
50
|
"@testing-library/jest-dom": "^5.16.5",
|
|
51
51
|
"@testing-library/react": "^14.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@types/react-helmet": "~6.1.6",
|
|
61
61
|
"@types/react-router-dom": "~5.3.3",
|
|
62
62
|
"cross-env": "^5.2.1",
|
|
63
|
-
"internal-lib-build": "3.12.0-preview.
|
|
63
|
+
"internal-lib-build": "3.12.0-preview.1",
|
|
64
64
|
"jsonwebtoken": "^9.0.0",
|
|
65
65
|
"nock": "^13.3.0",
|
|
66
66
|
"nodemon": "^2.0.22",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"publishConfig": {
|
|
91
91
|
"directory": "dist"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "0f66d26584f98d3322bffcb70e7feed08c81cc7a"
|
|
94
94
|
}
|
package/provider.js
CHANGED
|
@@ -180,9 +180,10 @@ const CommerceApiProvider = props => {
|
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
// Special proxy endpoint for injecting SLAS private client secret.
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
183
|
+
// This is only used by the ShopperLogin API as that is the only one that interacts with SLAS.
|
|
184
|
+
// We prioritize config.privateClientProxyEndpoint since that allows us to use the new envBasePath feature
|
|
185
|
+
// The preexisting hard coded privateClientEndpoint is kept here for now to prevent a breaking change.
|
|
186
|
+
// TODO: We should remove this in the next major release so we do not have a hard coded proxy path inside commerce-sdk-react
|
|
186
187
|
const baseUrl = config.proxy.split(_constant.MOBIFY_PATH)[0];
|
|
187
188
|
const privateClientEndpoint = `${baseUrl}${_constant.SLAS_PRIVATE_PROXY_PATH}`;
|
|
188
189
|
return {
|