UNPKG

@apistudio/apim-cli

Version:

CLI for API Management Products

12 lines (9 loc) 496 B
import {satisfies} from 'semver'; import {showWarning} from '../helpers/common/message-helper.js'; const SUPPORTED_VERSION = '^20.12.0'; export const validateNodeVersion = (processVersion: string) => { const isVersionSupported = satisfies(processVersion, SUPPORTED_VERSION); if (!isVersionSupported) { showWarning(`[WARNING]: Using unsupported node version - ${processVersion}. Supported node version is "${SUPPORTED_VERSION}". Some of the features may not be working as expected.`); } };