7179 Commits

Author SHA1 Message Date
Henry Zhu
276c98f7f0 Remove await* from babel-generator, add parsing error to babylon - (fixes T6688) 2015-12-19 23:15:09 -05:00
Henry Zhu
379be365d6 babel-generator: keep double quotes in StringLiteral for JSX parent (fixes T6859) 2015-12-19 22:12:41 -05:00
Amjad Masad
bbd14f88c4 Merge pull request #3188 from steveluscher/patch-3
Make use of `opts.quotes` in the CodeGenerator
2015-12-18 19:15:14 -08:00
Steven Luscher
370c3ad343 Make use of opts.quotes in the CodeGenerator
I think we're meant to respect the value of `opts.quotes`, and try to infer it if none was supplied.
2015-12-18 18:23:20 -08:00
TSUYUSATO Kitsune
eb2266fb1a Fix ignoring previous strict mode after twice "use strict"
For example:

    var foo = function () {
      "use strict";
      "use strict";
      // there is inside of strict mode,
      // so `0123` (octal number) occurs a syntax error.
    };
    // there is outside of strict mode,
    0123; // so left is valid syntax.
    // however:
    //   SyntaxError: Invalid number (8:0)

I fixed it and add the test case.
2015-12-19 09:26:10 +09:00
Amjad Masad
691741d201 changelog for 6.3.24 2015-12-18 15:57:14 -08:00
Amjad Masad
2b69dec01a v6.3.24 2015-12-18 15:53:49 -08:00
Amjad Masad
fdac02fa26 Merge pull request #3184 from babel/workaround-inference
Test and workaround inference bugs
2015-12-18 15:33:42 -08:00
guybedford
40714d004c add __moduleName wrapper support 2015-12-18 20:42:35 +02:00
Victor Felder
5d414a2323 Handle case where optimisation concist of only replacing rest param id with args 2015-12-18 17:43:00 +01:00
Henry Zhu
472ad1e6a6 update changelog for 6.3.21-6.3.23 2015-12-18 11:06:00 -05:00
Henry Zhu
b79ff75c31 v6.3.23 2015-12-18 10:18:12 -05:00
Henry Zhu
ed6daa794f Merge pull request #3169 from hzoo/rename-flow-comments
rename flow-comments plugin to transform-flow-comments
2015-12-18 10:07:30 -05:00
Amjad Masad
57b2ccdb66 Test and workaround inference bugs 2015-12-18 03:15:27 -08:00
Victor Felder
6cc0538d2f Safely transform all usages of rest arguments 2015-12-18 11:30:48 +01:00
Victor Felder
2dea8b2352 Safely transform multiple rest arguments 2015-12-18 11:30:48 +01:00
Victor Felder
3dfb4eb8c6 Simplify rest transformation 2015-12-18 11:30:48 +01:00
Amjad Masad
31032ee7ad v6.3.21 2015-12-18 00:23:03 -08:00
Amjad Masad
135e1e56ca Merge pull request #3182 from babel/arrow-fn
Parenthesize arrow function when part of logical or binary expression
2015-12-18 00:11:24 -08:00
kpdecker
9e382b1686 Fix aux comment termination in lists and calls 2015-12-18 01:37:26 -06:00
kpdecker
3791491b79 Strip location information from import remaps
Fixes https://phabricator.babeljs.io/T6851
2015-12-18 01:36:24 -06:00
Amjad Masad
4aaaeb9ccf decouple arrow functions from function exprs 2015-12-17 23:31:52 -08:00
Amjad Masad
c889ef4058 Parenthesize arrow function when part of logical or binary expression 2015-12-17 23:18:43 -08:00
kpdecker
94e7e4da8e Update source map handling to be reentrant
Rather than repeating the original location when we exit a node, we need to restore the previous parent’s original line location, since the source map format denotes the start location.
2015-12-18 01:11:32 -06:00
Amjad Masad
4c693085a6 Merge pull request #3180 from babel/needsblock
Handle nested if statements with alternates in printer
2015-12-17 23:06:05 -08:00
kpdecker
9b79fbcdf5 Avoid emitting duplicate source map entries 2015-12-18 00:57:48 -06:00
Amjad Masad
9de3a3cbb9 Merge pull request #3176 from jmm/T6779-func-name-method
Don't transform method definition in transform-es2015-function-name (T6779)
2015-12-17 22:54:39 -08:00
Amjad Masad
cda9fd291f Merge pull request #3143 from fabiomcosta/improved_rest_transform_optimisations
[babel-plugin-transform-es2015-parameters][T6774] more opportunities for optimizations
2015-12-17 22:50:28 -08:00
Amjad Masad
47b686b6fa Handle nested if statements with alternates in printer
Previously we saw a bug that when we have nested if statements
and an alternate then the generated code may confuse which
if statement the alternate belongs to.

e.g.

```
if (foo) if (bar) bar(); else baz();
```

But this was handled by looking at the consequent
and if it's an if we add a block. However we didn't
handle situations where it's not an if but the last
recursive statement is an if:

```
if (foo) while (bar) if (baz) baz(); else shoosh()
```

This handles it by recurring until we get the last
statement.
2015-12-17 22:41:55 -08:00
Henry Zhu
0749e2dd92 Merge pull request #3179 from mroch/flow_0_20_0
Upgrade to flow 0.20.0
2015-12-17 16:05:32 -05:00
Marshall Roch
8b55f4dfc2 Upgrade to flow 0.20.0 2015-12-17 12:49:48 -08:00
Henry Zhu
c0e322d74a Merge pull request #3177 from steveluscher/patch-1
Clarify description of `comments` config.
2015-12-17 14:18:37 -05:00
Henry Zhu
8ea45fb0e0 Merge pull request #3178 from steveluscher/patch-2
Correct type annotation for `shouldPrintComment`
2015-12-17 14:17:35 -05:00
Steven Luscher
b6dabff82e Correct type annotation for shouldPrintComment
I think this is supposed to be a `Function` that returns a `boolean`.
2015-12-17 10:50:59 -08:00
Fabio M. Costa
3868d36e31 [babel-plugin-transform-es2015-parameters] more oportunities for optimisations 2015-12-17 10:50:56 -08:00
Steven Luscher
603bb64db0 Clarify description of comments config.
It doesn't mean anything for “strip/output” to be “on.”
2015-12-17 10:36:10 -08:00
Sebastian McKenzie
16ae7c2d9a Merge pull request #3171 from babel/inference-recursion
Inference recursion
2015-12-17 14:44:29 +00:00
Sebastian McKenzie
a8a58aaa07 Fix infinite recursion bug 2015-12-17 14:44:18 +00:00
Amjad Masad
b802034a25 Merge pull request #3173 from voideanvalue/T6829
[babel-generator] fix unhandled new-precedence edge case
2015-12-16 13:32:18 -08:00
voideanvalue
2ac8e836f5 [babel-generator] fix unhandled new-precedence edge case 2015-12-16 12:51:13 -08:00
Henry Zhu
fa96d15793 add 6.3.20 changelog 2015-12-16 15:32:32 -05:00
Amjad Masad
c451222d6e v6.3.20 2015-12-16 12:24:45 -08:00
Amjad Masad
4bb7dbabb0 Merge pull request #3170 from babel/fix-numeric-member-expr
Fix invalid codegen for number member expr
2015-12-16 12:21:42 -08:00
Amjad Masad
178da2f59b var 2015-12-16 12:20:49 -08:00
Henry Zhu
6fd294057e Merge pull request #3172 from babel/thejameskyle/T6805
Add Expression alias to BindExpression
2015-12-16 09:48:54 -05:00
Henry Zhu
ed016aef9e add functionBind to babylon plugins readme 2015-12-16 09:47:08 -05:00
James Kyle
2141406c86 Add Expression alias to BindExpression 2015-12-15 23:37:29 -08:00
Amjad Masad
12fac9cadf Inference recursion bug 2015-12-15 19:56:27 -08:00
Amjad Masad
320cede9be Fix invalid codegen for number member expr 2015-12-15 17:47:46 -08:00
Henry Zhu
33ce926c7f rename flow-comments plugin 2015-12-15 20:14:47 -05:00