Skip to content

Commit

Permalink
src: add nlohmann to process.versions
Browse files Browse the repository at this point in the history
PR-URL: #166
Fixes: #163
Reviewed-By: Santiago Gimeno <[email protected]>
  • Loading branch information
RafaelGSS committed Sep 24, 2024
1 parent b2fbaa9 commit 0fb77a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/node_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "curl/curlver.h"
#include "llhttp.h"
#include "nghttp2/nghttp2ver.h"
#include "nlohmann/json.h"
#include "node.h"
#include "simdutf.h"
#include "undici_version.h"
Expand Down Expand Up @@ -134,6 +135,12 @@ Metadata::Versions::Versions() {
simdutf = SIMDUTF_VERSION;
ada = ADA_VERSION;
curl = LIBCURL_VERSION;
nlohmann =
NODE_STRINGIFY(NLOHMANN_JSON_VERSION_MAJOR)
"."
NODE_STRINGIFY(NLOHMANN_JSON_VERSION_MINOR)
"."
NODE_STRINGIFY(NLOHMANN_JSON_VERSION_PATCH);
}

Metadata::Release::Release() : name(NODE_RELEASE) {
Expand Down
1 change: 1 addition & 0 deletions src/node_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ namespace node {
NODE_VERSIONS_KEY_UNDICI(V) \
V(cjs_module_lexer) \
V(curl) \
V(nlohmann) \
V(base64)

#if HAVE_OPENSSL
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-process-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const expected_keys = [
'cjs_module_lexer',
'base64',
'curl',
'nlohmann',
];

const hasUndici = process.config.variables.node_builtin_shareable_builtins.includes('deps/undici/undici.js');
Expand Down

0 comments on commit 0fb77a6

Please sign in to comment.