6597 Commits

Author SHA1 Message Date
Amjad Masad
76eae9bcd8 add failing test 2015-12-22 20:47:08 -08:00
Jesse McCarthy
77f5d30fb1 Add test for file-relative addon resolution
Plugins & presets.
2015-12-22 14:25:23 -05:00
Henry Zhu
aa2cc907ea validate: allow JSXText node in JSXElement children property (fixes T6876) 2015-12-22 09:35:14 -05:00
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
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