Skip to content

Commit

Permalink
feat: enforce min node version
Browse files Browse the repository at this point in the history
  • Loading branch information
gabidobo committed Apr 26, 2023
1 parent 6a0592d commit 7560c64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cli/cmds/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const path = require('path');
const {
files: {loadConfig},
} = require('@sandworm/utils');
const semver = require('semver');

const {getReport} = require('../..');
const onProgress = require('../progress');
const {getIssueCounts, failIfRequested} = require('../utils');
Expand Down Expand Up @@ -133,6 +135,12 @@ exports.handler = async (argv) => {
const appPath = argv.path || process.cwd();

try {
if (semver.lt(process.versions.node, '14.19.0')) {
throw new UsageError(
`Sandworm requires Node >=14.19.0 (currently on ${process.versions.node})`,
);
}

let isOutdated = false;

(async () => {
Expand Down

0 comments on commit 7560c64

Please sign in to comment.