@@ -125,8 +125,9 @@ const serverWithWebEntryPoints = [
125125
126126function getNodeVersion ( ) {
127127 const yarnrc = fs . readFileSync ( path . join ( REPO_ROOT , 'remote' , '.yarnrc' ) , 'utf8' ) ;
128- const target = / ^ t a r g e t " ( .* ) " $ / m. exec ( yarnrc ) [ 1 ] ;
129- return target ;
128+ const nodeVersion = / ^ t a r g e t " ( .* ) " $ / m. exec ( yarnrc ) [ 1 ] ;
129+ const internalNodeVersion = / ^ m s _ b u i l d _ i d " ( .* ) " $ / m. exec ( yarnrc ) [ 1 ] ;
130+ return { nodeVersion, internalNodeVersion } ;
130131}
131132
132133function getNodeChecksum ( nodeVersion , platform , arch ) {
@@ -156,7 +157,7 @@ function getNodeChecksum(nodeVersion, platform, arch) {
156157 return undefined ;
157158}
158159
159- const nodeVersion = getNodeVersion ( ) ;
160+ const { nodeVersion, internalNodeVersion } = getNodeVersion ( ) ;
160161
161162BUILD_TARGETS . forEach ( ( { platform, arch } ) => {
162163 gulp . task ( task . define ( `node-${ platform } -${ arch } ` , ( ) => {
@@ -193,7 +194,7 @@ function nodejs(platform, arch) {
193194 arch = 'x64' ;
194195 }
195196
196- log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from ${ product . nodejs . repository } ...` ) ;
197+ log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from ${ product . nodejsRepository } ...` ) ;
197198
198199 const checksumSha256 = getNodeChecksum ( nodeVersion , platform , arch ) ;
199200
@@ -205,14 +206,14 @@ function nodejs(platform, arch) {
205206
206207 switch ( platform ) {
207208 case 'win32' :
208- return ( product . nodejs . repository !== 'https://nodejs.org' ?
209- fetchGithub ( product . nodejs . repository , { version : product . nodejs . version , name : `win-${ arch } -node.exe` , checksumSha256 } ) :
209+ return ( product . nodejsRepository !== 'https://nodejs.org' ?
210+ fetchGithub ( product . nodejsRepository , { version : ` ${ nodeVersion } - ${ internalNodeVersion } ` , name : `win-${ arch } -node.exe` , checksumSha256 } ) :
210211 fetchUrls ( `/dist/v${ nodeVersion } /win-${ arch } /node.exe` , { base : 'https://nodejs.org' , checksumSha256 } ) )
211212 . pipe ( rename ( 'node.exe' ) ) ;
212213 case 'darwin' :
213214 case 'linux' :
214- return ( product . nodejs . repository !== 'https://nodejs.org' ?
215- fetchGithub ( product . nodejs . repository , { version : product . nodejs . version , name : `node-v${ nodeVersion } -${ platform } -${ arch } .tar.gz` , checksumSha256 } ) :
215+ return ( product . nodejsRepository !== 'https://nodejs.org' ?
216+ fetchGithub ( product . nodejsRepository , { version : ` ${ nodeVersion } - ${ internalNodeVersion } ` , name : `node-v${ nodeVersion } -${ platform } -${ arch } .tar.gz` , checksumSha256 } ) :
216217 fetchUrls ( `/dist/v${ nodeVersion } /node-v${ nodeVersion } -${ platform } -${ arch } .tar.gz` , { base : 'https://nodejs.org' , checksumSha256 } )
217218 ) . pipe ( flatmap ( stream => stream . pipe ( gunzip ( ) ) . pipe ( untar ( ) ) ) )
218219 . pipe ( filter ( '**/node' ) )
0 commit comments