@whotracksme/reporting 7.10.0 β†’ 7.11.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.
@@ -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: '22'
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
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
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 22.8.0
1
+ nodejs 24.13.0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v7.11.0 (Fri Feb 06 2026)
2
+
3
+ #### πŸš€ Enhancement
4
+
5
+ - Fix request listeners setup [#179](https://github.com/whotracksme/webextension-packages/pull/179) ([@philipp-classen](https://github.com/philipp-classen))
6
+
7
+ #### πŸ› Bug Fix
8
+
9
+ - CI: fix npm publishing [#181](https://github.com/whotracksme/webextension-packages/pull/181) ([@chrmod](https://github.com/chrmod))
10
+ - Update release workflow for npm registry settings [#180](https://github.com/whotracksme/webextension-packages/pull/180) ([@chrmod](https://github.com/chrmod))
11
+
12
+ #### ⚠️ Pushed to `main`
13
+
14
+ - Nodejs update ([@chrmod](https://github.com/chrmod))
15
+ - Update repo name ([@chrmod](https://github.com/chrmod))
16
+ - Enable OIDC (intended to fix the NPM publishing errors) ([@philipp-classen](https://github.com/philipp-classen))
17
+
18
+ #### Authors: 2
19
+
20
+ - Krzysztof Modras ([@chrmod](https://github.com/chrmod))
21
+ - Philipp Claßen ([@philipp-classen](https://github.com/philipp-classen))
22
+
23
+ ---
24
+
1
25
  # v7.10.0 (Mon Dec 01 2025)
2
26
 
3
27
  #### πŸš€ Enhancement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whotracksme/reporting",
3
- "version": "7.10.0",
3
+ "version": "7.11.0",
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": "git+https://github.com/whotracksme/webextension-packages.git"
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,34 @@ 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 = (options) =>
103
+ Object.values(options).filter((x) => safeOptions.includes(x));
104
+
105
+ const urls = ['http://*/*', 'https://*/*'];
92
106
  chrome.webRequest.onBeforeRequest.addListener(
93
107
  this.onBeforeRequest,
94
108
  { urls },
95
- blockingWebRequest
96
- ? Object.values(chrome.webRequest.OnBeforeRequestOptions)
97
- : undefined,
109
+ safeSpecInfoFor(chrome.webRequest.OnBeforeRequestOptions),
98
110
  );
99
111
  chrome.webRequest.onBeforeSendHeaders.addListener(
100
112
  this.onBeforeSendHeaders,
101
113
  { urls },
102
- blockingWebRequest
103
- ? Object.values(chrome.webRequest.OnBeforeSendHeadersOptions)
104
- : undefined,
114
+ safeSpecInfoFor(chrome.webRequest.OnBeforeSendHeadersOptions),
105
115
  );
106
116
  chrome.webRequest.onHeadersReceived.addListener(
107
117
  this.onHeadersReceived,
108
118
  { urls },
109
- blockingWebRequest
110
- ? Object.values(chrome.webRequest.OnHeadersReceivedOptions)
111
- : undefined,
119
+ safeSpecInfoFor(chrome.webRequest.OnHeadersReceivedOptions),
112
120
  );
113
121
  chrome.webRequest.onCompleted.addListener(this.onCompleted, { urls });
114
122
  chrome.webRequest.onErrorOccurred.addListener(this.onErrorOccurred, {
@@ -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
+ };