chore: bump nan to 2.23.0 (#48591)

* chore: bump nan to 2.23.0

* Fix C++ flags passed to C compiler in NAN spec runner

Passing C++-specific flags to the C compiler caused failures building native test modules.

NAN uprgaded the version of node-gyp it uses, triggering a new codepath with the C compiler that didn't occur before. In that new branch, the C++ flags present in the CFLAGS environment variable we were passing in caused the C compiler to error out:

```
error: invalid argument '-std=c++20' not allowed with 'C'
```

The fix is to only pass C++-specific flags to the C++ compiler, and not the C compiler. This is done by separating out the CFLAGS and CXXFLAGS environment variables in our nan-spec-runner.js script.

I'm curious to know more about why each of these flags are necessary, but for now this change restores the previous behavior where native test modules could be built successfully.

* test: use v8 version check instead of node version check (patch)

* Re-enable `methodswithdata-test`
This commit is contained in:
Calvin
2025-10-23 12:58:40 -06:00
committed by GitHub
parent 717eb0dca5
commit 418b8235bc
14 changed files with 90 additions and 566 deletions

2
DEPS
View File

@@ -6,7 +6,7 @@ vars = {
'node_version':
'v22.20.0',
'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213',
'675cefebca42410733da8a454c8d9391fcebfbc2',
'squirrel.mac_version':
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',
'reactiveobjc_version':