Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
analyze-deps
Advanced tools
Readme
Compare dependencies in package.json to the latest available versions.
npm install analyze-deps --save
const analyzeDeps = require('analyze-deps');
const packageJson = {
name: 'analyze-deps',
license: 'MIT',
dependencies: {
'lodash.mapvalues': "^4.6.0",
'package-json': "^1.2.0",
'promise-all': "^1.0.0",
'semver': "^5.2.0"
},
devDependencies: {
'eslint': "^3.7.0"
}
};
analyzeDeps(packageJson).then(analysis => console.log(analysis));
/*
{
dependencies: {
'lodash.mapvalues': {
status: 'latest'
},
'package-json': {
status: 'not-latest',
current: '^1.2.0',
latest: '2.4.0',
latestRange: '^2.4.0',
diff: 'major'
},
'promise-all': {
status: 'latest'
},
semver: {
status: 'not-latest',
current: '^5.2.0',
latest: '5.3.0',
latestRange: '^5.3.0',
diff: 'minor'
}
},
devDependencies: {
eslint: {
status: 'not-latest',
current: '^3.7.0',
latest: '3.7.1',
latestRange: '^3.7.1',
diff: 'patch'
}
}
}
*/
This library analyzes the provided package.json
, and returns the packages which version range can be updated to include the latest version only.
Currently, only dependencies
and devDependencies
are analyzed (feel free to submit a Pull Request if you need more than that).
You can pass a second argument if you don't want to analyze everything. For example, to avoid analyzing dependencies
, do:
analyzeDeps(packageJson, { dependencies: false }).then(...)
FAQs
Compare dependencies in package.json to the latest available versions.
The npm package analyze-deps receives a total of 413 weekly downloads. As such, analyze-deps popularity was classified as not popular.
We found that analyze-deps demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.