@faststore/core 4.8.1-dev.1 → 4.8.1-dev.2

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.
Files changed (37) hide show
  1. package/.turbo/turbo-generate.log +3 -3
  2. package/.turbo/turbo-test.log +126 -123
  3. package/@generated/gql.ts +3 -3
  4. package/@generated/graphql.ts +4 -2
  5. package/@generated/persisted-documents.json +1 -1
  6. package/@generated/schema.graphql +4 -0
  7. package/CHANGELOG.md +6 -0
  8. package/package.json +6 -6
  9. package/src/components/account/Drawer/OrganizationDrawer/ContractSwitcher/ContractSwitcher.tsx +4 -6
  10. package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawer.tsx +18 -3
  11. package/src/components/account/Drawer/OrganizationDrawer/OrganizationDrawerHeader.tsx +1 -0
  12. package/src/components/account/Drawer/OrganizationDrawer/section.module.scss +7 -0
  13. package/src/components/account/Drawer/OrganizationSignInButton/OrganizationSignInButton.tsx +7 -9
  14. package/src/components/account/Menu/Menu.tsx +24 -7
  15. package/src/components/navigation/Navbar/Navbar.tsx +17 -19
  16. package/src/components/navigation/Navbar/NavbarAccountArea.tsx +57 -0
  17. package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +16 -18
  18. package/src/pages/api/fs/switch-contract.ts +194 -0
  19. package/src/sdk/account/changeContractToken.ts +19 -63
  20. package/src/sdk/account/clearPersistedSessionState.ts +13 -7
  21. package/src/sdk/account/useAvailableContracts.ts +1 -0
  22. package/src/sdk/account/useSwitchContract.ts +11 -3
  23. package/src/sdk/session/index.ts +2 -1
  24. package/src/sdk/session/isSignInAreaResolved.ts +12 -0
  25. package/test/components/account/ContractSwitcher.browser.test.tsx +42 -0
  26. package/test/components/account/Menu.browser.test.tsx +123 -0
  27. package/test/components/account/OrganizationDrawer.browser.test.tsx +148 -0
  28. package/test/components/account/OrganizationDrawerHeader.browser.test.tsx +2 -0
  29. package/test/components/account/OrganizationSignInButton.browser.test.tsx +49 -0
  30. package/test/components/navigation/Navbar.browser.test.tsx +183 -0
  31. package/test/components/navigation/NavbarAccountArea.browser.test.tsx +115 -0
  32. package/test/components/navigation/NavbarSlider.browser.test.tsx +143 -0
  33. package/test/pages/api/switch-contract.test.ts +385 -0
  34. package/test/sdk/account/changeContractToken.browser.test.ts +23 -71
  35. package/test/sdk/account/clearPersistedSessionState.browser.test.ts +24 -0
  36. package/test/sdk/account/useSwitchContract.browser.test.ts +21 -0
  37. package/test/sdk/session/isSignInAreaResolved.test.ts +22 -0
@@ -1,9 +1,9 @@
1
1
 
2
- > @faststore/core@4.8.1-dev.0 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.8.1-dev.1 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.8.1-dev.0 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.8.1-dev.1 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.8.1-dev.0 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.8.1-dev.1 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,29 +1,29 @@
1
1
 
2
- > @faststore/core@4.8.1-dev.0 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.8.1-dev.1 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.18 /home/runner/work/faststore/faststore/packages/core
7
7
 
8
+ Not implemented: navigation to another Document
9
+ Not implemented: navigation to another Document
8
10
  Browserslist: browsers data (caniuse-lite) is 7 months old. Please run:
9
11
  npx update-browserslist-db@latest
10
12
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
11
- Not implemented: navigation to another Document
12
- Not implemented: navigation to another Document
13
- ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 938ms
14
- ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (16 tests) 2653ms
15
- ✓ shows the tab bar and renders Personal cards by default  1313ms
16
- ✓  browser  test/components/account/orders/BuyingPolicyAlert.browser.test.tsx (13 tests) 2856ms
17
- ✓ opens the reject confirmation modal with the default English copy  928ms
18
- ✓ opens the reject confirmation modal with CMS-provided labels  408ms
19
- ✓ shows the default English error toast when rejecting a policy fails  319ms
20
- ✓ shows the CMS-provided error toast when rejecting a policy fails  307ms
21
- ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 458ms
22
- ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 180ms
23
- ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 2280ms
24
- ✓ shows an error state when the list fails to load  597ms
25
- ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  355ms
26
- ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 156ms
13
+ ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 1066ms
14
+ ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (16 tests) 2228ms
15
+ ✓ shows the tab bar and renders Personal cards by default  862ms
16
+ ✓ paginates when there are more than 25 cards  310ms
17
+ ✓  browser  test/components/account/orders/BuyingPolicyAlert.browser.test.tsx (13 tests) 2131ms
18
+ ✓ opens the reject confirmation modal with the default English copy  850ms
19
+ ✓ opens the reject confirmation modal with CMS-provided labels  365ms
20
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 208ms
21
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (14 tests) 1758ms
22
+ ✓ shows an error state when the list fails to load  667ms
23
+ ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (10 tests) 1228ms
24
+ ✓ renders the menu view with contract details and manage footer  613ms
25
+ ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 106ms
26
+ ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 93ms
27
27
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
28
28
  Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
29
29
   at node:internal/deps/undici/undici:16416:13
@@ -53,11 +53,11 @@ Not implemented: navigation to another Document
53
53
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
54
54
  Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
55
55
 
56
- ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 219ms
57
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 33ms
58
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 70ms
59
- ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 67ms
60
- ✓  browser  test/components/sections/Account/AccountOrderDetails.browser.test.tsx (4 tests) 79ms
56
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 133ms
57
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 18ms
58
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 38ms
59
+ ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 97ms
60
+ ✓  browser  test/components/sections/Account/AccountOrderDetails.browser.test.tsx (4 tests) 49ms
61
61
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
62
62
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
63
63
 
@@ -95,6 +95,8 @@ act(() => {
95
95
  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
96
96
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
97
97
 
98
+ ✓  browser  test/components/navigation/Navbar.browser.test.tsx (3 tests) 46ms
99
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 7ms
98
100
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > defaults returnTo to root and shows API validation errors
99
101
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
100
102
 
@@ -287,13 +289,8 @@ act(() => {
287
289
  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
288
290
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
289
291
 
290
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 971ms
291
- ✓ renders the password protection form  376ms
292
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 8ms
293
- ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 946ms
294
- ✓ renders the menu view with contract details and manage footer  477ms
295
- ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 20ms
296
- ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (8 tests) 334ms
292
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 420ms
293
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (5 tests) 34ms
297
294
  stderr | test/components/cms/RenderSections.browser.test.tsx
298
295
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
299
296
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -302,6 +299,9 @@ This ensures that you're testing the behavior the user would see in the browser.
302
299
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
303
300
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
304
301
 
302
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (8 tests) 263ms
303
+ ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 66ms
304
+ ✓  browser  test/components/navigation/NavbarSlider.browser.test.tsx (2 tests) 33ms
305
305
  stderr | test/sdk/localization/store-url.browser.test.ts
306
306
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
307
307
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -310,12 +310,14 @@ This ensures that you're testing the behavior the user would see in the browser.
310
310
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
311
311
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
312
312
 
313
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 8ms
314
- ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 31ms
315
- ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 85ms
316
- ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 41ms
313
+ ✓  browser  test/components/account/Menu.browser.test.tsx (6 tests) 252ms
314
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 5ms
315
+ ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 32ms
316
+ ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 31ms
317
317
  ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 129ms
318
- ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 45ms
318
+ ✓  browser  test/components/navigation/NavbarAccountArea.browser.test.tsx (4 tests) 49ms
319
+ ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 17ms
320
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx (3 tests) 35ms
319
321
  stderr | test/components/account/doLogout.browser.test.ts
320
322
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
321
323
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -324,17 +326,7 @@ This ensures that you're testing the behavior the user would see in the browser.
324
326
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
325
327
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
326
328
 
327
- ✓  browser  test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx (3 tests) 49ms
328
- ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 24ms
329
- ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 48ms
330
- ✓  browser  test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx (2 tests) 63ms
331
- ✓  browser  test/components/sections/Account/AccountOrderDelivery.browser.test.tsx (2 tests) 115ms
332
- ✓  browser  test/components/sections/Account/AccountOrderStatus.browser.test.tsx (3 tests) 97ms
333
- ✓  browser  test/components/sections/Account/AccountOrdersList.browser.test.tsx (2 tests) 30ms
334
- ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 68ms
335
- ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 274ms
336
- ✓  browser  test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx (1 test) 41ms
337
- ✓  browser  test/components/account/orders/SummaryCard.browser.test.tsx (2 tests) 84ms
329
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 15ms
338
330
  stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
339
331
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
340
332
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -343,13 +335,23 @@ This ensures that you're testing the behavior the user would see in the browser.
343
335
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
344
336
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
345
337
 
346
- ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 7ms
347
- ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 3ms
348
- ✓  browser  test/components/account/orders/StatusCard.browser.test.tsx (2 tests) 93ms
338
+ ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (4 tests) 16ms
339
+ ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 29ms
340
+ ✓  browser  test/components/sections/Account/AccountOrderDelivery.browser.test.tsx (2 tests) 83ms
341
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordion.browser.test.tsx (2 tests) 71ms
342
+ ✓  browser  test/components/sections/Account/AccountOrderStatus.browser.test.tsx (3 tests) 88ms
343
+ ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 61ms
344
+ ✓  browser  test/components/sections/Account/AccountOrdersList.browser.test.tsx (2 tests) 30ms
345
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 218ms
346
+ ✓  browser  test/components/account/orders/SummaryCard.browser.test.tsx (2 tests) 61ms
347
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordionDeliveryInfo.browser.test.tsx (1 test) 34ms
348
+ ✓  browser  test/components/account/OrganizationSignInButton.browser.test.tsx (2 tests) 194ms
349
+ ✓  browser  test/components/account/orders/StatusCard.browser.test.tsx (2 tests) 87ms
350
+ ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 4ms
349
351
  ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
350
- ✓  browser  test/components/account/orders/DeliveryCard.browser.test.tsx (1 test) 49ms
351
- ✓  browser  test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx (1 test) 47ms
352
- ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 34ms
352
+ ✓  browser  test/components/account/orders/DeliveryOptionAccordionProducts.browser.test.tsx (1 test) 33ms
353
+ ✓  browser  test/components/account/orders/DeliveryCard.browser.test.tsx (1 test) 38ms
354
+ ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 32ms
353
355
  ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 20ms
354
356
  stderr | test/sdk/account/refreshToken.browser.test.ts
355
357
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
@@ -359,13 +361,14 @@ This ensures that you're testing the behavior the user would see in the browser.
359
361
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
360
362
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
361
363
 
362
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 32ms
363
364
  ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 5ms
364
- ✓  node  test/utils/match-url.test.ts (10 tests) 10ms
365
- ✓  browser  test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx (1 test) 196ms
366
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 15ms
367
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 153ms
368
- ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 9ms
365
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 43ms
366
+ ✓  node  test/pages/api/switch-contract.test.ts (25 tests) 67ms
367
+ ✓  browser  test/components/account/orders/FilterFacetPendingApproval.browser.test.tsx (1 test) 160ms
368
+ ✓  node  test/utils/match-url.test.ts (10 tests) 7ms
369
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 109ms
370
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 13ms
371
+ ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 11ms
369
372
  stderr | test/components/search/SearchInputComponent.test.tsx
370
373
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
371
374
 
@@ -429,16 +432,16 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
429
432
  at Suspense
430
433
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
431
434
 
432
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 82ms
433
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 49ms
434
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 18ms
435
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 58ms
436
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 37ms
437
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 10ms
435
438
  stderr | test/pages/pvt/account/cards/index.test.ts > Cards page getServerSideProps > redirects to /pvt/account/403 when the query fails with 401/403
436
439
  { extensions: { status: 401 } }
437
440
 
438
441
  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
439
442
  { extensions: { status: 502 } }
440
443
 
441
- ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 12ms
444
+ ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 7ms
442
445
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
443
446
  Graphql execution returned with error: [
444
447
  {
@@ -548,77 +551,77 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
548
551
  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)
549
552
  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)
550
553
 
551
- ✓  node  test/pages/api/graphql.test.ts (19 tests) 38ms
552
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 28ms
553
- ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 9ms
554
+ ✓  node  test/pages/api/graphql.test.ts (19 tests) 29ms
555
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 16ms
556
+ ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 8ms
554
557
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
555
558
  Set password request failed: Bad Request
556
559
 
557
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 33ms
558
- ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 311ms
559
- ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 29ms
560
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 6ms
561
- ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 5ms
562
- ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 835ms
560
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 35ms
561
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 271ms
562
+ ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 18ms
563
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 3ms
564
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 3ms
565
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 31ms
566
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 814ms
563
567
  ✓ navigates with the search term on blur  363ms
564
568
  ✓ navigates without a label param when the search is cleared  360ms
565
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (13 tests) 10ms
566
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 50ms
567
569
  ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 7ms
568
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 42ms
569
- ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 128ms
570
- ✓  node  test/sdk/redirects/index.test.ts (7 tests) 59ms
571
- ✓  node  test/utils/productJsonLd.test.ts (17 tests) 7ms
572
- ✓  node  test/proxy.localization.test.ts (5 tests) 33ms
573
- ✓  node  test/components/account/orders/getDeliveryOptionLabel.test.ts (21 tests) 10ms
574
- ✓  node  test/sdk/graphql/retryPolicy.test.ts (18 tests) 14ms
575
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 42ms
576
- ✓  node  test/server/index.test.ts (7 tests) 962ms
577
- ✓ should handle options and execute  452ms
578
- ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (6 tests) 6ms
579
- ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 45ms
580
- ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 100ms
581
- ✓  node  test/server/webops-api.test.ts (9 tests) 11ms
582
- ✓  node  test/proxy.test.ts (4 tests) 22ms
583
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 32ms
570
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (13 tests) 8ms
571
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 35ms
572
+ ✓  node  test/sdk/redirects/index.test.ts (7 tests) 40ms
573
+ ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 117ms
574
+ ✓  node  test/utils/productJsonLd.test.ts (17 tests) 8ms
575
+ ✓  node  test/proxy.localization.test.ts (5 tests) 50ms
576
+ ✓  node  test/components/account/orders/getDeliveryOptionLabel.test.ts (21 tests) 6ms
577
+ ✓  node  test/sdk/graphql/retryPolicy.test.ts (18 tests) 15ms
578
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 34ms
579
+ ✓  node  test/server/index.test.ts (7 tests) 716ms
580
+ ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (6 tests) 7ms
581
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 43ms
582
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 89ms
583
+ ✓  node  test/proxy.test.ts (4 tests) 15ms
584
+ ✓  node  test/server/webops-api.test.ts (9 tests) 13ms
584
585
  ✓  node  test/components/account/orders/StatusCard.test.ts (3 tests) 21ms
585
- ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 4ms
586
- ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 13ms
587
- ✓  node  test/server/cms/myAccountDefaultSections.test.ts (7 tests) 6ms
588
- ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 8ms
589
- ✓  node  test/server/content/service.test.ts (5 tests) 5ms
590
- ✓  node  test/utils/productJsonLdRendering.test.tsx (4 tests) 14ms
586
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 37ms
587
+ ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 5ms
588
+ ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 10ms
589
+ ✓  node  test/server/cms/myAccountDefaultSections.test.ts (7 tests) 5ms
590
+ ✓  node  test/utils/productJsonLdRendering.test.tsx (4 tests) 11ms
591
+ ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 7ms
592
+ ✓  node  test/server/content/service.test.ts (5 tests) 4ms
591
593
  ✓  node  test/server/cms/global.test.ts (3 tests) 4ms
592
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 23ms
593
- ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 122ms
594
- ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 7ms
595
- ✓  node  test/server/rootSpan.test.ts (4 tests) 52ms
596
- ✓  node  test/pages/api/preview.test.ts (2 tests) 6ms
597
- ✓  node  test/components/search/SearchInput.test.ts (6 tests) 8ms
598
- ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
599
- ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 6ms
600
- ✓  node  test/components/account/Layout.test.tsx (6 tests) 64ms
601
- ✓  node  test/utils/retry.test.ts (5 tests) 18ms
602
- ✓  node  test/server/cms/index.test.ts (2 tests) 5ms
594
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 25ms
595
+ ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 115ms
596
+ ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 4ms
597
+ ✓  node  test/server/rootSpan.test.ts (4 tests) 31ms
598
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 7ms
599
+ ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 3ms
600
+ ✓  node  test/components/search/SearchInput.test.ts (6 tests) 6ms
601
+ ✓  node  test/components/account/Layout.test.tsx (6 tests) 54ms
602
+ ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 5ms
603
+ ✓  node  test/server/cms/index.test.ts (2 tests) 7ms
604
+ ✓  node  test/utils/retry.test.ts (5 tests) 11ms
603
605
  ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 5ms
604
- ✓  node  test/utils/userOrderStatus.test.ts (4 tests) 4ms
605
- ✓  node  test/utils/unlockResponse.test.ts (11 tests) 6ms
606
- ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 194ms
607
- ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 5ms
608
- ✓  node  test/utils/isLocalHost.test.ts (7 tests) 5ms
609
- ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 57ms
610
- ✓  node  test/components/account/orders/getOrderTotalLabel.test.ts (6 tests) 6ms
611
- ✓  node  test/components/account/orders/listOrdersLabels.test.ts (2 tests) 4ms
612
- ✓  node  test/utils/getCookie.test.ts (4 tests) 3ms
613
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 28ms
614
- ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 5ms
615
- ✓  node  test/instrumentation.test.ts (3 tests) 4ms
606
+ ✓  node  test/utils/userOrderStatus.test.ts (4 tests) 5ms
607
+ ✓  node  test/utils/unlockResponse.test.ts (11 tests) 3ms
608
+ ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 4ms
609
+ ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 185ms
610
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 38ms
611
+ ✓  node  test/utils/isLocalHost.test.ts (7 tests) 4ms
612
+ ✓  node  test/components/account/orders/getOrderTotalLabel.test.ts (6 tests) 4ms
613
+ ✓  node  test/components/account/orders/listOrdersLabels.test.ts (2 tests) 3ms
614
+ ✓  node  test/utils/getCookie.test.ts (4 tests) 4ms
615
+ ✓  node  test/sdk/session/isSignInAreaResolved.test.ts (3 tests) 3ms
616
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 35ms
617
+ ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 2ms
618
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 31ms
619
+ ✓  node  test/instrumentation.test.ts (3 tests) 3ms
616
620
  ✓  node  test/components/account/orders/orderDetailsLabels.test.ts (1 test) 3ms
617
- ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 36ms
618
- ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 11ms
621
+ ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 8ms
619
622
 
620
-  Test Files  115 passed (115)
621
-  Tests  871 passed (871)
622
-  Start at  21:00:05
623
-  Duration  51.92s (transform 13.62s, setup 0ms, import 47.24s, tests 17.98s, environment 64.13s)
623
+  Test Files  122 passed (122)
624
+  Tests  926 passed (926)
625
+  Start at  23:47:19
626
+  Duration  42.97s (transform 10.45s, setup 0ms, import 38.63s, tests 15.36s, environment 52.12s)
624
627
 
package/@generated/gql.ts CHANGED
@@ -40,7 +40,7 @@ type Documents = {
40
40
  "\n query ServerQuotesOrganizationMemberQuery {\n isOrganizationMember\n }\n": typeof types.ServerQuotesOrganizationMemberQueryDocument,
41
41
  "\n query ServerSecurity {\n accountProfile {\n name\n }\n userDetails {\n email\n }\n }\n": typeof types.ServerSecurityDocument,
42
42
  "\n query ServerUserDetailsQuery {\n accountProfile {\n name\n }\n userDetails {\n username\n name\n email\n phone\n role\n orgUnit\n }\n }\n": typeof types.ServerUserDetailsQueryDocument,
43
- "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n }\n }\n": typeof types.AvailableContractsQueryDocument,
43
+ "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n isDefault\n }\n }\n": typeof types.AvailableContractsQueryDocument,
44
44
  "\n mutation CancelOrderMutation($data: IUserOrderCancel!) {\n cancelOrder(data: $data) {\n data\n }\n }\n": typeof types.CancelOrderMutationDocument,
45
45
  "\n mutation ProcessOrderAuthorizationMutation($data: IProcessOrderAuthorization!) {\n processOrderAuthorization(data: $data) {\n isPendingForOtherAuthorizer\n ruleForAuthorization {\n orderAuthorizationId\n dimensionId\n rule {\n id\n name\n status\n doId\n authorizedEmails\n priority\n trigger {\n condition {\n conditionType\n description\n lessThan\n greatherThan\n expression\n }\n effect {\n description\n effectType\n funcPath\n }\n }\n timeout\n notification\n scoreInterval {\n accept\n deny\n }\n authorizationData {\n requireAllApprovals\n authorizers {\n id\n email\n type\n authorizationDate\n }\n }\n isUserAuthorized\n isUserNextAuthorizer\n }\n }\n }\n }\n": typeof types.ProcessOrderAuthorizationMutationDocument,
46
46
  "\n query ValidateUser {\n validateUser {\n isValid\n }\n }\n": typeof types.ValidateUserDocument,
@@ -93,7 +93,7 @@ const documents: Documents = {
93
93
  "\n query ServerQuotesOrganizationMemberQuery {\n isOrganizationMember\n }\n": types.ServerQuotesOrganizationMemberQueryDocument,
94
94
  "\n query ServerSecurity {\n accountProfile {\n name\n }\n userDetails {\n email\n }\n }\n": types.ServerSecurityDocument,
95
95
  "\n query ServerUserDetailsQuery {\n accountProfile {\n name\n }\n userDetails {\n username\n name\n email\n phone\n role\n orgUnit\n }\n }\n": types.ServerUserDetailsQueryDocument,
96
- "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n }\n }\n": types.AvailableContractsQueryDocument,
96
+ "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n isDefault\n }\n }\n": types.AvailableContractsQueryDocument,
97
97
  "\n mutation CancelOrderMutation($data: IUserOrderCancel!) {\n cancelOrder(data: $data) {\n data\n }\n }\n": types.CancelOrderMutationDocument,
98
98
  "\n mutation ProcessOrderAuthorizationMutation($data: IProcessOrderAuthorization!) {\n processOrderAuthorization(data: $data) {\n isPendingForOtherAuthorizer\n ruleForAuthorization {\n orderAuthorizationId\n dimensionId\n rule {\n id\n name\n status\n doId\n authorizedEmails\n priority\n trigger {\n condition {\n conditionType\n description\n lessThan\n greatherThan\n expression\n }\n effect {\n description\n effectType\n funcPath\n }\n }\n timeout\n notification\n scoreInterval {\n accept\n deny\n }\n authorizationData {\n requireAllApprovals\n authorizers {\n id\n email\n type\n authorizationDate\n }\n }\n isUserAuthorized\n isUserNextAuthorizer\n }\n }\n }\n }\n": types.ProcessOrderAuthorizationMutationDocument,
99
99
  "\n query ValidateUser {\n validateUser {\n isValid\n }\n }\n": types.ValidateUserDocument,
@@ -224,7 +224,7 @@ export function gql(source: "\n query ServerUserDetailsQuery {\n accountProf
224
224
  /**
225
225
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
226
226
  */
227
- export function gql(source: "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n }\n }\n"): typeof import('./graphql').AvailableContractsQueryDocument;
227
+ export function gql(source: "\n query AvailableContractsQuery($orgUnitId: String!) {\n availableContracts(orgUnitId: $orgUnitId) {\n id\n corporateName\n isActive\n isDefault\n }\n }\n"): typeof import('./graphql').AvailableContractsQueryDocument;
228
228
  /**
229
229
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
230
230
  */
@@ -1447,6 +1447,8 @@ export type StoreContract = {
1447
1447
  id: Scalars['ID']['output'];
1448
1448
  /** Indicates whether this contract is the one currently active in the session. */
1449
1449
  isActive: Scalars['Boolean']['output'];
1450
+ /** Indicates whether this contract is the Organization Unit's default contract. */
1451
+ isDefault: Scalars['Boolean']['output'];
1450
1452
  };
1451
1453
 
1452
1454
  /** Currency information. */
@@ -2907,7 +2909,7 @@ export type AvailableContractsQueryQueryVariables = Exact<{
2907
2909
  }>;
2908
2910
 
2909
2911
 
2910
- export type AvailableContractsQueryQuery = { availableContracts: Array<{ id: string, corporateName: string, isActive: boolean }> };
2912
+ export type AvailableContractsQueryQuery = { availableContracts: Array<{ id: string, corporateName: string, isActive: boolean, isDefault: boolean }> };
2911
2913
 
2912
2914
  export type CancelOrderMutationMutationVariables = Exact<{
2913
2915
  data: IUserOrderCancel;
@@ -3645,7 +3647,7 @@ export const ServerListQuotesQueryDocument = {"__meta__":{"operationName":"Serve
3645
3647
  export const ServerQuotesOrganizationMemberQueryDocument = {"__meta__":{"operationName":"ServerQuotesOrganizationMemberQuery","operationHash":"9ba9119f2a361c83af8ecc703cb28f915df10ac8"}} as unknown as TypedDocumentString<ServerQuotesOrganizationMemberQueryQuery, ServerQuotesOrganizationMemberQueryQueryVariables>;
3646
3648
  export const ServerSecurityDocument = {"__meta__":{"operationName":"ServerSecurity","operationHash":"0890ba3456c40a426893b80b698df7a84cfdd6a1"}} as unknown as TypedDocumentString<ServerSecurityQuery, ServerSecurityQueryVariables>;
3647
3649
  export const ServerUserDetailsQueryDocument = {"__meta__":{"operationName":"ServerUserDetailsQuery","operationHash":"630ec1f47f2710ce3d7895e9131482641f30c837"}} as unknown as TypedDocumentString<ServerUserDetailsQueryQuery, ServerUserDetailsQueryQueryVariables>;
3648
- export const AvailableContractsQueryDocument = {"__meta__":{"operationName":"AvailableContractsQuery","operationHash":"011619bb1be93a21f6530fe4d193dec96a89e88a"}} as unknown as TypedDocumentString<AvailableContractsQueryQuery, AvailableContractsQueryQueryVariables>;
3650
+ export const AvailableContractsQueryDocument = {"__meta__":{"operationName":"AvailableContractsQuery","operationHash":"e9dd3c5b658d90cf6b6028837131273d3560cb32"}} as unknown as TypedDocumentString<AvailableContractsQueryQuery, AvailableContractsQueryQueryVariables>;
3649
3651
  export const CancelOrderMutationDocument = {"__meta__":{"operationName":"CancelOrderMutation","operationHash":"e2b06da6840614d3c72768e56579b9d3b8e80802"}} as unknown as TypedDocumentString<CancelOrderMutationMutation, CancelOrderMutationMutationVariables>;
3650
3652
  export const ProcessOrderAuthorizationMutationDocument = {"__meta__":{"operationName":"ProcessOrderAuthorizationMutation","operationHash":"8c25d37c8d6e7c20ab21bb8a4f4e6a2fe320ea8d"}} as unknown as TypedDocumentString<ProcessOrderAuthorizationMutationMutation, ProcessOrderAuthorizationMutationMutationVariables>;
3651
3653
  export const ValidateUserDocument = {"__meta__":{"operationName":"ValidateUser","operationHash":"32f99c73c3de958b64d6bece1afe800469f54548"}} as unknown as TypedDocumentString<ValidateUserQuery, ValidateUserQueryVariables>;
@@ -10,7 +10,7 @@
10
10
  "9ba9119f2a361c83af8ecc703cb28f915df10ac8": "query ServerQuotesOrganizationMemberQuery { isOrganizationMember }",
11
11
  "0890ba3456c40a426893b80b698df7a84cfdd6a1": "query ServerSecurity { accountProfile { name } userDetails { email } }",
12
12
  "630ec1f47f2710ce3d7895e9131482641f30c837": "query ServerUserDetailsQuery { accountProfile { name } userDetails { email name orgUnit phone role username } }",
13
- "011619bb1be93a21f6530fe4d193dec96a89e88a": "query AvailableContractsQuery($orgUnitId: String!) { availableContracts(orgUnitId: $orgUnitId) { corporateName id isActive } }",
13
+ "e9dd3c5b658d90cf6b6028837131273d3560cb32": "query AvailableContractsQuery($orgUnitId: String!) { availableContracts(orgUnitId: $orgUnitId) { corporateName id isActive isDefault } }",
14
14
  "e2b06da6840614d3c72768e56579b9d3b8e80802": "mutation CancelOrderMutation($data: IUserOrderCancel!) { cancelOrder(data: $data) { data } }",
15
15
  "8c25d37c8d6e7c20ab21bb8a4f4e6a2fe320ea8d": "mutation ProcessOrderAuthorizationMutation($data: IProcessOrderAuthorization!) { processOrderAuthorization(data: $data) { isPendingForOtherAuthorizer ruleForAuthorization { dimensionId orderAuthorizationId rule { authorizationData { authorizers { authorizationDate email id type } requireAllApprovals } authorizedEmails doId id isUserAuthorized isUserNextAuthorizer name notification priority scoreInterval { accept deny } status timeout trigger { condition { conditionType description expression greatherThan lessThan } effect { description effectType funcPath } } } } } }",
16
16
  "32f99c73c3de958b64d6bece1afe800469f54548": "query ValidateUser { validateUser { isValid } }",
@@ -1435,6 +1435,10 @@ type StoreContract {
1435
1435
  Indicates whether this contract is the one currently active in the session.
1436
1436
  """
1437
1437
  isActive: Boolean!
1438
+ """
1439
+ Indicates whether this contract is the Organization Unit's default contract.
1440
+ """
1441
+ isDefault: Boolean!
1438
1442
  }
1439
1443
 
1440
1444
  """Currency information."""
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
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.8.1-dev.2](https://github.com/vtex/faststore/compare/v4.8.1-dev.1...v4.8.1-dev.2) (2026-09-21)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **core:** SUMA review fixes — reset cart/orderForm on contract switch, default contract in switcher, no Sign-in flash (B2BTEAM-3827) ([#3479](https://github.com/vtex/faststore/issues/3479)) ([d015186](https://github.com/vtex/faststore/commit/d015186f66bc5cdfce55d3da1c21b2d4dbb3d39e))
11
+
6
12
  ## [4.8.1-dev.1](https://github.com/vtex/faststore/compare/v4.8.1-dev.0...v4.8.1-dev.1) (2026-09-18)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "4.8.1-dev.1",
3
+ "version": "4.8.1-dev.2",
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/diagnostics": "4.8.1-dev.1",
75
- "@faststore/lighthouse": "4.8.1-dev.1",
76
- "@faststore/sdk": "4.8.1-dev.1",
77
- "@faststore/api": "4.8.1-dev.1",
78
- "@faststore/ui": "4.8.1-dev.1"
74
+ "@faststore/api": "4.8.1-dev.2",
75
+ "@faststore/diagnostics": "4.8.1-dev.2",
76
+ "@faststore/sdk": "4.8.1-dev.2",
77
+ "@faststore/lighthouse": "4.8.1-dev.2",
78
+ "@faststore/ui": "4.8.1-dev.2"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@cypress/code-coverage": "^3.12.1",
@@ -12,16 +12,12 @@ export type ContractSwitcherProps = {
12
12
  onClose: () => void
13
13
  }
14
14
 
15
- /**
16
- * Contract that can be displayed by the switcher. `isDefault` is optional so the
17
- * component compiles against both the local mock and the real
18
- * `useAvailableContracts` hook (which does not expose a default yet).
19
- */
15
+ /** Contract that can be displayed by the switcher. */
20
16
  type SwitcherContract = {
21
17
  id: string
22
18
  corporateName: string
23
19
  isActive: boolean
24
- isDefault?: boolean
20
+ isDefault: boolean
25
21
  }
26
22
 
27
23
  const initialOf = (name: string) => name.trim().charAt(0).toUpperCase()
@@ -73,6 +69,7 @@ const ContractSwitcherCurrentSession = ({
73
69
  name="Star"
74
70
  width={20}
75
71
  height={20}
72
+ aria-label="Default contract"
76
73
  />
77
74
  )}
78
75
  </div>
@@ -159,6 +156,7 @@ const ContractSwitcherOptionList = ({
159
156
  name="Star"
160
157
  width={20}
161
158
  height={20}
159
+ aria-label="Default contract"
162
160
  />
163
161
  )}
164
162
  </button>