Returns the outdated packages of a package.json file.
npm install package-outdated
const readOutdated = require('package-outdated')
(async()=>{
console.log(await readOutdated());
//=> {foo: { current: '1.0.0', latest: '2.0.0' }, ...}
console.log(await readOutdated({ preservePrefix: true }));
//=> {foo: { current: '^1.0.0', latest: '2.0.0' }, ...}
})();
Returns the outdated packages of a package.json file.
Type: string
Default: process.cwd()
Current working directory.
Type: boolean
Default: false
Preserves the semver prefix(^*~)
of the current version.
- read-packages - Reads dependencies of a package.json file