@@ -125,8 +125,9 @@ const serverWithWebEntryPoints = [
125
125
126
126
function getNodeVersion ( ) {
127
127
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 } ;
130
131
}
131
132
132
133
function getNodeChecksum ( nodeVersion , platform , arch ) {
@@ -156,7 +157,7 @@ function getNodeChecksum(nodeVersion, platform, arch) {
156
157
return undefined ;
157
158
}
158
159
159
- const nodeVersion = getNodeVersion ( ) ;
160
+ const { nodeVersion, internalNodeVersion } = getNodeVersion ( ) ;
160
161
161
162
BUILD_TARGETS . forEach ( ( { platform, arch } ) => {
162
163
gulp . task ( task . define ( `node-${ platform } -${ arch } ` , ( ) => {
@@ -193,7 +194,7 @@ function nodejs(platform, arch) {
193
194
arch = 'x64' ;
194
195
}
195
196
196
- log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from ${ product . nodejs . repository } ...` ) ;
197
+ log ( `Downloading node.js ${ nodeVersion } ${ platform } ${ arch } from ${ product . nodejsRepository } ...` ) ;
197
198
198
199
const checksumSha256 = getNodeChecksum ( nodeVersion , platform , arch ) ;
199
200
@@ -205,14 +206,14 @@ function nodejs(platform, arch) {
205
206
206
207
switch ( platform ) {
207
208
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 } ) :
210
211
fetchUrls ( `/dist/v${ nodeVersion } /win-${ arch } /node.exe` , { base : 'https://nodejs.org' , checksumSha256 } ) )
211
212
. pipe ( rename ( 'node.exe' ) ) ;
212
213
case 'darwin' :
213
214
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 } ) :
216
217
fetchUrls ( `/dist/v${ nodeVersion } /node-v${ nodeVersion } -${ platform } -${ arch } .tar.gz` , { base : 'https://nodejs.org' , checksumSha256 } )
217
218
) . pipe ( flatmap ( stream => stream . pipe ( gunzip ( ) ) . pipe ( untar ( ) ) ) )
218
219
. pipe ( filter ( '**/node' ) )
0 commit comments