-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX lts] Fix transpilation issues (e.g. _createSuper
is not a function) when used with Babel 7.9.0+.
#18831
Conversation
Confirmed failure:
|
Due to the way Ember itself is compiled, we have custom versions of the `@babel/helpers` that we inline into the IIFE that contains Ember. This is obviously pretty unideal (largely because it forces us to be misaligned with Babel and therefore brittle to reasonable changes that they make). These helpers have been pretty stable for quite a while, but recently Babel 7.9.0 introduced a couple of new helpers: * `createSuper` allows subclassing from native classes, even when partially transpiled). * `createForOfIteratorHelperLoose` Versions of `ember-source` prior to 3.13 fully transpiled with the Babel version in `emberjs/ember.js`s _own_ `yarn.lock` at publish time. The build process was significantly changed in `ember-source@3.13.0` so that `ember-source` would behave just like a normal addon. This was a **huge** improvement!! Unfortunately, those changes also made us vulnerable to changes made to Babel (new helpers added). We **must** resolve that issue (likely by removing these custom external helpers in favor of using `includeExternalHelpers` from `ember-cli-babel`), but in the meantime this commit adds the required helpers which should fix the reported issue in supported Ember versions.
_createSuper
is not a function) when used with Babel 7.9.0+.
FYI - These changes will need to be backported for 3.16 (affected LTS), 3.17 (current release), and 3.18 (current beta). |
_createSuper
is not a function) when used with Babel 7.9.0+._createSuper
is not a function) when used with Babel 7.9.0+.
to avoid such issues in the future would it make sense for use to switch to |
@Turbo87 - It would not have made a difference in this case. The drift is from ember-cli-babel itself, I suppose we could pin it with |
FYI - I've just queued up the CI jobs that will publish 3.17.1 and 3.16.4 (the next beta should be published tomorrow). To follow along:
If either of these are red, it means the release didn't publish so please ping me and let me know! |
v3.17.1 is published with this fix (should resolve things for folks generating new apps), but I made a mistake when pulling back these changes for 3.16 (just forgot to include the commits when cherry-picking other fixes 🤦♂) and v3.16.4 does not include this fix. I have kicked off a publishing of v3.16.5 (definitely with these changes) and it is working its way through CI now: https://travis-ci.org/github/emberjs/ember.js/builds/665843150 |
@rwjblue by any chance has this been upstreamed to beta yet? |
@jherdman - It is in |
Much, love! Thank you so much for all that you do. |
@rwjblue do you know when will be published to npm? |
@poplevente - v3.18.0-beta.3 was published yesterday (roughly 17 hours ago). |
@rwjblue i don't see that on npmjs |
@rwjblue i mean update ember-cli |
@rwjblue our problem is that we have a project which was running with ember-source@3.13 |
3.13 is unsupported (contains loads of bugs fixed in more recent versions), 3.12 works well and is a supported LTS that is unaffected by the issue this PR fixes (though it does not contain all of the octane features, e.g. tracked). As far as I see it, you have a few options:
|
@rwjblue awesome thanks! |
…3.16.0` This should hopefully avoid emberjs/ember.js#18831
Due to the way Ember itself is compiled, we have custom versions of the
@babel/helpers
that we inline into the IIFE that contains Ember. This is obviously pretty unideal (largely because it forces us to be misaligned with Babel and therefore brittle to reasonable changes that they make).These helpers have been pretty stable for quite a while, but recently Babel 7.9.0 introduced a couple of new helpers:
createSuper
allows subclassing from native classes, even when partially transpiled).createForOfIteratorHelperLoose
Versions of
ember-source
prior to 3.13 fully transpiled with the Babel version inemberjs/ember.js
s ownyarn.lock
at publish time. The build process was significantly changed inember-source@3.13.0
so thatember-source
would behave just like a normal addon. This was a huge improvement!! Unfortunately, those changes also made us vulnerable to changes made to Babel (new helpers added).We must resolve that issue (likely by removing these custom external helpers in favor of using
includeExternalHelpers
fromember-cli-babel
), but in the meantime this commit adds the required helpers which should fix the reported issue in supported Ember versions.Fixes #18827