File tree Expand file tree Collapse file tree 7 files changed +37
-0
lines changed Expand file tree Collapse file tree 7 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ #define BASE64_VERSION "0.5.0" // NOLINT(build/header_guard)
Original file line number Diff line number Diff line change 1+ #define CJS_MODULE_LEXER_VERSION "1.2.2" // NOLINT(build/header_guard)
Original file line number Diff line number Diff line change 11#include " node_metadata.h"
22#include " ares.h"
3+ #include " base64_version.h"
34#include " brotli/encode.h"
5+ #include " cjs_module_lexer_version.h"
46#include " llhttp.h"
57#include " nghttp2/nghttp2ver.h"
68#include " node.h"
@@ -89,6 +91,8 @@ Metadata::Versions::Versions() {
8991 std::to_string ((BrotliEncoderVersion () & 0xFFF000 ) >> 12 ) +
9092 " ." +
9193 std::to_string (BrotliEncoderVersion () & 0xFFF );
94+ cjs_module_lexer = CJS_MODULE_LEXER_VERSION;
95+ base64 = BASE64_VERSION;
9296
9397#if HAVE_OPENSSL
9498 openssl = GetOpenSSLVersion ();
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ namespace node {
3838 V (nghttp2) \
3939 V (napi) \
4040 V (llhttp) \
41+ V (cjs_module_lexer) \
42+ V (base64)
4143
4244#if HAVE_OPENSSL
4345#define NODE_VERSIONS_KEY_CRYPTO (V ) V(openssl)
Original file line number Diff line number Diff line change 22const common = require ( '../common' ) ;
33const assert = require ( 'assert' ) ;
44
5+ const cjs_module_lexer = require ( '../../deps/cjs-module-lexer/package.json' ) ;
6+
57const expected_keys = [
68 'ares' ,
79 'brotli' ,
@@ -13,6 +15,8 @@ const expected_keys = [
1315 'nghttp2' ,
1416 'napi' ,
1517 'llhttp' ,
18+ 'cjs_module_lexer' ,
19+ 'base64' ,
1620] ;
1721
1822if ( common . hasCrypto ) {
@@ -50,6 +54,7 @@ assert.match(
5054 / ^ \d + \. \d + \. \d + (?: \. \d + ) ? - n o d e \. \d + (?: \( c a n d i d a t e \) ) ? $ /
5155) ;
5256assert . match ( process . versions . modules , / ^ \d + $ / ) ;
57+ assert . match ( process . versions . cjs_module_lexer , commonTemplate ) ;
5358
5459if ( common . hasCrypto ) {
5560 const versionRegex = common . hasOpenSSL3 ?
@@ -69,3 +74,6 @@ for (let i = 0; i < expected_keys.length; i++) {
6974
7075assert . strictEqual ( process . config . variables . napi_build_version ,
7176 process . versions . napi ) ;
77+
78+ const expectedCjsModuleLexerVersion = cjs_module_lexer . version ;
79+ assert . strictEqual ( process . versions . cjs_module_lexer , expectedCjsModuleLexerVersion ) ;
Original file line number Diff line number Diff line change @@ -45,3 +45,5 @@ echo ""
4545echo " $ git add -A deps/base64/base64"
4646echo " $ git commit -m \" deps: update base64 to $BASE64_VERSION \" "
4747echo " "
48+
49+ echo " #define BASE64_VERSION \" $BASE64_VERSION \" // NOLINT(build/header_guard)" > " $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 || exit
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 \" // NOLINT(build/header_guard)" > " $ROOT /src/cjs_module_lexer_version.h"
19+ }
You can’t perform that action at this time.
0 commit comments