mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: make chromium-bidi an opt peer dep (#9667)
This commit is contained in:
parent
eb138635d6
commit
c6054ac1a5
16
package-lock.json
generated
16
package-lock.json
generated
@ -2666,6 +2666,8 @@
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.3.tgz",
|
||||
"integrity": "sha512-A40H1rdpJqkTdnGhnYDzMhtDdIbkXNFj2wgIfivMXL7LyHFDmBtv1hdyycDhnxtYunbPLDZtTs/n+ZT5j7Vnew==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"devtools-protocol": "*",
|
||||
"mitt": "*"
|
||||
@ -6038,7 +6040,8 @@
|
||||
"node_modules/mitt": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz",
|
||||
"integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ=="
|
||||
"integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==",
|
||||
"devOptional": true
|
||||
},
|
||||
"node_modules/mkdirp-classic": {
|
||||
"version": "0.5.3",
|
||||
@ -8663,7 +8666,6 @@
|
||||
"version": "19.7.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"chromium-bidi": "0.4.3",
|
||||
"cross-fetch": "3.1.5",
|
||||
"debug": "4.3.4",
|
||||
"devtools-protocol": "0.0.1094867",
|
||||
@ -8679,9 +8681,13 @@
|
||||
"node": ">=14.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"chromium-bidi": "0.4.3",
|
||||
"typescript": ">= 4.7.4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"chromium-bidi": {
|
||||
"optional": true
|
||||
},
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
@ -10990,6 +10996,8 @@
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.3.tgz",
|
||||
"integrity": "sha512-A40H1rdpJqkTdnGhnYDzMhtDdIbkXNFj2wgIfivMXL7LyHFDmBtv1hdyycDhnxtYunbPLDZtTs/n+ZT5j7Vnew==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {}
|
||||
},
|
||||
"cli-cursor": {
|
||||
@ -13390,7 +13398,8 @@
|
||||
"mitt": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz",
|
||||
"integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ=="
|
||||
"integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==",
|
||||
"devOptional": true
|
||||
},
|
||||
"mkdirp-classic": {
|
||||
"version": "0.5.3",
|
||||
@ -14091,7 +14100,6 @@
|
||||
"puppeteer-core": {
|
||||
"version": "file:packages/puppeteer-core",
|
||||
"requires": {
|
||||
"chromium-bidi": "0.4.3",
|
||||
"cross-fetch": "3.1.5",
|
||||
"debug": "4.3.4",
|
||||
"devtools-protocol": "0.0.1094867",
|
||||
|
@ -131,7 +131,6 @@
|
||||
"author": "The Chromium Authors",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"chromium-bidi": "0.4.3",
|
||||
"cross-fetch": "3.1.5",
|
||||
"debug": "4.3.4",
|
||||
"devtools-protocol": "0.0.1094867",
|
||||
@ -144,11 +143,15 @@
|
||||
"ws": "8.11.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">= 4.7.4"
|
||||
"typescript": ">= 4.7.4",
|
||||
"chromium-bidi": "0.4.3"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
},
|
||||
"chromium-bidi": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -262,7 +262,9 @@ export class BrowserRunner {
|
||||
);
|
||||
browserWSEndpoint += '/session';
|
||||
const transport = await WebSocketTransport.create(browserWSEndpoint);
|
||||
const BiDi = await import('../common/bidi/bidi.js');
|
||||
const BiDi = await import(
|
||||
/* webpackIgnore: true */ '../common/bidi/bidi.js'
|
||||
);
|
||||
return new BiDi.Connection(transport, slowMo);
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,9 @@ export class ChromeLauncher extends ProductLauncher {
|
||||
|
||||
if (protocol === 'webDriverBiDi') {
|
||||
try {
|
||||
const BiDi = await import('../common/bidi/bidi.js');
|
||||
const BiDi = await import(
|
||||
/* webpackIgnore: true */ '../common/bidi/bidi.js'
|
||||
);
|
||||
const bidiConnection = await BiDi.connectBidiOverCDP(connection);
|
||||
browser = await BiDi.Browser.create({
|
||||
connection: bidiConnection,
|
||||
|
@ -131,7 +131,9 @@ export class FirefoxLauncher extends ProductLauncher {
|
||||
slowMo,
|
||||
preferredRevision: this.puppeteer.browserRevision,
|
||||
});
|
||||
const BiDi = await import('../common/bidi/bidi.js');
|
||||
const BiDi = await import(
|
||||
/* webpackIgnore: true */ '../common/bidi/bidi.js'
|
||||
);
|
||||
browser = await BiDi.Browser.create({
|
||||
connection,
|
||||
closeCallback: runner.close.bind(runner),
|
||||
|
Loading…
Reference in New Issue
Block a user