mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update the path to use the full path so that they can be found in the OSS environment.
Summary: I had to make this change when enabling Fabric in OSS. Without the full path, it can't find the modules like processColor within node_modules. Changelog: Internal Reviewed By: motiz88 Differential Revision: D31300424 fbshipit-source-id: 59b82470ec1ce63b63704931786e22b98f4bf046
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d291a7efdd
commit
8fcc2fa31a
+8
-5
@@ -54,14 +54,17 @@ function getReactDiffProcessValue(typeAnnotation) {
|
||||
case 'ReservedPropTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'ColorPrimitive':
|
||||
return j.template.expression`{ process: require('processColor') }`;
|
||||
return j.template
|
||||
.expression`{ process: require('react-native/Libraries/StyleSheet/processColor') }`;
|
||||
case 'ImageSourcePrimitive':
|
||||
return j.template
|
||||
.expression`{ process: require('resolveAssetSource') }`;
|
||||
.expression`{ process: require('react-native/Libraries/Image/resolveAssetSource') }`;
|
||||
case 'PointPrimitive':
|
||||
return j.template.expression`{ diff: require('pointsDiffer') }`;
|
||||
return j.template
|
||||
.expression`{ diff: require('react-native/Libraries/Utilities/differ/pointsDiffer') }`;
|
||||
case 'EdgeInsetsPrimitive':
|
||||
return j.template.expression`{ diff: require('insetsDiffer') }`;
|
||||
return j.template
|
||||
.expression`{ diff: require('react-native/Libraries/Utilities/differ/insetsDiffer') }`;
|
||||
default:
|
||||
(typeAnnotation.name: empty);
|
||||
throw new Error(
|
||||
@@ -73,7 +76,7 @@ function getReactDiffProcessValue(typeAnnotation) {
|
||||
switch (typeAnnotation.elementType.name) {
|
||||
case 'ColorPrimitive':
|
||||
return j.template
|
||||
.expression`{ process: require('processColorArray') }`;
|
||||
.expression`{ process: require('react-native/Libraries/StyleSheet/processColorArray') }`;
|
||||
case 'ImageSourcePrimitive':
|
||||
return j.literal(true);
|
||||
case 'PointPrimitive':
|
||||
|
||||
+9
-9
@@ -30,7 +30,7 @@ export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
radii: true,
|
||||
|
||||
colors: {
|
||||
process: require('processColorArray'),
|
||||
process: require('react-native/Libraries/StyleSheet/processColorArray'),
|
||||
},
|
||||
|
||||
srcs: true,
|
||||
@@ -132,7 +132,7 @@ export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
|
||||
validAttributes: {
|
||||
tintColor: {
|
||||
process: require('processColor'),
|
||||
process: require('react-native/Libraries/StyleSheet/processColor'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
@@ -534,7 +534,7 @@ export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('resolveAssetSource'),
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
@@ -567,7 +567,7 @@ export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
|
||||
validAttributes: {
|
||||
contentInset: {
|
||||
diff: require('insetsDiffer'),
|
||||
diff: require('react-native/Libraries/Utilities/differ/insetsDiffer'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
@@ -705,19 +705,19 @@ export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
|
||||
validAttributes: {
|
||||
thumbImage: {
|
||||
process: require('resolveAssetSource'),
|
||||
process: require('react-native/Libraries/Image/resolveAssetSource'),
|
||||
},
|
||||
|
||||
color: {
|
||||
process: require('processColor'),
|
||||
process: require('react-native/Libraries/StyleSheet/processColor'),
|
||||
},
|
||||
|
||||
thumbTintColor: {
|
||||
process: require('processColor'),
|
||||
process: require('react-native/Libraries/StyleSheet/processColor'),
|
||||
},
|
||||
|
||||
point: {
|
||||
diff: require('pointsDiffer'),
|
||||
diff: require('react-native/Libraries/Utilities/differ/pointsDiffer'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
@@ -809,7 +809,7 @@ export default NativeComponentRegistry.get(nativeComponentName, () => ({
|
||||
|
||||
validAttributes: {
|
||||
startPoint: {
|
||||
diff: require('pointsDiffer'),
|
||||
diff: require('react-native/Libraries/Utilities/differ/pointsDiffer'),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user