Skip to content

Commit cbdfe90

Browse files
committed
fix lint errors
1 parent 0f689e1 commit cbdfe90

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

packages/commerce-sdk-react/src/provider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ const CommerceApiProvider = (props: CommerceApiProviderProps): ReactElement => {
157157
// When HttpOnly cookies are enabled, ensure fetch credentials allow cookies to be sent.
158158
// Override 'omit' or unset to 'same-origin'; keep 'same-origin' or 'include' as-is.
159159
const effectiveFetchOptions =
160-
useHttpOnlySessionCookies && (!fetchOptions?.credentials || fetchOptions.credentials === 'omit')
160+
useHttpOnlySessionCookies &&
161+
(!fetchOptions?.credentials || fetchOptions.credentials === 'omit')
161162
? {...fetchOptions, credentials: 'same-origin' as RequestCredentials}
162163
: fetchOptions
163164

packages/pwa-kit-dev/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## v3.17.0-dev
22
- Add Node 24 support, remove legacy `url` module import. Drop Node 16 support [#3652](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3652)
33
- Add configuration flag `disableHttpOnlySessionCookies` to `ssrParameters` [#3635](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3635)
4+
- Fix issue to correctly set the environment variable `MRT_DISABLE_HTTPONLY_SESSION_COOKIES` [#3680](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3680)
45

56
## v3.16.0 (Feb 12, 2026)
67

packages/pwa-kit-runtime/src/ssr/server/build-remote-server.test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ describe('SLAS private proxy', () => {
365365
mockSlasServerInstance.close()
366366
}
367367
})
368-
369368
})
370369

371370
describe('HttpOnly session cookies', () => {
@@ -583,8 +582,8 @@ describe('HttpOnly session cookies', () => {
583582

584583
expect(response.headers['set-cookie']).toBeDefined()
585584
const cookies = response.headers['set-cookie']
586-
expect(cookies.some(c => c.includes('access_token_testsite'))).toBe(true)
587-
expect(cookies.some(c => c.includes('cc-nx-g_testsite'))).toBe(true)
585+
expect(cookies.some((c) => c.includes('access_token_testsite'))).toBe(true)
586+
expect(cookies.some((c) => c.includes('cc-nx-g_testsite'))).toBe(true)
588587
} finally {
589588
mockSlasServerInstance.close()
590589
}
@@ -692,7 +691,7 @@ describe('HttpOnly session cookies', () => {
692691

693692
expect(response.headers['set-cookie']).toBeDefined()
694693
const cookies = response.headers['set-cookie']
695-
expect(cookies.some(c => c.includes('access_token_testsite'))).toBe(true)
694+
expect(cookies.some((c) => c.includes('access_token_testsite'))).toBe(true)
696695
} finally {
697696
mockSlasServerInstance.close()
698697
}

packages/pwa-kit-runtime/src/utils/ssr-server/configure-proxy.basic.test.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import {
88
applyProxyRequestHeaders,
99
applyProxyRequestAuthHeader,
10-
ALLOWED_CACHING_PROXY_REQUEST_METHODS,
1110
configureProxy
1211
} from './configure-proxy'
1312
import * as ssrProxying from '../ssr-proxying'
@@ -122,7 +121,10 @@ describe('applyProxyRequestAuthHeader', () => {
122121
slasEndpointsRequiringAccessToken: /\/oauth2\/logout/
123122
})
124123

125-
expect(proxyRequest.setHeader).toHaveBeenCalledWith('authorization', 'Bearer test-access-token')
124+
expect(proxyRequest.setHeader).toHaveBeenCalledWith(
125+
'authorization',
126+
'Bearer test-access-token'
127+
)
126128
})
127129

128130
it('applies Bearer token for SLAS logout endpoint', () => {
@@ -146,7 +148,10 @@ describe('applyProxyRequestAuthHeader', () => {
146148
slasEndpointsRequiringAccessToken: /\/oauth2\/logout/
147149
})
148150

149-
expect(proxyRequest.setHeader).toHaveBeenCalledWith('authorization', 'Bearer test-access-token')
151+
expect(proxyRequest.setHeader).toHaveBeenCalledWith(
152+
'authorization',
153+
'Bearer test-access-token'
154+
)
150155
})
151156

152157
it('does not apply Bearer token for SLAS token endpoint', () => {

0 commit comments

Comments
 (0)