Skip to content

Commit

Permalink
Merge pull request #18590 from timvandermeij/puppeteer-23
Browse files Browse the repository at this point in the history
Upgrade Puppeteer to version 23.1.1
  • Loading branch information
timvandermeij authored Aug 29, 2024
2 parents a41cd38 + 54eead7 commit ea090fe
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 51 deletions.
9 changes: 9 additions & 0 deletions .puppeteerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"chrome": {
"skipDownload": false
},
"firefox": {
"skipDownload": false,
"version": "nightly"
}
}
68 changes: 29 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"caniuse-lite": "^1.0.30001653",
"canvas": "^2.11.2",
"core-js": "^3.38.1",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-fetch-options": "^0.0.5",
Expand Down Expand Up @@ -48,7 +47,7 @@
"postcss-discard-comments": "^7.0.2",
"postcss-nesting": "^13.0.0",
"prettier": "^3.3.3",
"puppeteer": "^22.15.0",
"puppeteer": "^23.1.1",
"stylelint": "^16.8.2",
"stylelint-prettier": "^5.0.2",
"terser-webpack-plugin": "^5.3.10",
Expand All @@ -60,9 +59,6 @@
"webpack-stream": "^7.0.0",
"yargs": "^17.7.2"
},
"scripts": {
"postinstall": "cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.mjs"
},
"repository": {
"type": "git",
"url": "git://github.com/mozilla/pdf.js.git"
Expand Down
12 changes: 6 additions & 6 deletions test/integration/freetext_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ describe("FreeText Editor", () => {
clip: rect,
type: "png",
});
const editorImage = PNG.sync.read(editorPng);
const editorImage = PNG.sync.read(Buffer.from(editorPng));
const editorFirstPix = getFirstPixel(
editorImage.data,
editorImage.width,
Expand Down Expand Up @@ -1703,7 +1703,7 @@ describe("FreeText Editor", () => {
clip: rect,
type: "png",
});
const editorImage = PNG.sync.read(editorPng);
const editorImage = PNG.sync.read(Buffer.from(editorPng));
const editorFirstPix = getFirstPixel(
editorImage.data,
editorImage.width,
Expand Down Expand Up @@ -1836,7 +1836,7 @@ describe("FreeText Editor", () => {
clip: rect,
type: "png",
});
const editorImage = PNG.sync.read(editorPng);
const editorImage = PNG.sync.read(Buffer.from(editorPng));
const editorFirstPix = getFirstPixel(
editorImage.data,
editorImage.width,
Expand Down Expand Up @@ -1870,7 +1870,7 @@ describe("FreeText Editor", () => {
clip: rect,
type: "png",
});
const editorImage = PNG.sync.read(editorPng);
const editorImage = PNG.sync.read(Buffer.from(editorPng));
const editorFirstPix = getFirstPixel(
editorImage.data,
editorImage.width,
Expand Down Expand Up @@ -3589,7 +3589,7 @@ describe("FreeText Editor", () => {
"[data-annotation-id='998R']",
el => (el.hidden = false)
);
let editorImage = PNG.sync.read(editorPng);
let editorImage = PNG.sync.read(Buffer.from(editorPng));
expect(editorImage.data.every(x => x === 0xff))
.withContext(`In ${browserName}`)
.toBeTrue();
Expand Down Expand Up @@ -3636,7 +3636,7 @@ describe("FreeText Editor", () => {
clip: editorRect,
type: "png",
});
editorImage = PNG.sync.read(editorPng);
editorImage = PNG.sync.read(Buffer.from(editorPng));
expect(editorImage.data.every(x => x === 0xff))
.withContext(`In ${browserName}`)
.toBeFalse();
Expand Down
2 changes: 1 addition & 1 deletion test/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ async function startBrowser({
extraPrefsFirefox = {},
}) {
const options = {
product: browserName,
browser: browserName,
protocol: "webDriverBiDi",
headless,
dumpio: true,
Expand Down

0 comments on commit ea090fe

Please sign in to comment.