mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e4d969a4ab
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48609 # Motivation This is an attempt at modernizing the export syntax in some of the files in `Libraries/StyleSheet/`. It will allow these files to get properly ingested by modern Flow tooling. # This diff - Migrates the use of `module.exports` into `export default` for files located in `Libraries/StyleSheet/*.js`. Some files were omitted due to ballooning complexity, but will be addressed in other Diffs. - Updating internal *require*s to use ".default", no product code seems to be affected. - Migrating `require`s into `import`s where applicable, taking into account the performance implications (context: https://fb.workplace.com/groups/react.technologies.discussions/permalink/3638114866420225/) - Updates the current iteration of API snapshots (intended). - Updates `react-native-codegen`'s require of processColorArray, analogous to D42346452. Changelog: [General][Breaking] - Deep imports from some files in `StyleSheet/` can break when using the `require()` syntax, but can be easily fixed by appending `.default` Reviewed By: javache Differential Revision: D68017325 fbshipit-source-id: 3c5b94742f101db0b2914c91efab6003dba2b61a