Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

check-deps-versions

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-deps-versions - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

22

index.js

@@ -0,4 +1,5 @@

const path = require('path');
const chalk = require('chalk');
const findNearestFile = require('find-nearest-file');
const packageJsonPath = findNearestFile('package.json');
const minimist = require('minimist');
const fileExists = require('file-exists');

@@ -14,2 +15,19 @@ const error = message => {

const specifiedPackageJsonLocation = minimist(process.argv).p;
let packageJsonPath;
if (specifiedPackageJsonLocation) {
packageJsonPath = path.resolve(specifiedPackageJsonLocation, 'package.json');
} else {
const findNearestFile = require('find-nearest-file');
packageJsonPath = findNearestFile('package.json');
}
if (!fileExists(packageJsonPath)) {
errorAndExit(`${packageJsonPath} doesn't exist`);
}
console.log(chalk.magenta(`Analyzing ${path.relative(__dirname, packageJsonPath)}`)); // eslint-disable-line no-console
if (packageJsonPath === null) {

@@ -16,0 +34,0 @@ errorAndExit('Couldn\'t find package.json');

4

package.json
{
"name": "check-deps-versions",
"version": "0.1.1",
"version": "0.2.0",
"description": "Check if dependencies specified in package.json are up to date with the latest available versions.",

@@ -21,4 +21,6 @@ "repository": {

"chalk": "^1.1.3",
"file-exists": "^2.0.0",
"find-nearest-file": "^1.0.0",
"lodash.sortby": "^4.7.0",
"minimist": "^1.2.0",
"package-json": "^2.4.0",

@@ -25,0 +27,0 @@ "semver": "^5.3.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc