Skip to content

Commit 8ba46aa

Browse files
Naturalclaralloy
authored andcommitted
chore: update url of warning message from deprecated imports (#28452)
Summary: Some of the repository name of Lean Core(#23313) libraries has been renamed. This PR updates the warning message to display the updated url. [General] [Changed] - Update warning message of deprecated imports Pull Request resolved: #28452 Test Plan: updated URL can be accessed. Reviewed By: cpojer Differential Revision: D20745184 Pulled By: TheSavior fbshipit-source-id: 2c3ed6a000b45022ca6c4862305aa567c4d18b2e
1 parent d7d4fae commit 8ba46aa

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

index.js

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ module.exports = {
130130
'DatePickerIOS-merged',
131131
'DatePickerIOS has been merged with DatePickerAndroid and will be removed in a future release. ' +
132132
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
133-
'See https://github.com/react-native-community/react-native-datetimepicker',
133+
'See https://github.com/react-native-community/datetimepicker',
134134
);
135135
return require('./Libraries/Components/DatePicker/DatePickerIOS');
136136
},
@@ -183,9 +183,21 @@ module.exports = {
183183
return require('./Libraries/Components/Picker/PickerIOS');
184184
},
185185
get ProgressBarAndroid(): ProgressBarAndroid {
186+
warnOnce(
187+
'progress-bar-android-moved',
188+
'ProgressBarAndroid has been extracted from react-native core and will be removed in a future release. ' +
189+
"It can now be installed and imported from '@react-native-community/progress-bar-android' instead of 'react-native'. " +
190+
'See https://github.com/react-native-community/progress-bar-android',
191+
);
186192
return require('./Libraries/Components/ProgressBarAndroid/ProgressBarAndroid');
187193
},
188194
get ProgressViewIOS(): ProgressViewIOS {
195+
warnOnce(
196+
'progress-view-ios-moved',
197+
'ProgressViewIOS has been extracted from react-native core and will be removed in a future release. ' +
198+
"It can now be installed and imported from '@react-native-community/progress-view' instead of 'react-native'. " +
199+
'See https://github.com/react-native-community/progress-view',
200+
);
189201
return require('./Libraries/Components/ProgressViewIOS/ProgressViewIOS');
190202
},
191203
get SafeAreaView(): SafeAreaView {
@@ -198,6 +210,12 @@ module.exports = {
198210
return require('./Libraries/Lists/SectionList');
199211
},
200212
get SegmentedControlIOS(): SegmentedControlIOS {
213+
warnOnce(
214+
'segmented-control-ios-moved',
215+
'SegmentedControlIOS has been extracted from react-native core and will be removed in a future release. ' +
216+
"It can now be installed and imported from '@react-native-community/segmented-control' instead of 'react-native'. " +
217+
'See https://github.com/react-native-community/segmented-control',
218+
);
201219
return require('./Libraries/Components/SegmentedControlIOS/SegmentedControlIOS');
202220
},
203221
get Slider(): Slider {
@@ -273,22 +291,28 @@ module.exports = {
273291
'async-storage-moved',
274292
'AsyncStorage has been extracted from react-native core and will be removed in a future release. ' +
275293
"It can now be installed and imported from '@react-native-community/async-storage' instead of 'react-native'. " +
276-
'See https://github.com/react-native-community/react-native-async-storage',
294+
'See https://github.com/react-native-community/async-storage',
277295
);
278296
return require('./Libraries/Storage/AsyncStorage');
279297
},
280298
get BackHandler(): BackHandler {
281299
return require('./Libraries/Utilities/BackHandler');
282300
},
283301
get Clipboard(): Clipboard {
302+
warnOnce(
303+
'clipboard-moved',
304+
'Clipboard has been extracted from react-native core and will be removed in a future release. ' +
305+
"It can now be installed and imported from '@react-native-community/clipboard' instead of 'react-native'. " +
306+
'See https://github.com/react-native-community/clipboard',
307+
);
284308
return require('./Libraries/Components/Clipboard/Clipboard');
285309
},
286310
get DatePickerAndroid(): DatePickerAndroid {
287311
warnOnce(
288312
'DatePickerAndroid-merged',
289313
'DatePickerAndroid has been merged with DatePickerIOS and will be removed in a future release. ' +
290314
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
291-
'See https://github.com/react-native-community/react-native-datetimepicker',
315+
'See https://github.com/react-native-community/datetimepicker',
292316
);
293317
return require('./Libraries/Components/DatePickerAndroid/DatePickerAndroid');
294318
},
@@ -356,7 +380,7 @@ module.exports = {
356380
'pushNotificationIOS-moved',
357381
'PushNotificationIOS has been extracted from react-native core and will be removed in a future release. ' +
358382
"It can now be installed and imported from '@react-native-community/push-notification-ios' instead of 'react-native'. " +
359-
'See https://github.com/react-native-community/react-native-push-notification-ios',
383+
'See https://github.com/react-native-community/push-notification-ios',
360384
);
361385
return require('./Libraries/PushNotificationIOS/PushNotificationIOS');
362386
},
@@ -466,7 +490,7 @@ if (__DEV__) {
466490
false,
467491
'ART has been removed from React Native. ' +
468492
"It can now be installed and imported from '@react-native-community/art' instead of 'react-native'. " +
469-
'See https://github.com/react-native-community/react-native-art',
493+
'See https://github.com/react-native-community/art',
470494
);
471495
},
472496
});
@@ -571,7 +595,7 @@ if (__DEV__) {
571595
false,
572596
'TimePickerAndroid has been removed from React Native. ' +
573597
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
574-
'See https://github.com/react-native-community/react-native-datetimepicker',
598+
'See https://github.com/react-native-community/datetimepicker',
575599
);
576600
},
577601
});

0 commit comments

Comments
 (0)