facebookarchive / prepack

A JavaScript bundle optimizer.
http://prepack.io
Other
14.22k stars 425 forks source link

Fix for a serialization bug in `_getPropertyAssignmentStatement` #2591

Closed trueadm closed 5 years ago

trueadm commented 5 years ago

Release notes: none

I encountered a serialization bug in my upcoming PR that hit a case where the visitor did something that mismatched the logic in the serializer. This logic was already added to the _serializeAbstractValue method, but may have been missed from _getPropertyAssignmentStatement so this PR aims to add the same logic. There are no tests as I'm not entirely sure how to re-produce this (I've been using an internal bundle of significant size).

trueadm commented 5 years ago

Will close then for your PR :)