How to use the please-upgrade-node function in please-upgrade-node

To help you get started, we’ve selected a few please-upgrade-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dherault / serverless-offline / src / checkEngine.js View on Github external
// NOTE: important, don't use any new javascript language features in this file!
// (other than es6 modules, which are transpiled)

import pleaseUpgradeNode from 'please-upgrade-node'
import pkg from '../package.json'

const currentNodeVersion = process.versions.node
const requiredNodeVersion = pkg.engines.node.replace('>=', '')

pleaseUpgradeNode(pkg, {
  message: function message() {
    return (
      // eslint-disable-next-line prefer-template
      'serverless-offline requires node.js version ' +
      requiredNodeVersion +
      ' or higher, but found version ' +
      currentNodeVersion +
      '. Please upgrade!'
    )
  },
})
github slackapi / bolt / src / index.ts View on Github external
const packageJson = require('../package.json'); // tslint:disable-line:no-require-imports no-var-requires
import pleaseUpgradeNode from 'please-upgrade-node';

pleaseUpgradeNode(packageJson);

export {
  default as App,
  AppOptions,
  Authorize,
  AuthorizeSourceData,
  AuthorizeResult,
  AuthorizationError,
  ActionConstraints,
  LogLevel,
  Logger,
} from './App';

export { ErrorCode } from './errors';

export {

please-upgrade-node

Displays a beginner-friendly message telling your user to upgrade their version of Node

MIT
Latest version published 5 years ago

Package Health Score

70 / 100
Full package analysis

Popular please-upgrade-node functions