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

Environment "browser" and version "latest" #23

Closed
AlicanC opened this issue Oct 9, 2016 · 8 comments
Closed

Environment "browser" and version "latest" #23

AlicanC opened this issue Oct 9, 2016 · 8 comments

Comments

@AlicanC
Copy link

AlicanC commented Oct 9, 2016

It would be nice if we had a "browser" environment which would cover all browsers and a "latest" version to target the latest version of an environment.

Examples:

{ browser: 'latest' }
// =>
{ chrome: 'latest', edge: 'latest', firefox: 'latest', safari: 'latest' }
// =>
{ chrome: 123, edge: 123, firefox: 123, safari: 123 }
@hzoo
Copy link
Member

hzoo commented Oct 10, 2016

There's #19 which I believe covers this?

@AlicanC
Copy link
Author

AlicanC commented Oct 10, 2016

Not really. #19 just adds a special field (browsers) that uses browserslist. What I am suggesting is a solution for all fields (browsers, chrome, node, etc.).

@hzoo
Copy link
Member

hzoo commented Oct 10, 2016

In a previous issue we asked if browser list would also add in node as well. I'm not sure you actually want latest for everything on the compat-table

@yavorsky
Copy link
Member

I think, we can extend #19 according to this needs. Just parse implicit fields using browserslist if type of the field is a string, for ex.

@AlicanC
Copy link
Author

AlicanC commented Oct 11, 2016

I'm not sure you actually want latest for everything on the compat-table

You might not, but when you have it for browsers and not for Node.js the configuration becomes weird:

{
  "browsers": ["latest 2 versions"], OK
  "ie": "latest 3 versions", OK
  "node": "latest 2 versions" Error?
}

Type of the configuration looks like this:

type VersionNumber = number;
type BrowserslistQuery = string;

type Configuration = {
  browsers: Array<BrowserslistQuery>,
  edge: VersionNumber | BrowserslistQuery,
  chrome: VersionNumber | BrowserslistQuery,
  ...,
  node: VersionNumber,
};

This is very inconsistent.

@hzoo
Copy link
Member

hzoo commented Oct 11, 2016

I was saying before Node could be added in the other pr to browserlist - babel/babel#3476 (comment)

@chicoxyzzy
Copy link
Member

browserlist's issue to track browserslist/browserslist#75

@amilajack
Copy link

#19 was merged. Should this be closed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants