Skip to content

Commit

Permalink
drop node 16 support (#210)
Browse files Browse the repository at this point in the history
* drop node 16 support

* update workflow

* bump version

* update readme

* update readme

* update readme version compat
  • Loading branch information
yakovmeister authored Sep 8, 2024
1 parent bd80016 commit 6d8329b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 18
- run: npm install
- run: npm run lint
6 changes: 3 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 16.x
node-version: 18
registry-url: https://registry.npmjs.org
- run: |
sudo apt-get update
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.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
run: |
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:
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -44,7 +44,7 @@
"prepare": "husky install"
},
"engines": {
"node": ">=14"
"node": ">=18"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -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"
]
}
}
11 changes: 10 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A utility for converting pdf to image, base64 or buffer format.
## Prerequisites

* node >= 14.x
* node >= 18.x
* graphicsmagick
* ghostscript

Expand Down Expand Up @@ -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 | < 10.x |
| 2.1.4, 2.2.4 | >= 10.x |
| 3.1.1 | >= 14.x |
| >= 3.1.2 | >= 18.x |

## Contributing
* Fork it (https://github.com/yakovmeister/pdf2image/fork)
Expand Down

0 comments on commit 6d8329b

Please sign in to comment.