Skip to content

Commit

Permalink
Update dependency web-vitals to v3.0.0 (#309)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Sanders <alex@sndrs.dev>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joe Cowton <77005274+joecowton1@users.noreply.github.com>
Co-authored-by: Joe Cowton <joe.cowton@guardian.co.uk>
Co-authored-by: Max Duval <max.duval@theguardian.com>
  • Loading branch information
5 people committed Feb 2, 2023
1 parent 1645114 commit ed13a6c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
11 changes: 11 additions & 0 deletions .changeset/tasty-mayflies-flash.md
@@ -0,0 +1,11 @@
---
'@guardian/core-web-vitals': major
---

Update to use web-vitals v3.0.0.

* Add a config object param to all metric functions ([#​225](https://togithub.com/GoogleChrome/web-vitals/pull/225))
* Report TTFB after a bfcache restore ([#​220](https://togithub.com/GoogleChrome/web-vitals/pull/220))
* Only include last LCP entry in metric entries ([#​218](https://togithub.com/GoogleChrome/web-vitals/pull/218))

The changelog for web-vitals 3.0.0 is [here](https://github.com/GoogleChrome/web-vitals/blob/HEAD/CHANGELOG.md#v300-2022-08-24)
4 changes: 2 additions & 2 deletions libs/@guardian/core-web-vitals/package.json
Expand Up @@ -8,13 +8,13 @@
"@guardian/libs": "12.0.0",
"tslib": "2.4.1",
"typescript": "4.3.2",
"web-vitals": "2.0.0"
"web-vitals": "3.0.0"
},
"peerDependencies": {
"@guardian/libs": "^12.0.0",
"tslib": "^2.4.1",
"typescript": "^4.3.2",
"web-vitals": "^2.0.0"
"web-vitals": "^3.0.0"
},
"peerDependenciesMeta": {
"typescript": {
Expand Down
2 changes: 1 addition & 1 deletion libs/@guardian/core-web-vitals/src/index.ts
Expand Up @@ -89,7 +89,7 @@ const getCoreWebVitals = async (): Promise<void> => {
const webVitals = await import('web-vitals');
const { getCLS, getFCP, getFID, getLCP, getTTFB } = webVitals;

getCLS(onReport, false);
getCLS(onReport, { reportAllChanges: false });
getFID(onReport);
getLCP(onReport);
getFCP(onReport);
Expand Down
3 changes: 1 addition & 2 deletions libs/@guardian/eslint-plugin-source-foundations/package.json
Expand Up @@ -14,8 +14,7 @@
"@types/estree": "0.0.51",
"eslint": "8.0.0",
"tslib": "2.4.1",
"typescript": "4.3.2",
"web-vitals": "2.0.0"
"typescript": "4.3.2"
},
"peerDependencies": {
"@guardian/libs": "^12.0.0",
Expand Down
Expand Up @@ -16,8 +16,7 @@
"eslint": "8.0.0",
"react": "17.0.1",
"tslib": "2.4.1",
"typescript": "4.3.2",
"web-vitals": "2.0.0"
"typescript": "4.3.2"
},
"peerDependencies": {
"@guardian/libs": "^12.0.0",
Expand Down
Expand Up @@ -11,8 +11,7 @@
"@types/react": "17.0.1",
"react": "17.0.1",
"tslib": "2.4.1",
"typescript": "4.3.2",
"web-vitals": "2.0.0"
"typescript": "4.3.2"
},
"peerDependencies": {
"@emotion/react": "^11.0.0",
Expand Down
17 changes: 7 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed13a6c

Please sign in to comment.