How to use the npm-install-checks.checkEngine function in npm-install-checks

To help you get started, we’ve selected a few npm-install-checks 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 graalvm / graaljs / deps / npm / lib / install / validate-args.js View on Github external
'use strict'
var validate = require('aproba')
var asyncMap = require('slide').asyncMap
var chain = require('slide').chain
var npmInstallChecks = require('npm-install-checks')
var iferr = require('iferr')
var checkEngine = npmInstallChecks.checkEngine
var checkPlatform = npmInstallChecks.checkPlatform
var npm = require('../npm.js')

module.exports = function (idealTree, args, next) {
  validate('OAF', arguments)
  var force = npm.config.get('force')

  asyncMap(args, function (pkg, done) {
    chain([
      [hasMinimumFields, pkg],
      [checkSelf, idealTree, pkg, force],
      [isInstallable, pkg]
    ], done)
  }, next)
}

npm-install-checks

Check the engines and platform fields in package.json

BSD-2-Clause
Latest version published 1 month ago

Package Health Score

92 / 100
Full package analysis

Similar packages