-
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
Nov 12, 2019
1 parent
9c73438
commit a850742
Showing
8 changed files
with
350 additions
and
174 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.