This is a partial revival of my old #5005 pull request. While we never
came up with a good idiom for Promise-based method stubs on the client,
the server-side changes in this commit should fix#8367.
The most important change in this version is that the Reify compiler is
now just another Babel plugin, so it's possible for other Babel presets
and plugins to run before it.
Fixes#8399.
Fixes#8422.
Fixes https://github.com/meteor/babel/issues/13.
This small tweak would have made this commit unecessary:
1fac2ff3c1
Because we've already done the translation from CommonJS module.exports to
ES2015 namespace object, this flag should always be true.
While Babili is much better about handling modern ECMAScript constructs
than its UglifyJS predecessor, it may still be possible for an error to
occur during minification.
To account for that unlikely situation, and to preserve the code already
written to assist in that situation, this implements an error re-throw
in a similar fashion to that of 1a380f5532.
The `ecmascript` package, when `use`'d in a compiler, is included in the
build of the package, thus increasing the size. For this simple package
I'm not sure the benefits will actually be worth it.
This points the `blaze` submodule in the Meteor repository to:
https://github.com/meteor/blaze/tree/minifier-babili
This `minifier-babili` branch excludes new HTML5 tests which are failing
on PhantomJS, namely, the HTML5 tests which were added by:
04db0d40ce
While I believe the `VIDEO` tests are the most problematic, there is
nothing about the tests themselves which are lacking. In fact, the
tests do run successfully on the Blaze repository and the changes have
actually been released for a number of months on Blaze itself, however
the submodule in Meteor hasn't been updated until now.
Meteor only uses `blaze` for generating templates in the
`boilerplate-generator` package and doesn't utilize the HTML5 in
question, nor is Meteor responsible for Blaze testing anymore.
Ultimately, our `test-in-console` needs to be updated to use
another option aside from PhantomJS, but I don't believe that should
hold up releasing this Babili minifier which solves a number of issues
in meteor/meteor#8378.
Many aspects regarding contribution of code can be better explained in the new `Development.md` so provide links to those relevant parts.
Follows up on https://github.com/meteor/meteor/pull/8267