@adobe/helix-rum-enhancer 1.13.0 → 1.13.2

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.13.2](https://github.com/adobe/helix-rum-enhancer/compare/v1.13.1...v1.13.2) (2024-03-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * remove conflicting variables ([3f871d2](https://github.com/adobe/helix-rum-enhancer/commit/3f871d2e1396ddf0f579056db9bfdb8e72c1b6de))
7
+
8
+ ## [1.13.1](https://github.com/adobe/helix-rum-enhancer/compare/v1.13.0...v1.13.1) (2024-03-27)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * enable eager cwv reporting for revolt ([53ced3b](https://github.com/adobe/helix-rum-enhancer/commit/53ced3b7983d4865c1c9a0cc0ee771cab3559484))
14
+
1
15
  # [1.13.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.12.0...v1.13.0) (2024-03-22)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -92,7 +92,7 @@ sampleRUM.drain('cwv', (() => {
92
92
  sampleRUM('cwv', data);
93
93
  };
94
94
 
95
- const featureToggle = () => window.location.hostname === 'blog.adobe.com';
95
+ const featureToggle = () => ['blog.adobe.com', 'www.revolt.tv'].includes(window.location.hostname);
96
96
  const isEager = (metric) => ['CLS', 'LCP'].includes(metric);
97
97
 
98
98
  // When loading `web-vitals` using a classic script, all the public
@@ -159,7 +159,7 @@ document.querySelectorAll('form').forEach((form) => {
159
159
  window.addEventListener('visibilitychange', ((event) => sampleRUM.leave(event)));
160
160
  window.addEventListener('pagehide', ((event) => sampleRUM.leave(event)));
161
161
 
162
- const observer = new PerformanceObserver((list) => {
162
+ new PerformanceObserver((list) => {
163
163
  list.getEntries()
164
164
  .filter((entry) => !entry.responseStatus || entry.responseStatus < 400)
165
165
  .filter((entry) => window.location.hostname === new URL(entry.name).hostname)
@@ -175,11 +175,9 @@ const observer = new PerformanceObserver((list) => {
175
175
  sampleRUM('missingresource', { source: entry.name, target: entry.hostname });
176
176
  });
177
177
  }
178
- });
179
- observer.observe({ type: 'resource', buffered: true });
178
+ }).observe({ type: 'resource', buffered: true });
180
179
 
181
- const usp = new URLSearchParams(window.location.search);
182
- [...usp.entries()]
180
+ [...new URLSearchParams(window.location.search).entries()]
183
181
  .filter(([key]) => key.startsWith('utm_'))
184
182
  .filter(([key]) => key !== 'utm_id')
185
183
  .forEach(([key, value]) => {