node/test/js-native-api/test_cannot_run_js/binding.gyp
Gabriel Schulhof 19fa9f1bc4 node-api: add status napi_cannot_run_js
Add the new status in order to distinguish a state wherein an exception
is pending from one wherein the engine is unable to execute JS. We take
advantage of the new runtime add-on version reporting in order to remain
forward compatible with add-ons that do not expect the new status code.

PR-URL: https://github.com/nodejs/node/pull/47986
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com>
2023-05-20 07:39:12 -07:00

33 lines
673 B
Python

{
"targets": [
{
"target_name": "copy_entry_point",
"type": "none",
"copies": [
{
"destination": ".",
"files": [ "../entry_point.c" ]
}
]
},
{
"target_name": "test_cannot_run_js",
"sources": [
"entry_point.c",
"test_cannot_run_js.c"
],
"defines": [ "NAPI_EXPERIMENTAL" ],
"dependencies": [ "copy_entry_point" ],
},
{
"target_name": "test_pending_exception",
"sources": [
"entry_point.c",
"test_cannot_run_js.c"
],
"defines": [ "NAPI_VERSION=8" ],
"dependencies": [ "copy_entry_point" ],
}
]
}