web-vitals
Advanced tools
Comparing version 3.0.0-rc.0 to 3.0.0
{ | ||
"name": "web-vitals", | ||
"version": "3.0.0-rc.0", | ||
"version": "3.0.0", | ||
"description": "Easily measure performance metrics in JavaScript", | ||
@@ -145,15 +145,15 @@ "type": "module", | ||
"devDependencies": { | ||
"@babel/core": "^7.18.5", | ||
"@babel/preset-env": "^7.18.2", | ||
"@babel/core": "^7.18.13", | ||
"@babel/preset-env": "^7.18.10", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.29.0", | ||
"@typescript-eslint/parser": "^5.29.0", | ||
"@wdio/cli": "^7.20.5", | ||
"@wdio/local-runner": "^7.20.5", | ||
"@wdio/mocha-framework": "^7.20.3", | ||
"@wdio/selenium-standalone-service": "^7.20.3", | ||
"@wdio/spec-reporter": "^7.20.3", | ||
"@typescript-eslint/eslint-plugin": "^5.34.0", | ||
"@typescript-eslint/parser": "^5.34.0", | ||
"@wdio/cli": "^7.23.0", | ||
"@wdio/local-runner": "^7.23.0", | ||
"@wdio/mocha-framework": "^7.23.0", | ||
"@wdio/selenium-standalone-service": "^7.23.0", | ||
"@wdio/spec-reporter": "^7.23.0", | ||
"body-parser": "^1.20.0", | ||
"chromedriver": "^103.0.0", | ||
"eslint": "^8.18.0", | ||
"chromedriver": "^104.0.0", | ||
"eslint": "^8.22.0", | ||
"eslint-config-google": "^0.14.0", | ||
@@ -165,3 +165,3 @@ "express": "^4.18.1", | ||
"nunjucks": "^3.2.3", | ||
"rollup": "^2.75.7", | ||
"rollup": "^2.78.1", | ||
"rollup-plugin-babel": "^4.4.0", | ||
@@ -168,0 +168,0 @@ "rollup-plugin-terser": "^7.0.2", |
@@ -31,3 +31,3 @@ # `web-vitals` | ||
The `web-vitals` library is a tiny (~1K, brotli'd), modular library for measuring all the [Web Vitals](https://web.dev/vitals/) metrics on real users, in a way that accurately matches how they're measured by Chrome and reported to other Google tools (e.g. [Chrome User Experience Report](https://developers.google.com/web/tools/chrome-user-experience-report), [Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/), [Search Console's Speed Report](https://webmasters.googleblog.com/2019/11/search-console-speed-report.html)). | ||
The `web-vitals` library is a tiny (~1.5K, brotli'd), modular library for measuring all the [Web Vitals](https://web.dev/vitals/) metrics on real users, in a way that accurately matches how they're measured by Chrome and reported to other Google tools (e.g. [Chrome User Experience Report](https://developers.google.com/web/tools/chrome-user-experience-report), [Page Speed Insights](https://developers.google.com/speed/pagespeed/insights/), [Search Console's Speed Report](https://webmasters.googleblog.com/2019/11/search-console-speed-report.html)). | ||
@@ -60,6 +60,2 @@ The library supports all of the [Core Web Vitals](https://web.dev/vitals/#core-web-vitals) as well as a number of other metrics that are useful in diagnosing [real-user](https://web.dev/user-centric-performance-metrics/) performance issues. | ||
```sh | ||
# Install the latest version 3 beta (which includes INP). | ||
npm install web-vitals@next | ||
# Install the current stable version (version 2). | ||
npm install web-vitals | ||
@@ -86,3 +82,3 @@ ``` | ||
_**Note:** in version 2, these functioned were named `getXXX()` rather than `onXXX()`. They've [been renamed](https://github.com/GoogleChrome/web-vitals/pull/222) in version 3 to reduce confusion (see [#217](https://github.com/GoogleChrome/web-vitals/pull/217) for details) and will continue to be available using the `getXXX()` until at least version 4. Users are encouraged to switch to the new names, though, for future compatibility._ | ||
_**Note:** in version 2, these functions were named `getXXX()` rather than `onXXX()`. They've [been renamed](https://github.com/GoogleChrome/web-vitals/pull/222) in version 3 to reduce confusion (see [#217](https://github.com/GoogleChrome/web-vitals/pull/217) for details) and will continue to be available using the `getXXX()` until at least version 4. Users are encouraged to switch to the new names, though, for future compatibility._ | ||
@@ -97,3 +93,3 @@ <a name="attribution-build"><a> | ||
The "attribution" build is slightly larger than the "standard" build (by about 500 bytes, brotli'd), so while the code size is still small, it's only recommended if you're actually using these features. | ||
The "attribution" build is slightly larger than the "standard" build (by about 600 bytes, brotli'd), so while the code size is still small, it's only recommended if you're actually using these features. | ||
@@ -250,3 +246,3 @@ To load the "attribution" build, change any `import` statements that reference `web-vitals` to `web-vitals/attribution`: | ||
Note that some of these metrics will not report until the user has interacted with the page, switched tabs, or the page starts to unload. If you don't see the values logged to the console immediately, try reloading the page (with [preserve log](https://developers.google.com/web/tools/chrome-devtools/console/reference#persist) enabled) or switching tabs and then switching back. | ||
Note that some of these metrics will not report until the user has interacted with the page, switched tabs, or the page starts to unload. If you don't see the values logged to the console immediately, try reloading the page (with [preserve log](https://developer.chrome.com/docs/devtools/console/reference/#persist) enabled) or switching tabs and then switching back. | ||
@@ -487,3 +483,3 @@ Also, in some cases a metric callback may never be called: | ||
_**Note:** this example relies on custom [event parameters](https://support.google.com/analytics/answer/11396839) in Google Analytics 4. For Universal Analytics the attribution data should be set using a [custom dimension](https://support.google.com/analytics/answer/2709828) rather than `debug_target` as shown above. | ||
_**Note:** this example relies on custom [event parameters](https://support.google.com/analytics/answer/11396839) in Google Analytics 4. For Universal Analytics the attribution data should be set using a [custom dimension](https://support.google.com/analytics/answer/2709828) rather than `debug_target` as shown above._ | ||
@@ -707,8 +703,9 @@ See [Debug Web Vitals in the field](https://web.dev/debug-web-vitals-in-the-field/) for more information and examples. | ||
/** | ||
* For regular navigations, the type will be the same as the type indicated | ||
* by the Navigation Timing API (or `undefined` if the browser doesn't | ||
* The type of navigation | ||
* | ||
* Navigation Timing API (or `undefined` if the browser doesn't | ||
* support that API). For pages that are restored from the bfcache, this | ||
* value will be 'back_forward_cache'. | ||
* value will be 'back-forward-cache'. | ||
*/ | ||
navigationType: NavigationTimingType | 'back_forward_cache' | 'prerender' | undefined; | ||
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender'; | ||
} | ||
@@ -796,3 +793,3 @@ ``` | ||
*/ | ||
export type LoadState = 'loading' | 'dom-interactive' | 'dom-content-loaded' | 'complete'; | ||
type LoadState = 'loading' | 'dom-interactive' | 'dom-content-loaded' | 'complete'; | ||
``` | ||
@@ -799,0 +796,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
358479
1209