Skip to content

Commit

Permalink
Move object-rest-spread after transform-parameters (#11280)
Browse files Browse the repository at this point in the history
* fix: move proposal-object-rest-spread after transform-parameters

* update test fixtures

* fix: update plugin-features.js
  • Loading branch information
JLHwung authored Mar 19, 2020
1 parent f3912ac commit 0a02a12
Show file tree
Hide file tree
Showing 71 changed files with 110 additions and 85 deletions.
22 changes: 11 additions & 11 deletions packages/babel-compat-data/data/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@
"opera": "53",
"electron": "3.1"
},
"transform-parameters": {
"chrome": "49",
"edge": "18",
"firefox": "53",
"safari": "10",
"node": "6",
"ios": "10",
"samsung": "5",
"opera": "36",
"electron": "1"
},
"proposal-async-generator-functions": {
"chrome": "63",
"edge": "79",
Expand Down Expand Up @@ -276,17 +287,6 @@
"opera": "33",
"electron": "0.36"
},
"transform-parameters": {
"chrome": "49",
"edge": "18",
"firefox": "53",
"safari": "10",
"node": "6",
"ios": "10",
"samsung": "5",
"opera": "36",
"electron": "1"
},
"transform-destructuring": {
"chrome": "51",
"edge": "15",
Expand Down
22 changes: 14 additions & 8 deletions packages/babel-compat-data/scripts/data/plugin-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ const es5 = {
"transform-reserved-words": "Miscellaneous / Unreserved words",
};

// https://github.com/babel/babel/issues/11278
// transform-parameters should run before object-rest-spread
const es2015Parameter = {
"transform-parameters": {
features: [
"default function parameters",
"rest parameters",
"destructuring, parameters / aliased defaults, arrow function",
"destructuring, parameters / shorthand defaults, arrow function",
],
},
};

const es2015 = {
"transform-template-literals": {
features: ["template literals"],
Expand Down Expand Up @@ -60,14 +73,6 @@ const es2015 = {
"transform-spread": {
features: ["spread syntax for iterable objects"],
},
"transform-parameters": {
features: [
"default function parameters",
"rest parameters",
"destructuring, parameters / aliased defaults, arrow function",
"destructuring, parameters / shorthand defaults, arrow function",
],
},
"transform-destructuring": {
features: ["destructuring, assignment", "destructuring, declarations"],
},
Expand Down Expand Up @@ -126,6 +131,7 @@ module.exports = Object.assign(
shippedProposal,
es2020,
es2019,
es2015Parameter,
es2018,
es2017,
es2016,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Using plugins:
proposal-optional-chaining { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-json-strings { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-optional-catch-binding { "android":"61", "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
transform-parameters { "edge":"16" }
proposal-async-generator-functions { "android":"61", "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-object-rest-spread { "edge":"16", "ios":"10.3", "safari":"10.1" }
transform-dotall-regex { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
Expand All @@ -28,7 +29,6 @@ Using plugins:
transform-template-literals { "ios":"10.3", "safari":"10.1" }
transform-function-name { "edge":"16" }
transform-unicode-regex { "ios":"10.3", "safari":"10.1" }
transform-parameters { "edge":"16" }
transform-block-scoping { "ios":"10.3", "safari":"10.1" }
transform-modules-commonjs { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-dynamic-import { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Using plugins:
proposal-optional-chaining { "chrome":"40" }
proposal-json-strings { "chrome":"40" }
proposal-optional-catch-binding { "chrome":"40" }
transform-parameters { "chrome":"40" }
proposal-async-generator-functions { "chrome":"40" }
proposal-object-rest-spread { "chrome":"40" }
transform-dotall-regex { "chrome":"40" }
Expand All @@ -32,7 +33,6 @@ Using plugins:
transform-sticky-regex { "chrome":"40" }
transform-unicode-regex { "chrome":"40" }
transform-spread { "chrome":"40" }
transform-parameters { "chrome":"40" }
transform-block-scoping { "chrome":"40" }
transform-new-target { "chrome":"40" }
transform-regenerator { "chrome":"40" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Using plugins:
proposal-optional-chaining { "edge":"14" }
proposal-json-strings { "edge":"14" }
proposal-optional-catch-binding { "edge":"14" }
transform-parameters { "edge":"14" }
proposal-async-generator-functions { "edge":"14" }
proposal-object-rest-spread { "edge":"14" }
transform-dotall-regex { "edge":"14" }
proposal-unicode-property-regex { "edge":"14" }
transform-named-capturing-groups-regex { "edge":"14" }
transform-async-to-generator { "edge":"14" }
transform-for-of { "edge":"14" }
transform-parameters { "edge":"14" }
transform-destructuring { "edge":"14" }
bugfix/transform-edge-function-name { "edge":"14" }
transform-modules-commonjs { "edge":"14" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Using plugins:
proposal-optional-chaining { "edge":"17" }
proposal-json-strings { "edge":"17" }
proposal-optional-catch-binding { "edge":"17" }
transform-parameters { "edge":"17" }
proposal-async-generator-functions { "edge":"17" }
proposal-object-rest-spread { "edge":"17" }
transform-dotall-regex { "edge":"17" }
proposal-unicode-property-regex { "edge":"17" }
transform-named-capturing-groups-regex { "edge":"17" }
transform-function-name { "edge":"17" }
transform-parameters { "edge":"17" }
transform-modules-commonjs { "edge":"17" }
proposal-dynamic-import { "edge":"17" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Using plugins:
proposal-optional-chaining { "edge":"14" }
proposal-json-strings { "edge":"14" }
proposal-optional-catch-binding { "edge":"14" }
transform-parameters { "edge":"14" }
proposal-async-generator-functions { "edge":"14" }
proposal-object-rest-spread { "edge":"14" }
transform-dotall-regex { "edge":"14" }
Expand All @@ -20,7 +21,6 @@ Using plugins:
transform-async-to-generator { "edge":"14" }
transform-function-name { "edge":"14" }
transform-for-of { "edge":"14" }
transform-parameters { "edge":"14" }
transform-destructuring { "edge":"14" }
transform-modules-commonjs { "edge":"14" }
proposal-dynamic-import { "edge":"14" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Using plugins:
proposal-optional-chaining { "edge":"14" }
proposal-json-strings { "edge":"14" }
proposal-optional-catch-binding { "edge":"14" }
transform-parameters { "edge":"14" }
proposal-async-generator-functions { "edge":"14" }
proposal-object-rest-spread { "edge":"14" }
transform-dotall-regex { "edge":"14" }
proposal-unicode-property-regex { "edge":"14" }
transform-named-capturing-groups-regex { "edge":"14" }
transform-async-to-generator { "edge":"14" }
transform-for-of { "edge":"14" }
transform-parameters { "edge":"14" }
transform-destructuring { "edge":"14" }
bugfix/transform-edge-function-name { "edge":"14" }
transform-modules-commonjs { "edge":"14" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Using plugins:
proposal-optional-chaining { "safari":"9" }
proposal-json-strings { "safari":"9" }
proposal-optional-catch-binding { "safari":"9" }
transform-parameters { "safari":"9" }
proposal-async-generator-functions { "safari":"9" }
proposal-object-rest-spread { "safari":"9" }
transform-dotall-regex { "safari":"9" }
Expand All @@ -26,7 +27,6 @@ Using plugins:
transform-sticky-regex { "safari":"9" }
transform-unicode-regex { "safari":"9" }
transform-spread { "safari":"9" }
transform-parameters { "safari":"9" }
transform-destructuring { "safari":"9" }
transform-block-scoping { "safari":"9" }
transform-new-target { "safari":"9" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Using plugins:
proposal-optional-chaining { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-json-strings { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-optional-catch-binding { "android":"61", "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
transform-parameters { "edge":"16" }
proposal-async-generator-functions { "android":"61", "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-object-rest-spread { "edge":"16", "ios":"10.3", "safari":"10.1" }
transform-dotall-regex { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
Expand All @@ -28,7 +29,6 @@ Using plugins:
transform-template-literals { "ios":"10.3", "safari":"10.1" }
transform-function-name { "edge":"16" }
transform-unicode-regex { "ios":"10.3", "safari":"10.1" }
transform-parameters { "edge":"16" }
transform-block-scoping { "ios":"10.3", "safari":"10.1" }
syntax-dynamic-import { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Using plugins:
proposal-optional-chaining { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-json-strings { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
proposal-optional-catch-binding { "android":"61", "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }
transform-parameters { "edge":"16" }
proposal-async-generator-functions { "android":"61", "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-object-rest-spread { "edge":"16", "ios":"10.3", "safari":"10.1" }
transform-dotall-regex { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
Expand All @@ -28,7 +29,6 @@ Using plugins:
transform-template-literals { "ios":"10.3", "safari":"10.1" }
transform-function-name { "edge":"16" }
transform-unicode-regex { "ios":"10.3", "safari":"10.1" }
transform-parameters { "edge":"16" }
transform-block-scoping { "ios":"10.3", "safari":"10.1" }
syntax-dynamic-import { "android":"61", "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1", "samsung":"8.2" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Using plugins:
proposal-optional-chaining { "android":"3" }
proposal-json-strings { "android":"3" }
proposal-optional-catch-binding { "android":"3" }
transform-parameters { "android":"3" }
proposal-async-generator-functions { "android":"3" }
proposal-object-rest-spread { "android":"3" }
transform-dotall-regex { "android":"3" }
Expand All @@ -33,7 +34,6 @@ Using plugins:
transform-sticky-regex { "android":"3" }
transform-unicode-regex { "android":"3" }
transform-spread { "android":"3" }
transform-parameters { "android":"3" }
transform-destructuring { "android":"3" }
transform-block-scoping { "android":"3" }
transform-typeof-symbol { "android":"3" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Using plugins:
proposal-optional-chaining { "android":"79", "chrome":"79", "edge":"18", "firefox":"68", "ie":"11", "ios":"12.2", "opera":"65", "safari":"12.1", "samsung":"10.1" }
proposal-json-strings { "edge":"18", "ie":"11" }
proposal-optional-catch-binding { "edge":"18", "ie":"11" }
transform-parameters { "ie":"11" }
proposal-async-generator-functions { "edge":"18", "ie":"11" }
proposal-object-rest-spread { "edge":"18", "ie":"11" }
transform-dotall-regex { "edge":"18", "firefox":"68", "ie":"11" }
Expand All @@ -40,7 +41,6 @@ Using plugins:
transform-sticky-regex { "ie":"11" }
transform-unicode-regex { "ie":"11" }
transform-spread { "ie":"11" }
transform-parameters { "ie":"11" }
transform-destructuring { "ie":"11" }
transform-block-scoping { "ie":"11" }
transform-typeof-symbol { "ie":"11" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Using plugins:
proposal-optional-chaining {}
proposal-json-strings {}
proposal-optional-catch-binding {}
transform-parameters {}
proposal-async-generator-functions {}
proposal-object-rest-spread {}
transform-dotall-regex {}
Expand All @@ -33,7 +34,6 @@ Using plugins:
transform-sticky-regex {}
transform-unicode-regex {}
transform-spread {}
transform-parameters {}
transform-destructuring {}
transform-block-scoping {}
transform-typeof-symbol {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Using plugins:
proposal-optional-chaining { "android":"4" }
proposal-json-strings { "android":"4" }
proposal-optional-catch-binding { "android":"4" }
transform-parameters { "android":"4" }
proposal-async-generator-functions { "android":"4" }
proposal-object-rest-spread { "android":"4" }
transform-dotall-regex { "android":"4" }
Expand All @@ -33,7 +34,6 @@ Using plugins:
transform-sticky-regex { "android":"4" }
transform-unicode-regex { "android":"4" }
transform-spread { "android":"4" }
transform-parameters { "android":"4" }
transform-destructuring { "android":"4" }
transform-block-scoping { "android":"4" }
transform-typeof-symbol { "android":"4" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Using plugins:
proposal-optional-chaining { "electron":"0.36" }
proposal-json-strings { "electron":"0.36" }
proposal-optional-catch-binding { "electron":"0.36" }
transform-parameters { "electron":"0.36" }
proposal-async-generator-functions { "electron":"0.36" }
proposal-object-rest-spread { "electron":"0.36" }
transform-dotall-regex { "electron":"0.36" }
Expand All @@ -30,7 +31,6 @@ Using plugins:
transform-for-of { "electron":"0.36" }
transform-sticky-regex { "electron":"0.36" }
transform-unicode-regex { "electron":"0.36" }
transform-parameters { "electron":"0.36" }
transform-destructuring { "electron":"0.36" }
transform-block-scoping { "electron":"0.36" }
transform-regenerator { "electron":"0.36" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Using plugins:
proposal-optional-chaining { "chrome":"55" }
proposal-json-strings { "chrome":"55" }
proposal-optional-catch-binding { "chrome":"55" }
transform-parameters {}
proposal-async-generator-functions { "chrome":"55" }
proposal-object-rest-spread { "chrome":"55" }
transform-dotall-regex { "chrome":"55" }
Expand All @@ -33,7 +34,6 @@ Using plugins:
transform-sticky-regex {}
transform-unicode-regex {}
transform-spread {}
transform-parameters {}
transform-destructuring {}
transform-block-scoping {}
transform-typeof-symbol {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Using plugins:
proposal-optional-chaining {}
proposal-json-strings {}
proposal-optional-catch-binding {}
transform-parameters {}
proposal-async-generator-functions {}
proposal-object-rest-spread {}
transform-dotall-regex {}
Expand All @@ -31,7 +32,6 @@ Using plugins:
transform-sticky-regex {}
transform-unicode-regex {}
transform-spread {}
transform-parameters {}
transform-destructuring {}
transform-block-scoping {}
transform-typeof-symbol {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Using plugins:
proposal-optional-chaining {}
proposal-json-strings {}
proposal-optional-catch-binding {}
transform-parameters {}
proposal-async-generator-functions {}
proposal-object-rest-spread {}
transform-dotall-regex {}
Expand All @@ -32,7 +33,6 @@ Using plugins:
transform-sticky-regex {}
transform-unicode-regex {}
transform-spread {}
transform-parameters {}
transform-destructuring {}
transform-block-scoping {}
transform-typeof-symbol {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Using plugins:
proposal-optional-chaining { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
proposal-json-strings { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
proposal-optional-catch-binding { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-parameters { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
proposal-async-generator-functions { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
proposal-object-rest-spread { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-dotall-regex { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
Expand All @@ -38,7 +39,6 @@ Using plugins:
transform-sticky-regex { "ie":"10", "ios":"9", "safari":"7" }
transform-unicode-regex { "ie":"10", "ios":"9", "safari":"7" }
transform-spread { "ie":"10", "ios":"9", "safari":"7" }
transform-parameters { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-destructuring { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-block-scoping { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
transform-typeof-symbol { "ie":"10", "safari":"7" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Using plugins:
proposal-optional-chaining { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
proposal-json-strings { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
proposal-optional-catch-binding { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
transform-parameters { "electron":"0.36", "ie":"10" }
proposal-async-generator-functions { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
proposal-object-rest-spread { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
transform-dotall-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
Expand All @@ -44,7 +45,6 @@ Using plugins:
transform-sticky-regex { "electron":"0.36", "ie":"10" }
transform-unicode-regex { "electron":"0.36", "ie":"10" }
transform-spread { "ie":"10" }
transform-parameters { "electron":"0.36", "ie":"10" }
transform-destructuring { "electron":"0.36", "ie":"10", "node":"6.1" }
transform-block-scoping { "electron":"0.36", "ie":"10" }
transform-typeof-symbol { "ie":"10" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Using plugins:
proposal-optional-chaining { "chrome":"54", "ie":"10", "node":"6.10" }
proposal-json-strings { "chrome":"54", "ie":"10", "node":"6.10" }
proposal-optional-catch-binding { "chrome":"54", "ie":"10", "node":"6.10" }
transform-parameters { "ie":"10" }
proposal-async-generator-functions { "chrome":"54", "ie":"10", "node":"6.10" }
proposal-object-rest-spread { "chrome":"54", "ie":"10", "node":"6.10" }
transform-dotall-regex { "chrome":"54", "ie":"10", "node":"6.10" }
Expand All @@ -35,7 +36,6 @@ Using plugins:
transform-sticky-regex { "ie":"10" }
transform-unicode-regex { "ie":"10" }
transform-spread { "ie":"10" }
transform-parameters { "ie":"10" }
transform-destructuring { "ie":"10" }
transform-block-scoping { "ie":"10" }
transform-typeof-symbol { "ie":"10" }
Expand Down
Loading

0 comments on commit 0a02a12

Please sign in to comment.