-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: add 'dynamic' process.release.lts property
This makes the process.release.lts property configurable by a constant. This ref is the original PR to v6.x. Refs: #3212 Conflicts: doc/api/process.md PR-URL: #16656 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
require('../common'); | ||
const assert = require('assert'); | ||
const versionParts = process.versions.node.split('.'); | ||
|
||
assert.equal(process.release.name, 'node'); | ||
|
||
// it's expected that future LTS release lines will have additional | ||
// branches in here | ||
if (versionParts[0] === '4' && versionParts[1] >= 2) { | ||
assert.equal(process.release.lts, 'Argon'); | ||
} else if (versionParts[0] === '6' && versionParts[1] >= 9) { | ||
assert.equal(process.release.lts, 'Boron'); | ||
} else { | ||
assert.strictEqual(process.release.lts, undefined); | ||
} |