Upgrade babili preset to new package name#847
Conversation
|
Ping @FredKSchott This should make sure that minification works with ES6 and Safari. I hit that bug by using |
|
@TimvdLippe can you rebase? |
93b4056 to
522391f
Compare
|
@justinfagnani Done 👍 |
src/build/optimize-streams.ts
Outdated
| [minifyPreset(null, { | ||
| flipComparisons: true, | ||
| guards: true, | ||
| typeConstructors: true |
There was a problem hiding this comment.
@TimvdLippe are these settings equivalent to the simplifyComparisons setting or are there any meaningful differences we should note in CHANGELOG etc?
There was a problem hiding this comment.
Hm, maybe a plugin has to be included for that now: https://github.com/babel/minify/tree/master/packages/babel-plugin-transform-simplify-comparison-operators, but given that the plugin was not supposed to run, not including it has the same meaning? Not 100% on that.
There was a problem hiding this comment.
/derp I just noticed your description mentioning the paren-removal change identified by tests.
There was a problem hiding this comment.
It looks like simplifyComparisons was hoisted out of unsafe into top level of options. I'm able to get the tests to pass with the following...
constructor() {
super({
presets:
[minifyPreset(null, {simplifyComparisons: false})]
});
}Was that missed or do these options matter in other ways not covered:
flipComparisons: true,
guards: true,
typeConstructors: true
There was a problem hiding this comment.
Hm that is really weird, I couldn't find it in the options. If that fixes it, then yes please! Feel free to commit to this branch 😄
usergenic
left a comment
There was a problem hiding this comment.
Add note to CHANGELOG- even if non-functional change we should note the package change there.
|
@usergenic done! |
|
as this change does not fix the problem with the broken js, could #878 be merged? |
Installing the polymer-cli showed the following message:
This PR upgrades
babel-preset-babilito the new name and fix breaking changes from 0.1.0. The unsafe option was removed and I updated the options to reflect the equivalent behavior. One change that was apparent was the removal of parenthesis from arrow functions (see the changed test). I am not sure if this is a bug or change in behavior of babili.