warns users about incompatible Node.js versions per engines in package.json
type EnginesNotifierOptions = {
pkg: PackageJson
}
-
see upstream documentation for PackageJson
-
if there is engine trouble, outputs a message using
console.error()
, and returns anError
-
otherwise, no output, and returns
null
const { enginesNotify } = require('package-engines-notifier')
const pkg = require('./package.json')
if (enginesNotify({ pkg })) {
// uh-oh, the user's engines don't match, stop right here
return
}
// TODO: what your script does when engines match
npm install --global flow-typed
npm install
flow-typed install
npm test