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

es6-module-transpiler

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-module-transpiler - npm Package Compare versions

Comparing version 0.9.3 to 0.9.4

4

lib/formatters/bundle_formatter.js

@@ -292,2 +292,6 @@ /* jshint node:true, undef:true, unused:true */

specifier = specifier.terminalExportSpecifier;
if (n.ImportNamespaceSpecifier.check(specifier.node)) {
// Reference the built namespace object, e.g. mod$$.
return b.identifier(specifier.declaration.source.id);
}
return this.reference(specifier.module, specifier.name);

@@ -294,0 +298,0 @@ } else {

27

lib/formatters/commonjs_formatter.js

@@ -116,14 +116,21 @@ /* jshint node:true, undef:true, unused:true */

var from =
specifier.importSpecifier ?
self.reference(
var from;
if (specifier.importSpecifier) {
if (n.ImportNamespaceSpecifier.check(specifier.importSpecifier.node)) {
from = b.identifier(specifier.importSpecifier.declaration.source.id)
} else {
from = self.reference(
specifier.importSpecifier.declaration.source,
specifier.importSpecifier.from
) :
specifier.declaration.source ?
self.reference(
specifier.declaration.source,
specifier.name
) :
b.identifier(specifier.from);
);
}
} else if (specifier.declaration.source) {
from = self.reference(
specifier.declaration.source,
specifier.name
);
} else {
from = b.identifier(specifier.from);
}

@@ -130,0 +137,0 @@ assignments.push(b.assignmentExpression(

@@ -201,2 +201,7 @@ /* jshint node:true, undef:true, unused:true */

if (importSpecifier) {
if (n.ImportNamespaceSpecifier.check(importSpecifier.node)) {
// Namespace imports create a local binding, so they are the terminal.
return importSpecifier;
}
var nextExportSpecifier = importSpecifier.exportSpecifier;

@@ -203,0 +208,0 @@ assert.ok(

{
"name": "es6-module-transpiler",
"version": "0.9.3",
"version": "0.9.4",
"description": "es6-module-transpiler is an experimental compiler that allows you to write your JavaScript using a subset of the current ES6 module syntax, and compile it into various formats.",

@@ -45,10 +45,10 @@ "homepage": "http://esnext.github.io/es6-module-transpiler",

"posix-getopt": "^1.0.0",
"recast": "^0.8.0"
"recast": "^0.9.5"
},
"devDependencies": {
"browserify": "^5.12.1",
"es6-class": "^0.9.1",
"example-runner": "^0.1.0",
"fake-fs": "^0.4.0",
"mocha": "^1.20.1",
"browserify": "^6.3.2",
"es6-class": "^0.9.2",
"example-runner": "^0.2.0",
"fake-fs": "^0.5.0",
"mocha": "^2.0.1",
"tmp": "0.0.24"

@@ -55,0 +55,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