Skip to content

Commit

Permalink
fix: address correct versions of node for verification #217
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed Sep 25, 2021
1 parent ddaa7a1 commit 3ad7035
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion template/.github/workflows/testPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions util/verifyNodeVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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('.')
Expand Down

0 comments on commit 3ad7035

Please sign in to comment.