lighthouse 9.5.0-dev.20220929 → 9.5.0-dev.20220930
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -117,6 +117,7 @@ class TargetManager extends ProtocolEventEmitter {
|
|
|
117
117
|
// @ts-expect-error - pptr currently typed only for single arg emits.
|
|
118
118
|
const protocolListener = trueProtocolListener;
|
|
119
119
|
cdpSession.on('*', protocolListener);
|
|
120
|
+
cdpSession.on('sessionattached', this._onSessionAttached);
|
|
120
121
|
|
|
121
122
|
const targetWithSession = {
|
|
122
123
|
target: target.targetInfo,
|
|
@@ -176,12 +177,6 @@ class TargetManager extends ProtocolEventEmitter {
|
|
|
176
177
|
|
|
177
178
|
this._rootCdpSession.on('Page.frameNavigated', this._onFrameNavigated);
|
|
178
179
|
|
|
179
|
-
const rootConnection = this._rootCdpSession.connection();
|
|
180
|
-
if (!rootConnection) {
|
|
181
|
-
throw new Error('Connection has been closed.');
|
|
182
|
-
}
|
|
183
|
-
rootConnection.on('sessionattached', this._onSessionAttached);
|
|
184
|
-
|
|
185
180
|
await this._rootCdpSession.send('Page.enable');
|
|
186
181
|
|
|
187
182
|
// Start with the already attached root session.
|
|
@@ -193,11 +188,10 @@ class TargetManager extends ProtocolEventEmitter {
|
|
|
193
188
|
*/
|
|
194
189
|
async disable() {
|
|
195
190
|
this._rootCdpSession.off('Page.frameNavigated', this._onFrameNavigated);
|
|
196
|
-
// No need to remove listener if connection is already closed.
|
|
197
|
-
this._rootCdpSession.connection()?.off('sessionattached', this._onSessionAttached);
|
|
198
191
|
|
|
199
192
|
for (const {cdpSession, protocolListener} of this._targetIdToTargets.values()) {
|
|
200
193
|
cdpSession.off('*', protocolListener);
|
|
194
|
+
cdpSession.off('sessionattached', this._onSessionAttached);
|
|
201
195
|
}
|
|
202
196
|
|
|
203
197
|
this._enabled = false;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lighthouse",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.5.0-dev.
|
|
4
|
+
"version": "9.5.0-dev.20220930",
|
|
5
5
|
"description": "Automated auditing, performance metrics, and best practices for the web.",
|
|
6
6
|
"main": "./core/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"pako": "^2.0.3",
|
|
167
167
|
"preact": "^10.7.2",
|
|
168
168
|
"pretty-json-stringify": "^0.0.2",
|
|
169
|
-
"puppeteer": "^
|
|
169
|
+
"puppeteer": "^18.0.5",
|
|
170
170
|
"resolve": "^1.20.0",
|
|
171
171
|
"rollup": "^2.52.7",
|
|
172
172
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
"open": "^8.4.0",
|
|
203
203
|
"parse-cache-control": "1.0.1",
|
|
204
204
|
"ps-list": "^8.0.0",
|
|
205
|
-
"puppeteer-core": "^
|
|
205
|
+
"puppeteer-core": "^18.0.5",
|
|
206
206
|
"robots-parser": "^3.0.0",
|
|
207
207
|
"semver": "^5.3.0",
|
|
208
208
|
"speedline-core": "^1.4.3",
|