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

no node7 rules. node -> chrome version aliases miss gaps #45

Closed
graingert opened this issue Nov 16, 2016 · 5 comments
Closed

no node7 rules. node -> chrome version aliases miss gaps #45

graingert opened this issue Nov 16, 2016 · 5 comments

Comments

@graingert
Copy link

Currently the version aliases are:

{
	"safari6": "phantom",
	"chrome44": "node4",
	"chrome50": "node6",
	"chrome51": "node65",
	"chrome54": "node7",
	"chrome30": "android44",
	"chrome37": "android50",
	"chrome39": "android51",
	"safari51": "ios6",
	"safari7": "ios7",
	"safari71_8": "ios8",
	"safari9": "ios9",
	"safari10": "ios10"
}

note that chrome53 and chrome52 are missing. This means that any rule, eg async-functions does not include those changes.

This is currently fine because all those changes are covered by flags

@hzoo
Copy link
Member

hzoo commented Nov 19, 2016

you can make a pr if you'd like for those, otherwise will close then?

@graingert
Copy link
Author

I'm just saying the alias algorithm is wrong

@hzoo
Copy link
Member

hzoo commented Nov 19, 2016

It's wrong? I'm not clear on what you mean - do we need to make a pr to compat-table?

@hzoo
Copy link
Member

hzoo commented Dec 12, 2016

Can you explain this again? I'm afraid I didn't understand the issue?

@graingert
Copy link
Author

graingert commented Dec 12, 2016

in compat table:

  function interpolateResults(res) {
    var browser, prevBrowser, result, prevResult, bid, prevBid;
    for (bid in rawBrowsers) {
      // For browsers that are essentially equal to other browsers,
      // copy over the results.
      browser = rawBrowsers[bid];
      if (browser.equals && res[bid] === undefined) {
        result = res[browser.equals];
        res[bid] = browser.ignore_flagged && result === 'flagged' ? false : result;
      // For each browser, check if the previous browser has the same
      // browser full name (e.g. Firefox) or family name (e.g. Chakra) as this one.
      } else if (prevBrowser &&
          (prevBrowser.full.replace(/,.+$/,'') === browser.full.replace(/,.+$/,'') ||
          (browser.family !== undefined && prevBrowser.family === browser.family))) {
        // For each test, check if the previous browser has a result
        // that this browser lacks.
        result     = res[bid];
        prevResult = res[prevBid];
        if (prevResult !== undefined && result === undefined) {
          res[bid] = prevResult;
        }
      }
      prevBrowser = browser;
      prevBid = bid;
    }

flattens all previous browsers and equal browsers flags onto the new browser.

your ./scripts/build-data.js only looks at the first browser after an equals, eg node7 should include all the changes of chrome54, chrome53, chrome52. Instead you only look at chrome54

graingert added a commit to graingert/babel-preset-env that referenced this issue Dec 12, 2016
graingert added a commit to graingert/babel-preset-env that referenced this issue Jan 19, 2017
graingert added a commit to graingert/babel-preset-env that referenced this issue Jan 19, 2017
graingert added a commit to graingert/babel-preset-env that referenced this issue Jan 19, 2017
@hzoo hzoo closed this as completed in #180 Mar 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants