Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add detection of logical assignment operators to `react-native-babel-…
…preset` (facebook#39186) Summary: Though not currently in use in the RN code, when `react-native-windows` tried to integrate changes up to 7/28/23 (see PR microsoft/react-native-windows#11970) there happened to be a `??=` operator in the `virtualized-lists` package (see [diff here](facebook/react-native@ccc50dd...c168a4f#diff-abeff2daf5909e54a23562e43569de1d5b8db1d7170119eed485b618cdf04ec7R322)). (The offending line was removed in a later commit). The default RNW engine is still Chakra and it couldn't handle the syntax. It looks like the `babel/plugin-proposal-nullish-coalescing-operator` plugin only handles `??`, so to handle `??=` I've added `babel/plugin-proposal-logical-assignment-operators`, which also happens to handle the logical assignment operators `||=` and `&&=`. Closes facebook#31704 ## Changelog: [GENERAL] [FIXED] - Add detection of logical assignment operators to `react-native-babel-preset` Pull Request resolved: facebook#39186 Test Plan: We started using these plugins in RNW's babel config to resolve the issue in our integrate PR. Reviewed By: motiz88 Differential Revision: D50936554 Pulled By: rozele fbshipit-source-id: 0a924b6085524d8c9551a158b91195b1f7448c19
- Loading branch information