New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gobble-cli

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gobble-cli - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

lib/utils/getSyntaxErrorBlock.js

52

lib/utils/logger.js

@@ -7,5 +7,7 @@ /*global console */

ansiRegex = require( 'ansi-regex' ),
sorcery = require( 'sorcery' ),
frames = require( './frames' ),
summariseChanges = require( './summariseChanges' ),
tryInstallPlugin = require( './tryInstallPlugin' ),
getSyntaxErrorBlock = require( './getSyntaxErrorBlock' ),
messages = '',

@@ -158,3 +160,3 @@ logger,

console.log( GOBBLE_INFO + 'could not load ' + plugin + ' plugin. Have you installed it? ' + chalk.cyan( 'npm\u00A0install\u00A0--save-dev\u00A0gobble-' + plugin ) );
info( 'could not load ' + plugin + ' plugin. Have you installed it? ' + chalk.cyan( 'npm\u00A0install\u00A0--save-dev\u00A0gobble-' + plugin ) );

@@ -167,3 +169,3 @@ tryInstallPlugin( plugin, function ( err ) {

console.log( GOBBLE_INFO + 'successfully installed ' + plugin + ' plugin' );
info( GOBBLE_INFO + 'successfully installed ' + plugin + ' plugin' );
// TODO how to restart on install?

@@ -182,6 +184,6 @@ // restart();

console.log( chalk.red( '>>>' ) );
console.log( ( err.original.message || err.original ).trim() );
console.log( chalk.grey( err.original.stack ) );
console.log( chalk.red( '<<<' ) );
console.error( chalk.red( '>>>' ) );
console.error( ( err.original.message || err.original ).trim() );
console.error( chalk.grey( err.original.stack ) );
console.error( chalk.red( '<<<' ) );

@@ -192,8 +194,38 @@ return true; // fatal

TRANSFORMATION_FAILED: function ( err ) {
var chain, loc;
error( err.id + ' transformation failed\n' );
console.log( chalk.red( '>>>' ) );
console.log( ( err.original.message || err.original ).trim() );
console.log( chalk.grey( err.stack ) );
console.log( chalk.red( '<<<' ) );
console.error( chalk.red( '>>>' ) );
if ( err.file ) {
console.error( chalk.grey( '===' ) );
console.error( err.file );
if ( err.line ) {
console.error( chalk.grey( '---' ) );
console.error( getSyntaxErrorBlock( err.file, err.line, err.column ) );
try {
chain = sorcery.loadSync( err.file );
loc = chain.trace( err.line, err.column );
if ( loc && loc.source !== err.file ) {
console.error( chalk.grey( '===' ) );
console.error( 'original error in ' + loc.source + ' (best guess)' );
console.error( chalk.grey( '---' ) );
console.error( getSyntaxErrorBlock( loc.source, loc.line, loc.column ) );
}
} catch ( err ) {
// do nothing - this is best effort only
}
}
console.error( chalk.grey( '===' ) );
}
console.error( ( err.original.message || err.original ).trim() );
console.error( chalk.grey( err.stack ) );
console.error( chalk.red( '<<<' ) );
}

@@ -200,0 +232,0 @@ };

2

package.json
{
"name": "gobble-cli",
"description": "Command line interface for gobble",
"version": "0.3.0",
"version": "0.3.1",
"author": "Rich Harris",

@@ -6,0 +6,0 @@ "license": "MIT",

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