File tree Expand file tree Collapse file tree 5 files changed +30
-0
lines changed Expand file tree Collapse file tree 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 88#include " uv.h"
99#include " v8.h"
1010#include " zlib.h"
11+ #include " cjs_module_lexer_version.h"
1112
1213#if HAVE_OPENSSL
1314#include < openssl/opensslv.h>
@@ -89,6 +90,7 @@ Metadata::Versions::Versions() {
8990 std::to_string ((BrotliEncoderVersion () & 0xFFF000 ) >> 12 ) +
9091 " ." +
9192 std::to_string (BrotliEncoderVersion () & 0xFFF );
93+ cjs_module_lexer_version = CJS_MODULE_LEXER_VERSION;
9294
9395#if HAVE_OPENSSL
9496 openssl = GetOpenSSLVersion ();
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ namespace node {
3838 V (nghttp2) \
3939 V (napi) \
4040 V (llhttp) \
41+ V (cjs_module_lexer_version) \
4142
4243#if HAVE_OPENSSL
4344#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_version = require ( '../../deps/cjs-module-lexer/package.json' ) ;
6+
57const expected_keys = [
68 'ares' ,
79 'brotli' ,
@@ -13,6 +15,7 @@ const expected_keys = [
1315 'nghttp2' ,
1416 'napi' ,
1517 'llhttp' ,
18+ 'cjs_module_lexer_version'
1619] ;
1720
1821if ( common . hasCrypto ) {
@@ -50,6 +53,7 @@ assert.match(
5053 / ^ \d + \. \d + \. \d + (?: \. \d + ) ? - n o d e \. \d + (?: \( c a n d i d a t e \) ) ? $ /
5154) ;
5255assert . match ( process . versions . modules , / ^ \d + $ / ) ;
56+ assert . match ( process . versions . cjs_module_lexer_version , commonTemplate ) ;
5357
5458if ( common . hasCrypto ) {
5559 const versionRegex = common . hasOpenSSL3 ?
@@ -69,3 +73,6 @@ for (let i = 0; i < expected_keys.length; i++) {
6973
7074assert . strictEqual ( process . config . variables . napi_build_version ,
7175 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