-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Node 23.6.0 increased the napi version to 10 - the first napi version to have double digits. This causes getBestNapiBuildVersion (and perhaps other functions too) to fail to produce the correct version:
$ cat package.json | jq '.binary'
{
"napi_versions": [
4
]
}
$ node --version
v23.5.0
$ node -p "require('napi-build-utils').getBestNapiBuildVersion()"
4
$ nvm use 23.6.0
$ node --version
v23.6.0
$ node -p "require('napi-build-utils').getBestNapiBuildVersion()"
undefinedThe root cause is string comparison instead of numeric comparison - until we reached 10, when napiBuildVersion <= ourNapiVersion compared strings, the result was the same as though they were numbers. Now its using lexographic comparison, and napiBuildVersion <= ourNapiVersion -> '4' <= '10' -> 'false'.
agilgur5
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working