diff options
author | Gabriel Schulhof <gabriel.schulhof@intel.com> | 2017-09-05 23:53:06 +0300 |
---|---|---|
committer | Gabriel Schulhof <gabriel.schulhof@intel.com> | 2017-09-10 00:15:49 +0300 |
commit | 78286984da50ed7f0ed8914b587da62c552277ce (patch) | |
tree | 8c690095a5c947a2b62796b8ff0828d5a62727d3 | |
parent | a2b68723a920b9cc70377727ec0e3bbe11fbe548 (diff) | |
download | node-new-78286984da50ed7f0ed8914b587da62c552277ce.tar.gz |
test,doc: make module name match gyp target name
Currently the nm_modname does not match the file name of the resulting
module. In fact, the nm_modname is pretty arbitrary. This seeks to
introduce some consistency into the nm_modname property by having the
name of the module appear in exactly one place: the "target_name"
property of the gyp target that builds the module.
PR-URL: https://github.com/nodejs/node/pull/15209
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
54 files changed, 64 insertions, 64 deletions
diff --git a/benchmark/misc/function_call/binding.cc b/benchmark/misc/function_call/binding.cc index 9008f6c437..95d2a56de2 100644 --- a/benchmark/misc/function_call/binding.cc +++ b/benchmark/misc/function_call/binding.cc @@ -14,4 +14,4 @@ extern "C" void init (Local<Object> target) { NODE_SET_METHOD(target, "hello", Hello); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/doc/api/addons.md b/doc/api/addons.md index bd17510333..b031c273e7 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -74,7 +74,7 @@ void init(Local<Object> exports) { NODE_SET_METHOD(exports, "hello", Method); } -NODE_MODULE(addon, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) } // namespace demo ``` @@ -84,7 +84,7 @@ the pattern: ```cpp void Initialize(Local<Object> exports); -NODE_MODULE(module_name, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) ``` There is no semi-colon after `NODE_MODULE` as it's not a function (see @@ -330,7 +330,7 @@ void Init(Local<Object> exports) { NODE_SET_METHOD(exports, "add", Add); } -NODE_MODULE(addon, Init) +NODE_MODULE(NODE_GYP_MODULE_NAME, Init) } // namespace demo ``` @@ -378,7 +378,7 @@ void Init(Local<Object> exports, Local<Object> module) { NODE_SET_METHOD(module, "exports", RunCallback); } -NODE_MODULE(addon, Init) +NODE_MODULE(NODE_GYP_MODULE_NAME, Init) } // namespace demo ``` @@ -434,7 +434,7 @@ void Init(Local<Object> exports, Local<Object> module) { NODE_SET_METHOD(module, "exports", CreateObject); } -NODE_MODULE(addon, Init) +NODE_MODULE(NODE_GYP_MODULE_NAME, Init) } // namespace demo ``` @@ -493,7 +493,7 @@ void Init(Local<Object> exports, Local<Object> module) { NODE_SET_METHOD(module, "exports", CreateFunction); } -NODE_MODULE(addon, Init) +NODE_MODULE(NODE_GYP_MODULE_NAME, Init) } // namespace demo ``` @@ -529,7 +529,7 @@ void InitAll(Local<Object> exports) { MyObject::Init(exports); } -NODE_MODULE(addon, InitAll) +NODE_MODULE(NODE_GYP_MODULE_NAME, InitAll) } // namespace demo ``` @@ -713,7 +713,7 @@ void InitAll(Local<Object> exports, Local<Object> module) { NODE_SET_METHOD(module, "exports", CreateObject); } -NODE_MODULE(addon, InitAll) +NODE_MODULE(NODE_GYP_MODULE_NAME, InitAll) } // namespace demo ``` @@ -926,7 +926,7 @@ void InitAll(Local<Object> exports) { NODE_SET_METHOD(exports, "add", Add); } -NODE_MODULE(addon, InitAll) +NODE_MODULE(NODE_GYP_MODULE_NAME, InitAll) } // namespace demo ``` @@ -1117,7 +1117,7 @@ void init(Local<Object> exports) { AtExit(sanity_check); } -NODE_MODULE(addon, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) } // namespace demo ``` diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 3a3cce0364..6269259260 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -877,7 +877,7 @@ except that instead of using the `NODE_MODULE` macro the following is used: ```C -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) ``` The next difference is the signature for the `Init` method. For a N-API @@ -2874,7 +2874,7 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { if (status != napi_ok) return; } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) ``` Given the above code, the add-on can be used from JavaScript as follows: diff --git a/test/addons-napi/1_hello_world/binding.c b/test/addons-napi/1_hello_world/binding.c index 57bac37fa0..785484d167 100644 --- a/test/addons-napi/1_hello_world/binding.c +++ b/test/addons-napi/1_hello_world/binding.c @@ -15,4 +15,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, exports, 1, &desc)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/2_function_arguments/binding.c b/test/addons-napi/2_function_arguments/binding.c index 92f89fd2ff..977547bb6f 100644 --- a/test/addons-napi/2_function_arguments/binding.c +++ b/test/addons-napi/2_function_arguments/binding.c @@ -34,4 +34,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, exports, 1, &desc)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/3_callbacks/binding.c b/test/addons-napi/3_callbacks/binding.c index 8640a93610..4249ebc768 100644 --- a/test/addons-napi/3_callbacks/binding.c +++ b/test/addons-napi/3_callbacks/binding.c @@ -53,4 +53,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, exports, 2, desc)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/4_object_factory/binding.c b/test/addons-napi/4_object_factory/binding.c index d76f30b847..54c39d8515 100644 --- a/test/addons-napi/4_object_factory/binding.c +++ b/test/addons-napi/4_object_factory/binding.c @@ -20,4 +20,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, module, 1, &desc)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/5_function_factory/binding.c b/test/addons-napi/5_function_factory/binding.c index 4c20190f50..789331bef2 100644 --- a/test/addons-napi/5_function_factory/binding.c +++ b/test/addons-napi/5_function_factory/binding.c @@ -22,4 +22,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, module, 1, &desc)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/6_object_wrap/binding.cc b/test/addons-napi/6_object_wrap/binding.cc index 99d8339bd0..5681550541 100644 --- a/test/addons-napi/6_object_wrap/binding.cc +++ b/test/addons-napi/6_object_wrap/binding.cc @@ -4,4 +4,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { MyObject::Init(env, exports); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/7_factory_wrap/binding.cc b/test/addons-napi/7_factory_wrap/binding.cc index c61e409478..16946b7520 100644 --- a/test/addons-napi/7_factory_wrap/binding.cc +++ b/test/addons-napi/7_factory_wrap/binding.cc @@ -20,4 +20,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, module, 1, &desc)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/8_passing_wrapped/binding.cc b/test/addons-napi/8_passing_wrapped/binding.cc index c22ac6442f..408d061710 100644 --- a/test/addons-napi/8_passing_wrapped/binding.cc +++ b/test/addons-napi/8_passing_wrapped/binding.cc @@ -41,4 +41,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { napi_define_properties(env, exports, sizeof(desc) / sizeof(*desc), desc)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_array/test_array.c b/test/addons-napi/test_array/test_array.c index 4bb12d4e01..90448f3ebb 100644 --- a/test/addons-napi/test_array/test_array.c +++ b/test/addons-napi/test_array/test_array.c @@ -182,4 +182,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_async/test_async.cc b/test/addons-napi/test_async/test_async.cc index ca76fa2d33..fd5278d7d5 100644 --- a/test/addons-napi/test_async/test_async.cc +++ b/test/addons-napi/test_async/test_async.cc @@ -170,4 +170,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(properties) / sizeof(*properties), properties)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_buffer/test_buffer.c b/test/addons-napi/test_buffer/test_buffer.c index 0e12bedfb5..546b306ec6 100644 --- a/test/addons-napi/test_buffer/test_buffer.c +++ b/test/addons-napi/test_buffer/test_buffer.c @@ -141,4 +141,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(methods) / sizeof(methods[0]), methods)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_constructor/test_constructor.c b/test/addons-napi/test_constructor/test_constructor.c index a991dab853..2d3c5dbe9f 100644 --- a/test/addons-napi/test_constructor/test_constructor.c +++ b/test/addons-napi/test_constructor/test_constructor.c @@ -87,4 +87,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { napi_create_reference(env, cons, 1, &constructor_)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_conversions/test_conversions.c b/test/addons-napi/test_conversions/test_conversions.c index a8d526c763..36f4a11ac4 100644 --- a/test/addons-napi/test_conversions/test_conversions.c +++ b/test/addons-napi/test_conversions/test_conversions.c @@ -148,4 +148,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_dataview/test_dataview.c b/test/addons-napi/test_dataview/test_dataview.c index 4060e4d266..66470552f2 100644 --- a/test/addons-napi/test_dataview/test_dataview.c +++ b/test/addons-napi/test_dataview/test_dataview.c @@ -46,4 +46,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_env_sharing/compare_env.c b/test/addons-napi/test_env_sharing/compare_env.c index b209c8f6d8..6488789a0b 100644 --- a/test/addons-napi/test_env_sharing/compare_env.c +++ b/test/addons-napi/test_env_sharing/compare_env.c @@ -19,4 +19,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* context) { NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, module, 1, &prop)); } -NAPI_MODULE(compare_env, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_env_sharing/store_env.c b/test/addons-napi/test_env_sharing/store_env.c index 391f6faa27..b2b1772a69 100644 --- a/test/addons-napi/test_env_sharing/store_env.c +++ b/test/addons-napi/test_env_sharing/store_env.c @@ -9,4 +9,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* context) { napi_set_named_property(env, module, "exports", external)); } -NAPI_MODULE(store_env, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_error/test_error.cc b/test/addons-napi/test_error/test_error.cc index 29aba1f1ef..4ef279d1fe 100644 --- a/test/addons-napi/test_error/test_error.cc +++ b/test/addons-napi/test_error/test_error.cc @@ -141,4 +141,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_exception/test_exception.c b/test/addons-napi/test_exception/test_exception.c index 191ac3f8ba..3a4e91a731 100644 --- a/test/addons-napi/test_exception/test_exception.c +++ b/test/addons-napi/test_exception/test_exception.c @@ -56,4 +56,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_fatal/test_fatal.c b/test/addons-napi/test_fatal/test_fatal.c index 1e8a1cf795..74fe3f132d 100644 --- a/test/addons-napi/test_fatal/test_fatal.c +++ b/test/addons-napi/test_fatal/test_fatal.c @@ -15,4 +15,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(properties) / sizeof(*properties), properties)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_function/test_function.c b/test/addons-napi/test_function/test_function.c index 4ce0203e72..b044de3b1e 100644 --- a/test/addons-napi/test_function/test_function.c +++ b/test/addons-napi/test_function/test_function.c @@ -32,4 +32,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { NAPI_CALL_RETURN_VOID(env, napi_set_named_property(env, exports, "Test", fn)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_general/test_general.c b/test/addons-napi/test_general/test_general.c index ea1f2ece0a..3052a93a71 100644 --- a/test/addons-napi/test_general/test_general.c +++ b/test/addons-napi/test_general/test_general.c @@ -239,4 +239,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_handle_scope/test_handle_scope.c b/test/addons-napi/test_handle_scope/test_handle_scope.c index 6637da8231..d6b0653f2a 100644 --- a/test/addons-napi/test_handle_scope/test_handle_scope.c +++ b/test/addons-napi/test_handle_scope/test_handle_scope.c @@ -78,4 +78,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(properties) / sizeof(*properties), properties)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_make_callback/binding.cc b/test/addons-napi/test_make_callback/binding.cc index 987b024098..526131ab73 100644 --- a/test/addons-napi/test_make_callback/binding.cc +++ b/test/addons-napi/test_make_callback/binding.cc @@ -45,4 +45,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { } // namespace -NAPI_MODULE(binding, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_make_callback_recurse/binding.cc b/test/addons-napi/test_make_callback_recurse/binding.cc index 3f5a4c28b4..75c0399cdb 100644 --- a/test/addons-napi/test_make_callback_recurse/binding.cc +++ b/test/addons-napi/test_make_callback_recurse/binding.cc @@ -29,4 +29,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { } // namespace -NAPI_MODULE(binding, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_number/test_number.c b/test/addons-napi/test_number/test_number.c index 6b28afe18f..bd7f067937 100644 --- a/test/addons-napi/test_number/test_number.c +++ b/test/addons-napi/test_number/test_number.c @@ -55,4 +55,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_object/test_object.c b/test/addons-napi/test_object/test_object.c index 88ac79c170..c6fa27e30c 100644 --- a/test/addons-napi/test_object/test_object.c +++ b/test/addons-napi/test_object/test_object.c @@ -236,4 +236,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_promise/test_promise.c b/test/addons-napi/test_promise/test_promise.c index dc617f4592..d21564e93f 100644 --- a/test/addons-napi/test_promise/test_promise.c +++ b/test/addons-napi/test_promise/test_promise.c @@ -57,4 +57,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_properties/test_properties.c b/test/addons-napi/test_properties/test_properties.c index 3f4f0a6bcb..7c5d6b1d6f 100644 --- a/test/addons-napi/test_properties/test_properties.c +++ b/test/addons-napi/test_properties/test_properties.c @@ -97,4 +97,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(properties) / sizeof(*properties), properties)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_reference/test_reference.c b/test/addons-napi/test_reference/test_reference.c index b16e10d703..f10b40bf5e 100644 --- a/test/addons-napi/test_reference/test_reference.c +++ b/test/addons-napi/test_reference/test_reference.c @@ -150,4 +150,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_string/test_string.c b/test/addons-napi/test_string/test_string.c index ec80e2c7b5..34285b3b59 100644 --- a/test/addons-napi/test_string/test_string.c +++ b/test/addons-napi/test_string/test_string.c @@ -217,4 +217,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(properties) / sizeof(*properties), properties)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_symbol/test_symbol.c b/test/addons-napi/test_symbol/test_symbol.c index f85567c071..42425c052c 100644 --- a/test/addons-napi/test_symbol/test_symbol.c +++ b/test/addons-napi/test_symbol/test_symbol.c @@ -57,4 +57,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(properties) / sizeof(*properties), properties)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons-napi/test_typedarray/test_typedarray.c b/test/addons-napi/test_typedarray/test_typedarray.c index ffc118681b..a138297d49 100644 --- a/test/addons-napi/test_typedarray/test_typedarray.c +++ b/test/addons-napi/test_typedarray/test_typedarray.c @@ -153,4 +153,4 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); } -NAPI_MODULE(addon, Init) +NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/addons/async-hello-world/binding.cc b/test/addons/async-hello-world/binding.cc index 42291c4901..f773bfffcd 100644 --- a/test/addons/async-hello-world/binding.cc +++ b/test/addons/async-hello-world/binding.cc @@ -88,4 +88,4 @@ void init(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) { NODE_SET_METHOD(exports, "runMakeCallback", Method<true>); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/async-hooks-id/binding.cc b/test/addons/async-hooks-id/binding.cc index 611c250e9a..d6d0385e61 100644 --- a/test/addons/async-hooks-id/binding.cc +++ b/test/addons/async-hooks-id/binding.cc @@ -24,4 +24,4 @@ void Initialize(Local<Object> exports) { } // namespace -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/async-hooks-promise/binding.cc b/test/addons/async-hooks-promise/binding.cc index fb91b936e6..1571690ede 100644 --- a/test/addons/async-hooks-promise/binding.cc +++ b/test/addons/async-hooks-promise/binding.cc @@ -38,6 +38,6 @@ inline void Initialize(v8::Local<v8::Object> binding) { NODE_SET_METHOD(binding, "getPromiseField", GetPromiseField); } -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) } // anonymous namespace diff --git a/test/addons/async-resource/binding.cc b/test/addons/async-resource/binding.cc index 9d3ab37e12..83629e757d 100644 --- a/test/addons/async-resource/binding.cc +++ b/test/addons/async-resource/binding.cc @@ -111,4 +111,4 @@ void Initialize(Local<Object> exports) { } // namespace -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/at-exit/binding.cc b/test/addons/at-exit/binding.cc index d90b3f70c2..4dd9b0f304 100644 --- a/test/addons/at-exit/binding.cc +++ b/test/addons/at-exit/binding.cc @@ -39,4 +39,4 @@ void init(Local<Object> exports) { atexit(sanity_check); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/buffer-free-callback/binding.cc b/test/addons/buffer-free-callback/binding.cc index 24b5dea602..4075fef50d 100644 --- a/test/addons/buffer-free-callback/binding.cc +++ b/test/addons/buffer-free-callback/binding.cc @@ -41,4 +41,4 @@ void init(v8::Local<v8::Object> exports) { NODE_SET_METHOD(exports, "check", Check); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/errno-exception/binding.cc b/test/addons/errno-exception/binding.cc index 1c3147ff7a..bf83fb2168 100644 --- a/test/addons/errno-exception/binding.cc +++ b/test/addons/errno-exception/binding.cc @@ -15,4 +15,4 @@ void init(v8::Local<v8::Object> exports) { NODE_SET_METHOD(exports, "errno", Method); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/heap-profiler/binding.cc b/test/addons/heap-profiler/binding.cc index 0830aae1be..09feefa669 100644 --- a/test/addons/heap-profiler/binding.cc +++ b/test/addons/heap-profiler/binding.cc @@ -22,6 +22,6 @@ inline void Initialize(v8::Local<v8::Object> binding) { v8::FunctionTemplate::New(isolate, Test)->GetFunction()); } -NODE_MODULE(test, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) } // anonymous namespace diff --git a/test/addons/hello-world-function-export/binding.cc b/test/addons/hello-world-function-export/binding.cc index 9a93a806e7..55d64b3d6c 100644 --- a/test/addons/hello-world-function-export/binding.cc +++ b/test/addons/hello-world-function-export/binding.cc @@ -10,4 +10,4 @@ void init(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) { NODE_SET_METHOD(module, "exports", Method); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/hello-world/binding.cc b/test/addons/hello-world/binding.cc index 83823ae836..944f563195 100644 --- a/test/addons/hello-world/binding.cc +++ b/test/addons/hello-world/binding.cc @@ -10,4 +10,4 @@ void init(v8::Local<v8::Object> exports) { NODE_SET_METHOD(exports, "hello", Method); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/load-long-path/binding.cc b/test/addons/load-long-path/binding.cc index 83823ae836..944f563195 100644 --- a/test/addons/load-long-path/binding.cc +++ b/test/addons/load-long-path/binding.cc @@ -10,4 +10,4 @@ void init(v8::Local<v8::Object> exports) { NODE_SET_METHOD(exports, "hello", Method); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/make-callback-recurse/binding.cc b/test/addons/make-callback-recurse/binding.cc index 4ca5426f9e..c42166c745 100644 --- a/test/addons/make-callback-recurse/binding.cc +++ b/test/addons/make-callback-recurse/binding.cc @@ -28,4 +28,4 @@ void Initialize(Local<Object> exports) { } // namespace -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/make-callback/binding.cc b/test/addons/make-callback/binding.cc index 3b56c385ec..a5dfe46d77 100644 --- a/test/addons/make-callback/binding.cc +++ b/test/addons/make-callback/binding.cc @@ -36,4 +36,4 @@ void Initialize(v8::Local<v8::Object> exports) { } // namespace -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/new-target/binding.cc b/test/addons/new-target/binding.cc index a7e18eff70..5491c18c6e 100644 --- a/test/addons/new-target/binding.cc +++ b/test/addons/new-target/binding.cc @@ -11,6 +11,6 @@ inline void Initialize(v8::Local<v8::Object> binding) { v8::FunctionTemplate::New(isolate, NewClass)->GetFunction()); } -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) } // anonymous namespace diff --git a/test/addons/null-buffer-neuter/binding.cc b/test/addons/null-buffer-neuter/binding.cc index 0d3d850304..4c9dbf9025 100644 --- a/test/addons/null-buffer-neuter/binding.cc +++ b/test/addons/null-buffer-neuter/binding.cc @@ -38,4 +38,4 @@ void init(v8::Local<v8::Object> exports) { NODE_SET_METHOD(exports, "run", Run); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/parse-encoding/binding.cc b/test/addons/parse-encoding/binding.cc index 65dba5b673..1501544153 100644 --- a/test/addons/parse-encoding/binding.cc +++ b/test/addons/parse-encoding/binding.cc @@ -35,4 +35,4 @@ void Initialize(v8::Local<v8::Object> exports) { } // anonymous namespace -NODE_MODULE(binding, Initialize) +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) diff --git a/test/addons/repl-domain-abort/binding.cc b/test/addons/repl-domain-abort/binding.cc index b2f2c74348..d6a825dfdd 100644 --- a/test/addons/repl-domain-abort/binding.cc +++ b/test/addons/repl-domain-abort/binding.cc @@ -42,4 +42,4 @@ void init(Local<Object> exports) { NODE_SET_METHOD(exports, "method", Method); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/stringbytes-external-exceed-max/binding.cc b/test/addons/stringbytes-external-exceed-max/binding.cc index 2141d2c5b9..628a6b6913 100644 --- a/test/addons/stringbytes-external-exceed-max/binding.cc +++ b/test/addons/stringbytes-external-exceed-max/binding.cc @@ -21,4 +21,4 @@ void init(v8::Local<v8::Object> exports) { NODE_SET_METHOD(exports, "ensureAllocation", EnsureAllocation); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/test/addons/symlinked-module/binding.cc b/test/addons/symlinked-module/binding.cc index 83823ae836..944f563195 100644 --- a/test/addons/symlinked-module/binding.cc +++ b/test/addons/symlinked-module/binding.cc @@ -10,4 +10,4 @@ void init(v8::Local<v8::Object> exports) { NODE_SET_METHOD(exports, "hello", Method); } -NODE_MODULE(binding, init) +NODE_MODULE(NODE_GYP_MODULE_NAME, init) |