Skip to content

Commit a112cce

Browse files
committed
Merge branch 'master' into dependabot/npm_and_yarn/ava-6.1.1
# Conflicts: # package-lock.json # package.json # test/source/test.ts
2 parents 373d788 + a818d87 commit a112cce

File tree

158 files changed

+2443
-2396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+2443
-2396
lines changed

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,29 @@ updates:
1414
interval: "weekly"
1515
day: "sunday"
1616
time: "22:00"
17+
groups:
18+
npm-deps:
19+
patterns:
20+
- "*"
1721
ignore:
1822
# ignore all bootstrap major updates
1923
- dependency-name: "bootstrap"
2024
update-types: ["version-update:semver-major"]
2125
# TODO: upgrade iso-8859-2 when ava will have ESM support: https://github.com/orgs/avajs/projects/2
2226
# https://github.com/FlowCrypt/flowcrypt-browser/pull/3961#issuecomment-921335748
2327
- dependency-name: "iso-8859-2"
24-
update-types: ["version-update:semver-major"]
28+
versions: [ ">=1.0.1" ]
2529
- dependency-name: "openpgp"
2630
update-types: ["version-update:semver-major"]
27-
- dependency-name: "squire-rte"
28-
versions: ["2.0.3"]
29-
- dependency-name: "puppeteer"
30-
versions: ["21.1.1"] # some ui tests with FileChooser fail in this version
31+
- dependency-name: "web-ext"
32+
update-types: ["version-update:semver-major"]
33+
- dependency-name: "@openpgp/web-stream-tools"
34+
versions: [">= 0.0.14"]
35+
- dependency-name: "ava"
36+
update-types: ["version-update:semver-major"]
37+
- dependency-name: "chai"
38+
update-types: ["version-update:semver-major"]
39+
- dependency-name: "chai-as-promised"
40+
update-types: ["version-update:semver-major"]
41+
- dependency-name: "eslint"
42+
update-types: ["version-update:semver-major"]

SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Security
22

3-
Overview: https://flowcrypt.com/docs/technical/security.html
3+
Overview: https://flowcrypt.com/docs/technical/security/overview.html
44

5-
Reporting vulnerabilities: https://flowcrypt.com/docs/technical/bug-bounty.html
5+
Reporting vulnerabilities: https://flowcrypt.com/docs/technical/security/bug-bounty.html
66

7-
Fixed vulnerabilities: https://flowcrypt.com/docs/technical/fixed-vulnerabilities.html
7+
Fixed vulnerabilities: https://flowcrypt.com/docs/technical/security/fixed-vulnerabilities.html

conf/tsconfig.content_scripts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
3+
"target": "ES2022",
44
"module": "es6",
55
"forceConsistentCasingInFileNames": true,
66
"noImplicitReturns": true,

conf/tsconfig.streams.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
4-
"lib": [
5-
"es6",
6-
"dom"
7-
],
3+
"target": "ES2022",
4+
"lib": ["es6", "dom"],
85
"allowJs": true,
96
"alwaysStrict": true,
107
"noImplicitAny": true,
@@ -16,7 +13,5 @@
1613
"outDir": "../build/streams",
1714
"skipLibCheck": true
1815
},
19-
"include": [
20-
"../node_modules/@openpgp/web-stream-tools/lib/*.js"
21-
]
22-
}
16+
"include": ["../node_modules/@openpgp/web-stream-tools/lib/*.js"]
17+
}

conf/tsconfig.tooling.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
3+
"target": "ES2022",
44
"lib": ["es6", "dom"],
55
"alwaysStrict": true,
66
"noImplicitAny": true,

.eslintrc.js renamed to eslint.config.mjs

Lines changed: 90 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
module.exports = {
2-
parser: '@typescript-eslint/parser',
3-
env: {
4-
browser: true,
5-
node: true,
6-
commonjs: true,
7-
es6: true,
1+
// Importing necessary ESLint plugins
2+
import tseslint from 'typescript-eslint';
3+
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests';
4+
import headerPlugin from 'eslint-plugin-header';
5+
import jsdocPlugin from 'eslint-plugin-jsdoc';
6+
import preferArrowPlugin from 'eslint-plugin-prefer-arrow';
7+
import importPlugin from 'eslint-plugin-import';
8+
import noNullPlugin from 'eslint-plugin-no-null';
9+
import localRulesPlugin from 'eslint-plugin-local-rules';
10+
import eslintConfigPrettier from 'eslint-config-prettier';
11+
import pluginJs from '@eslint/js';
12+
13+
const commonConfig = {
14+
plugins: {
15+
'@typescript-eslint': tseslint.plugin,
16+
'no-only-tests': noOnlyTestsPlugin,
17+
header: headerPlugin,
18+
jsdoc: jsdocPlugin,
19+
'prefer-arrow': preferArrowPlugin,
20+
import: importPlugin,
21+
'no-null': noNullPlugin,
22+
'local-rules': localRulesPlugin,
823
},
9-
globals: {
10-
$: false,
11-
chrome: false,
12-
OpenPGP: false,
13-
},
14-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/strict', 'plugin:@typescript-eslint/stylistic', 'prettier'],
15-
ignorePatterns: ['.eslintrc.js'],
16-
parserOptions: {
17-
project: 'tsconfig.json',
18-
sourceType: 'module',
24+
languageOptions: {
25+
parser: tseslint.parser,
26+
parserOptions: {
27+
project: true,
28+
},
1929
},
20-
plugins: [
21-
'no-only-tests',
22-
'header',
23-
'eslint-plugin-jsdoc',
24-
'eslint-plugin-prefer-arrow',
25-
'eslint-plugin-import',
26-
'eslint-plugin-no-null',
27-
'eslint-plugin-local-rules',
28-
'@typescript-eslint',
29-
],
30-
root: true,
3130
rules: {
3231
'@typescript-eslint/consistent-indexed-object-style': 'off',
3332
'@typescript-eslint/consistent-type-assertions': 'error',
@@ -84,6 +83,14 @@ module.exports = {
8483
'@typescript-eslint/no-parameter-properties': 'off',
8584
'@typescript-eslint/no-shadow': 'off',
8685
'@typescript-eslint/no-unsafe-return': 'error',
86+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
87+
'@typescript-eslint/no-unnecessary-condition': 'off',
88+
'@typescript-eslint/restrict-template-expressions': 'off',
89+
'@typescript-eslint/restrict-plus-operands': 'off',
90+
'@typescript-eslint/require-await': 'off',
91+
'@typescript-eslint/no-confusing-void-expression': 'off',
92+
'@typescript-eslint/no-misused-promises': 'off',
93+
'@typescript-eslint/no-redundant-type-constituents': 'off',
8794
'@typescript-eslint/no-unused-vars': ['error'],
8895
'@typescript-eslint/no-unused-expressions': 'error',
8996
'@typescript-eslint/no-use-before-define': 'off',
@@ -156,13 +163,60 @@ module.exports = {
156163
],
157164
'local-rules/standard-loops': 'error',
158165
},
159-
overrides: [
160-
{
161-
files: './test/**/*.ts',
162-
rules: {
163-
'@typescript-eslint/no-unused-expressions': 'off',
164-
'@typescript-eslint/no-non-null-assertion': 'off',
166+
};
167+
168+
export default [
169+
{
170+
ignores: ['extension/types/**', 'extension/js/common/core/types/**', 'test/source/core/types/**', 'build/**', 'extension/lib/**', 'eslint.config.js'],
171+
},
172+
pluginJs.configs.recommended,
173+
...tseslint.configs.strictTypeChecked,
174+
...tseslint.configs.stylisticTypeChecked,
175+
eslintConfigPrettier,
176+
{
177+
...commonConfig,
178+
files: ['extension/**/*.ts'],
179+
languageOptions: {
180+
...commonConfig.languageOptions,
181+
parserOptions: {
182+
project: './tsconfig.json',
165183
},
166184
},
167-
],
168-
};
185+
},
186+
{
187+
...commonConfig,
188+
files: ['tooling/**/*.ts'],
189+
languageOptions: {
190+
...commonConfig.languageOptions,
191+
parserOptions: {
192+
project: './conf/tsconfig.tooling.json',
193+
},
194+
},
195+
},
196+
{
197+
...commonConfig,
198+
files: ['test/**/*.ts'],
199+
languageOptions: {
200+
...commonConfig.languageOptions,
201+
parserOptions: {
202+
project: './conf/tsconfig.test.eslint.json',
203+
},
204+
},
205+
rules: {
206+
...commonConfig.rules,
207+
'@typescript-eslint/no-unused-expressions': 'off',
208+
'@typescript-eslint/no-non-null-assertion': 'off',
209+
'@typescript-eslint/no-unsafe-assignment': 'off',
210+
'@typescript-eslint/no-unsafe-call': 'off',
211+
'@typescript-eslint/no-unsafe-member-access': 'off',
212+
},
213+
},
214+
...tseslint.config({
215+
files: ['extension/js/content_scripts/webmail/**/*.ts'],
216+
languageOptions: {
217+
parserOptions: {
218+
project: './conf/tsconfig.content_scripts.json',
219+
},
220+
},
221+
}),
222+
];

extension/changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<div class="lightboxed">
22

3+
version 8.5.7 on June 13, 2024: <a href="https://github.com/FlowCrypt/flowcrypt-browser/milestone/480?closed=1" target="_blank">Exception reports improvements</a>
4+
35
version 8.5.6 on June 3, 2024: <a href="https://github.com/FlowCrypt/flowcrypt-browser/milestone/479?closed=1" target="_blank">Manifest V3 fixes</a>
46

57
version 8.5.5 on May 20, 2024: <a href="https://github.com/FlowCrypt/flowcrypt-browser/milestone/478?closed=1" target="_blank">Manifest V3</a>

extension/chrome/dev/ci_unit_test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const libs: unknown[] = [
5252
/* eslint-disable @typescript-eslint/no-explicit-any */
5353
// add them to global scope so ci can use them
5454
for (const lib of libs) {
55+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
5556
(window as any)[(lib as any).name] = lib;
5657
}
5758
/* eslint-enable @typescript-eslint/no-explicit-any */

extension/chrome/dev/export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Catch.try(async () => {
5050
const { messages, resultSizeEstimate, nextPageToken } = await gmail.msgList('is:inbox OR is:sent', false, nextCyclePageToken);
5151
print(`msgList: ${(messages || []).length} msgs, resultSizeEstimate:${resultSizeEstimate}, nextPageToken: ${nextPageToken}`);
5252
msgMetas.push(...(messages || []));
53-
if (!messages || !messages.length || !nextPageToken) {
53+
if (!messages?.length || !nextPageToken) {
5454
break;
5555
}
5656
nextCyclePageToken = nextPageToken;

0 commit comments

Comments
 (0)