Logan Smyth
231f27f170
Fix non-unique 'ref' binding name - fixes T7468
2016-06-28 19:16:44 -07:00
Logan Smyth
81e6d4147d
Map the end of block statement nodes to the end of their original location - fixes T7258
2016-04-11 01:54:41 -07:00
Logan Smyth
76bb1dffaa
Track sourcemap location on a stack - fixes T7255
2016-04-11 01:54:40 -07:00
Logan Smyth
c3ccddaaaf
Revert "Merge pull request #3433 from loganfsmyth/bail-out-rename"
...
This reverts commit 2d0a007d14e519fe60a849dd17068a0f3df79a28, reversing
changes made to e4d6d420415a0c290a321fb6c18ba5f19675b5c1.
2016-04-08 09:09:48 -07:00
Logan Smyth
3af8ec16e9
Handle input source mappings with no source location - fixes T7151
2016-04-07 09:34:45 -07:00
Logan Smyth
078f6c0ed3
Only attempt to rename export declarations, not expressions - fixes T7215
2016-03-16 23:26:52 -07:00
Logan Smyth
af4575c43e
Expand the regression tests for T2765.
2016-03-08 08:15:42 -08:00
Amjad Masad
2f654650bb
Merge pull request #3407 from babel/async-tests
...
Async context tests
2016-03-08 02:00:40 -08:00
Amjad Masad
69773a45f4
Add more async context tests
2016-03-08 00:55:42 -08:00
Amjad Masad
57c6c4ea81
Add test for T2765
2016-03-08 00:47:18 -08:00
Amjad Masad
77c7cc5363
Rework scope info updating in block-scoping transform
...
I previously tried an approach to scope bindings from var to scope but
it didn't catch all cases. This is evident in this bug:
https://phabricator.babeljs.io/T2892
Where even after transforming a const to a var we still get an error
that it's read-only.
This approach will go through and delete every existing let and const
binding and creates a new one with the kind "var"
2016-03-07 18:19:10 -08:00
Henry Zhu
1f92e5a15c
Failing test for nested async with const
2016-03-07 13:59:03 -08:00
Henry Zhu
937b8a6767
use flow instead of flow-comments
2016-03-04 15:50:05 -05:00
Sebastian McKenzie
65a4c8f4a4
Merge branch 'source-map-reenter' of https://github.com/kpdecker/babel into kpdecker-source-map-reenter
...
Conflicts:
packages/babel-generator/src/printer.js
2016-01-18 18:36:57 +00:00
Henry Zhu
10105bb077
Add test for 2892
2016-01-14 17:23:20 -05:00
Amjad Masad
0d8e5a9e86
Fix over-parenthesizing of function expressions
2015-12-24 14:55:51 -08:00
Sebastian McKenzie
1fa24b1efd
rename babel-plugin-external-helpers-2 to babel-plugin-external-helpers
2015-12-24 03:54:40 +00: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
kpdecker
9b79fbcdf5
Avoid emitting duplicate source map entries
2015-12-18 00:57:48 -06:00
Sebastian McKenzie
15969a0904
move all plugin tests out of babel-core and into their appropriate folders
2015-11-08 23:04:10 -08:00
Sebastian McKenzie
da20aa90c1
omit defaultProps helper when there are no props
2015-11-08 17:10:33 -08:00
Sebastian McKenzie
b07f8c8eab
fix react inline elements tests
2015-11-08 06:38:45 -08:00
Sebastian McKenzie
2a1a038031
move children prop pushing to after props to ensure correct order - fixes #2395
2015-11-08 06:24:10 -08:00
Sebastian McKenzie
9a1cf40296
Merge pull request #2861 from hzoo/i-2838
...
helper-remap-async-to-generator: account for ObjectMethod - fixes #2838
2015-11-06 19:40:30 -05:00
Henry Zhu
bb5a7804bc
transform-es2015-typeof-symbol: check for undefined - fixes #2865
2015-11-06 06:54:51 -05:00
Henry Zhu
042af348bc
helper-remap-async-to-generator: account for ObjectMethod - fixes #2838
2015-11-05 23:57:53 -05:00
Sebastian McKenzie
fc0baf1e2c
Merge pull request #2841 from hzoo/i-2694
...
transform-es2015-classes: check if node.id is null
2015-11-05 17:09:50 +00:00
Henry Zhu
f1a62ef078
transform-es2015-classes: check if node.id is null
2015-11-05 10:25:56 -05:00
Sebastian McKenzie
1bfb7039e9
protect against replacing a class expression with itself when attempting to infer a new function name - fixes #2803
2015-11-04 23:34:33 +00:00
Sebastian McKenzie
1796b1926c
Merge pull request #2798 from amasad/fix-2782
...
Fix recursion in async-to-generator transforms
2015-11-04 19:19:15 +00:00
Sebastian McKenzie
5aa1b29ef8
Merge pull request #2793 from amasad/fix-2789
...
Convert arrow functions when remaping to generator. Fixes #2789
2015-11-04 19:18:50 +00:00
Henry Zhu
f01d2054d4
transformation-react-inline-elements: ensure invalid identifier JSX attribute keys are quoted - fixes #2808
2015-11-04 08:47:09 -05:00
Amjad Masad
2220167903
Fix recursion in async-to-generator transforms
...
We're naming the inner generator function in the name of the
original async function. This means when people have recursive
await calls it refers to the generator version. Which is fine
if we had a `yield *` (delegate). However, if not it leads to
returning an unresolved generator object.
We can either capture all recursive calls and add a delegate, which
becomes really hard with expressions. I choose to have the name
reserved to the exposed function `retFunction`.
Fixes #2782
2015-11-03 17:05:41 -08:00
Amjad Masad
e33ad7d2fb
Convert arrow functions when remaping to generator. Fixes #2789
2015-11-03 14:58:31 -08:00
Sebastian McKenzie
a9ac3b0c94
move instanceof functionality to separate plugin - fixes #2745
2015-11-03 19:22:51 +00:00
Sebastian McKenzie
91c463c0f7
fix react inline elements plugin when creating properties out of jsx expression containers - fixes #2766
2015-11-03 03:34:46 +00:00
Sebastian McKenzie
c1cceef128
make class constructor call transform ignore derived classes and fix transforming of classes in export default position - fixes #2700
2015-11-03 03:31:05 +00:00
Sebastian McKenzie
83dca691d2
remove use strict directive
2015-11-02 19:47:09 +00:00
Sebastian McKenzie
ff8bafaece
Merge pull request #2754 from hzoo/fix-simp-comp-op
...
WIP: Fix transform-simplify-comparison-operators plugin
2015-11-02 19:37:28 +00:00
Henry Zhu
44e64c41f8
Fix transform-simplify-comparison-operators plugin
2015-11-02 14:31:48 -05:00
Sebastian McKenzie
d91fab7337
Merge pull request #2528 from STRML/react-inline-children-fix
...
optimisations.react.inline: don't pass empty array.
2015-11-02 19:31:26 +00:00
Sebastian McKenzie
82dbbc95e1
Merge pull request #2737 from babel/thejameskyle-patch-1
...
Fix minify-booleans transform
2015-11-02 19:27:53 +00:00
Sebastian McKenzie
d1d0ed901e
fix export of parameters when renaming the binding of exported functions - fixes #2753
2015-11-02 19:24:23 +00:00
James Kyle
45d8ac7c12
Add minify-booleans test
2015-11-02 00:38:56 -08:00
Sebastian McKenzie
7a3fef26fa
update tests
2015-11-02 07:11:12 +00:00
Sebastian McKenzie
41ccee89c9
fix runtime plugin helper generation - fixes #2726
2015-11-02 06:56:36 +00:00
Sebastian McKenzie
f7073383e3
fix some tests to run on node 0.10
2015-11-01 05:01:34 +00:00
Sebastian McKenzie
bbb1db7e6d
add arrow functions transform to jscript test plugins
2015-11-01 04:39:43 +00:00
Sebastian McKenzie
39bdecb119
fix async function remap helper from outputing incorrect calls causing wrong scoping - fixes #2708 - fixes #2715
2015-11-01 04:39:31 +00:00
Sebastian McKenzie
1ba7ff873c
remove excess newline
2015-10-30 23:26:28 +00:00