-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified the result of processRelease() to return uniform names `libUrl`, `libPath` for Windows in objects named as target platforms (`ia32` and `x64`) This allows to loop over the target platforms in downloadNodeLib() and to use the universal names instead of two almost identical code parts with `libUrl32`, `libPath32` and `libUrl64`, `libPath64` names. PR-URL: #965 Reviewed-By: Rod Vagg <[email protected]>
- Loading branch information
Showing
3 changed files
with
67 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,8 @@ test('test process release - process.version = 0.8.20', function (t) { | |
tarballUrl: 'https://nodejs.org/dist/v0.8.20/node-v0.8.20.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v0.8.20/SHASUMS256.txt', | ||
versionDir: '0.8.20', | ||
libUrl32: 'https://nodejs.org/dist/v0.8.20/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v0.8.20/x64/node.lib', | ||
libPath32: 'node.lib', | ||
libPath64: 'x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v0.8.20/node.lib', libPath: 'node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v0.8.20/x64/node.lib', libPath: 'x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -38,10 +36,8 @@ test('test process release - process.version = 0.10.21', function (t) { | |
tarballUrl: 'https://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v0.10.21/SHASUMS256.txt', | ||
versionDir: '0.10.21', | ||
libUrl32: 'https://nodejs.org/dist/v0.10.21/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v0.10.21/x64/node.lib', | ||
libPath32: 'node.lib', | ||
libPath64: 'x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.21/node.lib', libPath: 'node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v0.10.21/x64/node.lib', libPath: 'x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -61,10 +57,8 @@ test('test process release - process.version = 0.12.9', function (t) { | |
tarballUrl: 'https://nodejs.org/dist/v0.12.9/node-v0.12.9.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v0.12.9/SHASUMS256.txt', | ||
versionDir: '0.12.9', | ||
libUrl32: 'https://nodejs.org/dist/v0.12.9/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v0.12.9/x64/node.lib', | ||
libPath32: 'node.lib', | ||
libPath64: 'x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v0.12.9/node.lib', libPath: 'node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v0.12.9/x64/node.lib', libPath: 'x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -84,10 +78,8 @@ test('test process release - process.version = 0.10.41', function (t) { | |
tarballUrl: 'https://nodejs.org/dist/v0.10.41/node-v0.10.41.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v0.10.41/SHASUMS256.txt', | ||
versionDir: '0.10.41', | ||
libUrl32: 'https://nodejs.org/dist/v0.10.41/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v0.10.41/x64/node.lib', | ||
libPath32: 'node.lib', | ||
libPath64: 'x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.41/node.lib', libPath: 'node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v0.10.41/x64/node.lib', libPath: 'x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -107,10 +99,8 @@ test('test process release - process.release ~ [email protected]', function (t) { | |
tarballUrl: 'https://nodejs.org/dist/v0.10.42/node-v0.10.42-headers.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v0.10.42/SHASUMS256.txt', | ||
versionDir: '0.10.42', | ||
libUrl32: 'https://nodejs.org/dist/v0.10.42/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v0.10.42/x64/node.lib', | ||
libPath32: 'node.lib', | ||
libPath64: 'x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.42/node.lib', libPath: 'node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v0.10.42/x64/node.lib', libPath: 'x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -130,10 +120,8 @@ test('test process release - process.release ~ [email protected]', function (t) { | |
tarballUrl: 'https://nodejs.org/dist/v0.12.10/node-v0.12.10-headers.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v0.12.10/SHASUMS256.txt', | ||
versionDir: '0.12.10', | ||
libUrl32: 'https://nodejs.org/dist/v0.12.10/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v0.12.10/x64/node.lib', | ||
libPath32: 'node.lib', | ||
libPath64: 'x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v0.12.10/node.lib', libPath: 'node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v0.12.10/x64/node.lib', libPath: 'x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -155,10 +143,8 @@ test('test process release - process.release ~ [email protected]', function (t) { | |
tarballUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v4.1.23/SHASUMS256.txt', | ||
versionDir: '4.1.23', | ||
libUrl32: 'https://nodejs.org/dist/v4.1.23/win-x86/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v4.1.23/win-x64/node.lib', | ||
libPath32: 'win-x86/node.lib', | ||
libPath64: 'win-x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -180,10 +166,8 @@ test('test process release - process.release ~ [email protected] / corp build', functi | |
tarballUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz', | ||
shasumsUrl: 'https://some.custom.location/SHASUMS256.txt', | ||
versionDir: '4.1.23', | ||
libUrl32: 'https://some.custom.location/win-x86/node.lib', | ||
libUrl64: 'https://some.custom.location/win-x64/node.lib', | ||
libPath32: 'win-x86/node.lib', | ||
libPath64: 'win-x64/node.lib' | ||
ia32: { libUrl: 'https://some.custom.location/win-x86/node.lib', libPath: 'win-x86/node.lib' }, | ||
x64: { libUrl: 'https://some.custom.location/win-x64/node.lib', libPath: 'win-x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -205,10 +189,8 @@ test('test process release - process.release ~ [email protected] --target=0.10.40', fu | |
tarballUrl: 'https://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/dist/v0.10.40/SHASUMS256.txt', | ||
versionDir: '0.10.40', | ||
libUrl32: 'https://nodejs.org/dist/v0.10.40/node.lib', | ||
libUrl64: 'https://nodejs.org/dist/v0.10.40/x64/node.lib', | ||
libPath32: 'node.lib', | ||
libPath64: 'x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.40/node.lib', libPath: 'node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/dist/v0.10.40/x64/node.lib', libPath: 'x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -230,10 +212,8 @@ test('test process release - process.release ~ [email protected] --dist-url=https://fo | |
tarballUrl: 'https://foo.bar/baz/v4.1.23/node-v4.1.23-headers.tar.gz', | ||
shasumsUrl: 'https://foo.bar/baz/v4.1.23/SHASUMS256.txt', | ||
versionDir: '4.1.23', | ||
libUrl32: 'https://foo.bar/baz/v4.1.23/win-x86/node.lib', | ||
libUrl64: 'https://foo.bar/baz/v4.1.23/win-x64/node.lib', | ||
libPath32: 'win-x86/node.lib', | ||
libPath64: 'win-x64/node.lib' | ||
ia32: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, | ||
x64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -255,10 +235,8 @@ test('test process release - process.release ~ [email protected]', function (t | |
tarballUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz', | ||
shasumsUrl: 'https://frankensteinjs.org/dist/v4.1.23/SHASUMS256.txt', | ||
versionDir: 'frankenstein-4.1.23', | ||
libUrl32: 'https://frankensteinjs.org/dist/v4.1.23/win-x86/frankenstein.lib', | ||
libUrl64: 'https://frankensteinjs.org/dist/v4.1.23/win-x64/frankenstein.lib', | ||
libPath32: 'win-x86/frankenstein.lib', | ||
libPath64: 'win-x64/frankenstein.lib' | ||
ia32: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' }, | ||
x64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -281,10 +259,8 @@ test('test process release - process.release ~ [email protected] --dist-url=ht | |
tarballUrl: 'http://foo.bar/baz/v4.1.23/frankenstein-v4.1.23-headers.tar.gz', | ||
shasumsUrl: 'http://foo.bar/baz/v4.1.23/SHASUMS256.txt', | ||
versionDir: 'frankenstein-4.1.23', | ||
libUrl32: 'http://foo.bar/baz/v4.1.23/win-x86/frankenstein.lib', | ||
libUrl64: 'http://foo.bar/baz/v4.1.23/win-x64/frankenstein.lib', | ||
libPath32: 'win-x86/frankenstein.lib', | ||
libPath64: 'win-x64/frankenstein.lib' | ||
ia32: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' }, | ||
x64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -306,10 +282,8 @@ test('test process release - process.release ~ [email protected]', function (t) { | |
tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', | ||
versionDir: '4.0.0-rc.4', | ||
libUrl32: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', | ||
libUrl64: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', | ||
libPath32: 'win-x86/node.lib', | ||
libPath64: 'win-x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -334,10 +308,8 @@ test('test process release - process.release ~ [email protected] passed as argv[0] | |
tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', | ||
versionDir: '4.0.0-rc.4', | ||
libUrl32: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', | ||
libUrl64: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', | ||
libPath32: 'win-x86/node.lib', | ||
libPath64: 'win-x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -362,10 +334,8 @@ test('test process release - process.release ~ [email protected] - bogus string pa | |
tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz', | ||
shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt', | ||
versionDir: '4.0.0-rc.4', | ||
libUrl32: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', | ||
libUrl64: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', | ||
libPath32: 'win-x86/node.lib', | ||
libPath64: 'win-x64/node.lib' | ||
ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' }, | ||
x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' }, | ||
}) | ||
}) | ||
|
||
|
@@ -389,10 +359,8 @@ test('test process release - NODEJS_ORG_MIRROR', function (t) { | |
tarballUrl: 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz', | ||
shasumsUrl: 'http://foo.bar/v4.1.23/SHASUMS256.txt', | ||
versionDir: '4.1.23', | ||
libUrl32: 'http://foo.bar/v4.1.23/win-x86/node.lib', | ||
libUrl64: 'http://foo.bar/v4.1.23/win-x64/node.lib', | ||
libPath32: 'win-x86/node.lib', | ||
libPath64: 'win-x64/node.lib' | ||
ia32: { libUrl: 'http://foo.bar/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' }, | ||
x64: { libUrl: 'http://foo.bar/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' }, | ||
}) | ||
|
||
delete process.env.NODEJS_ORG_MIRROR | ||
|