@whotracksme/reporting 12.1.22 → 12.1.24

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,27 @@
1
+ # v12.1.24 (Mon Nov 23 2026)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Prevent entry.openedFrom from growing (now capped to one level) [#266](https://github.com/whotracksme/webextension-packages/pull/266) ([@philipp-classen](https://github.com/philipp-classen))
6
+
7
+ #### Authors: 1
8
+
9
+ - Philipp Claßen ([@philipp-classen](https://github.com/philipp-classen))
10
+
11
+ ---
12
+
13
+ # v12.1.23 (Mon Nov 23 2026)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Fixed: init tab before calling _initAllOptionalFields [#265](https://github.com/whotracksme/webextension-packages/pull/265) ([@philipp-classen](https://github.com/philipp-classen))
18
+
19
+ #### Authors: 1
20
+
21
+ - Philipp Claßen ([@philipp-classen](https://github.com/philipp-classen))
22
+
23
+ ---
24
+
1
25
  # v12.1.22 (Mon Nov 23 2026)
2
26
 
3
27
  #### 🐛 Bug Fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whotracksme/reporting",
3
- "version": "12.1.22",
3
+ "version": "12.1.24",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./sanitizer": "./reporting/src/sanitizer.js",
@@ -1032,8 +1032,8 @@ export default class Pages {
1032
1032
  entry.pageId = ++this._pageIdGenerator;
1033
1033
  }
1034
1034
 
1035
- this._initAllOptionalFields(tabId, entry, now);
1036
1035
  this.openTabs.set(tabId, entry);
1036
+ this._initAllOptionalFields(tabId, entry, now);
1037
1037
 
1038
1038
  if (entry.search?.depth === 1) {
1039
1039
  const { url, search, redirects = [] } = entry;
@@ -1125,6 +1125,15 @@ export default class Pages {
1125
1125
  if (isRealPage(previousUrl)) {
1126
1126
  entry.previousUrl = previousUrl;
1127
1127
  }
1128
+
1129
+ // Keep only the direct opener. Without this, each link click adds
1130
+ // one more level of "openedFrom", and the entry would grow without limit.
1131
+ if (entry.openedFrom?.openedFrom) {
1132
+ // this creates a copy, but omits the "openedFrom" (from the top-level "openedFrom")
1133
+ // eslint-disable-next-line no-unused-vars
1134
+ const { openedFrom, ...prunedOpenFrom } = entry.openedFrom;
1135
+ entry.openedFrom = prunedOpenFrom;
1136
+ }
1128
1137
  }
1129
1138
  }
1130
1139