From 513f65898909535486d0c30a3be1d753fe227abf Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Mon, 24 Apr 2023 08:25:39 +0200 Subject: [PATCH] chore: bump BiDi Mapper to latest (#10060) --- package-lock.json | 16 +++++++-------- packages/puppeteer-core/package.json | 2 +- .../src/common/bidi/BidiOverCDP.ts | 20 +++++++++++-------- test/TestSuites.json | 3 ++- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cadca68..1cb4099d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2574,9 +2574,9 @@ "license": "ISC" }, "node_modules/chromium-bidi": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.6.tgz", - "integrity": "sha512-TQOkWRaLI/IWvoP8XC+7jO4uHTIiAUiklXU1T0qszlUFEai9LgKXIBXy3pOS3EnQZ3bQtMbKUPkug0fTAEHCSw==", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.7.tgz", + "integrity": "sha512-6+mJuFXwTMU6I3vYLs6IL8A1DyQTPjCfIL971X0aMPVGRbGnNfl6i6Cl0NMbxi2bRYLGESt9T2ZIMRM5PAEcIQ==", "dependencies": { "mitt": "3.0.0" }, @@ -9276,7 +9276,7 @@ "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "0.5.0", - "chromium-bidi": "0.4.6", + "chromium-bidi": "0.4.7", "cross-fetch": "3.1.5", "debug": "4.3.4", "devtools-protocol": "0.0.1107588", @@ -11109,9 +11109,9 @@ "version": "1.1.4" }, "chromium-bidi": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.6.tgz", - "integrity": "sha512-TQOkWRaLI/IWvoP8XC+7jO4uHTIiAUiklXU1T0qszlUFEai9LgKXIBXy3pOS3EnQZ3bQtMbKUPkug0fTAEHCSw==", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.7.tgz", + "integrity": "sha512-6+mJuFXwTMU6I3vYLs6IL8A1DyQTPjCfIL971X0aMPVGRbGnNfl6i6Cl0NMbxi2bRYLGESt9T2ZIMRM5PAEcIQ==", "requires": { "mitt": "3.0.0" } @@ -14101,7 +14101,7 @@ "version": "file:packages/puppeteer-core", "requires": { "@puppeteer/browsers": "0.5.0", - "chromium-bidi": "0.4.6", + "chromium-bidi": "0.4.7", "cross-fetch": "3.1.5", "debug": "4.3.4", "devtools-protocol": "0.0.1107588", diff --git a/packages/puppeteer-core/package.json b/packages/puppeteer-core/package.json index 118bc10c..7241d66c 100644 --- a/packages/puppeteer-core/package.json +++ b/packages/puppeteer-core/package.json @@ -132,7 +132,7 @@ "author": "The Chromium Authors", "license": "Apache-2.0", "dependencies": { - "chromium-bidi": "0.4.6", + "chromium-bidi": "0.4.7", "cross-fetch": "3.1.5", "debug": "4.3.4", "devtools-protocol": "0.0.1107588", diff --git a/packages/puppeteer-core/src/common/bidi/BidiOverCDP.ts b/packages/puppeteer-core/src/common/bidi/BidiOverCDP.ts index 38fc6bd0..40001a4a 100644 --- a/packages/puppeteer-core/src/common/bidi/BidiOverCDP.ts +++ b/packages/puppeteer-core/src/common/bidi/BidiOverCDP.ts @@ -106,9 +106,10 @@ class CDPConnectionAdapter { * * @internal */ -class CDPClientAdapter< - T extends Pick -> extends BidiMapper.EventEmitter { +class CDPClientAdapter> + extends BidiMapper.EventEmitter + implements BidiMapper.CdpClient +{ #closed = false; #client: T; @@ -157,17 +158,20 @@ class NoOpTransport extends BidiMapper.EventEmitter implements BidiMapper.BidiTransport { - #onMessage: (message: Bidi.Message.RawCommandRequest) => Promise = - async (_m: Bidi.Message.RawCommandRequest): Promise => { - return; - }; + #onMessage: ( + message: Bidi.Message.RawCommandRequest + ) => Promise | void = async ( + _m: Bidi.Message.RawCommandRequest + ): Promise => { + return; + }; emitMessage(message: Bidi.Message.RawCommandRequest) { this.#onMessage(message); } setOnMessage( - onMessage: (message: Bidi.Message.RawCommandRequest) => Promise + onMessage: (message: Bidi.Message.RawCommandRequest) => Promise | void ): void { this.#onMessage = onMessage; } diff --git a/test/TestSuites.json b/test/TestSuites.json index 0cccd1a9..75fcc1dd 100644 --- a/test/TestSuites.json +++ b/test/TestSuites.json @@ -51,7 +51,8 @@ "PUPPETEER_PRODUCT": "firefox" }, "headless": { - "HEADLESS": "true" + "HEADLESS": "true", + "PUPPETEER_LOGLEVEL": "silent" }, "headful": { "HEADLESS": "false"