lint: src/node/utils/NodeVersion.js
parent
b11ba23208
commit
af8ea6b45f
|
@ -1,3 +1,4 @@
|
|||
'use strict';
|
||||
/**
|
||||
* Checks related to Node runtime version
|
||||
*/
|
||||
|
@ -25,7 +26,7 @@ const semver = require('semver');
|
|||
*
|
||||
* @param {String} minNodeVersion Minimum required Node version
|
||||
*/
|
||||
exports.enforceMinNodeVersion = function (minNodeVersion) {
|
||||
exports.enforceMinNodeVersion = (minNodeVersion) => {
|
||||
const currentNodeVersion = process.version;
|
||||
|
||||
// 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
|
||||
*
|
||||
* @param {String} lowestNonDeprecatedNodeVersion all Node version less than this one are deprecated
|
||||
* @param {Function} epRemovalVersion Etherpad version that will remove support for deprecated Node releases
|
||||
* @param {String} lowestNonDeprecatedNodeVersion all Node version less than this one are
|
||||
* 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;
|
||||
|
||||
if (semver.lt(currentNodeVersion, lowestNonDeprecatedNodeVersion)) {
|
||||
|
|
Loading…
Reference in New Issue