@adobe/helix-rum-enhancer 2.34.2 → 2.35.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/.releaserc.cjs CHANGED
@@ -6,9 +6,6 @@ module.exports = {
6
6
  "changelogFile": "CHANGELOG.md",
7
7
  }],
8
8
  "@semantic-release/npm",
9
- ["@semantic-release/exec", {
10
- "publishCmd": "./tagger.sh ${nextRelease.version} src/index.js src/plugins/cwv.js src/plugins/form.js src/plugins/martech.js src/plugins/onetrust.js src/plugins/video.js --push"
11
- }],
12
9
  ["@semantic-release/git", {
13
10
  "assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
14
11
  "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
@@ -22,9 +19,16 @@ module.exports = {
22
19
  {
23
20
  "path": "src/index.md5",
24
21
  "label": "RUM Enhancer Hash"
22
+ },
23
+ {
24
+ "path": "src/index.sha384",
25
+ "label": "RUM Enhancer SRI Hash"
25
26
  }
26
27
  ]
27
28
  }],
29
+ ["@semantic-release/exec", {
30
+ "publishCmd": "./tagger.sh ${nextRelease.version} src/index.js src/plugins/cwv.js src/plugins/form.js src/plugins/martech.js src/plugins/onetrust.js src/plugins/video.js --push"
31
+ }],
28
32
  ["semantic-release-slack-bot", {
29
33
  notifyOnSuccess: true,
30
34
  notifyOnFail: true,
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.35.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.34.3...v2.35.0) (2025-05-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * update to @trieloff/rollup-plugin-checksum v1.1.0 with SHA-384 SRI hash support ([fad9251](https://github.com/adobe/helix-rum-enhancer/commit/fad9251b268951da05391381a4046e5e184ec43d))
7
+
8
+ ## [2.34.3](https://github.com/adobe/helix-rum-enhancer/compare/v2.34.2...v2.34.3) (2025-05-12)
9
+
10
+
11
+ ### Reverts
12
+
13
+ * Revert "chore: ignore psi check not needed ([#383](https://github.com/adobe/helix-rum-enhancer/issues/383))" ([c9d577f](https://github.com/adobe/helix-rum-enhancer/commit/c9d577f535a937f515319431ec56d972188840b4))
14
+
1
15
  ## [2.34.2](https://github.com/adobe/helix-rum-enhancer/compare/v2.34.1...v2.34.2) (2025-04-17)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "2.34.2",
3
+ "version": "2.35.0",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "@esm-bundle/chai": "4.3.4-fix.0",
39
39
  "@rollup/plugin-babel": "6.0.4",
40
40
  "@semantic-release/changelog": "6.0.3",
41
- "@semantic-release/exec": "7.0.3",
41
+ "@semantic-release/exec": "7.1.0",
42
42
  "@semantic-release/git": "10.0.1",
43
43
  "@semantic-release/npm": "12.0.1",
44
44
  "@web/test-runner": "0.20.1",
@@ -54,15 +54,15 @@
54
54
  "husky": "9.1.7",
55
55
  "jsdoc-to-markdown": "9.1.1",
56
56
  "junit-report-builder": "5.1.1",
57
- "lint-staged": "15.5.1",
58
- "mocha": "11.1.0",
57
+ "lint-staged": "16.0.0",
58
+ "mocha": "11.4.0",
59
59
  "mocha-multi-reporters": "1.5.1",
60
- "rollup": "4.40.0",
61
- "rollup-plugin-checksum": "1.0.1",
60
+ "rollup": "4.41.0",
61
+ "@adobe/rollup-plugin-checksum": "1.2.0",
62
62
  "rollup-plugin-eslint-bundle": "9.0.0",
63
- "semantic-release": "24.2.3",
63
+ "semantic-release": "24.2.4",
64
64
  "semantic-release-slack-bot": "^4.0.2",
65
- "web-vitals": "4.2.4"
65
+ "web-vitals": "5.0.1"
66
66
  },
67
67
  "lint-staged": {
68
68
  "*.js": "eslint",
package/rollup.config.js CHANGED
@@ -12,7 +12,9 @@
12
12
 
13
13
  // eslint-disable-next-line import/no-extraneous-dependencies
14
14
  import { babel } from '@rollup/plugin-babel';
15
- import pkg from 'rollup-plugin-checksum';
15
+ import pkg from '@adobe/rollup-plugin-checksum';
16
+ import fs from 'fs';
17
+ import path from 'path';
16
18
 
17
19
  const checksum = pkg.default;
18
20
 
@@ -28,33 +30,73 @@ const banner = `/*
28
30
  * governing permissions and limitations under the License.
29
31
  */`;
30
32
 
31
- const bundles = [
32
- // Core library
33
- {
34
- source: 'modules/index.js',
35
- outputFile: 'src/index',
33
+ // Get list of plugins from the file system
34
+ const pluginFiles = fs.readdirSync('plugins').filter((file) => file.endsWith('.js'));
35
+ const plugins = pluginFiles.map((file) => path.basename(file, '.js'));
36
+
37
+ // Core library - index.js with sourcemap
38
+ const indexMapConfig = {
39
+ input: 'modules/index.js',
40
+ output: {
41
+ file: 'src/index.map.js',
42
+ format: 'iife',
43
+ sourcemap: 'inline',
44
+ exports: 'auto',
45
+ banner,
36
46
  },
37
- // Library plugins
38
- ...['cwv', 'form', 'martech', 'onetrust', 'video'].map((plugin) => ({
39
- source: `plugins/${plugin}.js`,
40
- outputFile: `src/plugins/${plugin}`,
41
- format: 'es',
42
- })),
43
- ];
47
+ plugins: [
48
+ babel({
49
+ babelHelpers: 'bundled',
50
+ comments: false,
51
+ }),
52
+ checksum({
53
+ filename: 'index.md5',
54
+ includeAssets: false,
55
+ }),
56
+ ],
57
+ };
44
58
 
45
- export default [...bundles.map(({ outputFile, source, format }) => ({
46
- input: source,
59
+ // Core library - index.js without sourcemap, with MD5 and SRI
60
+ const indexConfig = {
61
+ input: 'modules/index.js',
62
+ output: {
63
+ file: 'src/index.js',
64
+ format: 'iife',
65
+ sourcemap: false,
66
+ exports: 'auto',
67
+ banner,
68
+ },
69
+ plugins: [
70
+ babel({
71
+ babelHelpers: 'bundled',
72
+ comments: false,
73
+ }),
74
+ checksum({
75
+ filename: 'index.md5',
76
+ includeAssets: false,
77
+ }),
78
+ checksum({
79
+ filename: 'index',
80
+ includeAssets: false,
81
+ sri: 'sha384',
82
+ }),
83
+ ],
84
+ };
85
+
86
+ // Plugins
87
+ const pluginBundles = plugins.map((plugin) => ({
88
+ input: `plugins/${plugin}.js`,
47
89
  output: [
48
90
  {
49
- file: `${outputFile}.map.js`,
50
- format: format || 'iife',
91
+ file: `src/plugins/${plugin}.map.js`,
92
+ format: 'es',
51
93
  sourcemap: 'inline',
52
94
  exports: 'auto',
53
95
  banner,
54
96
  },
55
97
  {
56
- file: `${outputFile}.js`,
57
- format: format || 'iife',
98
+ file: `src/plugins/${plugin}.js`,
99
+ format: 'es',
58
100
  sourcemap: false,
59
101
  exports: 'auto',
60
102
  banner,
@@ -66,8 +108,14 @@ export default [...bundles.map(({ outputFile, source, format }) => ({
66
108
  comments: false,
67
109
  }),
68
110
  checksum({
69
- filename: `${outputFile.split('/').pop()}.md5`,
111
+ filename: `${plugin}.md5`,
70
112
  includeAssets: false,
71
113
  }),
72
114
  ],
73
- }))];
115
+ }));
116
+
117
+ export default [
118
+ indexMapConfig,
119
+ indexConfig,
120
+ ...pluginBundles,
121
+ ];
package/src/index.md5 CHANGED
@@ -1 +1 @@
1
- e063cfac7b3a826d141de35d9d80d877
1
+ ec0f8d360b4b5a3f5b5b84ff90cd98cc
package/src/index.sri ADDED
@@ -0,0 +1 @@
1
+ sha384-nKGw+Uv2w5Lp892LtN6M6AKzK1dpb/b43UakX7zlZMsnJNu7wF9GJJ9rK193kJtd