diff options
Diffstat (limited to 'node_modules/node-gyp/lib/process-release.js')
-rw-r--r-- | node_modules/node-gyp/lib/process-release.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/node_modules/node-gyp/lib/process-release.js b/node_modules/node-gyp/lib/process-release.js index 0acab061b..95b55e442 100644 --- a/node_modules/node-gyp/lib/process-release.js +++ b/node_modules/node-gyp/lib/process-release.js @@ -1,3 +1,5 @@ +/* eslint-disable node/no-deprecated-api */ + 'use strict' const semver = require('semver') @@ -7,7 +9,7 @@ const log = require('npmlog') // versions where -headers.tar.gz started shipping const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42' -const bitsre = /\/win-(x86|x64)\// +const bitsre = /\/win-(x86|x64|arm64)\// const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should // have been "x86" @@ -25,6 +27,7 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { var baseUrl var libUrl32 var libUrl64 + var libUrlArm64 var tarballUrl var canGetHeaders @@ -79,6 +82,7 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { baseUrl = url.resolve(defaultRelease.headersUrl, './') libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major) libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major) + libUrlArm64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'arm64', versionSemver.major) tarballUrl = defaultRelease.headersUrl } else { // older versions without process.release are captured here and we have to make @@ -87,6 +91,7 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { baseUrl = distBaseUrl libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major) libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major) + libUrlArm64 = resolveLibUrl(name, baseUrl, 'arm64', versionSemver.major) // making the bold assumption that anything with a version number >3.0.0 will // have a *-headers.tar.gz file in its dist location, even some frankenstein @@ -110,6 +115,10 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) { x64: { libUrl: libUrl64, libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path)) + }, + arm64: { + libUrl: libUrlArm64, + libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrlArm64).path)) } } } @@ -128,7 +137,7 @@ function resolveLibUrl (name, defaultUrl, arch, versionMajor) { return url.resolve(base, 'win-' + arch + '/' + name + '.lib') } // prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/ - return url.resolve(base, (arch === 'x64' ? 'x64/' : '') + name + '.lib') + return url.resolve(base, (arch === 'x86' ? '' : arch + '/') + name + '.lib') } // else we have a proper url to a .lib, just make sure it's the right arch |