Skip to content

Commit f82ec4f

Browse files
committed
update the experimental sharedarraybuffer availability
node_api_is_sharedarraybuffer is added in v24.9.0 https://nodejs.org/api/n-api.html#node-api-is-sharedarraybuffer Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
1 parent 4f830e6 commit f82ec4f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

implementors/node/features.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
// Declares which experimental Node-API features this runtime supports.
22
// Each key corresponds to a NODE_API_EXPERIMENTAL_HAS_* compile-time macro.
33
// Other implementors should set unsupported features to false or omit them.
4+
5+
const [major, minor] = process.version.slice(1).split('.').map(Number);
6+
47
globalThis.experimentalFeatures = {
5-
sharedArrayBuffer: true,
8+
// node_api_is_sharedarraybuffer and node_api_create_sharedarraybuffer were
9+
// added in Node.js v24.9.0. Earlier versions do not export these symbols,
10+
// causing addons that reference them to fail at dlopen time.
11+
sharedArrayBuffer: major >= 25 || (major === 24 && minor >= 9),
612
createObjectWithProperties: true,
713
setPrototype: true,
814
postFinalizer: true,

0 commit comments

Comments
 (0)