Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for older versions of Node.js #2310

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ var ctx = canvas.getContext('2d');

## Your Environment
* Version of node-canvas (output of `npm list canvas` or `yarn list canvas`):
* Environment (e.g. node 4.2.0 on Mac OS X 10.8):
* Environment (e.g. node 20.9.0 on macOS 14.1.1):
13 changes: 9 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14, 16, 18, 20]
node: [18.12.0, 20.9.0]
steps:
- uses: actions/setup-node@v3
with:
Expand All @@ -33,7 +33,11 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
node: [10, 12, 14, 16, 18, 20]
# FIXME: Node.js 20.9.0 is currently broken on Windows, in the `registerFont` test:
# ENOENT: no such file or directory, lstat 'D:\a\node-canvas\node-canvas\examples\pfennigFont\pfennigMultiByte🚀.ttf'
# ref: https://github.com/nodejs/node/issues/48673
# ref: https://github.com/nodejs/node/pull/50650
node: [18.12.0]
steps:
- uses: actions/setup-node@v3
with:
Expand All @@ -57,7 +61,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
node: [10, 12, 14, 16, 18, 20]
node: [18.12.0, 20.9.0]
steps:
- uses: actions/setup-node@v3
with:
Expand All @@ -68,6 +72,7 @@ jobs:
brew update
brew install python3 || : # python doesn't need to be linked
brew install pkg-config cairo pango libpng jpeg giflib librsvg
pip install setuptools
- name: Install
run: npm install --build-from-source
- name: Test
Expand All @@ -79,7 +84,7 @@ jobs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 20.9.0
- uses: actions/checkout@v3
- name: Install
run: npm install --ignore-scripts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
Linux:
strategy:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
node: [18.12.0, 20.9.0]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Linux
runs-on: ubuntu-latest
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
macOS:
strategy:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
node: [18.12.0, 20.9.0]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, macOS
runs-on: macos-latest
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
Win:
strategy:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
node: [18.12.0, 20.9.0]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Windows
runs-on: windows-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ project adheres to [Semantic Versioning](http://semver.org/).

This release notably changes to using N-API. 🎉

### Breaking
* Dropped support for Node.js 16.x and below.
### Changed
* Migrated to N-API (by way of node-addon-api) and removed libuv and v8 dependencies
* Defer the initialization of the `op` variable to the `default` switch case to avoid a compiler warning. (#2229)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"typescript": "^4.2.2"
},
"engines": {
"node": ">=10.20.0"
"node": "^18.12.0 || >= 20.9.0"
},
"license": "MIT"
}