This also fixes enum not adding the respective declaration to the scope
during the typescript visitation.
Rewrites:
2080042808b18b005fb54aeaf9ab708f64cb1005 #9944
a6392bd636d07c41579ea5ab443152a09943e096 #10019
* test case for insertBefore for jsx
* fix unshiftContainer and insertBefore
* use path.scope.push
* add test making sure computedKeys var declaration at the right block
* add comment
* nit [skip ci]
This reverts commit 43b83f8ed7545b9c049eeed85541fa162842fb8f.
Fix objectSpread helper breaking old codes
remove tests to regenerate later
renamed output
new name
try using word
add comment as requested
revert inline name changes
add 2 for consistency
Update packages/babel-helpers/src/helpers.js
Co-Authored-By: Daniel Tschinder <daniel@tschinder.de>
* Fix location with optional params in arrow functions
* add test
* Ensure rollup replaces NODE_ENV and create sourcemap in dev
* Ensure finishNod*() is never called twice on a node
* Fix check for already finished nodes
* fix(typescript): erase type exports
* use Set instead of array for tracking and checking TS type declarations
* add a test for an interface exported before its declaration
* Fixed null error in plugin opts and added a test for it
* Remove !opts and add opts === null check to avoid confusion with false and undefined cases
Co-Authored-By: divbhasin <divbest99@gmail.com>
GitHub actions are too slow for this, it takes more than 15 mins.
Publishing to npm from GH actions is a cool idea, but it's a lot faster to
publish locally.
Also, I think that since when I introduced this action I
always killed it; either because it was to slow or because I had to
make some manual tweaks during the release.
* [parser] Allow plugins to extend ScopeHandler
* Directly extend Scope
* Don't use new.target to get the ScopeHandler
* [parser] Add TS enum support to the Scope
* Remove duplicated options in tests
* Fix
* Fix flow
* Rename tests
* Add tests
* Full typescript support in scope
* Remove BIND_SIMPLE_CATCH
SCOPE_SIMPLE_CATCH was used instead
* Export TS types
* Register function declarations
* Fix body-less functions and namespaces
1) Move this.scope.exit() for functions from parseFunctionBody to the callers.
Otherwise the scope of body-less functions was never closed.
Also, it is easier to track scope.exit() if it is near to scope.enter()
2) Register namespace ids for export
* Disallow redeclaration of enum with const enum