Skip to content

Commit

Permalink
update compat-table
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Oct 13, 2021
1 parent fc7900a commit 3b01e94
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 22 deletions.
6 changes: 5 additions & 1 deletion packages/babel-compat-data/data/overlapping-plugins.json
Expand Up @@ -3,7 +3,8 @@
"bugfix/transform-async-arrows-in-class"
],
"transform-parameters": [
"bugfix/transform-edge-default-parameters"
"bugfix/transform-edge-default-parameters",
"bugfix/transform-safari-id-destructuring-collision-in-function-expression"
],
"transform-function-name": [
"bugfix/transform-edge-function-name"
Expand All @@ -12,6 +13,9 @@
"bugfix/transform-safari-block-shadowing",
"bugfix/transform-safari-for-shadowing"
],
"proposal-object-rest-spread": [
"bugfix/transform-safari-id-destructuring-collision-in-function-expression"
],
"transform-template-literals": [
"bugfix/transform-tagged-template-caching"
],
Expand Down
25 changes: 24 additions & 1 deletion packages/babel-compat-data/data/plugin-bugfixes.json
Expand Up @@ -101,6 +101,27 @@
"rhino": "1.7.13",
"electron": "0.37"
},
"proposal-object-rest-spread": {
"chrome": "60",
"opera": "47",
"edge": "79",
"firefox": "55",
"safari": "11.1",
"node": "8.3",
"ios": "11.3",
"samsung": "8",
"electron": "2.0"
},
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": {
"chrome": "49",
"opera": "36",
"edge": "14",
"firefox": "2",
"node": "6",
"samsung": "5",
"rhino": "1.7.13",
"electron": "0.37"
},
"transform-template-literals": {
"chrome": "41",
"opera": "28",
Expand Down Expand Up @@ -135,8 +156,10 @@
"electron": "8.0"
},
"bugfix/transform-v8-spread-parameters-in-optional-chaining": {
"chrome": "91",
"firefox": "74",
"safari": "13.1",
"ios": "13.4"
"ios": "13.4",
"electron": "13.0"
}
}
16 changes: 12 additions & 4 deletions packages/babel-compat-data/data/plugins.json
@@ -1,11 +1,13 @@
{
"proposal-class-static-block": {
"chrome": "91",
"electron": "13.0"
"chrome": "94",
"firefox": "93"
},
"proposal-private-property-in-object": {
"chrome": "91",
"firefox": "90",
"safari": "15",
"ios": "15",
"electron": "13.0"
},
"proposal-class-properties": {
Expand All @@ -15,6 +17,7 @@
"firefox": "90",
"safari": "14.1",
"node": "12",
"ios": "15",
"samsung": "11",
"electron": "6.0"
},
Expand All @@ -25,6 +28,8 @@
"firefox": "90",
"safari": "15",
"node": "14.6",
"ios": "15",
"samsung": "14",
"electron": "10.0"
},
"proposal-numeric-separator": {
Expand All @@ -46,6 +51,7 @@
"safari": "14",
"node": "15",
"ios": "14",
"samsung": "14",
"electron": "10.0"
},
"proposal-nullish-coalescing-operator": {
Expand All @@ -60,9 +66,11 @@
"electron": "8.0"
},
"proposal-optional-chaining": {
"chrome": "91",
"firefox": "74",
"safari": "13.1",
"ios": "13.4"
"ios": "13.4",
"electron": "13.0"
},
"proposal-json-strings": {
"chrome": "66",
Expand Down Expand Up @@ -379,7 +387,7 @@
"chrome": "46",
"opera": "33",
"edge": "14",
"firefox": "45",
"firefox": "41",
"safari": "10",
"node": "5",
"ios": "10",
Expand Down
18 changes: 10 additions & 8 deletions packages/babel-compat-data/scripts/build-bugfixes-targets.js
Expand Up @@ -22,17 +22,19 @@ const allReplacedFeatures = {};
const has = Function.call.bind(Object.hasOwnProperty);

for (const [plugin, { replaces, features }] of Object.entries(data)) {
if (!has(overlappingPlugins, replaces)) {
overlappingPlugins[replaces] = [];
generatedTargets[replaces] = {};
allReplacedFeatures[replaces] = [];
}
generatedTargets[plugin] = {};
for (const replace of replaces) {
if (!has(overlappingPlugins, replace)) {
overlappingPlugins[replace] = [];
generatedTargets[replace] = {};
allReplacedFeatures[replace] = [];
}

allReplacedFeatures[replaces].push(...features);
allReplacedFeatures[replace].push(...features);

overlappingPlugins[replaces].push(plugin);
overlappingPlugins[replace].push(plugin);
}

generatedTargets[plugin] = {};
for (const env of environments) {
const supportedWithBugfix = getLowestImplementedVersion({ features }, env);
if (supportedWithBugfix) {
Expand Down
18 changes: 11 additions & 7 deletions packages/babel-compat-data/scripts/data/plugin-bugfixes.js
Expand Up @@ -3,17 +3,17 @@
module.exports = {
"bugfix/transform-async-arrows-in-class": {
features: ["async functions / async arrow functions in methods, classes"],
replaces: "transform-async-to-generator",
replaces: ["transform-async-to-generator"],
},
"bugfix/transform-edge-default-parameters": {
features: [
"destructuring, parameters / shorthand defaults, arrow function",
],
replaces: "transform-parameters",
replaces: ["transform-parameters"],
},
"bugfix/transform-edge-function-name": {
features: ['function "name" property / variables (function)'],
replaces: "transform-function-name",
replaces: ["transform-function-name"],
},
"bugfix/transform-safari-block-shadowing": {
features: [
Expand All @@ -22,23 +22,27 @@ module.exports = {
"let / scope shadow resolution",
"let / scope shadow resolution (strict mode)",
],
replaces: "transform-block-scoping",
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",
replaces: ["transform-block-scoping"],
},
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": {
features: ["destructuring, parameters / duplicate identifier"],
replaces: ["transform-parameters", "proposal-object-rest-spread"],
},
"bugfix/transform-tagged-template-caching": {
features: ["template literals / TemplateStrings permanent caching"],
replaces: "transform-template-literals",
replaces: ["transform-template-literals"],
},
"bugfix/transform-v8-spread-parameters-in-optional-chaining": {
features: [
"optional chaining operator (?.) / spread parameters after optional chaining",
],
replaces: "proposal-optional-chaining",
replaces: ["proposal-optional-chaining"],
},
};
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

COMPAT_TABLE_COMMIT=63abfe227f4b9c6ef019efbbf059025b537b8511
COMPAT_TABLE_COMMIT=1ac7f90d92c31d1456da1cbd75bf7342881f59fe
GIT_HEAD=build/compat-table/.git/HEAD

if [ -d "build/compat-table" ]; then
Expand Down

0 comments on commit 3b01e94

Please sign in to comment.