|
| 1 | +/** |
| 2 | + * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | + * |
| 4 | + * This source code is licensed under the MIT license found in the |
| 5 | + * LICENSE file in the root directory of this source tree. |
| 6 | + * |
| 7 | + * @format |
| 8 | + */ |
| 9 | + |
| 10 | +'use strict'; |
| 11 | + |
| 12 | +/** |
| 13 | + * The correctness of paths is checked in the test file. |
| 14 | + * The assumption is that renaming/removing components shouldn't happen too often. |
| 15 | + * If a new component is added, it should be imported from the root. |
| 16 | + * If the path is not matched, the auto-fix won't be suggested. |
| 17 | + */ |
| 18 | +const publicAPIMapping = { |
| 19 | + 'Libraries/Components/AccessibilityInfo/AccessibilityInfo': |
| 20 | + 'AccessibilityInfo', |
| 21 | + 'Libraries/Components/ActivityIndicator/ActivityIndicator': |
| 22 | + 'ActivityIndicator', |
| 23 | + 'Libraries/Components/Button': 'Button', |
| 24 | + 'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid': |
| 25 | + 'DrawerLayoutAndroid', |
| 26 | + 'Libraries/Components/LayoutConformance/LayoutConformance': |
| 27 | + 'experimental_LayoutConformance', |
| 28 | + 'Libraries/Lists/FlatList': 'FlatList', |
| 29 | + 'Libraries/Image/Image': 'Image', |
| 30 | + 'Libraries/Image/ImageBackground': 'ImageBackground', |
| 31 | + 'Libraries/Components/TextInput/InputAccessoryView': 'InputAccessoryView', |
| 32 | + 'Libraries/Components/Keyboard/KeyboardAvoidingView': 'KeyboardAvoidingView', |
| 33 | + 'Libraries/Modal/Modal': 'Modal', |
| 34 | + 'Libraries/Components/Pressable/Pressable': 'Pressable', |
| 35 | + 'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid': |
| 36 | + 'ProgressBarAndroid', |
| 37 | + 'Libraries/Components/RefreshControl/RefreshControl': 'RefreshControl', |
| 38 | + 'Libraries/Components/SafeAreaView/SafeAreaView': 'SafeAreaView', |
| 39 | + 'Libraries/Components/ScrollView/ScrollView': 'ScrollView', |
| 40 | + 'Libraries/Lists/SectionList': 'SectionList', |
| 41 | + 'Libraries/Components/StatusBar/StatusBar': 'StatusBar', |
| 42 | + 'Libraries/Components/Switch/Switch': 'Switch', |
| 43 | + 'Libraries/Text/Text': 'Text', |
| 44 | + 'Libraries/Components/TextInput/TextInput': 'TextInput', |
| 45 | + 'Libraries/Components/Touchable/Touchable': 'Touchable', |
| 46 | + 'Libraries/Components/Touchable/TouchableHighlight': 'TouchableHighlight', |
| 47 | + 'Libraries/Components/Touchable/TouchableNativeFeedback': |
| 48 | + 'TouchableNativeFeedback', |
| 49 | + 'Libraries/Components/Touchable/TouchableOpacity': 'TouchableOpacity', |
| 50 | + 'Libraries/Components/Touchable/TouchableWithoutFeedback': |
| 51 | + 'TouchableWithoutFeedback', |
| 52 | + 'Libraries/Components/View/View': 'View', |
| 53 | + 'Libraries/Lists/VirtualizedList': 'VirtualizedList', |
| 54 | + 'Libraries/Lists/VirtualizedSectionList': 'VirtualizedSectionList', |
| 55 | + 'Libraries/ActionSheetIOS/ActionSheetIOS': 'ActionSheetIOS', |
| 56 | + 'Libraries/Alert/Alert': 'Alert', |
| 57 | + 'Libraries/Animated/Animated': 'Animated', |
| 58 | + 'Libraries/Utilities/Appearance': 'Appearance', |
| 59 | + 'Libraries/ReactNative/AppRegistry': 'AppRegistry', |
| 60 | + 'Libraries/AppState/AppState': 'AppState', |
| 61 | + 'Libraries/Utilities/BackHandler': 'BackHandler', |
| 62 | + 'Libraries/Components/Clipboard/Clipboard': 'Clipboard', |
| 63 | + 'Libraries/Utilities/DeviceInfo': 'DeviceInfo', |
| 64 | + 'src/private/devmenu/DevMenu': 'DevMenu', |
| 65 | + 'Libraries/Utilities/DevSettings': 'DevSettings', |
| 66 | + 'Libraries/Utilities/Dimensions': 'Dimensions', |
| 67 | + 'Libraries/Animated/Easing': 'Easing', |
| 68 | + 'Libraries/ReactNative/I18nManager': 'I18nManager', |
| 69 | + 'Libraries/Interaction/InteractionManager': 'InteractionManager', |
| 70 | + 'Libraries/Components/Keyboard/Keyboard': 'Keyboard', |
| 71 | + 'Libraries/LayoutAnimation/LayoutAnimation': 'LayoutAnimation', |
| 72 | + 'Libraries/Linking/Linking': 'Linking', |
| 73 | + 'Libraries/LogBox/LogBox': 'LogBox', |
| 74 | + 'Libraries/NativeModules/specs/NativeDialogManagerAndroid': |
| 75 | + 'NativeDialogManagerAndroid', |
| 76 | + 'Libraries/EventEmitter/NativeEventEmitter': 'NativeEventEmitter', |
| 77 | + 'Libraries/Network/RCTNetworking': 'Networking', |
| 78 | + 'Libraries/Interaction/PanResponder': 'PanResponder', |
| 79 | + 'Libraries/PermissionsAndroid/PermissionsAndroid': 'PermissionsAndroid', |
| 80 | + 'Libraries/Utilities/PixelRatio': 'PixelRatio', |
| 81 | + 'Libraries/PushNotificationIOS/PushNotificationIOS': 'PushNotificationIOS', |
| 82 | + 'Libraries/Settings/Settings': 'Settings', |
| 83 | + 'Libraries/Share/Share': 'Share', |
| 84 | + 'Libraries/StyleSheet/StyleSheet': 'StyleSheet', |
| 85 | + 'Libraries/Performance/Systrace': 'Systrace', |
| 86 | + 'Libraries/Components/ToastAndroid/ToastAndroid': 'ToastAndroid', |
| 87 | + 'Libraries/TurboModule/TurboModuleRegistry': 'TurboModuleRegistry', |
| 88 | + 'Libraries/ReactNative/UIManager': 'UIManager', |
| 89 | + 'Libraries/Animated/useAnimatedValue': 'useAnimatedValue', |
| 90 | + 'Libraries/Utilities/useColorScheme': 'useColorScheme', |
| 91 | + 'Libraries/Utilities/useWindowDimensions': 'useWindowDimensions', |
| 92 | + 'Libraries/UTFSequence': 'UTFSequence', |
| 93 | + 'Libraries/Vibration/Vibration': 'Vibration', |
| 94 | + 'Libraries/Utilities/codegenNativeComponent': 'codegenNativeComponent', |
| 95 | + 'Libraries/Utilities/codegenNativeCommands': 'codegenNativeCommands', |
| 96 | + 'Libraries/EventEmitter/RCTDeviceEventEmitter': 'DeviceEventEmitter', |
| 97 | + 'Libraries/StyleSheet/PlatformColorValueTypesIOS': 'DynamicColorIOS', |
| 98 | + 'Libraries/EventEmitter/RCTNativeAppEventEmitter': 'NativeAppEventEmitter', |
| 99 | + 'Libraries/BatchedBridge/NativeModules': 'NativeModules', |
| 100 | + 'Libraries/Utilities/Platform': 'Platform', |
| 101 | + 'Libraries/StyleSheet/PlatformColorValueTypes': 'PlatformColor', |
| 102 | + 'Libraries/StyleSheet/processColor': 'processColor', |
| 103 | + 'Libraries/ReactNative/requireNativeComponent': 'requireNativeComponent', |
| 104 | + 'Libraries/ReactNative/RootTag': 'RootTagContext', |
| 105 | +}; |
| 106 | + |
| 107 | +module.exports = { |
| 108 | + publicAPIMapping, |
| 109 | +}; |
0 commit comments