diff --git a/CHANGELOG.md b/CHANGELOG.md index f21719ae8e..e832e4f5ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ _Note: Gaps between patch versions are faulty/broken releases._ See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog. +## 5.1.1 + + * **Bug Fix** + * Add missing runtime symbol definitions. + ## 5.1.0 * **Bug Fix** diff --git a/src/babel/transformation/transformers/other/runtime/definitions.json b/src/babel/transformation/transformers/other/runtime/definitions.json index 2476f8e16d..c2062fae06 100644 --- a/src/babel/transformation/transformers/other/runtime/definitions.json +++ b/src/babel/transformation/transformers/other/runtime/definitions.json @@ -7,6 +7,7 @@ "Set": "set", "WeakSet": "weak-set" }, + "methods": { "Array": { "concat": "array/concat", @@ -94,6 +95,21 @@ "addLocale": "date/add-locale", "formatUTC": "date/format-utc", "format": "date/format" + }, + "Symbol": { + "for": "symbol/for", + "hasInstance": "symbol/for-instance", + "is-concat-spreadable": "symbol/is-concat-spreadable", + "iterator": "symbol/iterator", + "keyFor": "symbol/key-for", + "match": "symbol/match", + "replace": "symbol/replace", + "search": "symbol/search", + "species": "symbol/species", + "split": "symbol/split", + "toPrimitive": "symbol/to-primitive", + "toStringTag": "symbol/to-string-tag", + "unscopables": "symbol/unscopables" } } } diff --git a/test/core/fixtures/transformation/runtime/symbol-iterator/actual.js b/test/core/fixtures/transformation/runtime/symbol-iterator/actual.js new file mode 100644 index 0000000000..ae1f0b9df5 --- /dev/null +++ b/test/core/fixtures/transformation/runtime/symbol-iterator/actual.js @@ -0,0 +1 @@ +Symbol.iterator; diff --git a/test/core/fixtures/transformation/runtime/symbol-iterator/expected.js b/test/core/fixtures/transformation/runtime/symbol-iterator/expected.js new file mode 100644 index 0000000000..70f3b80f57 --- /dev/null +++ b/test/core/fixtures/transformation/runtime/symbol-iterator/expected.js @@ -0,0 +1,5 @@ +"use strict"; + +var _Symbol$iterator = require("babel-runtime/core-js/symbol/iterator")["default"]; + +_Symbol$iterator;