mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate StyleSheet/processColorArray.js to use export syntax (#48905)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48905 ## Motivation Modernising the react-native codebase to allow for ingestion by modern Flow tooling. ## This diff - Updates `Libraries/StyleSheet/processColorArray.js` to use `export` syntax. - Appends `.default` to requires of the changed files. - Updates test files. - Updated View Config codegen (requires an MSDK bump). - Updates the public API snapshot *(intented breaking change)* Changelog: [General][Breaking] - Files inside `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax. Reviewed By: robhogan Differential Revision: D68564304 fbshipit-source-id: 2fbd058be1a715cccfce4f2a68146118d8ac66ad
This commit is contained in:
committed by
Facebook GitHub Bot
parent
aac312da8e
commit
156ee5bee7
+1
-1
@@ -91,7 +91,7 @@ function getReactDiffProcessValue(typeAnnotation: PropTypeAnnotation) {
|
||||
switch (typeAnnotation.elementType.name) {
|
||||
case 'ColorPrimitive':
|
||||
return j.template
|
||||
.expression`{ process: require('react-native/Libraries/StyleSheet/processColorArray') }`;
|
||||
.expression`{ process: require('react-native/Libraries/StyleSheet/processColorArray').default }`;
|
||||
case 'ImageSourcePrimitive':
|
||||
case 'PointPrimitive':
|
||||
case 'EdgeInsetsPrimitive':
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ export const __INTERNAL_VIEW_CONFIG = {
|
||||
radii: true,
|
||||
|
||||
colors: {
|
||||
process: require('react-native/Libraries/StyleSheet/processColorArray'),
|
||||
process: require('react-native/Libraries/StyleSheet/processColorArray').default,
|
||||
},
|
||||
|
||||
srcs: true,
|
||||
|
||||
Reference in New Issue
Block a user