Skip to content

Commit

Permalink
Update pkg/repo names in deprecation messages (#41618)
Browse files Browse the repository at this point in the history
Summary:
Several deprecation warning messages related to components that were removed from `react-native` were outdated.
Some repositories have been moved, some packages were renamed/re-published under new names. A couple **never existed** (`react-native-community/segmented-checkbox` and `react-native-community/react-native-image-picker`).

This updates all messages to include links to the latest repositories and references to npm packages.

Because `react-native-community/art` is deprecated I've also slightly amended the message with the suggestion from its [repo readme](https://github.com/react-native-art/art#deprecated---this-package-is-deprecated-if-you-need-a-similar-package-please-consider-using-react-native-svg).

## Changelog:

[GENERAL] [FIXED] - Update pkg/repo names in deprecation messages

Pull Request resolved: #41618

Test Plan: No code change, just documentation/text.

Reviewed By: cipolleschi

Differential Revision: D51546345

Pulled By: cortinico

fbshipit-source-id: 5d7176a70d94c8b1e8111f4d84fba89eacde456a
  • Loading branch information
friederbluemle authored and facebook-github-bot committed Nov 23, 2023
1 parent 5ec2c01 commit fd35c1d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ module.exports = {
'pushNotificationIOS-moved',
'PushNotificationIOS has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-community/push-notification-ios' instead of 'react-native'. " +
'See https://github.com/react-native-push-notification-ios/push-notification-ios',
'See https://github.com/react-native-push-notification/ios',
);
return require('./Libraries/PushNotificationIOS/PushNotificationIOS');
},
Expand Down Expand Up @@ -429,7 +429,8 @@ if (__DEV__) {
invariant(
false,
'ART has been removed from React Native. ' +
"It can now be installed and imported from '@react-native-community/art' instead of 'react-native'. " +
"Please upgrade to use either 'react-native-svg' or a similar package. " +
"If you cannot upgrade to a different library, please install the deprecated '@react-native-community/art' package. " +
'See https://github.com/react-native-art/art',
);
},
Expand Down Expand Up @@ -509,7 +510,7 @@ if (__DEV__) {
invariant(
false,
'CameraRoll has been removed from React Native. ' +
"It can now be installed and imported from '@react-native-community/cameraroll' instead of 'react-native'. " +
"It can now be installed and imported from '@react-native-camera-roll/camera-roll' instead of 'react-native'. " +
'See https://github.com/react-native-cameraroll/react-native-cameraroll',
);
},
Expand Down Expand Up @@ -622,7 +623,7 @@ if (__DEV__) {
invariant(
false,
'SegmentedControlIOS has been removed from React Native. ' +
"It can now be installed and imported from '@react-native-community/segmented-checkbox' instead of 'react-native'." +
"It can now be installed and imported from '@react-native-segmented-control/segmented-control' instead of 'react-native'." +
'See https://github.com/react-native-segmented-control/segmented-control',
);
},
Expand Down Expand Up @@ -700,7 +701,7 @@ if (__DEV__) {
invariant(
false,
'MaskedViewIOS has been removed from React Native. ' +
"It can now be installed and imported from '@react-native-community/react-native-masked-view' instead of 'react-native'. " +
"It can now be installed and imported from '@react-native-masked-view/masked-view' instead of 'react-native'. " +
'See https://github.com/react-native-masked-view/masked-view',
);
},
Expand Down Expand Up @@ -730,7 +731,7 @@ if (__DEV__) {
invariant(
false,
'ImagePickerIOS has been removed from React Native. ' +
"Please upgrade to use either '@react-native-community/react-native-image-picker' or 'expo-image-picker'. " +
"Please upgrade to use either 'react-native-image-picker' or 'expo-image-picker'. " +
"If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. " +
'See https://github.com/rnc-archive/react-native-image-picker-ios',
);
Expand Down

0 comments on commit fd35c1d

Please sign in to comment.