@whotracksme/reporting 12.1.16 β†’ 12.1.17

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,15 @@
1
+ # v12.1.17 (Thu Nov 19 2026)
2
+
3
+ #### πŸ› Bug Fix
4
+
5
+ - fixed: activity detection missed URLs with fragments [#259](https://github.com/whotracksme/webextension-packages/pull/259) ([@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
+
1
13
  # v12.1.16 (Thu Nov 19 2026)
2
14
 
3
15
  #### πŸ› Bug Fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whotracksme/reporting",
3
- "version": "12.1.16",
3
+ "version": "12.1.17",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./sanitizer": "./reporting/src/sanitizer.js",
@@ -308,7 +308,9 @@ export default class PageDB {
308
308
  const url = normalizeUrl(url_);
309
309
  const persistedKey = this.urlsToPersistedKeys.get(url);
310
310
  if (persistedKey) {
311
- const score = activityEstimator.estimate(url, now);
311
+ // The estimator knows the page by the URL of the tab
312
+ // (it can have a fragment), not by the normalized URL.
313
+ const score = activityEstimator.estimate(url_, now);
312
314
  if (score > 0.0) {
313
315
  const updateScore = (entry) => {
314
316
  if (score > entry.aggregator.activity) {
@@ -267,6 +267,21 @@ describe('#PageDB', function () {
267
267
  await expectUrlsInDb([simplUrl]);
268
268
  await passesSelfChecks();
269
269
  });
270
+
271
+ it('should update the activity of a page that has a URL fragment', async function () {
272
+ const simpleUrl = 'https://de.wikipedia.test/wiki/Elefanten';
273
+ const urlInTab = `${simpleUrl}#Verbreitung`;
274
+ await uut.updatePages([somePage({ url: urlInTab })], undefined);
275
+
276
+ // the activity estimator knows only the URL of the tab
277
+ const activityEstimator = {
278
+ estimate: (url) => (url === urlInTab ? 0.5 : 0.0),
279
+ };
280
+ await uut.updateActivity([urlInTab], activityEstimator);
281
+
282
+ const { memory } = await uut.describeState({ inMemoryOnly: true });
283
+ expect(memory[simpleUrl].aggregator.activity).to.eql(0.5);
284
+ });
270
285
  });
271
286
 
272
287
  describe('emergency cleanup', function () {