11243 Commits

Author SHA1 Message Date
Logan Smyth
b19b7fd2cf Fix PR comments. 2018-02-27 17:46:17 -08:00
Logan Smyth
8e3e6e0a88 Require AST output to be opt-in, rather than opt-out. 2018-02-26 18:44:59 -08:00
Logan Smyth
d4a8c7672c Avoid using lodash during config loading, for require() performance. 2018-02-26 18:44:58 -08:00
Logan Smyth
600106b9cb Lazy-initialize external helper template. 2018-02-26 18:44:57 -08:00
Logan Smyth
dffcef785a Lazy-initialize helper templates. 2018-02-26 18:18:57 -08:00
Logan Smyth
cb4f4f4d5f Ensure that typechecking artifacts are built up front for watch. 2018-02-25 21:38:11 -08:00
Logan Smyth
7ff4a73916
Upgrade flow to 0.66 and fix a few minor errors. (#7431) 2018-02-25 19:22:23 -08:00
Brian Ng
8823e4247e Fix up flow errors (#7227)
* charcodes@0.1.0

* Add hasFlowComment to tokenizer/state

* Fix babel-types flow errors

* Add isIterator to tokenizer/state

* Remove unnecessary argument from flow/readToken

* Add annotation to tokenizer/isIterator

* Fix reference to generated index.js.flow

* Add workaround in babel-template expression formatter

* Fix tsEatThenParseType return type

* Fix inconsistency with ParseSubscript state

* Add workaround for flow handling error with tagged template in optional chain

* Add flow workaround in expectPlugin inside tokenizer
2018-02-25 18:12:33 -08:00
Andy
6f3be3a543 typescript: Support definite assignment assertion (#7159) 2018-02-24 16:26:07 -06:00
Andy
6f6c8dabba TypeScript: Support conditional types syntax (#7404)
Microsoft/TypeScript#21316 and Microsoft/TypeScript#21496
2018-02-24 14:56:14 +01:00
Alasdair McLeay
960fa66c9e Reinstate --inspect-brk, lost when making babel-node standalone (#7423) [skip ci] 2018-02-23 15:18:13 -05:00
Logan Smyth
df50cddd63
Replace instead of merging babel-register options, and resolve cwd up front (#7416)
Replace instead of merging babel-register options, and resolve cwd up front
2018-02-23 08:51:42 -08:00
Brian Ng
455c04e60a
Bump compat-table and regen preset-env data (#7401) 2018-02-23 08:46:14 -06:00
Brian Ng
182fe7b04e
Add missing promise polyfill deps for preset-env's useBuiltIns: usage (#7400) 2018-02-23 08:45:22 -06:00
Brian Ng
959865b48d
Update babel to beta.40 (#7413) 2018-02-23 08:44:45 -06:00
Logan Smyth
62c1046249
Avoid re-traversing inserted references to the namespace binding. (#7418) 2018-02-22 23:54:29 -08:00
Henry Zhu
70627ac92c
we can use emojis 😊[skip ci] 2018-02-22 22:01:02 -05:00
Logan Smyth
a99e9614a6 Resolve the babel-register working directory up front. 2018-02-22 18:48:36 -08:00
Logan Smyth
cfb830b5bd Overwrite instead of merging babel-register options. 2018-02-22 18:43:47 -08:00
Mike S
84de90e572 Better error message for invalid plugin/preset (#7238)
- Error for invalid plugin/preset now includes file path
2018-02-22 18:30:01 -08:00
Mateusz Burzyński
d283324f8a
Mark hoisted react constant elements as #__PURE__ (#7372) 2018-02-21 18:58:56 +01:00
Brian Ng
d75a6b8468
Remove istanbul hacks (#7403) 2018-02-21 09:56:30 -06:00
Deepak Pai
dad05ed503 Solves Tagged template literal size optimization (#7379)
* Tagged template literal size optimization
solves #7352

* Incorporates review changes
2018-02-20 15:39:22 -05:00
Justin Ridgewell
7e90d56024
Proposal: Logical Assignment Operators (#7385)
* Proposal: Logical Assignment Operators

https://github.com/jridgewell/proposal-logical-assignment

I'm bringing it [back](https://github.com/babel/babel/pull/516). 😉

* Use expectPlugin

* Add to stage 0 preset

* Add logicalAssignment missing plugin log stuff
2018-02-18 13:56:29 -05:00
Nicolò Ribaudo
3d49766f6b Don't extract rest elements from nested expressions (#7364)
* Don't extract rest elements from nested expressions

* Node 4
2018-02-17 16:22:38 +01:00
Brian Ng
4d17a96d50
Minor object-rest-spread README tweaks [skip ci] 2018-02-16 20:56:21 -06:00
James Reggio
6cbc585cf4 Fix over-zealous traversal by object-rest-spread (#7388)
Prior to this change, we'd conduct an open-ended traversal on the 'id'
of any VariableDeclarator to find a RestElement. The 'id' of
a VariableDeclarator can contain an AssignmentPattern (to supply
a default value), and if the right-hand side of the AssignmentPattern
contained a RestElement, we'd transform it.

The problem here is that the right-hand side of an AssignmentPattern can
be *any* Expression. If the right-hand side is a function body, we'd
traverse the entire function body, and if a RestElement occurred
anywhere in that function body, we'd transform it and emit the
transformations wherever we began the traversal (at least one scope
outside its usage).

The fix is to stop the inner traversal if we encounter an
AssignmentPattern. The outer traversal will still visit the
AssignmentPattern, so RestElements within the right-hand side of an
AssignmentPattern will be properly transformed at that time.
2018-02-16 21:19:09 -05:00
Andrea Puddu
ee6dfd1580 Fix object spread according to spec (#7034) 2018-02-16 20:06:17 -05:00
Logan Smyth
e732ee0c5b
Preserve import binding locations during module rewriting (#7378)
* Only wrap import references that need it.

* Preserve the import binding location for sourcemaps.

* Add tests.
2018-02-14 10:17:27 -08:00
Justin Falcone
128fc6864e Link generator readme to Babylon AST spec [skip ci] (#7380) 2018-02-14 11:40:39 -05:00
Raja Sekar
6aed8e944f updated node debugger usage command in test (#7376) [skip ci] 2018-02-13 11:17:19 -05:00
Mateusz Burzyński
4d164bd8e6
Added babel-helper-split-export-declaration (#7313) 2018-02-13 16:44:05 +01:00
Henry Zhu
ea3f2d9299 v7.0.0-beta.40 v7.0.0-beta.40 2018-02-12 11:41:13 -05:00
Vojtěch Štěpančík
88a0f52230 Fix CLI compilation callback calling (#7366) 2018-02-12 08:10:35 -05:00
Yeonghoon Park
4a2e1dbbc3 Fix stage-3 name in README.md (#7363)
[skip-ci] Fix a typo in preset-env doc: `@babel/preset-stage-3` package name.
2018-02-11 14:04:31 +02:00
Clar Roʒe
2979dd99ac Update browserslist for babel-preset-env. (#7365) 2018-02-11 09:57:50 +02:00
Suchipi Izumi
534ee4734c Extract @babel/highlight package from @babel/code-frame
This creates a new package called @babel/highlight which syntax highlights
JavaScript code for terminal output. This functionality was already
present in @babel/code-frame, but exposing it as a separate package lets
other projects leverage it. @babel/code-frame has been refactored
slightly so that it uses @babel/highlight to do its syntax highlighting.
2018-02-09 09:31:37 +01:00
Steven Hargrove
a01007a3d3 Allow falsey, yet valid options for codeFrameColumns() (#7341)
Allow for overriding default linesAbove/linesBelow values.
2018-02-08 16:52:12 -05:00
Logan Smyth
493996e02a
Merge pull request #7345 from loganfsmyth/small-bug-fixes
Small tweaks to prep for coming .babelrc lookup work
2018-02-08 13:30:49 -08:00
Justin Ridgewell
c03a34e509
Typo in nullish-coalescing-operator README.md 2018-02-08 14:34:41 -05:00
Naveen jain
92580e750d Fixes issues regarding super in optionalChain (#7356) 2018-02-08 14:31:47 -05:00
Logan Smyth
213805f21e Avoid duplicating types in index-browser. 2018-02-08 09:19:16 -08:00
Logan Smyth
28d13cb09b Fix small bug in the new .parse function. 2018-02-08 00:22:50 -08:00
Logan Smyth
9a8ba76e1f Merge .babelrc and .babelignore searching into a single pass. 2018-02-08 00:22:49 -08:00
Logan Smyth
d88173b9f8 Ensure that tests don't leave mutated global state in the environment. 2018-02-08 00:22:49 -08:00
Logan Smyth
85174b6ce1 Remove unneeded param from buildRootConfig. 2018-02-07 23:23:19 -08:00
Logan Smyth
ec2e0b664a Properly allow undefined ignore patterns for test/include/exclude. 2018-02-07 23:23:19 -08:00
Naveen jain
a3ad518ce1 [BugFix] : OptionalChaining Bug fixes (#7288)
* Added optionalExpression types to babylon and babel-types

* OptionalChain transforms bug fix

* Added OptionalExpressions to babel-generator. Fixed OptionalChain Bugs

* Removed 'optionalChain' from newExpression and added test cases

* Added test cases for optionalChain

* Update index.js
2018-02-07 19:42:14 -05:00
Nicolò Ribaudo
dd0337cc85 Fix failing test (#7344) 2018-02-06 17:42:55 -06:00
Nicolò Ribaudo
4887d81929 Remove bindings of removed paths from scope 2018-02-06 23:59:12 +01:00