Skip to content

Commit 7a3da81

Browse files
huntiefacebook-github-bot
authored andcommitted
Remove Learn Core warnings for JS APIs with >3y blame (facebook#50840)
Summary: Pull Request resolved: facebook#50840 Cleanup of index.js API removal warnings. This should motivate more urgency on the remaining members. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D73429537 fbshipit-source-id: 03faabdf30c2836dd5c61b4a2ce8d2355ad8e1e9
1 parent be37e1b commit 7a3da81

File tree

1 file changed

+0
-287
lines changed

1 file changed

+0
-287
lines changed

packages/react-native/index.js

Lines changed: 0 additions & 287 deletions
Original file line numberDiff line numberDiff line change
@@ -320,293 +320,6 @@ module.exports = {
320320
} as ReactNativePublicAPI;
321321

322322
if (__DEV__) {
323-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
324-
* attempting to access ART. */
325-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
326-
* attempting to access ART. */
327-
Object.defineProperty(module.exports, 'ART', {
328-
configurable: true,
329-
get() {
330-
invariant(
331-
false,
332-
'ART has been removed from React Native. ' +
333-
"Please upgrade to use either 'react-native-svg' or a similar package. " +
334-
"If you cannot upgrade to a different library, please install the deprecated '@react-native-community/art' package. " +
335-
'See https://github.com/react-native-art/art',
336-
);
337-
},
338-
});
339-
340-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
341-
* attempting to access ListView. */
342-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
343-
* attempting to access ListView. */
344-
Object.defineProperty(module.exports, 'ListView', {
345-
configurable: true,
346-
get() {
347-
invariant(
348-
false,
349-
'ListView has been removed from React Native. ' +
350-
'See https://fb.me/nolistview for more information or use ' +
351-
'`deprecated-react-native-listview`.',
352-
);
353-
},
354-
});
355-
356-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
357-
* attempting to access SwipeableListView. */
358-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
359-
* attempting to access SwipeableListView. */
360-
Object.defineProperty(module.exports, 'SwipeableListView', {
361-
configurable: true,
362-
get() {
363-
invariant(
364-
false,
365-
'SwipeableListView has been removed from React Native. ' +
366-
'See https://fb.me/nolistview for more information or use ' +
367-
'`deprecated-react-native-swipeable-listview`.',
368-
);
369-
},
370-
});
371-
372-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
373-
* attempting to access WebView. */
374-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
375-
* attempting to access WebView. */
376-
Object.defineProperty(module.exports, 'WebView', {
377-
configurable: true,
378-
get() {
379-
invariant(
380-
false,
381-
'WebView has been removed from React Native. ' +
382-
"It can now be installed and imported from 'react-native-webview' instead of 'react-native'. " +
383-
'See https://github.com/react-native-webview/react-native-webview',
384-
);
385-
},
386-
});
387-
388-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
389-
* attempting to access NetInfo. */
390-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
391-
* attempting to access NetInfo. */
392-
Object.defineProperty(module.exports, 'NetInfo', {
393-
configurable: true,
394-
get() {
395-
invariant(
396-
false,
397-
'NetInfo has been removed from React Native. ' +
398-
"It can now be installed and imported from '@react-native-community/netinfo' instead of 'react-native'. " +
399-
'See https://github.com/react-native-netinfo/react-native-netinfo',
400-
);
401-
},
402-
});
403-
404-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
405-
* attempting to access CameraRoll. */
406-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
407-
* attempting to access CameraRoll. */
408-
Object.defineProperty(module.exports, 'CameraRoll', {
409-
configurable: true,
410-
get() {
411-
invariant(
412-
false,
413-
'CameraRoll has been removed from React Native. ' +
414-
"It can now be installed and imported from '@react-native-camera-roll/camera-roll' instead of 'react-native'. " +
415-
'See https://github.com/react-native-cameraroll/react-native-cameraroll',
416-
);
417-
},
418-
});
419-
420-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
421-
* attempting to access ImageStore. */
422-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
423-
* attempting to access ImageStore. */
424-
Object.defineProperty(module.exports, 'ImageStore', {
425-
configurable: true,
426-
get() {
427-
invariant(
428-
false,
429-
'ImageStore has been removed from React Native. ' +
430-
'To get a base64-encoded string from a local image use either of the following third-party libraries:' +
431-
"* expo-file-system: `readAsStringAsync(filepath, 'base64')`" +
432-
"* react-native-fs: `readFile(filepath, 'base64')`",
433-
);
434-
},
435-
});
436-
437-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
438-
* attempting to access ImageEditor. */
439-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
440-
* attempting to access ImageEditor. */
441-
Object.defineProperty(module.exports, 'ImageEditor', {
442-
configurable: true,
443-
get() {
444-
invariant(
445-
false,
446-
'ImageEditor has been removed from React Native. ' +
447-
"It can now be installed and imported from '@react-native-community/image-editor' instead of 'react-native'. " +
448-
'See https://github.com/callstack/react-native-image-editor',
449-
);
450-
},
451-
});
452-
453-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
454-
* attempting to access TimePickerAndroid. */
455-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
456-
* attempting to access TimePickerAndroid. */
457-
Object.defineProperty(module.exports, 'TimePickerAndroid', {
458-
configurable: true,
459-
get() {
460-
invariant(
461-
false,
462-
'TimePickerAndroid has been removed from React Native. ' +
463-
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
464-
'See https://github.com/react-native-datetimepicker/datetimepicker',
465-
);
466-
},
467-
});
468-
469-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
470-
* attempting to access ToolbarAndroid. */
471-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
472-
* attempting to access ToolbarAndroid. */
473-
Object.defineProperty(module.exports, 'ToolbarAndroid', {
474-
configurable: true,
475-
get() {
476-
invariant(
477-
false,
478-
'ToolbarAndroid has been removed from React Native. ' +
479-
"It can now be installed and imported from '@react-native-community/toolbar-android' instead of 'react-native'. " +
480-
'See https://github.com/react-native-toolbar-android/toolbar-android',
481-
);
482-
},
483-
});
484-
485-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
486-
* attempting to access ViewPagerAndroid. */
487-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
488-
* attempting to access ViewPagerAndroid. */
489-
Object.defineProperty(module.exports, 'ViewPagerAndroid', {
490-
configurable: true,
491-
get() {
492-
invariant(
493-
false,
494-
'ViewPagerAndroid has been removed from React Native. ' +
495-
"It can now be installed and imported from 'react-native-pager-view' instead of 'react-native'. " +
496-
'See https://github.com/callstack/react-native-pager-view',
497-
);
498-
},
499-
});
500-
501-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
502-
* attempting to access CheckBox. */
503-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
504-
* attempting to access CheckBox. */
505-
Object.defineProperty(module.exports, 'CheckBox', {
506-
configurable: true,
507-
get() {
508-
invariant(
509-
false,
510-
'CheckBox has been removed from React Native. ' +
511-
"It can now be installed and imported from '@react-native-community/checkbox' instead of 'react-native'. " +
512-
'See https://github.com/react-native-checkbox/react-native-checkbox',
513-
);
514-
},
515-
});
516-
517-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
518-
* attempting to access SegmentedControlIOS. */
519-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
520-
* attempting to access SegmentedControlIOS. */
521-
Object.defineProperty(module.exports, 'SegmentedControlIOS', {
522-
configurable: true,
523-
get() {
524-
invariant(
525-
false,
526-
'SegmentedControlIOS has been removed from React Native. ' +
527-
"It can now be installed and imported from '@react-native-segmented-control/segmented-control' instead of 'react-native'." +
528-
'See https://github.com/react-native-segmented-control/segmented-control',
529-
);
530-
},
531-
});
532-
533-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
534-
* attempting to access StatusBarIOS. */
535-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
536-
* attempting to access StatusBarIOS. */
537-
Object.defineProperty(module.exports, 'StatusBarIOS', {
538-
configurable: true,
539-
get() {
540-
invariant(
541-
false,
542-
'StatusBarIOS has been removed from React Native. ' +
543-
'Has been merged with StatusBar. ' +
544-
'See https://reactnative.dev/docs/statusbar',
545-
);
546-
},
547-
});
548-
549-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
550-
* attempting to access PickerIOS. */
551-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
552-
* attempting to access PickerIOS. */
553-
Object.defineProperty(module.exports, 'PickerIOS', {
554-
configurable: true,
555-
get() {
556-
invariant(
557-
false,
558-
'PickerIOS has been removed from React Native. ' +
559-
"It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. " +
560-
'See https://github.com/react-native-picker/picker',
561-
);
562-
},
563-
});
564-
565-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
566-
* attempting to access Picker. */
567-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
568-
* attempting to access Picker. */
569-
Object.defineProperty(module.exports, 'Picker', {
570-
configurable: true,
571-
get() {
572-
invariant(
573-
false,
574-
'Picker has been removed from React Native. ' +
575-
"It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. " +
576-
'See https://github.com/react-native-picker/picker',
577-
);
578-
},
579-
});
580-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
581-
* attempting to access DatePickerAndroid. */
582-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
583-
* attempting to access DatePickerAndroid. */
584-
Object.defineProperty(module.exports, 'DatePickerAndroid', {
585-
configurable: true,
586-
get() {
587-
invariant(
588-
false,
589-
'DatePickerAndroid has been removed from React Native. ' +
590-
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
591-
'See https://github.com/react-native-datetimepicker/datetimepicker',
592-
);
593-
},
594-
});
595-
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
596-
* attempting to access MaskedViewIOS. */
597-
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
598-
* attempting to access MaskedViewIOS. */
599-
Object.defineProperty(module.exports, 'MaskedViewIOS', {
600-
configurable: true,
601-
get() {
602-
invariant(
603-
false,
604-
'MaskedViewIOS has been removed from React Native. ' +
605-
"It can now be installed and imported from '@react-native-masked-view/masked-view' instead of 'react-native'. " +
606-
'See https://github.com/react-native-masked-view/masked-view',
607-
);
608-
},
609-
});
610323
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
611324
* attempting to access AsyncStorage. */
612325
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when

0 commit comments

Comments
 (0)