From 3ad703571f44c8b702ed889847d5d3bdd7f25c45 Mon Sep 17 00:00:00 2001 From: Dale Sande Date: Fri, 24 Sep 2021 15:56:25 -0700 Subject: [PATCH] fix: address correct versions of node for verification #217 --- .github/workflows/testPublish.yml | 2 +- template/.github/workflows/testPublish.yml | 2 +- util/verifyNodeVersion.js | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testPublish.yml b/.github/workflows/testPublish.yml index 1072e528..4887e897 100644 --- a/.github/workflows/testPublish.yml +++ b/.github/workflows/testPublish.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 15.x] + node-version: [14.x, 15.x, 16.x] steps: - uses: actions/checkout@v2 diff --git a/template/.github/workflows/testPublish.yml b/template/.github/workflows/testPublish.yml index ca149560..5fd8241e 100644 --- a/template/.github/workflows/testPublish.yml +++ b/template/.github/workflows/testPublish.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [14.x, 15.x, 16.x] steps: - uses: actions/checkout@v2 diff --git a/util/verifyNodeVersion.js b/util/verifyNodeVersion.js index baa52af3..571fceb8 100644 --- a/util/verifyNodeVersion.js +++ b/util/verifyNodeVersion.js @@ -2,6 +2,9 @@ 'use strict'; +// Check min Node Version +const minNodeVersion = [14, 17, 0]; + // Throw an error on unhandled rejections (exit non-zero) process.on('unhandledRejection', err => { throw err; @@ -29,9 +32,7 @@ function verifySemver(minimum, current) { return majorValid && minorValid && patchValid; } -// Check Node Version (min: 12.0.0) const currentNodeVersion = process.versions.node; -const minNodeVersion = [12, 0, 0]; const nodeVersionIsValid = verifySemver( minNodeVersion, currentNodeVersion.split('.')