* Use regenerator-transform to implement babel-plugin-transform-regenerator.
Though I believe this is safe to merge, you may want to wait to merge it
until https://github.com/facebook/regenerator/pull/259 is merged. That
pull request also provides more explanation of why I think moving the
implementation of Regenerator back to its original repository is a good
idea. I'm happy to compromise on anything necessary to make this happen.
Note that the regenerator-transform version is pegged to an exact version
(0.9.7). Past experience has taught me that releasing new versions of
Regenerator is almost impossible if client projects are allowed to pull in
new patch versions automatically. I will happily submit a pull request
whenever a new version is released.
* Remove never-used babel-plugin-transform-regenerator/.test directory.
* regenerator-transform to 0.9.8
* Add failing test of function parameter bindings in a catch block.
This test can be run in isolation via the following command:
TEST_GREP='block-scoping.*function in catch' make test-only
This test fails because BlockScoping#getLetReferences accidentally
considers the parameters of the function declaration as let bindings in
the catch scope. When the name of the catch parameter is the same as one
of the function's parameter names, the function declaration will be
unnecessarily wrapped to isolate its parameters from the outer scope.
While the extra wrapping may not seem harmful in this case, this behavior
is a symptom of a deeper problem that causes very subtle bugs in transform
code involving catch parameters and function declarations. This test case
was just the simplest example I could find to demonstrate the problem.
I have a proposed fix for this problem that I will push as soon as the
tests fail for this commit.
* Make BlockScoping#getLetReferences ignore function parameters.
* Switch to nyc, babel-plugin-istanbul & codecov-node for code coverage
This setup (very much like Babylon's) let us trace code coverage back to the `src/` directories of packages.
* Exclude package tests from coverage report
* fix: upgrade to version of nyc that tweaks a couple more things for babel
* fix: remove comment based on @hzoo's review