Skip to content

Commit c3752d2

Browse files
authored
Merge branch 'develop' into W-20448811-shopper-can-manually-enter-otp-in-login-flows-2
Signed-off-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
2 parents 644928d + 9a3ec60 commit c3752d2

File tree

3 files changed

+2
-62
lines changed

3 files changed

+2
-62
lines changed

packages/template-retail-react-app/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
## v8.5.0-dev (Jan 19, 2026)
1+
## v9.0.0-dev (Jan 19, 2026)
22
- [Feature] One Click Checkout [#3552](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3552)
3-
4-
## v8.4.0-dev (Dec 17, 2025)
53
- [Feature] Add `fuzzyPathMatching` to reduce computational overhead of route generation at time of application load [#3530](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3530)
64
- [Bugfix] Fix Passwordless Login landingPath, Reset Password landingPath, and Social Login redirectUri value in config not being used [#3560](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3560)
75
- [Feature] PWA Integration with OMS
@@ -12,6 +10,7 @@
1210
- [Feature] Update passwordless login and password reset to use email mode by default. The mode can now be configured across the login page, auth modal, and checkout page [#3525](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3525)
1311
- Update "Continue Securely" button text to "Continue" for passwordless login [#3556](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3556)
1412
- Util function for passwordless callback URI [#3630](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3630)
13+
- [BREAKING] Remove unused absoluteUrl util from retail react app [#3633](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3633)
1514
- Allow shopper to manually input OTP during passwordless login [#3554](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3554)
1615

1716
## v8.3.0 (Dec 17, 2025)

packages/template-retail-react-app/app/utils/url.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,13 @@
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import {getAppOrigin} from '@salesforce/pwa-kit-react-sdk/utils/url'
98
import {
109
getLocaleByReference,
1110
getParamsFromPath,
1211
getDefaultSite,
1312
getSiteByReference
1413
} from '@salesforce/retail-react-app/app/utils/site-utils'
1514
import {HOME_HREF, urlPartPositions} from '@salesforce/retail-react-app/app/constants'
16-
import {isAbsoluteURL} from '@salesforce/retail-react-app/app/page-designer/utils'
17-
18-
/**
19-
* Constructs an absolute URL from a given path and an optional application origin.
20-
* TODO: How should this work with base path?
21-
*
22-
* @param {string} path - The relative URL path to be appended to the origin.
23-
* @param {string} [appOrigin] - The optional application origin (e.g., "https://example.com").
24-
* If not provided, the function will call `getAppOrigin()`.
25-
* @returns {string} - The fully qualified URL as a string.
26-
*/
27-
export const absoluteUrl = (path, appOrigin) => {
28-
// If path is not provided or already an absolute URL, return it as-is
29-
if (!path || isAbsoluteURL(path)) {
30-
return path
31-
}
32-
33-
// absoluteUrl is not a react hook so we cannot use the useAppOrigin hook here
34-
return new URL(path, appOrigin || getAppOrigin()).toString()
35-
}
3615

3716
/**
3817
* Modifies a given url by adding/updating query parameters.

packages/template-retail-react-app/app/utils/url.test.js

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
getPathWithLocale,
1414
rebuildPathWithParams,
1515
removeQueryParamsFromPath,
16-
absoluteUrl,
1716
createUrlTemplate,
1817
removeSiteLocaleFromPath,
1918
serverSafeEncode
@@ -25,13 +24,6 @@ afterEach(() => {
2524
jest.clearAllMocks()
2625
})
2726

28-
jest.mock('@salesforce/pwa-kit-react-sdk/utils/url', () => {
29-
const original = jest.requireActual('@salesforce/pwa-kit-react-sdk/utils/url')
30-
return {
31-
...original,
32-
getAppOrigin: jest.fn(() => 'https://www.example.com')
33-
}
34-
})
3527
jest.mock('./utils', () => {
3628
const original = jest.requireActual('./utils')
3729
return {
@@ -394,36 +386,6 @@ describe('removeQueryParamsFromPath test', () => {
394386
})
395387
})
396388

397-
describe('absoluteUrl', function () {
398-
test('return undefined when path is not provided', () => {
399-
const url = absoluteUrl()
400-
expect(url).toBeUndefined()
401-
})
402-
403-
test('return expected when path is a relative url', () => {
404-
const url = absoluteUrl('/uk/en/women/dresses')
405-
expect(url).toBe('https://www.example.com/uk/en/women/dresses')
406-
})
407-
408-
test('return expected when path is an absolute url', () => {
409-
const url = absoluteUrl('https://www.example.com/uk/en/women/dresses')
410-
expect(url).toBe('https://www.example.com/uk/en/women/dresses')
411-
})
412-
413-
test('return expected when path is a relative url and appOrigin is provided', () => {
414-
const url = absoluteUrl('uk/en/women/dresses', 'https://www.custom.com')
415-
expect(url).toBe('https://www.custom.com/uk/en/women/dresses')
416-
})
417-
418-
test('return expected when path is an absolute url and appOrigin is provided', () => {
419-
const url = absoluteUrl(
420-
'https://www.example.com/uk/en/women/dresses',
421-
'https://www.should-be-ignored.com'
422-
)
423-
expect(url).toBe('https://www.example.com/uk/en/women/dresses')
424-
})
425-
})
426-
427389
describe('removeSiteLocaleFromPath', function () {
428390
test('return path without site alias and locale', () => {
429391
const pathName = removeSiteLocaleFromPath('/uk/en-GB/account/wishlist')

0 commit comments

Comments
 (0)