Skip to content

Commit

Permalink
chore: reintroduce support for iojs file naming for releases >= 1 && < 4
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Jun 19, 2019
1 parent 182e846 commit dc4278d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/process-release.js
Expand Up @@ -17,6 +17,7 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) {
, versionSemver = semver.parse(version)
, overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
, isDefaultVersion
, isNamedForLegacyIojs
, name
, distBaseUrl
, baseUrl
Expand All @@ -41,11 +42,17 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) {

if (defaultRelease) {
// v3 onward, has process.release
name = defaultRelease.name
name = defaultRelease.name.replace(/io\.js/, 'iojs') // remove the '.' for directory naming purposes
} else {
// old node or alternative --target=
// semver.satisfies() doesn't like prerelease tags so test major directly
name = 'node'
isNamedForLegacyIojs = versionSemver.major >= 1 && versionSemver.major < 4
// isNamedForLegacyIojs is required to support Electron < 4 (in particular Electron 3)
// as previously this logic was used to ensure "iojs" was used to download iojs releases
// and "node" for node releases. Unfortuantely the logic was broad enough that electron@3
// published release assets as "iojs" so that the node-gyp logic worked. Once Electron@3 has
// been EOL for a while (late 2019) we should remove this hack.
name = isNamedForLegacyIojs ? 'iojs' : 'node'
}

// check for the nvm.sh standard mirror env variables
Expand Down

0 comments on commit dc4278d

Please sign in to comment.