From 05797add81c2e9d65b23a90bd4e2e571b9c29ce8 Mon Sep 17 00:00:00 2001 From: Krzysztof Modras Date: Mon, 8 Jul 2024 12:17:00 +0200 Subject: [PATCH] Rename WTM webextension-packages to reporting addresses https://github.com/ghostery/ghostery-extension/issues/1723 --- extension-manifest-v2/package.json | 2 +- extension-manifest-v3/package.json | 2 +- .../src/background/reporting/communication.js | 2 +- .../src/background/reporting/index.js | 5 +-- .../src/background/reporting/url-reporter.js | 2 +- .../reporting/webrequest-reporter.js | 2 +- .../content_scripts/whotracksme/reporting.js | 2 +- package-lock.json | 35 +++++++++---------- 8 files changed, 23 insertions(+), 29 deletions(-) diff --git a/extension-manifest-v2/package.json b/extension-manifest-v2/package.json index 8b695d8b5..578cb3af2 100644 --- a/extension-manifest-v2/package.json +++ b/extension-manifest-v2/package.json @@ -46,7 +46,7 @@ "@ghostery/trackers-preview": "^1.0.0", "@ghostery/ui": "^1.0.0", "@sentry/browser": "7.1.1", - "@whotracksme/webextension-packages": "^5.0.16", + "@whotracksme/reporting": "^5.1.17", "classnames": "^2.3.2", "d3": "^7.8.5", "foundation-sites": "^6.6.2", diff --git a/extension-manifest-v3/package.json b/extension-manifest-v3/package.json index de0ccd243..4325f9f89 100644 --- a/extension-manifest-v3/package.json +++ b/extension-manifest-v3/package.json @@ -41,7 +41,7 @@ "@ghostery/trackers-preview": "^1.0.0", "@ghostery/ui": "^1.0.0", "@github/relative-time-element": "^4.3.0", - "@whotracksme/webextension-packages": "^5.0.16", + "@whotracksme/reporting": "^5.1.17", "hybrids": "^9.0.0", "idb": "^7.1.1", "jwt-decode": "^4.0.0", diff --git a/extension-manifest-v3/src/background/reporting/communication.js b/extension-manifest-v3/src/background/reporting/communication.js index a780bb9ad..0bccee1f2 100644 --- a/extension-manifest-v3/src/background/reporting/communication.js +++ b/extension-manifest-v3/src/background/reporting/communication.js @@ -9,7 +9,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0 */ -import AnonymousCommunication from '@whotracksme/webextension-packages/packages/anonymous-communication'; +import AnonymousCommunication from '@whotracksme/reporting/communication'; import config from './config.js'; import prefixedIndexedDBKeyValueStore from './storage-indexeddb.js'; diff --git a/extension-manifest-v3/src/background/reporting/index.js b/extension-manifest-v3/src/background/reporting/index.js index edcc6e4f5..2ce975c3c 100644 --- a/extension-manifest-v3/src/background/reporting/index.js +++ b/extension-manifest-v3/src/background/reporting/index.js @@ -12,10 +12,7 @@ // TODO: This is a temporary solution to avoid throwing errors in iOS Safari import './webrequest-monkey-patch.js'; -import { - setLogLevel, - describeLoggers, -} from '@whotracksme/webextension-packages/packages/reporting'; +import { setLogLevel, describeLoggers } from '@whotracksme/reporting/reporting'; import { observe } from '/store/options.js'; diff --git a/extension-manifest-v3/src/background/reporting/url-reporter.js b/extension-manifest-v3/src/background/reporting/url-reporter.js index 5242fbce4..483a16200 100644 --- a/extension-manifest-v3/src/background/reporting/url-reporter.js +++ b/extension-manifest-v3/src/background/reporting/url-reporter.js @@ -9,7 +9,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0 */ -import { UrlReporter } from '@whotracksme/webextension-packages/packages/reporting'; +import { UrlReporter } from '@whotracksme/reporting/reporting'; import { getBrowserInfo } from '@ghostery/libs'; import config from './config.js'; diff --git a/extension-manifest-v3/src/background/reporting/webrequest-reporter.js b/extension-manifest-v3/src/background/reporting/webrequest-reporter.js index 621b0cec0..7a1167eb2 100644 --- a/extension-manifest-v3/src/background/reporting/webrequest-reporter.js +++ b/extension-manifest-v3/src/background/reporting/webrequest-reporter.js @@ -12,7 +12,7 @@ import { WebRequestPipeline, RequestReporter, -} from '@whotracksme/webextension-packages/packages/reporting'; +} from '@whotracksme/reporting/reporting'; import { getBrowserInfo } from '@ghostery/libs'; import { observe, GLOBAL_PAUSE_ID } from '/store/options.js'; diff --git a/extension-manifest-v3/src/content_scripts/whotracksme/reporting.js b/extension-manifest-v3/src/content_scripts/whotracksme/reporting.js index d88321b57..5afb1e7f9 100644 --- a/extension-manifest-v3/src/content_scripts/whotracksme/reporting.js +++ b/extension-manifest-v3/src/content_scripts/whotracksme/reporting.js @@ -1,4 +1,4 @@ -import { recordMouseDown } from '@whotracksme/webextension-packages/packages/reporting/src/request/content-script.js'; +import { recordMouseDown } from '@whotracksme/reporting/reporting/src/request/content-script.js'; window.addEventListener('mousedown', (ev) => { const { event, context, href } = recordMouseDown(ev); diff --git a/package-lock.json b/package-lock.json index 6743c49b4..391c65f37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "@ghostery/trackers-preview": "^1.0.0", "@ghostery/ui": "^1.0.0", "@sentry/browser": "7.1.1", - "@whotracksme/webextension-packages": "^5.0.16", + "@whotracksme/reporting": "^5.1.17", "classnames": "^2.3.2", "d3": "^7.8.5", "foundation-sites": "^6.6.2", @@ -118,7 +118,7 @@ "@ghostery/trackers-preview": "^1.0.0", "@ghostery/ui": "^1.0.0", "@github/relative-time-element": "^4.3.0", - "@whotracksme/webextension-packages": "^5.0.16", + "@whotracksme/reporting": "^5.1.17", "hybrids": "^9.0.0", "idb": "^7.1.1", "jwt-decode": "^4.0.0", @@ -3813,13 +3813,10 @@ } } }, - "node_modules/@whotracksme/webextension-packages": { - "version": "5.0.16", - "resolved": "https://registry.npmjs.org/@whotracksme/webextension-packages/-/webextension-packages-5.0.16.tgz", - "integrity": "sha512-d0SREdlz91dOtkJrJeRsKxjQuKwm6r6EGEeUxoyPvjjSPGuQSV9NtT28AmyDCZunF5Ayk0zMfi7e0KYcVj22cQ==", - "workspaces": [ - "packages/*" - ], + "node_modules/@whotracksme/reporting": { + "version": "5.1.17", + "resolved": "https://registry.npmjs.org/@whotracksme/reporting/-/reporting-5.1.17.tgz", + "integrity": "sha512-t6BrIqE/DJGuTWgqx4pqMSqXZUVH67pS59UT9bhYRk8OqBcwkinL+f0avOtMWbNnuK5DsbV93xKrUsL0Sykzxw==", "dependencies": { "@cliqz/url-parser": "^1.1.5", "date-fns": "^2.29.3", @@ -3871,9 +3868,9 @@ "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==" }, "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -4141,9 +4138,9 @@ } }, "node_modules/addons-linter/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -16427,12 +16424,12 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.0.tgz", + "integrity": "sha512-bfJaPTuEiTYBu+ulDaeQ0F+uLmlfFkMgXj4cbwfuMSjgObGMzb55FMMbDvbRU0fAHZ4sLGkz2mKwcMg8Dvm8Ww==", "dev": true, "engines": { - "node": "14 || >=16.14" + "node": ">=18" } }, "node_modules/path-to-regexp": {