Merge branch 'master' into 2.0

This commit is contained in:
Brian Ng 2017-08-07 20:12:06 -05:00
commit 48a4675fed
9 changed files with 52 additions and 11 deletions

View File

@ -1,5 +1,25 @@
# Changelog
## v1.6.0 (2017-07-04)
### :rocket: New Feature
- Bump compat-table for node8 support ([#363](https://github.com/babel/babel-preset-env/pull/363)) (@existentialism)
We updated our mappings to support native trailing function commas and string paddings in Node.js 8+.
### :bug: Bug Fix
- Handle `chromeandroid` browserslist value ([#367](https://github.com/babel/babel-preset-env/pull/367)) (@yavorsky)
We added support for using browserslist's `chromeandroid` in `targets`.
### :memo: Documentation
- Tweak uglify option docs ([#368](https://github.com/babel/babel-preset-env/pull/368)) (@existentialism)
Thanks to @graingert and @pfiaux for pointing out some needed updates to the `uglify-js`-related docs.
## v1.5.2 (2017-06-07)
### :bug: Bug Fix

View File

@ -48,7 +48,7 @@ This should be straightforward to do in most cases. There might be cases where p
> Default behavior without options is the same as `babel-preset-latest`.
It won't include `stage-x` plugins. env will support all plugins in what we consider the latest version of Javascript (by matching what we do in [`babel-preset-latest`](http://babeljs.io/docs/plugins/preset-latest/)).
It won't include `stage-x` plugins. env will support all plugins in what we consider the latest version of JavaScript (by matching what we do in [`babel-preset-latest`](http://babeljs.io/docs/plugins/preset-latest/)).
Ref: [#14](https://github.com/babel/babel-preset-env/issues/14)
@ -152,7 +152,7 @@ The [data](https://github.com/babel/babel-preset-env/blob/master/data/plugins.js
`number | string | "current" | true`
If you want to compile against the current node version, you can specify `"node": true` or `"node": "current"`, which would be the same as `"node": parseFloat(process.versions.node)`.
If you want to compile against the current node version, you can specify `"node": true` or `"node": "current"`, which would be the same as `"node": process.versions.node`.
### `targets.browsers`

View File

@ -1,5 +1,4 @@
module.exports = {
// es2015
const es2015 = {
"check-es2015-constants": {
features: [
"const",
@ -107,16 +106,18 @@ module.exports = {
features: [
"generators",
],
},
}
};
// es2016
const es2016 = {
"transform-exponentiation-operator": {
features: [
"exponentiation (**) operator",
],
},
}
};
// es2017
const es2017 = {
"transform-async-to-generator": {
features: [
"async functions",
@ -128,3 +129,5 @@ module.exports = {
],
}
};
module.exports = Object.assign({}, es2015, es2016, es2017);

View File

@ -5,11 +5,11 @@ import browserslist from "browserslist";
import builtInsList from "../data/built-ins.json";
import { defaultWebIncludes } from "./default-includes";
import moduleTransformations from "./module-transformations";
import pluginFeatures from "../data/plugin-features";
import pluginsList from "../data/plugins.json";
import type { Targets, Options, ModuleOption, BuiltInsOption } from "./types";
const validIncludesAndExcludes = new Set([
...Object.keys(pluginFeatures),
...Object.keys(pluginsList),
...Object.keys(moduleTransformations).map(m => moduleTransformations[m]),
...Object.keys(builtInsList),
...defaultWebIncludes,

View File

@ -9,6 +9,7 @@ import type { Targets } from "./types";
const browserNameMap = {
android: "android",
chrome: "chrome",
and_chr: "chrome",
edge: "edge",
firefox: "firefox",
ie: "ie",

View File

@ -0,0 +1,2 @@
import "babel-polyfill";
1 ** 2;

View File

@ -0,0 +1,4 @@
import "babel-polyfill/lib/core-js/modules/web.timers";
import "babel-polyfill/lib/core-js/modules/web.immediate";
import "babel-polyfill/lib/core-js/modules/web.dom.iterable";
1 ** 2;

View File

@ -0,0 +1,11 @@
{
"presets": [
["../../../../lib", {
"targets": {
"browsers": "chromeandroid 59"
},
"modules": false,
"useBuiltIns": "entry"
}]
]
}

View File

@ -1969,7 +1969,6 @@ compat-table@kangax/compat-table#d88c80ea6dcbc7064112eb46bb020718107892f7:
babel-preset-stage-0 latest
chalk "^1.1.3"
cheerio "^0.20.0"
closurecompiler latest
core-js latest
es5-shim latest
es6-shim latest
@ -1978,6 +1977,7 @@ compat-table@kangax/compat-table#d88c80ea6dcbc7064112eb46bb020718107892f7:
esdown latest
espree latest
esprima latest
google-closure-compiler-js "^20170521.0.0"
jshint latest
jstransform latest
lodash.pickby "^4.6.0"