@whotracksme/reporting 12.1.4 → 12.1.6
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 +40 -0
- package/communication/karma.conf.cjs +1 -1
- package/communication/package.json +9 -10
- package/communication/rollup.common-config.cjs +19 -3
- package/communication/src/padding.js +0 -2
- package/communication/src/zlib.js +1 -1
- package/eslint.config.js +34 -0
- package/package.json +15 -13
- package/reporting/karma.conf.cjs +1 -1
- package/reporting/package.json +21 -22
- package/reporting/rollup.common-config.cjs +19 -3
- package/reporting/src/alive-message-generator.js +1 -1
- package/reporting/src/doublefetch-page-handler.js +2 -2
- package/reporting/src/duplicate-detector.js +1 -3
- package/reporting/src/hash-detector-v2/index.js +1 -1
- package/reporting/src/http.js +2 -3
- package/reporting/src/md5.js +0 -1
- package/reporting/src/message-sender.js +2 -3
- package/reporting/src/nav-tracking-detector.js +2 -2
- package/reporting/src/network.js +1 -1
- package/reporting/src/page-aggregator.js +1 -1
- package/reporting/src/page-quorum-check-handler.js +1 -1
- package/reporting/src/page-structure.js +1 -1
- package/reporting/src/pagedb.js +1 -1
- package/reporting/src/pages.js +2 -2
- package/reporting/src/patterns-updater.js +1 -1
- package/reporting/src/patterns.js +11 -11
- package/reporting/src/popularity-estimator.js +1 -1
- package/reporting/src/random.js +0 -2
- package/reporting/src/request/index.js +0 -1
- package/reporting/src/request/qs-whitelist2.js +4 -5
- package/reporting/src/request/utils/bloom-filter-packed.js +2 -2
- package/reporting/src/request/utils/chrome-storage-map.js +7 -4
- package/reporting/src/request/utils/time.js +5 -22
- package/reporting/src/sanitizer.js +1 -1
- package/reporting/src/search-extractor.js +2 -5
- package/reporting/src/url-cleaner.js +9 -6
- package/reporting/src/utils/url.js +2 -2
- package/reporting/test/activity-estimator.spec.js +9 -6
- package/reporting/test/duplicate-detector.spec.js +0 -1
- package/reporting/test/helpers/fast-check-utils.js +11 -0
- package/reporting/test/job-scheduler.spec.js +7 -1
- package/reporting/test/pagedb.spec.js +3 -1
- package/reporting/test/pages.spec.js +1 -1
- package/reporting/test/patterns-updater.spec.js +1 -1
- package/reporting/test/patterns.spec.js +28 -26
- package/reporting/test/persisted-counters.spec.js +2 -3
- package/reporting/test/popularity-estimator.spec.js +6 -0
- package/reporting/test/request/index.test.js +0 -1
- package/reporting/test/sanitizer.spec.js +4 -2
- package/reporting/test/search-extractor.spec.js +1 -1
- package/reporting/test/seq-executor.spec.js +2 -2
- package/reporting/test/url-analyzer.spec.js +3 -1
- package/reporting/test/url-cleaner.spec.js +21 -0
- package/reporting/test/utils/url.spec.js +0 -1
- package/reporting/test/utils.spec.js +1 -1
- package/.eslintignore +0 -4
- package/.eslintrc +0 -16
|
@@ -26,6 +26,27 @@ describe('#removeQueryParams', function () {
|
|
|
26
26
|
removeQueryParams('https://example.test/path?foo=1&bar=2#baz', ['foo']),
|
|
27
27
|
).to.eql('https://example.test/path?bar=2#baz');
|
|
28
28
|
});
|
|
29
|
+
|
|
30
|
+
it('should not treat a "?" in the fragment as a query', function () {
|
|
31
|
+
expect(removeQueryParams('https://example.test/#?foo=1', ['foo'])).to.eql(
|
|
32
|
+
'https://example.test/#?foo=1',
|
|
33
|
+
);
|
|
34
|
+
expect(
|
|
35
|
+
removeQueryParams('https://example.test/#/path?foo=1&bar=2', ['foo']),
|
|
36
|
+
).to.eql('https://example.test/#/path?foo=1&bar=2');
|
|
37
|
+
expect(removeQueryParams('https://example.test/#?&', [''])).to.eql(
|
|
38
|
+
'https://example.test/#?&',
|
|
39
|
+
);
|
|
40
|
+
expect(
|
|
41
|
+
removeQueryParams('https://example.test/?foo=1#?foo=1', ['foo']),
|
|
42
|
+
).to.eql('https://example.test/#?foo=1');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('should support complex examples with "?" and "#" appearing again in the fragment', function () {
|
|
46
|
+
expect(
|
|
47
|
+
removeQueryParams('https://example.test/a?b#c?d#e', ['b', 'c', 'd']),
|
|
48
|
+
).to.eql('https://example.test/a#c?d#e');
|
|
49
|
+
});
|
|
29
50
|
});
|
|
30
51
|
|
|
31
52
|
describe('should handle non-valid URLs gracefully', function () {
|
package/.eslintignore
DELETED
package/.eslintrc
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"es2022": true,
|
|
4
|
-
"browser": true,
|
|
5
|
-
"serviceworker": true,
|
|
6
|
-
"webextensions": true,
|
|
7
|
-
"mocha": true
|
|
8
|
-
},
|
|
9
|
-
"extends": [
|
|
10
|
-
"eslint:recommended",
|
|
11
|
-
"plugin:prettier/recommended"
|
|
12
|
-
],
|
|
13
|
-
"parserOptions": {
|
|
14
|
-
"sourceType": "module"
|
|
15
|
-
}
|
|
16
|
-
}
|