11387 Commits

Author SHA1 Message Date
Henry Zhu
7d798952d2 v7.0.0-beta.36 v7.0.0-beta.36 2017-12-25 14:04:08 -05:00
Joe Lim
ed2b88830e Remove extraneous console output when running preset-env tests (#6576) 2017-12-25 13:47:19 -05:00
Bogdan Chadkin
d25918aa5d Fix generation flow unnamed computed property (#7095) 2017-12-22 12:55:40 -06:00
Artem Yavorsky
035286a810 [preset-env] Move all defaults to the separate module (#7084)
* preset-env: Move all defaults to the separate module.

* preset-env: Add test cases for defaults.
2017-12-22 10:42:06 -05:00
Logan Smyth
c9a00fbae8
Merge pull request #7090 from loganfsmyth/chain-processing-rewrite
Refactor config processing more
2017-12-21 19:57:07 -08:00
Logan Smyth
758fd0369c Rewrite config chain loading to build chain recursively to keep caching readable. 2017-12-21 19:06:36 -08:00
Logan Smyth
7b861796cf Centralize validation logic in common folder. 2017-12-21 14:45:19 -08:00
Logan Smyth
f9825394a7 Remove unnecessary folder nesting. 2017-12-21 14:45:19 -08:00
Logan Smyth
43e7d1d2cc Use an object instead of a 2-tuple. 2017-12-21 12:31:48 -08:00
Logan Smyth
de63443762 Split babelrc and babelignore searching into two functions. 2017-12-21 12:28:51 -08:00
Andy
6a73f39199 Support parsing export default abstract class {} (#7075) 2017-12-21 16:13:31 +01:00
Azharuddin
2190e10e9a Better error messages when Babel fails to parse import = and export =… (#7079)
* Better error messages when Babel fails to parse import = and export = syntax from typescript when using babel-plugin-transform-typescript

* Fixing Test cases

* Ran make fix and broken looong sentence into smaller

* Slight changes to Messages after review with Nicolo & existentialism

* Removed trailing space
2017-12-21 02:00:36 +02:00
Nicolò Ribaudo
ae3f5b9149
Return the obj in setPrototypeOf fallback (#7080) 2017-12-20 22:48:10 +01:00
Nicolò Ribaudo
0c885b3200 Add support for extending builtins (#7020) 2017-12-20 14:46:00 -05:00
Artem Yavorsky
148fe7d3ff Add proposal-async-generator-functions to babel-standalone (#7073) 2017-12-20 20:37:16 +01:00
Henry Zhu
cabdf3769d
Merge pull request #7065 from babel/dotall-preset-env
Add dot-all regex support to preset-env and standalone
2017-12-19 20:45:18 -05:00
Logan Smyth
1178799f07 Remove the LoadedFile class. 2017-12-19 15:36:54 -08:00
Logan Smyth
b2f1d01965 Add type annotations to utility file. 2017-12-19 15:36:19 -08:00
Logan Smyth
4f53496546 Drop the OptionManager class in favor of function. 2017-12-19 14:19:37 -08:00
Logan Smyth
1312a30d54 Perform normalization in the chain building process. 2017-12-19 14:19:37 -08:00
Logan Smyth
4afbc02476 Move descriptor merging into config chain processing. 2017-12-19 14:19:37 -08:00
Brian Ng
080c7f1e2d
Clean up logPlugin 2017-12-19 14:57:19 -06:00
Brian Ng
3cea9f412a
Add dot-all regex support to preset-env and standalone 2017-12-19 11:39:00 -06:00
Brian Ng
cd10ea03b4
Fix bug with debug output and unreleased versions 2017-12-19 11:38:59 -06:00
Mathias Bynens
5f8a1a2613 Fix unicode-property-regex installation instructions (#7064) 2017-12-19 11:27:26 -06:00
Mathias Bynens
44da8201a5 Import babel-plugin-transform-dotall-regex (#7059)
Original: https://github.com/mathiasbynens/babel-plugin-transform-dotall-regex

Moving it into the official Babel repository makes it easier to maintain the transform.
2017-12-19 11:01:59 -05:00
Brian Ng
2b065350b5 Treat import type * as a parser error (#7061) 2017-12-19 10:54:20 -05:00
Nicolò Ribaudo
68476b6ddd
Make .insert{Before,After} work by default when the parent is an eport declaration (#7040) 2017-12-19 00:05:29 +01:00
Maaz Syed Adeeb
17b37b5013 Handling babylon parsing errors in a better way (#6961)
* Handling babylon parsing errors in a better way

* Better error messages + Helpful URLs

* Replaced message from babylon completely

* Add importMeta plugin to the map
2017-12-18 15:49:34 -05:00
Bo Lingen
56638e1370 Add pipeline operator plugins to babel-standalone (#6955) 2017-12-18 10:10:20 -06:00
Francisco Ryan Tolmasky I
f0e46772a6 babel-types lists JSXIdentifier as an Expression (#6960)
Currently, Babel is treating JSXIdentifier, JSXMemberExpression, and JSXEmptyExpression as expressions as well, which means Babel will for example incorrectly allow you to place these anywhere an expression is wanted.

Closes #6851.
2017-12-18 09:27:43 -06:00
Mahmut Surekci
398bc43656 Add MIT license to proposal-unicode-property-regex (#7047) 2017-12-18 13:48:30 +01:00
Logan Smyth
44ea9433c0
Merge pull request #6952 from loganfsmyth/commonjs-lazy
Add a 'lazy' options to modules-commonjs
2017-12-17 19:32:51 -08:00
Logan Smyth
53826aaaa0 Expose a 'lazy' option for the CommonJS transform. 2017-12-17 18:42:35 -08:00
Logan Smyth
b900a3e5c2 Consistently return AST nodes. 2017-12-17 18:33:47 -08:00
dnalborczyk
ed4d90b33d expose import.meta syntax parser option as plugin (#7008) 2017-12-16 15:06:23 -06:00
Anthony Bianco
209a598d51 Fix loose option description in transform-modules-commonjs 2017-12-16 14:41:05 -06:00
Nicolò Ribaudo
9a146d01b0 [decorators] Don't transform every AssignmentExpression (#7032) 2017-12-15 16:17:31 -05:00
Rouven Weßling
f2437583ba Bump globals to version 11.1.0 (#7006) 2017-12-15 13:20:22 -05:00
Sven SAULEAU
a24c9f8ed6
Merge pull request #7028 from sophiebits/getLetReferences-n2
Fix O(n^2) getLetReferences – 40% faster on large flat files
2017-12-15 07:59:57 +01:00
Sophie Alpert
6a7223af29 Fix O(n^2) getLetReferences – 40% faster on large flat files
`this.blockPath.get("body")` constructs an array of paths corresponding to each node in `blocks.body` so takes O(n) time if n is that length. We were re-constructing that array on each iteration, so the entire loop was O(n^2).

On files with many statements in a single block (such as Rollup-generated bundles), this takes a large portion of time. In particular, this makes transforming react-dom.development.js about 40% faster. Not that you should be transforming our bundle with Babel.

Test Plan:
Make an HTML file with these three lines and watch it in the Chrome Performance tab to see timings (on my machine: 2.9s before, 1.6s after):

```
<!DOCTYPE html>
<script src="https://unpkg.com/babel-standalone@7.0.0-beta.3/babel.js"></script>
<script type="text/babel" src="https://unpkg.com/react-dom@16.2.0/umd/react-dom.development.js"></script>
```
2017-12-14 21:55:26 -08:00
Diogo Franco
a66845169f
Rename misleading identifier
notRegenerator actually _enabled_ transforming regeneratorRuntime references.
2017-12-15 11:20:15 +09:00
Henry Zhu
8a4124b2ff v7.0.0-beta.35 v7.0.0-beta.35 2017-12-14 16:47:27 -05:00
Nicolò Ribaudo
05b22d2597
Update @babel/helper-wrap-function templates (#6984)
This commit introduces 4 changes:

1) Function declarations are wrapped using function declarations.
   This has two advantages:
    - We can rely on native hoisting, instead of using _blockHoist
    - The function isn't wrapped until it is called. This avoids
      problems where `regeneratorRuntime.wrap` was called before
      that `babel-polyfill` was imported.

   Example:
     function fn() {}
     // becomes
     function fn() { return _fn.apply(this, arguments); }
     function _fn() {
       _fn = _wrapper(/* Original function ... */);
       return _fn.apply(this, arguments);
     }

2) Use a single template for both named and anonymous function
   expressions. They already had the same behavior, but the one
   used for named functions was a bit longer.

3) Use normal functions instead of arrow functions to wrap
   function expressions.

4) Generate a name based on the original one for wrapped
   functions (e.g. `foo` becomes `_foo` instead of `_ref`).
2017-12-13 16:21:58 +01:00
Peri Nikhil
9cc0a26694 Move helpers from 'babel-plugin-proposal-decorators' to 'babel-helpers' (#7017) 2017-12-13 16:08:19 +01:00
Brian Ng
f5ef928586
Add method property to ObjectTypeProperty (#7005) 2017-12-11 09:32:16 -06:00
Brian Ng
42f66782be
Improve error message in types assert (#7001) 2017-12-11 09:31:56 -06:00
Daniel Poindexter
12ac1bccd7 Fix type definitions to fully support Typescript (#6939) 2017-12-08 17:03:01 -06:00
Diogo Franco
82357d79a7 Workaround bad #__PURE__ annotation placement on IIFEs (#6999)
Based on a fix suggested by @kzc
2017-12-08 09:51:48 -05:00
Diogo Franco
2958548c2c
Fix code generation for async generator methods (#6998)
Fixes generator to write `async *foo() {}` instead of `*async foo() {}`.
2017-12-08 17:38:31 +09:00