Skip to content

Commit 0babd40

Browse files
committed
src: add uvwasi version
1 parent 1b550ba commit 0babd40

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

src/node_metadata.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "node.h"
77
#include "util.h"
88
#include "uv.h"
9+
#include "uvwasi.h"
910
#include "v8.h"
1011
#include "zlib.h"
1112

@@ -103,6 +104,10 @@ Metadata::Versions::Versions() {
103104
ngtcp2 = NGTCP2_VERSION;
104105
nghttp3 = NGHTTP3_VERSION;
105106
#endif
107+
108+
#ifdef UVWASI_VERSION_STRING
109+
uvwasi = UVWASI_VERSION_STRING;
110+
#endif // UVWASI_VERSION
106111
}
107112

108113
Metadata::Release::Release() : name(NODE_RELEASE) {

src/node_metadata.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#endif
1414
#endif // HAVE_OPENSSL
1515

16+
#include "uvwasi.h"
17+
1618
namespace node {
1719

1820
// if this is a release build and no explicit base has been set
@@ -37,7 +39,11 @@ namespace node {
3739
V(modules) \
3840
V(nghttp2) \
3941
V(napi) \
40-
V(llhttp) \
42+
V(llhttp)
43+
44+
#if defined(UVWASI_VERSION_STRING)
45+
#define NODE_VERSIONS_UVWASI(V) V(uvwasi)
46+
#endif // UVWASI_VERSION_STRING
4147

4248
#if HAVE_OPENSSL
4349
#define NODE_VERSIONS_KEY_CRYPTO(V) V(openssl)
@@ -67,7 +73,8 @@ namespace node {
6773
NODE_VERSIONS_KEYS_BASE(V) \
6874
NODE_VERSIONS_KEY_CRYPTO(V) \
6975
NODE_VERSIONS_KEY_INTL(V) \
70-
NODE_VERSIONS_KEY_QUIC(V)
76+
NODE_VERSIONS_KEY_QUIC(V) \
77+
NODE_VERSIONS_UVWASI(V)
7178

7279
class Metadata {
7380
public:

test/parallel/test-process-versions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const expected_keys = [
1313
'nghttp2',
1414
'napi',
1515
'llhttp',
16+
'uvwasi',
1617
];
1718

1819
if (common.hasCrypto) {

0 commit comments

Comments
 (0)