1 import chalk
from 'chalk'
2 import { satisfies
} from 'semver'
3 import packageJson
from './package.json' assert
{ type
: 'json' }
4 import { version
, exit
} from 'node:process'
7 * Check if the current node version match the required engines version.
9 export const checkNodeVersion
= () => {
10 const enginesNodeVersion
= packageJson
.engines
.node
11 if (satisfies(version
, enginesNodeVersion
) === false) {
14 `Required node version ${enginesNodeVersion} not satisfied with current version ${version}`
17 // eslint-disable-next-line n/no-process-exit