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

Conversation

yavorsky
Copy link
Member

@yavorsky yavorsky commented Dec 6, 2016

Last commit just fills the es6.reflect.own-keys field, but other changes in builtIns.json seems to be cfa0f6f and c95759d reflection.

@@ -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",
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.

@hzoo
Copy link
Member

hzoo commented Dec 6, 2016

Ok my pr is #62, going to close this in favor of that for now

@hzoo hzoo closed this Dec 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants