Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage 4 proposals #11864

Merged
merged 6 commits into from Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 13 additions & 13 deletions packages/babel-compat-data/data/corejs2-built-ins.json
Expand Up @@ -8,7 +8,7 @@
"node": "4",
"ios": "9",
"samsung": "5",
"electron": "0.32"
"electron": "0.31"
},
"es6.array.every": {
"chrome": "5",
Expand All @@ -33,7 +33,7 @@
"node": "4",
"ios": "8",
"samsung": "5",
"electron": "0.32"
"electron": "0.31"
},
"es6.array.filter": {
"chrome": "5",
Expand All @@ -58,7 +58,7 @@
"node": "4",
"ios": "8",
"samsung": "5",
"electron": "0.32"
"electron": "0.31"
},
"es6.array.find-index": {
"chrome": "45",
Expand All @@ -69,7 +69,7 @@
"node": "4",
"ios": "8",
"samsung": "5",
"electron": "0.32"
"electron": "0.31"
},
"es7.array.flat-map": {
"chrome": "69",
Expand Down Expand Up @@ -194,7 +194,7 @@
"node": "4",
"ios": "9",
"samsung": "5",
"electron": "0.32"
"electron": "0.31"
},
"es6.array.reduce": {
"chrome": "5",
Expand Down Expand Up @@ -573,7 +573,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.number.epsilon": {
"chrome": "34",
Expand Down Expand Up @@ -1287,7 +1287,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.string.ends-with": {
"chrome": "41",
Expand All @@ -1298,7 +1298,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.string.fixed": {
"chrome": "5",
Expand Down Expand Up @@ -1348,7 +1348,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.string.includes": {
"chrome": "41",
Expand All @@ -1359,7 +1359,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.string.italics": {
"chrome": "5",
Expand Down Expand Up @@ -1429,7 +1429,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.string.repeat": {
"chrome": "41",
Expand All @@ -1440,7 +1440,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.string.small": {
"chrome": "5",
Expand All @@ -1464,7 +1464,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"es6.string.strike": {
"chrome": "5",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-compat-data/data/plugin-bugfixes.json
Expand Up @@ -109,7 +109,7 @@
"node": "4",
"ios": "9",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"bugfix/transform-tagged-template-caching": {
"chrome": "41",
Expand All @@ -120,6 +120,6 @@
"node": "4",
"ios": "13",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
}
}
49 changes: 34 additions & 15 deletions packages/babel-compat-data/data/plugins.json
@@ -1,4 +1,17 @@
{
"proposal-class-properties": {
"chrome": "74",
"opera": "61",
"edge": "79",
"node": "12",
"samsung": "11",
"electron": "6"
},
"proposal-private-methods": {
"chrome": "84",
"edge": "84",
"electron": "10"
},
"proposal-numeric-separator": {
"chrome": "75",
"opera": "62",
Expand All @@ -10,16 +23,11 @@
"samsung": "11",
"electron": "6"
},
"proposal-class-properties": {
"chrome": "74",
"opera": "61",
"edge": "79",
"node": "12",
"samsung": "11",
"electron": "6"
},
"proposal-private-methods": {
"chrome": "84"
"proposal-logical-assignment-operators": {
"chrome": "85",
"firefox": "79",
"safari": "14",
"electron": "10"
},
"proposal-nullish-coalescing-operator": {
"chrome": "80",
Expand All @@ -28,7 +36,8 @@
"firefox": "72",
"safari": "13.1",
"node": "14",
"electron": "8.1"
"ios": "13.4",
"electron": "8"
},
"proposal-optional-chaining": {
"chrome": "80",
Expand All @@ -37,7 +46,8 @@
"firefox": "74",
"safari": "13.1",
"node": "14",
"electron": "8.1"
"ios": "13.4",
"electron": "8"
},
"proposal-json-strings": {
"chrome": "66",
Expand Down Expand Up @@ -120,6 +130,7 @@
"chrome": "64",
"opera": "51",
"edge": "79",
"firefox": "78",
"safari": "11.1",
"node": "10",
"ios": "11.3",
Expand Down Expand Up @@ -157,7 +168,7 @@
"node": "4",
"ios": "13",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"transform-literals": {
"chrome": "44",
Expand Down Expand Up @@ -202,7 +213,7 @@
"ie": "11",
"ios": "10",
"samsung": "3.4",
"electron": "0.22"
"electron": "0.21"
},
"transform-classes": {
"chrome": "46",
Expand Down Expand Up @@ -235,7 +246,7 @@
"node": "4",
"ios": "9",
"samsung": "4",
"electron": "0.28"
"electron": "0.27"
},
"transform-duplicate-keys": {
"chrome": "42",
Expand Down Expand Up @@ -410,5 +421,13 @@
"phantom": "2",
"samsung": "1",
"electron": "0.20"
},
"proposal-export-namespace-from": {
"chrome": "72",
"edge": "79",
"opera": "60",
"firefox": "80",
"node": "13.2",
"samsung": "11.0"
}
}
2 changes: 1 addition & 1 deletion packages/babel-compat-data/package.json
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"@babel/helper-compilation-targets": "^7.10.4",
"mdn-browser-compat-data": "1.0.31",
"electron-to-chromium": "1.3.377",
"electron-to-chromium": "1.3.513",
"lodash": "^4.17.19"
}
}
13 changes: 13 additions & 0 deletions packages/babel-compat-data/scripts/build-data.js
Expand Up @@ -9,6 +9,19 @@ for (const target of ["plugin", "corejs2-built-in"]) {
environments,
require(`./data/${target}-features`)
);
if (target === "plugin") {
// add export-namespace-from from mdn-browser-compat-data
// todo: replace the hardcoded compat data to mdn-browser-compat-data
// after https://github.com/mdn/browser-compat-data/pull/6394 is published
newData["proposal-export-namespace-from"] = {
chrome: "72",
edge: "79",
opera: "60",
firefox: "80",
node: "13.2",
samsung: "11.0",
};
}
const dataPath = path.join(__dirname, `../data/${target}s.json`);

if (!writeFile(newData, dataPath, target)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-compat-data/scripts/build-modules-support.js
Expand Up @@ -35,8 +35,8 @@ function process(source) {
const allowedBrowsers = {};

Object.keys(stats).forEach(browser => {
const browserName = browserNameMap[browser] ?? browser;
let browserSupport = stats[browserSupportMap[browserName] ?? browser];
const browserName = browserNameMap[browser] || browser;
let browserSupport = stats[browserSupportMap[browserName] || browser];
if (Array.isArray(browserSupport)) {
browserSupport = browserSupport[0]; // The first item is the most progressive support
}
Expand Down
7 changes: 6 additions & 1 deletion packages/babel-compat-data/scripts/data/plugin-features.js
Expand Up @@ -122,8 +122,12 @@ const es2020 = {
"proposal-optional-chaining": "optional chaining operator (?.)",
};

const shippedProposal = {
const es2021 = {
"proposal-numeric-separator": "numeric separator",
"proposal-logical-assignment-operators": "Logical Assignment",
};

const shippedProposal = {
"proposal-class-properties": {
features: [
"static class fields",
Expand All @@ -139,6 +143,7 @@ const shippedProposal = {
module.exports = Object.assign(
{},
shippedProposal,
es2021,
es2020,
es2019,
es2015Parameter,
Expand Down
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

COMPAT_TABLE_COMMIT=50e5424d113869b08911a5df956d0e931722e5b5
COMPAT_TABLE_COMMIT=163aacb6f93e325231d578e31c03141cd9086dbb
GIT_HEAD=build/compat-table/.git/HEAD

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