From 97e74d8957629e03e1386172f14799c6c6f28e22 Mon Sep 17 00:00:00 2001 From: Brian Daugherty Date: Tue, 13 Feb 2024 09:49:54 -0700 Subject: [PATCH 1/3] Nit: remove unneeded word --- packages/library-detection/src/libraries/gsi/accordion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/library-detection/src/libraries/gsi/accordion.tsx b/packages/library-detection/src/libraries/gsi/accordion.tsx index ae2aae5c0..4f54d3540 100644 --- a/packages/library-detection/src/libraries/gsi/accordion.tsx +++ b/packages/library-detection/src/libraries/gsi/accordion.tsx @@ -40,7 +40,7 @@ const GISAccordion = ({ matches }: AccordionProps) => { Due to Privacy Sandbox enforcements some features are backward incompatible or deprecated. This report performs a page scan for script src elements and affected JavaScript objects and methods. Review the - following features in and{' '} + following features and{' '} Date: Tue, 27 Feb 2024 11:08:37 +0800 Subject: [PATCH 2/3] Rename `third_party` to `assets` --- {third_party => assets}/data/open-cookie-database.json | 0 {third_party => assets}/icons/ad.svg | 0 {third_party => assets}/icons/anti-covert.svg | 0 {third_party => assets}/icons/clear-icon.svg | 0 {third_party => assets}/icons/cross-icon.svg | 0 {third_party => assets}/icons/done.svg | 0 {third_party => assets}/icons/filter-icon.svg | 0 {third_party => assets}/icons/gear.svg | 0 {third_party => assets}/icons/information-icon.svg | 0 {third_party => assets}/icons/partition.svg | 0 {third_party => assets}/icons/right-arrow.svg | 0 {third_party => assets}/icons/search-icon.svg | 0 {third_party => assets}/icons/settings-tab-white.svg | 0 {third_party => assets}/icons/settings-tab.svg | 0 packages/cli/src/utils/fetchCookieDictionary.ts | 7 +++---- packages/extension/src/manifest.json | 2 +- packages/extension/src/utils/fetchCookieDictionary.ts | 4 +--- .../settings/components/informationContainer.tsx | 4 ++-- .../components/settings/components/settingsContainer.tsx | 2 +- packages/extension/src/view/devtools/tabs.tsx | 4 ++-- packages/extension/webpack.config.cjs | 2 +- scripts/update-cookie-db.cjs | 2 +- tests/jest.config.cjs | 2 +- 23 files changed, 13 insertions(+), 16 deletions(-) rename {third_party => assets}/data/open-cookie-database.json (100%) rename {third_party => assets}/icons/ad.svg (100%) rename {third_party => assets}/icons/anti-covert.svg (100%) rename {third_party => assets}/icons/clear-icon.svg (100%) rename {third_party => assets}/icons/cross-icon.svg (100%) rename {third_party => assets}/icons/done.svg (100%) rename {third_party => assets}/icons/filter-icon.svg (100%) rename {third_party => assets}/icons/gear.svg (100%) rename {third_party => assets}/icons/information-icon.svg (100%) rename {third_party => assets}/icons/partition.svg (100%) rename {third_party => assets}/icons/right-arrow.svg (100%) rename {third_party => assets}/icons/search-icon.svg (100%) rename {third_party => assets}/icons/settings-tab-white.svg (100%) rename {third_party => assets}/icons/settings-tab.svg (100%) diff --git a/third_party/data/open-cookie-database.json b/assets/data/open-cookie-database.json similarity index 100% rename from third_party/data/open-cookie-database.json rename to assets/data/open-cookie-database.json diff --git a/third_party/icons/ad.svg b/assets/icons/ad.svg similarity index 100% rename from third_party/icons/ad.svg rename to assets/icons/ad.svg diff --git a/third_party/icons/anti-covert.svg b/assets/icons/anti-covert.svg similarity index 100% rename from third_party/icons/anti-covert.svg rename to assets/icons/anti-covert.svg diff --git a/third_party/icons/clear-icon.svg b/assets/icons/clear-icon.svg similarity index 100% rename from third_party/icons/clear-icon.svg rename to assets/icons/clear-icon.svg diff --git a/third_party/icons/cross-icon.svg b/assets/icons/cross-icon.svg similarity index 100% rename from third_party/icons/cross-icon.svg rename to assets/icons/cross-icon.svg diff --git a/third_party/icons/done.svg b/assets/icons/done.svg similarity index 100% rename from third_party/icons/done.svg rename to assets/icons/done.svg diff --git a/third_party/icons/filter-icon.svg b/assets/icons/filter-icon.svg similarity index 100% rename from third_party/icons/filter-icon.svg rename to assets/icons/filter-icon.svg diff --git a/third_party/icons/gear.svg b/assets/icons/gear.svg similarity index 100% rename from third_party/icons/gear.svg rename to assets/icons/gear.svg diff --git a/third_party/icons/information-icon.svg b/assets/icons/information-icon.svg similarity index 100% rename from third_party/icons/information-icon.svg rename to assets/icons/information-icon.svg diff --git a/third_party/icons/partition.svg b/assets/icons/partition.svg similarity index 100% rename from third_party/icons/partition.svg rename to assets/icons/partition.svg diff --git a/third_party/icons/right-arrow.svg b/assets/icons/right-arrow.svg similarity index 100% rename from third_party/icons/right-arrow.svg rename to assets/icons/right-arrow.svg diff --git a/third_party/icons/search-icon.svg b/assets/icons/search-icon.svg similarity index 100% rename from third_party/icons/search-icon.svg rename to assets/icons/search-icon.svg diff --git a/third_party/icons/settings-tab-white.svg b/assets/icons/settings-tab-white.svg similarity index 100% rename from third_party/icons/settings-tab-white.svg rename to assets/icons/settings-tab-white.svg diff --git a/third_party/icons/settings-tab.svg b/assets/icons/settings-tab.svg similarity index 100% rename from third_party/icons/settings-tab.svg rename to assets/icons/settings-tab.svg diff --git a/packages/cli/src/utils/fetchCookieDictionary.ts b/packages/cli/src/utils/fetchCookieDictionary.ts index e636f1dd5..1e6633b3c 100644 --- a/packages/cli/src/utils/fetchCookieDictionary.ts +++ b/packages/cli/src/utils/fetchCookieDictionary.ts @@ -31,10 +31,9 @@ import { CookieDatabase } from '../types'; */ export async function fetchDictionary(): Promise { const data = JSON.parse( - await fs.readFile( - path.resolve('./third_party/data/open-cookie-database.json'), - { encoding: 'utf8' } - ) + await fs.readFile(path.resolve('./assets/data/open-cookie-database.json'), { + encoding: 'utf8', + }) ); return data; diff --git a/packages/extension/src/manifest.json b/packages/extension/src/manifest.json index 5373ef930..c32e2e933 100644 --- a/packages/extension/src/manifest.json +++ b/packages/extension/src/manifest.json @@ -37,7 +37,7 @@ }, "web_accessible_resources": [ { - "resources": ["third_party/data/*.json", "data/*json"], + "resources": ["assets/data/*.json", "data/*json"], "matches": ["*://*/*"] } ] diff --git a/packages/extension/src/utils/fetchCookieDictionary.ts b/packages/extension/src/utils/fetchCookieDictionary.ts index 242ef2d08..b7f6aa254 100644 --- a/packages/extension/src/utils/fetchCookieDictionary.ts +++ b/packages/extension/src/utils/fetchCookieDictionary.ts @@ -23,9 +23,7 @@ import { type CookieDatabase } from '@ps-analysis-tool/common'; * @returns {Promise} Open Cookie Data base */ export async function fetchDictionary(): Promise { - const url = chrome.runtime.getURL( - 'third_party/data/open-cookie-database.json' - ); + const url = chrome.runtime.getURL('assets/data/open-cookie-database.json'); const data = await (await fetch(url)).json(); diff --git a/packages/extension/src/view/devtools/components/settings/components/informationContainer.tsx b/packages/extension/src/view/devtools/components/settings/components/informationContainer.tsx index 1e65573bc..6b2ae2704 100644 --- a/packages/extension/src/view/devtools/components/settings/components/informationContainer.tsx +++ b/packages/extension/src/view/devtools/components/settings/components/informationContainer.tsx @@ -25,10 +25,10 @@ import classNames from 'classnames'; import { useSettingsStore } from '../../../stateProviders/syncSettingsStore'; // @ts-ignore // eslint-disable-next-line import/no-relative-packages -import InformationIcon from '../../../../../../../../third_party/icons/information-icon.svg'; +import InformationIcon from '../../../../../../../../assets/icons/information-icon.svg'; // @ts-ignore // eslint-disable-next-line import/no-relative-packages -import Done from '../../../../../../../../third_party/icons/done.svg'; +import Done from '../../../../../../../../assets/icons/done.svg'; const InformationContainer = () => { const { currentTabs, currentExtensions, browserInformation, OSInformation } = diff --git a/packages/extension/src/view/devtools/components/settings/components/settingsContainer.tsx b/packages/extension/src/view/devtools/components/settings/components/settingsContainer.tsx index c976969f4..e5dd6bf1d 100644 --- a/packages/extension/src/view/devtools/components/settings/components/settingsContainer.tsx +++ b/packages/extension/src/view/devtools/components/settings/components/settingsContainer.tsx @@ -25,7 +25,7 @@ import SettingOption from './settingOption'; import { useSettingsStore } from '../../../stateProviders/syncSettingsStore'; // @ts-ignore // eslint-disable-next-line import/no-relative-packages -import Gear from '../../../../../../../../third_party/icons/gear.svg'; +import Gear from '../../../../../../../../assets/icons/gear.svg'; import { SETTING_PAGE_CONTROLS } from '../../../../../constants'; interface settingsToReturnObject { diff --git a/packages/extension/src/view/devtools/tabs.tsx b/packages/extension/src/view/devtools/tabs.tsx index 1dd872de5..94c0c11e0 100644 --- a/packages/extension/src/view/devtools/tabs.tsx +++ b/packages/extension/src/view/devtools/tabs.tsx @@ -49,10 +49,10 @@ import { */ // @ts-ignore // eslint-disable-next-line import/no-relative-packages -import SettingsTab from '../../../../../third_party/icons/settings-tab.svg'; +import SettingsTab from '../../../../../assets/icons/settings-tab.svg'; // @ts-ignore // eslint-disable-next-line import/no-relative-packages -import SettingsTabWhite from '../../../../../third_party/icons/settings-tab-white.svg'; +import SettingsTabWhite from '../../../../../assets/icons/settings-tab-white.svg'; import { SiteBoundaries, Chips, diff --git a/packages/extension/webpack.config.cjs b/packages/extension/webpack.config.cjs index ddb9fc003..6f954aed0 100644 --- a/packages/extension/webpack.config.cjs +++ b/packages/extension/webpack.config.cjs @@ -33,7 +33,7 @@ const root = { patterns: [ { from: 'src/manifest.json', to: '' }, { from: 'icons', to: 'icons' }, - { from: '../../third_party', to: 'third_party' }, + { from: '../../assets', to: 'assets' }, { from: '../../data', to: 'data' }, ], }), diff --git a/scripts/update-cookie-db.cjs b/scripts/update-cookie-db.cjs index c046313f1..c261f144d 100644 --- a/scripts/update-cookie-db.cjs +++ b/scripts/update-cookie-db.cjs @@ -22,7 +22,7 @@ const path = require('path'); const csvtojson = require('csvtojson'); const process = require('process'); const fetch = require('node-fetch'); -const targetDIR = path.resolve(__dirname, '..', 'third_party/data'); +const targetDIR = path.resolve(__dirname, '..', 'assets/data'); const requestURL = 'https://raw.githubusercontent.com/rtCamp/Open-Cookie-Database/master/open-cookie-database.csv'; diff --git a/tests/jest.config.cjs b/tests/jest.config.cjs index 1da8b2a39..0d68abf5c 100644 --- a/tests/jest.config.cjs +++ b/tests/jest.config.cjs @@ -43,7 +43,7 @@ module.exports = { coveragePathIgnorePatterns: [ '/node_modules', '/dist', - '/third_party', + '/assets', '/data', '/stories/', '/packages/extension/src/view/devtools/index.tsx', From a38b3b2c2d78ae2984351de811b0340144b4b82c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 00:52:40 +0530 Subject: [PATCH 3/3] Chore(deps): Bump es5-ext from 0.10.62 to 0.10.64 (#533) Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.64. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.64) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 48 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index eefbe1597..c187b3e9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10971,12 +10971,14 @@ } }, "node_modules/es5-ext": { - "version": "0.10.62", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "hasInstallScript": true, - "license": "ISC", "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "engines": { @@ -11694,6 +11696,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/espree": { "version": "9.6.1", "dev": true, @@ -32428,10 +32449,13 @@ } }, "es5-ext": { - "version": "0.10.62", + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "requires": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", "next-tick": "^1.1.0" } }, @@ -32897,6 +32921,24 @@ "version": "3.4.3", "dev": true }, + "esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" + }, + "dependencies": { + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + } + } + }, "espree": { "version": "9.6.1", "dev": true,