Skip to content

Commit

Permalink
Re-generate preset-env fixtures (#11016)
Browse files Browse the repository at this point in the history
* Fix plugin ordering in preset-env

* Update stdout fixtures

* Comments [skip ci]
  • Loading branch information
nicolo-ribaudo authored and JLHwung committed Jan 16, 2020
1 parent a1063d2 commit 3daab41
Show file tree
Hide file tree
Showing 91 changed files with 1,100 additions and 1,077 deletions.
402 changes: 201 additions & 201 deletions packages/babel-compat-data/data/plugins.json

Large diffs are not rendered by default.

157 changes: 90 additions & 67 deletions packages/babel-compat-data/scripts/data/plugin-features.js
@@ -1,67 +1,64 @@
/* eslint sort-keys: "error" */
// WARNING: Plugin ordering is important. Don't reorder this file
// without checking that it doesn't break anything.

module.exports = {
"proposal-async-generator-functions": "Asynchronous Iterators",
"proposal-json-strings": "JSON superset",
"proposal-nullish-coalescing-operator": "nullish coalescing operator (??)",
"proposal-object-rest-spread": "object rest/spread properties",
"proposal-optional-catch-binding": "optional catch binding",
"proposal-optional-chaining": "optional chaining operator (?.)",
"proposal-unicode-property-regex": "RegExp Unicode Property Escapes",
const es5 = {
"transform-member-expression-literals":
"Object/array literal extensions / Reserved words as property names",
"transform-property-literals":
"Object/array literal extensions / Reserved words as property names",
"transform-reserved-words": "Miscellaneous / Unreserved words",
};

const es2015 = {
"transform-template-literals": {
features: ["template literals"],
},
"transform-literals": {
features: ["Unicode code point escapes"],
},
"transform-function-name": {
features: ['function "name" property'],
},
"transform-arrow-functions": {
features: ["arrow functions"],
},

"transform-async-to-generator": {
features: ["async functions"],
},

"transform-block-scoped-functions": {
features: ["block-level function declaration"],
},
"transform-block-scoping": {
features: ["const", "let"],
},
"transform-classes": {
features: ["class", "super"],
},
"transform-computed-properties": {
features: ["object literal extensions / computed properties"],
"transform-object-super": {
features: ["super"],
},
"transform-destructuring": {
features: ["destructuring, assignment", "destructuring, declarations"],
"transform-shorthand-properties": {
features: ["object literal extensions / shorthand properties"],
},

// We want to apply this prior to unicode regex so that "." and "u"
// are properly handled.
//
// Ref: https://github.com/babel/babel/pull/7065#issuecomment-395959112
"transform-dotall-regex": "s (dotAll) flag for regular expressions",

"transform-duplicate-keys": {
features: ["miscellaneous / duplicate property names in strict mode"],
},
"transform-exponentiation-operator": {
features: ["exponentiation (**) operator"],
"transform-computed-properties": {
features: ["object literal extensions / computed properties"],
},
"transform-for-of": {
features: ["for..of loops"],
},
"transform-function-name": {
features: ['function "name" property'],
},
"transform-literals": {
features: ["Unicode code point escapes"],
"transform-sticky-regex": {
features: [
'RegExp "y" and "u" flags / "y" flag, lastIndex',
'RegExp "y" and "u" flags / "y" flag',
],
},
"transform-member-expression-literals":
"Object/array literal extensions / Reserved words as property names",
"transform-named-capturing-groups-regex": "RegExp named capture groups",
"transform-new-target": {
features: ["new.target"],
"transform-unicode-regex": {
features: [
'RegExp "y" and "u" flags / "u" flag, case folding',
'RegExp "y" and "u" flags / "u" flag, Unicode code point escapes',
'RegExp "y" and "u" flags / "u" flag, non-BMP Unicode characters',
'RegExp "y" and "u" flags / "u" flag',
],
},
"transform-object-super": {
features: ["super"],
"transform-spread": {
features: ["spread syntax for iterable objects"],
},
"transform-parameters": {
features: [
Expand All @@ -70,36 +67,62 @@ module.exports = {
"destructuring, parameters / defaults, arrow function",
],
},
"transform-property-literals":
"Object/array literal extensions / Reserved words as property names",
"transform-regenerator": {
features: ["generators"],
"transform-destructuring": {
features: ["destructuring, assignment", "destructuring, declarations"],
},
"transform-reserved-words": "Miscellaneous / Unreserved words",
"transform-shorthand-properties": {
features: ["object literal extensions / shorthand properties"],
"transform-block-scoping": {
features: ["const", "let"],
},
"transform-spread": {
features: "spread syntax for iterable objects",
"transform-typeof-symbol": {
features: ["Symbol / typeof support"],
},
"transform-sticky-regex": {
features: [
'RegExp "y" and "u" flags / "y" flag, lastIndex',
'RegExp "y" and "u" flags / "y" flag',
],
"transform-new-target": {
features: ["new.target"],
},
"transform-template-literals": {
features: ["template literals"],
"transform-regenerator": {
features: ["generators"],
},
"transform-typeof-symbol": {
features: ["Symbol / typeof support"],
};

const es2016 = {
"transform-exponentiation-operator": {
features: ["exponentiation (**) operator"],
},
"transform-unicode-regex": {
features: [
'RegExp "y" and "u" flags / "u" flag, case folding',
'RegExp "y" and "u" flags / "u" flag, Unicode code point escapes',
'RegExp "y" and "u" flags / "u" flag, non-BMP Unicode characters',
'RegExp "y" and "u" flags / "u" flag',
],
};

const es2017 = {
"transform-async-to-generator": {
features: ["async functions"],
},
};

const es2018 = {
"proposal-async-generator-functions": "Asynchronous Iterators",
"proposal-object-rest-spread": "object rest/spread properties",

"transform-dotall-regex": "s (dotAll) flag for regular expressions",
"proposal-unicode-property-regex": "RegExp Unicode Property Escapes",
"transform-named-capturing-groups-regex": "RegExp named capture groups",
};

const es2019 = {
"proposal-json-strings": "JSON superset",
"proposal-optional-catch-binding": "optional catch binding",
};

const es2020 = {
"proposal-nullish-coalescing-operator": "nullish coalescing operator (??)",
"proposal-optional-chaining": "optional chaining operator (?.)",
};

// Run plugins for modern features first
module.exports = Object.assign(
{},
es2020,
es2019,
es2018,
es2017,
es2016,
es2015,
es5
);
Expand Up @@ -13,21 +13,21 @@ Using targets:
Using modules transform: false

Using plugins:
proposal-nullish-coalescing-operator { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-chaining { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-async-generator-functions { "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 { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-async-to-generator { "ios":"10.3", "safari":"10.1" }
transform-template-literals { "ios":"10.3", "safari":"10.1" }
transform-function-name { "edge":"16" }
transform-dotall-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-unicode-regex { "ios":"10.3", "safari":"10.1" }
transform-parameters { "edge":"16" }
transform-block-scoping { "ios":"10.3", "safari":"10.1" }
transform-async-to-generator { "ios":"10.3", "safari":"10.1" }
proposal-async-generator-functions { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-object-rest-spread { "edge":"16", "ios":"10.3", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-chaining { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-nullish-coalescing-operator { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
syntax-dynamic-import { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }

Using polyfills with `usage` option:
Expand Down
Expand Up @@ -13,21 +13,21 @@ Using targets:
Using modules transform: false

Using plugins:
proposal-nullish-coalescing-operator { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-chaining { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-async-generator-functions { "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 { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-async-to-generator { "ios":"10.3", "safari":"10.1" }
transform-template-literals { "ios":"10.3", "safari":"10.1" }
transform-function-name { "edge":"16" }
transform-dotall-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-unicode-regex { "ios":"10.3", "safari":"10.1" }
transform-parameters { "edge":"16" }
transform-block-scoping { "ios":"10.3", "safari":"10.1" }
transform-async-to-generator { "ios":"10.3", "safari":"10.1" }
proposal-async-generator-functions { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-object-rest-spread { "edge":"16", "ios":"10.3", "safari":"10.1" }
proposal-unicode-property-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-json-strings { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-catch-binding { "chrome":"61", "edge":"16", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-optional-chaining { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
transform-named-capturing-groups-regex { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
proposal-nullish-coalescing-operator { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }
syntax-dynamic-import { "chrome":"61", "edge":"16", "firefox":"60", "ios":"10.3", "opera":"48", "safari":"10.1" }

Using polyfills with `usage` option:
Expand Down
Expand Up @@ -8,6 +8,17 @@ Using targets:
Using modules transform: auto

Using plugins:
proposal-nullish-coalescing-operator { "android":"3" }
proposal-optional-chaining { "android":"3" }
proposal-json-strings { "android":"3" }
proposal-optional-catch-binding { "android":"3" }
proposal-async-generator-functions { "android":"3" }
proposal-object-rest-spread { "android":"3" }
transform-dotall-regex { "android":"3" }
proposal-unicode-property-regex { "android":"3" }
transform-named-capturing-groups-regex { "android":"3" }
transform-async-to-generator { "android":"3" }
transform-exponentiation-operator { "android":"3" }
transform-template-literals { "android":"3" }
transform-literals { "android":"3" }
transform-function-name { "android":"3" }
Expand All @@ -20,7 +31,6 @@ Using plugins:
transform-computed-properties { "android":"3" }
transform-for-of { "android":"3" }
transform-sticky-regex { "android":"3" }
transform-dotall-regex { "android":"3" }
transform-unicode-regex { "android":"3" }
transform-spread { "android":"3" }
transform-parameters { "android":"3" }
Expand All @@ -29,19 +39,9 @@ Using plugins:
transform-typeof-symbol { "android":"3" }
transform-new-target { "android":"3" }
transform-regenerator { "android":"3" }
transform-exponentiation-operator { "android":"3" }
transform-async-to-generator { "android":"3" }
proposal-async-generator-functions { "android":"3" }
proposal-object-rest-spread { "android":"3" }
proposal-unicode-property-regex { "android":"3" }
proposal-json-strings { "android":"3" }
proposal-optional-catch-binding { "android":"3" }
proposal-optional-chaining { "android":"3" }
transform-named-capturing-groups-regex { "android":"3" }
transform-member-expression-literals { "android":"3" }
transform-property-literals { "android":"3" }
transform-reserved-words { "android":"3" }
proposal-nullish-coalescing-operator { "android":"3" }
transform-modules-commonjs { "android":"3" }
proposal-dynamic-import { "android":"3" }

Expand Down
Expand Up @@ -15,6 +15,17 @@ Using targets:
Using modules transform: auto

Using plugins:
proposal-nullish-coalescing-operator { "android":"77", "chrome":"49", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" }
proposal-optional-chaining { "android":"77", "chrome":"49", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" }
proposal-json-strings { "chrome":"49", "edge":"17", "safari":"5.1" }
proposal-optional-catch-binding { "chrome":"49", "edge":"17", "safari":"5.1" }
proposal-async-generator-functions { "chrome":"49", "edge":"17", "safari":"5.1" }
proposal-object-rest-spread { "chrome":"49", "edge":"17", "safari":"5.1" }
transform-dotall-regex { "chrome":"49", "edge":"17", "firefox":"68", "safari":"5.1" }
proposal-unicode-property-regex { "chrome":"49", "edge":"17", "firefox":"68", "safari":"5.1" }
transform-named-capturing-groups-regex { "chrome":"49", "edge":"17", "firefox":"68", "safari":"5.1" }
transform-async-to-generator { "chrome":"49", "safari":"5.1" }
transform-exponentiation-operator { "chrome":"49", "safari":"5.1" }
transform-template-literals { "ios":"12.2", "safari":"5.1" }
transform-literals { "safari":"5.1" }
transform-function-name { "chrome":"49", "edge":"17", "safari":"5.1" }
Expand All @@ -27,7 +38,6 @@ Using plugins:
transform-computed-properties { "safari":"5.1" }
transform-for-of { "chrome":"49", "safari":"5.1" }
transform-sticky-regex { "safari":"5.1" }
transform-dotall-regex { "chrome":"49", "edge":"17", "firefox":"68", "safari":"5.1" }
transform-unicode-regex { "chrome":"49", "safari":"5.1" }
transform-spread { "safari":"5.1" }
transform-parameters { "edge":"17", "safari":"5.1" }
Expand All @@ -36,16 +46,6 @@ Using plugins:
transform-typeof-symbol { "safari":"5.1" }
transform-new-target { "safari":"5.1" }
transform-regenerator { "chrome":"49", "safari":"5.1" }
transform-exponentiation-operator { "chrome":"49", "safari":"5.1" }
transform-async-to-generator { "chrome":"49", "safari":"5.1" }
proposal-async-generator-functions { "chrome":"49", "edge":"17", "safari":"5.1" }
proposal-object-rest-spread { "chrome":"49", "edge":"17", "safari":"5.1" }
proposal-unicode-property-regex { "chrome":"49", "edge":"17", "firefox":"68", "safari":"5.1" }
proposal-json-strings { "chrome":"49", "edge":"17", "safari":"5.1" }
proposal-optional-catch-binding { "chrome":"49", "edge":"17", "safari":"5.1" }
proposal-optional-chaining { "android":"77", "chrome":"49", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" }
transform-named-capturing-groups-regex { "chrome":"49", "edge":"17", "firefox":"68", "safari":"5.1" }
proposal-nullish-coalescing-operator { "android":"77", "chrome":"49", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" }
transform-modules-commonjs { "android":"77", "chrome":"49", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" }
proposal-dynamic-import { "android":"77", "chrome":"49", "edge":"17", "firefox":"68", "ios":"12.2", "opera":"63", "safari":"5.1", "samsung":"9.2" }

Expand Down

0 comments on commit 3daab41

Please sign in to comment.