Silence all Lean Core warnings in Prelude.js

Summary:
See https://fb.workplace.com/permalink.php?story_fbid=2337018256625463&id=100009037038038&substory_index=58 for motivation.

I opted for using a substring that is unlikely to come up in warnings in product code but is shared across all lean core warnings. I think this is good enough and won't require updates every time we deprecate a new module.

Reviewed By: yungsters

Differential Revision: D16073431

fbshipit-source-id: 136b9e8ab53c85d2de5ed7844780f5d082087a7d
This commit is contained in:
Christoph Nakazawa
2019-07-01 10:48:47 -07:00
committed by Facebook Github Bot
parent d3f9f88860
commit e7371b2ad9
+2 -2
View File
@@ -25,7 +25,7 @@ module.exports = {
get ART() {
warnOnce(
'art-moved',
'React Native Art has been extracted from react-native core and will be removed in a future release. ' +
'React Native ART 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/art' instead of 'react-native'. " +
'See https://github.com/react-native-community/art',
);
@@ -174,7 +174,7 @@ module.exports = {
get AsyncStorage() {
warnOnce(
'async-storage-moved',
'Async Storage has been extracted from react-native core and will be removed in a future release. ' +
'AsyncStorage 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/async-storage' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-async-storage',
);