@faststore/core 3.22.0 → 3.22.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 (37) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +15 -15
  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 +1 -1
  12. package/.next/routes-manifest.json +1 -1
  13. package/.next/server/middleware-build-manifest.js +1 -1
  14. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  15. package/.next/server/pages/[...slug].js +1 -1
  16. package/.next/server/pages/[slug]/p.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/account.html +2 -2
  20. package/.next/server/pages/en-US/checkout.html +2 -2
  21. package/.next/server/pages/en-US/login.html +2 -2
  22. package/.next/server/pages/en-US/s.html +2 -2
  23. package/.next/server/pages/en-US.html +2 -2
  24. package/.next/server/pages-manifest.json +1 -1
  25. package/.next/static/{sxcpSwMDDcw9l49pgSihn → NZUdW56e32JN9U7GbiDWk}/_buildManifest.js +1 -1
  26. package/.next/static/chunks/{1552.e7cece605fc2e1cd.js → 1552.b5a073e7ac834965.js} +1 -1
  27. package/.next/static/chunks/pages/{[...slug]-de4989a17e31600b.js → [...slug]-da7d9dc180306001.js} +1 -1
  28. package/.next/static/chunks/pages/[slug]/{p-69513544fba08477.js → p-ce4cf864661e2340.js} +1 -1
  29. package/.next/static/chunks/{webpack-73f875a3fea96a4a.js → webpack-d75fedf95eeeadf6.js} +1 -1
  30. package/.next/trace +121 -121
  31. package/.turbo/turbo-build.log +11 -11
  32. package/.turbo/turbo-test.log +5 -5
  33. package/CHANGELOG.md +4 -0
  34. package/package.json +2 -2
  35. package/src/components/templates/ProductListingPage/ProductListingPage.tsx +12 -3
  36. package/src/pages/[slug]/p.tsx +12 -3
  37. /package/.next/static/{sxcpSwMDDcw9l49pgSihn → NZUdW56e32JN9U7GbiDWk}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.21.0 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.22.0 prebuild /home/runner/work/faststore/faststore/packages/core
3
3
  > na run partytown && na run generate
4
4
 
5
5
 
6
- > @faststore/core@3.21.0 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.22.0 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.21.0 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.22.0 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.21.0 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.22.0 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.21.0 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.22.0 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.21.0 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.22.0 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.21.0 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.22.0 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
@@ -59,10 +59,10 @@ https://nextjs.org/telemetry
59
59
  Collecting page data ...
60
60
  Generating static pages (0/7) ...
61
61
 
62
62
  Generating static pages (1/7)
63
- 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.
64
- CustomModalFooterSection not found. Add a new component for this section or remove it from the CMS
65
63
 
66
64
  Generating static pages (3/7)
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.
67
66
 
68
67
  Generating static pages (5/7)
68
+ CustomModalFooterSection not found. Add a new component for this section or remove it from the CMS
69
69
 
70
70
  ✓ Generating static pages (7/7)
71
71
  Finalizing page optimization ...
72
72
  Collecting build traces ...
@@ -71,7 +71,7 @@ Route (pages) Size First Load JS
71
71
  ┌ ● / 3.87 kB 124 kB
72
72
  ├ └ css/b1806cbafd0c1f81.css 3.06 kB
73
73
  ├ /_app 0 B 92.2 kB
74
- ├ ● /[...slug] 2.1 kB 132 kB
74
+ ├ ● /[...slug] 2.15 kB 132 kB
75
75
  ├ ● /[slug]/p 34.9 kB 155 kB
76
76
  ├ ├ css/a3ca6a9b63f657be.css 5.75 kB
77
77
  ├ ├ css/62a5153ac7061286.css 6.11 kB
@@ -90,7 +90,7 @@ Route (pages) Size First Load JS
90
90
  ├ chunks/framework-807b0f81cbc129f0.js 45.4 kB
91
91
  ├ chunks/main-1617ca75abfe1b79.js 33.1 kB
92
92
  ├ chunks/pages/_app-859f97f9c8a57799.js 10.2 kB
93
- ├ chunks/webpack-73f875a3fea96a4a.js 3.58 kB
93
+ ├ chunks/webpack-d75fedf95eeeadf6.js 3.58 kB
94
94
  └ css/2eafb8997a3946dc.css 3.07 kB
95
95
 
96
96
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,13 +1,13 @@
1
1
 
2
- > @faststore/core@3.21.0 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.22.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/utils/multipleTemplates.test.ts (29.472 s)
6
- PASS test/server/cms/index.test.ts (29.534 s)
7
- PASS test/server/index.test.ts (34.249 s)
5
+ PASS test/utils/multipleTemplates.test.ts (29.245 s)
6
+ PASS test/server/cms/index.test.ts (29.463 s)
7
+ PASS test/server/index.test.ts (33.696 s)
8
8
 
9
9
  Test Suites: 3 passed, 3 total
10
10
  Tests: 19 passed, 19 total
11
11
  Snapshots: 0 total
12
- Time: 35.171 s
12
+ Time: 34.608 s
13
13
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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.22.1](https://github.com/vtex/faststore/compare/v3.22.0...v3.22.1) (2025-02-18)
7
+
8
+ **Note:** Version bump only for package @faststore/core
9
+
6
10
  # [3.22.0](https://github.com/vtex/faststore/compare/v3.21.0...v3.22.0) (2025-02-18)
7
11
 
8
12
  **Note:** Version bump only for package @faststore/core
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.22.0",
3
+ "version": "3.22.1",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -103,5 +103,5 @@
103
103
  "ts-jest": "29.1.1",
104
104
  "typescript": "5.3.2"
105
105
  },
106
- "gitHead": "c06b27a4839b7fc14b4e5a3ba0f6d865bd78706c"
106
+ "gitHead": "9139477e837f111cd555a7e106c232f24f8ef157"
107
107
  }
@@ -82,6 +82,17 @@ export default function ProductListingPage({
82
82
  const canonical = `${storeConfig.storeUrl}${pathname}`
83
83
  const itemsPerPage = settings?.productGallery?.itemsPerPage ?? ITEMS_PER_PAGE
84
84
 
85
+ let itemListElements = collection?.breadcrumbList.itemListElement ?? []
86
+ if (itemListElements.length !== 0) {
87
+ itemListElements = itemListElements.map(
88
+ ({ item: pathname, name, position }) => {
89
+ const pageUrl = storeConfig.storeUrl + pathname
90
+
91
+ return { name, position, item: pageUrl }
92
+ }
93
+ )
94
+ }
95
+
85
96
  return (
86
97
  <SearchProvider
87
98
  onChange={applySearchState}
@@ -100,9 +111,7 @@ export default function ProductListingPage({
100
111
  description,
101
112
  }}
102
113
  />
103
- <BreadcrumbJsonLd
104
- itemListElements={collection?.breadcrumbList.itemListElement ?? []}
105
- />
114
+ <BreadcrumbJsonLd itemListElements={itemListElements} />
106
115
 
107
116
  <ProductListing
108
117
  globalSections={globalSections}
@@ -85,6 +85,17 @@ function Page({ data: server, sections, globalSections, offers, meta }: Props) {
85
85
  const { currency } = useSession()
86
86
  const titleTemplate = storeConfig?.seo?.titleTemplate ?? ''
87
87
 
88
+ let itemListElements = product.breadcrumbList.itemListElement ?? []
89
+ if (itemListElements.length !== 0) {
90
+ itemListElements = itemListElements.map(
91
+ ({ item: pathname, name, position }) => {
92
+ const pageUrl = storeConfig.storeUrl + pathname
93
+
94
+ return { name, position, item: pageUrl }
95
+ }
96
+ )
97
+ }
98
+
88
99
  const { client, isValidating } = isClientOfferEnabled
89
100
  ? (() => {
90
101
  const offer = useOffer({ skuId: product.sku })
@@ -148,9 +159,7 @@ function Page({ data: server, sections, globalSections, offers, meta }: Props) {
148
159
  ]}
149
160
  titleTemplate={titleTemplate}
150
161
  />
151
- <BreadcrumbJsonLd
152
- itemListElements={product.breadcrumbList.itemListElement}
153
- />
162
+ <BreadcrumbJsonLd itemListElements={itemListElements} />
154
163
  <ProductJsonLd
155
164
  productName={product.name}
156
165
  description={product.description}