@faststore/core 4.11.2 → 4.11.3-dev.0

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.11.1 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.11.2 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.11.1 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.11.2 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 @generated/
20
20
  [COMPLETED] Generate outputs
21
21
 
22
- > @faststore/core@4.11.1 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.11.2 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.11.1 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.11.2 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
@@ -7,34 +7,27 @@
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) 1049ms
10
+ ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 959ms
11
11
  Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
12
12
  npx update-browserslist-db@latest
13
13
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
14
- ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (16 tests) 2751ms
15
- ✓ shows the tab bar and renders Personal cards by default  1126ms
16
- ✓ paginates when there are more than 25 cards  561ms
17
- ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (22 tests) 4085ms
18
- ✓ shows an error state when the list fails to load  823ms
19
- ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  444ms
20
- ✓ keeps Confirm disabled until a different contract is selected  327ms
21
- ✓ keeps Confirm disabled when switching is unavailable  346ms
22
- ✓ keeps Confirm disabled when the selected contract is filtered out  329ms
23
- ✓ honors CMS-provided labels for the header, current session, search, footer, and available count  309ms
24
- ✓ falls back to English defaults when CMS labels are blank  313ms
25
- ✓  browser  test/components/account/orders/BuyingPolicyAlert.browser.test.tsx (13 tests) 2723ms
26
- ✓ opens the reject confirmation modal with the default English copy  1049ms
27
- ✓ opens the reject confirmation modal with CMS-provided labels  468ms
28
- ✓  browser  test/components/ui/RichText/RichText.browser.test.tsx (8 tests) 457ms
29
- ✓  browser  test/sdk/product/usePageProductsQuery.browser.test.ts (9 tests) 151ms
30
- ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (10 tests) 1733ms
31
- ✓ renders the menu view with contract details and manage footer  899ms
32
- ✓ opens the contract switcher and returns to the menu on back  380ms
33
- ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 48ms
34
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (6 tests) 27ms
35
- ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 149ms
36
- ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 107ms
37
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 95ms
14
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (22 tests) 3338ms
15
+ ✓ shows an error state when the list fails to load  680ms
16
+ ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  385ms
17
+ ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (16 tests) 2444ms
18
+ ✓ shows the tab bar and renders Personal cards by default  985ms
19
+ ✓ paginates when there are more than 25 cards  414ms
20
+ ✓  browser  test/components/account/orders/BuyingPolicyAlert.browser.test.tsx (13 tests) 1602ms
21
+ ✓ opens the reject confirmation modal with the default English copy  652ms
22
+ ✓  browser  test/components/ui/RichText/RichText.browser.test.tsx (8 tests) 375ms
23
+ ✓  browser  test/sdk/product/usePageProductsQuery.browser.test.ts (9 tests) 172ms
24
+ ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (10 tests) 1579ms
25
+ ✓ renders the menu view with contract details and manage footer  888ms
26
+ ✓ opens the contract switcher and returns to the menu on back  339ms
27
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 136ms
28
+ ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 67ms
29
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (6 tests) 7ms
30
+ ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 79ms
38
31
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
39
32
  Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
40
33
   at node:internal/deps/undici/undici:16416:13
@@ -61,24 +54,16 @@ Browserslist: browsers data (caniuse-lite) is 9 months old. Please run:
61
54
  }
62
55
  }
63
56
 
57
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 41ms
64
58
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
65
59
  Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
66
60
 
67
- ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 139ms
68
- ✓  browser  test/sdk/product/useProductQuery.browser.test.ts (5 tests) 307ms
69
- ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 162ms
70
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (7 tests) 8ms
71
- ✓  browser  test/components/sections/Account/AccountOrderDetails.browser.test.tsx (4 tests) 135ms
72
- ✓  browser  test/components/navigation/Navbar.browser.test.tsx (3 tests) 66ms
73
- stderr | test/sdk/session/validateSession.browser.test.ts
74
- Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
75
- at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
76
- at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:124:9)
77
- at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
78
- at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
79
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
80
-
81
- ✓  browser  test/sdk/session/validateSession.browser.test.ts (9 tests) 51ms
61
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 78ms
62
+ ✓  browser  test/sdk/product/useProductQuery.browser.test.ts (5 tests) 322ms
63
+ ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 50ms
64
+ ✓  browser  test/components/sections/Account/AccountOrderDetails.browser.test.tsx (4 tests) 109ms
65
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (7 tests) 9ms
66
+ ✓  browser  test/components/navigation/Navbar.browser.test.tsx (3 tests) 72ms
82
67
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
83
68
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
84
69
 
@@ -116,6 +101,14 @@ act(() => {
116
101
  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
117
102
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
118
103
 
104
+ stderr | test/sdk/session/validateSession.browser.test.ts
105
+ Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
106
+ at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
107
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:124:9)
108
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
109
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
110
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
111
+
119
112
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > defaults returnTo to root and shows API validation errors
120
113
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
121
114
 
@@ -212,6 +205,7 @@ act(() => {
212
205
  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
213
206
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
214
207
 
208
+ ✓  browser  test/sdk/session/validateSession.browser.test.ts (9 tests) 26ms
215
209
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > shows service unavailable when the response is not a login payload
216
210
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
217
211
 
@@ -308,8 +302,9 @@ act(() => {
308
302
  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
309
303
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
310
304
 
311
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1081ms
312
- ✓ renders the password protection form  478ms
305
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 676ms
306
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (8 tests) 474ms
307
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (5 tests) 77ms
313
308
  stderr | test/components/cms/RenderSections.browser.test.tsx
314
309
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
315
310
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -318,12 +313,9 @@ This ensures that you're testing the behavior the user would see in the browser.
318
313
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
319
314
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
320
315
 
321
- ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (8 tests) 327ms
322
- ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (5 tests) 44ms
323
- ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 67ms
324
- ✓  browser  test/components/navigation/NavbarSlider.browser.test.tsx (2 tests) 44ms
325
- ✓  browser  test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts (3 tests) 36ms
326
- ✓  browser  test/components/account/Menu.browser.test.tsx (6 tests) 306ms
316
+ ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 58ms
317
+ ✓  browser  test/sdk/product/usePageProductsQuery.deliveryPromise.browser.test.ts (3 tests) 23ms
318
+ ✓  browser  test/components/navigation/NavbarSlider.browser.test.tsx (2 tests) 32ms
327
319
  stderr | test/sdk/localization/store-url.browser.test.ts
328
320
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
329
321
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -333,9 +325,9 @@ This ensures that you're testing the behavior the user would see in the browser.
333
325
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
334
326
 
335
327
  ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 5ms
336
- ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 33ms
337
- ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 37ms
338
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 128ms
328
+ ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 37ms
329
+ ✓  browser  test/components/account/Menu.browser.test.tsx (6 tests) 278ms
330
+ ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 23ms
339
331
  stderr | test/sdk/session/refreshTokenRoute.browser.test.ts
340
332
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
341
333
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -344,11 +336,12 @@ This ensures that you're testing the behavior the user would see in the browser.
344
336
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
345
337
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
346
338
 
347
- ✓  browser  test/sdk/session/refreshTokenRoute.browser.test.ts (3 tests) 8ms
348
- ✓  browser  test/components/sections/Account/AccountListQuotes.browser.test.tsx (4 tests) 122ms
349
- ✓  browser  test/components/navigation/NavbarAccountArea.browser.test.tsx (4 tests) 53ms
339
+ ✓  browser  test/sdk/session/refreshTokenRoute.browser.test.ts (3 tests) 7ms
340
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 129ms
341
+ ✓  browser  test/components/navigation/NavbarAccountArea.browser.test.tsx (4 tests) 38ms
342
+ ✓  browser  test/components/sections/Account/AccountListQuotes.browser.test.tsx (4 tests) 95ms
350
343
  ✓  browser  test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx (3 tests) 42ms
351
- ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 20ms
344
+ ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 15ms
352
345
  stderr | test/components/account/doLogout.browser.test.ts
353
346
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
354
347
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -357,12 +350,11 @@ This ensures that you're testing the behavior the user would see in the browser.
357
350
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
358
351
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
359
352
 
360
- ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 23ms
361
- ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (5 tests) 290ms
362
- ✓  browser  test/sdk/product/useProductNotFoundRedirect.browser.test.ts (7 tests) 31ms
363
- ✓  browser  test/sdk/account/useRefreshToken.browser.test.ts (4 tests) 138ms
364
- ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 51ms
365
- ✓  browser  test/components/account/OrganizationSignInButton.browser.test.tsx (4 tests) 211ms
353
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 14ms
354
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (5 tests) 228ms
355
+ ✓  browser  test/sdk/product/useProductNotFoundRedirect.browser.test.ts (7 tests) 32ms
356
+ ✓  browser  test/sdk/account/useRefreshToken.browser.test.ts (4 tests) 123ms
357
+ ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 35ms
366
358
  stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
367
359
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
368
360
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -372,12 +364,13 @@ This ensures that you're testing the behavior the user would see in the browser.
372
364
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
373
365
 
374
366
  ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (4 tests) 18ms
375
- ✓  browser  test/components/sections/Account/AccountOrderDelivery.browser.test.tsx (2 tests) 82ms
376
- ✓  browser  test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx (2 tests) 77ms
377
- ✓  browser  test/components/sections/Account/AccountOrderStatus.browser.test.tsx (3 tests) 119ms
378
- ✓  browser  test/components/region/useRegion.browser.test.ts (1 test) 25ms
379
- ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 88ms
380
- ✓  browser  test/components/sections/Account/AccountOrdersList.browser.test.tsx (2 tests) 27ms
367
+ ✓  browser  test/components/account/OrganizationSignInButton.browser.test.tsx (4 tests) 180ms
368
+ ✓  browser  test/components/sections/Account/AccountOrderDelivery.browser.test.tsx (2 tests) 67ms
369
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx (2 tests) 66ms
370
+ ✓  browser  test/components/sections/Account/AccountOrderStatus.browser.test.tsx (3 tests) 92ms
371
+ ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 68ms
372
+ ✓  browser  test/components/region/useRegion.browser.test.ts (1 test) 27ms
373
+ ✓  browser  test/components/sections/Account/AccountOrdersList.browser.test.tsx (2 tests) 15ms
381
374
  stderr | test/sdk/session/sessionStore.browser.test.ts
382
375
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
383
376
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -386,9 +379,9 @@ This ensures that you're testing the behavior the user would see in the browser.
386
379
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:357:23)
387
380
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
388
381
 
389
- ✓  browser  test/sdk/session/sessionStore.browser.test.ts (2 tests) 7ms
390
- ✓  browser  test/components/account/orders/SummaryCard.browser.test.tsx (2 tests) 81ms
391
- ✓  browser  test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx (1 test) 39ms
382
+ ✓  browser  test/sdk/session/sessionStore.browser.test.ts (2 tests) 6ms
383
+ ✓  browser  test/components/account/orders/SummaryCard.browser.test.tsx (2 tests) 62ms
384
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx (1 test) 30ms
392
385
  ✓  browser  test/utils/shouldBypassRefreshToken.browser.test.ts (5 tests) 5ms
393
386
  stderr | test/sdk/account/refreshToken.browser.test.ts
394
387
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
@@ -399,17 +392,17 @@ This ensures that you're testing the behavior the user would see in the browser.
399
392
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
400
393
 
401
394
  ✓  browser  test/sdk/account/refreshToken.browser.test.ts (2 tests) 5ms
402
- ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
403
- ✓  browser  test/components/account/orders/StatusCard.browser.test.tsx (2 tests) 106ms
404
- ✓  browser  test/components/account/orders/DeliveryCard.browser.test.tsx (1 test) 45ms
405
- ✓  browser  test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx (1 test) 40ms
406
- ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 40ms
407
- ✓  node  test/pages/api/switch-contract.test.ts (61 tests) 126ms
408
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 31ms
409
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 41ms
410
- ✓  browser  test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx (1 test) 172ms
411
- ✓  node  test/server/content/service.test.ts (27 tests) 36ms
412
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 17ms
395
+ ✓  browser  test/components/account/orders/StatusCard.browser.test.tsx (2 tests) 93ms
396
+ ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 2ms
397
+ ✓  browser  test/components/account/orders/DeliveryCard.browser.test.tsx (1 test) 34ms
398
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx (1 test) 33ms
399
+ ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 30ms
400
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 20ms
401
+ ✓  node  test/pages/api/switch-contract.test.ts (61 tests) 147ms
402
+ ✓  browser  test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx (1 test) 141ms
403
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 26ms
404
+ ✓  node  test/server/content/service.test.ts (27 tests) 28ms
405
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 11ms
413
406
  stderr | test/sdk/deliveryPromise/provider.effect.test.tsx > DeliveryPromiseProvider pickup fetch > clears the loading flag after a failed request and retries on the next update
414
407
  Failed to fetch pickup points: Error: network
415
408
  at /home/runner/work/faststore/faststore/packages/core/test/sdk/deliveryPromise/provider.effect.test.tsx:250:30
@@ -462,6 +455,13 @@ This ensures that you're testing the behavior the user would see in the browser.
462
455
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > omits the free-text message from the body in production
463
456
  Graphql execution returned with error: [ { message: 'invalid CEP', status: 400, type: 'BadRequestError' } ]
464
457
 
458
+ stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > uses the first recoverable FastStoreError when several errors exist
459
+ Graphql execution returned with error: [
460
+ { message: 'plain error', status: undefined, type: undefined },
461
+ { message: 'missing', status: 404, type: 'NotFoundError' },
462
+ { message: 'bad', status: 400, type: 'BadRequestError' }
463
+ ]
464
+
465
465
  stderr | test/sdk/deliveryPromise/provider.effect.test.tsx > DeliveryPromiseProvider pickup fetch > clears the simulated list when the next postal code fails
466
466
  Failed to fetch pickup points: Error: network
467
467
  at /home/runner/work/faststore/faststore/packages/core/test/sdk/deliveryPromise/provider.effect.test.tsx:332:30
@@ -475,13 +475,6 @@ This ensures that you're testing the behavior the user would see in the browser.
475
475
  at trace (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/test.B8ej_ZHS.js:239:21)
476
476
  at runTest (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:12)
477
477
 
478
- stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > uses the first recoverable FastStoreError when several errors exist
479
- Graphql execution returned with error: [
480
- { message: 'plain error', status: undefined, type: undefined },
481
- { message: 'missing', status: 404, type: 'NotFoundError' },
482
- { message: 'bad', status: 400, type: 'BadRequestError' }
483
- ]
484
-
485
478
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > sets cache-control: no-store on error responses so a bare 404/410 is not cached by intermediaries
486
479
  Graphql execution returned with error: [ { message: 'missing', status: 404, type: 'NotFoundError' } ]
487
480
 
@@ -545,7 +538,7 @@ This ensures that you're testing the behavior the user would see in the browser.
545
538
  at trace (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/test.B8ej_ZHS.js:239:21)
546
539
  at runTest (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:12)
547
540
 
548
- ✓  node  test/sdk/deliveryPromise/provider.effect.test.tsx (9 tests) 83ms
541
+ ✓  node  test/utils/match-url.test.ts (10 tests) 6ms
549
542
  stderr | test/pages/api/graphql.test.ts > /api/graphql ValidateSession refresh-token bypass > forces a 401 on the production host brandless.vtex.app
550
543
  Something unexpected occurred querying Graphql endpoint:
551
544
  le [FastStoreError]: Unauthorized: Token expired. Please login again or refresh the page.
@@ -564,7 +557,6 @@ This ensures that you're testing the behavior the user would see in the browser.
564
557
 
565
558
  stderr | test/pages/api/graphql.test.ts > /api/graphql ValidateSession refresh-token bypass > forces a 401 on the production host brandless.fast.store
566
559
  Something unexpected occurred querying Graphql endpoint:
567
- ✓  node  test/pages/api/graphql.test.ts (30 tests) 38ms
568
560
  le [FastStoreError]: Unauthorized: Token expired. Please login again or refresh the page.
569
561
  at assertValidateSessionTokenIsFresh (/home/runner/work/faststore/faststore/packages/core/src/pages/api/graphql.ts:295:11)
570
562
  at Module.handler (/home/runner/work/faststore/faststore/packages/core/src/pages/api/graphql.ts:372:5)
@@ -579,10 +571,11 @@ This ensures that you're testing the behavior the user would see in the browser.
579
571
  extensions: { status: 401, type: 'UnauthorizedError' }
580
572
  }
581
573
 
582
- ✓  node  test/utils/match-url.test.ts (10 tests) 9ms
583
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 137ms
584
- ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (14 tests) 12ms
585
- ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 10ms
574
+ ✓  node  test/sdk/deliveryPromise/provider.effect.test.tsx (9 tests) 62ms
575
+ ✓  node  test/pages/api/graphql.test.ts (30 tests) 27ms
576
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 104ms
577
+ ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (14 tests) 9ms
578
+ ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 5ms
586
579
  stderr | test/components/search/SearchInputComponent.test.tsx
587
580
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
588
581
 
@@ -646,96 +639,107 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
646
639
  at Suspense
647
640
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
648
641
 
649
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 69ms
650
- ✓  node  test/sdk/account/refreshToken.test.ts (21 tests) 13ms
651
- ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (15 tests) 413ms
652
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 45ms
642
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 57ms
643
+ ✓  node  test/sdk/account/refreshToken.test.ts (21 tests) 10ms
644
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (15 tests) 307ms
645
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 29ms
653
646
  stderr | test/pages/pvt/account/cards/index.test.ts > Cards page getServerSideProps > redirects to /pvt/account/403 when the query fails with 401/403
654
647
  { extensions: { status: 401 } }
655
648
 
656
649
  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
657
650
  { extensions: { status: 502 } }
658
651
 
659
- ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 8ms
660
- ✓  node  test/components/quotes/quoteFilters.test.ts (26 tests) 24ms
661
- ✓  node  test/utils/productJsonLd.test.ts (36 tests) 9ms
662
- ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (11 tests) 829ms
663
- ✓ navigates with the search term on blur  358ms
664
- ✓ navigates without a label param when the search is cleared  361ms
665
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 17ms
666
- ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 9ms
667
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 29ms
668
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 8ms
652
+ ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 6ms
653
+ ✓  node  test/components/quotes/quoteFilters.test.ts (26 tests) 18ms
654
+ ✓  node  test/utils/productJsonLd.test.ts (36 tests) 7ms
655
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 8ms
656
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (11 tests) 803ms
657
+ ✓ navigates with the search term on blur  357ms
658
+ ✓ navigates without a label param when the search is cleared  357ms
659
+ ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 8ms
660
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 18ms
661
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 5ms
669
662
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
670
663
  Set password request failed: Bad Request
671
664
 
672
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 39ms
673
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 44ms
674
- ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 7ms
675
- ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (8 tests) 160ms
676
- ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (14 tests) 153ms
677
- ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 8ms
678
- ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (10 tests) 93ms
679
- ✓  node  test/server/cms/index.test.ts (7 tests) 12ms
680
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (13 tests) 9ms
681
- ✓  node  test/server/content/promiseCache.test.ts (10 tests) 16ms
682
- ✓  node  test/sdk/redirects/index.test.ts (7 tests) 50ms
683
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 41ms
684
- ✓  node  test/proxy.localization.test.ts (5 tests) 34ms
685
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 43ms
686
- ✓  node  test/utils/trustedForwardedHost.test.ts (36 tests) 8ms
687
- ✓  node  test/components/account/orders/getDeliveryOptionLabel.test.ts (21 tests) 8ms
688
- ✓  node  test/sdk/graphql/retryPolicy.test.ts (18 tests) 22ms
689
- ✓  node  test/server/cms/myAccountDefaultSections.test.ts (9 tests) 10ms
690
- ✓  node  test/utils/productJsonLdRendering.test.tsx (5 tests) 10ms
691
- ✓  node  test/server/index.test.ts (7 tests) 669ms
692
- ✓  node  test/proxy.test.ts (4 tests) 17ms
693
- ✓  node  test/pages/api/logout.test.ts (4 tests) 23ms
694
- ✓  node  test/utils/shouldBypassRefreshToken.test.ts (14 tests) 7ms
695
- ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 46ms
696
- ✓  node  test/server/webops-api.test.ts (9 tests) 13ms
697
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 36ms
698
- ✓  node  test/components/account/orders/StatusCard.test.ts (3 tests) 23ms
699
- ✓  node  test/sdk/deliveryPromise/queries.test.ts (4 tests) 10ms
700
- ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 8ms
701
- ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 11ms
702
- ✓  node  test/server/cms/global.test.ts (3 tests) 5ms
703
- ✓  node  test/sdk/deliveryPromise/provider.test.ts (11 tests) 4ms
704
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 31ms
665
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 29ms
666
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 29ms
667
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 5ms
668
+ ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (8 tests) 93ms
669
+ ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (14 tests) 103ms
670
+ ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 9ms
671
+ ✓  node  test/server/cms/index.test.ts (7 tests) 15ms
672
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (13 tests) 7ms
673
+ ✓  node  test/server/content/promiseCache.test.ts (10 tests) 9ms
674
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (10 tests) 84ms
675
+ ✓  node  test/sdk/redirects/index.test.ts (7 tests) 45ms
676
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 31ms
677
+ ✓  node  test/proxy.localization.test.ts (5 tests) 35ms
678
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 34ms
679
+ ✓  node  test/utils/trustedForwardedHost.test.ts (36 tests) 7ms
680
+ ✓  node  test/components/account/orders/getDeliveryOptionLabel.test.ts (21 tests) 6ms
681
+ ✓  node  test/sdk/graphql/retryPolicy.test.ts (18 tests) 19ms
682
+ ✓  node  test/server/cms/myAccountDefaultSections.test.ts (9 tests) 5ms
683
+ ✓  node  test/utils/productJsonLdRendering.test.tsx (5 tests) 8ms
684
+ ✓  node  test/server/index.test.ts (7 tests) 839ms
685
+ ✓ should handle options and execute  472ms
686
+ ✓  node  test/proxy.test.ts (4 tests) 21ms
687
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 41ms
688
+ ✓  node  test/pages/api/logout.test.ts (4 tests) 20ms
689
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 29ms
690
+ ✓  node  test/utils/shouldBypassRefreshToken.test.ts (14 tests) 6ms
691
+ ✓  node  test/server/webops-api.test.ts (9 tests) 12ms
692
+ ✓  node  test/components/account/orders/StatusCard.test.ts (3 tests) 21ms
693
+ ✓  node  test/sdk/deliveryPromise/queries.test.ts (4 tests) 7ms
694
+ ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 3ms
695
+ ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 9ms
696
+ ✓  node  test/server/cms/global.test.ts (3 tests) 4ms
697
+ ✓  node  test/sdk/deliveryPromise/provider.test.ts (11 tests) 5ms
698
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 21ms
699
+ stderr | test/server/storeDirectives.test.ts > store directives through the core server > applies @auth from a store field and validates the session once
700
+ https://storeframework.vtexcommercestable.com.br/api/vtexid/credential/validate {
701
+ headers: { 'content-type': 'application/json', 'X-FORWARDED-HOST': '' },
702
+ body: '[redacted]',
703
+ method: 'POST'
704
+ } { status: 401, statusText: 'Unauthorized', headers: {} }
705
+
706
+ ✓  node  test/server/storeDirectives.test.ts (2 tests) 95ms
707
+ ✓  node  test/utils/mergeDiscoveryConfig.test.ts (8 tests) 8ms
708
+ ✓  node  test/server/rootSpan.test.ts (4 tests) 24ms
705
709
  ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 6ms
706
- ✓  node  test/components/account/Layout.test.tsx (6 tests) 72ms
707
- ✓  node  test/server/rootSpan.test.ts (4 tests) 48ms
708
- ✓  node  test/pages/api/preview.test.ts (2 tests) 11ms
709
- ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
710
- ✓  node  test/components/search/SearchInput.test.ts (6 tests) 7ms
711
- ✓  node  test/pages/pvt/account/403.test.ts (5 tests) 7ms
712
- ✓  node  test/components/region/useRegion.test.ts (1 test) 19ms
713
- ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 5ms
714
- ✓  node  test/utils/retry.test.ts (5 tests) 12ms
715
- ✓  node  test/sdk/account/getIsB2BBuyer.test.ts (7 tests) 6ms
716
- ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 4ms
717
- ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 191ms
710
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 5ms
711
+ ✓  node  test/components/search/SearchInput.test.ts (6 tests) 6ms
712
+ ✓  node  test/components/account/Layout.test.tsx (6 tests) 52ms
713
+ ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 3ms
714
+ ✓  node  test/pages/pvt/account/403.test.ts (5 tests) 4ms
715
+ ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 4ms
716
+ ✓  node  test/components/region/useRegion.test.ts (1 test) 15ms
717
+ ✓  node  test/sdk/account/getIsB2BBuyer.test.ts (7 tests) 4ms
718
+ ✓  node  test/utils/retry.test.ts (5 tests) 11ms
719
+ ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 3ms
720
+ ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 182ms
721
+ ✓  node  test/utils/subDomainPrefixWarning.test.ts (6 tests) 4ms
718
722
  ✓  node  test/utils/userOrderStatus.test.ts (4 tests) 4ms
719
- ✓  node  test/utils/unlockResponse.test.ts (11 tests) 6ms
720
- ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 5ms
721
- ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 46ms
723
+ ✓  node  test/utils/unlockResponse.test.ts (11 tests) 4ms
724
+ ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 3ms
725
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 40ms
722
726
  ✓  node  test/sdk/deliveryPromise/reducer.test.ts (2 tests) 4ms
727
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (4 tests) 26ms
723
728
  ✓  node  test/utils/isLocalHost.test.ts (7 tests) 4ms
724
- ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (4 tests) 44ms
725
729
  ✓  node  test/sdk/session/toSessionInput.test.ts (3 tests) 3ms
726
- ✓  node  test/components/account/orders/getOrderTotalLabel.test.ts (6 tests) 5ms
727
- ✓  node  test/components/account/orders/listOrdersLabels.test.ts (2 tests) 4ms
730
+ ✓  node  test/components/account/orders/getOrderTotalLabel.test.ts (6 tests) 2ms
731
+ ✓  node  test/components/account/orders/listOrdersLabels.test.ts (2 tests) 3ms
728
732
  ✓  node  test/utils/getCookie.test.ts (4 tests) 4ms
729
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 42ms
730
- ✓  node  test/sdk/session/isSignInAreaResolved.test.ts (3 tests) 4ms
731
- ✓  node  test/utils/filterChannel.test.ts (2 tests) 5ms
732
- ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 4ms
733
- ✓  node  test/instrumentation.test.ts (3 tests) 4ms
733
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 22ms
734
+ ✓  node  test/sdk/session/isSignInAreaResolved.test.ts (3 tests) 3ms
735
+ ✓  node  test/utils/filterChannel.test.ts (2 tests) 3ms
736
+ ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 3ms
737
+ ✓  node  test/instrumentation.test.ts (3 tests) 5ms
734
738
  ✓  node  test/components/account/orders/orderDetailsLabels.test.ts (1 test) 3ms
735
- ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 8ms
739
+ ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 7ms
736
740
 
737
-  Test Files  146 passed (146)
738
-  Tests  1249 passed (1249)
739
-  Start at  15:04:35
740
-  Duration  66.82s (transform 15.64s, setup 0ms, import 58.21s, tests 22.59s, environment 83.99s)
741
+  Test Files  149 passed (149)
742
+  Tests  1265 passed (1265)
743
+  Start at  15:46:31
744
+  Duration  53.00s (transform 12.00s, setup 0ms, import 47.46s, tests 18.78s, environment 64.60s)
741
745
 
@@ -56,7 +56,6 @@ export type Scalars = {
56
56
  */
57
57
  FormattedVariants: { input: any; output: any; }
58
58
  JSONObject: { input: any; output: any; }
59
- /** A string or the string representation of an object (a stringified object). */
60
59
  ObjectOrString: { input: any; output: any; }
61
60
  /**
62
61
  * Example:
@@ -691,9 +691,6 @@ type Mutation {
691
691
  startRecommendationSession: Boolean!
692
692
  }
693
693
 
694
- """
695
- A string or the string representation of an object (a stringified object).
696
- """
697
694
  scalar ObjectOrString
698
695
 
699
696
  """Newsletter information."""
package/AGENTS.md CHANGED
@@ -141,6 +141,13 @@ import { Icon } from '@faststore/ui'
141
141
 
142
142
  This project uses icons from [Phosphor Icons](https://phosphoricons.com/).
143
143
 
144
+ ## Discovery config merge
145
+
146
+ `discovery.config.js` merges the default config with the store's through `mergeDiscoveryConfig` (`src/utils/mergeDiscoveryConfig.js`), which works like `deepmerge`: arrays are concatenated. The one exception is `api.subDomainPrefix`:
147
+
148
+ - Not set, or any non-empty value: appended to the default `['www']`, so `www.` is always stripped from the host sent to Checkout.
149
+ - `[]`: replaces the default, so no prefix is stripped and Checkout cookies are set on the storefront host (e.g. `www.store.com`) instead of the root domain. A Checkout served from another host (`secureSubdomain`) does not receive them, and `next.config.js` warns about that setup.
150
+
144
151
  ## Tests
145
152
 
146
153
  `@faststore/core` separates tests by environment:
package/CHANGELOG.md CHANGED
@@ -3,6 +3,34 @@
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.11.3-dev.0](https://github.com/vtex/faststore/compare/v4.11.2...v4.11.3-dev.0) (2026-11-09)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **core:** let the store config override api.subDomainPrefix ([e0eeb07](https://github.com/vtex/faststore/commit/e0eeb0754b5ad75e20b3fe1ef0e16d3acb5f5b3b))
11
+ - **core:** move the subDomainPrefix warning to its own module ([cad5c20](https://github.com/vtex/faststore/commit/cad5c2084e335e7ec1e3404c6a078bd875949f86))
12
+ - **core:** only let an empty subDomainPrefix replace the default ([e2c0c0d](https://github.com/vtex/faststore/commit/e2c0c0d1d5e5c81ed149da9adcc9b3d8cc8a2c30))
13
+ - **core:** scope the subDomainPrefix override to api and warn on invalid URLs ([2f0e027](https://github.com/vtex/faststore/commit/2f0e0276f8d2bcd61a5047652ea6529ef127bdb9))
14
+ - **core:** use a Set for the overridden discovery config keys ([1d74a1e](https://github.com/vtex/faststore/commit/1d74a1eb4bf42f5e1dc85b851fecb534498c060e))
15
+
16
+ ## [4.11.2-dev.1](https://github.com/vtex/faststore/compare/v4.11.2-dev.0...v4.11.2-dev.1) (2026-11-05)
17
+
18
+ ## [4.11.2-dev.0](https://github.com/vtex/faststore/compare/v4.11.1...v4.11.2-dev.0) (2026-11-05)
19
+
20
+ ## [4.11.1-dev.1](https://github.com/vtex/faststore/compare/v4.11.1-dev.0...v4.11.1-dev.1) (2026-11-04)
21
+
22
+ ### Bug Fixes
23
+
24
+ - **api:** apply [@auth](https://github.com/auth) and [@cache](https://github.com/cache)Control to store schema extensions ([#3524](https://github.com/vtex/faststore/issues/3524)) ([f6abd0d](https://github.com/vtex/faststore/commit/f6abd0d4f7312794a4195ce693526b539550275e)), closes [#3111](https://github.com/vtex/faststore/issues/3111) [/github.com/vtex/faststore/pull/3524#issuecomment-6258456970](https://github.com//github.com/vtex/faststore/pull/3524/issues/issuecomment-6258456970) [#3111](https://github.com/vtex/faststore/issues/3111) [#3063](https://github.com/vtex/faststore/issues/3063)
25
+
26
+ ## [4.11.1-dev.0](https://github.com/vtex/faststore/compare/v4.11.0...v4.11.1-dev.0) (2026-11-03)
27
+
28
+ ## [4.10.3-dev.1](https://github.com/vtex/faststore/compare/v4.10.3-dev.0...v4.10.3-dev.1) (2026-10-29)
29
+
30
+ ## [4.10.3-dev.0](https://github.com/vtex/faststore/compare/v4.10.2...v4.10.3-dev.0) (2026-10-29)
31
+
32
+ ## [4.11.2-dev.1](https://github.com/vtex/faststore/compare/v4.11.2-dev.0...v4.11.2-dev.1) (2026-11-05)
33
+
6
34
  ## [4.11.2](https://github.com/vtex/faststore/compare/v4.11.1...v4.11.2) (2026-11-09)
7
35
 
8
36
  **Note:** Version bump only for package @faststore/core
@@ -11,6 +39,42 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
39
 
12
40
  **Note:** Version bump only for package @faststore/core
13
41
 
42
+ ## [4.11.2-dev.0](https://github.com/vtex/faststore/compare/v4.11.1...v4.11.2-dev.0) (2026-11-05)
43
+
44
+ ## [4.11.1-dev.1](https://github.com/vtex/faststore/compare/v4.11.1-dev.0...v4.11.1-dev.1) (2026-11-04)
45
+
46
+ ### Bug Fixes
47
+
48
+ - **api:** apply [@auth](https://github.com/auth) and [@cache](https://github.com/cache)Control to store schema extensions ([#3524](https://github.com/vtex/faststore/issues/3524)) ([f6abd0d](https://github.com/vtex/faststore/commit/f6abd0d4f7312794a4195ce693526b539550275e)), closes [#3111](https://github.com/vtex/faststore/issues/3111) [/github.com/vtex/faststore/pull/3524#issuecomment-6258456970](https://github.com//github.com/vtex/faststore/pull/3524/issues/issuecomment-6258456970) [#3111](https://github.com/vtex/faststore/issues/3111) [#3063](https://github.com/vtex/faststore/issues/3063)
49
+
50
+ ## [4.11.1-dev.0](https://github.com/vtex/faststore/compare/v4.11.0...v4.11.1-dev.0) (2026-11-03)
51
+
52
+ ## [4.10.3-dev.1](https://github.com/vtex/faststore/compare/v4.10.3-dev.0...v4.10.3-dev.1) (2026-10-29)
53
+
54
+ ## [4.10.3-dev.0](https://github.com/vtex/faststore/compare/v4.10.2...v4.10.3-dev.0) (2026-10-29)
55
+
56
+ ## [4.11.1-dev.1](https://github.com/vtex/faststore/compare/v4.11.1-dev.0...v4.11.1-dev.1) (2026-11-04)
57
+
58
+ ### Bug Fixes
59
+
60
+ - **api:** apply [@auth](https://github.com/auth) and [@cache](https://github.com/cache)Control to store schema extensions ([#3524](https://github.com/vtex/faststore/issues/3524)) ([f6abd0d](https://github.com/vtex/faststore/commit/f6abd0d4f7312794a4195ce693526b539550275e)), closes [#3111](https://github.com/vtex/faststore/issues/3111) [/github.com/vtex/faststore/pull/3524#issuecomment-6258456970](https://github.com//github.com/vtex/faststore/pull/3524/issues/issuecomment-6258456970) [#3111](https://github.com/vtex/faststore/issues/3111) [#3063](https://github.com/vtex/faststore/issues/3063)
61
+
62
+ ## [4.11.1-dev.0](https://github.com/vtex/faststore/compare/v4.11.0...v4.11.1-dev.0) (2026-11-03)
63
+
64
+ ## [4.10.3-dev.1](https://github.com/vtex/faststore/compare/v4.10.3-dev.0...v4.10.3-dev.1) (2026-10-29)
65
+
66
+ ## [4.10.3-dev.0](https://github.com/vtex/faststore/compare/v4.10.2...v4.10.3-dev.0) (2026-10-29)
67
+
68
+ **Note:** Version bump only for package @faststore/core
69
+
70
+ ## [4.10.3-dev.1](https://github.com/vtex/faststore/compare/v4.10.3-dev.0...v4.10.3-dev.1) (2026-10-29)
71
+
72
+ **Note:** Version bump only for package @faststore/core
73
+
74
+ ## [4.10.3-dev.0](https://github.com/vtex/faststore/compare/v4.10.2...v4.10.3-dev.0) (2026-10-29)
75
+
76
+ ## [4.11.1](https://github.com/vtex/faststore/compare/v4.11.0...v4.11.1) (2026-11-05)
77
+
14
78
  # [4.11.0](https://github.com/vtex/faststore/compare/v4.10.3...v4.11.0) (2026-11-03)
15
79
 
16
80
  ### Features
@@ -1,15 +1,18 @@
1
1
  const defaultConfig = require('./discovery.config.default')
2
2
  const starterConfig = require('./src/customizations/discovery.config')
3
3
 
4
- const deepmerge = require('deepmerge')
4
+ const { mergeDiscoveryConfig } = require('./src/utils/mergeDiscoveryConfig')
5
5
 
6
6
  /**
7
7
  * @type {typeof defaultConfig & Record<string, any>}
8
8
  * */
9
- let finalConfig = deepmerge(defaultConfig, starterConfig)
9
+ let finalConfig = mergeDiscoveryConfig(defaultConfig, starterConfig)
10
10
 
11
11
  try {
12
- finalConfig = deepmerge(finalConfig, require('./discovery.config.local'))
12
+ finalConfig = mergeDiscoveryConfig(
13
+ finalConfig,
14
+ require('./discovery.config.local')
15
+ )
13
16
  } catch (error) {
14
17
  if (error?.code !== 'MODULE_NOT_FOUND') {
15
18
  throw error
package/next.config.js CHANGED
@@ -1,5 +1,8 @@
1
1
  const path = require('node:path')
2
2
  const storeConfig = require('./discovery.config')
3
+ const {
4
+ getSubDomainPrefixWarning,
5
+ } = require('./src/utils/subDomainPrefixWarning')
3
6
  const { buildI18nDomains } = require('./scripts/i18n')
4
7
 
5
8
  // Load locales settings (generated by CLI during build)
@@ -16,6 +19,9 @@ console.log(`
16
19
  AccountID: ${storeConfig.api?.storeId ?? 'Unknown'}
17
20
  `)
18
21
 
22
+ const subDomainPrefixWarning = getSubDomainPrefixWarning(storeConfig)
23
+ if (subDomainPrefixWarning) console.warn(subDomainPrefixWarning)
24
+
19
25
  /**
20
26
  * @type {import('next').NextConfig}
21
27
  * */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "4.11.2",
3
+ "version": "4.11.3-dev.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,7 @@
15
15
  "./experimental/server": "./src/experimental/server/index.ts"
16
16
  },
17
17
  "engines": {
18
- "node": ">=20"
18
+ "node": ">=20.9.0"
19
19
  },
20
20
  "publishConfig": {
21
21
  "access": "public"
@@ -60,22 +60,21 @@
60
60
  "isomorphic-unfetch": "^3.1.0",
61
61
  "jose": "^6.2.3",
62
62
  "lexical": "^0.34.0",
63
- "next": "^16.2.6",
63
+ "next": "^16.4.3",
64
64
  "next-seo": "^6.6.0",
65
65
  "postcss": "^8.4.4",
66
66
  "prettier": "^2.2.0",
67
67
  "react-intersection-observer": "^8.32.5",
68
68
  "sass": "^1.97.0",
69
69
  "sass-loader": "^12.6.0",
70
- "sharp": "^0.32.6",
71
70
  "style-loader": "^3.3.1",
72
71
  "swr": "^2.2.5",
73
72
  "use-sync-external-store": "^1.6.0",
74
- "@faststore/diagnostics": "4.11.2",
75
- "@faststore/lighthouse": "4.11.2",
76
- "@faststore/sdk": "4.11.2",
77
- "@faststore/ui": "4.11.2",
78
- "@faststore/api": "4.11.2"
73
+ "@faststore/api": "4.11.3-dev.0",
74
+ "@faststore/lighthouse": "4.11.3-dev.0",
75
+ "@faststore/sdk": "4.11.3-dev.0",
76
+ "@faststore/ui": "4.11.3-dev.0",
77
+ "@faststore/diagnostics": "4.11.3-dev.0"
79
78
  },
80
79
  "devDependencies": {
81
80
  "@cypress/code-coverage": "^3.12.1",
@@ -15,6 +15,7 @@ import {
15
15
  GraphqlVtexContextFactory,
16
16
  GraphqlVtexSchema,
17
17
  isFastStoreError,
18
+ platformTypeDefs,
18
19
  } from '@faststore/api'
19
20
  import { OTELAPI } from '@faststore/diagnostics'
20
21
  import { loadFilesSync } from '@graphql-tools/load-files'
@@ -57,10 +58,11 @@ function loadGeneratedSchema(): TypeSource {
57
58
  }
58
59
 
59
60
  export function getFinalAPISchema() {
60
- const finalTypeDefs = mergeTypeDefs([
61
- GraphqlVtexSchema(),
62
- loadGeneratedSchema(),
63
- ])
61
+ // `platformTypeDefs` is the native SDL plus the directive definitions.
62
+ // Building `GraphqlVtexSchema()` here would run the transformers and throw
63
+ // the result away: this value is only merged as type definitions, and the
64
+ // call below applies the transformers once.
65
+ const finalTypeDefs = mergeTypeDefs([platformTypeDefs, loadGeneratedSchema()])
64
66
 
65
67
  const schema = makeExecutableSchema({
66
68
  typeDefs: finalTypeDefs,
@@ -0,0 +1,23 @@
1
+ const deepmerge = require('deepmerge')
2
+
3
+ /**
4
+ * Merges discovery configs like `deepmerge`, except that an empty
5
+ * `api.subDomainPrefix` replaces the default instead of being appended to it.
6
+ *
7
+ * deepmerge concatenates arrays, so the default `['www']` is always kept. An
8
+ * empty array is how a store asks for no prefix to be stripped from the host
9
+ * sent to Checkout. Any other value is still appended to the default, as
10
+ * before, to keep the current behavior of existing stores.
11
+ */
12
+ function mergeDiscoveryConfig(target, source) {
13
+ const merged = deepmerge(target, source)
14
+ const subDomainPrefix = source?.api?.subDomainPrefix
15
+
16
+ if (Array.isArray(subDomainPrefix) && subDomainPrefix.length === 0) {
17
+ merged.api.subDomainPrefix = []
18
+ }
19
+
20
+ return merged
21
+ }
22
+
23
+ module.exports = { mergeDiscoveryConfig }
@@ -0,0 +1,46 @@
1
+ const getHostname = (url) => {
2
+ try {
3
+ return new URL(url).hostname
4
+ } catch {
5
+ return undefined
6
+ }
7
+ }
8
+
9
+ /**
10
+ * With `api.subDomainPrefix: []`, Checkout cookies are set on the storefront
11
+ * host only, so a checkout served from another host (`secureSubdomain`) does
12
+ * not receive them. Returns a warning for that setup, or `undefined`.
13
+ */
14
+ function getSubDomainPrefixWarning(config) {
15
+ const prefixes = config?.api?.subDomainPrefix
16
+
17
+ if (!Array.isArray(prefixes) || prefixes.length > 0) {
18
+ return undefined
19
+ }
20
+
21
+ const invalidUrls = ['storeUrl', 'secureSubdomain'].filter(
22
+ (key) => config[key] && !getHostname(config[key])
23
+ )
24
+
25
+ if (invalidUrls.length > 0) {
26
+ return (
27
+ `[FastStore] api.subDomainPrefix is [], but ${invalidUrls.join(' and ')} could not be parsed as a URL, ` +
28
+ `so it was not possible to check where Checkout cookies are sent. Use a full URL (e.g. https://www.store.com).`
29
+ )
30
+ }
31
+
32
+ const storeHost = getHostname(config.storeUrl)
33
+ const secureHost = getHostname(config.secureSubdomain)
34
+
35
+ if (!storeHost || !secureHost || storeHost === secureHost) {
36
+ return undefined
37
+ }
38
+
39
+ return (
40
+ `[FastStore] api.subDomainPrefix is [], so Checkout cookies are set on ${storeHost} only ` +
41
+ `and are not sent to the secureSubdomain (${secureHost}). If the checkout runs on ${secureHost}, ` +
42
+ `remove api.subDomainPrefix or set it to the prefixes to strip (e.g. ['www']).`
43
+ )
44
+ }
45
+
46
+ module.exports = { getSubDomainPrefixWarning }
@@ -0,0 +1,89 @@
1
+ import { stringifyCacheControl } from '@faststore/api'
2
+ import { beforeEach, describe, expect, it, vi } from 'vitest'
3
+
4
+ import { execute } from '../../src/server'
5
+
6
+ const probeResolvers = vi.hoisted(() => ({
7
+ Query: {
8
+ probeAuth: vi.fn(() => 'auth-ok'),
9
+ probeCache: vi.fn(() => 'cache-ok'),
10
+ },
11
+ }))
12
+
13
+ const fetchMock = vi.hoisted(() => vi.fn())
14
+
15
+ vi.mock('../../src/customizations/src/graphql/thirdParty/resolvers', () => ({
16
+ default: probeResolvers,
17
+ }))
18
+
19
+ vi.mock('isomorphic-unfetch', () => ({
20
+ default: (...args: unknown[]) => fetchMock(...args),
21
+ }))
22
+
23
+ vi.mock('@graphql-tools/load-files', () => ({
24
+ loadFilesSync: () => [
25
+ /* GraphQL */ `
26
+ extend type Query {
27
+ probeAuth: String @auth
28
+ probeCache: String
29
+ @cacheControl(scope: "private", sMaxAge: 7, staleWhileRevalidate: 11)
30
+ }
31
+ `,
32
+ ],
33
+ }))
34
+
35
+ const operation = (operationName: string, query: string) => ({
36
+ variables: {},
37
+ query,
38
+ operation: {
39
+ __meta__: { operationName, operationHash: operationName },
40
+ },
41
+ })
42
+
43
+ describe('store directives through the core server', () => {
44
+ beforeEach(() => {
45
+ probeResolvers.Query.probeAuth.mockClear()
46
+ probeResolvers.Query.probeCache.mockClear()
47
+ fetchMock.mockReset()
48
+ fetchMock.mockResolvedValue({
49
+ ok: false,
50
+ status: 401,
51
+ statusText: 'Unauthorized',
52
+ headers: new Headers(),
53
+ text: async () => 'unauthorized',
54
+ json: async () => ({}),
55
+ })
56
+ })
57
+
58
+ it('applies @cacheControl from a store field to the response extensions', async () => {
59
+ const result = await execute(
60
+ operation('ProbeCacheQuery', 'query ProbeCacheQuery { probeCache }')
61
+ )
62
+
63
+ expect(result.errors).toBeUndefined()
64
+ expect(result.data).toEqual({ probeCache: 'cache-ok' })
65
+ expect(result.extensions.cacheControl).toEqual({
66
+ scope: 'private',
67
+ sMaxAge: 7,
68
+ staleWhileRevalidate: 11,
69
+ })
70
+ expect(
71
+ stringifyCacheControl(result.extensions.cacheControl ?? {}, false)
72
+ ).toBe('private, s-maxage=7, stale-while-revalidate=11')
73
+ })
74
+
75
+ it('applies @auth from a store field and validates the session once', async () => {
76
+ const result = await execute(
77
+ operation('ProbeAuthQuery', 'query ProbeAuthQuery { probeAuth }')
78
+ )
79
+
80
+ expect(result.data).toEqual({ probeAuth: null })
81
+ expect(result.errors?.length).toBeGreaterThan(0)
82
+ expect(probeResolvers.Query.probeAuth).not.toHaveBeenCalled()
83
+ expect(
84
+ fetchMock.mock.calls.filter(([url]) =>
85
+ String(url).includes('/api/vtexid/credential/validate')
86
+ )
87
+ ).toHaveLength(1)
88
+ })
89
+ })
@@ -0,0 +1,73 @@
1
+ import { describe, expect, it } from 'vitest'
2
+ import defaultConfig from '../../discovery.config.default'
3
+ import { mergeDiscoveryConfig } from '../../src/utils/mergeDiscoveryConfig'
4
+
5
+ describe('mergeDiscoveryConfig', () => {
6
+ describe('api.subDomainPrefix', () => {
7
+ it('keeps the default when the store does not set it', () => {
8
+ const config = mergeDiscoveryConfig(defaultConfig, {
9
+ api: { storeId: 'store' },
10
+ })
11
+
12
+ expect(config.api.subDomainPrefix).toEqual(['www'])
13
+ })
14
+
15
+ it('lets the store clear the prefixes with an empty array', () => {
16
+ const config = mergeDiscoveryConfig(defaultConfig, {
17
+ api: { subDomainPrefix: [] },
18
+ })
19
+
20
+ expect(config.api.subDomainPrefix).toEqual([])
21
+ })
22
+
23
+ it('keeps appending non-empty arrays to the default', () => {
24
+ const config = mergeDiscoveryConfig(defaultConfig, {
25
+ api: { subDomainPrefix: ['shop'] },
26
+ })
27
+
28
+ expect(config.api.subDomainPrefix).toEqual(['www', 'shop'])
29
+ })
30
+
31
+ it('applies to every merge in the chain', () => {
32
+ const storeConfig = mergeDiscoveryConfig(defaultConfig, {
33
+ api: { subDomainPrefix: ['shop'] },
34
+ })
35
+ const config = mergeDiscoveryConfig(storeConfig, {
36
+ api: { subDomainPrefix: [] },
37
+ })
38
+
39
+ expect(config.api.subDomainPrefix).toEqual([])
40
+ })
41
+ })
42
+
43
+ it('keeps merging the other api fields', () => {
44
+ const config = mergeDiscoveryConfig(defaultConfig, {
45
+ api: { storeId: 'store', subDomainPrefix: [] },
46
+ })
47
+
48
+ expect(config.api.storeId).toBe('store')
49
+ expect(config.api.environment).toBe(defaultConfig.api.environment)
50
+ })
51
+
52
+ it('keeps concatenating the other arrays', () => {
53
+ const config = mergeDiscoveryConfig({ list: ['a'] }, { list: [] })
54
+
55
+ expect(config.list).toEqual(['a'])
56
+ })
57
+
58
+ it('only clears subDomainPrefix under api', () => {
59
+ const config = mergeDiscoveryConfig(
60
+ { api: { subDomainPrefix: ['www'] }, other: { subDomainPrefix: ['a'] } },
61
+ { api: { subDomainPrefix: [] }, other: { subDomainPrefix: [] } }
62
+ )
63
+
64
+ expect(config.api.subDomainPrefix).toEqual([])
65
+ expect(config.other.subDomainPrefix).toEqual(['a'])
66
+ })
67
+
68
+ it('does not mutate the default config', () => {
69
+ mergeDiscoveryConfig(defaultConfig, { api: { subDomainPrefix: [] } })
70
+
71
+ expect(defaultConfig.api.subDomainPrefix).toEqual(['www'])
72
+ })
73
+ })
@@ -0,0 +1,49 @@
1
+ import { describe, expect, it } from 'vitest'
2
+ import { getSubDomainPrefixWarning } from '../../src/utils/subDomainPrefixWarning'
3
+
4
+ describe('getSubDomainPrefixWarning', () => {
5
+ const store = (
6
+ subDomainPrefix: string[] | undefined,
7
+ secureSubdomain: string,
8
+ storeUrl = 'https://www.store.com'
9
+ ) => ({ storeUrl, secureSubdomain, api: { subDomainPrefix } })
10
+
11
+ it('warns when the prefixes are cleared and checkout is on another host', () => {
12
+ expect(
13
+ getSubDomainPrefixWarning(store([], 'https://secure.store.com'))
14
+ ).toContain('secure.store.com')
15
+ })
16
+
17
+ it('does not warn when checkout is on the storefront host', () => {
18
+ expect(
19
+ getSubDomainPrefixWarning(store([], 'https://www.store.com'))
20
+ ).toBeUndefined()
21
+ })
22
+
23
+ it('does not warn when the store keeps any prefix', () => {
24
+ expect(
25
+ getSubDomainPrefixWarning(store(['www'], 'https://secure.store.com'))
26
+ ).toBeUndefined()
27
+ expect(
28
+ getSubDomainPrefixWarning(store(undefined, 'https://secure.store.com'))
29
+ ).toBeUndefined()
30
+ })
31
+
32
+ it('does not warn when secureSubdomain is not set', () => {
33
+ expect(getSubDomainPrefixWarning(store([], ''))).toBeUndefined()
34
+ })
35
+
36
+ it('warns when secureSubdomain is not a valid URL', () => {
37
+ expect(getSubDomainPrefixWarning(store([], 'secure.store.com'))).toContain(
38
+ 'secureSubdomain could not be parsed'
39
+ )
40
+ })
41
+
42
+ it('warns when storeUrl is not a valid URL', () => {
43
+ expect(
44
+ getSubDomainPrefixWarning(
45
+ store([], 'https://secure.store.com', 'www.store.com')
46
+ )
47
+ ).toContain('storeUrl could not be parsed')
48
+ })
49
+ })