File tree 7 files changed +37
-0
lines changed
7 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ #define BASE64_VERSION "0.5.0"
Original file line number Diff line number Diff line change
1
+ #define CJS_MODULE_LEXER_VERSION "1.2.2"
Original file line number Diff line number Diff line change 8
8
#include " uv.h"
9
9
#include " v8.h"
10
10
#include " zlib.h"
11
+ #include " cjs_module_lexer_version.h"
12
+ #include " base64_version.h"
11
13
12
14
#if HAVE_OPENSSL
13
15
#include < openssl/opensslv.h>
@@ -89,6 +91,8 @@ Metadata::Versions::Versions() {
89
91
std::to_string ((BrotliEncoderVersion () & 0xFFF000 ) >> 12 ) +
90
92
" ." +
91
93
std::to_string (BrotliEncoderVersion () & 0xFFF );
94
+ cjs_module_lexer_version = CJS_MODULE_LEXER_VERSION;
95
+ base64_version = BASE64_VERSION;
92
96
93
97
#if HAVE_OPENSSL
94
98
openssl = GetOpenSSLVersion ();
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ namespace node {
38
38
V (nghttp2) \
39
39
V (napi) \
40
40
V (llhttp) \
41
+ V (cjs_module_lexer_version) \
42
+ V (base64_version) \
41
43
42
44
#if HAVE_OPENSSL
43
45
#define NODE_VERSIONS_KEY_CRYPTO (V ) V(openssl)
Original file line number Diff line number Diff line change 2
2
const common = require ( '../common' ) ;
3
3
const assert = require ( 'assert' ) ;
4
4
5
+ const cjs_module_lexer_version = require ( '../../deps/cjs-module-lexer/package.json' ) ;
6
+
5
7
const expected_keys = [
6
8
'ares' ,
7
9
'brotli' ,
@@ -13,6 +15,8 @@ const expected_keys = [
13
15
'nghttp2' ,
14
16
'napi' ,
15
17
'llhttp' ,
18
+ 'cjs_module_lexer_version' ,
19
+ 'base64_version'
16
20
] ;
17
21
18
22
if ( common . hasCrypto ) {
@@ -50,6 +54,7 @@ assert.match(
50
54
/ ^ \d + \. \d + \. \d + (?: \. \d + ) ? - n o d e \. \d + (?: \( c a n d i d a t e \) ) ? $ /
51
55
) ;
52
56
assert . match ( process . versions . modules , / ^ \d + $ / ) ;
57
+ assert . match ( process . versions . cjs_module_lexer_version , commonTemplate ) ;
53
58
54
59
if ( common . hasCrypto ) {
55
60
const versionRegex = common . hasOpenSSL3 ?
@@ -69,3 +74,6 @@ for (let i = 0; i < expected_keys.length; i++) {
69
74
70
75
assert . strictEqual ( process . config . variables . napi_build_version ,
71
76
process . versions . napi ) ;
77
+
78
+ const expectedCjsModuleLexerVersion = cjs_module_lexer_version . version ;
79
+ assert . strictEqual ( process . versions . cjs_module_lexer_version , expectedCjsModuleLexerVersion ) ;
Original file line number Diff line number Diff line change @@ -45,3 +45,5 @@ echo ""
45
45
echo " $ git add -A deps/base64/base64"
46
46
echo " $ git commit -m \" deps: update base64 to $BASE64_VERSION \" "
47
47
echo " "
48
+
49
+ echo " #define BASE64_VERSION \" $BASE64_VERSION \" " > " $BASE_DIR /src/base64_version.h"
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Shell script to update version file of the deps in the source tree.
4
+ # This script could be used to update the version file for deps doesn't have update scripts
5
+
6
+
7
+ # update cjs_module_lexer_version.h
8
+ {
9
+ ROOT=" $PWD /"
10
+ [ -z " $NODE " ] && NODE=" $ROOT /out/Release/node"
11
+ [ -x " $NODE " ] || NODE=$( command -v node)
12
+
13
+ # cjs-module-lexer
14
+ cd deps/cjs-module-lexer
15
+ # get cjs-module-lexer version
16
+ CJS_MODULE_LEXER_VERSION=$( " $NODE " -p " require('./package.json').version" )
17
+ # update this version information in src/cjs_module_lexer_version.h
18
+ echo " #define CJS_MODULE_LEXER_VERSION \" $CJS_MODULE_LEXER_VERSION \" " > " $ROOT /src/cjs_module_lexer_version.h"
19
+ }
You can’t perform that action at this time.
0 commit comments