-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathfeatures.js
More file actions
21 lines (17 loc) · 815 Bytes
/
features.js
File metadata and controls
21 lines (17 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Declares which experimental Node-API features this runtime supports.
// Each key corresponds to a NODE_API_EXPERIMENTAL_HAS_* compile-time macro.
// Other implementors should set unsupported features to false or omit them.
const [major, minor] = process.version.slice(1).split('.').map(Number);
globalThis.experimentalFeatures = {
// node_api_is_sharedarraybuffer and node_api_create_sharedarraybuffer were
// 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,
setPrototype: true,
postFinalizer: true,
};
globalThis.napiVersion = Number(process.versions.napi);
globalThis.skipTest = () => {
process.exit(0);
};