Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates babel to babel 7 (#211) and some other babel-related dependency (like babel-preset-babily -> babel-preset-minify, grunt-babel to version 8.0.0).
Quite unfortunately, this PR isn't ready yet because of an issue with the new version of the babel's transform-modules-umd plugin (which was one of the reasons why we wanted to update babel soon enough):
Even if the build process is completing successfully with the new version of the transform-modules-umd, our js file isn't being wrapped correctly as it was with previous versions of this babel transform plugins (and all the tests are failing, which is expected given that the wrapped module fails to export the browser API object).
In particular it seems that this babel plugin is now trying to discover the exports by parsing the module sources and it ends to don't find any and not passing any module object to the function that wraps our module source, here is an extract of the diff between the last version of the umd modules as released on npm and the one built from this branch:
I took a look to the trasform module sources and at a first glance it seems that it may be easier to actually replace the current strategy with a custom "less generic" transformation babel plugin (which we could write to specifically wrap our module correctly), or from a grunt task that would just wrap the module into a UMD template provided by us.