File tree 5 files changed +30
-0
lines changed
5 files changed +30
-0
lines changed 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"
11
12
12
13
#if HAVE_OPENSSL
13
14
#include < openssl/opensslv.h>
@@ -89,6 +90,7 @@ Metadata::Versions::Versions() {
89
90
std::to_string ((BrotliEncoderVersion () & 0xFFF000 ) >> 12 ) +
90
91
" ." +
91
92
std::to_string (BrotliEncoderVersion () & 0xFFF );
93
+ cjs_module_lexer_version = CJS_MODULE_LEXER_VERSION;
92
94
93
95
#if HAVE_OPENSSL
94
96
openssl = GetOpenSSLVersion ();
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ namespace node {
38
38
V (nghttp2) \
39
39
V (napi) \
40
40
V (llhttp) \
41
+ V (cjs_module_lexer_version) \
41
42
42
43
#if HAVE_OPENSSL
43
44
#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,7 @@ const expected_keys = [
13
15
'nghttp2' ,
14
16
'napi' ,
15
17
'llhttp' ,
18
+ 'cjs_module_lexer_version'
16
19
] ;
17
20
18
21
if ( common . hasCrypto ) {
@@ -50,6 +53,7 @@ assert.match(
50
53
/ ^ \d + \. \d + \. \d + (?: \. \d + ) ? - n o d e \. \d + (?: \( c a n d i d a t e \) ) ? $ /
51
54
) ;
52
55
assert . match ( process . versions . modules , / ^ \d + $ / ) ;
56
+ assert . match ( process . versions . cjs_module_lexer_version , commonTemplate ) ;
53
57
54
58
if ( common . hasCrypto ) {
55
59
const versionRegex = common . hasOpenSSL3 ?
@@ -69,3 +73,6 @@ for (let i = 0; i < expected_keys.length; i++) {
69
73
70
74
assert . strictEqual ( process . config . variables . napi_build_version ,
71
75
process . versions . napi ) ;
76
+
77
+ const expectedCjsModuleLexerVersion = cjs_module_lexer_version . version ;
78
+ assert . strictEqual ( process . versions . cjs_module_lexer_version , expectedCjsModuleLexerVersion ) ;
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