process: expose NODE_MODULE_VERSION in process.versions · nodejs/node-v0.x-archive@ccabd4a (original) (raw)
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
File tree
3 files changed
lines changed
3 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -324,13 +324,16 @@ A property exposing version strings of node and its dependencies. | ||
324 | 324 | |
325 | 325 | console.log(process.versions); |
326 | 326 | |
327 | -Will output: | |
328 | - | |
329 | -{ node: '0.4.12', | |
330 | - v8: '3.1.8.26', | |
331 | - ares: '1.7.4', | |
332 | - ev: '4.4', | |
333 | - openssl: '1.0.0e-fips' } | |
327 | +Will print something like: | |
328 | + | |
329 | +{ http_parser: '1.0', | |
330 | + node: '0.10.4', | |
331 | + v8: '3.14.5.8', | |
332 | + ares: '1.9.0-DEV', | |
333 | + uv: '0.10.3', | |
334 | + zlib: '1.2.3', | |
335 | + modules: '11', | |
336 | + openssl: '1.0.1e' } | |
334 | 337 | |
335 | 338 | ## process.config |
336 | 339 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2356,6 +2356,8 @@ Handle SetupProcessObject(int argc, char *argv[]) { | ||
2356 | 2356 | versions->Set(String::NewSymbol("ares"), String::New(ARES_VERSION_STR)); |
2357 | 2357 | versions->Set(String::NewSymbol("uv"), String::New(uv_version_string())); |
2358 | 2358 | versions->Set(String::NewSymbol("zlib"), String::New(ZLIB_VERSION)); |
2359 | + versions->Set(String::NewSymbol("modules"), | |
2360 | +String::New(NODE_STRINGIFY(NODE_MODULE_VERSION))); | |
2359 | 2361 | #if HAVE_OPENSSL |
2360 | 2362 | // Stupid code to slice out the version string. |
2361 | 2363 | int c, l = strlen(OPENSSL_VERSION_TEXT); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -207,7 +207,7 @@ node_module_struct* get_builtin_module(const char *name); | ||
207 | 207 | * an API is broken in the C++ side, including in v8 or |
208 | 208 | * other dependencies. |
209 | 209 | */ |
210 | -#define NODE_MODULE_VERSION 0x000B /* v0.11 */ | |
210 | +#define NODE_MODULE_VERSION 11 | |
211 | 211 | |
212 | 212 | #define NODE_STANDARD_MODULE_STUFF \ |
213 | 213 | NODE_MODULE_VERSION, \ |