6338 Commits

Author SHA1 Message Date
James Kyle
fd3aad5811 Merge pull request #3193 from babel/thejameskyle-patch-1
Point devs to cli docs instead of installing
2015-12-21 17:11:01 -08:00
Amjad Masad
436a8c8461 add package names 2015-12-21 14:05:40 -08:00
Amjad Masad
189e4ecdc4 v6.3.25 changelog 2015-12-21 14:03:20 -08:00
Amjad Masad
705b0959e7 v6.3.25 2015-12-21 13:59:11 -08:00
Amjad Masad
319838bd14 Merge pull request #3192 from babel/eval-bug
Evaluation may succeed even when not confident
2015-12-21 13:55:27 -08:00
James Kyle
dbc85cff69 Point devs to cli docs instead of installing
https://github.com/babel/babel.github.io/issues/650
2015-12-21 10:34:11 -08:00
Andrey Taranov
dd0b96ca5d Allow gulp build to work on Windows
The problem with gulp pipeline is that it replaces /src/ with /lib/ in
filenames as a regex replace operation. The regex only worked for Unix
before. Here we add a 2nd regex accomodate Windows backslashes and choose
between the two by looking if we're using path.win32.  The Unix regex is
changed to only match the package/*/src. This seemingly has no effect on
the build.

Fixes T6855
2015-12-21 14:18:59 +01:00
Amjad Masad
c5f504b865 Merge pull request #3189 from hzoo/T6859
babel-generator: keep double quotes in StringLiteral for JSX parent
2015-12-21 02:51:04 -08:00
Amjad Masad
65c13d1385 Merge pull request #3187 from MakeNowJust/fix/use-strict-use-strict
Fix ignoring previous strict mode after twice "use strict"
2015-12-21 02:25:29 -08:00
Amjad Masad
6354e7185b Merge pull request #3165 from vhf/multiple-rest-arguments
[optimisation] Fixing T6818
2015-12-21 02:13:31 -08:00
Amjad Masad
a5b9afbebe Make sure we always return when not confident 2015-12-21 02:04:16 -08:00
Amjad Masad
902d04b8f1 Failing test 2015-12-21 02:04:16 -08:00
Victor Felder
27f2918abb Minor refactoring 2015-12-21 10:43:59 +01:00
Victor Felder
28adaa49b2 Order of arguments initialization - fixes T6809
When using a default param + some destructuring param + a rest param, the
initialization order of the destructured arguments was incorrect due to the
presence of the rest parameter.
2015-12-21 02:53:36 +01:00
Victor Felder
f472670503 Add test case for regression possibly introduced by #2833 2015-12-21 02:42:01 +01:00
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
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
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
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
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