kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.54k stars 61 forks source link

fix: avoid deep workletization #395

Closed kirillzyusko closed 5 months ago

kirillzyusko commented 5 months ago

📜 Description

Avoid deep worletization of react-native package.

💡 Motivation and Context

It looks like in specific project setup babel plugin may try to serialize entire react-native package (see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 for more context).

To avoid that in this PR I'm extracting Platform.OS into separate OS variable, so that babel plugin will capture only value of OS (and not entire Platform object).

Closes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294

📢 Changelog

JS

🤔 How Has This Been Tested?

Tested in the project where this error occurs.

📝 Checklist

github-actions[bot] commented 5 months ago

📊 Package size report

Current size Target Size Difference
130012 bytes 129741 bytes 271 bytes 📈
kirillzyusko commented 5 months ago

Thanks @arekkubaczkowski for catching and finding/testing the fix 😊