Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Fill es6.reflect.own-keys field. #61

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion data/builtInFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const es2015 = {
"es6.reflect.get-prototype-of": "Reflect / Reflect.getPrototypeOf",
"es6.reflect.has": "Reflect / Reflect.has",
"es6.reflect.is-extensible": "Reflect / Reflect.isExtensible",
"es6.reflect.own-keys": "Reflect / Reflect.ownKeys",
"es6.reflect.own-keys": "Reflect / Reflect.ownKeys, string keys",
Copy link
Member

@hzoo hzoo Dec 6, 2016

Choose a reason for hiding this comment

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

So in pluginFeatures we would have something like https://github.com/babel/babel-preset-env/blob/master/data/pluginFeatures.js#L97-L99

  "transform-es2015-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',
    ],
  },

so I changed the format a bit but the logic doesn't work the same

const getLowestImplementedVersion = ({ features }, env) => {
  let tests = flatten(compatibilityTests
    .filter((test) => features.indexOf(test.name) >= 0)

same with DataView

so features would be ["typed arrays / DataView"]

["typed arrays / DataView"].indexOf(test.name) >= 0 where test.name === "typed arrays / DataView (Int32)"

I was thinking we wouldn't have to hardcode each test but that doesn't work.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, cool! It was rather a hotfix then a long-term solution.

"es6.reflect.own-keys": "Reflect / Reflect.ownKeys, symbol keys",
"es6.reflect.prevent-extensions": "Reflect / Reflect.preventExtensions",
"es6.reflect.set": "Reflect / Reflect.set",
"es6.reflect.set-prototype-of": "Reflect / Reflect.setPrototypeOf",
Expand Down
127 changes: 48 additions & 79 deletions data/builtIns.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,14 @@
"safari": 9,
"ios": 9
},
"es6.reflect": {
"es6.reflect.apply": {
"chrome": 49,
"opera": 36,
"edge": 13,
"firefox": 45,
"edge": 12,
"firefox": 42,
"safari": 10,
"ios": 10
},
"es6.reflect.apply": {},
"es6.reflect.construct": {
"chrome": 49,
"opera": 36,
Expand Down Expand Up @@ -188,7 +187,14 @@
"safari": 10,
"ios": 10
},
"es6.reflect.own-keys": {},
"es6.reflect.own-keys": {
"chrome": 49,
"opera": 36,
"edge": 12,
"firefox": 42,
"safari": 10,
"ios": 10
},
"es6.reflect.prevent-extensions": {
"chrome": 49,
"opera": 36,
Expand Down Expand Up @@ -223,77 +229,6 @@
"ios": 10
},
"es6.symbol": {
"chrome": 49,
"opera": 36,
"edge": 13,
"firefox": 36,
"safari": 10,
"ios": 10
},
"es6.symbol.has-instance": {
"chrome": 51,
"opera": 38,
"firefox": 50,
"safari": 10,
"node": 6.5,
"ios": 10
},
"es6.symbol.is-concat-spreadable": {
"chrome": 48,
"opera": 35,
"firefox": 48,
"safari": 10,
"ios": 10
},
"es6.symbol.iterator": {},
"es6.symbol.match": {
"chrome": 50,
"opera": 37,
"firefox": 49,
"safari": 10,
"node": 6,
"ios": 10
},
"es6.symbol.replace": {
"chrome": 50,
"opera": 37,
"firefox": 49,
"safari": 10,
"node": 6,
"ios": 10
},
"es6.symbol.search": {
"chrome": 50,
"opera": 37,
"firefox": 49,
"safari": 10,
"node": 6,
"ios": 10
},
"es6.symbol.species": {},
"es6.symbol.split": {
"chrome": 50,
"opera": 37,
"firefox": 49,
"safari": 10,
"node": 6,
"ios": 10
},
"es6.symbol.to-primitive": {
"chrome": 47,
"opera": 34,
"firefox": 44,
"safari": 10,
"ios": 10
},
"es6.symbol.to-string-tag": {
"chrome": 49,
"opera": 36,
"firefox": 51,
"safari": 10,
"ios": 10
},
"es6.symbol.unscopables": {
"chrome": 38,
"opera": 25,
"edge": 12,
Expand All @@ -313,7 +248,6 @@
},
"es6.object.is": {
"chrome": 19,
"opera": 6,
"edge": 12,
"firefox": 22,
"safari": 9,
Expand Down Expand Up @@ -494,9 +428,17 @@
"node": 4,
"ios": 10
},
"es6.array.iterator": {
"chrome": 38,
"opera": 25,
"edge": 12,
"firefox": 28,
"safari": 7,
"node": 0.12,
"ios": 10
},
"es6.number.is-finite": {
"chrome": 19,
"opera": 6,
"edge": 12,
"firefox": 16,
"safari": 9,
Expand Down Expand Up @@ -524,7 +466,6 @@
},
"es6.number.is-nan": {
"chrome": 19,
"opera": 6,
"edge": 12,
"firefox": 15,
"safari": 9,
Expand Down Expand Up @@ -713,6 +654,34 @@
"node": 0.12,
"ios": 10
},
"es7.array.includes.js": {
"chrome": 47,
"opera": 34,
"edge": 14,
"firefox": 43,
"safari": 10,
"ios": 10
},
"es7.object.values": {
"chrome": 54,
"opera": 41,
"edge": 14,
"firefox": 47,
"node": 7
},
"es7.object.entries": {
"chrome": 54,
"opera": 41,
"edge": 14,
"firefox": 47,
"node": 7
},
"es7.object.get-own-property-descriptors": {
"chrome": 54,
"opera": 41,
"firefox": 50,
"node": 7
},
"es7.string.pad-start": {
"firefox": 48,
"safari": 10,
Expand Down