@adobe/helix-rum-enhancer 1.16.0 → 1.17.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.17.1](https://github.com/adobe/helix-rum-enhancer/compare/v1.17.0...v1.17.1) (2024-05-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * no type leads to empty checkpoint (1x) ([#168](https://github.com/adobe/helix-rum-enhancer/issues/168)) ([422fd8e](https://github.com/adobe/helix-rum-enhancer/commit/422fd8ed43d0cf842777ffbfae8c64242adbf39e))
7
+
8
+ # [1.17.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.16.0...v1.17.0) (2024-05-07)
9
+
10
+
11
+ ### Features
12
+
13
+ * enable reportAll for all projects ([0e295ff](https://github.com/adobe/helix-rum-enhancer/commit/0e295ffd65fa72962b397b85b0355fd066163086))
14
+
1
15
  # [1.16.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.15.3...v1.16.0) (2024-05-06)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "1.16.0",
3
+ "version": "1.17.1",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "@adobe/eslint-config-helix": "2.0.6",
33
33
  "@semantic-release/changelog": "6.0.3",
34
34
  "@semantic-release/git": "10.0.1",
35
- "@semantic-release/npm": "12.0.0",
35
+ "@semantic-release/npm": "12.0.1",
36
36
  "c8": "9.1.0",
37
37
  "codecov": "3.8.3",
38
38
  "eslint": "8.57.0",
@@ -44,7 +44,7 @@
44
44
  "lint-staged": "15.2.2",
45
45
  "mocha": "10.4.0",
46
46
  "mocha-multi-reporters": "1.5.1",
47
- "semantic-release": "23.0.8"
47
+ "semantic-release": "23.1.1"
48
48
  },
49
49
  "lint-staged": {
50
50
  "*.js": "eslint",
package/src/index.js CHANGED
@@ -53,7 +53,7 @@ const navigate = (source, type) => {
53
53
  // reload: same page, navigate: same origin, enter: everything else
54
54
  if (type === 'reload' || source === window.location.href) {
55
55
  sampleRUM('reload', payload);
56
- } else if (type !== 'navigate') {
56
+ } else if (type && type !== 'navigate') {
57
57
  sampleRUM(type, payload); // back, forward, prerender, etc.
58
58
  } else if (source && window.location.origin === new URL(source).origin) {
59
59
  sampleRUM('navigate', payload); // internal navigation
@@ -107,7 +107,6 @@ sampleRUM.drain('cwv', (() => {
107
107
  sampleRUM('cwv', data);
108
108
  };
109
109
 
110
- const featureToggle = () => ['blog.adobe.com', 'www.revolt.tv'].includes(window.location.hostname);
111
110
  const isEager = (metric) => ['CLS', 'LCP'].includes(metric);
112
111
 
113
112
  // When loading `web-vitals` using a classic script, all the public
@@ -115,7 +114,7 @@ sampleRUM.drain('cwv', (() => {
115
114
  ['FID', 'INP', 'TTFB', 'CLS', 'LCP'].forEach((metric) => {
116
115
  const metricFn = window.webVitals[`on${metric}`];
117
116
  if (typeof metricFn === 'function') {
118
- const opts = isEager(metric) ? { reportAllChanges: featureToggle() } : undefined;
117
+ const opts = isEager(metric) ? { reportAllChanges: true } : undefined;
119
118
  metricFn(storeCWV, opts);
120
119
  }
121
120
  });