@faststore/core 4.7.1-dev.2 → 4.8.0-dev.1

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 (23) hide show
  1. package/.turbo/turbo-generate.log +3 -3
  2. package/.turbo/turbo-test.log +93 -91
  3. package/CHANGELOG.md +21 -0
  4. package/cms/faststore/components/cms_component__cartsidebar.jsonc +74 -0
  5. package/cms/faststore/schema.json +78 -0
  6. package/cms/faststore/sections.json +78 -0
  7. package/package.json +6 -6
  8. package/src/components/cart/CartRecommendationShelf/CartRecommendationProductCard.tsx +88 -0
  9. package/src/components/cart/CartRecommendationShelf/CartRecommendationShelf.tsx +110 -0
  10. package/src/components/cart/CartRecommendationShelf/index.ts +4 -0
  11. package/src/components/cart/CartRecommendationShelf/section.module.scss +124 -0
  12. package/src/components/cart/CartSidebar/CartSidebar.tsx +47 -1
  13. package/src/components/product/ProductCard/ProductCard.tsx +5 -3
  14. package/src/components/sections/RecommendationShelf/README.md +74 -6
  15. package/src/components/sections/RecommendationShelf/RecommendationShelf.tsx +15 -3
  16. package/src/components/sections/RecommendationShelf/RecommendationShelf.types.ts +8 -2
  17. package/src/components/sections/RecommendationShelf/index.ts +7 -1
  18. package/src/sdk/recommendations/useRecommendationShelf.ts +2 -2
  19. package/test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx +125 -0
  20. package/test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx +286 -0
  21. package/test/components/CartSidebar/CartSidebar.browser.test.tsx +209 -0
  22. package/test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx +19 -0
  23. package/test/sdk/recommendations/useRecommendationShelf.browser.test.tsx +1 -1
@@ -1,9 +1,9 @@
1
1
 
2
- > @faststore/core@4.7.1-dev.1 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.8.0-dev.0 generate /home/runner/work/faststore/faststore/packages/core
3
3
  > pnpm run gen-types && pnpm run cache-graphql
4
4
 
5
5
 
6
- > @faststore/core@4.7.1-dev.1 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.8.0-dev.0 gen-types /home/runner/work/faststore/faststore/packages/core
7
7
  > node ../cli/bin/run generate-types .
8
8
 
9
9
  [STARTED] Parse Configuration
@@ -19,7 +19,7 @@
19
19
  [COMPLETED] Generate to /home/runner/work/faststore/faststore/packages/core/@generated/
20
20
  [COMPLETED] Generate outputs
21
21
 
22
- > @faststore/core@4.7.1-dev.1 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.8.0-dev.0 cache-graphql /home/runner/work/faststore/faststore/packages/core
23
23
  > node ../cli/bin/run cache-graphql --config=./discovery.config.default.js --queries=./@generated/persisted-documents.json
24
24
 
25
25
  [Info] - Config file location: /home/runner/work/faststore/faststore/packages/core/discovery.config.default.js
@@ -1,5 +1,5 @@
1
1
 
2
- > @faststore/core@4.7.1-dev.1 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.8.0-dev.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
@@ -7,22 +7,22 @@
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) 1179ms
10
11
  Browserslist: browsers data (caniuse-lite) is 7 months old. Please run:
11
12
  npx update-browserslist-db@latest
12
13
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
13
- ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 1209ms
14
- ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 2734ms
15
- ✓ shows an error state when the list fails to load  597ms
14
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 579ms
15
+ ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (14 tests) 1915ms
16
+ ✓ shows the tab bar and renders Personal cards by default  866ms
17
+ ✓ paginates when there are more than 25 cards  401ms
18
+ ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 188ms
19
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 2638ms
20
+ ✓ shows an error state when the list fails to load  814ms
16
21
  ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  367ms
17
- ✓ keeps Confirm disabled when the selected contract is filtered out  310ms
18
- ✓ does not reload when the switch returns false  342ms
19
- ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (14 tests) 2532ms
20
- ✓ shows the tab bar and renders Personal cards by default  1068ms
21
- ✓ paginates when there are more than 25 cards  345ms
22
- ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 97ms
23
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 15ms
24
- ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 211ms
25
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 172ms
22
+ ✓ keeps Confirm disabled until a different contract is selected  303ms
23
+ ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 260ms
24
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 27ms
25
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 204ms
26
26
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
27
27
  Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
28
28
   at node:internal/deps/undici/undici:16416:13
@@ -52,7 +52,8 @@ Browserslist: browsers data (caniuse-lite) is 7 months old. Please run:
52
52
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
53
53
  Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
54
54
 
55
- ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (7 tests) 114ms
55
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 334ms
56
+ ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 108ms
56
57
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
57
58
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
58
59
 
@@ -282,12 +283,11 @@ act(() => {
282
283
  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
283
284
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
284
285
 
285
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1132ms
286
- ✓ renders the password protection form  466ms
287
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 18ms
288
- ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 1348ms
289
- ✓ renders the menu view with contract details and manage footer  744ms
290
- ✓ opens the contract switcher and returns to the menu on back  304ms
286
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 878ms
287
+ ✓ renders the password protection form  363ms
288
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 12ms
289
+ ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 860ms
290
+ ✓ renders the menu view with contract details and manage footer  362ms
291
291
  ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 24ms
292
292
  stderr | test/sdk/localization/store-url.browser.test.ts
293
293
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
@@ -297,7 +297,7 @@ This ensures that you're testing the behavior the user would see in the browser.
297
297
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
298
298
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
299
299
 
300
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 5ms
300
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 6ms
301
301
  stderr | test/components/cms/RenderSections.browser.test.tsx
302
302
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
303
303
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -307,10 +307,11 @@ This ensures that you're testing the behavior the user would see in the browser.
307
307
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
308
308
 
309
309
  ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 36ms
310
- ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 65ms
311
- ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 35ms
312
- ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 126ms
313
- ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 39ms
310
+ ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 86ms
311
+ ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 41ms
312
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 130ms
313
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 45ms
314
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx (3 tests) 50ms
314
315
  stderr | test/components/account/doLogout.browser.test.ts
315
316
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
316
317
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -319,10 +320,11 @@ This ensures that you're testing the behavior the user would see in the browser.
319
320
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
320
321
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
321
322
 
322
- ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 23ms
323
- ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 45ms
324
- ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 72ms
325
- ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 250ms
323
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 25ms
324
+ ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 52ms
325
+ ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 92ms
326
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 306ms
327
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 272ms
326
328
  stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
327
329
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
328
330
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -332,10 +334,10 @@ This ensures that you're testing the behavior the user would see in the browser.
332
334
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
333
335
 
334
336
  ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 8ms
335
- ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 301ms
336
- ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 4ms
337
+ ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 5ms
337
338
  ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
338
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 32ms
339
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 26ms
340
+ ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 29ms
339
341
  stderr | test/sdk/account/refreshToken.browser.test.ts
340
342
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
341
343
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -344,12 +346,11 @@ This ensures that you're testing the behavior the user would see in the browser.
344
346
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
345
347
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
346
348
 
347
- ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 34ms
348
- ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 6ms
349
349
  ✓  node  test/server/password-protection-service.test.ts (22 tests) 31ms
350
+ ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 5ms
350
351
  ✓  node  test/utils/match-url.test.ts (10 tests) 9ms
351
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 265ms
352
352
  ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 11ms
353
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 198ms
353
354
  ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 10ms
354
355
  stderr | test/components/search/SearchInputComponent.test.tsx
355
356
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
@@ -414,19 +415,19 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
414
415
  at Suspense
415
416
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
416
417
 
417
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 73ms
418
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 44ms
419
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 15ms
418
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 87ms
419
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 52ms
420
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 13ms
421
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 24ms
420
422
  stderr | test/pages/pvt/account/cards/index.test.ts > Cards page getServerSideProps > redirects to /pvt/account/403 when the query fails with 401/403
421
423
  { extensions: { status: 401 } }
422
424
 
423
425
  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
424
426
  { extensions: { status: 502 } }
425
427
 
426
- ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 8ms
427
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 26ms
428
- ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 7ms
429
- ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 398ms
428
+ ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 14ms
429
+ ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 10ms
430
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 440ms
430
431
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
431
432
  Graphql execution returned with error: [
432
433
  {
@@ -519,68 +520,69 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
519
520
  at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:37
520
521
  at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/vitest/dist/chunks/traces.CCmnQaNT.js:142:27)
521
522
 
522
- ✓  node  test/pages/api/graphql.test.ts (17 tests) 33ms
523
+ ✓  node  test/pages/api/graphql.test.ts (17 tests) 35ms
524
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 854ms
525
+ ✓ navigates with the search term on blur  364ms
526
+ ✓ navigates without a label param when the search is cleared  362ms
523
527
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
524
528
  Set password request failed: Bad Request
525
529
 
526
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 29ms
527
- ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 833ms
528
- ✓ navigates with the search term on blur  366ms
529
- ✓ navigates without a label param when the search is cleared  358ms
530
- ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 25ms
531
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 6ms
532
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 44ms
533
- ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 5ms
530
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 50ms
531
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 33ms
532
+ ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 33ms
533
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 8ms
534
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 6ms
534
535
  ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 6ms
535
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (12 tests) 8ms
536
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 61ms
537
- ✓  node  test/sdk/redirects/index.test.ts (7 tests) 80ms
538
- ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 154ms
536
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (12 tests) 10ms
537
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 50ms
538
+ ✓  node  test/sdk/redirects/index.test.ts (7 tests) 51ms
539
+ ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 142ms
539
540
  ✓  node  test/utils/productJsonLd.test.ts (17 tests) 10ms
540
- ✓  node  test/proxy.localization.test.ts (5 tests) 37ms
541
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 29ms
542
- ✓  node  test/server/index.test.ts (7 tests) 939ms
543
- ✓ should handle options and execute  391ms
544
- ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (6 tests) 6ms
545
- ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 99ms
546
- ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 42ms
547
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 36ms
548
- ✓  node  test/server/webops-api.test.ts (9 tests) 19ms
549
- ✓  node  test/proxy.test.ts (4 tests) 28ms
541
+ ✓  node  test/proxy.localization.test.ts (5 tests) 32ms
542
+ ✓  node  test/server/index.test.ts (7 tests) 886ms
543
+ ✓ should return a valid merged GraphQL schema  312ms
544
+ ✓ should handle options and execute  317ms
545
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 45ms
546
+ ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (6 tests) 9ms
547
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 110ms
548
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 46ms
549
+ ✓  node  test/server/webops-api.test.ts (9 tests) 25ms
550
+ ✓  node  test/proxy.test.ts (4 tests) 22ms
551
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 41ms
552
+ ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 5ms
550
553
  ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 12ms
551
- ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 4ms
552
- ✓  node  test/server/cms/myAccountDefaultSections.test.ts (7 tests) 6ms
553
554
  ✓  node  test/server/content/service.test.ts (5 tests) 5ms
554
- ✓  node  test/utils/productJsonLdRendering.test.tsx (4 tests) 14ms
555
- ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 6ms
555
+ ✓  node  test/server/cms/myAccountDefaultSections.test.ts (7 tests) 5ms
556
+ ✓  node  test/utils/productJsonLdRendering.test.tsx (4 tests) 13ms
557
+ ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 9ms
556
558
  ✓  node  test/server/cms/global.test.ts (3 tests) 5ms
557
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 35ms
558
- ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 144ms
559
- ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 7ms
560
- ✓  node  test/server/rootSpan.test.ts (4 tests) 40ms
561
- ✓  node  test/pages/api/preview.test.ts (2 tests) 8ms
559
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 38ms
560
+ ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 150ms
561
+ ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 5ms
562
+ ✓  node  test/server/rootSpan.test.ts (4 tests) 41ms
563
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 9ms
562
564
  ✓  node  test/components/search/SearchInput.test.ts (6 tests) 8ms
563
565
  ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
564
- ✓  node  test/components/account/Layout.test.tsx (6 tests) 59ms
566
+ ✓  node  test/components/account/Layout.test.tsx (6 tests) 66ms
565
567
  ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 5ms
566
- ✓  node  test/utils/retry.test.ts (5 tests) 14ms
567
- ✓  node  test/server/cms/index.test.ts (2 tests) 5ms
568
+ ✓  node  test/utils/retry.test.ts (5 tests) 12ms
569
+ ✓  node  test/server/cms/index.test.ts (2 tests) 7ms
568
570
  ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 5ms
569
- ✓  node  test/utils/unlockResponse.test.ts (11 tests) 6ms
571
+ ✓  node  test/utils/unlockResponse.test.ts (11 tests) 4ms
572
+ ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 191ms
570
573
  ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 5ms
571
- ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 181ms
572
- ✓  node  test/utils/isLocalHost.test.ts (7 tests) 5ms
573
- ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 60ms
574
- ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 4ms
574
+ ✓  node  test/utils/isLocalHost.test.ts (7 tests) 6ms
575
+ ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 5ms
576
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 52ms
575
577
  ✓  node  test/utils/getCookie.test.ts (4 tests) 5ms
576
578
  ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 4ms
577
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 29ms
578
- ✓  node  test/instrumentation.test.ts (3 tests) 7ms
579
- ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 11ms
580
- ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 27ms
581
-
582
-  Test Files  94 passed (94)
583
-  Tests  753 passed (753)
584
-  Start at  16:48:59
585
-  Duration  46.17s (transform 12.82s, setup 0ms, import 40.03s, tests 14.85s, environment 56.78s)
579
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 37ms
580
+ ✓  node  test/instrumentation.test.ts (3 tests) 6ms
581
+ ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 16ms
582
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 24ms
583
+
584
+  Test Files  97 passed (97)
585
+  Tests  775 passed (775)
586
+  Start at  19:32:39
587
+  Duration  50.03s (transform 14.19s, setup 0ms, import 46.04s, tests 14.59s, environment 62.06s)
586
588
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,27 @@
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.0-dev.1](https://github.com/vtex/faststore/compare/v4.8.0-dev.0...v4.8.0-dev.1) (2026-09-03)
7
+
8
+ **Note:** Version bump only for package @faststore/core
9
+
10
+ # [4.8.0-dev.0](https://github.com/vtex/faststore/compare/v4.7.1-dev.2...v4.8.0-dev.0) (2026-09-03)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **core:** align mini cart shelf contract with review feedback ([cc8f4a4](https://github.com/vtex/faststore/commit/cc8f4a483fffc6ecdceb5f7c8d97f9568156eeba))
15
+ - **core:** format CartRecommendationShelf Omit union for Biome ([318741d](https://github.com/vtex/faststore/commit/318741d46968426a66b45dc348732ff0a37ac231))
16
+ - **core:** narrow cart shelf props before accessing campaignVrn ([84edae7](https://github.com/vtex/faststore/commit/84edae7a2978bfd6c7a6f5223d4eaf31602dd54a))
17
+ - **core:** satisfy Sonar fragment and Stylelint on the cart shelf ([3423300](https://github.com/vtex/faststore/commit/3423300542f1a478fab856efc070faf333d358d3))
18
+ - **RecommendationShelf:** update README to clarify rendering behavior on empty cart ([c1b0fa9](https://github.com/vtex/faststore/commit/c1b0fa98a5e322b151efc27307e1f34e5c468038))
19
+
20
+ ### Features
21
+
22
+ - **cart:** add recommendations shelf to cart drawer ([879bda5](https://github.com/vtex/faststore/commit/879bda58bcae0094b868d5d8ce5a1b594ae7007f))
23
+ - **cart:** enhance CartRecommendationShelf with new styles and props ([8bb604d](https://github.com/vtex/faststore/commit/8bb604d4cdebdeefb39e9d0a4c0475afc72aed3d))
24
+ - **core:** opt the mini cart shelf in via a CMS display condition ([dec10d0](https://github.com/vtex/faststore/commit/dec10d0cc5b04d64eaf02c27192eeffdaf3eedc5))
25
+ - **RecommendationShelf:** add data attributes for CSS targeting ([ddd5bec](https://github.com/vtex/faststore/commit/ddd5bec44357d85c43dfee4c2162d6e51ee8a06b))
26
+
6
27
  ## [4.7.1-dev.2](https://github.com/vtex/faststore/compare/v4.7.1-dev.1...v4.7.1-dev.2) (2026-09-02)
7
28
 
8
29
  **Note:** Version bump only for package @faststore/core
@@ -133,6 +133,80 @@
133
133
  "default": "Tax included"
134
134
  }
135
135
  }
136
+ },
137
+ "recommendations": {
138
+ "title": "Recommendations",
139
+ "description": "Optional shelf of personalized product recommendations rendered inside the cart drawer, between the cart items and the order summary.",
140
+ "type": "object",
141
+ "properties": {
142
+ "shouldDisplayRecommendationShelf": {
143
+ "title": "Should display Recommendation Shelf?",
144
+ "description": "When enabled, fetches recommendations when the shopper opens the cart. Off by default so stores that do not use Recommendations never hit the Recommendations API. The personalization session starts via experimental.enableRecommendations, or as a fallback when this shelf mounts.",
145
+ "type": "boolean",
146
+ "default": false
147
+ },
148
+ "title": {
149
+ "title": "Title",
150
+ "description": "Override the shelf title. If not set, the campaign title will be used.",
151
+ "type": "string"
152
+ },
153
+ "campaignVrn": {
154
+ "title": "Campaign VRN",
155
+ "description": "Recommendation campaign VRN (e.g. vrn:recommendations:my-account:rec-cross-v2:abc123). The mini cart shelf only mounts when the cart has items, so it never fetches or renders on an empty cart — including context-agnostic campaigns (top sellers, personalized, last seen, search-based). Use a page Recommendation Shelf for empty-cart campaigns.",
156
+ "type": "string",
157
+ "pattern": "^vrn:recommendations:[^:]+:(rec-cross-v2|rec-similar-v2|rec-persona-v2|rec-last-v2|rec-top-items-v2|rec-search-v2|rec-next-v2|rec-visual-v2):[^:]+$"
158
+ },
159
+ "carouselConfiguration": {
160
+ "title": "Carousel Configuration",
161
+ "type": "object",
162
+ "properties": {
163
+ "itemsPerPage": {
164
+ "title": "Items per page",
165
+ "description": "Number of products visible at once. Fractional values such as 1.5 hint that the carousel scrolls.",
166
+ "type": "number",
167
+ "default": 1
168
+ },
169
+ "variant": {
170
+ "title": "Carousel track variant",
171
+ "description": "How the carousel navigates between items.",
172
+ "type": "string",
173
+ "default": "scroll",
174
+ "enum": ["slide", "scroll"],
175
+ "enumNames": ["Slide", "Scroll"]
176
+ },
177
+ "infiniteMode": {
178
+ "title": "Infinite navigation?",
179
+ "description": "Only applies to the 'slide' variant.",
180
+ "type": "boolean",
181
+ "default": false
182
+ },
183
+ "controls": {
184
+ "title": "Navigation controls",
185
+ "description": "Which navigation elements should be visible.",
186
+ "type": "string",
187
+ "default": "navigationArrows",
188
+ "enum": ["complete", "navigationArrows", "paginationBullets"],
189
+ "enumNames": ["Arrows and bullets", "Arrows only", "Bullets only"]
190
+ }
191
+ }
192
+ },
193
+ "productCardConfiguration": {
194
+ "title": "Product Card Configuration",
195
+ "type": "object",
196
+ "properties": {
197
+ "showDiscountBadge": {
198
+ "title": "Show discount badge?",
199
+ "type": "boolean",
200
+ "default": true
201
+ },
202
+ "bordered": {
203
+ "title": "Cards should be bordered?",
204
+ "type": "boolean",
205
+ "default": false
206
+ }
207
+ }
208
+ }
209
+ }
136
210
  }
137
211
  },
138
212
  "readOnly": false,
@@ -1349,6 +1349,84 @@
1349
1349
  "default": "Tax included"
1350
1350
  }
1351
1351
  }
1352
+ },
1353
+ "recommendations": {
1354
+ "title": "Recommendations",
1355
+ "description": "Optional shelf of personalized product recommendations rendered inside the cart drawer, between the cart items and the order summary.",
1356
+ "type": "object",
1357
+ "properties": {
1358
+ "shouldDisplayRecommendationShelf": {
1359
+ "title": "Should display Recommendation Shelf?",
1360
+ "description": "When enabled, fetches recommendations when the shopper opens the cart. Off by default so stores that do not use Recommendations never hit the Recommendations API. The personalization session starts via experimental.enableRecommendations, or as a fallback when this shelf mounts.",
1361
+ "type": "boolean",
1362
+ "default": false
1363
+ },
1364
+ "title": {
1365
+ "title": "Title",
1366
+ "description": "Override the shelf title. If not set, the campaign title will be used.",
1367
+ "type": "string"
1368
+ },
1369
+ "campaignVrn": {
1370
+ "title": "Campaign VRN",
1371
+ "description": "Recommendation campaign VRN (e.g. vrn:recommendations:my-account:rec-cross-v2:abc123). The mini cart shelf only mounts when the cart has items, so it never fetches or renders on an empty cart — including context-agnostic campaigns (top sellers, personalized, last seen, search-based). Use a page Recommendation Shelf for empty-cart campaigns.",
1372
+ "type": "string",
1373
+ "pattern": "^vrn:recommendations:[^:]+:(rec-cross-v2|rec-similar-v2|rec-persona-v2|rec-last-v2|rec-top-items-v2|rec-search-v2|rec-next-v2|rec-visual-v2):[^:]+$"
1374
+ },
1375
+ "carouselConfiguration": {
1376
+ "title": "Carousel Configuration",
1377
+ "type": "object",
1378
+ "properties": {
1379
+ "itemsPerPage": {
1380
+ "title": "Items per page",
1381
+ "description": "Number of products visible at once. Fractional values such as 1.5 hint that the carousel scrolls.",
1382
+ "type": "number",
1383
+ "default": 1
1384
+ },
1385
+ "variant": {
1386
+ "title": "Carousel track variant",
1387
+ "description": "How the carousel navigates between items.",
1388
+ "type": "string",
1389
+ "default": "scroll",
1390
+ "enum": ["slide", "scroll"],
1391
+ "enumNames": ["Slide", "Scroll"]
1392
+ },
1393
+ "infiniteMode": {
1394
+ "title": "Infinite navigation?",
1395
+ "description": "Only applies to the 'slide' variant.",
1396
+ "type": "boolean",
1397
+ "default": false
1398
+ },
1399
+ "controls": {
1400
+ "title": "Navigation controls",
1401
+ "description": "Which navigation elements should be visible.",
1402
+ "type": "string",
1403
+ "default": "navigationArrows",
1404
+ "enum": ["complete", "navigationArrows", "paginationBullets"],
1405
+ "enumNames": [
1406
+ "Arrows and bullets",
1407
+ "Arrows only",
1408
+ "Bullets only"
1409
+ ]
1410
+ }
1411
+ }
1412
+ },
1413
+ "productCardConfiguration": {
1414
+ "title": "Product Card Configuration",
1415
+ "type": "object",
1416
+ "properties": {
1417
+ "showDiscountBadge": {
1418
+ "title": "Show discount badge?",
1419
+ "type": "boolean",
1420
+ "default": true
1421
+ },
1422
+ "bordered": {
1423
+ "title": "Cards should be bordered?",
1424
+ "type": "boolean",
1425
+ "default": false
1426
+ }
1427
+ }
1428
+ }
1429
+ }
1352
1430
  }
1353
1431
  },
1354
1432
  "readOnly": false,
@@ -2985,6 +2985,84 @@
2985
2985
  "default": "Tax included"
2986
2986
  }
2987
2987
  }
2988
+ },
2989
+ "recommendations": {
2990
+ "title": "Recommendations",
2991
+ "description": "Optional shelf of personalized product recommendations rendered inside the cart drawer, between the cart items and the order summary.",
2992
+ "type": "object",
2993
+ "properties": {
2994
+ "shouldDisplayRecommendationShelf": {
2995
+ "title": "Should display Recommendation Shelf?",
2996
+ "description": "When enabled, fetches recommendations when the shopper opens the cart. Off by default so stores that do not use Recommendations never hit the Recommendations API. The personalization session starts via experimental.enableRecommendations, or as a fallback when this shelf mounts.",
2997
+ "type": "boolean",
2998
+ "default": false
2999
+ },
3000
+ "title": {
3001
+ "title": "Title",
3002
+ "description": "Override the shelf title. If not set, the campaign title will be used.",
3003
+ "type": "string"
3004
+ },
3005
+ "campaignVrn": {
3006
+ "title": "Campaign VRN",
3007
+ "description": "Recommendation campaign VRN (e.g. vrn:recommendations:my-account:rec-cross-v2:abc123). The mini cart shelf only mounts when the cart has items, so it never fetches or renders on an empty cart — including context-agnostic campaigns (top sellers, personalized, last seen, search-based). Use a page Recommendation Shelf for empty-cart campaigns.",
3008
+ "type": "string",
3009
+ "pattern": "^vrn:recommendations:[^:]+:(rec-cross-v2|rec-similar-v2|rec-persona-v2|rec-last-v2|rec-top-items-v2|rec-search-v2|rec-next-v2|rec-visual-v2):[^:]+$"
3010
+ },
3011
+ "carouselConfiguration": {
3012
+ "title": "Carousel Configuration",
3013
+ "type": "object",
3014
+ "properties": {
3015
+ "itemsPerPage": {
3016
+ "title": "Items per page",
3017
+ "description": "Number of products visible at once. Fractional values such as 1.5 hint that the carousel scrolls.",
3018
+ "type": "number",
3019
+ "default": 1
3020
+ },
3021
+ "variant": {
3022
+ "title": "Carousel track variant",
3023
+ "description": "How the carousel navigates between items.",
3024
+ "type": "string",
3025
+ "default": "scroll",
3026
+ "enum": ["slide", "scroll"],
3027
+ "enumNames": ["Slide", "Scroll"]
3028
+ },
3029
+ "infiniteMode": {
3030
+ "title": "Infinite navigation?",
3031
+ "description": "Only applies to the 'slide' variant.",
3032
+ "type": "boolean",
3033
+ "default": false
3034
+ },
3035
+ "controls": {
3036
+ "title": "Navigation controls",
3037
+ "description": "Which navigation elements should be visible.",
3038
+ "type": "string",
3039
+ "default": "navigationArrows",
3040
+ "enum": ["complete", "navigationArrows", "paginationBullets"],
3041
+ "enumNames": [
3042
+ "Arrows and bullets",
3043
+ "Arrows only",
3044
+ "Bullets only"
3045
+ ]
3046
+ }
3047
+ }
3048
+ },
3049
+ "productCardConfiguration": {
3050
+ "title": "Product Card Configuration",
3051
+ "type": "object",
3052
+ "properties": {
3053
+ "showDiscountBadge": {
3054
+ "title": "Show discount badge?",
3055
+ "type": "boolean",
3056
+ "default": true
3057
+ },
3058
+ "bordered": {
3059
+ "title": "Cards should be bordered?",
3060
+ "type": "boolean",
3061
+ "default": false
3062
+ }
3063
+ }
3064
+ }
3065
+ }
2988
3066
  }
2989
3067
  }
2990
3068
  }