Include preset modules (#11083)

* Prepare preset-env and compat-data for preset-modules

* Add transform-edge-default-parameters from preset-modules

* AUtomatically generate data from compat-table

* Add compat data for other plugins

* Updates after rebase

* Add more bugfixes to preset-env

* Update tests

* Add bugfix/transform-safari-for-shadowing

* Fix build script

* bugfix/transform-safari-block-shadowing

* Fix flow

* Include changes from 7127330f02

* Fix check-compat-data
This commit is contained in:
Nicolò Ribaudo
2020-03-17 00:36:29 +01:00
committed by GitHub
parent f6c7bf36ce
commit a11855e586
83 changed files with 1499 additions and 347 deletions

View File

@@ -1,16 +0,0 @@
"use strict";
module.exports = new Map();
// async -> regenerator is better than async -> generator -> regenerator
ifIncluded("transform-regenerator")
// Temporarly disabled: https://github.com/babel/babel/issues/10678
// .isUnnecessary("transform-async-to-generator");
function ifIncluded(name) {
const set = new Set();
module.exports.set(name, set);
return {
isUnnecessary(name) { set.add(name); return this; },
};
}

View File

@@ -0,0 +1,38 @@
/* eslint sort-keys: "error" */
module.exports = {
"bugfix/transform-async-arrows-in-class": {
features: ["async functions / async arrow functions in methods, classes"],
replaces: "transform-async-to-generator",
},
"bugfix/transform-edge-default-parameters": {
features: [
"destructuring, parameters / shorthand defaults, arrow function",
],
replaces: "transform-parameters",
},
"bugfix/transform-edge-function-name": {
features: ['function "name" property / variables (function)'],
replaces: "transform-function-name",
},
"bugfix/transform-safari-block-shadowing": {
features: [
"const / scope shadow resolution",
"const / scope shadow resolution (strict mode)",
"let / scope shadow resolution",
"let / scope shadow resolution (strict mode)",
],
replaces: "transform-block-scoping",
},
"bugfix/transform-safari-for-shadowing": {
features: [
"let / for-in loop binding shadowing parameter",
"let / for-in loop binding shadowing parameter (strict mode)",
],
replaces: "transform-block-scoping",
},
"bugfix/transform-tagged-template-caching": {
features: ["template literals / TemplateStrings permanent caching"],
replaces: "transform-template-literals",
},
};