@auto_js/napi_exports 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CMakeLists.txt +2 -2
- package/js_native_api.cc +3 -0
- package/package.json +1 -1
package/CMakeLists.txt
CHANGED
|
@@ -5,7 +5,7 @@ target_compile_features(nodejs PUBLIC cxx_std_23)
|
|
|
5
5
|
if(NOT DEFINED NAPI_VERSION)
|
|
6
6
|
message(FATAL_ERROR "Missing 'NAPI_VERSION' cmake variable.")
|
|
7
7
|
endif()
|
|
8
|
-
target_compile_definitions(nodejs PUBLIC
|
|
8
|
+
target_compile_definitions(nodejs PUBLIC NAPI_VERSION=${NAPI_VERSION})
|
|
9
9
|
|
|
10
10
|
# Architecture, for window linkage
|
|
11
11
|
string(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} NODE_ARCH)
|
|
@@ -57,7 +57,7 @@ if(WIN32)
|
|
|
57
57
|
message(WARNING "Missing '${NODE_DIST_DIR}/win-${NODE_ARCH}/node.lib'")
|
|
58
58
|
endif()
|
|
59
59
|
# nb: `winmm` for `js_clock::now()`
|
|
60
|
-
target_link_libraries(nodejs
|
|
60
|
+
target_link_libraries(nodejs PRIVATE node winmm)
|
|
61
61
|
endif()
|
|
62
62
|
|
|
63
63
|
# Sources
|
package/js_native_api.cc
CHANGED
|
@@ -84,6 +84,8 @@ export using ::napi_set_element;
|
|
|
84
84
|
export using ::napi_set_instance_data;
|
|
85
85
|
export using ::napi_set_named_property;
|
|
86
86
|
export using ::napi_set_property;
|
|
87
|
+
export using ::napi_throw_error;
|
|
88
|
+
export using ::napi_throw_range_error;
|
|
87
89
|
export using ::napi_throw_type_error;
|
|
88
90
|
export using ::napi_throw;
|
|
89
91
|
export using ::napi_type_tag_object;
|
|
@@ -94,5 +96,6 @@ export using ::node_api_create_property_key_latin1;
|
|
|
94
96
|
export using ::node_api_create_property_key_utf16;
|
|
95
97
|
export using ::node_api_create_property_key_utf8;
|
|
96
98
|
export using ::node_api_create_syntax_error;
|
|
99
|
+
export using ::node_api_throw_syntax_error;
|
|
97
100
|
|
|
98
101
|
// NOLINTEND(misc-unused-using-decls)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auto_js/napi_exports",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "C++ module exports for nodejs & n-api",
|
|
5
5
|
"author": "https://github.com/laverdet/",
|
|
6
6
|
"homepage": "https://github.com/laverdet/isolated-vm/tree/experimental/packages/third_party/nodejs",
|