Skip to content

Commit

Permalink
fix: Don't transpile ES2018 symbol properties (#9650)
Browse files Browse the repository at this point in the history
This is a repeat of #5195 to work around the same upstream issue.
  • Loading branch information
taion authored and nicolo-ribaudo committed Mar 10, 2019
1 parent b2b96e0 commit dd2ffda
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion packages/babel-plugin-transform-runtime/scripts/build-dist.js
Expand Up @@ -19,7 +19,15 @@ writeHelpers("@babel/runtime-corejs2", { corejs: 2 });
function writeCoreJS2(runtimeName) {
const pkgDirname = getRuntimeRoot(runtimeName);

const paths = ["is-iterable", "get-iterator"];
const paths = [
"is-iterable",
"get-iterator",

// This was previously in definitions, but was removed to work around
// zloirock/core-js#262. We need to keep it in @babel/runtime-corejs2 to
// avoid a breaking change there.
"symbol/async-iterator",
];

Object.keys(corejs2Definitions.builtins).forEach(key => {
const path = corejs2Definitions.builtins[key];
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-plugin-transform-runtime/src/definitions.js
Expand Up @@ -109,7 +109,8 @@ export default runtimeVersion => {
: {}),

Symbol: {
asyncIterator: "symbol/async-iterator",
// FIXME: Disabled to work around zloirock/core-js#262.
// asyncIterator: "symbol/async-iterator",
for: "symbol/for",
hasInstance: "symbol/has-instance",
isConcatSpreadable: "symbol/is-concat-spreadable",
Expand Down

0 comments on commit dd2ffda

Please sign in to comment.