@adobe/helix-rum-enhancer 2.11.3 → 2.12.0
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/package.json +9 -2
- package/src/index.js +3 -3
- package/web-test-runner.config.js +25 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [2.12.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.11.4...v2.12.0) (2024-06-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **paid:** enable `paid` checkpoint for two more domains ([8acd7a9](https://github.com/adobe/helix-rum-enhancer/commit/8acd7a9b91dbf2aa706bb69e917fc49fff8ca037))
|
|
7
|
+
|
|
8
|
+
## [2.11.4](https://github.com/adobe/helix-rum-enhancer/compare/v2.11.3...v2.11.4) (2024-06-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **fflags:** use correct domain ([3ab8f58](https://github.com/adobe/helix-rum-enhancer/commit/3ab8f583093d5b2e8314576d69debdb281919057))
|
|
14
|
+
|
|
1
15
|
## [2.11.3](https://github.com/adobe/helix-rum-enhancer/compare/v2.11.2...v2.11.3) (2024-06-07)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-rum-enhancer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "Helix RUM Enhancer",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "
|
|
8
|
+
"test": "web-test-runner --node--resolve --coverage",
|
|
9
|
+
"test:ci": "web-test-runner --node-resolve --coverage --playwright",
|
|
10
|
+
"test:watch": "web-test-runner --node-resolve --coverage --watch",
|
|
9
11
|
"lint": "eslint .",
|
|
10
12
|
"docs": "npx jsdoc2md -c .jsdoc.json --files 'src/*.js' > docs/API.md",
|
|
11
13
|
"semantic-release": "semantic-release",
|
|
@@ -30,9 +32,14 @@
|
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
34
|
"@adobe/eslint-config-helix": "2.0.6",
|
|
35
|
+
"@esm-bundle/chai": "4.3.4-fix.0",
|
|
33
36
|
"@semantic-release/changelog": "6.0.3",
|
|
34
37
|
"@semantic-release/git": "10.0.1",
|
|
35
38
|
"@semantic-release/npm": "12.0.1",
|
|
39
|
+
"@web/test-runner": "0.18.2",
|
|
40
|
+
"@web/test-runner-core": "0.13.2",
|
|
41
|
+
"@web/test-runner-mocha": "0.9.0",
|
|
42
|
+
"@web/test-runner-playwright": "0.11.0",
|
|
36
43
|
"c8": "9.1.0",
|
|
37
44
|
"codecov": "3.8.3",
|
|
38
45
|
"eslint": "8.57.0",
|
package/src/index.js
CHANGED
|
@@ -21,8 +21,8 @@ const fflags = {
|
|
|
21
21
|
enabled: (flag, callback) => fflags.has(flag) && callback(),
|
|
22
22
|
disabled: (flag, callback) => !fflags.has(flag) && callback(),
|
|
23
23
|
onetrust: [543, 770, 1136],
|
|
24
|
-
ads: [
|
|
25
|
-
email: [
|
|
24
|
+
ads: [1139, 543, 770, 984],
|
|
25
|
+
email: [1139, 543, 770, 984],
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const urlSanitizers = {
|
|
@@ -110,7 +110,7 @@ function trackCheckpoint(checkpoint, data, t) {
|
|
|
110
110
|
const sendPing = (pdata = data) => {
|
|
111
111
|
// eslint-disable-next-line object-curly-newline, max-len
|
|
112
112
|
const body = JSON.stringify({ weight, id, referer: urlSanitizers[window.hlx.RUM_MASK_URL || 'path'](), checkpoint, t, ...data }, KNOWN_PROPERTIES);
|
|
113
|
-
const { href: url, origin} = new URL(`.rum/${weight}`, sampleRUM.collectBaseURL || sampleRUM.baseURL);
|
|
113
|
+
const { href: url, origin } = new URL(`.rum/${weight}`, sampleRUM.collectBaseURL || sampleRUM.baseURL);
|
|
114
114
|
if (window.location.origin === origin) {
|
|
115
115
|
const headers = { type: 'application/json' };
|
|
116
116
|
navigator.sendBeacon(url, new Blob([body], headers));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
export default {
|
|
13
|
+
coverageConfig: {
|
|
14
|
+
report: true,
|
|
15
|
+
reportDir: 'coverage',
|
|
16
|
+
exclude: [
|
|
17
|
+
'test/fixtures/**',
|
|
18
|
+
'node_modules/**',
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
files: [
|
|
22
|
+
'test/**/*.test.{html,js}',
|
|
23
|
+
'test/*.test.{html,js}',
|
|
24
|
+
],
|
|
25
|
+
};
|