lint: src/node/utils/NodeVersion.js

pull/4667/head
John McLear 2021-01-21 21:06:52 +00:00 committed by Richard Hansen
parent b11ba23208
commit af8ea6b45f
1 changed files with 7 additions and 4 deletions

View File

@ -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)) {