@faststore/core 4.7.1-dev.2 → 4.8.0-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.
Files changed (23) hide show
  1. package/.turbo/turbo-generate.log +3 -3
  2. package/.turbo/turbo-test.log +95 -95
  3. package/CHANGELOG.md +17 -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.7.1-dev.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.7.1-dev.1 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.7.1-dev.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 /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.7.1-dev.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.7.1-dev.1 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.7.1-dev.2 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
@@ -7,22 +7,21 @@
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) 1035ms
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
16
- ✓ 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
14
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx (13 tests) 719ms
15
+ ✓  browser  test/components/account/cards/MyAccountListCards.browser.test.tsx (14 tests) 2983ms
16
+ ✓ shows the tab bar and renders Personal cards by default  1457ms
17
+ ✓ paginates when there are more than 25 cards  303ms
18
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 2347ms
19
+ ✓ shows an error state when the list fails to load  552ms
20
+ ✓ keeps Confirm disabled until a different contract is selected  305ms
21
+ ✓  browser  test/sdk/localization/useBindingSelector.browser.test.tsx (9 tests) 198ms
22
+ ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 260ms
23
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 32ms
24
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.browser.test.tsx (12 tests) 173ms
26
25
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
27
26
  Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
28
27
   at node:internal/deps/undici/undici:16416:13
@@ -52,7 +51,9 @@ Browserslist: browsers data (caniuse-lite) is 7 months old. Please run:
52
51
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
53
52
  Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
54
53
 
55
- ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (7 tests) 114ms
54
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 238ms
55
+ ✓  browser  test/components/CartSidebar/CartSidebar.browser.test.tsx (5 tests) 139ms
56
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 11ms
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,9 @@ 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/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 554ms
287
+ ✓ renders the menu view with contract details and manage footer  308ms
288
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 600ms
291
289
  ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 24ms
292
290
  stderr | test/sdk/localization/store-url.browser.test.ts
293
291
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
@@ -297,7 +295,7 @@ This ensures that you're testing the behavior the user would see in the browser.
297
295
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
298
296
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
299
297
 
300
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 5ms
298
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 7ms
301
299
  stderr | test/components/cms/RenderSections.browser.test.tsx
302
300
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
303
301
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -306,11 +304,12 @@ This ensures that you're testing the behavior the user would see in the browser.
306
304
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
307
305
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
308
306
 
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
307
+ ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 44ms
308
+ ✓  browser  test/components/cms/RenderSections.browser.test.tsx (5 tests) 87ms
309
+ ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 38ms
310
+ ✓  browser  test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx (2 tests) 134ms
311
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 42ms
312
+ ✓  browser  test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx (3 tests) 71ms
314
313
  stderr | test/components/account/doLogout.browser.test.ts
315
314
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
316
315
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -319,10 +318,10 @@ This ensures that you're testing the behavior the user would see in the browser.
319
318
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
320
319
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
321
320
 
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
321
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 29ms
322
+ ✓  browser  test/components/ui/LocalizationButton.browser.test.tsx (3 tests) 36ms
323
+ ✓  browser  test/components/sections/Account/AccountListCards.browser.test.tsx (3 tests) 70ms
324
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 288ms
326
325
  stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
327
326
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
328
327
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -331,11 +330,13 @@ This ensures that you're testing the behavior the user would see in the browser.
331
330
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
332
331
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
333
332
 
334
- ✓  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
333
+ ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 9ms
334
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 279ms
335
+ ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 5ms
337
336
  ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
338
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 32ms
337
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 22ms
338
+ ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 38ms
339
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 30ms
339
340
  stderr | test/sdk/account/refreshToken.browser.test.ts
340
341
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
341
342
  at waitForSessionValidated (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/waitForSessionValidated.ts:16:32)
@@ -344,12 +345,10 @@ This ensures that you're testing the behavior the user would see in the browser.
344
345
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
345
346
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
346
347
 
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
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 31ms
348
+ ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 5ms
350
349
  ✓  node  test/utils/match-url.test.ts (10 tests) 9ms
351
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 265ms
352
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 11ms
350
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 13ms
351
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 274ms
353
352
  ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 10ms
354
353
  stderr | test/components/search/SearchInputComponent.test.tsx
355
354
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
@@ -415,18 +414,18 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
415
414
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
416
415
 
417
416
  ✓  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
417
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 54ms
418
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 14ms
419
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 24ms
420
420
  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
421
  { extensions: { status: 401 } }
422
422
 
423
423
  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
424
  { extensions: { status: 502 } }
425
425
 
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
426
+ ✓  node  test/pages/pvt/account/cards/index.test.ts (8 tests) 13ms
427
+ ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 9ms
428
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 431ms
430
429
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
431
430
  Graphql execution returned with error: [
432
431
  {
@@ -519,68 +518,69 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
519
518
  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
519
  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
520
 
522
- ✓  node  test/pages/api/graphql.test.ts (17 tests) 33ms
521
+ ✓  node  test/pages/api/graphql.test.ts (17 tests) 21ms
522
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 841ms
523
+ ✓ navigates with the search term on blur  361ms
524
+ ✓ navigates without a label param when the search is cleared  360ms
523
525
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
524
526
  Set password request failed: Bad Request
525
527
 
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
534
- ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 6ms
535
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (12 tests) 8ms
528
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 57ms
529
+ ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 36ms
530
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 11ms
531
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 36ms
532
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 7ms
533
+ ✓  node  test/utils/localization/hreflang.test.ts (8 tests) 5ms
534
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (12 tests) 9ms
536
535
  ✓  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
539
- ✓  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
550
- ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 12ms
551
- ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 4ms
536
+ ✓  node  test/sdk/redirects/index.test.ts (7 tests) 54ms
537
+ ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 137ms
538
+ ✓  node  test/utils/productJsonLd.test.ts (17 tests) 12ms
539
+ ✓  node  test/proxy.localization.test.ts (5 tests) 36ms
540
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 42ms
541
+ ✓  node  test/server/index.test.ts (7 tests) 1001ms
542
+ ✓ should return a valid merged GraphQL schema  315ms
543
+ ✓ should handle options and execute  414ms
544
+ ✓  node  test/sdk/session/syncSalesChannelFromOrderForm.test.ts (6 tests) 7ms
545
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 91ms
546
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 44ms
547
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 48ms
548
+ ✓  node  test/proxy.test.ts (4 tests) 24ms
549
+ ✓  node  test/server/webops-api.test.ts (9 tests) 16ms
550
+ ✓  node  test/sdk/localization/store-url.test.ts (4 tests) 7ms
551
+ ✓  node  test/sdk/cart/waitForSessionValidated.test.ts (5 tests) 17ms
552
+ ✓  node  test/server/content/service.test.ts (5 tests) 8ms
552
553
  ✓  node  test/server/cms/myAccountDefaultSections.test.ts (7 tests) 6ms
553
- ✓  node  test/server/content/service.test.ts (5 tests) 5ms
554
554
  ✓  node  test/utils/productJsonLdRendering.test.tsx (4 tests) 14ms
555
- ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 6ms
555
+ ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 9ms
556
556
  ✓  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
557
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 42ms
558
+ ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 147ms
559
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
560
+ ✓  node  test/server/rootSpan.test.ts (4 tests) 29ms
561
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 9ms
562
562
  ✓  node  test/components/search/SearchInput.test.ts (6 tests) 8ms
563
563
  ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
564
- ✓  node  test/components/account/Layout.test.tsx (6 tests) 59ms
565
- ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 5ms
566
- ✓  node  test/utils/retry.test.ts (5 tests) 14ms
564
+ ✓  node  test/components/account/Layout.test.tsx (6 tests) 54ms
565
+ ✓  node  test/sdk/recommendations/vrn.test.ts (5 tests) 6ms
566
+ ✓  node  test/utils/retry.test.ts (5 tests) 15ms
567
567
  ✓  node  test/server/cms/index.test.ts (2 tests) 5ms
568
568
  ✓  node  test/sdk/account/getB2BSessionClaims.test.ts (4 tests) 5ms
569
569
  ✓  node  test/utils/unlockResponse.test.ts (11 tests) 6ms
570
- ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 5ms
571
- ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 181ms
570
+ ✓  node  test/sdk/recommendations/useRecommendations.test.ts (2 tests) 4ms
571
+ ✓  node  test/sdk/recommendations/useRecommendationUserId.test.ts (4 tests) 191ms
572
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
573
+ ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 3ms
574
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 44ms
575
575
  ✓  node  test/utils/getCookie.test.ts (4 tests) 5ms
576
- ✓  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)
576
+ ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 5ms
577
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 40ms
578
+ ✓  node  test/instrumentation.test.ts (3 tests) 5ms
579
+ ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 12ms
580
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 24ms
581
+
582
+  Test Files  97 passed (97)
583
+  Tests  775 passed (775)
584
+  Start at  19:17:30
585
+  Duration  48.56s (transform 13.76s, setup 0ms, import 44.92s, tests 14.81s, environment 59.81s)
586
586
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
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.0](https://github.com/vtex/faststore/compare/v4.7.1-dev.2...v4.8.0-dev.0) (2026-09-03)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **core:** align mini cart shelf contract with review feedback ([cc8f4a4](https://github.com/vtex/faststore/commit/cc8f4a483fffc6ecdceb5f7c8d97f9568156eeba))
11
+ - **core:** format CartRecommendationShelf Omit union for Biome ([318741d](https://github.com/vtex/faststore/commit/318741d46968426a66b45dc348732ff0a37ac231))
12
+ - **core:** narrow cart shelf props before accessing campaignVrn ([84edae7](https://github.com/vtex/faststore/commit/84edae7a2978bfd6c7a6f5223d4eaf31602dd54a))
13
+ - **core:** satisfy Sonar fragment and Stylelint on the cart shelf ([3423300](https://github.com/vtex/faststore/commit/3423300542f1a478fab856efc070faf333d358d3))
14
+ - **RecommendationShelf:** update README to clarify rendering behavior on empty cart ([c1b0fa9](https://github.com/vtex/faststore/commit/c1b0fa98a5e322b151efc27307e1f34e5c468038))
15
+
16
+ ### Features
17
+
18
+ - **cart:** add recommendations shelf to cart drawer ([879bda5](https://github.com/vtex/faststore/commit/879bda58bcae0094b868d5d8ce5a1b594ae7007f))
19
+ - **cart:** enhance CartRecommendationShelf with new styles and props ([8bb604d](https://github.com/vtex/faststore/commit/8bb604d4cdebdeefb39e9d0a4c0475afc72aed3d))
20
+ - **core:** opt the mini cart shelf in via a CMS display condition ([dec10d0](https://github.com/vtex/faststore/commit/dec10d0cc5b04d64eaf02c27192eeffdaf3eedc5))
21
+ - **RecommendationShelf:** add data attributes for CSS targeting ([ddd5bec](https://github.com/vtex/faststore/commit/ddd5bec44357d85c43dfee4c2162d6e51ee8a06b))
22
+
6
23
  ## [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
24
 
8
25
  **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,