@auto_js/napi_exports 0.0.7 → 0.0.8

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 CHANGED
@@ -52,6 +52,7 @@ endif()
52
52
  message(STATUS "Using Node.js headers from '${NODE_DIST_DIR}'")
53
53
 
54
54
  # Configuration
55
+ target_include_directories(nodejs SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
55
56
  target_include_directories(nodejs SYSTEM PUBLIC "${NODE_DIST_DIR}/include/node")
56
57
  if(WIN32)
57
58
  if(EXISTS "${NODE_DIST_DIR}/win-${NODE_ARCH}/node.lib")
package/js_native_api.cc CHANGED
@@ -1,4 +1,5 @@
1
1
  module;
2
+ #include "napi_js/extern.h"
2
3
  // https://nodejs.org/api/n-api.html
3
4
  #include <js_native_api.h>
4
5
  export module nodejs:js_native_api;
@@ -1,5 +1,5 @@
1
1
  module;
2
- #include "version.h"
2
+ #include "napi_js/version.h"
3
3
  #include <js_native_api_types.h>
4
4
  export module nodejs:js_native_api_types;
5
5
  // NOLINTBEGIN(misc-unused-using-decls)
@@ -0,0 +1,10 @@
1
+ #if __linux__
2
+ #define NAPI_EXTERN __attribute__((weak))
3
+ #elif __APPLE__
4
+ #define NAPI_EXTERN __attribute__((weak))
5
+ #elif _WIN64
6
+ #define NAPI_EXTERN __declspec(dllimport) __attribute__((weak))
7
+ #else
8
+ #define NAPI_EXTERN
9
+ #endif
10
+ #define UV_EXTERN NAPI_EXTERN
package/node_api.cc CHANGED
@@ -1,4 +1,5 @@
1
1
  module;
2
+ #include "napi_js/extern.h"
2
3
  #include <node_api.h>
3
4
  export module nodejs:node_api;
4
5
  // NOLINTBEGIN(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.7",
3
+ "version": "0.0.8",
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",
package/uv.cc CHANGED
@@ -1,5 +1,5 @@
1
1
  module;
2
- #include "version.h"
2
+ #include "napi_js/version.h"
3
3
  #include <uv.h>
4
4
  export module nodejs:uv;
5
5
 
File without changes