@whotracksme/reporting 7.10.0 โ 7.11.1
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/.github/workflows/release.yml +7 -3
- package/.tool-versions +1 -1
- package/CHANGELOG.md +36 -0
- package/package.json +2 -2
- package/reporting/src/request/index.js +31 -14
- package/reporting/test/setup.js +15 -0
- package/reporting/test/setup.unit.js +16 -0
|
@@ -9,12 +9,16 @@ jobs:
|
|
|
9
9
|
name: Trigger release
|
|
10
10
|
runs-on: ubuntu-24.04
|
|
11
11
|
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write
|
|
14
|
+
contents: write
|
|
12
15
|
steps:
|
|
13
16
|
- uses: actions/checkout@v4
|
|
14
17
|
- uses: actions/setup-node@v4
|
|
15
18
|
with:
|
|
16
|
-
node-version: '
|
|
19
|
+
node-version: '24'
|
|
17
20
|
cache: 'npm'
|
|
21
|
+
registry-url: 'https://registry.npmjs.org'
|
|
18
22
|
|
|
19
23
|
- name: Prepare repository
|
|
20
24
|
run: git fetch --unshallow --tags
|
|
@@ -27,8 +31,8 @@ jobs:
|
|
|
27
31
|
|
|
28
32
|
- name: Create release
|
|
29
33
|
env:
|
|
34
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
30
35
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
-
|
|
36
|
+
NPM_CONFIG_PROVENANCE: true
|
|
32
37
|
run: |
|
|
33
|
-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
34
38
|
npm run release
|
package/.tool-versions
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
nodejs
|
|
1
|
+
nodejs 24.13.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
# v7.11.1 (Thu Feb 12 2026)
|
|
2
|
+
|
|
3
|
+
#### ๐ Bug Fix
|
|
4
|
+
|
|
5
|
+
- Fixed regression: Safari setup for the request reporter was broken [#182](https://github.com/whotracksme/webextension-packages/pull/182) ([@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
|
+
# v7.11.0 (Fri Feb 06 2026)
|
|
14
|
+
|
|
15
|
+
#### ๐ Enhancement
|
|
16
|
+
|
|
17
|
+
- Fix request listeners setup [#179](https://github.com/whotracksme/webextension-packages/pull/179) ([@philipp-classen](https://github.com/philipp-classen))
|
|
18
|
+
|
|
19
|
+
#### ๐ Bug Fix
|
|
20
|
+
|
|
21
|
+
- CI: fix npm publishing [#181](https://github.com/whotracksme/webextension-packages/pull/181) ([@chrmod](https://github.com/chrmod))
|
|
22
|
+
- Update release workflow for npm registry settings [#180](https://github.com/whotracksme/webextension-packages/pull/180) ([@chrmod](https://github.com/chrmod))
|
|
23
|
+
|
|
24
|
+
#### โ ๏ธ Pushed to `main`
|
|
25
|
+
|
|
26
|
+
- Nodejs update ([@chrmod](https://github.com/chrmod))
|
|
27
|
+
- Update repo name ([@chrmod](https://github.com/chrmod))
|
|
28
|
+
- Enable OIDC (intended to fix the NPM publishing errors) ([@philipp-classen](https://github.com/philipp-classen))
|
|
29
|
+
|
|
30
|
+
#### Authors: 2
|
|
31
|
+
|
|
32
|
+
- Krzysztof Modras ([@chrmod](https://github.com/chrmod))
|
|
33
|
+
- Philipp Claรen ([@philipp-classen](https://github.com/philipp-classen))
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
1
37
|
# v7.10.0 (Mon Dec 01 2025)
|
|
2
38
|
|
|
3
39
|
#### ๐ Enhancement
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whotracksme/reporting",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "
|
|
18
|
+
"url": "https://github.com/whotracksme/webextension-packages"
|
|
19
19
|
},
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/whotracksme/webextension-packages/issues"
|
|
@@ -43,6 +43,12 @@ import PageStore from './page-store.js';
|
|
|
43
43
|
const DAY_CHANGE_INTERVAL = 20 * 1000;
|
|
44
44
|
const RECENTLY_MODIFIED_TTL = 30 * 1000;
|
|
45
45
|
|
|
46
|
+
function hasBlockingWebRequest() {
|
|
47
|
+
return chrome.runtime
|
|
48
|
+
.getManifest()
|
|
49
|
+
.permissions.includes('webRequestBlocking');
|
|
50
|
+
}
|
|
51
|
+
|
|
46
52
|
export default class RequestReporter {
|
|
47
53
|
#userAgent;
|
|
48
54
|
|
|
@@ -83,32 +89,43 @@ export default class RequestReporter {
|
|
|
83
89
|
});
|
|
84
90
|
|
|
85
91
|
this.ready = false;
|
|
86
|
-
const urls = ['http://*/*', 'https://*/*'];
|
|
87
|
-
// TODO: find a way to detect if blocking webRequest is available on Brave and Opera
|
|
88
|
-
const blockingWebRequest = chrome.runtime
|
|
89
|
-
.getManifest()
|
|
90
|
-
.permissions.includes('webRequestBlocking');
|
|
91
92
|
|
|
93
|
+
const safeOptions = [
|
|
94
|
+
'extraHeaders',
|
|
95
|
+
'requestBody',
|
|
96
|
+
'requestHeaders',
|
|
97
|
+
'responseHeaders',
|
|
98
|
+
];
|
|
99
|
+
if (hasBlockingWebRequest()) {
|
|
100
|
+
safeOptions.push('blocking');
|
|
101
|
+
}
|
|
102
|
+
const safeSpecInfoFor = (optionsName) => {
|
|
103
|
+
const options = chrome.webRequest[optionsName];
|
|
104
|
+
if (!options) {
|
|
105
|
+
logger.warn(
|
|
106
|
+
`chrome.webRequest.${optionsName} unavailable. `,
|
|
107
|
+
'Falling back to defaults for the "extraSpecInfo" parameter.',
|
|
108
|
+
);
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
return Object.values(options).filter((x) => safeOptions.includes(x));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const urls = ['http://*/*', 'https://*/*'];
|
|
92
115
|
chrome.webRequest.onBeforeRequest.addListener(
|
|
93
116
|
this.onBeforeRequest,
|
|
94
117
|
{ urls },
|
|
95
|
-
|
|
96
|
-
? Object.values(chrome.webRequest.OnBeforeRequestOptions)
|
|
97
|
-
: undefined,
|
|
118
|
+
safeSpecInfoFor('OnBeforeRequestOptions'),
|
|
98
119
|
);
|
|
99
120
|
chrome.webRequest.onBeforeSendHeaders.addListener(
|
|
100
121
|
this.onBeforeSendHeaders,
|
|
101
122
|
{ urls },
|
|
102
|
-
|
|
103
|
-
? Object.values(chrome.webRequest.OnBeforeSendHeadersOptions)
|
|
104
|
-
: undefined,
|
|
123
|
+
safeSpecInfoFor('OnBeforeSendHeadersOptions'),
|
|
105
124
|
);
|
|
106
125
|
chrome.webRequest.onHeadersReceived.addListener(
|
|
107
126
|
this.onHeadersReceived,
|
|
108
127
|
{ urls },
|
|
109
|
-
|
|
110
|
-
? Object.values(chrome.webRequest.OnHeadersReceivedOptions)
|
|
111
|
-
: undefined,
|
|
128
|
+
safeSpecInfoFor('OnHeadersReceivedOptions'),
|
|
112
129
|
);
|
|
113
130
|
chrome.webRequest.onCompleted.addListener(this.onCompleted, { urls });
|
|
114
131
|
chrome.webRequest.onErrorOccurred.addListener(this.onErrorOccurred, {
|
package/reporting/test/setup.js
CHANGED
|
@@ -17,6 +17,21 @@ chai.use(sinonChai);
|
|
|
17
17
|
|
|
18
18
|
setLogLevel('off');
|
|
19
19
|
|
|
20
|
+
// Fill in missing APIs if sinon-chrome did not provide them
|
|
21
|
+
chrome.webRequest.OnBeforeRequestOptions ||= {
|
|
22
|
+
blocking: 'blocking',
|
|
23
|
+
requestBody: 'requestBody',
|
|
24
|
+
};
|
|
25
|
+
chrome.webRequest.OnBeforeSendHeadersOptions ||= {
|
|
26
|
+
blocking: 'blocking',
|
|
27
|
+
requestHeaders: 'requestHeaders',
|
|
28
|
+
};
|
|
29
|
+
chrome.webRequest.OnHeadersReceivedOptions ||= {
|
|
30
|
+
blocking: 'blocking',
|
|
31
|
+
responseHeaders: 'responseHeaders',
|
|
32
|
+
extraHeaders: 'extraHeaders',
|
|
33
|
+
};
|
|
34
|
+
|
|
20
35
|
window.chrome = chrome;
|
|
21
36
|
|
|
22
37
|
// This global object installs a timeout, which will confuse tests that mock
|
|
@@ -13,6 +13,22 @@ import 'fake-indexeddb/auto';
|
|
|
13
13
|
import * as chai from 'chai';
|
|
14
14
|
import sinonChai from 'sinon-chai';
|
|
15
15
|
import chaiAsPromised from 'chai-as-promised';
|
|
16
|
+
import chrome from 'sinon-chrome';
|
|
16
17
|
|
|
17
18
|
chai.use(chaiAsPromised);
|
|
18
19
|
chai.use(sinonChai);
|
|
20
|
+
|
|
21
|
+
// Fill in missing APIs if sinon-chrome did not provide them
|
|
22
|
+
chrome.webRequest.OnBeforeRequestOptions ||= {
|
|
23
|
+
blocking: 'blocking',
|
|
24
|
+
requestBody: 'requestBody',
|
|
25
|
+
};
|
|
26
|
+
chrome.webRequest.OnBeforeSendHeadersOptions ||= {
|
|
27
|
+
blocking: 'blocking',
|
|
28
|
+
requestHeaders: 'requestHeaders',
|
|
29
|
+
};
|
|
30
|
+
chrome.webRequest.OnHeadersReceivedOptions ||= {
|
|
31
|
+
blocking: 'blocking',
|
|
32
|
+
responseHeaders: 'responseHeaders',
|
|
33
|
+
extraHeaders: 'extraHeaders',
|
|
34
|
+
};
|