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 (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
existentialism committed Mar 6, 2017
1 parent 0465a63 commit e4d0040
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
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
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
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
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
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
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
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
@@ -0,0 +1 @@
var a = { b:1, b: 2};
@@ -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);
@@ -0,0 +1,7 @@
{
"presets": [
["../../../../lib", {
"modules": false
}]
]
}

0 comments on commit e4d0040

Please sign in to comment.