1380 Commits

Author SHA1 Message Date
Amjad Masad
95c93dd22b Method names should not be bound to body
As an artificat of compiling methods to named function expressions the
function name is being considered a "local" binding in the function
body. This means that we will throw errors anytime someone would want to
create a new local binding with the same name.

This is solved by assigning a symbol to function Identifiers that
indicates that they should not be considered local bindings.
2016-01-17 13:19:37 -08:00
Henry Zhu
9d0a05ecde Merge pull request #3268 from hzoo/t2892-test
Add test for T2892
2016-01-14 18:40:30 -05:00
Henry Zhu
10105bb077 Add test for 2892 2016-01-14 17:23:20 -05:00
Henry Zhu
8644e5f27c v6.4.4 2016-01-14 17:05:41 -05:00
Henry Zhu
4638f4db4d republish transform-regenerator 2016-01-14 17:03:39 -05:00
Amjad Masad
3f2a445c9a v6.4.3 2016-01-13 21:56:22 -08:00
Amjad Masad
d3242e8513 Merge pull request #3261 from jmm/array-expr-builder-default
Add ArrayExpression.elements.default
2016-01-13 21:23:03 -08:00
Amjad Masad
ee1e16f76d Merge pull request #3162 from loganfsmyth/requeue-generators-6676
Requeue generators for re-traversal so we pick up regeneratorRuntime - fixes T6676
2016-01-13 21:22:03 -08:00
Amjad Masad
add96d626d Double quotes 2016-01-12 17:30:53 -08:00
Amjad Masad
0d9459dbb6 Fix minified labeledStatement printing
Unary expressions with alphabetic operators like 'void' were being
squished next to the statement.
2016-01-12 17:28:46 -08:00
Amjad Masad
b7aa49d9f5 Merge pull request #3250 from babel/symbol-rename
[T6933] Rename any shadowing Symbol binding
2016-01-12 17:02:16 -08:00
Jesse McCarthy
0f85e79f67 Add ArrayExpression.elements.default. 2016-01-12 11:33:08 -05:00
Amjad Masad
6a3b3dc3e9 Merge pull request #3252 from caseywebdev/fix-amd-umd-use-strict
Fix T2929, T6796, stop leaking directives
2016-01-11 17:34:51 -08:00
Amjad Masad
bad98a1056 Merge pull request #3232 from jonathanong/babel-register-cache-mkdirp
babel register cache: make sure the cache file's directory exists
2016-01-11 17:34:08 -08:00
Mathias Bynens
430e80fe0e Use only regexpu-core instead of all of regexpu
Ref. https://github.com/mathiasbynens/regexpu/issues/24.
2016-01-11 19:32:19 +01:00
Casey Foster
c7c4d7f5fd Fix T2929, T6796, stop leaking directives 2016-01-08 15:29:42 -06:00
ForbesLindesay
bd7b202866 Document options for babel-generator 2016-01-08 14:38:37 +00:00
Amjad Masad
1d4d0c0175 [T6933] Rename any shadowing Symbol binding 2016-01-07 21:02:59 -08:00
Henry Zhu
7af1bd4354 v6.4.2 2016-01-06 21:26:43 -05:00
Henry Zhu
a156dd2918 Merge pull request #3247 from babel/await-paren
Parenthesize await/yield expression in binary expr
2016-01-06 21:18:08 -05:00
Amjad Masad
17ea5cd916 Fix failing test 2016-01-06 17:50:17 -08:00
Amjad Masad
a41c486155 Merge pull request #3246 from babel/kpdecker-rest-length-fail
Support expressions in rest arg access
2016-01-06 19:40:49 -06:00
Amjad Masad
feedc527a1 Merge pull request #3244 from hzoo/cp-loc
`babylon`: fix error location for class properties with a missing sem…
2016-01-06 19:39:22 -06:00
Amjad Masad
139503e86f Parenthesize await/yield expression in binary expr 2016-01-06 17:35:39 -08:00
Amjad Masad
59ea034df2 Support expressions in rest arg access
The current implementation assumes a numeric literal although it just
checks the base type.
2016-01-06 17:07:05 -08:00
Amjad Masad
88d57b58a4 Merge branch 'rest-length-fail' of https://github.com/kpdecker/babel into kpdecker-rest-length-fail 2016-01-06 16:46:16 -08:00
Amjad Masad
ada2fdbe4b v6.4.1 2016-01-06 16:27:49 -08:00
Amjad Masad
ec983b276e add assignment expression parentheses test 2016-01-06 16:03:45 -08:00
Amjad Masad
6abee425d3 Revert "babel-types: add Binary alias to AssignmentExpression definition (fixes T6887)"
This was causing problems with parenthesizing assignment expression
This reverts commit b5cf529d6b342b3dd8dd49c50cc9cd5fed4fc5a7.
2016-01-06 15:59:39 -08:00
Henry Zhu
f31099f383 babylon: fix error location for class properties with a missing semicolon 2016-01-06 18:42:26 -05:00
kpdecker
28280be3ed Add failing tests case for 6.4 rest.length issue 2016-01-06 17:34:43 -06:00
Henry Zhu
8cac20d845 v6.4.0 2016-01-06 15:34:12 -05:00
Amjad Masad
e79c625091 Merge pull request #3229 from hzoo/T6913
Add a check for parentheses for AwaitExpressions (fixes T6913)
2016-01-06 14:22:54 -06:00
Sebastian McKenzie
72c091b63a Ensure regenerator option for babel-plugin-transform-runtime doesn't cancel out core-js polyfill 2016-01-06 15:26:00 +00:00
Sebastian McKenzie
b28803c698 Merge pull request #3235 from guybedford/polyfillRuntime
Ensure opts.polyfill = false behaves correctly for runtime-transformer
2016-01-06 15:23:41 +00:00
Sebastian McKenzie
d2f5a409da Merge pull request #3225 from hzoo/cp-semi
`babylon`: throw parse error if class properties do not have a semico…
2016-01-06 15:22:37 +00:00
Sebastian McKenzie
e6e13cbe35 Merge pull request #3166 from guybedford/moduleName
Add __moduleName support to System.register
2016-01-06 15:11:34 +00:00
Mike Anderson
2471d80bd0 Fix small typo in babel-generator README 2016-01-05 23:33:50 -06:00
Sam Goldman
aeeffe5cff Guard export interface against isExportDefaultSpecifier 2016-01-05 17:28:21 -08:00
Sam Goldman
17d19a0056 Add export interface Flow syntax support
An interface export is just like a type export. In fact, it's a syntax affordance which makes the following equivalent:

```javascript
interface I_ { ... }
export type I = I_;
```

```javascript
export interface I { ... }
```

See facebook/flow#1145
2016-01-05 15:57:45 -08:00
Henry Zhu
cf41c321af Don't overparenthesize, add yield tests 2016-01-05 18:12:25 -05:00
guybedford
d5f71d4a32 ensure opts.polyfill = false behaves correctly for runtime-transformer 2016-01-06 00:26:45 +02:00
Amjad Masad
06545e6f70 Merge pull request #3217 from babel/hzoo-patch-1
`babel-types`: add `Binary` alias to `AssignmentExpression` definitio…
2016-01-05 16:26:02 -06:00
jongleberry
37dbf7c5ed babel register cache: make sure the cache file's directory exists 2016-01-04 14:28:38 -08:00
Sam Goldman
26c97c4069 Add support for "declare interface" Flow syntax
This has been a feature in Flow for a long time (couldn't easily find a
specific commit adding this). Interfaces are basically undocumented, though, so
it's easy to see how this was missed.
2016-01-04 11:50:12 -08:00
Sam Goldman
e764346d5f Add support for "declare type" Flow syntax
See facebook/flow#1105
2016-01-04 11:42:43 -08:00
Henry Zhu
ab2135bc9f Add a check for parentheses for AwaitExpressions (fixes T6913) 2016-01-04 08:31:07 -05:00
Sebastian McKenzie
3fa51097a6 Revert "remove array generics from runtime" 2016-01-03 03:42:10 +00:00
Sebastian McKenzie
4e20a99b89 Revert "update core-js" 2016-01-03 03:41:40 +00:00
Henry Zhu
b5cf529d6b babel-types: add Binary alias to AssignmentExpression definition (fixes T6887) 2016-01-01 14:44:28 -05:00