File tree Expand file tree Collapse file tree 7 files changed +38
-1
lines changed Expand file tree Collapse file tree 7 files changed +38
-1
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"
@@ -90,6 +92,8 @@ Metadata::Versions::Versions() {
9092 std::to_string ((BrotliEncoderVersion () & 0xFFF000 ) >> 12 ) +
9193 " ." +
9294 std::to_string (BrotliEncoderVersion () & 0xFFF );
95+ cjs_module_lexer = CJS_MODULE_LEXER_VERSION;
96+ base64 = BASE64_VERSION;
9397
9498 uvwasi = UVWASI_VERSION_STRING;
9599
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ namespace node {
3838 V (nghttp2) \
3939 V (napi) \
4040 V (llhttp) \
41- V (uvwasi)
41+ V (uvwasi) \
42+ V (cjs_module_lexer) \
43+ V (base64)
4244
4345#if HAVE_OPENSSL
4446#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' ,
@@ -14,6 +16,8 @@ const expected_keys = [
1416 'napi' ,
1517 'llhttp' ,
1618 'uvwasi' ,
19+ 'cjs_module_lexer' ,
20+ 'base64' ,
1721] ;
1822
1923if ( common . hasCrypto ) {
@@ -51,6 +55,7 @@ assert.match(
5155 / ^ \d + \. \d + \. \d + (?: \. \d + ) ? - n o d e \. \d + (?: \( c a n d i d a t e \) ) ? $ /
5256) ;
5357assert . match ( process . versions . modules , / ^ \d + $ / ) ;
58+ assert . match ( process . versions . cjs_module_lexer , commonTemplate ) ;
5459
5560if ( common . hasCrypto ) {
5661 const versionRegex = common . hasOpenSSL3 ?
@@ -70,3 +75,6 @@ for (let i = 0; i < expected_keys.length; i++) {
7075
7176assert . strictEqual ( process . config . variables . napi_build_version ,
7277 process . versions . napi ) ;
78+
79+ const expectedCjsModuleLexerVersion = cjs_module_lexer . version ;
80+ 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 that do not have their
5+ # own update scripts
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