Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class GmailWebmailStartup {

private injectFCVarScript = () => {
const scriptElement = document.createElement('script');
// eslint-disable-next-line @typescript-eslint/no-deprecated
scriptElement.src = chrome.runtime.getURL('/js/common/core/feature-config-injector.js');
(document.head || document.documentElement).appendChild(scriptElement);
};
Expand Down
96 changes: 49 additions & 47 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"@openpgp/web-stream-tools": "^0.0.13",
"@types/chai": "4.3.19",
"@types/chai-as-promised": "7.1.8",
"@types/chrome": "0.0.280",
"@types/chrome": "0.0.283",
"@types/dompurify": "3.0.5",
"@types/jquery": "3.5.32",
"@types/mailparser": "3.4.5",
"ava": "5.3.1",
"chai": "4.5.0",
"chai-as-promised": "7.1.2",
"eslint": "^9.14.0",
"eslint": "9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-header": "github:FlowCrypt/eslint-plugin-header",
"eslint-plugin-jsdoc": "^50.5.0",
Expand All @@ -32,12 +32,12 @@
"openpgp": "5.11.2",
"pdfjs-dist": "4.8.69",
"prettier": "^3.3.3",
"puppeteer": "23.7.1",
"puppeteer": "23.8.0",
"stylelint": "16.10.0",
"stylelint-config-standard": "36.0.1",
"typescript": "5.6.3",
"typescript-eslint": "^8.13.0",
"undici-types": "^6.20.0",
"undici-types": "^6.21.0",
"web-ext": "8.3.0",
"webpack-cli": "^5.1.1"
},
Expand Down
2 changes: 2 additions & 0 deletions test/source/browser/controllable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ export class ControllablePage extends ControllableBase {
const result = await this.target.evaluate(
async keys =>
await new Promise(resolve => {
// eslint-disable-next-line @typescript-eslint/no-deprecated
chrome.storage.local.get(keys, resolve);
}),
keys
Expand All @@ -875,6 +876,7 @@ export class ControllablePage extends ControllableBase {
};

public setLocalStorage = async (key: string, value: string | null): Promise<void> => {
// eslint-disable-next-line @typescript-eslint/no-deprecated
await this.target.evaluate(async (key, value) => await chrome.storage.local.set({ [key]: value }), key, value);
};

Expand Down
2 changes: 2 additions & 0 deletions test/source/patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ for (const srcFilePath of getAllFilesInDir('./extension', /\.ts$/)) {
* check for problems in manifest file (because dynamically generated)
* https://github.com/FlowCrypt/flowcrypt-browser/issues/2934
*/
// eslint-disable-next-line @typescript-eslint/no-deprecated
const expectedPermissions: chrome.runtime.ManifestPermissions[] = ['alarms', 'scripting', 'storage', 'tabs', 'unlimitedStorage'];
const expectedConsumerHostPermissions = ['https://*.google.com/*', 'https://www.googleapis.com/*', 'https://flowcrypt.com/*'];
const expectedEnterpriseHostPermissions = ['https://*.google.com/*', 'https://*.googleapis.com/*', 'https://flowcrypt.com/*'];
for (const buildType of ['chrome-consumer', 'chrome-enterprise', 'thunderbird-consumer', 'firefox-consumer']) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
const manifest = JSON.parse(readFileSync(`./build/${buildType}/manifest.json`).toString()) as chrome.runtime.Manifest;
const isManifestV3Build = buildType.includes('chrome') || buildType.includes('firefox');
const expectedHostPermissions = buildType.includes('consumer') ? expectedConsumerHostPermissions : expectedEnterpriseHostPermissions;
Expand Down
1 change: 1 addition & 0 deletions test/source/tests/page-recipe/abstract-page-recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export abstract class PageRecipe {
return await controllable.target.evaluate(
async msg =>
await new Promise(resolve => {
// eslint-disable-next-line @typescript-eslint/no-deprecated
chrome.runtime.sendMessage(msg, resolve);
}),
msg
Expand Down
5 changes: 4 additions & 1 deletion tooling/build-types-and-manifests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import { execSync as exec } from 'child_process';
const DIR = './build';
const version: string = (JSON.parse(readFileSync('./package.json').toString()) as { version: string }).version;

// eslint-disable-next-line @typescript-eslint/no-deprecated
const addManifest = (toBuildType: string, transform: (manifest: chrome.runtime.Manifest) => void, fromBuildType = 'generic-extension-wip') => {
// eslint-disable-next-line @typescript-eslint/no-deprecated
const manifest = JSON.parse(readFileSync(`${DIR}/${fromBuildType}/manifest.json`).toString()) as chrome.runtime.ManifestV3;
transform(manifest);
writeFileSync(`${DIR}/${toBuildType}/manifest.json`, JSON.stringify(manifest, undefined, 2));
Expand All @@ -37,7 +39,7 @@ addManifest('firefox-consumer', manifest => {
type: 'module',
scripts: ['/js/service_worker/background.js'],
};
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars, @typescript-eslint/no-deprecated
const { service_worker, ...newManifest } = manifest.background as chrome.runtime.ManifestV3;
manifest = newManifest;
manifest.permissions = manifest.permissions?.filter((p: string) => p !== 'unlimitedStorage');
Expand All @@ -52,6 +54,7 @@ addManifest(
manifest.name = 'FlowCrypt Encryption for Thunderbird';
manifest.description = 'Simple end-to-end encryption to secure email and attachments on Thunderbird';
manifest.permissions = [...(manifest.permissions ?? []), 'compose', 'messagesRead', 'messagesUpdate', 'messagesModify', 'accountsRead'];
// eslint-disable-next-line @typescript-eslint/no-deprecated
const manifestV3 = manifest as chrome.runtime.ManifestV3;
manifest.web_accessible_resources = manifestV3.web_accessible_resources?.[0].resources;
manifest.content_security_policy = manifestV3.content_security_policy?.extension_pages;
Expand Down
Loading