-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Reporting] update puppeteer to version 23.3.1 #192345
Changes from all commits
a48a559
fa70e7c
684f15b
5b7b86e
3a13d51
0e70ae3
08697cf
d433f74
838b826
1c6a826
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ v8_symbol_level = 0 | |
enable_ink = false | ||
rtc_build_examples = false | ||
angle_build_tests = false | ||
enable_screen_ai_service = false | ||
use_fake_screen_ai = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opt to use fake AI, since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great find! |
||
enable_vr = false | ||
|
||
# Please, consult @elastic/kibana-security before changing/removing this option. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -244,15 +244,17 @@ export class HeadlessChromiumDriver { | |
if (error) { | ||
await this.injectScreenshottingErrorHeader(error, getPrintLayoutSelectors().screenshot); | ||
} | ||
return this.page.pdf({ | ||
format: 'a4', | ||
preferCSSPageSize: true, | ||
scale: 1, | ||
landscape: false, | ||
displayHeaderFooter: true, | ||
headerTemplate: await getHeaderTemplate({ title }), | ||
footerTemplate: await getFooterTemplate({ logo }), | ||
}); | ||
return Buffer.from( | ||
await this.page.pdf({ | ||
format: 'a4', | ||
preferCSSPageSize: true, | ||
scale: 1, | ||
landscape: false, | ||
displayHeaderFooter: true, | ||
headerTemplate: await getHeaderTemplate({ title }), | ||
footerTemplate: await getFooterTemplate({ logo }), | ||
}) | ||
); | ||
} | ||
|
||
/* | ||
|
@@ -272,6 +274,7 @@ export class HeadlessChromiumDriver { | |
} | ||
|
||
const { boundingClientRect, scroll } = elementPosition; | ||
|
||
const screenshot = await this.page.screenshot({ | ||
clip: { | ||
x: boundingClientRect.left + scroll.x, | ||
|
@@ -282,8 +285,8 @@ export class HeadlessChromiumDriver { | |
captureBeyondViewport: false, // workaround for an internal resize. See: https://github.com/puppeteer/puppeteer/issues/7043 | ||
}); | ||
|
||
if (Buffer.isBuffer(screenshot)) { | ||
return screenshot; | ||
if (screenshot.byteLength) { | ||
return Buffer.from(screenshot); | ||
Comment on lines
+288
to
+289
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this just optimization or did some API change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's been a change in the API from puppeteer... screenshots now return TypedArrays in place of buffers, see https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v23.0.0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I see mention of this in the 23.0.0 release notes as well :) |
||
} | ||
|
||
if (typeof screenshot === 'string') { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8310,16 +8310,16 @@ | |
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" | ||
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= | ||
|
||
"@puppeteer/browsers@2.2.4": | ||
version "2.2.4" | ||
resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.2.4.tgz#4307245d881aa5a79743050be66568bad0f6ffbb" | ||
integrity sha512-BdG2qiI1dn89OTUUsx2GZSpUzW+DRffR1wlMJyKxVHYrhnKoELSDxDd+2XImUkuWPEKk76H5FcM/gPFrEK1Tfw== | ||
"@puppeteer/browsers@2.4.0": | ||
version "2.4.0" | ||
resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.4.0.tgz#a0dd0f4e381e53f509109ae83b891db5972750f5" | ||
integrity sha512-x8J1csfIygOwf6D6qUAZ0ASk3z63zPb7wkNeHRerCMh82qWKUrOgkuP005AJC8lDL6/evtXETGEJVcwykKT4/g== | ||
dependencies: | ||
debug "^4.3.5" | ||
debug "^4.3.6" | ||
extract-zip "^2.0.1" | ||
progress "^2.0.3" | ||
proxy-agent "^6.4.0" | ||
semver "^7.6.2" | ||
semver "^7.6.3" | ||
tar-fs "^3.0.6" | ||
unbzip2-stream "^1.4.3" | ||
yargs "^17.7.2" | ||
|
@@ -14199,10 +14199,10 @@ chromedriver@^128.0.1: | |
proxy-from-env "^1.1.0" | ||
tcp-port-used "^1.0.2" | ||
|
||
[email protected].1: | ||
version "0.6.1" | ||
resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.6.1.tgz#533612dd166b7b36a8ba8b90685ad2fa0c98d064" | ||
integrity sha512-kSxJRj0VgtUKz6nmzc2JPfyfJGzwzt65u7PqhPHtgGQUZLF5oG+ST6l6e5ONfStUMAlhSutFCjaGKllXZa16jA== | ||
[email protected].5: | ||
version "0.6.5" | ||
resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.6.5.tgz#31be98f9ee5c93fa99d240c680518c9293d8c6bb" | ||
integrity sha512-RuLrmzYrxSb0s9SgpB+QN5jJucPduZQ/9SIe76MDxYJuecPW5mxMdacJ1f4EtgiV+R0p3sCkznTMvH0MPGFqjA== | ||
dependencies: | ||
mitt "3.0.1" | ||
urlpattern-polyfill "10.0.0" | ||
|
@@ -15763,12 +15763,12 @@ [email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: | |
dependencies: | ||
ms "2.0.0" | ||
|
||
debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5: | ||
version "4.3.6" | ||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" | ||
integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== | ||
debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7: | ||
version "4.3.7" | ||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" | ||
integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== | ||
dependencies: | ||
ms "2.1.2" | ||
ms "^2.1.3" | ||
|
||
[email protected]: | ||
version "4.3.1" | ||
|
@@ -16229,10 +16229,10 @@ detective@^5.0.2: | |
defined "^1.0.0" | ||
minimist "^1.1.1" | ||
|
||
[email protected].1299070: | ||
version "0.0.1299070" | ||
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz#b3e4cf0b678a46f0f907ae6e07e03ad3a53c00df" | ||
integrity sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg== | ||
[email protected].1330662: | ||
version "0.0.1330662" | ||
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1330662.tgz#400fe703c2820d6b2d9ebdd1785934310152373e" | ||
integrity sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw== | ||
|
||
dezalgo@^1.0.0, dezalgo@^1.0.4: | ||
version "1.0.4" | ||
|
@@ -26273,26 +26273,29 @@ punycode@^2.1.0, punycode@^2.1.1: | |
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" | ||
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== | ||
|
||
puppeteer-core@22.13.1: | ||
version "22.13.1" | ||
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-22.13.1.tgz#3ba03e5ebd98bbbd86e465864cf00314e07309de" | ||
integrity sha512-NmhnASYp51QPRCAf9n0OPxuPMmzkKd8+2sB9Q+BjwwCG25gz6iuNc3LQDWa+cH2tyivmJppLhNNFt6Q3HmoOpw== | ||
puppeteer-core@23.3.1: | ||
version "23.3.1" | ||
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-23.3.1.tgz#b93d825e586f5f7dc268128a31a31c62bbe378ae" | ||
integrity sha512-m5gTpITEqqpSgAvPUI/Ch9igh5sNJV+BVVbqQMzqirRDVHDCkLGHaydEQZx2NZvSXdwCFrIV///cpSlX/uD0Sg== | ||
dependencies: | ||
"@puppeteer/browsers" "2.2.4" | ||
chromium-bidi "0.6.1" | ||
debug "^4.3.5" | ||
devtools-protocol "0.0.1299070" | ||
"@puppeteer/browsers" "2.4.0" | ||
chromium-bidi "0.6.5" | ||
debug "^4.3.7" | ||
devtools-protocol "0.0.1330662" | ||
typed-query-selector "^2.12.0" | ||
ws "^8.18.0" | ||
|
||
puppeteer@22.13.1: | ||
version "22.13.1" | ||
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-22.13.1.tgz#f8e4217919b438f18adb754e9d8414fef58fb3de" | ||
integrity sha512-PwXLDQK5u83Fm5A7TGMq+9BR7iHDJ8a3h21PSsh/E6VfhxiKYkU7+tvGZNSCap6k3pCNDd9oNteVBEctcBalmQ== | ||
puppeteer@23.3.1: | ||
version "23.3.1" | ||
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-23.3.1.tgz#830ac4b2c264ae4a610b79be77aff23bb13efa2c" | ||
integrity sha512-BxkuJyCv46ZKW8KEHiVMHgHEC89jKK9FffReWjbw1IfBUmNx+6JIZyqOtaJeSwyolTdVqqb5fiPiXflKeH3dKQ== | ||
dependencies: | ||
"@puppeteer/browsers" "2.2.4" | ||
"@puppeteer/browsers" "2.4.0" | ||
chromium-bidi "0.6.5" | ||
cosmiconfig "^9.0.0" | ||
devtools-protocol "0.0.1299070" | ||
puppeteer-core "22.13.1" | ||
devtools-protocol "0.0.1330662" | ||
puppeteer-core "23.3.1" | ||
typed-query-selector "^2.12.0" | ||
|
||
pure-rand@^6.0.0: | ||
version "6.0.2" | ||
|
@@ -30878,6 +30881,11 @@ typed-array-length@^1.0.6: | |
is-typed-array "^1.1.13" | ||
possible-typed-array-names "^1.0.0" | ||
|
||
typed-query-selector@^2.12.0: | ||
version "2.12.0" | ||
resolved "https://registry.yarnpkg.com/typed-query-selector/-/typed-query-selector-2.12.0.tgz#92b65dbc0a42655fccf4aeb1a08b1dddce8af5f2" | ||
integrity sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg== | ||
|
||
typedarray-to-buffer@^3.1.5: | ||
version "3.1.5" | ||
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build flag
enable_screen_ai_service
is expected to be true as of commit ca52d19, setting false actually throws an error now.