max-engines-versions

1.0.1 • Public • Published

max-engines-versions

Find the maximum version for each engine (specified in package.json) among all dependencies. ⚠️ It only works if npm install or yarn install have been successfully run before.

Installation

npm install -save-dev max-engines-versions

or

yarm add --dev max-engines-versions

Usage

It looks for all package.json files in current working directories node_modules folder and parses the matched files's .engines property.

cli

npx max-engines-versions

Node

const maxEnginesVersions = require('max-engines-versions')

async function f() {
    const [versions, reasons] = await main()
    // 'versions' is the object you're looking for, e.g.
    //  {node: '10.0.0'}
    // 'reasons' is an object with the package names for each type of engine,
    // e.g. {node: 'this-package-requires-node-10'}
}

Example

Clone this repo, run npm install and then npm test.

Readme

Keywords

none

Package Sidebar

Install

npm i max-engines-versions

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

5.28 kB

Total Files

6

Last publish

Collaborators

  • jneuendorf