Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

Add support for Node.js 20, drop support for Node.js 10 and 12 - #304

Merged
lovell merged 1 commit into
prebuild:masterfrom
lovell:add-nodejs-20-drop-nodejs-10-and-12
Sep 5, 2023
Merged

lovell merged 1 commit into
prebuild:masterfrom
lovell:add-nodejs-20-drop-nodejs-10-and-12

Conversation

@lovell

@lovell lovell commented Jul 6, 2023 •

Copy link
Copy Markdown
Member

This is a semver major change, please see #286 for discussion and details.

It also:

  • Upgrades all dependencies to their most recent version that still supports Node.js 14.
  • Synchronises the engines.node property with that of the latest node-gyp we're upgrading to.
  • Ensures all tests run on all platforms as I noticed some of the cmake-js tests were optionally being skipped.
  • Ensures the native-module-napi-cmake test includes the CMake config required for use with Node-API.
  • Removes the no-longer-required mkdirp dependency as Node.js has provided this feature since version 10.
  • Removes unused CI "badges" from the readme

Additions based on feedback:

  • Defines deployment target in test fixtures (rather than CI config) so tests can be run locally on macOS

@lovell lovell added the semver-major Changes that break backward compatibility label Jul 6, 2023
Comment thread .github/workflows/ci.yml Resolved
- Upgrade all deps to most recent with support for Node.js 14
- Sync engines.node with that of the latest node-gyp
- Ensure all tests run on all platforms
- Define macOS deployment target in tests (rather than CI)
- Remove no-longer-required mkdirp dependency
- Remove unused CI "badges"
@lovell
lovell force-pushed the add-nodejs-20-drop-nodejs-10-and-12 branch from 1a75202 to 541d6ed Compare July 10, 2023 19:04
@lovell

lovell commented Jul 11, 2023

Copy link
Copy Markdown
Member Author

As possibly the ultimate test of this PR, the sharp v0.32.2 prebuilt binaries were created using this change and everything worked as expected, with no further changes and without any problems 🎉

https://github.com/lovell/sharp/blob/v0.32.2/package.json#L156

@lovell

lovell commented Jul 20, 2023

Copy link
Copy Markdown
Member Author

@JoshuaWise Would you be interested in reviewing this upgrade to the latest version of node-gyp? It looks like it would have helped you with WiseLibs/better-sqlite3#870 (too late, sorry) and should allow you to remove the "overrides" workaround it introduced.

@verhovsky

Copy link
Copy Markdown

Can this be merged/released please? Currently prebuild doesn't work if you have the latest Python version installed (3.11).

@lovell

lovell commented Sep 4, 2023

Copy link
Copy Markdown
Member Author

Sure, given there are no further comments and I've used the fork upon which this PR is based to create the prebuilt binaries the last 4 releases of sharp without any problems, then I think we're good to merge. A release will involve a follow-up PR for the semver major version bump.

@lovell
lovell merged commit 1dd643f into prebuild:master Sep 5, 2023
@lovell
lovell deleted the add-nodejs-20-drop-nodejs-10-and-12 branch February 1, 2024 17:19
xiaobaidadada pushed a commit to xiaobaidadada/prebuild that referenced this pull request Feb 25, 2025
…ild#304)

- Upgrade all deps to most recent with support for Node.js 14
- Sync engines.node with that of the latest node-gyp
- Ensure all tests run on all platforms
- Define macOS deployment target in tests (rather than CI)
- Remove no-longer-required mkdirp dependency
- Remove unused CI "badges"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver-major Changes that break backward compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants