Closed bertdeblock closed 1 year ago
from @rwjblue in Discord
rwjblue β 09/16/2022 Agree Thereβs a non trivial amount of cleanup we should do though Like bumping the broccoli-Babel-transpiler version Changing poly fill support around (removing it basically)
Also just noticed that broccoli-babel-transpiler has @babel/core
in dependencies
. That means we should also change and release broccoli-babel-transpiler to either use a peerDep or accept babel itself as an argument when you create the broccoli node.
(I can't edit the description above, so I'm rewriting it here with updates.)
@babel/core
to peerDependencies https://github.com/babel/ember-cli-babel/pull/452includePolyfill
support@babel/core
a peerDep or make it accept the current Babel as an argument, and upgrade ember-cli-babel to that version. (Without this we're still not actually transpiling people's code with the version of @babel/core
in their own package.json.)@ef4 For the broccoli-babel-transpiler
update, which option do you prefer / is best in this case?
Also, does includePolyfill
support need to be dropped without a replacement?
Created PRs for the remaining issues. Hope I understood everything correctly π.
Probably need some guidance on the "Remove includePolyfill
support" issue.
Also, does includePolyfill support need to be dropped without a replacement?
babel has deprecated the polyfill and tells you the replacement is to add import "core-js/stable"
yourself: https://babeljs.io/docs/en/babel-polyfill
This probably belongs in changelog and in any how-to-upgrade doc that we may write for this major release.
I released https://github.com/babel/broccoli-babel-transpiler/releases/tag/v8.0.0-beta.1 so we can start updating here a bit easier
π I'll try to fix the broccoli-babel-transpiler
update here asap.
We're going to need to document what addon authors are supposed to do. They traditionally must have ember-cli-babel in dependencies
and therefore they bring their own babel into app builds. The way to reproduce that after this change is for addons to @babel/core
in dependencies
. But it's probably better for them to put it into peerDependencies
(and devDependencies
).
After the transpiler PR, I can look into writing an upgrade guide for apps and addons.
I said about "it's probably better for them to put it into peerDependencies", but after thinking about it, the less disruptive change is to put @babel/core
into dependencies. That is equivalent to how things already worked, with every addon potentially bringing its own babel. We don't need to rock that boat any harder, the longer-term plan is for them to get to v2 addons and then they don't bring ember-cli-babel at all.
Excited to see babel polyfills removed π
v8 is released.
Thank you @bertdeblock!
@babel/core
topeerDependencies
- https://github.com/babel/ember-cli-babel/pull/452includePolyfill
support - https://github.com/babel/ember-cli-babel/pull/458broccoli-babel-transpiler
to either make@babel/core
a peer dependency or make it accept the current Babel as an argument, and upgradeember-cli-babel
to that version (without this we're still not actually transpiling people's code with the version of@babel/core
in their ownpackage.json
) - https://github.com/babel/broccoli-babel-transpiler/pull/221broccoli-babel-transpiler
to v8 - https://github.com/babel/ember-cli-babel/pull/460broccoli-babel-transpiler
v8 and update inember-cli-babel
- https://github.com/babel/ember-cli-babel/pull/494ember-cli-babel
v8ember-cli-babel
in the default blueprint and add@babel/core
- https://github.com/ember-cli/ember-cli/pull/10141