@faststore/core 3.24.1 → 3.25.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 (33) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  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/routes-manifest.json +1 -1
  12. package/.next/server/middleware-build-manifest.js +1 -1
  13. package/.next/server/pages/[slug]/p.js +1 -1
  14. package/.next/server/pages/en-US/404.html +2 -2
  15. package/.next/server/pages/en-US/500.html +2 -2
  16. package/.next/server/pages/en-US/account.html +2 -2
  17. package/.next/server/pages/en-US/checkout.html +2 -2
  18. package/.next/server/pages/en-US/login.html +2 -2
  19. package/.next/server/pages/en-US/s.html +2 -2
  20. package/.next/server/pages/en-US.html +2 -2
  21. package/.next/server/pages-manifest.json +1 -1
  22. package/.next/static/chunks/pages/[slug]/{p-ce4cf864661e2340.js → p-d1fa1e8ec5f56258.js} +1 -1
  23. package/.next/static/{qaRgicHUu7U8273um8QDo → xFMavnYzxbyJIPBYXRA5h}/_buildManifest.js +1 -1
  24. package/.next/trace +121 -121
  25. package/.turbo/turbo-build.log +9 -9
  26. package/.turbo/turbo-test.log +5 -5
  27. package/CHANGELOG.md +10 -0
  28. package/cms/faststore/content-types.json +23 -0
  29. package/index.ts +1 -0
  30. package/package.json +2 -2
  31. package/src/pages/[slug]/p.tsx +13 -1
  32. package/src/server/cms/pdp.ts +4 -0
  33. /package/.next/static/{qaRgicHUu7U8273um8QDo → xFMavnYzxbyJIPBYXRA5h}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.24.0 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.25.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.24.0 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.25.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.24.0 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.25.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.24.0 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.25.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.24.0 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.25.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.24.0 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.25.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.24.0 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.25.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
@@ -60,9 +60,9 @@ https://nextjs.org/telemetry
60
60
  Generating static pages (0/7) ...
61
61
 
62
62
  Generating static pages (1/7)
63
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
64
65
 
65
66
  Generating static pages (3/7)
66
67
 
67
68
  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 ...
@@ -72,7 +72,7 @@ Route (pages) Size First Load JS
72
72
  ├ └ css/b1806cbafd0c1f81.css 3.06 kB
73
73
  ├ /_app 0 B 92.2 kB
74
74
  ├ ● /[...slug] 2.15 kB 132 kB
75
- ├ ● /[slug]/p 34.9 kB 155 kB
75
+ ├ ● /[slug]/p 35 kB 155 kB
76
76
  ├ ├ css/a3ca6a9b63f657be.css 5.75 kB
77
77
  ├ ├ css/62a5153ac7061286.css 6.11 kB
78
78
  ├ └ css/dd6a7e5b229ea65e.css 15.7 kB
@@ -1,14 +1,14 @@
1
1
 
2
- > @faststore/core@3.24.0 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.25.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/utils/multipleTemplates.test.ts (29.24 s)
6
- PASS test/server/cms/global.test.ts (29.462 s)
5
+ PASS test/utils/multipleTemplates.test.ts (30.162 s)
6
+ PASS test/server/cms/global.test.ts (30.187 s)
7
7
  PASS test/server/cms/index.test.ts
8
- PASS test/server/index.test.ts (34.523 s)
8
+ PASS test/server/index.test.ts (34.808 s)
9
9
 
10
10
  Test Suites: 4 passed, 4 total
11
11
  Tests: 22 passed, 22 total
12
12
  Snapshots: 0 total
13
- Time: 35.733 s
13
+ Time: 35.965 s
14
14
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
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.25.1](https://github.com/vtex/faststore/compare/v3.25.0...v3.25.1) (2025-02-28)
7
+
8
+ **Note:** Version bump only for package @faststore/core
9
+
10
+ # [3.25.0](https://github.com/vtex/faststore/compare/v3.24.1...v3.25.0) (2025-02-28)
11
+
12
+ ### Features
13
+
14
+ - Add `category`, `mainEntityOfPage` and `[@id](https://github.com/id)` to Product structured data ([#2694](https://github.com/vtex/faststore/issues/2694)) ([1e9f81e](https://github.com/vtex/faststore/commit/1e9f81eb85ad4d40f64181967940ef629d979a4a))
15
+
6
16
  ## [3.24.1](https://github.com/vtex/faststore/compare/v3.24.0...v3.24.1) (2025-02-26)
7
17
 
8
18
  ### Bug Fixes
@@ -242,6 +242,29 @@
242
242
  }
243
243
  }
244
244
  }
245
+ },
246
+ {
247
+ "name": "seo",
248
+ "schema": {
249
+ "title": "SEO",
250
+ "description": "Search Engine Optimization options",
251
+ "type": "object",
252
+ "widget": {
253
+ "ui:ObjectFieldTemplate": "GoogleSeoPreview"
254
+ },
255
+ "properties": {
256
+ "id": {
257
+ "title": "ID",
258
+ "description": "A unique identifier used to reference the product page. This is a descriptive value (e.g., `#product`) that will be concatenated with the product path (example of the result: `/product-slug/p#product`).",
259
+ "type": "string"
260
+ },
261
+ "mainEntityOfPage": {
262
+ "title": "Main entity of page",
263
+ "description": "Indicates the main entity of the page. A unique identifier used to reference the product page. This is a descriptive value (e.g., `#webpage`) that will be concatenated with the product path (example of the result: `/product-slug/p#webpage`).",
264
+ "type": "string"
265
+ }
266
+ }
267
+ }
245
268
  }
246
269
  ]
247
270
  }
package/index.ts CHANGED
@@ -24,3 +24,4 @@ export { default as ProductDetailsSection } from './src/components/sections/Prod
24
24
  export { default as ProductGallerySection } from './src/components/sections/ProductGallery'
25
25
  export { default as ProductShelfSection } from './src/components/sections/ProductShelf'
26
26
  export { default as RegionBarSection } from './src/components/sections/RegionBar'
27
+ export { default as Section } from './src/components/sections/Section'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.24.1",
3
+ "version": "3.25.1",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -104,5 +104,5 @@
104
104
  "ts-jest": "29.1.1",
105
105
  "typescript": "5.3.2"
106
106
  },
107
- "gitHead": "2bc0845e5cae764416a12f62d015a41b72900081"
107
+ "gitHead": "81b94ec9adbbce8cde765c5309aeba8c43deb40a"
108
108
  }
@@ -81,7 +81,14 @@ const overwriteMerge = (_: any[], sourceArray: any[]) => sourceArray
81
81
  const isClientOfferEnabled = (storeConfig as StoreConfig).experimental
82
82
  .enableClientOffer
83
83
 
84
- function Page({ data: server, sections, globalSections, offers, meta }: Props) {
84
+ function Page({
85
+ data: server,
86
+ sections,
87
+ settings,
88
+ globalSections,
89
+ offers,
90
+ meta,
91
+ }: Props) {
85
92
  const { product } = server
86
93
  const { currency } = useSession()
87
94
  const titleTemplate = storeConfig?.seo?.titleTemplate ?? ''
@@ -162,6 +169,8 @@ function Page({ data: server, sections, globalSections, offers, meta }: Props) {
162
169
  />
163
170
  <BreadcrumbJsonLd itemListElements={itemListElements} />
164
171
  <ProductJsonLd
172
+ id={`${meta.canonical}${settings?.seo?.id ?? ''}`}
173
+ mainEntityOfPage={`${meta.canonical}${settings?.seo?.mainEntityOfPage ?? ''}`}
165
174
  productName={product.name}
166
175
  description={product.description}
167
176
  brand={product.brand.name}
@@ -170,6 +179,9 @@ function Page({ data: server, sections, globalSections, offers, meta }: Props) {
170
179
  releaseDate={product.releaseDate}
171
180
  images={product.image.map((img) => img.url)} // Somehow, Google does not understand this valid Schema.org schema, so we need to do conversions
172
181
  offers={offers}
182
+ {...(itemListElements.length !== 0 && {
183
+ category: itemListElements[0].name,
184
+ })}
173
185
  />
174
186
 
175
187
  {/*
@@ -10,6 +10,10 @@ type PDPSettings = {
10
10
  template?: {
11
11
  value?: string
12
12
  }
13
+ seo?: {
14
+ id?: string
15
+ mainEntityOfPage?: string
16
+ }
13
17
  }
14
18
  }
15
19