Skip to content

Commit

Permalink
Merge pull request #530 from GoogleChromeLabs/chore/rename-third-party
Browse files Browse the repository at this point in the history
Rename `third_party` to `assets`
  • Loading branch information
gagan0123 authored Feb 27, 2024
2 parents 125aecd + e2e1530 commit b679abd
Show file tree
Hide file tree
Showing 23 changed files with 13 additions and 16 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
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 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 b679abd

Please sign in to comment.