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

esperanto

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esperanto - npm Package Compare versions

Comparing version 0.3.11 to 0.3.12

15

lib/transform.js

@@ -152,3 +152,3 @@ var acorn = require('acorn');

// Special case - `export var foo = 'bar'`
if ( isVarDeclaration( node.declaration ) ) {
if ( name = getDeclarationName( node.declaration ) ) {
if ( options.defaultOnly ) {

@@ -158,4 +158,2 @@ throw new Error( 'A named export was used in defaultOnly mode' );

name = node.declaration.declarations[0].id.name;
declaration = value + '\n' + indent;

@@ -203,5 +201,10 @@ declaration += 'exports.' + name + ' = ' + name;

function isVarDeclaration ( node ) {
// TODO support let and class declarations, once Acorn supports them
return node.type === 'VariableDeclaration';
function getDeclarationName ( declaration ) {
if ( declaration.type === 'VariableDeclaration' ) {
return declaration.declarations[0].id.name;
}
if ( declaration.type === 'FunctionDeclaration' ) {
return declaration.id.name;
}
}

@@ -208,0 +211,0 @@

18

package.json
{
"name": "esperanto",
"description": "An easier way to convert ES6 modules to AMD and CommonJS",
"version": "0.3.11",
"version": "0.3.12",
"author": "Rich Harris",

@@ -11,14 +11,14 @@ "dependencies": {

"devDependencies": {
"promo": "~0.1.1",
"colors": "~0.6.2",
"glob": "~4.0.5",
"rimraf": "~2.2.8",
"mkdirp": "~0.5.0",
"gobble": "~0.2.0",
"gobble-requirejs": "~0.1.0",
"gobble": "^0.5.11",
"gobble-amdclean": "~0.1.0",
"gobble-esperanto": "~0.1.0",
"gobble-jsbeautify": "~0.1.0",
"gobble-esperanto": "~0.1.0",
"gobble-requirejs": "~0.1.0",
"gobble-uglifyjs": "^0.1.0",
"mkdirp": "~0.5.0",
"promise-map-series": "~0.2.0",
"colors": "~0.6.2",
"gobble-uglifyjs": "^0.1.0"
"promo": "~0.1.1",
"rimraf": "~2.2.8"
},

@@ -25,0 +25,0 @@ "files": [

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