diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2dcc830..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 - - 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 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3abb2bc..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: 16.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 447d31e..38a61f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,14 +12,14 @@ 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 @@ -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: diff --git a/package.json b/package.json index 4eb0b9f..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", @@ -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" + ] } } diff --git a/readme.md b/readme.md index 8968ae9..5030be3 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 @@ -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)