Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Commit

Permalink
Add transform-duplicate-keys mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialism committed Mar 6, 2017
1 parent 82b62c9 commit 24e987f
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ before_install:
- nvm use $TRAVIS_NODE_VERSION
- npm set loglevel error
- npm set progress false
- 'if [ $PKG_CMD = "yarn" ]; then npm i -g yarn@0.18.2 ; fi'
- 'if [ $PKG_CMD = "yarn" ]; then npm i -g yarn@0.22.0 ; fi'
install:
- $PKG_CMD install
script:
Expand Down
5 changes: 5 additions & 0 deletions data/plugin-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ module.exports = {
"destructuring, parameters",
],
},
"transform-es2015-duplicate-keys": {
features: [
"miscellaneous / duplicate property names in strict mode",
],
},
"transform-es2015-for-of": {
features: [
"for..of loops",
Expand Down
9 changes: 9 additions & 0 deletions data/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
"ios": 10,
"opera": 33
},
"transform-es2015-duplicate-keys": {
"chrome": 42,
"edge": 12,
"firefox": 34,
"safari": 9,
"node": 4,
"ios": 9,
"opera": 29
},
"transform-es2015-computed-properties": {
"chrome": 44,
"edge": 12,
Expand Down
1 change: 1 addition & 0 deletions test/debug-fixtures/builtins-uglify/stdout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Using plugins:
transform-es2015-block-scoped-functions {"uglify":true}
transform-es2015-block-scoping {"uglify":true}
transform-es2015-classes {"uglify":true}
transform-es2015-duplicate-keys {"uglify":true}
transform-es2015-computed-properties {"uglify":true}
check-es2015-constants {"uglify":true}
transform-es2015-destructuring {"uglify":true}
Expand Down
3 changes: 2 additions & 1 deletion test/debug-fixtures/builtins/stdout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Using plugins:
transform-es2015-block-scoped-functions {"ie":10}
transform-es2015-block-scoping {"ie":10}
transform-es2015-classes {"ie":10}
transform-es2015-duplicate-keys {"ie":10}
transform-es2015-computed-properties {"ie":10}
check-es2015-constants {"ie":10}
transform-es2015-destructuring {"ie":10,"node":6}
Expand Down Expand Up @@ -110,4 +111,4 @@ Using polyfills:
web.timers {"chrome":54,"ie":10,"node":6}
web.immediate {"chrome":54,"ie":10,"node":6}
web.dom.iterable {"chrome":54,"ie":10,"node":6}
src/in.js -> lib/in.js
src/in.js -> lib/in.js
2 changes: 1 addition & 1 deletion test/debug-fixtures/plugins-only/stdout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Using plugins:
transform-es2015-function-name {"firefox":52}
transform-es2015-literals {"firefox":52}
syntax-trailing-function-commas {"node":7.4}
src/in.js -> lib/in.js
src/in.js -> lib/in.js
1 change: 1 addition & 0 deletions test/debug-fixtures/specific-targets/stdout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Using plugins:
transform-es2015-block-scoped-functions {"edge":13,"ie":10,"ios":9,"safari":7}
transform-es2015-block-scoping {"edge":13,"firefox":49,"ie":10,"ios":9,"safari":7}
transform-es2015-classes {"ie":10,"ios":9,"safari":7}
transform-es2015-duplicate-keys {"ie":10,"safari":7}
transform-es2015-computed-properties {"ie":10,"safari":7}
check-es2015-constants {"edge":13,"firefox":49,"ie":10,"ios":9,"safari":7}
transform-es2015-destructuring {"edge":13,"firefox":49,"ie":10,"ios":9,"safari":7}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var a = { b:1, b: 2};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var a = _defineProperty({ b: 1 }, "b", 2);
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
["../../../../lib", {
"modules": false
}]
]
}

0 comments on commit 24e987f

Please sign in to comment.