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

Bump napi-build-utils from 1 to 2 #204

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Jan 17, 2025

Fixes #203.

I don't have a good mechanism to test the changes inside prebuild-install without publishing releases of these packages, but I can test the new version of napi-build-utils in our package and confirm that it detects the correct version of napi.

I tested this in the @mongodb-js/zstd package by installing napi-build-utils@2.0.0 and confirming that it now detects an napi version of 4:

before fix:

> require('napi-build-utils/package.json').version
'1.0.2'
> require('./package.json').binary
{ napi_versions: [ 4 ] }
> require('napi-build-utils').getBestNapiBuildVersion()
undefined

after fix:

> require('./package.json').binary
{ napi_versions: [ 4 ] }
> require('napi-build-utils/package.json').version
'2.0.0'
> require('napi-build-utils').getBestNapiBuildVersion()
4

let met know if there's anything else you'd like in this PR or any additional testing you can think of. Thanks!

package.json Outdated Show resolved Hide resolved
@vweevers vweevers added the semver-patch Bug fixes that are backward compatible label Jan 17, 2025
@vweevers
Copy link
Member

For anyone wondering why napi-build-utils 2.0.0 is a breaking change, it's not:

This version was introduced to address a limitation when the Node-API version reached 10 in NodeJS v23.6.0. There was no change in the API, but a SemVer bump to 2.0.0 was made out of an abundance of caution.
History

We can release this as a patch here.

@baileympearson
Copy link
Contributor Author

Is there any estimate on when a release with this fix might be available? @vweevers

@vweevers vweevers changed the title fix: add support for napi-build-utils 2.0.0 Bump napi-build-utils from 1 to 2 Jan 22, 2025
@vweevers vweevers merged commit 1bf4a15 into prebuild:master Jan 22, 2025
13 checks passed
@vweevers
Copy link
Member

Released in 7.1.3. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Bug fixes that are backward compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prebuild-install fails to determine target on Node 23.6.0
2 participants