@faststore/core 4.7.0-dev.6 → 4.7.0-dev.8

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.
@@ -1,9 +1,9 @@
1
1
 
2
- > @faststore/core@4.7.0-dev.5 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.7.0-dev.7 generate /home/runner/work/faststore/faststore/packages/core
3
3
  > pnpm run gen-types && pnpm run cache-graphql
4
4
 
5
5
 
6
- > @faststore/core@4.7.0-dev.5 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.7.0-dev.7 gen-types /home/runner/work/faststore/faststore/packages/core
7
7
  > node ../cli/bin/run generate-types .
8
8
 
9
9
  [STARTED] Parse Configuration
@@ -19,7 +19,7 @@
19
19
  [COMPLETED] Generate to /home/runner/work/faststore/faststore/packages/core/@generated/
20
20
  [COMPLETED] Generate outputs
21
21
 
22
- > @faststore/core@4.7.0-dev.5 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.7.0-dev.7 cache-graphql /home/runner/work/faststore/faststore/packages/core
23
23
  > node ../cli/bin/run cache-graphql --config=./discovery.config.default.js --queries=./@generated/persisted-documents.json
24
24
 
25
25
  [Info] - Config file location: /home/runner/work/faststore/faststore/packages/core/discovery.config.default.js
@@ -1,5 +1,5 @@
1
1
 
2
- > @faststore/core@4.7.0-dev.5 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.7.0-dev.7 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
@@ -7,19 +7,19 @@
7
7
 
8
8
  Not implemented: navigation to another Document
9
9
  Not implemented: navigation to another Document
10
- ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 831ms
11
10
  Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
12
11
  npx update-browserslist-db@latest
13
12
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
14
- ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 3134ms
15
- ✓ shows an error state when the list fails to load  839ms
16
- ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  541ms
17
- ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (14 tests) 2789ms
18
- ✓ shows the tab bar and renders Personal cards by default  1093ms
19
- ✓ paginates when there are more than 25 cards  498ms
20
- ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 200ms
21
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 41ms
22
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 166ms
13
+ ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 1025ms
14
+ ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (14 tests) 2904ms
15
+ ✓ shows the tab bar and renders Personal cards by default  1398ms
16
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 3445ms
17
+ ✓ shows an error state when the list fails to load  1019ms
18
+ ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  527ms
19
+ ✓ keeps Confirm disabled until a different contract is selected  375ms
20
+ ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 128ms
21
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 27ms
22
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 226ms
23
23
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
24
24
  Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
25
25
   at node:internal/deps/undici/undici:16416:13
@@ -49,8 +49,7 @@ Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
49
49
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
50
50
  Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
51
51
 
52
- ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (7 tests) 258ms
53
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 40ms
52
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (7 tests) 203ms
54
53
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
55
54
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
56
55
 
@@ -136,6 +135,7 @@ act(() => {
136
135
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
137
136
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
138
137
 
138
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 25ms
139
139
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > uses the fallback invalid-password message when API omits an error
140
140
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
141
141
 
@@ -232,9 +232,6 @@ act(() => {
232
232
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
233
233
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
234
234
 
235
- ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 1967ms
236
- ✓ renders the menu view with contract details and manage footer  987ms
237
- ✓ opens the contract switcher and returns to the menu on back  418ms
238
235
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > shows service unavailable when the login request fails
239
236
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
240
237
 
@@ -283,9 +280,11 @@ act(() => {
283
280
  This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
284
281
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
285
282
 
286
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1685ms
287
- ✓ renders the password protection form  940ms
288
- ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 24ms
283
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1327ms
284
+ ✓ renders the password protection form  546ms
285
+ ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 1086ms
286
+ ✓ renders the menu view with contract details and manage footer  715ms
287
+ ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 19ms
289
288
  stderr | test/sdk/localization/store-url.browser.test.ts
290
289
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
291
290
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -294,7 +293,6 @@ This ensures that you're testing the behavior the user would see in the browser.
294
293
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
295
294
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
296
295
 
297
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 6ms
298
296
  stderr | test/components/cms/RenderSections.browser.test.tsx
299
297
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
300
298
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -303,11 +301,12 @@ This ensures that you're testing the behavior the user would see in the browser.
303
301
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
304
302
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
305
303
 
306
- ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 40ms
307
- ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 97ms
308
- ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 44ms
304
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 6ms
305
+ ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 43ms
306
+ ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 61ms
307
+ ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 39ms
309
308
  ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 134ms
310
- ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 47ms
309
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 60ms
311
310
  stderr | test/components/account/doLogout.browser.test.ts
312
311
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
313
312
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -316,10 +315,10 @@ This ensures that you're testing the behavior the user would see in the browser.
316
315
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
317
316
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
318
317
 
319
- ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 24ms
320
- ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 91ms
321
- ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 286ms
322
- ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 338ms
318
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 33ms
319
+ ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 85ms
320
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 293ms
321
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 277ms
323
322
  stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
324
323
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
325
324
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -328,11 +327,12 @@ This ensures that you're testing the behavior the user would see in the browser.
328
327
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
329
328
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
330
329
 
331
- ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 8ms
332
- ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 4ms
333
- ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 4ms
334
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 20ms
335
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 42ms
330
+ ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 6ms
331
+ ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 5ms
332
+ ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
333
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 31ms
334
+ ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 40ms
335
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 31ms
336
336
  stderr | test/sdk/account/refreshToken.browser.test.ts
337
337
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
338
338
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -341,12 +341,11 @@ This ensures that you're testing the behavior the user would see in the browser.
341
341
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
342
342
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
343
343
 
344
- ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 39ms
345
- ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 8ms
346
- ✓  node  test/utils/match-url.test.ts (10 tests) 24ms
347
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 17ms
348
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 169ms
349
- ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 10ms
344
+ ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 7ms
345
+ ✓  node  test/utils/match-url.test.ts (10 tests) 11ms
346
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 258ms
347
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 16ms
348
+ ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 7ms
350
349
  stderr | test/components/search/SearchInputComponent.test.tsx
351
350
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
352
351
 
@@ -410,19 +409,19 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
410
409
  at Suspense
411
410
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
412
411
 
413
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 83ms
414
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 52ms
415
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 19ms
412
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 76ms
413
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 46ms
414
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 12ms
416
415
  stderr | test/pages/pvt/account/cards/index.test.ts > Cards page getServerSideProps > redirects to /pvt/account/403 when the query fails with 401/403
417
416
  { extensions: { status: 401 } }
418
417
 
419
418
  stderr | test/pages/pvt/account/cards/index.test.ts > Cards page getServerSideProps > renders the error state (no redirect) when the query fails with a non-auth status
420
419
  { extensions: { status: 502 } }
421
420
 
422
- ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 12ms
423
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 28ms
424
- ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 11ms
425
- ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 445ms
421
+ ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 11ms
422
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 26ms
423
+ ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 9ms
424
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 444ms
426
425
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
427
426
  Graphql execution returned with error: [
428
427
  {
@@ -515,67 +514,66 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
515
514
  at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:37
516
515
  at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/traces.CCmnQaNT.js:142:27)
517
516
 
518
- ✓  node  test/pages/api/graphql.test.ts (17 tests) 29ms
519
- ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 848ms
520
- ✓ navigates with the search term on blur  365ms
521
- ✓ navigates without a label param when the search is cleared  362ms
517
+ ✓  node  test/pages/api/graphql.test.ts (17 tests) 20ms
518
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 836ms
519
+ ✓ navigates with the search term on blur  364ms
520
+ ✓ navigates without a label param when the search is cleared  361ms
522
521
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
523
522
  Set password request failed: Bad Request
524
523
 
525
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 59ms
526
- ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 40ms
527
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 44ms
528
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 7ms
529
- ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 8ms
530
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (12 tests) 10ms
531
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 51ms
532
- ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 166ms
524
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 50ms
525
+ ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 34ms
526
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 8ms
527
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 40ms
528
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 7ms
529
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (12 tests) 12ms
530
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 53ms
531
+ ✓  node  test/sdk/redirects/index.test.ts (7 tests) 54ms
532
+ ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 150ms
533
533
  ✓  node  test/utils/productJsonLd.test.ts (17 tests) 10ms
534
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 47ms
535
- ✓  node  test/proxy.localization.test.ts (5 tests) 56ms
536
- ✓  node  test/server/index.test.ts (7 tests) 964ms
537
- ✓ should return a valid merged GraphQL schema  355ms
538
- ✓ should handle options and execute  303ms
539
- ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (6 tests) 8ms
540
- ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 54ms
541
- ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 122ms
542
- ✓  node  test/proxy.test.ts (4 tests) 22ms
543
- ✓  node  test/server/webops-api.test.ts (9 tests) 14ms
544
- ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 17ms
545
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 39ms
546
- ✓  node  test/server/content/service.test.ts (5 tests) 6ms
534
+ ✓  node  test/proxy.localization.test.ts (5 tests) 39ms
535
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 38ms
536
+ ✓  node  test/server/index.test.ts (7 tests) 813ms
537
+ ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (6 tests) 9ms
538
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 107ms
539
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 49ms
540
+ ✓  node  test/proxy.test.ts (4 tests) 20ms
541
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 38ms
542
+ ✓  node  test/server/webops-api.test.ts (9 tests) 12ms
547
543
  ✓  node  test/server/cms/myAccountDefaultSections.test.ts (7 tests) 6ms
548
- ✓  node  test/utils/productJsonLdRendering.test.tsx (4 tests) 15ms
549
- ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 9ms
550
- ✓  node  test/server/cms/global.test.ts (3 tests) 6ms
551
- ✓  node  test/sdk/localization/store-url.test.ts (1 test) 3ms
552
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 34ms
553
- ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 144ms
554
- ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 8ms
555
- ✓  node  test/server/rootSpan.test.ts (4 tests) 72ms
556
- ✓  node  test/pages/api/preview.test.ts (2 tests) 12ms
557
- ✓  node  test/components/account/Layout.test.tsx (6 tests) 80ms
558
- ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
559
- ✓  node  test/components/search/SearchInput.test.ts (6 tests) 17ms
560
- ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 6ms
544
+ ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 11ms
545
+ ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 14ms
546
+ ✓  node  test/server/content/service.test.ts (5 tests) 6ms
547
+ ✓  node  test/utils/productJsonLdRendering.test.tsx (4 tests) 11ms
548
+ ✓  node  test/server/cms/global.test.ts (3 tests) 5ms
549
+ ✓  node  test/sdk/localization/store-url.test.ts (1 test) 4ms
550
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 27ms
551
+ ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 151ms
552
+ ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 7ms
553
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 7ms
554
+ ✓  node  test/server/rootSpan.test.ts (4 tests) 40ms
555
+ ✓  node  test/components/account/Layout.test.tsx (6 tests) 66ms
556
+ ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 6ms
557
+ ✓  node  test/components/search/SearchInput.test.ts (6 tests) 9ms
558
+ ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 4ms
561
559
  ✓  node  test/utils/retry.test.ts (5 tests) 15ms
562
560
  ✓  node  test/server/cms/index.test.ts (2 tests) 6ms
563
- ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 6ms
561
+ ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 4ms
564
562
  ✓  node  test/utils/unlockResponse.test.ts (11 tests) 5ms
565
- ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 4ms
566
- ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 190ms
567
- ✓  node  test/utils/isLocalHost.test.ts (7 tests) 6ms
568
- ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 57ms
569
- ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 5ms
570
- ✓  node  test/utils/getCookie.test.ts (4 tests) 6ms
571
- ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 5ms
572
- ✓  node  test/instrumentation.test.ts (3 tests) 5ms
573
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 42ms
574
- ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 13ms
575
- ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 32ms
576
-
577
-  Test Files  90 passed (90)
578
-  Tests  723 passed (723)
579
-  Start at  14:52:14
580
-  Duration  46.99s (transform 11.84s, setup 0ms, import 41.77s, tests 16.67s, environment 57.05s)
563
+ ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 6ms
564
+ ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 193ms
565
+ ✓  node  test/utils/isLocalHost.test.ts (7 tests) 4ms
566
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 47ms
567
+ ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 4ms
568
+ ✓  node  test/utils/getCookie.test.ts (4 tests) 4ms
569
+ ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 3ms
570
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 36ms
571
+ ✓  node  test/instrumentation.test.ts (3 tests) 6ms
572
+ ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 12ms
573
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 25ms
574
+
575
+  Test Files  91 passed (91)
576
+  Tests  730 passed (730)
577
+  Start at  19:29:06
578
+  Duration  45.26s (transform 14.82s, setup 0ms, import 41.48s, tests 15.63s, environment 54.18s)
581
579
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.7.0-dev.8](https://github.com/vtex/faststore/compare/v4.7.0-dev.7...v4.7.0-dev.8) (2026-08-28)
7
+
8
+ **Note:** Version bump only for package @faststore/core
9
+
10
+ # [4.7.0-dev.7](https://github.com/vtex/faststore/compare/v4.7.0-dev.6...v4.7.0-dev.7) (2026-08-28)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **core:** resolve redirect matcher module explicitly ([#3467](https://github.com/vtex/faststore/issues/3467)) ([7acecf0](https://github.com/vtex/faststore/commit/7acecf03604842db166de7c53038065934c91154)), closes [#1450148](https://github.com/vtex/faststore/issues/1450148) [#3468](https://github.com/vtex/faststore/issues/3468)
15
+
6
16
  # [4.7.0-dev.6](https://github.com/vtex/faststore/compare/v4.7.0-dev.5...v4.7.0-dev.6) (2026-08-26)
7
17
 
8
18
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "4.7.0-dev.6",
3
+ "version": "4.7.0-dev.8",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,11 +71,11 @@
71
71
  "style-loader": "^3.3.1",
72
72
  "swr": "^2.2.5",
73
73
  "use-sync-external-store": "^1.6.0",
74
- "@faststore/api": "4.7.0-dev.6",
75
- "@faststore/lighthouse": "4.7.0-dev.6",
76
- "@faststore/sdk": "4.7.0-dev.6",
77
- "@faststore/ui": "4.7.0-dev.6",
78
- "@faststore/diagnostics": "4.7.0-dev.6"
74
+ "@faststore/api": "4.7.0-dev.8",
75
+ "@faststore/lighthouse": "4.7.0-dev.8",
76
+ "@faststore/diagnostics": "4.7.0-dev.8",
77
+ "@faststore/ui": "4.7.0-dev.8",
78
+ "@faststore/sdk": "4.7.0-dev.8"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@cypress/code-coverage": "^3.12.1",
@@ -1,5 +1,5 @@
1
1
  import storeConfig from 'discovery.config'
2
- import { matcher } from 'src/customizations/src/redirects'
2
+ import { matcher } from 'src/customizations/src/redirects/index'
3
3
 
4
4
  type GetRedirectArgs = {
5
5
  pathname: string
@@ -19,6 +19,23 @@ const PERMANENT_STATUS = 308
19
19
 
20
20
  const ASSET_FILE_REGEX = /\.(js|css|png|jpg|jpeg|svg|gif|webp|ico|json|map)$/i
21
21
 
22
+ let hasWarnedInvalidMatcher = false
23
+
24
+ function resolveLocalMatch(pathname: string) {
25
+ if (typeof matcher === 'function') {
26
+ return matcher({ pathname })
27
+ }
28
+
29
+ if (!hasWarnedInvalidMatcher) {
30
+ hasWarnedInvalidMatcher = true
31
+ console.warn(
32
+ `[redirects] Expected src/redirects to export a \`matcher\` function, got ${typeof matcher}. Falling back to the platform redirect lookup.`
33
+ )
34
+ }
35
+
36
+ return null
37
+ }
38
+
22
39
  export async function getRedirect({
23
40
  pathname,
24
41
  }: GetRedirectArgs): Promise<GetRedirectReturn> {
@@ -29,7 +46,8 @@ export async function getRedirect({
29
46
  }
30
47
 
31
48
  try {
32
- const redirectMatch = matcher({ pathname })
49
+ const redirectMatch = resolveLocalMatch(pathname)
50
+
33
51
  if (redirectMatch) {
34
52
  return {
35
53
  destination: encodeURI(redirectMatch.destination),
@@ -0,0 +1,126 @@
1
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
2
+
3
+ const STORE_ID = 'teststore'
4
+ const REWRITER_URL = `https://${STORE_ID}.myvtex.com/_v/public/redirect-evaluate`
5
+
6
+ const MATCHER_MODULE = 'src/customizations/src/redirects/index'
7
+
8
+ async function loadGetRedirect(matcherExport?: unknown) {
9
+ vi.resetModules()
10
+
11
+ vi.doMock('discovery.config', () => ({
12
+ default: { api: { storeId: STORE_ID } },
13
+ }))
14
+
15
+ if (matcherExport === undefined) {
16
+ vi.doUnmock(MATCHER_MODULE)
17
+ } else {
18
+ vi.doMock(MATCHER_MODULE, () => ({ matcher: matcherExport }))
19
+ }
20
+
21
+ const { getRedirect } = await import('../../../src/sdk/redirects')
22
+
23
+ return getRedirect
24
+ }
25
+
26
+ function mockRewriter({ ok, body }: { ok: boolean; body?: unknown }) {
27
+ const fetchMock = vi.fn().mockResolvedValue({ ok, json: async () => body })
28
+
29
+ vi.stubGlobal('fetch', fetchMock)
30
+
31
+ return fetchMock
32
+ }
33
+
34
+ describe('getRedirect', () => {
35
+ beforeEach(() => {
36
+ vi.spyOn(console, 'error').mockImplementation(() => {})
37
+ vi.spyOn(console, 'warn').mockImplementation(() => {})
38
+ })
39
+
40
+ afterEach(() => {
41
+ vi.doUnmock('discovery.config')
42
+ vi.doUnmock(MATCHER_MODULE)
43
+ vi.unstubAllGlobals()
44
+ vi.restoreAllMocks()
45
+ vi.resetModules()
46
+ })
47
+
48
+ it('skips asset paths without querying the rewriter', async () => {
49
+ const fetchMock = mockRewriter({ ok: false })
50
+ const getRedirect = await loadGetRedirect()
51
+
52
+ await expect(getRedirect({ pathname: '/icons.json' })).resolves.toBeNull()
53
+ expect(fetchMock).not.toHaveBeenCalled()
54
+ })
55
+
56
+ it('returns a custom matcher result without querying the rewriter', async () => {
57
+ const fetchMock = mockRewriter({ ok: false })
58
+ const getRedirect = await loadGetRedirect(() => ({
59
+ destination: '/promoção',
60
+ permanent: false,
61
+ }))
62
+
63
+ await expect(getRedirect({ pathname: '/sale' })).resolves.toEqual({
64
+ destination: encodeURI('/promoção'),
65
+ permanent: false,
66
+ })
67
+ expect(fetchMock).not.toHaveBeenCalled()
68
+ expect(console.warn).not.toHaveBeenCalled()
69
+ })
70
+
71
+ it('falls back to the rewriter when the matcher export is not a function', async () => {
72
+ const fetchMock = mockRewriter({
73
+ ok: true,
74
+ body: { location: '/eletrodomesticos', status: 308 },
75
+ })
76
+ // A store shipping `src/redirects.json` can shadow the customization
77
+ // module, which makes the imported `matcher` an array instead of a function.
78
+ const getRedirect = await loadGetRedirect([])
79
+
80
+ await expect(getRedirect({ pathname: '/old-page' })).resolves.toEqual({
81
+ destination: '/eletrodomesticos',
82
+ permanent: true,
83
+ })
84
+ expect(fetchMock).toHaveBeenCalledWith(`${REWRITER_URL}/old-page`)
85
+ expect(console.warn).toHaveBeenCalledTimes(1)
86
+ })
87
+
88
+ it('warns only once about an invalid matcher export', async () => {
89
+ mockRewriter({ ok: false })
90
+ const getRedirect = await loadGetRedirect([])
91
+
92
+ await getRedirect({ pathname: '/first' })
93
+ await getRedirect({ pathname: '/second' })
94
+
95
+ expect(console.warn).toHaveBeenCalledTimes(1)
96
+ })
97
+
98
+ it('does not leak a mocked matcher into a later default load', async () => {
99
+ mockRewriter({ ok: false })
100
+
101
+ const withInvalidMatcher = await loadGetRedirect([])
102
+ await expect(withInvalidMatcher({ pathname: '/first' })).resolves.toBeNull()
103
+
104
+ const withStubMatcher = await loadGetRedirect()
105
+ await expect(withStubMatcher({ pathname: '/second' })).resolves.toBeNull()
106
+
107
+ expect(console.warn).toHaveBeenCalledTimes(1)
108
+ })
109
+
110
+ it('marks non-permanent rewriter redirects as temporary', async () => {
111
+ mockRewriter({ ok: true, body: { location: '/new', status: 307 } })
112
+ const getRedirect = await loadGetRedirect()
113
+
114
+ await expect(getRedirect({ pathname: '/old' })).resolves.toEqual({
115
+ destination: '/new',
116
+ permanent: false,
117
+ })
118
+ })
119
+
120
+ it('returns null when the rewriter has no rule for the path', async () => {
121
+ mockRewriter({ ok: false })
122
+ const getRedirect = await loadGetRedirect()
123
+
124
+ await expect(getRedirect({ pathname: '/no-rule' })).resolves.toBeNull()
125
+ })
126
+ })