Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5498 Upgrade to puppeteer v22 #5592

Merged
merged 109 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
9a8fd9a
upgrade to puppeteer 21.6.0
sosnovsky Dec 6, 2023
7f9da98
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Dec 14, 2023
3e57b03
puppeteer v21.6.1
sosnovsky Dec 14, 2023
9078f7e
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Dec 20, 2023
c5d45fe
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Dec 27, 2023
52d7420
wip
sosnovsky Dec 27, 2023
a6bb65a
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jan 1, 2024
52b80c1
wip
sosnovsky Jan 4, 2024
b4d1afe
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jan 4, 2024
d64cc3b
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jan 8, 2024
551caf8
wip
sosnovsky Jan 8, 2024
92a0d42
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jan 24, 2024
7477555
wip
sosnovsky Jan 25, 2024
be8da7c
wip
sosnovsky Jan 26, 2024
9e31d74
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jan 30, 2024
d27d99d
21.11.0
sosnovsky Feb 2, 2024
a0dee01
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Feb 5, 2024
78b8679
puppeteer v22
sosnovsky Feb 5, 2024
d30b5e5
wip
sosnovsky Feb 6, 2024
efbdcc5
test fix
sosnovsky Feb 7, 2024
b6f898c
wip
sosnovsky Feb 7, 2024
842d9ac
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Feb 8, 2024
2e9c1b4
wip
sosnovsky Feb 8, 2024
709e169
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Feb 12, 2024
3101d31
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Feb 19, 2024
57e78ce
22.1.0
sosnovsky Feb 19, 2024
f2ec470
wip
sosnovsky Feb 20, 2024
56138b3
22.2.0
sosnovsky Feb 22, 2024
f30ca73
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Feb 26, 2024
b9301cc
22.3.0
sosnovsky Feb 26, 2024
09a38ac
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Mar 4, 2024
ba9dae8
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Mar 10, 2024
1683a3b
22.4.1
sosnovsky Mar 10, 2024
ce0e52a
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Mar 11, 2024
0f88747
wip
sosnovsky Mar 11, 2024
bd417f8
wip
sosnovsky Mar 11, 2024
41ae820
wip
sosnovsky Mar 12, 2024
af1623e
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Mar 18, 2024
289e100
22.5.0
sosnovsky Mar 18, 2024
1146fbf
22.6.0
sosnovsky Mar 21, 2024
e0cee75
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Mar 21, 2024
2ab4532
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Mar 25, 2024
dbd1956
wip
sosnovsky Mar 25, 2024
5b1cfec
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Apr 1, 2024
f00bd82
22.6.2
sosnovsky Apr 3, 2024
f7aea44
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Apr 5, 2024
18e4b16
22.6.3
sosnovsky Apr 5, 2024
36a686b
wip
sosnovsky Apr 6, 2024
6007f73
wip
sosnovsky Apr 6, 2024
3bb893a
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Apr 8, 2024
4070b71
wip
sosnovsky Apr 8, 2024
5164920
wip
sosnovsky Apr 8, 2024
ceb2ecd
wip
sosnovsky Apr 8, 2024
2b69caf
wip
sosnovsky Apr 9, 2024
7a9bcbb
wip
sosnovsky Apr 9, 2024
0fb6be5
wip
sosnovsky Apr 11, 2024
9581c7c
wip
sosnovsky Apr 12, 2024
a722b0d
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Apr 15, 2024
28b9624
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Apr 22, 2024
7bbbdbc
22.7.0
sosnovsky Apr 24, 2024
acabfdf
Merge branch 'master' into 5498-puppeteer-v21
ioanmo226 Apr 29, 2024
e1079f0
upgrade puppeteer
ioanmo226 May 8, 2024
4486624
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky May 9, 2024
149bfaf
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky May 14, 2024
42195d1
fix: merge conflicts
ioanmo226 May 14, 2024
882b0eb
fix: conflicts
ioanmo226 May 14, 2024
a58ed06
revert changes
ioanmo226 May 14, 2024
6443a4b
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky May 17, 2024
243233f
Merge branch 'master' into 5498-puppeteer-v21
ioanmo226 May 20, 2024
f9e94fb
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky May 27, 2024
68c0103
fix tests
sosnovsky May 27, 2024
b1a0487
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky May 27, 2024
1eae386
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky May 30, 2024
f35d318
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky May 31, 2024
c19bc06
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 3, 2024
4e5a85d
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 3, 2024
a5dacd5
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 5, 2024
e85f2a7
wip
sosnovsky Jun 5, 2024
4a5684a
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 5, 2024
51f8336
wip
sosnovsky Jun 6, 2024
4de2f36
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 6, 2024
92630ec
wip
sosnovsky Jun 7, 2024
22b26cd
wip
sosnovsky Jun 7, 2024
a26fcff
wip
sosnovsky Jun 7, 2024
b93d27f
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 10, 2024
2ebe238
wip
sosnovsky Jun 11, 2024
dc7a54b
22.10.1
sosnovsky Jun 12, 2024
80774d1
22.11.0
sosnovsky Jun 13, 2024
921d99d
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 14, 2024
87c5c02
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 17, 2024
8612b12
wip
sosnovsky Jun 18, 2024
7c61202
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 20, 2024
18b787a
increase timeout
sosnovsky Jun 20, 2024
24bca2b
wip
sosnovsky Jun 21, 2024
348015e
wip
sosnovsky Jun 21, 2024
cc9587e
test
sosnovsky Jun 21, 2024
f861d52
test
sosnovsky Jun 21, 2024
c4d593f
fix
sosnovsky Jun 21, 2024
338053c
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 22, 2024
9ee380b
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 24, 2024
a2d2900
Merge branch 'master' into 5498-puppeteer-v21
sosnovsky Jun 25, 2024
1df2b01
fix
sosnovsky Jun 25, 2024
9111982
fix
sosnovsky Jun 25, 2024
d0ec26d
fix
sosnovsky Jun 25, 2024
b10d0c2
fix
sosnovsky Jun 25, 2024
5eb3fc6
fix
sosnovsky Jun 25, 2024
9645ec3
fix
sosnovsky Jun 25, 2024
b8ed775
fixes
sosnovsky Jun 25, 2024
494727e
update dependabot.yml
sosnovsky Jun 25, 2024
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
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ updates:
versions: [ ">=1.0.1" ]
- dependency-name: "openpgp"
update-types: ["version-update:semver-major"]
- dependency-name: "puppeteer"
update-types: ["version-update:semver-major"]
- dependency-name: "web-ext"
update-types: ["version-update:semver-major"]
- dependency-name: "@openpgp/web-stream-tools"
Expand Down
4 changes: 2 additions & 2 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ blocks:
shopt -s nullglob
for file in build/test/test/debugArtifacts/debugHtmlAttachment-*.html; do
echo "Uploading debug file $file as job artifact..."
artifact push job "$file"
artifact push job "$file" --force
done

- name: Live UI Gmail tests
Expand Down Expand Up @@ -89,7 +89,7 @@ blocks:
shopt -s nullglob
for file in build/test/test/debugArtifacts/debugHtmlAttachment-*.html; do
echo "Uploading debug file $file as job artifact..."
artifact push job "$file"
artifact push job "$file" --force
done

- name: Other tests
Expand Down
2 changes: 1 addition & 1 deletion conf/tsconfig.content_scripts.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2020",
"target": "ES2022",
"module": "es6",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
Expand Down
13 changes: 4 additions & 9 deletions conf/tsconfig.streams.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"compilerOptions": {
"target": "ES2020",
"lib": [
"es6",
"dom"
],
"target": "ES2022",
"lib": ["es6", "dom"],
"allowJs": true,
"alwaysStrict": true,
"noImplicitAny": true,
Expand All @@ -16,7 +13,5 @@
"outDir": "../build/streams",
"skipLibCheck": true
},
"include": [
"../node_modules/@openpgp/web-stream-tools/lib/*.js"
]
}
"include": ["../node_modules/@openpgp/web-stream-tools/lib/*.js"]
}
2 changes: 1 addition & 1 deletion conf/tsconfig.tooling.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2020",
"target": "ES2022",
"lib": ["es6", "dom"],
"alwaysStrict": true,
"noImplicitAny": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class ComposeRecipientsModule extends ViewModule<ComposeView> {
this.view.errModule.debug(`parseRenderRecipients(force: ${force}).4`);
} else {
this.view.sizeModule.setInputTextHeightManuallyIfNeeded();
$('body').attr('data-test-state', 'ready');
document.querySelector('body')?.setAttribute('data-test-state', 'ready');
}
}
};
Expand Down Expand Up @@ -282,7 +282,7 @@ export class ComposeRecipientsModule extends ViewModule<ComposeView> {

public evaluateRecipients = async (recipientEls: ValidRecipientElement[], triggerCallback = true) => {
this.view.errModule.debug(`evaluateRecipients`);
$('body').attr('data-test-state', 'working');
document.querySelector('body')?.setAttribute('data-test-state', 'working');
for (const recipientEl of recipientEls) {
this.view.S.now('send_btn_text').text(this.BTN_LOADING);
this.view.sizeModule.setInputTextHeightManuallyIfNeeded();
Expand All @@ -307,7 +307,7 @@ export class ComposeRecipientsModule extends ViewModule<ComposeView> {
}
}
this.setEmailsPreview();
$('body').attr('data-test-state', 'ready');
document.querySelector('body')?.setAttribute('data-test-state', 'ready');
this.view.sizeModule.setInputTextHeightManuallyIfNeeded();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class ComposeRenderModule extends ViewModule<ComposeView> {
};

public closeMsg = () => {
$('body').attr('data-test-state', 'closed'); // used by automated tests
document.querySelector('body')?.setAttribute('data-test-state', 'closed'); // used by automated tests
ioanmo226 marked this conversation as resolved.
Show resolved Hide resolved
if (this.view.isReplyBox) {
BrowserMsg.send.closeReplyMessage(this.view.parentTabId, { frameId: this.view.frameId });
} else {
Expand Down Expand Up @@ -472,7 +472,7 @@ export class ComposeRenderModule extends ViewModule<ComposeView> {
.filter(r => r.evaluating)
.map(r => r.evaluating)
);
$('body').attr('data-test-state', 'ready'); // set as ready so that automated tests can evaluate results
document.querySelector('body')?.setAttribute('data-test-state', 'ready'); // set as ready so that automated tests can evaluate results
};

private renderReplySuccessAttachments = (attachments: Attachment[], msgId: string, isEncrypted: boolean) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export class BaseMailFormatter {
protected richtext: boolean;
protected acctEmail: string;

public constructor(view: ComposeView, protected isDraft = false) {
public constructor(
view: ComposeView,
protected isDraft = false
) {
this.view = view;
this.richtext = view.sendBtnModule.popover.choices.richtext;
this.acctEmail = this.view.acctEmail;
Expand Down
2 changes: 1 addition & 1 deletion extension/chrome/settings/modules/contacts.htm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h1></h1>
proceeding.
</div>
<div class="line" id="file_import">
<a id="fineuploader_button" href="#">Select a file</a> or paste public key(s) below:
<a id="fineuploader_button" href="#" data-test="action-upload-key">Select a file</a> or paste public key(s) below:
<div id="fineuploader" class="display_none"></div>
</div>
<div id="processed" class="mt-20"></div>
Expand Down
5 changes: 4 additions & 1 deletion extension/css/fine-uploader-new.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
/* Buttons
------------------------------------------ */
.qq-btn {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.37) inset, 1px 0 1px rgba(255, 255, 255, 0.07) inset, 0 1px 0 rgba(0, 0, 0, 0.36),
box-shadow:
0 1px 1px rgba(255, 255, 255, 0.37) inset,
1px 0 1px rgba(255, 255, 255, 0.07) inset,
0 1px 0 rgba(0, 0, 0, 0.36),
0 -2px 12px rgba(0, 0, 0, 0.08) inset;
padding: 3px 4px;
border: 1px solid #ccc;
Expand Down
15 changes: 12 additions & 3 deletions extension/css/open-sans.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url('/fonts/open-sans/open-sans-v15-light.woff2') format('woff2'),
src:
local('Open Sans Light'),
local('OpenSans-Light'),
url('/fonts/open-sans/open-sans-v15-light.woff2') format('woff2'),
/* Chrome 26+, Opera 23+, Firefox 39+ */ url('/fonts/open-sans/open-sans-v15-light.woff') format('woff');

/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
Expand All @@ -18,7 +21,10 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url('/fonts/open-sans/open-sans-v15-regular.woff2') format('woff2'),
src:
local('Open Sans Regular'),
local('OpenSans-Regular'),
url('/fonts/open-sans/open-sans-v15-regular.woff2') format('woff2'),
/* Chrome 26+, Opera 23+, Firefox 39+ */ url('/fonts/open-sans/open-sans-v15-regular.woff') format('woff');

/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
Expand All @@ -29,7 +35,10 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), url('/fonts/open-sans/open-sans-v15-semibold.woff2') format('woff2'),
src:
local('Open Sans SemiBold'),
local('OpenSans-SemiBold'),
url('/fonts/open-sans/open-sans-v15-semibold.woff2') format('woff2'),
/* Chrome 26+, Opera 23+, Firefox 39+ */ url('/fonts/open-sans/open-sans-v15-semibold.woff') format('woff');

/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
Expand Down
2 changes: 1 addition & 1 deletion extension/js/common/browser/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export class Ui {
};

public static setTestState = (state: 'ready' | 'working' | 'waiting') => {
$('body').attr('data-test-state', state); // for automated tests
document.querySelector('body')?.setAttribute('data-test-state', state); // for automated tests
};

public static buildJquerySels = (sels: Dict<string>): SelCache => {
Expand Down
4 changes: 2 additions & 2 deletions extension/js/common/core/crypto/pgp/msg-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export class MsgUtil {
// todo - the `ki.passphrase || ''` used to be `ki.passphrase!` which could have actually allowed an undefined to be passed
// as fixed currently it appears better, but it may be best to instead check `ki.passphrase && await MsgUtil.decryptKeyFor(...)`
// but that is a larger change that would require separate PR and testing
if ((await MsgUtil.isKeyDecryptedFor(parsed, matchingKeyids)) || await MsgUtil.decryptKeyFor(parsed, ki.passphrase || '', matchingKeyids)) {
if ((await MsgUtil.isKeyDecryptedFor(parsed, matchingKeyids)) || (await MsgUtil.decryptKeyFor(parsed, ki.passphrase || '', matchingKeyids))) {
KeyCache.setDecrypted(parsed);
keys.prvForDecryptDecrypted.push({ ki, decrypted: parsed });
} else {
Expand Down Expand Up @@ -369,7 +369,7 @@ export class MsgUtil {
continue;
}
const parsed = await KeyUtil.parse(ki.private);
if (parsed.fullyDecrypted || (ki.passphrase && await SmimeKey.decryptKey(parsed, ki.passphrase))) {
if (parsed.fullyDecrypted || (ki.passphrase && (await SmimeKey.decryptKey(parsed, ki.passphrase)))) {
KeyCache.setDecrypted(parsed);
keys.prvForDecryptDecrypted.push({ ki, decrypted: parsed });
} else {
Expand Down
6 changes: 1 addition & 5 deletions extension/js/common/ui/key-import-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,7 @@ export class KeyImportUi {
return normalized;
};

public renderPassPhraseStrengthValidationInput = (
input: JQuery,
submitButton?: JQuery,
type: 'passphrase' | 'pwd' = 'passphrase'
) => {
public renderPassPhraseStrengthValidationInput = (input: JQuery, submitButton?: JQuery, type: 'passphrase' | 'pwd' = 'passphrase') => {
const validationElements = this.getPPValidationElements();
const setBtnColor = (type: 'gray' | 'green') => {
if (submitButton) {
Expand Down
2 changes: 1 addition & 1 deletion extension/js/common/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export abstract class View {
}

private static setTestViewStateLoaded = () => {
$('body').attr('data-test-view-state', 'loaded');
document.querySelector('body')?.setAttribute('data-test-view-state', 'loaded');
};

private static reportAndRenderErr = (e: unknown) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export class GmailElementReplacer extends WebmailElementReplacer {
attachmentsContainerInner = $(attachmentsContainerInner);
attachmentsContainerInner.parent().find(this.sel.numberOfAttachments).hide();
let nRenderedAttachments = attachments.length;
for (const a of attachments) {
for (const a of attachments.reverse()) {
const attachmentSel = this.filterAttachments(
attachmentsContainerInner.children().not('.attachment_processed'),
new RegExp(`^${Str.regexEscape(a.name || 'noname')}$`)
Expand Down
Loading
Loading