Skip to content

Psychopoulet/check-node-engine

Repository files navigation

check-node-engine

Compare the required node engine to the last older LTS node version.

Lines of Code Issues Pull requests

Reliability Rating Security Rating Maintainability Rating Vulnerabilities Bugs

Known Vulnerabilities

Features

  • Get the older NodeJS current LTS
  • Compare this version to the current minimal engine node

Doc

Methods

  • (source?: string | tPackageType) => Promise<void> compare node versions

Command line options

  • --get-lts => only get the older current official LTS version of NodeJS
  • --package-file <package path> => specify an optional package path

Examples

Command line

$ cd ./myProject/ && npx check-node-engine
$ cd ./myProject/ && npx check-node-engine --get-lts
$ cd ./myProject/ && npx check-node-engine --package-file "./package.json"

Native

const checker = require("check-node-engine");

checker().then(() => {
  console.log("ok");
}).catch((err) => {
  console.error(err);
});

checker("./package.json").then(() => {
  console.log("ok");
}).catch((err) => {
  console.error(err);
});

Typescript

import checker = require("check-node-engine");

checker().then(() => {
  console.log("ok");
}).catch((err) => {
  console.error(err);
});

checker("./package.json").then(() => {
  console.log("ok");
}).catch((err) => {
  console.error(err);
});

Tests

$ npm run tests

License

ISC

About

Compare the required node engine to the last older LTS node version.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors