Skip to content

Commit

Permalink
src: add uvwasi version
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJithil committed Nov 30, 2022
1 parent 1b550ba commit 0babd40
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/node_metadata.cc
Expand Up @@ -6,6 +6,7 @@
#include "node.h"
#include "util.h"
#include "uv.h"
#include "uvwasi.h"
#include "v8.h"
#include "zlib.h"

Expand Down Expand Up @@ -103,6 +104,10 @@ Metadata::Versions::Versions() {
ngtcp2 = NGTCP2_VERSION;
nghttp3 = NGHTTP3_VERSION;
#endif

#ifdef UVWASI_VERSION_STRING
uvwasi = UVWASI_VERSION_STRING;
#endif // UVWASI_VERSION
}

Metadata::Release::Release() : name(NODE_RELEASE) {
Expand Down
11 changes: 9 additions & 2 deletions src/node_metadata.h
Expand Up @@ -13,6 +13,8 @@
#endif
#endif // HAVE_OPENSSL

#include "uvwasi.h"

namespace node {

// if this is a release build and no explicit base has been set
Expand All @@ -37,7 +39,11 @@ namespace node {
V(modules) \
V(nghttp2) \
V(napi) \
V(llhttp) \
V(llhttp)

#if defined(UVWASI_VERSION_STRING)
#define NODE_VERSIONS_UVWASI(V) V(uvwasi)
#endif // UVWASI_VERSION_STRING

#if HAVE_OPENSSL
#define NODE_VERSIONS_KEY_CRYPTO(V) V(openssl)
Expand Down Expand Up @@ -67,7 +73,8 @@ namespace node {
NODE_VERSIONS_KEYS_BASE(V) \
NODE_VERSIONS_KEY_CRYPTO(V) \
NODE_VERSIONS_KEY_INTL(V) \
NODE_VERSIONS_KEY_QUIC(V)
NODE_VERSIONS_KEY_QUIC(V) \
NODE_VERSIONS_UVWASI(V)

class Metadata {
public:
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-process-versions.js
Expand Up @@ -13,6 +13,7 @@ const expected_keys = [
'nghttp2',
'napi',
'llhttp',
'uvwasi',
];

if (common.hasCrypto) {
Expand Down

0 comments on commit 0babd40

Please sign in to comment.