dawson-org / dawson-cli

A serverless web framework for Node.js on AWS (CloudFormation, CloudFront, API Gateway, Lambda)
https://dawson.sh
GNU General Public License v3.0
712 stars 25 forks source link

Update babel-preset-env to the latest version 🚀 #89

Closed greenkeeper[bot] closed 7 years ago

greenkeeper[bot] commented 7 years ago

Version 1.0.0 of babel-preset-env just got published.

Dependency babel-preset-env
Current Version 0.0.9
Type devDependency

The version 1.0.0 is not covered by your current version range.

Without accepting this pull request your project will work just like it did before. There might be a bunch of new features, fixes and perf improvements that the maintainers worked on for you though.

I recommend you look into these changes and try to get onto the latest version of babel-preset-env. Given that you have a decent test suite, a passing build is a strong indicator that you can take advantage of these changes by merging the proposed change into your project. Otherwise this branch is a great starting point for you to work on the update.


Release Notes v1.0.0

v1.0.0 (2016-12-09)

🚀 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/electronToChromium.js, but @kevinsawicki says we could generate the data from atom-shell/dist/index.json as well! (Someone should make a PR 😄)

Commits

The new version differs by 29 commits .

  • e07b2da 1.0.0
  • 8a674ce changelog (#65)
  • cbd52de add tests for electron option
  • 57a23f5 Map Electron versions to Chromium ones
  • 48f5e22 Merge pull request #56 from babel/builtins-option
  • 96fdc57 always include web polyfills for now
  • 370125e remove console.log, fix tests
  • e9c42bc Use array features for symbol and array.iterator (#64)
  • 1860aab do not count against if core-js does not implement
  • ef71ac8 also import regenerator when the transform is required
  • 8bf8182 also transform 'core-js'
  • 6437e4a prevent duplicate imports
  • 5b11096 extra tests
  • 2f6d83f account for multiple features (#62)
  • 74c7804 separate years, add es2016, es2017

There are 29 commits in total. See the full diff.

Not sure how things should work exactly? There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html) and of course you may always [ask my humans](https://github.com/greenkeeperio/greenkeeper/issues/new).

Your Greenkeeper Bot :palm_tree:

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 70.522% when pulling 8b5945f5fa679bd9c5958c9e163bbda1d8461a3d on greenkeeper/babel-preset-env-1.0.0 into 5c892c26be3672322d47b43c4d9d0aef67720d03 on master.