Skip to content

Commit 1db72b6

Browse files
committed
fix: gate createObjectWithProperties on the Node.js versions that export it
1 parent 1011542 commit 1db72b6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

implementors/node/features.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ globalThis.experimentalFeatures = {
1010
// added in Node.js v24.9.0. Earlier versions do not export these symbols,
1111
// causing addons that reference them to fail at dlopen time.
1212
sharedArrayBuffer: major >= 25 || (major === 24 && minor >= 9),
13-
createObjectWithProperties: true,
13+
// node_api_create_object_with_properties was added in Node.js v25.2.0 and
14+
// v24.12.0, and not backported to v20.x or v22.x. Earlier versions do not
15+
// export the symbol, so an addon referencing it fails at dlopen time.
16+
createObjectWithProperties:
17+
major > 25 || (major === 25 && minor >= 2) || (major === 24 && minor >= 12),
1418
setPrototype: true,
1519
postFinalizer: true,
1620
};

0 commit comments

Comments
 (0)