Justin Ridgewell
4daf11528c
Return inserted/replaced paths ( #5710 )
...
* Return inserted/replaced paths
This gives `Path`’s replacement and insertion methods a consistent
return value: the inserted/replaced paths.
Before, they could return `undefined`, a `node`, or a the current path
inside an array. It was kinda pointless. But now they always return an
array of paths, which is useful for solving
https://github.com/babel/babel/pull/4935#discussion_r96151368 .
* Return inserted nodes and not BlockStatement
Addded test for bug #4363
* Cleanups
- `#replaceWith` will now return the current path if it's the same node
- `#insertAfter` and `#insertBefore` use public Path APIs now
- Makes container insertion faster (single splice call)
- Use public APIs in container insertion
- Replacing a statement with an expression returns the expression's path
- Replacing an expression with multiple statements returns the inserted
closure's body's paths.
2017-09-11 16:07:04 -04:00
..
2017-09-09 20:38:06 -04:00
2017-08-31 22:56:29 +02:00
2017-09-11 11:18:37 -04:00
2017-09-02 01:02:21 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-31 17:44:17 +02:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-11 11:18:37 -04:00
2017-09-05 14:24:21 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-11 16:07:04 -04:00
2017-09-11 16:07:04 -04:00
2017-08-31 22:56:29 +02:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-11 16:07:04 -04:00
2017-09-11 11:18:37 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-09 20:33:35 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-09 20:33:35 -04:00
2017-08-30 15:02:49 -04:00
2017-09-11 11:18:37 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-11 11:18:37 -04:00
2017-09-11 11:18:37 -04:00
2017-09-11 11:18:37 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-11 11:16:14 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-04 00:25:56 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-31 17:44:17 +02:00
2017-09-11 11:18:37 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-11 10:37:18 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-09-02 01:07:26 -04:00
2017-08-30 15:02:49 -04:00
2017-08-30 15:02:49 -04:00
2017-08-31 22:56:29 +02:00
2017-09-11 16:07:04 -04:00
2017-08-31 22:56:29 +02:00
2017-08-24 15:43:01 -04:00
2015-10-29 17:51:24 +00:00