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

dependents-editor-backend

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependents-editor-backend - npm Package Compare versions

Comparing version 1.4.1 to 1.5.0

9

bin/cli.js

@@ -5,5 +5,7 @@ #!/usr/bin/env node

var program = require('commander');
var cli = require('../lib/cli');
var program = require('commander');
var isPlainObject = require('is-plain-object');
program

@@ -35,2 +37,3 @@ .version(require('../package.json').version)

cli(program)
// TODO: consider moving into a cli.print method for testing
.then(function(result) {

@@ -42,2 +45,6 @@ if (!(result instanceof Array)) {

result.forEach(function(r) {
if (isPlainObject(r)) {
r = JSON.stringify(r);
}
console.log(r);

@@ -44,0 +51,0 @@ });

31

lib/cli.js

@@ -7,2 +7,3 @@ var Config = require('./Config');

var callers = require('callers');
var tree = require('dependency-tree');

@@ -45,4 +46,11 @@ var q = require('q');

debug('performing a lookup');
var result = lookup(options);
var result = cabinet({
partial: options.target,
filename: options.filename,
directory: options.directory,
config: options.config,
webpackConfig: options.webpackConfig
});
if (!fileExists(result)) {

@@ -96,2 +104,13 @@ var fileDir = path.dirname(result);

callers(options);
} else if (program.getTree) {
options.root = options.directory;
var results = tree(options);
try {
deferred.resolve(results);
} catch (e) {
deferred.reject(e.message);
}
}

@@ -101,11 +120,1 @@

};
function lookup(options) {
return cabinet({
partial: options.target,
filename: options.filename,
directory: options.directory,
config: options.config,
webpackConfig: options.webpackConfig
});
};

@@ -59,2 +59,6 @@ var fs = require('fs');

if (!this.directory) {
throw new Error('Either a root or styles_root must be defined in your .deprc file');
}
this.exclude = config.exclude || [];

@@ -61,0 +65,0 @@

{
"name": "dependents-editor-backend",
"version": "1.4.1",
"version": "1.5.0",
"description": "The brains behind Dependents editor plugins",

@@ -39,2 +39,3 @@ "main": "lib/cli.js",

"debug": "~2.2.0",
"dependency-tree": "~5.1.0",
"dependents": "~3.1.1",

@@ -44,2 +45,3 @@ "file-exists": "~1.0.0",

"find": "~0.2.4",
"is-plain-object": "~2.0.1",
"object-assign": "~4.1.0",

@@ -46,0 +48,0 @@ "q": "~1.4.1"

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