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

Add es6.array.slice in corejs2 builtins #12870

Merged
merged 6 commits into from Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
75 changes: 51 additions & 24 deletions packages/babel-compat-data/data/corejs2-built-ins.json
@@ -1,4 +1,15 @@
{
"es6.array.concat": {
"chrome": "51",
"opera": "38",
"edge": "15",
"firefox": "48",
"safari": "10",
"node": "6.5",
"ios": "10",
"samsung": "5",
"electron": "1.2"
},
"es6.array.copy-within": {
"chrome": "45",
"opera": "32",
Expand Down Expand Up @@ -36,18 +47,15 @@
"electron": "0.31"
},
"es6.array.filter": {
"chrome": "5",
"opera": "10.10",
"edge": "12",
"firefox": "2",
"safari": "3.1",
"node": "0.10",
"ie": "9",
"android": "4",
"ios": "6",
"phantom": "2",
"samsung": "1",
"electron": "0.20"
"chrome": "51",
"opera": "38",
"edge": "13",
"firefox": "48",
"safari": "10",
"node": "6.5",
"ios": "10",
"samsung": "5",
"electron": "1.2"
},
"es6.array.find": {
"chrome": "45",
Expand Down Expand Up @@ -172,18 +180,15 @@
"electron": "0.20"
},
"es6.array.map": {
"chrome": "5",
"opera": "10.10",
"edge": "12",
"firefox": "2",
"safari": "3.1",
"node": "0.10",
"ie": "9",
"android": "4",
"ios": "6",
"phantom": "2",
"samsung": "1",
"electron": "0.20"
"chrome": "51",
"opera": "38",
"edge": "13",
"firefox": "48",
"safari": "10",
"node": "6.5",
"ios": "10",
"samsung": "5",
"electron": "1.2"
},
"es6.array.of": {
"chrome": "45",
Expand Down Expand Up @@ -224,6 +229,17 @@
"samsung": "1",
"electron": "0.20"
},
"es6.array.slice": {
"chrome": "51",
"opera": "38",
"edge": "13",
"firefox": "48",
"safari": "10",
"node": "6.5",
"ios": "10",
"samsung": "5",
"electron": "1.2"
},
"es6.array.some": {
"chrome": "5",
"opera": "10.10",
Expand Down Expand Up @@ -261,6 +277,17 @@
"samsung": "5",
"electron": "1.2"
},
"es6.array.splice": {
"chrome": "51",
"opera": "38",
"edge": "13",
"firefox": "48",
"safari": "10",
"node": "6.5",
"ios": "10",
"samsung": "5",
"electron": "1.2"
},
"es6.date.now": {
"chrome": "5",
"opera": "10.50",
Expand Down
Expand Up @@ -27,22 +27,20 @@ const typedArrayMethods = [
];

module.exports = {
// compat-table missing babel6 mapping
// "es6.array.concat": {
// features: [
// "well-known symbols / Symbol.isConcatSpreadable",
// "well-known symbols / Symbol.species, Array.prototype.concat",
// ]
// },
"es6.array.concat": {
features: [
"well-known symbols / Symbol.isConcatSpreadable",
"well-known symbols / Symbol.species, Array.prototype.concat",
],
},
"es6.array.copy-within":
"Array.prototype methods / Array.prototype.copyWithin",
"es6.array.every": "Array methods / Array.prototype.every",
"es6.array.fill": "Array.prototype methods / Array.prototype.fill",
"es6.array.filter": {
features: [
"Array methods / Array.prototype.filter",
// compat-table missing babel6 mapping
// "well-known symbols / Symbol.species, Array.prototype.filter",
"well-known symbols / Symbol.species, Array.prototype.filter",
],
},
"es6.array.find": "Array.prototype methods / Array.prototype.find",
Expand All @@ -66,20 +64,19 @@ module.exports = {
"es6.array.map": {
features: [
"Array methods / Array.prototype.map",
// compat-table missing babel6 mapping
// "well-known symbols / Symbol.species, Array.prototype.map",
"well-known symbols / Symbol.species, Array.prototype.map",
],
},
"es6.array.of": "Array static methods / Array.of",
"es6.array.reduce": "Array methods / Array.prototype.reduce",
"es6.array.reduce-right": "Array methods / Array.prototype.reduceRight",
// compat-table missing babel6 mapping
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still a valid reason? I'm seeing a few more compat-table missing babel6 mapping here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh no, we can add all of them back if they are in compat-table.

Copy link
Contributor Author

@eligao eligao Feb 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, let me add them back also then

// "es6.array.slice": "well-known symbols / Symbol.species, Array.prototype.slice",
"es6.array.slice":
"well-known symbols / Symbol.species, Array.prototype.slice",
"es6.array.some": "Array methods / Array.prototype.some",
"es6.array.sort": "Array methods / Array.prototype.sort",
"es6.array.species": "Array static methods / Array[Symbol.species]",
// compat-table missing babel6 mapping
//"es6.array.splice": "well-known symbols / Symbol.species, Array.prototype.splice",
"es6.array.splice":
"well-known symbols / Symbol.species, Array.prototype.splice",

"es6.date.now": "Date methods / Date.now",
"es6.date.to-iso-string": "Date methods / Date.prototype.toISOString",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-runtime/package.json
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@babel/helper-module-imports": "workspace:^7.12.13",
"@babel/helper-plugin-utils": "workspace:^7.13.0",
"babel-plugin-polyfill-corejs2": "^0.1.3",
"babel-plugin-polyfill-corejs2": "^0.1.4",
"babel-plugin-polyfill-corejs3": "^0.1.3",
"babel-plugin-polyfill-regenerator": "^0.1.2",
"semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : 7.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-env/package.json
Expand Up @@ -79,7 +79,7 @@
"@babel/plugin-transform-unicode-regex": "workspace:^7.12.13",
"@babel/preset-modules": "^0.1.3",
"@babel/types": "workspace:^7.13.0",
"babel-plugin-polyfill-corejs2": "^0.1.3",
"babel-plugin-polyfill-corejs2": "^0.1.4",
"babel-plugin-polyfill-corejs3": "^0.1.3",
"babel-plugin-polyfill-regenerator": "^0.1.2",
"core-js-compat": "^3.9.0",
Expand Down