@faststore/core 3.25.11 → 3.26.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 (40) 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/chunks/1506.js +1 -1
  14. package/.next/server/chunks/3117.js +1 -1
  15. package/.next/server/chunks/8646.js +1 -1
  16. package/.next/server/middleware-build-manifest.js +1 -1
  17. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  18. package/.next/server/pages/[slug]/p.js +1 -1
  19. package/.next/server/pages/api/graphql.js +1 -1
  20. package/.next/server/pages/en-US/404.html +2 -2
  21. package/.next/server/pages/en-US/500.html +2 -2
  22. package/.next/server/pages/en-US/account.html +2 -2
  23. package/.next/server/pages/en-US/checkout.html +2 -2
  24. package/.next/server/pages/en-US/login.html +2 -2
  25. package/.next/server/pages/en-US/s.html +2 -2
  26. package/.next/server/pages/en-US.html +2 -2
  27. package/.next/server/pages-manifest.json +1 -1
  28. package/.next/static/chunks/{1552.e7cece605fc2e1cd.js → 1552.b5a073e7ac834965.js} +1 -1
  29. package/.next/static/chunks/pages/[slug]/{p-544fb67934142cef.js → p-346bad0ceffea256.js} +1 -1
  30. package/.next/static/chunks/pages/{_app-0cbfeeafc012ff6a.js → _app-8edc24e5a6106da1.js} +1 -1
  31. package/.next/static/chunks/{webpack-c865c630c4702255.js → webpack-6bd10a59b4f16f37.js} +1 -1
  32. package/.next/static/{2yvAWpcX0n0jvPKiPqp_Z → p3o6EokeZKkS1TziwSv4N}/_buildManifest.js +1 -1
  33. package/.next/trace +121 -121
  34. package/.turbo/turbo-build.log +9 -9
  35. package/.turbo/turbo-test.log +5 -5
  36. package/CHANGELOG.md +6 -0
  37. package/discovery.config.default.js +4 -0
  38. package/package.json +8 -8
  39. package/src/pages/[slug]/p.tsx +17 -7
  40. /package/.next/static/{2yvAWpcX0n0jvPKiPqp_Z → p3o6EokeZKkS1TziwSv4N}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.25.10 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.25.11 prebuild /home/runner/work/faststore/faststore/packages/core
3
3
  > na run partytown && na run generate
4
4
 
5
5
 
6
- > @faststore/core@3.25.10 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.25.11 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.25.10 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.25.11 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.25.10 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.25.11 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.25.10 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.25.11 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.25.10 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.25.11 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.25.10 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.25.11 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
@@ -89,8 +89,8 @@ Route (pages) Size First Load JS
89
89
  + First Load JS shared by all 95.7 kB
90
90
  ├ chunks/framework-807b0f81cbc129f0.js 45.4 kB
91
91
  ├ chunks/main-5569625b3fdd6741.js 33.1 kB
92
- ├ chunks/pages/_app-0cbfeeafc012ff6a.js 10.2 kB
93
- ├ chunks/webpack-c865c630c4702255.js 3.58 kB
92
+ ├ chunks/pages/_app-8edc24e5a6106da1.js 10.2 kB
93
+ ├ chunks/webpack-6bd10a59b4f16f37.js 3.58 kB
94
94
  └ css/0a57ee6c7a57788c.css 3.49 kB
95
95
 
96
96
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,14 +1,14 @@
1
1
 
2
- > @faststore/core@3.25.10 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.25.11 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/server/cms/global.test.ts (24.07 s)
6
- PASS test/utils/multipleTemplates.test.ts (24.779 s)
5
+ PASS test/server/cms/global.test.ts (23.761 s)
6
+ PASS test/utils/multipleTemplates.test.ts (23.869 s)
7
7
  PASS test/server/cms/index.test.ts
8
- PASS test/server/index.test.ts (30.219 s)
8
+ PASS test/server/index.test.ts (27.929 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: 31.333 s
13
+ Time: 29.207 s
14
14
  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.26.0 (2025-03-19)
7
+
8
+ ### Features
9
+
10
+ - Add SEO specifics for PDP ([#2730](https://github.com/vtex/faststore/issues/2730)) ([f2a0420](https://github.com/vtex/faststore/commit/f2a0420d6af360e2668641b38d4eae71419b1d72)), closes [vtex-sites/starter.store#724](https://github.com/vtex-sites/starter.store/issues/724)
11
+
6
12
  ## [3.25.11](https://github.com/vtex/faststore/compare/v3.25.10...v3.25.11) (2025-03-17)
7
13
 
8
14
  **Note:** Version bump only for package @faststore/core
@@ -10,6 +10,10 @@ module.exports = {
10
10
  titleTemplate: '%s | FastStore PLP',
11
11
  descriptionTemplate: '%s products on FastStore Product Listing Page',
12
12
  },
13
+ pdp: {
14
+ titleTemplate: '%s | FastStore PDP',
15
+ descriptionTemplate: '%s products on FastStore Product Detail Page',
16
+ },
13
17
  search: {
14
18
  titleTemplate: '%s: Search results title',
15
19
  descriptionTemplate: '%s: Search results description',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.25.11",
3
+ "version": "3.26.0",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -44,12 +44,12 @@
44
44
  "@envelop/graphql-jit": "^8.0.3",
45
45
  "@envelop/parser-cache": "^6.0.2",
46
46
  "@envelop/validation-cache": "^6.0.2",
47
- "@faststore/api": "^3.25.11",
48
- "@faststore/components": "^3.25.11",
49
- "@faststore/graphql-utils": "^3.22.2",
50
- "@faststore/lighthouse": "^3.22.2",
51
- "@faststore/sdk": "^3.25.11",
52
- "@faststore/ui": "^3.25.11",
47
+ "@faststore/api": "^3.26.0",
48
+ "@faststore/components": "^3.26.0",
49
+ "@faststore/graphql-utils": "^3.26.0",
50
+ "@faststore/lighthouse": "^3.26.0",
51
+ "@faststore/sdk": "^3.26.0",
52
+ "@faststore/ui": "^3.26.0",
53
53
  "@graphql-codegen/cli": "5.0.2",
54
54
  "@graphql-codegen/client-preset": "4.2.6",
55
55
  "@graphql-codegen/typescript": "4.0.7",
@@ -104,5 +104,5 @@
104
104
  "ts-jest": "29.1.1",
105
105
  "typescript": "5.3.2"
106
106
  },
107
- "gitHead": "d30036f692b7ebcfd171f5b0b9a9e019cd83e4ad"
107
+ "gitHead": "680b1aba58085c3f132e254a6ede61bf6c14261e"
108
108
  }
@@ -91,7 +91,17 @@ function Page({
91
91
  }: Props) {
92
92
  const { product } = server
93
93
  const { currency } = useSession()
94
- const titleTemplate = storeConfig?.seo?.titleTemplate ?? ''
94
+ const {
95
+ seo: { pdp: pdpSeo, ...storeSeo },
96
+ } = storeConfig
97
+
98
+ // SEO data
99
+ const title = meta?.title ?? storeSeo.title
100
+ const titleTemplate = pdpSeo.titleTemplate ?? storeSeo?.titleTemplate
101
+ const description =
102
+ meta?.description ||
103
+ pdpSeo.descriptionTemplate.replace(/%s/g, () => title) ||
104
+ storeSeo.description
95
105
 
96
106
  let itemListElements = product.breadcrumbList.itemListElement ?? []
97
107
  if (itemListElements.length !== 0) {
@@ -144,14 +154,14 @@ function Page({
144
154
  )}
145
155
  {/* SEO */}
146
156
  <NextSeo
147
- title={meta.title}
148
- description={meta.description}
157
+ title={title}
158
+ description={description}
149
159
  canonical={meta.canonical}
150
160
  openGraph={{
151
161
  type: 'og:product',
152
162
  url: meta.canonical,
153
- title: meta.title,
154
- description: meta.description,
163
+ title,
164
+ description,
155
165
  images: product.image.map((img) => ({
156
166
  url: img.url,
157
167
  alt: img.alternateName,
@@ -314,8 +324,8 @@ export const getStaticProps: GetStaticProps<
314
324
  const cmsPage: PDPContentType = await getPDP(data.product, previewData)
315
325
 
316
326
  const { seo } = data.product
317
- const title = seo.title || storeConfig.seo.title
318
- const description = seo.description || storeConfig.seo.description
327
+ const title = seo.title
328
+ const description = seo.description
319
329
  const canonical = `${storeConfig.storeUrl}${seo.canonical}`
320
330
 
321
331
  const meta = { title, description, canonical }