@adobe/helix-rum-enhancer 1.0.0 → 1.0.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 +14 -0
- package/README.md +1 -1
- package/package.json +10 -10
- package/src/index.js +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.0.2](https://github.com/adobe/helix-rum-enhancer/compare/v1.0.1...v1.0.2) (2023-01-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* use node 18 ([#24](https://github.com/adobe/helix-rum-enhancer/issues/24)) ([340485a](https://github.com/adobe/helix-rum-enhancer/commit/340485a6bab72bb70e24dafa54fff22ca916c41e))
|
|
7
|
+
|
|
8
|
+
## [1.0.1](https://github.com/adobe/helix-rum-enhancer/compare/v1.0.0...v1.0.1) (2022-07-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **cwv:** use correct checkpoint when reporting cwv values, don't load script twice ([56458c8](https://github.com/adobe/helix-rum-enhancer/commit/56458c8e8a34ad93fb547de13ad8ae430e91eaae))
|
|
14
|
+
|
|
1
15
|
# 1.0.0 (2022-07-08)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
-
This library is meant to be used in conjunction with and loaded by the `sampleRUM` function found in [Helix Project Boilerplate](https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/scripts.js) or
|
|
15
|
+
This library is meant to be used in conjunction with and loaded by the `sampleRUM` function found in [Helix Project Boilerplate](https://github.com/adobe/helix-project-boilerplate/blob/main/scripts/scripts.js) or [Helix RUM JS](https://github.com/adobe/helix-rum-js).
|
|
16
16
|
|
|
17
17
|
It will add following new checkpoints:
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-rum-enhancer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Helix RUM Enhancer",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@adobe/eslint-config-helix": "1.3.2",
|
|
32
|
-
"@semantic-release/changelog": "6.0.
|
|
32
|
+
"@semantic-release/changelog": "6.0.2",
|
|
33
33
|
"@semantic-release/git": "10.0.1",
|
|
34
34
|
"@semantic-release/npm": "9.0.1",
|
|
35
|
-
"c8": "7.
|
|
35
|
+
"c8": "7.12.0",
|
|
36
36
|
"codecov": "3.8.3",
|
|
37
|
-
"eslint": "8.
|
|
37
|
+
"eslint": "8.31.0",
|
|
38
38
|
"eslint-plugin-header": "3.1.1",
|
|
39
39
|
"eslint-plugin-import": "2.26.0",
|
|
40
|
-
"husky": "8.0.
|
|
41
|
-
"jsdoc-to-markdown": "
|
|
42
|
-
"junit-report-builder": "3.0.
|
|
43
|
-
"lint-staged": "13.0
|
|
44
|
-
"mocha": "10.
|
|
40
|
+
"husky": "8.0.3",
|
|
41
|
+
"jsdoc-to-markdown": "8.0.0",
|
|
42
|
+
"junit-report-builder": "3.0.1",
|
|
43
|
+
"lint-staged": "13.1.0",
|
|
44
|
+
"mocha": "10.2.0",
|
|
45
45
|
"mocha-multi-reporters": "1.5.1",
|
|
46
|
-
"semantic-release": "19.0.
|
|
46
|
+
"semantic-release": "19.0.5"
|
|
47
47
|
},
|
|
48
48
|
"lint-staged": {
|
|
49
49
|
"*.js": "eslint",
|
package/src/index.js
CHANGED
|
@@ -55,7 +55,11 @@ sampleRUM.targetselector = (element) => {
|
|
|
55
55
|
return value;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
sampleRUM.drain('cwv', ((
|
|
58
|
+
sampleRUM.drain('cwv', (() => {
|
|
59
|
+
if (document.querySelector('script[src="https://rum.hlx.page/.rum/web-vitals/dist/web-vitals.iife.js"]')) {
|
|
60
|
+
// web vitals script has been loaded already
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
59
63
|
// use classic script to avoid CORS issues
|
|
60
64
|
const script = document.createElement('script');
|
|
61
65
|
script.src = 'https://rum.hlx.page/.rum/web-vitals/dist/web-vitals.iife.js';
|
|
@@ -63,7 +67,7 @@ sampleRUM.drain('cwv', ((sendPing) => {
|
|
|
63
67
|
const storeCWV = (measurement) => {
|
|
64
68
|
const data = { cwv: {} };
|
|
65
69
|
data.cwv[measurement.name] = measurement.value;
|
|
66
|
-
|
|
70
|
+
sampleRUM('cwv', data);
|
|
67
71
|
};
|
|
68
72
|
// When loading `web-vitals` using a classic script, all the public
|
|
69
73
|
// methods can be found on the `webVitals` global namespace.
|