website/node_modules/@babel/preset-env/CHANGELOG.md

Changelog

v1.6.1 (2017-10-17)

:bug: Bug Fix

ES2015 destructuring is not fully supported in Edge 15 and the polyfill required again. es6.math.imul is supported on Android as of version 4.4

Functions such as Object.keys, Object.freeze, ... do already exist in ES5, but their behaviour changed in ES2015. babel-preset-env with builtIns: true now adds the core-js polyfills for this methods if the browser only supports the ES5 variant of the method (like IE11 for example)

v1.6.0 (2017-07-04)

:rocket: New Feature

We updated our mappings to support native trailing function commas and string paddings in Node.js 8+.

:bug: Bug Fix

We added support for using browserslist's chromeandroid in targets.

:memo: Documentation

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

browser targets should be overridden by explicit targets, and we inadvertently broke this when we landed string version support.

v1.5.1 (2017-05-22)

:bug: Bug Fix

v1.5.0 (2017-05-19)

:rocket: New Feature

We were originally waiting on 2.x for a breaking change, but since node v7.10 and other targets are causing some pain, we decided to land a backwards compatible version.

:house: Internal

v1.4.0 (2017-04-14)

:rocket: New Feature

Added an option to enable more spec compliant, but potentially slower, transformations for any plugins in this preset that support them.

We updated our mappings so that you can get native support for async/await and other goodies when targeting Edge 15!

:bug: Bug Fix

Fixed a bug that was ignoring Android targets in browserslist queries (for example: "Android >= 4").

:memo: Documentation

:house: Internal

v1.3.3 (2017-04-07)

:bug: Bug Fix

Adding electron as a target was an inadvertent breaking change as it no longer allowed string versions. We added an exception for now, even though it is inconsistent with other versions. Just as a note, the upcoming version 2.x will allow both number and string versions.

We now force the const-es2015-check plugin to run first (so that it can correctly report issues before they get transpiled away).

:rocket: New Feature

The include and exclude options now allow both prefixed (babel-plugin-transform-es2015-spread) and prefix-less (transform-es2015-spread) plugin names.

:memo: Documentation

:house: Internal

v1.3.2 (2017-03-30)

v1.3.1 (2017-03-30)

v1.3.0 (2017-03-30)

:bug: Bug Fix

We now properly check for Symbol.species support in ArrayBuffer and include the polyfill if necessary. This should, as a side effect, fix ArrayBuffer-related errors on IE9.

:nail_care: Polish

We've simplified things by adding electron as a target instead of doing a bunch of things at runtime. Electron targets should now also be displayed in the debug output.

If you are targeting the node environment exclusively, the always-included web polyfills (like dom.iterable, and a few others) will now no longer be included.

:memo: Documentation

:house: Internal

v1.2.2 (2017-03-14)

:bug: Bug Fix

When parsing plugin data, we weren't properly handling browser families. This caused transform-es2015-block-scoping and other plugins to be incorrectly added for Edge >= 12. (s/o to @mgol for the the report and review!)

Fixes an issue where some TypedArray features were not being polyfilled properly. (s/o to @alippai for the report!)

:memo: Documentation

:house: Internal

v1.2.1 (2017-03-06)

:bug: Bug Fix

Our plugin data was missing a mapping for the transform-duplicate-keys plugin which caused it to never be included. (s/o to @Timer for the report!)

:memo: Documentation

v1.2.0 (2017-03-03)

:rocket: New Feature

Support for uglify as a target is now available! This will enable all plugins and, as a result, fully compiles your code to ES5. Note, that useBuiltIns will work as before, and only the polyfills that your other target(s) need will be included.

{
  "presets": [
    ["env", {
      "targets": {
        "chrome": 55,
        "uglify": true
      },
      "useBuiltIns": true,
      "modules": false
    }]
  ]
}

:bug: Bug Fix

Fixes a number of bugs that caused some incorrect and/or missing environment data when parsing compat-table.

v1.1.11 (2017-03-01)

This release primarily upgrades compat-table, which adds support for async on Node 7.6!

:bug: Bug Fix

:memo: Documentation

:house: Internal

v1.1.10 (2017-02-24)

:bug: Bug Fix

v1.1.9 (2017-02-24)

:bug: Bug Fix

Since we've (mostly @yavorsky) have fixed a number of bugs recently with the debug option output, we added the ability to assert stdout matches what we expect. Read the updated CONTRIBUTING.md for more info.

This fixes a bug in the debug output where incorrect target(s) were being displayed for why a particular plugin/preset was being included.

Given targets:

{
  "firefox": 52,
  "node": 7.4
}

Before:

Using plugins:
  transform-es2015-destructuring {"node":6.5}
  transform-es2015-for-of {"node":6.5}
  transform-es2015-function-name {"node":6.5}
  transform-es2015-literals {"node":4}
  transform-exponentiation-operator {"firefox":52}
  syntax-trailing-function-commas {"firefox":52}

After:

Using plugins:
  transform-es2015-destructuring {"firefox":52}
  transform-es2015-for-of {"firefox":52}
  transform-es2015-function-name {"firefox":52}
  transform-es2015-literals {"firefox":52}
  transform-exponentiation-operator {"node":7.4}
  syntax-trailing-function-commas {"node":7.4}

:memo: Documentation

:house: Internal

v1.1.8 (2017-01-10)

:bug: Bug Fix

Makes sure that all transformations on targets (such as exclude/include) are run before logging out with the debug option. Fixes (#127).

:house: Internal

v1.1.7 (2017-01-09)

Had a publishing issue in the previous release.

v1.1.6 (2017-01-06)

:bug: Bug Fix

{
  "targets": {
    "browsers": ["ios >= 6"] // was resolving to {ios: 10} rather than {ios: 6}
  }
}

v1.1.5 (2017-01-04)

:bug: Bug Fix

{
  "presets": [
    ["env", {
      "targets": {
        "chrome": "52", // will error since it's not a number,
        "chrome": 52 // correct!
      }
    }]
  ]
}

Now it prints the transformed targets/environments rather than the browsers query.

Using targets:
{
  "chrome": 53,
  "ie": 10,
  "node": 6
}

Modules transform: false

Using plugins:
  transform-es2015-arrow-functions {"chrome":47,"node":6}
  transform-es2015-block-scoped-functions {"chrome":41,"ie":11,"node":4}

Using polyfills:
  es6.typed.uint8-clamped-array {"chrome":5,"node":0.12}
  es6.map {"chrome":51,"node":6.5}

v1.1.4 (2016-12-16)

v1.1.2-v1.1.4

:bug: Bug Fix

The new exclude/include options weren't working correctly for built-ins. (#102).

Also fixes an issue with debug option.

v1.1.1 (2016-12-13)

:bug: Bug Fix

Regression with the previous release due to using Object.values (ES2017). This wasn't caught because we are using babel-register to run tests and includes polyfills so it didn't fail on CI even though we have Node 0.10 as an env. Looking into fixing this to prevent future issues.

v1.1.0 (2016-12-13)

:rocket: New Feature

Example:

{
  "presets": [
    ["env", {
      "targets": {
        "browsers": ["last 2 versions", "safari >= 7"]
      },
      "include": ["transform-es2015-arrow-functions"],
      "exclude": [
        "transform-regenerator",
        "transform-async-to-generator",
        "map"
      ],
      "useBuiltIns": true
    }]
  ]
}

"exclude": ["transform-regenerator"] doesn't transform generators and removes regeneratorRuntime from being imported.

"exclude": ["transform-async-to-generator"] doesn't use the built-in async-to-gen transform so you can use something like fast-async.

"exclude": ["map"] doesn't include the Map polyfill if you know you aren't using it in your code (w/ useBuiltIns). (We will figure out a way to automatically do this #84).

If you pass a wrong plugin it will error: valid options for include/exclude are in /data/plugin-features.js and /data/built-in-features.js (without the es6.)

:house: Internal

:memo: Documentation

v1.0.2 (2016-12-10)

:bug: Bug Fix

Was requiring the wrong module kinda of like in v1.0.1:

https://github.com/zloirock/core-js#ecmascript-6-symbol

-import "core-js/modules/es6.object.get-own-property-symbols";

The test is just a part of Symbol.

v1.0.1 (2016-12-10)

:bug: Bug Fix

We were outputting an invalid path for regenerator!

+import "regenerator-runtime/runtime";
-import "core-js/modules/regenerator-runtime/runtime"-

v1.0.0 (2016-12-09)

:rocket: New Feature

A way to apply babel-preset-env for polyfills (via `"babel-polyfill"``).

This option will apply a new Babel plugin that replaces require("babel-polyfill") with the individual requires for babel-polyfill based on the target environments.

Install

npm install babel-polyfill --save

In

import "babel-polyfill"; // create an entry js file that contains this
// or
import "core-js";

Out (different based on environment)

// chrome 55
import "core-js/modules/es7.string.pad-start"; // haha left_pad
import "core-js/modules/es7.string.pad-end";
import "core-js/modules/web.timers";
import "core-js/modules/web.immediate";
import "core-js/modules/web.dom.iterable";

.babelrc Usage

{
  "presets": [
    ["env", {
      "targets": {
        "electron": 1.4
      },
      "modules": false, // webpack 2
      "useBuiltIns": true // new option
    }]
  ]
}

Also looking to make an easier integration point via Webpack with this method. Please reach out if you have ideas!

Electron is also an environment, so Paul went ahead and added support for this!

.babelrc Usage

{
  "presets": [ ["env", {"targets": { "electron": 1.4 }}]]
}

Currently we are manually updating the data in /data/electron-to-chromium.js, but @kevinsawicki says we could generate the data from atom-shell/dist/index.json as well! (Someone should make a PR :smile:)

v0.0.9 (2016-11-24)

:rocket: New Feature

Was as simple as modifying the chrome version and subtracting 13! (so chrome 54 = opera 41)

{
  "presets": [
    ["env", {
      "targets": {
        "opera": 41
      }
    }]
  ]
}

v0.0.8 (2016-11-16)

:nail_care: Polish

When using the debug option it was printing the data for each file processed rather than once.

{
  "presets": [
    ["env", {
      "debug": true
    }]
  ]
}

v0.0.7 (2016-11-02)

:rocket: New Feature

{
  "presets": [
    ["env", {
      "targets": {
        "node": "current" // parseFloat(process.versions.node)
      }
    }]
  ]
}
 {
  "presets": [
    ["env", {
      "targets": {
        "chrome": 52
      },
      "whitelist": ["transform-es2015-arrow-functions"]
    }]
  ]
}

:bug: Bug Fixes

Compute and use compat-table equivalents

{
  "safari6": "phantom",
  "chrome44": "iojs",
  "chrome50": "node64",
  "chrome51": "node65",
  "chrome54": "node7",
  "chrome30": "android44",
  "chrome37": "android50",
  "chrome39": "android51",
  "safari7": "ios7",
  "safari71_8": "ios8",
  "safari9": "ios9",
  "safari10": "ios10",
  "chrome50": "node6"
}
{ "presets": ["env"] } // should act the same as babel-preset-latest

Internal



JohnCoene/chirp documentation built on May 25, 2021, 6:33 p.m.