Skip to content

Commit

Permalink
⬆️ Upgrade dependencies (puppeteer@21.0.1 , handlebars@4.7.8) (#209)
Browse files Browse the repository at this point in the history
* ⬆️ Make it compatible with node 18.17.0

* ⬆️ Upgrade handlebars to 4.7.8

* ⬆️ Upgrade puppeteer to 21.0.1

* ➖ Remove deprecated dev dependencies
  • Loading branch information
frinyvonnick authored Aug 4, 2023
1 parent a84a580 commit 6fc5cac
Show file tree
Hide file tree
Showing 5 changed files with 380 additions and 114 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn lint
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"author": "FRIN Yvonnick <frin.yvonnick@gmail.com>",
"license": "Apache-2.0",
"dependencies": {
"handlebars": "^4.5.3",
"puppeteer": "^15.3.0",
"handlebars": "4.7.8",
"puppeteer": "21.0.1",
"puppeteer-cluster": "^0.23.0"
},
"scripts": {
Expand All @@ -28,8 +28,6 @@
"@babel/preset-typescript": "^7.18.6",
"@types/jest": "^28.1.4",
"@types/node": "^16.11.43",
"@types/puppeteer": "^5.4.6",
"@types/puppeteer-core": "^5.4.0",
"@typescript-eslint/eslint-plugin": "^5.30.4",
"@typescript-eslint/parser": "^5.30.4",
"eslint": "^8.19.0",
Expand All @@ -38,7 +36,7 @@
"jest-circus": "^28.1.2",
"puppeteer-core": "^15.3.0",
"rimraf": "^3.0.2",
"tesseract.js": "^2.1.5",
"tesseract.js": "4.1.1",
"typescript": "^4.7.4"
}
}
3 changes: 1 addition & 2 deletions src/main.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ describe("node-html-to-image", () => {
});

async function getTextFromImage(path) {
const worker = createWorker();
await worker.load();
const worker = await createWorker();
await worker.loadLanguage("eng");
await worker.initialize("eng");

Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function nodeHtmlToImage(options: Options) {
concurrency: Cluster.CONCURRENCY_CONTEXT,
maxConcurrency: 2,
timeout,
puppeteerOptions: { ...puppeteerArgs, headless: true },
puppeteerOptions: { ...puppeteerArgs, headless: 'new' },
puppeteer: puppeteer,
});

Expand Down
Loading

0 comments on commit 6fc5cac

Please sign in to comment.