-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
- 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); | ||
} |