diff --git a/lib/6to5/util.js b/lib/6to5/util.js index 244ab28cab..7bfe4e5ac3 100644 --- a/lib/6to5/util.js +++ b/lib/6to5/util.js @@ -117,6 +117,8 @@ exports.buildDefineProperties = function (mutatorMap) { var propNode = t.property("init", map._key, mapNode, map._computed); + map.enumerable = t.literal(true); + _.each(map, function (node, key) { if (key[0] === "_") return; diff --git a/test/fixtures/transformation/es5-property-methods-assignment/getter-and-setter/expected.js b/test/fixtures/transformation/es5-property-methods-assignment/getter-and-setter/expected.js index 23467f3675..9ef3d3265d 100644 --- a/test/fixtures/transformation/es5-property-methods-assignment/getter-and-setter/expected.js +++ b/test/fixtures/transformation/es5-property-methods-assignment/getter-and-setter/expected.js @@ -8,7 +8,8 @@ var obj = (function (_obj) { }, set: function (value) { this._foo = value; - } + }, + enumerable: true } }); diff --git a/test/fixtures/transformation/es5-property-methods-assignment/getter/expected.js b/test/fixtures/transformation/es5-property-methods-assignment/getter/expected.js index fda0188e6e..c519a4ee8d 100644 --- a/test/fixtures/transformation/es5-property-methods-assignment/getter/expected.js +++ b/test/fixtures/transformation/es5-property-methods-assignment/getter/expected.js @@ -5,7 +5,8 @@ var obj = (function (_obj) { foo: { get: function () { return 5 + 5; - } + }, + enumerable: true } }); diff --git a/test/fixtures/transformation/es5-property-methods-assignment/setter/expected.js b/test/fixtures/transformation/es5-property-methods-assignment/setter/expected.js index 3320d6ee41..780fb983a8 100644 --- a/test/fixtures/transformation/es5-property-methods-assignment/setter/expected.js +++ b/test/fixtures/transformation/es5-property-methods-assignment/setter/expected.js @@ -5,7 +5,8 @@ var obj = (function (_obj) { foo: { set: function (value) { this._foo = value; - } + }, + enumerable: true } }); diff --git a/test/fixtures/transformation/es6-classes/instance-getter-and-setter/expected.js b/test/fixtures/transformation/es6-classes/instance-getter-and-setter/expected.js index 0fb4c995d3..1ca4e4bc91 100644 --- a/test/fixtures/transformation/es6-classes/instance-getter-and-setter/expected.js +++ b/test/fixtures/transformation/es6-classes/instance-getter-and-setter/expected.js @@ -15,7 +15,8 @@ var Test = (function () { }, set: function (val) { this._test = val; - } + }, + enumerable: true } }); diff --git a/test/fixtures/transformation/es6-classes/instance-getter/expected.js b/test/fixtures/transformation/es6-classes/instance-getter/expected.js index 0d50b8e732..b980afd00a 100644 --- a/test/fixtures/transformation/es6-classes/instance-getter/expected.js +++ b/test/fixtures/transformation/es6-classes/instance-getter/expected.js @@ -12,7 +12,8 @@ var Test = (function () { test: { get: function () { return 5 + 5; - } + }, + enumerable: true } }); diff --git a/test/fixtures/transformation/es6-classes/instance-setter/expected.js b/test/fixtures/transformation/es6-classes/instance-setter/expected.js index 87f8e40dde..5a181cc25c 100644 --- a/test/fixtures/transformation/es6-classes/instance-setter/expected.js +++ b/test/fixtures/transformation/es6-classes/instance-setter/expected.js @@ -12,7 +12,8 @@ var Test = (function () { test: { set: function (val) { this._test = val; - } + }, + enumerable: true } }); diff --git a/test/fixtures/transformation/es6-classes/static/expected.js b/test/fixtures/transformation/es6-classes/static/expected.js index 1ef2108334..26ef9d30f1 100644 --- a/test/fixtures/transformation/es6-classes/static/expected.js +++ b/test/fixtures/transformation/es6-classes/static/expected.js @@ -13,7 +13,8 @@ var A = (function () { _classProps(A, { b: { get: function () {}, - set: function (b) {} + set: function (b) {}, + enumerable: true } }); diff --git a/test/fixtures/transformation/playground/object-getter-memoization/expected.js b/test/fixtures/transformation/playground/object-getter-memoization/expected.js index 83441a35f4..c8886b8b37 100644 --- a/test/fixtures/transformation/playground/object-getter-memoization/expected.js +++ b/test/fixtures/transformation/playground/object-getter-memoization/expected.js @@ -14,7 +14,8 @@ var Foo = (function () { if (this._memoDone) return this._memo; this._memoDone = true; return this._memo = complex(); - } + }, + enumerable: true }; return _ref; })({ @@ -23,7 +24,8 @@ var Foo = (function () { if (this._barDone) return this._bar; this._barDone = true; return this._bar = complex(); - } + }, + enumerable: true } })); @@ -45,7 +47,8 @@ var foo = (function (_foo) { if (this._barDone) return this._bar; this._barDone = true; return this._bar = complex(); - } + }, + enumerable: true } }); diff --git a/test/fixtures/transformation/source-maps/class/expected.js b/test/fixtures/transformation/source-maps/class/expected.js index 7a04a39640..aa5136a46f 100644 --- a/test/fixtures/transformation/source-maps/class/expected.js +++ b/test/fixtures/transformation/source-maps/class/expected.js @@ -12,7 +12,8 @@ var Test = (function () { bar: { get: function () { throw new Error("wow"); - } + }, + enumerable: true } });