Skip to content

Commit

Permalink
Merge pull request #390 from jihchi/dependabot/npm_and_yarn/puppeteer…
Browse files Browse the repository at this point in the history
…-23.0.2

Bump puppeteer from 22.14.0 to 23.0.2
  • Loading branch information
jihchi authored Aug 17, 2024
2 parents 1189526 + 03e6750 commit 4d679f9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"mermaid": "^10.3.1",
"pako": "^2.1.0",
"path-to-regexp": "^7.0.0",
"puppeteer": "^22.4.1"
"puppeteer": "^23.0.2"
},
"devDependencies": {
"@happy-dom/jest-environment": "^14.3.6",
Expand Down
21 changes: 11 additions & 10 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion src/views/img.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const img = async (ctx, page, size) => {

// dynamically set media type
ctx.type = `image/${type}`;
ctx.body = image;
ctx.body = Buffer.from(image);
};

module.exports = renderImgOrSvg(img);
2 changes: 1 addition & 1 deletion src/views/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const pdf = async (ctx, page, size) => {
debug('printed to pdf, file size: %o', pdf.length);

ctx.type = 'application/pdf';
ctx.body = pdf;
ctx.body = Buffer.from(pdf);
};

module.exports = renderImgOrSvg(pdf);
4 changes: 2 additions & 2 deletions test/kitchensink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ describe('app', () => {
);
expect(resp.status).toEqual(200);
expect(resp.type).toEqual('application/pdf');
expect(resp.body.length).toBeGreaterThan(19 * KB);
expect(resp.body.length).toBeGreaterThan(17 * KB);

await PDFDocument.load(resp.body.toString('base64'));
});
Expand All @@ -417,7 +417,7 @@ describe('app', () => {
);
expect(resp.status).toEqual(200);
expect(resp.type).toEqual('application/pdf');
expect(resp.body.length).toBeGreaterThan(19 * KB);
expect(resp.body.length).toBeGreaterThan(17 * KB);

const pdfDoc = await PDFDocument.load(resp.body.toString('base64'));
const pages = pdfDoc.getPages();
Expand Down

0 comments on commit 4d679f9

Please sign in to comment.