Skip to content

Commit

Permalink
Add support for Puppeteer v23.x
Browse files Browse the repository at this point in the history
  • Loading branch information
abrom committed Sep 1, 2024
1 parent 6bc629f commit 1e3b35b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ jobs:
ruby-version: ['3.3']
node-version: ['18']
puppeteer-version: [
'17.1.3',
'18.2.1',
'19.11.1',
'20.9.0',
'21.9.0',
'22.12.0'
'22.15.0',
'23.2.1',
]
include:
- ruby-version: '2.7'
node-version: '18'
puppeteer-version: '22.12.0'
puppeteer-version: '23.2.1'
- ruby-version: '3.0'
node-version: '18'
puppeteer-version: '22.12.0'
puppeteer-version: '23.2.1'
- ruby-version: '3.1'
node-version: '18'
puppeteer-version: '22.12.0'
puppeteer-version: '23.2.1'
- ruby-version: '3.2'
node-version: '18'
puppeteer-version: '22.12.0'
puppeteer-version: '23.2.1'
- ruby-version: '3.3'
node-version: '20'
puppeteer-version: '22.12.0'
puppeteer-version: '23.2.1'
- ruby-version: '3.3'
node-version: '22'
puppeteer-version: '22.12.0'
puppeteer-version: '23.2.1'

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion lib/grover/js/processor.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ const _processPage = (async (convertAction, uriOrHtml, options) => {

// If we're running puppeteer in headless mode, return the converted PDF
if (debug === undefined || (typeof debug === 'object' && (debug.headless === undefined || debug.headless))) {
return await page[convertAction](options);
return Buffer.from(await page[convertAction](options));
}
} finally {
if (browser) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grover",
"version": "1.1.7",
"version": "1.1.9",
"description": "A Ruby gem to transform HTML into PDFs using Google Puppeteer/Chromium",
"repository": {
"type": "git",
Expand All @@ -18,6 +18,6 @@
},
"homepage": "https://github.com/Studiosity/grover#readme",
"devDependencies": {
"puppeteer": "^22.12.0"
"puppeteer": "^23.2.1"
}
}

0 comments on commit 1e3b35b

Please sign in to comment.