@faststore/core 3.9.2 → 3.9.3

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 +22 -22
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/eslint/.cache_1gneedd +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/server-production/0.pack +0 -0
  9. package/.next/cache/webpack/server-production/index.pack +0 -0
  10. package/.next/next-minimal-server.js.nft.json +1 -1
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.js +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/react-loadable-manifest.json +1 -1
  15. package/.next/routes-manifest.json +1 -1
  16. package/.next/server/chunks/5754.js +1 -1
  17. package/.next/server/chunks/9572.js +1 -1
  18. package/.next/server/functions-config-manifest.json +1 -1
  19. package/.next/server/middleware-build-manifest.js +1 -1
  20. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  21. package/.next/server/pages/api/graphql.js +1 -1
  22. package/.next/server/pages/en-US/404.html +1 -1
  23. package/.next/server/pages/en-US/500.html +1 -1
  24. package/.next/server/pages/en-US/account.html +1 -1
  25. package/.next/server/pages/en-US/checkout.html +1 -1
  26. package/.next/server/pages/en-US/login.html +1 -1
  27. package/.next/server/pages/en-US/s.html +1 -1
  28. package/.next/server/pages/en-US.html +1 -1
  29. package/.next/server/pages-manifest.json +1 -1
  30. package/.next/static/chunks/{1153.7f616071da309cf5.js → 1153.d7522522b6c917ed.js} +1 -1
  31. package/.next/static/chunks/{7563-92cb0cc92e3f616d.js → 7563-53ce4ad626d93f7e.js} +1 -1
  32. package/.next/static/chunks/{webpack-97751f512707b560.js → webpack-bf502499da135235.js} +1 -1
  33. package/.next/static/{toqtT9H4Llz3Q4rHVVWVi → qStjoQW6ZM1UbmV1436TX}/_buildManifest.js +1 -1
  34. package/.next/trace +101 -101
  35. package/.turbo/turbo-build.log +3 -3
  36. package/.turbo/turbo-test.log +5 -5
  37. package/CHANGELOG.md +6 -0
  38. package/package.json +2 -2
  39. package/src/sdk/performance/useTTI.ts +15 -2
  40. /package/.next/static/{toqtT9H4Llz3Q4rHVVWVi → qStjoQW6ZM1UbmV1436TX}/_ssgManifest.js +0 -0
@@ -38,8 +38,8 @@ https://nextjs.org/telemetry
38
38
  Collecting page data ...
39
39
  Generating static pages (0/7) ...
40
40
 
41
41
  Generating static pages (1/7)
42
- 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.
43
42
 
44
43
  Generating static pages (3/7)
44
+ 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.
45
45
 
46
46
  Generating static pages (5/7)
47
47
 
48
48
  ✓ Generating static pages (7/7)
49
49
  Finalizing page optimization ...
@@ -68,11 +68,11 @@ Route (pages) Size First Load JS
68
68
  ├ chunks/framework-12a146e94cfcf7c4.js 45.4 kB
69
69
  ├ chunks/main-209ac4974b020af1.js 33.1 kB
70
70
  ├ chunks/pages/_app-9d35d5919aef5334.js 9.91 kB
71
- ├ chunks/webpack-97751f512707b560.js 3.57 kB
71
+ ├ chunks/webpack-bf502499da135235.js 3.57 kB
72
72
  └ css/ee0556daedda6306.css 3.07 kB
73
73
 
74
74
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
75
75
  ○ (Static) automatically rendered as static HTML (uses no initial props)
76
76
  ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
77
77
 
78
- Done in 69.91s.
78
+ Done in 69.36s.
@@ -1,12 +1,12 @@
1
1
  yarn run v1.22.22
2
2
  $ jest
3
- PASS test/utils/multipleTemplates.test.ts (36.517 s)
4
- PASS test/server/cms/index.test.ts (36.727 s)
5
- PASS test/server/index.test.ts (39.782 s)
3
+ PASS test/utils/multipleTemplates.test.ts (35.899 s)
4
+ PASS test/server/cms/index.test.ts (36.832 s)
5
+ PASS test/server/index.test.ts (39.432 s)
6
6
 
7
7
  Test Suites: 3 passed, 3 total
8
8
  Tests: 19 passed, 19 total
9
9
  Snapshots: 0 total
10
- Time: 40.944 s
10
+ Time: 40.733 s
11
11
  Ran all test suites.
12
- Done in 42.61s.
12
+ Done in 42.67s.
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.9.3](https://github.com/vtex/faststore/compare/v3.9.2...v3.9.3) (2025-01-28)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **sdk:** safari rendering ([#2642](https://github.com/vtex/faststore/issues/2642)) ([39746cd](https://github.com/vtex/faststore/commit/39746cd6094ca1f3f08918b88c20c47d87dadd19))
11
+
6
12
  ## [3.9.2](https://github.com/vtex/faststore/compare/v3.9.1...v3.9.2) (2025-01-27)
7
13
 
8
14
  **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.9.2",
3
+ "version": "3.9.3",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -128,5 +128,5 @@
128
128
  "node": "18.19.0",
129
129
  "yarn": "1.19.1"
130
130
  },
131
- "gitHead": "13bb19fe0bf612ef47c4fd2b546c443fca75f1e6"
131
+ "gitHead": "3d3582410650126aa6705592f47f1ca2d8a52aeb"
132
132
  }
@@ -1,6 +1,19 @@
1
1
  import { useEffect, useState } from 'react'
2
2
 
3
3
  const TTI_TIMEOUT = 5000 // 5 seconds without long tasks as a criterion for Time To Interactive - https://web.dev/articles/tti
4
+
5
+ /**
6
+ * Polyfill for requestIdleCallback, which is not available for every browser
7
+ * https://caniuse.com/requestidlecallback
8
+ */
9
+ function ric(callback: () => void) {
10
+ if (window.requestIdleCallback) {
11
+ window.requestIdleCallback(callback)
12
+ } else {
13
+ window.setTimeout(callback, 1)
14
+ }
15
+ }
16
+
4
17
  export default function useTTI() {
5
18
  const [isInteractive, setIsInteractive] = useState(false)
6
19
 
@@ -23,11 +36,11 @@ export default function useTTI() {
23
36
  observer.disconnect()
24
37
  setIsInteractive(true) // Sets the state to true when TTI is estimated
25
38
  } else {
26
- requestIdleCallback(checkTTI) // Keeps checking while the browser is idle
39
+ ric(checkTTI) // Keeps checking while the browser is idle
27
40
  }
28
41
  }
29
42
 
30
- requestIdleCallback(checkTTI)
43
+ ric(checkTTI)
31
44
  }
32
45
  }, [])
33
46