From f96d45b1b8cea607c23a849a19072839c4cfba46 Mon Sep 17 00:00:00 2001 From: yakovmeister Date: Thu, 5 Sep 2024 22:32:17 +0800 Subject: [PATCH 1/6] drop node 16 support --- .github/workflows/lint.yml | 4 ++-- .github/workflows/npm-publish.yml | 2 +- .github/workflows/test.yml | 2 +- package.json | 9 ++++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2dcc830..6a38624 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,9 +12,9 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Node.js 16.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - run: npm install - run: npm run lint diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3abb2bc..e7f85ab 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x registry-url: https://registry.npmjs.org - run: | sudo apt-get update diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 447d31e..7bf572a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 18.x, 20.x] + node-version: [18.x, 20.x, 22.x] name: Node.js ${{ matrix.node-version }} diff --git a/package.json b/package.json index 4eb0b9f..0f6101a 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@types/chai": "^4.3.5", "@types/gm": "^1.25.1", "@types/mocha": "^10.0.1", - "@types/node": "^16.18.39", + "@types/node": "^18.19.50", "@types/rimraf": "^4.0.5", "@typescript-eslint/eslint-plugin": "^6.2.1", "@typescript-eslint/parser": "^6.2.1", @@ -44,7 +44,7 @@ "prepare": "husky install" }, "engines": { - "node": ">=14" + "node": ">=18" }, "repository": { "type": "git", @@ -78,6 +78,9 @@ }, "homepage": "https://github.com/yakovmeister/pdf2image#readme", "lint-staged": { - "*.{js,ts}": ["prettier --write", "eslint --fix"] + "*.{js,ts}": [ + "prettier --write", + "eslint --fix" + ] } } From 5a0c07660703f4a9df0bc47784da9c3cf9817823 Mon Sep 17 00:00:00 2001 From: yakovmeister Date: Sun, 8 Sep 2024 12:11:20 +0800 Subject: [PATCH 2/6] update workflow --- .github/workflows/lint.yml | 6 +++--- .github/workflows/npm-publish.yml | 6 +++--- .github/workflows/test.yml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6a38624..6aa50bf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18 - run: npm install - run: npm run lint diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e7f85ab..7ed596c 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,10 +8,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18 registry-url: https://registry.npmjs.org - run: | sudo apt-get update diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7bf572a..38a61f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,14 +12,14 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x, 22.x] + node-version: [18, 20, 22] name: Node.js ${{ matrix.node-version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Install GraphicsMagick and Ghostscript @@ -27,7 +27,7 @@ jobs: sudo apt-get update sudo apt-get install -y graphicsmagick ghostscript - run: npm install - - uses: paambaati/codeclimate-action@v5 + - uses: paambaati/codeclimate-action@v9 env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} with: From e1887ea9581946d893d3bd0611722c0e1a3db249 Mon Sep 17 00:00:00 2001 From: yakovmeister Date: Sun, 8 Sep 2024 12:15:56 +0800 Subject: [PATCH 3/6] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f6101a..d6f9d71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdf2pic", - "version": "3.1.1", + "version": "3.1.2", "description": "A utility for converting pdf to image formats. Supports different outputs: directly to file, base64 or buffer.", "main": "dist/index.js", "types": "dist/index.d.ts", From abc89b288bd1412dc105ef5d54338c757f19dbba Mon Sep 17 00:00:00 2001 From: yakovmeister Date: Sun, 8 Sep 2024 12:19:25 +0800 Subject: [PATCH 4/6] update readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 8968ae9..8389da7 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ A utility for converting pdf to image, base64 or buffer format. ## Prerequisites -* node >= 14.x +* node >= 18.x * graphicsmagick * ghostscript From 07c50603afec2034ff49d455cde5e018b4728e81 Mon Sep 17 00:00:00 2001 From: yakovmeister Date: Sun, 8 Sep 2024 12:30:00 +0800 Subject: [PATCH 5/6] update readme --- readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/readme.md b/readme.md index 8389da7..a27b40b 100644 --- a/readme.md +++ b/readme.md @@ -194,6 +194,15 @@ Following are the options that can be passed on the pdf2pic api: The parameter can also be a boolean, if `true` then the response type will be `base64` and if `false` then the response type will be `image`. This is deprecated and will be removed in the next major version. + +## Version Compatibility + +| pdf2pic version | node version | +|-----------------|------------------| +| 1.4.0 | < 14.x | +| 2.1.4, 2.2.4 | >= 14.x | +| 3.1.1 | >= 14.x | +| >= 3.1.2 | >= 18.x | ## Contributing * Fork it (https://github.com/yakovmeister/pdf2image/fork) From dfa5ddaaeff1761c45f24f0269fa11a6e40f3b83 Mon Sep 17 00:00:00 2001 From: yakovmeister Date: Sun, 8 Sep 2024 12:35:02 +0800 Subject: [PATCH 6/6] update readme version compat --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index a27b40b..5030be3 100644 --- a/readme.md +++ b/readme.md @@ -199,8 +199,8 @@ This is deprecated and will be removed in the next major version. | pdf2pic version | node version | |-----------------|------------------| -| 1.4.0 | < 14.x | -| 2.1.4, 2.2.4 | >= 14.x | +| 1.4.0 | < 10.x | +| 2.1.4, 2.2.4 | >= 10.x | | 3.1.1 | >= 14.x | | >= 3.1.2 | >= 18.x |