Skip to content
Open
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 PORTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Tests covering the engine-specific part of Node-API, defined in `js_native_api.h
| `test_instance_data` | Not ported | Medium |
| `test_new_target` | Ported ✅ | Easy |
| `test_number` | Ported ✅ | Easy |
| `test_object` | Not ported | Hard |
| `test_object` | Partial | Hard |
| `test_promise` | Ported ✅ | Easy |
| `test_properties` | Ported ✅ | Easy |
| `test_reference` | Ported ✅ | Medium |
Expand Down
6 changes: 5 additions & 1 deletion implementors/node/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ globalThis.experimentalFeatures = {
// added in Node.js v24.9.0. Earlier versions do not export these symbols,
// causing addons that reference them to fail at dlopen time.
sharedArrayBuffer: major >= 25 || (major === 24 && minor >= 9),
createObjectWithProperties: true,
// node_api_create_object_with_properties was added in Node.js v25.2.0 and
// v24.12.0, and not backported to v20.x or v22.x. Earlier versions do not
// export the symbol, so an addon referencing it fails at dlopen time.
createObjectWithProperties:
major > 25 || (major === 25 && minor >= 2) || (major === 24 && minor >= 12),
setPrototype: true,
postFinalizer: true,
};
Expand Down
5 changes: 5 additions & 0 deletions tests/js-native-api/test_object/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_node_api_cts_addon(test_object test_object.c)

# node_api_create_object_with_properties is gated behind NAPI_EXPERIMENTAL, so
# it builds as a separate addon that only runtimes exporting it need to load.
add_node_api_cts_experimental_addon(test_object_create_with_properties test_object_create_with_properties.c)
Loading
Loading