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
fix: Don't transpile ES2018 symbol properties #9650
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10438/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems once we update to v3 this can be undone.
It could be a breaking change. If someone uses old transform and new runtime, entry point |
And, yeah, ideally we'll kill this hack for good once we upgrade to core-js v3. |
We should hardcode it in |
@nicolo-ribaudo Hardcode what? |
The reason this isn't a breaking change is because we get the "full" In the below, note that it's now Beforevar _Symbol$iterator = require("../core-js/symbol/iterator");
var _Symbol$asyncIterator = require("../core-js/symbol/async-iterator");
var _Symbol = require("../core-js/symbol");
function _asyncIterator(iterable) {
var method;
if (typeof _Symbol === "function") {
if (_Symbol$asyncIterator) {
method = iterable[_Symbol$asyncIterator];
if (method != null) return method.call(iterable);
}
if (_Symbol$iterator) {
method = iterable[_Symbol$iterator];
if (method != null) return method.call(iterable);
}
}
throw new TypeError("Object is not async iterable");
}
module.exports = _asyncIterator; Aftervar _Symbol$iterator = require("../core-js/symbol/iterator");
var _Symbol = require("../core-js/symbol");
function _asyncIterator(iterable) {
var method;
if (typeof _Symbol === "function") {
if (_Symbol.asyncIterator) {
method = iterable[_Symbol.asyncIterator];
if (method != null) return method.call(iterable);
}
if (_Symbol$iterator) {
method = iterable[_Symbol$iterator];
if (method != null) return method.call(iterable);
}
}
throw new TypeError("Object is not async iterable");
}
module.exports = _asyncIterator; |
I mean that someone could have |
We should force it to be included like we do for
|
Makes sense. Done. |
* master: (58 commits) Remove dependency on home-or-tmp package (babel#9678) [proposal-object-rest-spread] fix templateLiteral in extractNormalizedKeys (babel#9628) Partial application plugin (babel#9474) Private Static Class Methods (Stage 3) (babel#9446) gulp-uglify@3.0.2 rollup@1.6.0 eslint@5.15.1 jest@24.5.0 regexpu-core@4.5.4 Remove input and length from state (babel#9646) Switch from rollup-stream to rollup and update deps (babel#9640) System modules - Hoist classes like other variables (babel#9639) fix: Don't transpile ES2018 symbol properties (babel#9650) Add WarningsToErrorsPlugin to webpack to avoid missing build problems on CI (babel#9647) Update regexpu-core dependency (babel#9642) Add placeholders support to @babel/types and @babel/generator (babel#9542) Generate plugins file Make babel-standalone an ESModule and enable flow (babel#9025) Reorganize token types and use a map for them (babel#9645) [TS] Allow context type annotation on getters/setters (babel#9641) ...
This is a repeat of #5195 to work around the same upstream issue.