diff --git a/package-lock.json b/package-lock.json index 8dc5dcf9d..f77fbb355 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ ], "dependencies": { "@duckduckgo/autofill": "github:duckduckgo/duckduckgo-autofill#15.1.0", - "@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#6.19.0", + "@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#6.34.0", "@duckduckgo/ddg2dnr": "file:packages/ddg2dnr", "@duckduckgo/jsbloom": "^1.0.2", "@duckduckgo/privacy-dashboard": "github:duckduckgo/privacy-dashboard#7.1.1", @@ -179,19 +179,16 @@ "license": "Apache-2.0" }, "node_modules/@duckduckgo/content-scope-scripts": { - "resolved": "git+ssh://git@github.com/duckduckgo/content-scope-scripts.git#1ed569676555d493c9c5575eaed22aa02569aac9", - "integrity": "sha512-TM59slUo27HDSrULhUqEygdG0uIu4/xlpw613+jtI3+JfrHNx/cyNM8SEvoRHVca5XTeKk/dNzn6P/tKVQCRww==", - "hasInstallScript": true, + "resolved": "git+ssh://git@github.com/duckduckgo/content-scope-scripts.git#695412097915d14e0d977f7c11f979af6448bd8c", "license": "Apache-2.0", "workspaces": [ - "packages/special-pages", - "packages/messaging" + "injected", + "special-pages", + "messaging", + "types-generator" ], "dependencies": { - "immutable-json-patch": "^5.1.3", - "parse-address": "^1.1.2", - "seedrandom": "^3.0.5", - "sjcl": "^1.0.8" + "immutable-json-patch": "^6.0.1" } }, "node_modules/@duckduckgo/ddg2dnr": { @@ -5998,9 +5995,10 @@ "dev": true }, "node_modules/immutable-json-patch": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/immutable-json-patch/-/immutable-json-patch-5.1.3.tgz", - "integrity": "sha512-95AsF9hJTPpwtBGAnHmw57PASL672tb+vGHR5xLhH2VPuHSsLho7grjlfgQ65DIhHP+UmLCjdmuuA6L1ndJbZg==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/immutable-json-patch/-/immutable-json-patch-6.0.1.tgz", + "integrity": "sha512-BHL/cXMjwFZlTOffiWNdY8ZTvNyYLrutCnWxrcKPHr5FqpAb6vsO6WWSPnVSys3+DruFN6lhHJJPHi8uELQL5g==", + "license": "ISC" }, "node_modules/import-fresh": { "version": "3.3.0", @@ -8328,14 +8326,6 @@ "node": ">=6" } }, - "node_modules/parse-address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/parse-address/-/parse-address-1.1.2.tgz", - "integrity": "sha512-EnqetXieqyTlDzuuy+oT/pjjkWoI80MgFawDA/Z9LZBAMy+Iy6piURuX+Lr1iZNm7exD+V/B9IRjHaSj33adJw==", - "dependencies": { - "xregexp": "^3.1.1" - } - }, "node_modules/parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -9437,11 +9427,6 @@ "node": ">=v12.22.7" } }, - "node_modules/seedrandom": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", - "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -9634,14 +9619,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, - "node_modules/sjcl": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.8.tgz", - "integrity": "sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ==", - "engines": { - "node": "*" - } - }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -11240,11 +11217,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "node_modules/xregexp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.2.0.tgz", - "integrity": "sha512-tWodXkrdYZPGadukpkmhKAbyp37CV5ZiFHacIVPhRZ4/sSt7qtOYHLv2dAqcPN0mBsViY2Qai9JkO7v2TBP6hg==" - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -11486,14 +11458,10 @@ "from": "@duckduckgo/autofill@github:duckduckgo/duckduckgo-autofill#15.1.0" }, "@duckduckgo/content-scope-scripts": { - "version": "git+ssh://git@github.com/duckduckgo/content-scope-scripts.git#1ed569676555d493c9c5575eaed22aa02569aac9", - "integrity": "sha512-TM59slUo27HDSrULhUqEygdG0uIu4/xlpw613+jtI3+JfrHNx/cyNM8SEvoRHVca5XTeKk/dNzn6P/tKVQCRww==", - "from": "@duckduckgo/content-scope-scripts@github:duckduckgo/content-scope-scripts#6.19.0", + "version": "git+ssh://git@github.com/duckduckgo/content-scope-scripts.git#695412097915d14e0d977f7c11f979af6448bd8c", + "from": "@duckduckgo/content-scope-scripts@github:duckduckgo/content-scope-scripts#6.34.0", "requires": { - "immutable-json-patch": "^5.1.3", - "parse-address": "^1.1.2", - "seedrandom": "^3.0.5", - "sjcl": "^1.0.8" + "immutable-json-patch": "^6.0.1" } }, "@duckduckgo/ddg2dnr": { @@ -11522,7 +11490,7 @@ "@duckduckgo/privacy-dashboard": { "version": "git+ssh://git@github.com/duckduckgo/privacy-dashboard.git#53fd1a0f8d91fcf475d9220f810141007300dffd", "integrity": "sha512-NwyhnuCVS+DDVgsriZ0olLvYjDUrU4Z8jW4bM1MksF9XdufEZm9NKVc4M1FgSYHJWS2bscLyNSYa/6d2EnUq4A==", - "from": "@duckduckgo/privacy-dashboard@github:duckduckgo/privacy-dashboard#53fd1a0f8d91fcf475d9220f810141007300dffd" + "from": "@duckduckgo/privacy-dashboard@github:duckduckgo/privacy-dashboard#7.1.1" }, "@duckduckgo/privacy-grade": { "version": "file:packages/privacy-grade", @@ -15483,9 +15451,9 @@ "dev": true }, "immutable-json-patch": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/immutable-json-patch/-/immutable-json-patch-5.1.3.tgz", - "integrity": "sha512-95AsF9hJTPpwtBGAnHmw57PASL672tb+vGHR5xLhH2VPuHSsLho7grjlfgQ65DIhHP+UmLCjdmuuA6L1ndJbZg==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/immutable-json-patch/-/immutable-json-patch-6.0.1.tgz", + "integrity": "sha512-BHL/cXMjwFZlTOffiWNdY8ZTvNyYLrutCnWxrcKPHr5FqpAb6vsO6WWSPnVSys3+DruFN6lhHJJPHi8uELQL5g==" }, "import-fresh": { "version": "3.3.0", @@ -17160,14 +17128,6 @@ "callsites": "^3.0.0" } }, - "parse-address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/parse-address/-/parse-address-1.1.2.tgz", - "integrity": "sha512-EnqetXieqyTlDzuuy+oT/pjjkWoI80MgFawDA/Z9LZBAMy+Iy6piURuX+Lr1iZNm7exD+V/B9IRjHaSj33adJw==", - "requires": { - "xregexp": "^3.1.1" - } - }, "parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -17956,11 +17916,6 @@ "xmlchars": "^2.2.0" } }, - "seedrandom": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", - "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==" - }, "semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -18116,11 +18071,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, - "sjcl": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.8.tgz", - "integrity": "sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ==" - }, "smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -19269,11 +19219,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "xregexp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.2.0.tgz", - "integrity": "sha512-tWodXkrdYZPGadukpkmhKAbyp37CV5ZiFHacIVPhRZ4/sSt7qtOYHLv2dAqcPN0mBsViY2Qai9JkO7v2TBP6hg==" - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 4571c6afb..b03dc6705 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ }, "dependencies": { "@duckduckgo/autofill": "github:duckduckgo/duckduckgo-autofill#15.1.0", - "@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#6.19.0", + "@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#6.34.0", "@duckduckgo/ddg2dnr": "file:packages/ddg2dnr", "@duckduckgo/jsbloom": "^1.0.2", "@duckduckgo/privacy-dashboard": "github:duckduckgo/privacy-dashboard#7.1.1", diff --git a/shared/js/devtools/panel.js b/shared/js/devtools/panel.js index ed9b46e9b..04256bf68 100644 --- a/shared/js/devtools/panel.js +++ b/shared/js/devtools/panel.js @@ -1,4 +1,4 @@ -import { getStackTraceOrigins } from '@duckduckgo/content-scope-scripts/src/utils'; +import { getStackTraceOrigins } from '@duckduckgo/content-scope-scripts/injected/src/utils'; const table = document.querySelector('#request-table'); const clearButton = document.getElementById('clear'); const refreshButton = document.getElementById('refresh'); diff --git a/unit-test/background/reference-tests/gpc-tests.js b/unit-test/background/reference-tests/gpc-tests.js index d7922d4c2..9a8336058 100644 --- a/unit-test/background/reference-tests/gpc-tests.js +++ b/unit-test/background/reference-tests/gpc-tests.js @@ -3,12 +3,12 @@ const tdsStorage = require('../../../shared/js/background/storage/tds').default; const Site = require('../../../shared/js/background/classes/site').default; const GPC = require('../../../shared/js/background/GPC'); -const GpcContentScript = require('@duckduckgo/content-scope-scripts/src/features/gpc').default; +const GpcContentScript = require('@duckduckgo/content-scope-scripts/injected/src/features/gpc').default; const gpcContentScript = new GpcContentScript('gpc'); const constants = require('../../../shared/data/constants'); const settings = require('../../../shared/js/background/settings'); -const contentScriptUtils = require('@duckduckgo/content-scope-scripts/src/utils.js'); +const contentScriptUtils = require('@duckduckgo/content-scope-scripts/injected/src/utils.js'); const testSets = require('@duckduckgo/privacy-reference-tests/global-privacy-control/tests.json'); const config = require('@duckduckgo/privacy-reference-tests/global-privacy-control/config_reference.json'); diff --git a/unit-test/background/reference-tests/referrer-trimming-tests.js b/unit-test/background/reference-tests/referrer-trimming-tests.js index b0709b463..601945f5a 100644 --- a/unit-test/background/reference-tests/referrer-trimming-tests.js +++ b/unit-test/background/reference-tests/referrer-trimming-tests.js @@ -4,9 +4,9 @@ const tdsStorage = require('../../../shared/js/background/storage/tds').default; const tabManager = require('../../../shared/js/background/tab-manager'); const { getArgumentsObject } = require('../../../shared/js/background/helpers/arguments-object'); -const JsReferrerProtection = require('@duckduckgo/content-scope-scripts/src/features/referrer').default; +const JsReferrerProtection = require('@duckduckgo/content-scope-scripts/injected/src/features/referrer').default; const jsReferrerProtection = new JsReferrerProtection('jsReferrer'); -const { isFeatureBroken } = require('@duckduckgo/content-scope-scripts/src/utils'); +const { isFeatureBroken } = require('@duckduckgo/content-scope-scripts/injected/src/utils'); const limitReferrerData = require('../../../shared/js/background/events/referrer-trimming'); diff --git a/unit-test/node/reference-tests/3p-cookies-tests.js b/unit-test/node/reference-tests/3p-cookies-tests.js index 36c373211..49e032a72 100644 --- a/unit-test/node/reference-tests/3p-cookies-tests.js +++ b/unit-test/node/reference-tests/3p-cookies-tests.js @@ -13,7 +13,7 @@ const { getArgumentsObject } = require('../../../shared/js/background/helpers/ar const jsdom = require('jsdom'); -const TrackingJsCookieProtection = require('@duckduckgo/content-scope-scripts/src/features/cookie').default; +const TrackingJsCookieProtection = require('@duckduckgo/content-scope-scripts/injected/src/features/cookie').default; const trackingJsCookieProtection = new TrackingJsCookieProtection('cookie'); const trackingConfigReference = require('@duckduckgo/privacy-reference-tests/block-third-party-tracking-cookies/config_reference.json'); diff --git a/unit-test/node/reference-tests/expire-1p-tracking-cookies.js b/unit-test/node/reference-tests/expire-1p-tracking-cookies.js index dd68e5a80..51d1d8412 100644 --- a/unit-test/node/reference-tests/expire-1p-tracking-cookies.js +++ b/unit-test/node/reference-tests/expire-1p-tracking-cookies.js @@ -63,10 +63,10 @@ for (const setName of Object.keys(testSets)) { // eslint-disable-next-line no-global-assign globalThis = jsdomWindow; - const utils = require('@duckduckgo/content-scope-scripts/src/utils'); + const utils = require('@duckduckgo/content-scope-scripts/injected/src/utils'); utils.setGlobal(jsdomWindow); - const JsCookieProtection = require('@duckduckgo/content-scope-scripts/src/features/cookie').default; + const JsCookieProtection = require('@duckduckgo/content-scope-scripts/injected/src/features/cookie').default; const jsCookieProtection = new JsCookieProtection('cookie'); jsCookieProtection.callLoad({ diff --git a/unit-test/node/reference-tests/fingerprinting-protection-tests.js b/unit-test/node/reference-tests/fingerprinting-protection-tests.js index 55680447c..0d87831c3 100644 --- a/unit-test/node/reference-tests/fingerprinting-protection-tests.js +++ b/unit-test/node/reference-tests/fingerprinting-protection-tests.js @@ -7,15 +7,15 @@ const tdsStorage = require('../../../shared/js/background/storage/tds').default; const tabManager = require('../../../shared/js/background/tab-manager'); const { getArgumentsObject } = require('../../../shared/js/background/helpers/arguments-object'); -const BatteryProtection = require('@duckduckgo/content-scope-scripts/src/features/fingerprinting-battery').default; +const BatteryProtection = require('@duckduckgo/content-scope-scripts/injected/src/features/fingerprinting-battery').default; const batteryProtection = new BatteryProtection('fingerprintingBattery'); -const HardwareProtection = require('@duckduckgo/content-scope-scripts/src/features/fingerprinting-hardware').default; +const HardwareProtection = require('@duckduckgo/content-scope-scripts/injected/src/features/fingerprinting-hardware').default; const hardwareProtection = new HardwareProtection('fingerprintingHardware'); -const ScreenProtection = require('@duckduckgo/content-scope-scripts/src/features/fingerprinting-screen-size').default; +const ScreenProtection = require('@duckduckgo/content-scope-scripts/injected/src/features/fingerprinting-screen-size').default; const screenProtection = new ScreenProtection('fingerprintingScreenSize'); -const TempStorageProtection = require('@duckduckgo/content-scope-scripts/src/features/fingerprinting-temporary-storage').default; +const TempStorageProtection = require('@duckduckgo/content-scope-scripts/injected/src/features/fingerprinting-temporary-storage').default; const tempStorageProtection = new TempStorageProtection('fingerprintingTemporaryStorage'); -const { isFeatureBroken } = require('@duckduckgo/content-scope-scripts/src/utils'); +const { isFeatureBroken } = require('@duckduckgo/content-scope-scripts/injected/src/utils'); const configReference = require('@duckduckgo/privacy-reference-tests/fingerprinting-protections/config_reference.json'); const testSets = require('@duckduckgo/privacy-reference-tests/fingerprinting-protections/tests.json'); diff --git a/unit-test/node/reference-tests/privacy-configuration-tests.js b/unit-test/node/reference-tests/privacy-configuration-tests.js index 76a414c12..36395830b 100644 --- a/unit-test/node/reference-tests/privacy-configuration-tests.js +++ b/unit-test/node/reference-tests/privacy-configuration-tests.js @@ -6,7 +6,7 @@ const tdsStorage = require('../../../shared/js/background/storage/tds').default; const Site = require('../../../shared/js/background/classes/site').default; const utils = require('../../../shared/js/background/utils'); -const contentScriptUtils = require('@duckduckgo/content-scope-scripts/src/utils.js'); +const contentScriptUtils = require('@duckduckgo/content-scope-scripts/injected/src/utils.js'); const testSets = require('@duckduckgo/privacy-reference-tests/privacy-configuration/tests.json'); const configs = {