I don't know if you guys have changed target commits or something while migrating to the monorepo, but this morning our CI ran
yarn global add polymer-cli
polymer build
(v1.6.0)
with this polymer.json build config:
{
"name": "some-build",
"preset": "es6-unbundled",
"js": {
"minify": false
}
}
was compiled to this:
{
"name": "some-build",
"browserCapabilities": [
"es2015",
"push"
],
"js": {
"minify": false,
"compile": "es2015",
"transformModulesToAmd": true
},
"css": {
"minify": true
},
"html": {
"minify": true
},
"bundle": false,
"addServiceWorker": true,
"addPushManifest": true,
"preset": "es6-unbundled"
}
Difference: js compile defaulted to 'es2015' instead of false, I had to explicitly put compile: false. That resulted in a broken build being deployed.
I see there was a merged PR about that here, but shouldn't it be on master but not released yet?
I think yarn add actually takes the @next version incorrectly. Could you run yarn why polymer-cli and see what version you have? (npm list polymer-cli should work as well). This should NOT be 1.7.0-pre.17, but 1.6.0 instead (as you pointed out)
It really is 1.6.0, although I mistyped and the package was installed globally, not locally (fixing the description).
same issue here, it broke my build since it's transpiling es6 to es5 when it shouldn't and I'm not even sure if it's transpiling correctly since es5 code started to throw errors
I fixed by adding compile: false to my preset
"js": {
"minify": true,
"compile": false
},
For the upcoming 1.7.0 release of polymer-cli, we have introduced new fine-grained compile targets: es5, es2015, es2016, etc. These let you use features from es2016 and above (e.g. async/await), without having to compile all the way down to es5. Previously the only choices for compile were true or false, where true meant "compile to es5" and false meant "don't compile at all".
As part of this change, we updated the presets with es6 in their name to actually compile to es2015, instead of not at all.
However, we accidentally released a minor version of polymer-project config (the package which contains these presets) with the above change. 1.6.0 users are therefore getting the new es2015 value from the template, which is interpreted by 1.6.0 as truthy and therefore compiling to es5.
So when we release polymer-cli 1.7.0 later today and you upgrade, you'll start getting es2015 output in this scenario. If you really want no compilation at all, you can continue to override with compile: false.
This should be fixed now. Please open a new bug if you continue to see this!
Most helpful comment
For the upcoming 1.7.0 release of polymer-cli, we have introduced new fine-grained compile targets:
es5,es2015,es2016, etc. These let you use features from es2016 and above (e.g. async/await), without having to compile all the way down to es5. Previously the only choices forcompileweretrueorfalse, wheretruemeant "compile to es5" andfalsemeant "don't compile at all".As part of this change, we updated the presets with
es6in their name to actually compile to es2015, instead of not at all.However, we accidentally released a minor version of polymer-project config (the package which contains these presets) with the above change. 1.6.0 users are therefore getting the new
es2015value from the template, which is interpreted by 1.6.0 as truthy and therefore compiling to es5.So when we release polymer-cli 1.7.0 later today and you upgrade, you'll start getting es2015 output in this scenario. If you really want no compilation at all, you can continue to override with
compile: false.