@faststore/core 3.98.1 → 3.98.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 (36) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +21 -21
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/server-production/0.pack +0 -0
  8. package/.next/cache/webpack/server-production/index.pack +0 -0
  9. package/.next/prerender-manifest.js +1 -1
  10. package/.next/prerender-manifest.json +1 -1
  11. package/.next/react-loadable-manifest.json +7 -7
  12. package/.next/routes-manifest.json +1 -1
  13. package/.next/server/chunks/6952.js +1 -1
  14. package/.next/server/functions-config-manifest.json +1 -1
  15. package/.next/server/middleware-build-manifest.js +1 -1
  16. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  17. package/.next/server/pages/en-US/404.html +2 -2
  18. package/.next/server/pages/en-US/500.html +2 -2
  19. package/.next/server/pages/en-US/checkout.html +2 -2
  20. package/.next/server/pages/en-US/login.html +2 -2
  21. package/.next/server/pages/en-US/s.html +2 -2
  22. package/.next/server/pages/en-US.html +2 -2
  23. package/.next/server/pages-manifest.json +1 -1
  24. package/.next/static/chunks/{2927.23bae2c79f0ac0f3.js → 2927.5a79877943a6bf7c.js} +1 -1
  25. package/.next/static/chunks/6943.28874182e20467d5.js +1 -0
  26. package/.next/static/chunks/{UIToast.de15325248043ce5.js → UIToast.19a8664c01a00d3a.js} +1 -1
  27. package/.next/static/chunks/{webpack-65aaab35b48b2a75.js → webpack-e3703857dd8c6937.js} +1 -1
  28. package/.next/trace +142 -142
  29. package/.turbo/turbo-build.log +9 -9
  30. package/.turbo/turbo-test.log +6 -6
  31. package/CHANGELOG.md +6 -0
  32. package/package.json +2 -2
  33. package/src/components/ui/ProductGallery/ProductGalleryPage.tsx +3 -1
  34. package/.next/static/chunks/6943.6bc97e925b54493d.js +0 -1
  35. /package/.next/static/{uZPcgYJWswe9MgYD7btga → RhuP_UJjSrpDj_sqLfUA9}/_buildManifest.js +0 -0
  36. /package/.next/static/{uZPcgYJWswe9MgYD7btga → RhuP_UJjSrpDj_sqLfUA9}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.98.0 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.98.1 prebuild /home/runner/work/faststore/faststore/packages/core
3
3
  > na run partytown && na run generate
4
4
 
5
5
 
6
- > @faststore/core@3.98.0 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.98.1 partytown /home/runner/work/faststore/faststore/packages/core
7
7
  > partytown copylib ./public/~partytown
8
8
 
9
9
  Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
10
10
 
11
- > @faststore/core@3.98.0 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.98.1 generate /home/runner/work/faststore/faststore/packages/core
12
12
  > na run generate:schema && na run generate:codegen && na run format:generated
13
13
 
14
14
 
15
- > @faststore/core@3.98.0 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.98.1 generate:schema /home/runner/work/faststore/faststore/packages/core
16
16
  > tsx src/server/generator/generateGraphQLSchemaFile.ts
17
17
 
18
18
  Schema GraphQL file generated successfully
19
19
 
20
- > @faststore/core@3.98.0 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.98.1 generate:codegen /home/runner/work/faststore/faststore/packages/core
21
21
  > graphql-codegen
22
22
 
23
23
  [STARTED] Parse Configuration
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
37
37
  [CLI] Loading Documents
38
38
  [CLI] Generating output
39
39
 
40
- > @faststore/core@3.98.0 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.98.1 format:generated /home/runner/work/faststore/faststore/packages/core
41
41
  > prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
42
42
 
43
43
 
44
- > @faststore/core@3.98.0 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.98.1 build /home/runner/work/faststore/faststore/packages/core
45
45
  > next build
46
46
 
47
47
  ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
@@ -58,9 +58,9 @@ https://nextjs.org/telemetry
58
58
  ✓ Compiled successfully
59
59
  Collecting page data ...
60
60
  Generating static pages (0/6) ...
61
- Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
62
61
 
63
62
  Generating static pages (1/6)
64
63
 
65
64
  Generating static pages (2/6)
65
+ Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
66
66
 
67
67
  Generating static pages (4/6)
68
68
 
69
69
  ✓ Generating static pages (6/6)
70
70
  Finalizing page optimization ...
@@ -104,7 +104,7 @@ Route (pages) Size First Load JS
104
104
  ├ chunks/framework-d514426edf885c68.js 45.4 kB
105
105
  ├ chunks/main-edeb2c6a5c48bb3f.js 33.2 kB
106
106
  ├ chunks/pages/_app-735c745509e1e8d6.js 26.1 kB
107
- ├ chunks/webpack-65aaab35b48b2a75.js 3.89 kB
107
+ ├ chunks/webpack-e3703857dd8c6937.js 3.89 kB
108
108
  └ css/8a513f4b536b0ab0.css 9.18 kB
109
109
 
110
110
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,17 +1,17 @@
1
1
 
2
- > @faststore/core@3.98.0 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.98.1 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/utils/multipleTemplates.test.ts (12.442 s)
6
- PASS test/utils/clearCookies.test.ts (12.382 s)
5
+ PASS test/utils/multipleTemplates.test.ts (12.773 s)
6
+ PASS test/utils/clearCookies.test.ts (12.588 s)
7
7
  PASS test/server/cms/global.test.ts
8
8
  PASS test/utils/cookieCacheBusting.test.ts
9
- PASS test/server/cms/index.test.ts (5.061 s)
10
- PASS test/server/index.test.ts (25.325 s)
9
+ PASS test/server/cms/index.test.ts (5.667 s)
10
+ PASS test/server/index.test.ts (23.994 s)
11
11
  A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
12
12
 
13
13
  Test Suites: 6 passed, 6 total
14
14
  Tests: 47 passed, 47 total
15
15
  Snapshots: 0 total
16
- Time: 26.429 s
16
+ Time: 25.315 s
17
17
  Ran all test suites.
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
+ ## [3.98.2](https://github.com/vtex/faststore/compare/v3.98.1...v3.98.2) (2026-04-09)
7
+
8
+ ### Bug Fixes
9
+
10
+ - unsafe props ternary ([#3254](https://github.com/vtex/faststore/issues/3254)) ([00f35b5](https://github.com/vtex/faststore/commit/00f35b5b49a756b6de84d1739ae157e3f074f01e))
11
+
6
12
  ## [3.98.1](https://github.com/vtex/faststore/compare/v3.98.0...v3.98.1) (2026-04-07)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.98.1",
3
+ "version": "3.98.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -124,5 +124,5 @@
124
124
  "ts-jest": "29.1.1",
125
125
  "typescript": "5.3.2"
126
126
  },
127
- "gitHead": "e985fbb66dd4c0d4a423cd3ca57d23e82cf0e4d4"
127
+ "gitHead": "74fa74288786a31a82615d9e5db1ec85dd85d918"
128
128
  }
@@ -63,7 +63,9 @@ function ProductGalleryPage({
63
63
  firstPage={firstPage}
64
64
  title={title}
65
65
  searchId={searchId}
66
- buildExtraProductProps={searchId && buildExtraProductProps}
66
+ buildExtraProductProps={
67
+ (searchId && buildExtraProductProps) || undefined
68
+ }
67
69
  />
68
70
  </Sentinel>
69
71
  )
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6943],{56943:function(e,t,r){r.r(t),r.d(t,{default:function(){return _}});var n=r(47723),i=r(49115),o=r(11347),s=r(22839),a=r(44194),c=r(96972),d=r(96991),u=r(6099),l=r(26410),p=r(93513),h=new Set,f=[],g=null,v=r(31549),product_ProductSentinel=function(e){var{product:t,title:r,page:n,pageSize:i,children:o}=e,{ref:s,inView:c}=(0,l.YD)(),{sendViewItemListEvent:d}=(0,p.m)({title:r,page:n,pageSize:i});return(0,a.useEffect)(()=>{c&&function(e){var{product:t,sendViewItemListEvent:r}=e;h.has(t.id)||(h.add(t.id),f.push({node:t}),g&&clearTimeout(g),g=setTimeout(()=>{f.length>0&&(r({products:f}),f=[])},300))}({product:t,sendViewItemListEvent:d})},[c,t]),(0,v.jsx)("div",{ref:s,style:{minHeight:"15.225rem"},children:o})};function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var b=(0,a.memo)(function(e){var{products:t,page:r,pageSize:n,productCard:{showDiscountBadge:a,bordered:l,taxesConfiguration:p,sponsoredLabel:h}={},firstPage:f,shouldShowComparison:g,compareLabel:b,title:m,searchId:w,buildExtraProductProps:y=()=>({})}=e,{isMobile:_}=(0,u.Z)(),{__experimentalProductCard:V}=(0,d.r3)();return(0,v.jsx)(s.Z,{aspectRatio:1,loading:0===t.length,children:(0,v.jsx)(i.Z,{"data-af-element":w&&"search-result","data-af-onimpression":!!w,"data-af-search-id":w,children:_&&f===r?(0,v.jsxs)(v.Fragment,{children:[t.slice(0,2).map((e,t)=>{var{node:i}=e;return(0,v.jsx)(o.Z,{children:(0,v.jsx)(product_ProductSentinel,{product:i,title:m,page:r,pageSize:n,children:(0,v.jsx)(V.Component,_objectSpread(_objectSpread({enableCompareCheckbox:g,compareLabel:b,aspectRatio:1,imgProps:{width:150,height:150,sizes:"30vw",loading:"eager"}},V.props),{},{bordered:null!=l?l:V.props.bordered,showDiscountBadge:null!=a?a:V.props.showDiscountBadge,product:i,index:n*r+t+1,taxesConfiguration:p,sponsoredLabel:h},y(i,t,w)))})},"".concat(i.id))}),(0,v.jsx)(c.Z,{sectionName:"UIProductGrid-out-viewport",children:t.slice(2).map((e,t)=>{var{node:i}=e;return(0,v.jsx)(o.Z,{children:(0,v.jsx)(product_ProductSentinel,{product:i,title:m,page:r,pageSize:n,children:(0,v.jsx)(V.Component,_objectSpread(_objectSpread({enableCompareCheckbox:g,compareLabel:b,aspectRatio:1,imgProps:{width:150,height:150,sizes:"30vw",loading:"lazy"}},V.props),{},{bordered:null!=l?l:V.props.bordered,showDiscountBadge:null!=a?a:V.props.showDiscountBadge,product:i,index:n*r+t+1,taxesConfiguration:p,sponsoredLabel:h},y(i,t,w)))})},"".concat(i.id))})})]}):(0,v.jsx)(v.Fragment,{children:t.map((e,t)=>{var{node:i}=e;return(0,v.jsx)(o.Z,{children:(0,v.jsx)(product_ProductSentinel,{product:i,title:m,page:r,pageSize:n,children:(0,v.jsx)(V.Component,_objectSpread(_objectSpread({enableCompareCheckbox:g,compareLabel:b,aspectRatio:1,imgProps:{width:150,height:150,sizes:"30vw",loading:0===t?"eager":"lazy"}},V.props),{},{bordered:null!=l?l:V.props.bordered,showDiscountBadge:null!=a?a:V.props.showDiscountBadge,product:i,index:n*r+t+1,taxesConfiguration:p,sponsoredLabel:h},y(i,t,w)))})},"".concat(i.id))})})})})}),m=r(69029),w=r(94122),replacePagination=(e,t)=>{var r=new URL(window.location.href);r.searchParams.get("page")!==e&&(r.searchParams.set("page",e),t.replace(r,void 0,{shallow:!0,scroll:!1}))},search_Sentinel=function(e){var{page:t,children:r}=e,n=(0,w.useRouter)(),{pages:i}=(0,m.R)(),{ref:o,inView:s}=(0,l.YD)({threshold:[.3,.7],triggerOnce:!1});return(0,a.useEffect)(()=>{s&&i.length>1&&replacePagination(t.toString(),n)},[i.length,s,t]),(0,v.jsx)("div",{ref:o,children:r})},y=r(15688);function buildExtraProductProps(e,t,r){return{"data-af-element":"search-result","data-af-onclick":e&&!!e.productId,"data-af-search-id":r,"data-af-product-position":Number(null!=t?t:0)+1,"data-af-product-id":e&&e.productId}}var _=(0,a.memo)(function(e){var t,r,n,i,{page:o,title:s,productCard:a,itemsPerPage:c,firstPage:d,shouldShowComparison:u,compareLabel:l}=e,{data:p}=(0,y.__)(o),h=null!==(t=null==p?void 0:null===(r=p.search)||void 0===r?void 0:null===(n=r.products)||void 0===n?void 0:n.edges)&&void 0!==t?t:[],f=null==p?void 0:null===(i=p.search)||void 0===i?void 0:i.searchId;return(0,v.jsx)(search_Sentinel,{products:h,page:o,pageSize:c,title:s,children:(0,v.jsx)(b,{shouldShowComparison:u,compareLabel:l,products:h,page:o,pageSize:c,productCard:a,firstPage:d,title:s,searchId:f,buildExtraProductProps:f&&buildExtraProductProps})})})},93513:function(e,t,r){r.d(t,{m:function(){return useViewItemListEvent}});var n=r(44194),i=r(12306),useViewItemListEvent=e=>{var{products:t,title:o,page:s,pageSize:a}=e,{currency:{code:c}}=(0,i.kP)();return{sendViewItemListEvent:(0,n.useCallback)(e=>{var n=null!=t&&t.length?t:null==e?void 0:e.products;n&&0!==n.length&&r.e(9399).then(r.bind(r,66393)).then(e=>{var{sendAnalyticsEvent:t}=e;t({name:"view_item_list",params:{item_list_name:o,item_list_id:o,items:n.map((e,t)=>{var{node:r}=e;return{item_id:r.isVariantOf.productGroupID,item_name:r.isVariantOf.name,item_brand:r.brand.name,item_variant:r.sku,price:r.offers.offers[0].price,index:s*a+t+1,discount:r.offers.offers[0].listPrice-r.offers.offers[0].price,currency:c,item_variant_name:r.name,product_reference_id:r.gtin}})}})})},[c,t,o,s,a])}}},26410:function(e,t,r){r.d(t,{YD:function(){return useInView},df:function(){return d}});var n=r(44194);function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i=new Map,o=new WeakMap,s=0,a=void 0;function observe(e,t,r,n){if(void 0===r&&(r={}),void 0===n&&(n=a),void 0===window.IntersectionObserver&&void 0!==n){var c=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:c,intersectionRect:c,rootBounds:c}),function(){}}var d=function(e){var t=Object.keys(e).sort().filter(function(t){return void 0!==e[t]}).map(function(t){var r;return t+"_"+("root"===t?(r=e.root)?(o.has(r)||(s+=1,o.set(r,s.toString())),o.get(r)):"0":e[t])}).toString(),r=i.get(t);if(!r){var n,a=new Map,c=new IntersectionObserver(function(t){t.forEach(function(t){var r,i=t.isIntersecting&&n.some(function(e){return t.intersectionRatio>=e});e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(r=a.get(t.target))||r.forEach(function(e){e(i,t)})})},e);n=c.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:c,elements:a},i.set(t,r)}return r}(r),u=d.id,l=d.observer,p=d.elements,h=p.get(e)||[];return p.has(e)||p.set(e,h),h.push(t),l.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(p.delete(e),l.unobserve(e)),0===p.size&&(l.disconnect(),i.delete(u))}}var c=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function isPlainChildren(e){return"function"!=typeof e.children}var d=function(e){function InView(t){var r;return(r=e.call(this,t)||this).node=null,r._unobserveCb=null,r.handleNode=function(e){!r.node||(r.unobserve(),e||r.props.triggerOnce||r.props.skip||r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=e||null,r.observeNode()},r.handleChange=function(e,t){e&&r.props.triggerOnce&&r.unobserve(),isPlainChildren(r.props)||r.setState({inView:e,entry:t}),r.props.onChange&&r.props.onChange(e,t)},r.state={inView:!!t.initialInView,entry:void 0},r}InView.prototype=Object.create(e.prototype),InView.prototype.constructor=InView,_setPrototypeOf(InView,e);var t=InView.prototype;return t.componentDidUpdate=function(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,r=e.root,n=e.rootMargin,i=e.trackVisibility,o=e.delay,s=e.fallbackInView;this._unobserveCb=observe(this.node,this.handleChange,{threshold:t,root:r,rootMargin:n,trackVisibility:i,delay:o},s)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!isPlainChildren(this.props)){var e=this.state,t=e.inView,r=e.entry;return this.props.children({inView:t,entry:r,ref:this.handleNode})}var i=this.props,o=i.children,s=i.as,a=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(i,c);return n.createElement(s||"div",_extends({ref:this.handleNode},a),o)},InView}(n.Component);function useInView(e){var t=void 0===e?{}:e,r=t.threshold,i=t.delay,o=t.trackVisibility,s=t.rootMargin,a=t.root,c=t.triggerOnce,d=t.skip,u=t.initialInView,l=t.fallbackInView,p=n.useRef(),h=n.useState({inView:!!u}),f=h[0],g=h[1],v=n.useCallback(function(e){void 0!==p.current&&(p.current(),p.current=void 0),!d&&e&&(p.current=observe(e,function(e,t){g({inView:e,entry:t}),t.isIntersecting&&c&&p.current&&(p.current(),p.current=void 0)},{root:a,rootMargin:s,threshold:r,trackVisibility:o,delay:i},l))},[Array.isArray(r)?r.toString():r,a,s,c,d,o,l,i]);(0,n.useEffect)(function(){p.current||!f.entry||c||d||g({inView:!!u})});var b=[v,f.inView,f.entry];return b.ref=b[0],b.inView=b[1],b.entry=b[2],b}d.displayName="InView",d.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1}},49115:function(e,t,r){var n=r(44194);let i=(0,n.forwardRef)(function({testId:e="fs-product-grid",children:t,...r},i){return n.createElement("ul",{ref:i,"data-fs-product-grid":!0,...r},t)});t.Z=i},11347:function(e,t,r){var n=r(44194);let i=(0,n.forwardRef)(function({testId:e="fs-product-grid-item",children:t,...r},i){return n.createElement("li",{ref:i,"data-fs-product-grid-item":!0,...r},t)});t.Z=i}}]);