Socket
Socket
Sign inDemoInstall

dependents-editor-backend

Package Overview
Dependencies
109
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.15.1 to 1.16.0

lib/debug.js

3

bin/cli.js

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

.option('--jump-to-definition', 'find the file to jump to based on the clicked element of a module')
.option('--click-position <value>', 'jump to definition location of the click: row,col')
.option('--find-dependents', 'get the dependents of the current file')

@@ -26,0 +29,0 @@ .option('--find-drivers', 'get the driver scripts relevant to current file')

var Config = require('./Config');
var getPath = require('./getPath');
var mixpanel = require('./mixpanel');
var getClickedImport = require('./getClickedImport');
var mixpanel = require('./mixpanel');
var jumpToDefinition = require('./jumpToDefinition');
var cabinet = require('filing-cabinet');

@@ -15,3 +15,3 @@ var findDependents = require('dependents');

var path = require('path');
var debug = require('debug')('backend');
var debug = require('./debug');
var isPlainObject = require('is-plain-object');

@@ -77,2 +77,23 @@ var timer = require('node-tictoc');

} else if (program.jumpToDefinition) {
debug('performing a jump to definition');
if (!program.clickPosition) {
throw new Error('a clickPosition must be provided');
}
debug('given click position: ', program.clickPosition);
options.clickPosition = program.clickPosition;
try {
var result = jumpToDefinition(options);
debug('jumpToDefinition result: ' + result);
deferred.resolve(result);
} catch (e) {
deferred.reject(e);
debug('jumpToDefinition error: ', e);
}
mixpanel.track('Run_JumpToDefinition');
} else if (program.findDependents) {

@@ -79,0 +100,0 @@ debug('finding the dependents of the given file: ' + options.filename);

9

package.json
{
"name": "dependents-editor-backend",
"version": "1.15.1",
"version": "1.16.0",
"description": "The brains behind Dependents editor plugins",
"main": "lib/cli.js",
"scripts": {
"test": "jscs lib test/lib test/features bin && jshint && ./node_modules/.bin/mocha --compilers js:babel/register 'test/lib/**/*.js' 'test/features/**/*.js'",
"lint": "jscs lib test/lib test/features bin && jshint",
"tests": "mocha --compilers js:babel/register 'test/lib/**/*.js' 'test/features/**/*.js'",
"tests-watch": "mocha --watch --compilers js:babel/register 'test/lib/**/*.js' 'test/features/**/*.js'",
"test": "npm run lint && npm run tests",
"debug-test": "DEBUG=*,-mocha:*,-babel,-parse npm test"

@@ -37,2 +40,3 @@ },

"mixpanel": "~0.4.0",
"node-source-walk": "^3.2.0",
"node-tictoc": "~1.3.0",

@@ -51,2 +55,3 @@ "object-assign": "~4.1.0",

"mocha": "~2.2.5",
"mock-fs": "^3.11.0",
"os-tmpdir": "~1.0.1",

@@ -53,0 +58,0 @@ "rewire": "~2.5.1",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc