esperantojs / esperanto

DEPRECATED: An easier way to convert ES6 modules to AMD and CommonJS
http://esperantojs.org
234 stars 21 forks source link

doesn't build with current version of babel-core #185

Closed tdumitrescu closed 9 years ago

tdumitrescu commented 9 years ago

Hi, not sure whether this is actually a Babel issue, but doing a fresh install with the latest dependencies (and sub-dependencies) allowed in package.json results in a non-ES5-valid dist build. Specifically, gobble-babel will currently install babel-core 5.8.12 and leaves default parameters untranslated in dist/esperanto.js:

@@ -2882,8 +2840,8 @@ var toUmd = transpileMethod('umd');function bundle(options) {
                        }
                };

-               function transpile(format) {
-                       var options = arguments[1] === undefined ? {} : arguments[1];
+               function transpile(format, _ref2 = {}) {
+                       var options = _ref2;

                        if ('defaultOnly' in options && !alreadyWarned) {
                                // TODO link to a wiki page explaining this, or something

In order to get it building and tests passing, I had to downgrade babel-core to 5.6.15 (which is what the last successful Travis build used).

Rich-Harris commented 9 years ago

Thanks – as discussed in the linked issue, it turns out there was a breaking change recently, since worked around in this project. For reference, the workaround is to replace "es6.parameters.rest" and "es6.parameters.default" with "es6.parameters" in the Babel config.