lint: src/node/utils/NodeVersion.js
parent
b11ba23208
commit
af8ea6b45f
|
@ -1,3 +1,4 @@
|
||||||
|
'use strict';
|
||||||
/**
|
/**
|
||||||
* Checks related to Node runtime version
|
* Checks related to Node runtime version
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +26,7 @@ const semver = require('semver');
|
||||||
*
|
*
|
||||||
* @param {String} minNodeVersion Minimum required Node version
|
* @param {String} minNodeVersion Minimum required Node version
|
||||||
*/
|
*/
|
||||||
exports.enforceMinNodeVersion = function (minNodeVersion) {
|
exports.enforceMinNodeVersion = (minNodeVersion) => {
|
||||||
const currentNodeVersion = process.version;
|
const currentNodeVersion = process.version;
|
||||||
|
|
||||||
// we cannot use template literals, since we still do not know if we are
|
// we cannot use template literals, since we still do not know if we are
|
||||||
|
@ -41,10 +42,12 @@ exports.enforceMinNodeVersion = function (minNodeVersion) {
|
||||||
/**
|
/**
|
||||||
* Prints a warning if running on a supported but deprecated Node version
|
* Prints a warning if running on a supported but deprecated Node version
|
||||||
*
|
*
|
||||||
* @param {String} lowestNonDeprecatedNodeVersion all Node version less than this one are deprecated
|
* @param {String} lowestNonDeprecatedNodeVersion all Node version less than this one are
|
||||||
* @param {Function} epRemovalVersion Etherpad version that will remove support for deprecated Node releases
|
* deprecated
|
||||||
|
* @param {Function} epRemovalVersion Etherpad version that will remove support for deprecated
|
||||||
|
* Node releases
|
||||||
*/
|
*/
|
||||||
exports.checkDeprecationStatus = function (lowestNonDeprecatedNodeVersion, epRemovalVersion) {
|
exports.checkDeprecationStatus = (lowestNonDeprecatedNodeVersion, epRemovalVersion) => {
|
||||||
const currentNodeVersion = process.version;
|
const currentNodeVersion = process.version;
|
||||||
|
|
||||||
if (semver.lt(currentNodeVersion, lowestNonDeprecatedNodeVersion)) {
|
if (semver.lt(currentNodeVersion, lowestNonDeprecatedNodeVersion)) {
|
||||||
|
|
Loading…
Reference in New Issue