@adobe/helix-rum-enhancer 1.0.2 → 1.1.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.1.1](https://github.com/adobe/helix-rum-enhancer/compare/v1.1.0...v1.1.1) (2023-05-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **cwv:** window.webVitals[name] is not a function ([a2d46cb](https://github.com/adobe/helix-rum-enhancer/commit/a2d46cbbf977a59bfe5b3fd179930db75bb3e809))
7
+
8
+ # [1.1.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.0.2...v1.1.0) (2023-05-11)
9
+
10
+
11
+ ### Features
12
+
13
+ * **cwv:** add INP (Interaction to next paint) as default metric ([b8e2da7](https://github.com/adobe/helix-rum-enhancer/commit/b8e2da7b00887048d9e8874bb896283615cd2072))
14
+
1
15
  ## [1.0.2](https://github.com/adobe/helix-rum-enhancer/compare/v1.0.1...v1.0.2) (2023-01-12)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -28,22 +28,22 @@
28
28
  "reporter-options": "configFile=.mocha-multi.json"
29
29
  },
30
30
  "devDependencies": {
31
- "@adobe/eslint-config-helix": "1.3.2",
32
- "@semantic-release/changelog": "6.0.2",
31
+ "@adobe/eslint-config-helix": "2.0.2",
32
+ "@semantic-release/changelog": "6.0.3",
33
33
  "@semantic-release/git": "10.0.1",
34
- "@semantic-release/npm": "9.0.1",
35
- "c8": "7.12.0",
34
+ "@semantic-release/npm": "10.0.3",
35
+ "c8": "7.13.0",
36
36
  "codecov": "3.8.3",
37
- "eslint": "8.31.0",
37
+ "eslint": "8.40.0",
38
38
  "eslint-plugin-header": "3.1.1",
39
- "eslint-plugin-import": "2.26.0",
39
+ "eslint-plugin-import": "2.27.5",
40
40
  "husky": "8.0.3",
41
41
  "jsdoc-to-markdown": "8.0.0",
42
42
  "junit-report-builder": "3.0.1",
43
- "lint-staged": "13.1.0",
43
+ "lint-staged": "13.2.2",
44
44
  "mocha": "10.2.0",
45
45
  "mocha-multi-reporters": "1.5.1",
46
- "semantic-release": "19.0.5"
46
+ "semantic-release": "21.0.2"
47
47
  },
48
48
  "lint-staged": {
49
49
  "*.js": "eslint",
package/src/index.js CHANGED
@@ -71,9 +71,12 @@ sampleRUM.drain('cwv', (() => {
71
71
  };
72
72
  // When loading `web-vitals` using a classic script, all the public
73
73
  // methods can be found on the `webVitals` global namespace.
74
- window.webVitals.getCLS(storeCWV);
75
- window.webVitals.getFID(storeCWV);
76
- window.webVitals.getLCP(storeCWV);
74
+ ['CLS', 'FID', 'LCP', 'INP']
75
+ .map((metric) => window.webVitals[`get${metric}`])
76
+ .filter((metric) => typeof metric === 'function')
77
+ .forEach((invokeMetric) => {
78
+ invokeMetric(storeCWV);
79
+ });
77
80
  };
78
81
  document.head.appendChild(script);
79
82
  }));