Conversation
| }); | ||
| }); | ||
|
|
||
| describe("getLowestFromSemverValue", () => { |
There was a problem hiding this comment.
Nit, but may want a test * returns null?
There was a problem hiding this comment.
Good point! Need to cover * as well. Thanks!
|
Oh, lock.file, always forget 😤. I think we must add it to |
|
cc @sindresorhus since you expressed this idea (although as more of a default) in babel/babel#3476 (comment) |
|
Update:
|
| "repository": "https://github.com/babel/babel-preset-env", | ||
| "main": "lib/index.js", | ||
| "engines" : { | ||
| "node" : ">=0.12.0" |
| "node" : ">=0.12.0" | ||
| }, | ||
| "devEngines" : { | ||
| "node" : ">= 4.x" |
|
@hzoo Great improvement, but as you already commented, I'd like to see it as the default. Having the |
| *.log | ||
| .vscode No newline at end of file | ||
| .vscode | ||
| yarn.lock No newline at end of file |
There was a problem hiding this comment.
@abouthiroppy yarn support will be added with the separate PR.
There was a problem hiding this comment.
So, to prevent commiting it every time unless it will be added, let's place it to .gitignore.
@sindresorhus I guess the only issue is that the node version is different than browser version if you are using it for front-end code. I can build with node 6 but still support ie? Not sure how we could now to do it automatically since we don't know if it's a node project. However we could make a wrapper for this that assumes node? Could make it |
|
@hzoo Maybe consider engines if no |
# Conflicts: # .gitignore # package.json # src/index.js # src/utils.js # test/index.spec.js # yarn.lock
|
Hey guys, i've noticed you asked me for |
|
I'm currently finishing off a kind of wrapper API around this preset and the latest CoffeeScript [v2] (for easy/zero config, to hook up source maps properly and because I want it for a bunch of Atom packages…) and had started to impliment my own check for One thing to mention also, is that in the case of Atom packages, Also +1 for getting rid of |
|
I'm with @yavorsky, here — I think |
|
Hey, that's an awesome feature. 🎉 {
"presets": [
[ "env", {
"targets": {
"node": { "node" : ">=0.12" },
"browsers": [ "chrome 54" ]
}
}]
]
}That would allow people to get the information from another source and pass it directly to the preset. I think that wouldn't be too hard because we can basically reuse the current logic. |
|
@k15a We can avoid {
"presets": [
[ "env", {
"targets": {
"node": ">=0.12"
}
}]
]
} |
|
@yavorsky Does the node field also accept ranges? I thought it currently only accepts version numbers. |
|
@k15a Not yet. When we will merge this PR it would be easy to handle semver values. |
|
Thanks for the PR!
This repo will be made read-only, as all of the issues/labels have been moved over as well. Please report any bugs and open pull requests over on the main mono-repo (against master which is v7) |
Motivation:
In many cases, targets'
nodeoption is matching engines from project'spackage.json. Devs have to duplicate this value. In cases with ranges like> 0.12they must determine next node.js version and specify it in env-preset'stargets."current"ortrueoption is not fully covering preset's mission. We could have last node, but maintain older versions.So for ex:
babelrc
package.json
will use targets: