Migrate StyleSheet/*.js to use export statements#48609
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
66563a6 to
35fcfba
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
35fcfba to
6b7bfda
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
6b7bfda to
d816c82
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
d816c82 to
d24e231
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
d24e231 to
d4c91e3
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
d4c91e3 to
204a11b
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
204a11b to
56af623
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
Summary: # 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
56af623 to
1bac5c0
Compare
|
This pull request was exported from Phabricator. Differential Revision: D68017325 |
|
This pull request has been merged in e4d969a. |
|
This pull request was successfully merged by @iwoplaza in e4d969a When will my fix make it into a release? | How to file a pick request? |
|
This pull request has been reverted by 0f1d470. |
Summary:
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
module.exportsintoexport defaultfor files located inLibraries/StyleSheet/*.js. Some files were omitted due to ballooning complexity, but will be addressed in other Diffs.requires intoimports where applicable, taking into account the performance implications (context: https://fb.workplace.com/groups/react.technologies.discussions/permalink/3638114866420225/)Changelog:
[General][Breaking] - Deep imports from some files in
StyleSheet/can break when using therequire()syntax, but can be easily fixed by appending.defaultDifferential Revision: D68017325