aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/lib/verifyNodeVersion.js
blob: 80d57ed6eed1f955cf0b93a8e8e4968b74954813 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
"use strict";

const { version } = require( "process" );
const nodeV16OrNewer = !/^v1[0-5]\./.test( version );

module.exports = function verifyNodeVersion() {
	if ( !nodeV16OrNewer ) {
		console.log( "Old Node.js detected, task skipped..." );
		return false;
	}
	return true;
};