-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nullish coalescing when the RHS is an object literal (#516)
Fixes #505 The RHS is meant to be transpiled into an expression arrow function, but if the expression is an object literal, it gets interpreted as a block body. To fix, we can unconditionally surround the arrow body in parens. This is a little ugly in that it leaves an extra space, but avoiding that is probably more trouble than it's worth. Also fix two issues with test infra: * The build was only running the very last build configuration due to what seems to be a breaking change in Travis. Updated the yaml file to use `jobs` instead of `matrix`, which seems to work better. * Three Babel tests had broken due to fixture tests that were testing unpinned behavior (looks like regex transformation and preset-env behavior). I was hoping to fix them by pinning the dependencies or updating to latest Babel, but ended up just updating the expected test code for now. I confirmed that this was a regression on the Babel end rather than anything caused by a Sucrase change.
- Loading branch information
1 parent
c274a7e
commit 0d91fd2
Showing
5 changed files
with
72 additions
and
16 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
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