Skip to content

Commit

Permalink
Merge branch 'main' of github.com:GoogleChromeLabs/ps-analysis-tool i…
Browse files Browse the repository at this point in the history
…nto develop
  • Loading branch information
mohdsayed committed Feb 27, 2024
2 parents 2eb6715 + a38b3b2 commit b941784
Show file tree
Hide file tree
Showing 25 changed files with 59 additions and 20 deletions.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
48 changes: 45 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions packages/cli/src/utils/fetchCookieDictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ import { CookieDatabase } from '../types';
*/
export async function fetchDictionary(): Promise<CookieDatabase> {
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;
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"web_accessible_resources": [
{
"resources": ["third_party/data/*.json", "data/*json"],
"resources": ["assets/data/*.json", "data/*json"],
"matches": ["*://*/*"]
}
]
Expand Down
4 changes: 1 addition & 3 deletions packages/extension/src/utils/fetchCookieDictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import { type CookieDatabase } from '@ps-analysis-tool/common';
* @returns {Promise<CookieDatabase>} Open Cookie Data base
*/
export async function fetchDictionary(): Promise<CookieDatabase> {
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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/view/devtools/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
],
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/library-detection/src/libraries/gsi/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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{' '}
<a
className="text-bright-navy-blue dark:text-jordy-blue"
target="_blank"
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-cookie-db.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion tests/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
coveragePathIgnorePatterns: [
'<rootDir>/node_modules',
'<rootDir>/dist',
'<rootDir>/third_party',
'<rootDir>/assets',
'<rootDir>/data',
'/stories/',
'<rootDir>/packages/extension/src/view/devtools/index.tsx',
Expand Down

0 comments on commit b941784

Please sign in to comment.