-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(js): add compatibility mode option to JS compiler
Partially implements #1049. This required a substantial refactor of `compiler.go`, mostly in order to be able to test a compiler with different compatibility mode values during the same test run, which was problematic since `compiler.Compiler` was a singleton. So the solution is to instead make a new `babel` struct the singleton, which encapsulates everything needed for Babel to run, while allowing several `Compiler` instances to exist. In the author's humble opinion, this has the added benefit of being a cleaner design (which was further experimentally expanded in 4e52c78).
- Loading branch information
Ivan Mirić
committed
Oct 25, 2019
1 parent
bbe7794
commit c463026
Showing
8 changed files
with
352 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.