docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { NavigationEvents } from 'react-navigation'; <mask> import { Button, Platform, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; <mask> <mask> const BUTTON_COLOR = Platform.OS === 'ios' ? '#fff' : '#666'; <mask> <mask> interface State { <mask> isPermissionsGranted: boolean; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { LocalAuthentication } from 'expo'; </s> add import * as LocalAuthentication from 'expo-local-authentication'; </s> remove import { DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker'; </s> remove import { AuthSession, Constants } from 'expo'; </s> add import { AuthSession } from 'expo'; import Constants from 'expo-constants'; </s> remove import { BlurView, Location, MapView, Notifications, TaskManager } from 'expo'; </s> add import { Notifications } from 'expo'; import * as TaskManager from 'expo-task-manager'; import MapView from 'react-native-maps'; import * as Location from 'expo-location'; import { BlurView } from 'expo-blur'; </s> remove import { SMS } from 'expo'; </s> add import * as SMS from 'expo-sms'; </s> remove import { AppAuth } from 'expo'; </s> add import * as AppAuth from 'expo-app-auth';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/BarCodeScannerScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Animated, Image, StyleSheet, View } from 'react-native'; <mask> import { BlurView } from 'expo'; <mask> <mask> const AnimatedBlurView = Animated.createAnimatedComponent(BlurView); <mask> export default class BlurViewScreen extends React.Component { <mask> static navigationOptions = { <mask> title: 'BlurView', </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook'; </s> remove import { IntentLauncher } from 'expo'; </s> add import * as IntentLauncher from 'expo-intent-launcher'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/BlurViewScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, Button, StyleSheet, Text, View } from 'react-native'; <mask> import { Constants, DangerZone } from 'expo'; <mask> <mask> let Branch: any = null; <mask> <mask> try { <mask> Branch = DangerZone.Branch; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { AuthSession, Constants } from 'expo'; </s> add import { AuthSession } from 'expo'; import Constants from 'expo-constants'; </s> remove import { AppAuth } from 'expo'; </s> add import * as AppAuth from 'expo-app-auth'; </s> remove import { Constants, Camera, FileSystem, Permissions, BarCodeScanner, FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; import { BarCodeScanner } from 'expo-barcode-scanner'; import * as Permissions from 'expo-permissions'; import * as FileSystem from 'expo-file-system'; import { Camera } from 'expo-camera'; import Constants from 'expo-constants'; </s> remove import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; </s> add import { ScreenOrientation } from 'expo'; import * as Svg from 'react-native-svg'; import * as Permissions from 'expo-permissions'; import { BarCodeScanner } from 'expo-barcode-scanner'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/BranchScreen.tsx
keep keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, Platform, ScrollView, StyleSheet, View } from 'react-native'; <mask> import { NavigationScreenComponent, NavigationScreenProps } from 'react-navigation'; <mask> import { Calendar, Permissions } from 'expo'; <mask> import Button from '../components/Button'; <mask> import Colors from '../constants/Colors'; <mask> import HeadingText from '../components/HeadingText'; <mask> import ListButton from '../components/ListButton'; <mask> import MonoText from '../components/MonoText'; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Localization } from 'expo'; </s> add import * as Localization from 'expo-localization'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions'; </s> remove import { Haptics } from 'expo'; </s> add import * as Haptics from 'expo-haptics'; </s> remove import { ImagePicker, Permissions, Video } from 'expo'; </s> add import { Video } from 'expo-av'; import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/CalendarsScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, StyleSheet, Text, View, TouchableOpacity, Platform } from 'react-native'; <mask> import { Constants, Camera, FileSystem, Permissions, BarCodeScanner, FaceDetector } from 'expo'; <mask> import isIPhoneX from 'react-native-is-iphonex'; <mask> import { <mask> Ionicons, <mask> MaterialIcons, <mask> Foundation, </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Camera, GLView, Permissions, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import * as Permissions from 'expo-permissions'; import { GLView } from 'expo-gl'; import { Camera } from 'expo-camera'; </s> remove import { Constants, DangerZone } from 'expo'; </s> add import { DangerZone } from 'expo'; import Constants from 'expo-constants'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions'; </s> remove import { Contacts, Permissions, Linking, ImagePicker } from 'expo'; </s> add import { Linking } from 'expo'; import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts'; </s> remove import { FileSystem, MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; import * as FileSystem from 'expo-file-system';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Camera/CameraScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { StyleSheet, View, TouchableOpacity, Text, ScrollView, TouchableOpacityProps } from 'react-native'; <mask> import { FileSystem, MediaLibrary, Permissions } from 'expo'; <mask> import { MaterialIcons } from '@expo/vector-icons'; <mask> import Photo from './Photo'; <mask> <mask> const PHOTOS_DIR = FileSystem.documentDirectory + 'photos'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { Constants, Camera, FileSystem, Permissions, BarCodeScanner, FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; import { BarCodeScanner } from 'expo-barcode-scanner'; import * as Permissions from 'expo-permissions'; import * as FileSystem from 'expo-file-system'; import { Camera } from 'expo-camera'; import Constants from 'expo-constants'; </s> remove import { FacebookAds } from 'expo'; </s> add import * as FacebookAds from 'expo-ads-facebook'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Camera/GalleryScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { StyleSheet, View, TouchableOpacity, Text, ScrollView, TouchableOpacityProps } from 'react-native'; <mask> import { MediaLibrary, Permissions } from 'expo'; <mask> import { MaterialIcons } from '@expo/vector-icons'; <mask> import Photo from './Photo'; <mask> <mask> interface State { <mask> photos: string[]; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { FileSystem, MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; import * as FileSystem from 'expo-file-system'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { SMS } from 'expo'; </s> add import * as SMS from 'expo-sms'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Camera/GalleryScreen.web.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Image, StyleSheet, View, TouchableOpacity, Text } from 'react-native'; <mask> import { FaceDetector } from 'expo'; <mask> import { Ionicons } from '@expo/vector-icons'; <mask> <mask> const pictureSize = 150; <mask> <mask> interface State { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset'; </s> remove import { SMS } from 'expo'; </s> add import * as SMS from 'expo-sms'; </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Camera/Photo.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { ScrollView, View } from 'react-native'; <mask> import { Constants } from 'expo'; <mask> import Colors from '../constants/Colors'; <mask> import HeadingText from '../components/HeadingText'; <mask> import MonoText from '../components/MonoText'; <mask> <mask> interface State { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Localization } from 'expo'; </s> add import * as Localization from 'expo-localization'; </s> remove import { Haptics } from 'expo'; </s> add import * as Haptics from 'expo-haptics'; </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient'; </s> remove import { FacebookAds } from 'expo'; </s> add import * as FacebookAds from 'expo-ads-facebook';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/ConstantsScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> TouchableOpacity, <mask> View, <mask> Alert, <mask> } from 'react-native'; <mask> import { Contacts, Permissions, Linking, ImagePicker } from 'expo'; <mask> import HeaderButtons from 'react-navigation-header-buttons'; <mask> import { NavigationScreenProps, NavigationScreenConfig } from 'react-navigation'; <mask> import { Ionicons } from '@expo/vector-icons'; <mask> <mask> import Colors from '../../constants/Colors'; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Contacts, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts'; </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { FacebookAds } from 'expo'; </s> add import * as FacebookAds from 'expo-ads-facebook'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Contacts/ContactDetailScreen.tsx
replace keep keep keep keep keep
<mask> import { Contacts } from 'expo'; <mask> <mask> export function parseDate({ year, month, day }: { year: number; month: number; day: number }) { <mask> const nYear = year || new Date().getFullYear(); <mask> // TODO: Evan: add support for calendars: https://github.com/moment/moment/issues/1454 <mask> const date = new Date(nYear, month, day, 0, 0); </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, FileSystem } from 'expo'; </s> add import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { Contacts } from 'expo'; </s> add import * as Contacts from 'expo-contacts'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Contacts/ContactUtils.ts
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { FlatList, StyleProp, ViewStyle, ListRenderItem, FlatListProps } from 'react-native'; <mask> import { Contacts } from 'expo'; <mask> <mask> import ContactsListItem from './ContactsListItem'; <mask> <mask> export default class ContactsList extends React.Component< <mask> { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook'; </s> remove import { Contacts, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Contacts/ContactsList.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { RefreshControl, StyleSheet, Text, View } from 'react-native'; <mask> import { Contacts, Permissions } from 'expo'; <mask> import { NavigationEvents, NavigationScreenProps } from 'react-navigation'; <mask> import HeaderButtons from 'react-navigation-header-buttons'; <mask> import { Ionicons } from '@expo/vector-icons'; <mask> <mask> import ContactsList from './ContactsList'; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Contacts, Permissions, Linking, ImagePicker } from 'expo'; </s> add import { Linking } from 'expo'; import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Contacts/ContactsScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, Image, Text, View, Switch } from 'react-native'; <mask> import { DocumentPicker } from 'expo'; <mask> import Button from '../components/Button'; <mask> <mask> interface State { <mask> document?: DocumentPicker.DocumentResult; <mask> copyToCache: boolean; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { LocalAuthentication } from 'expo'; </s> add import * as LocalAuthentication from 'expo-local-authentication'; </s> remove import { Print, DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker'; import * as Print from 'expo-print'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { FacebookAds } from 'expo'; </s> add import * as FacebookAds from 'expo-ads-facebook'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/DocumentPickerScreen.tsx
keep keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, Platform, ScrollView, StyleSheet, Text, View } from 'react-native'; <mask> import { NavigationScreenProps } from 'react-navigation'; <mask> import { Calendar } from 'expo'; <mask> import Button from '../components/Button'; <mask> import HeadingText from '../components/HeadingText'; <mask> import ListButton from '../components/ListButton'; <mask> import MonoText from '../components/MonoText'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { Localization } from 'expo'; </s> add import * as Localization from 'expo-localization'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/EventsScreen.tsx
replace keep keep keep keep keep
<mask> import { FacebookAds } from 'expo'; <mask> import React from 'react'; <mask> import { StyleSheet, View, Text, TouchableOpacity, ScrollView, Switch } from 'react-native'; <mask> <mask> import Colors from '../constants/Colors'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Haptics } from 'expo'; </s> add import * as Haptics from 'expo-haptics'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker'; </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/FacebookAdsScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, ScrollView } from 'react-native'; <mask> import { Facebook } from 'expo'; <mask> import ListButton from '../components/ListButton'; <mask> <mask> export default class FacebookLoginScreen extends React.Component { <mask> static navigationOptions = { <mask> title: 'FacebookLogin', </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob'; </s> remove import { IntentLauncher } from 'expo'; </s> add import * as IntentLauncher from 'expo-intent-launcher'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/FacebookLoginScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> ProgressViewIOS, <mask> ScrollView, <mask> StyleSheet, <mask> } from 'react-native'; <mask> import { Asset, FileSystem } from 'expo'; <mask> import ListButton from '../components/ListButton'; <mask> <mask> interface State { <mask> downloadProgress: number; <mask> } </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Print, DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker'; import * as Print from 'expo-print'; </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { MapView } from 'expo'; </s> add import MapView from 'react-native-maps'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Asset, FileSystem, GLView, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { GLView } from 'expo-gl'; import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/FileSystemScreen.tsx
keep replace keep keep keep keep keep
<mask> import * as THREE from 'three'; <mask> import { Asset } from 'expo'; <mask> <mask> class Renderer extends THREE.WebGLRenderer { <mask> constructor({ <mask> gl, <mask> canvas, </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset'; </s> remove import { Contacts } from 'expo'; </s> add import * as Contacts from 'expo-contacts'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/ExpoTHREE.web.tsx
keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Camera, GLView, Permissions, GL } from 'expo'; <mask> import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; <mask> <mask> const vertShaderSource = `#version 300 es <mask> precision highp float; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, FileSystem, GLView, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { GLView } from 'expo-gl'; import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { Constants, Camera, FileSystem, Permissions, BarCodeScanner, FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; import { BarCodeScanner } from 'expo-barcode-scanner'; import * as Permissions from 'expo-permissions'; import * as FileSystem from 'expo-file-system'; import { Camera } from 'expo-camera'; import Constants from 'expo-constants'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/GLCameraScreen.tsx
keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Asset, FileSystem, GLView, GL } from 'expo'; <mask> import { Image, Slider, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import exampleImage from '../../../assets/images/example3.jpg'; <mask> <mask> const vertShaderSource = `#version 300 es </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Camera, GLView, Permissions, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import * as Permissions from 'expo-permissions'; import { GLView } from 'expo-gl'; import { Camera } from 'expo-camera'; </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/GLHeadlessRenderingScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import './BeforePIXI'; <mask> <mask> import { Asset, GL } from 'expo'; <mask> import { Platform } from '@unimodules/core'; <mask> import * as PIXI from 'pixi.js'; <mask> import { Dimensions } from 'react-native'; <mask> <mask> import ExpoTHREE from './ExpoTHREE'; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { Asset, FileSystem, GLView, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { GLView } from 'expo-gl'; import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { Constants, Camera, FileSystem, Permissions, BarCodeScanner, FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; import { BarCodeScanner } from 'expo-barcode-scanner'; import * as Permissions from 'expo-permissions'; import * as FileSystem from 'expo-file-system'; import { Camera } from 'expo-camera'; import Constants from 'expo-constants';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/GLScreens.tsx
replace keep keep keep keep keep
<mask> import { Asset, GL } from 'expo'; <mask> import React from 'react'; <mask> import * as THREE from 'three'; <mask> import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; <mask> import ExpoTHREE from './ExpoTHREE'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { Asset, FileSystem, GLView, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { GLView } from 'expo-gl'; import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { Camera, GLView, Permissions, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import * as Permissions from 'expo-permissions'; import { GLView } from 'expo-gl'; import { Camera } from 'expo-camera'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { GoogleSignIn } from 'expo'; </s> add import * as GoogleSignIn from 'expo-google-sign-in';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/GLSnapshotsScreen.tsx
keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { GL } from 'expo'; <mask> import { View, StyleProp, ViewStyle } from 'react-native'; <mask> <mask> import { Colors } from '../../constants'; <mask> <mask> export default <P extends { style?: StyleProp<ViewStyle> } = {}>( </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { Contacts } from 'expo'; </s> add import * as Contacts from 'expo-contacts'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/GLWrap.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> title: string, <mask> onContextCreate: <mask> (gl: GL.ExpoWebGLRenderingContext) => Promise<{ onTick?: (gl: GL.ExpoWebGLRenderingContext) => void } | void> <mask> ): React.ComponentType<P> & { title: string } => <mask> class extends React.Component<P> { <mask> static title = title; <mask> <mask> _gl?: GL.ExpoWebGLRenderingContext; <mask> _rafID?: number; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/GLWrap.tsx
keep keep keep keep replace
<mask> } <mask> }; <mask> animate(); <mask> } <mask> }; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Location, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Location from 'expo-location'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { Asset, FileSystem } from 'expo'; </s> add import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GL/GLWrap.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { ActivityIndicator, InteractionManager, StyleSheet, View } from 'react-native'; <mask> import { GL } from 'expo'; <mask> <mask> import REGL from 'regl'; <mask> import mat4 from 'gl-mat4'; <mask> import hsv2rgb from 'hsv2rgb'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { Asset, FileSystem, GLView, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { GLView } from 'expo-gl'; import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { Camera, GLView, Permissions, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import * as Permissions from 'expo-permissions'; import { GLView } from 'expo-gl'; import { Camera } from 'expo-camera'; </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GLViewScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> } from 'react-native'; <mask> import { NavigationEvents } from 'react-navigation'; <mask> import Touchable from 'react-native-platform-touchable'; <mask> <mask> import { Permissions, Location } from 'expo'; <mask> <mask> const EXAMPLES = [ <mask> '1 Hacker Way', <mask> { latitude: 49.28, longitude: -123.12 }, <mask> 'Palo Alto Caltrain Station (this one will error)', </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { BlurView, Location, MapView, Notifications, TaskManager } from 'expo'; </s> add import { Notifications } from 'expo'; import * as TaskManager from 'expo-task-manager'; import MapView from 'react-native-maps'; import * as Location from 'expo-location'; import { BlurView } from 'expo-blur'; </s> remove import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; </s> add import { ScreenOrientation } from 'expo'; import * as Svg from 'react-native-svg'; import * as Permissions from 'expo-permissions'; import { BarCodeScanner } from 'expo-barcode-scanner'; </s> remove import { BackgroundFetch, TaskManager } from 'expo'; </s> add import * as TaskManager from 'expo-task-manager'; import * as BackgroundFetch from 'expo-background-fetch'; </s> remove import { MapView } from 'expo'; </s> add import MapView from 'react-native-maps'; </s> remove import { Contacts, Permissions, Linking, ImagePicker } from 'expo'; </s> add import { Linking } from 'expo'; import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GeocodingScreen.tsx
replace keep keep keep keep keep
<mask> import { GoogleSignIn } from 'expo'; <mask> import React from 'react'; <mask> import { Image, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import GoogleSignInButton from '../components/GoogleSignInButton'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { ImagePicker, Permissions, Video } from 'expo'; </s> add import { Video } from 'expo-av'; import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Asset, FileSystem, GLView, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { GLView } from 'expo-gl'; import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/GoogleSignInScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { SectionList, StyleSheet, Text, View, ViewStyle } from 'react-native'; <mask> import { Haptics } from 'expo'; <mask> <mask> import Button from '../components/Button'; <mask> import Colors from '../constants/Colors'; <mask> import MonoText from '../components/MonoText'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { FacebookAds } from 'expo'; </s> add import * as FacebookAds from 'expo-ads-facebook'; </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/HapticsScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> View, <mask> Image, <mask> TouchableOpacityProps, <mask> } from 'react-native'; <mask> import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; <mask> import { Ionicons } from '@expo/vector-icons'; <mask> <mask> import Colors from '../constants/Colors'; <mask> <mask> interface State { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Contacts, Permissions, Linking, ImagePicker } from 'expo'; </s> add import { Linking } from 'expo'; import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Asset, FileSystem } from 'expo'; </s> add import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { FacebookAds } from 'expo'; </s> add import * as FacebookAds from 'expo-ads-facebook'; </s> remove import { ImagePicker, Permissions, Video } from 'expo'; </s> add import { Video } from 'expo-av'; import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/ImageManipulatorScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Image, Platform, ScrollView, View } from 'react-native'; <mask> import { ImagePicker, Permissions, Video } from 'expo'; <mask> <mask> import ListButton from '../components/ListButton'; <mask> import MonoText from '../components/MonoText'; <mask> <mask> async function requestPermissionAsync(permission: Permissions.PermissionType) { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { Localization } from 'expo'; </s> add import * as Localization from 'expo-localization'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/ImagePickerScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Platform, ScrollView, Text, ToastAndroid, View } from 'react-native'; <mask> import { IntentLauncher } from 'expo'; <mask> import Button from '../components/Button'; <mask> <mask> export default class IntentLauncherScreen extends React.Component { <mask> static navigationOptions = { <mask> title: 'IntentLauncher', </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/IntentLauncherScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { View } from 'react-native'; <mask> import { KeepAwake } from 'expo'; <mask> import Button from '../components/Button'; <mask> <mask> export default class KeepAwakeScreen extends React.Component { <mask> static navigationOptions = { <mask> title: 'KeepAwake', </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer'; </s> remove import { IntentLauncher } from 'expo'; </s> add import * as IntentLauncher from 'expo-intent-launcher'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook'; </s> remove import { Contacts } from 'expo'; </s> add import * as Contacts from 'expo-contacts';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/KeepAwakeScreen.tsx
replace keep keep keep keep keep
<mask> import { LinearGradient } from 'expo'; <mask> import React from 'react'; <mask> import { Image, Platform, ScrollView, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import MonoText from '../components/MonoText'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { ImagePicker, Permissions, Video } from 'expo'; </s> add import { Video } from 'expo-av'; import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { Localization } from 'expo'; </s> add import * as Localization from 'expo-localization';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/LinearGradientScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Text, View } from 'react-native'; <mask> import { LocalAuthentication } from 'expo'; <mask> import Button from '../components/Button'; <mask> <mask> interface State { <mask> waiting: boolean; <mask> hasHardware?: boolean; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker'; </s> remove import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; </s> add import { ScreenOrientation } from 'expo'; import * as Svg from 'react-native-svg'; import * as Permissions from 'expo-permissions'; import { BarCodeScanner } from 'expo-barcode-scanner'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { MailComposer } from 'expo'; </s> add import * as MailComposer from 'expo-mail-composer';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/LocalAuthenticationScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> import i18n from 'i18n-js'; <mask> import chunk from 'lodash/chunk'; <mask> import React from 'react'; <mask> import { Picker, ScrollView, StyleSheet, Text, View } from 'react-native'; <mask> import { Localization } from 'expo'; <mask> <mask> import HeadingText from '../components/HeadingText'; <mask> import ListButton from '../components/ListButton'; <mask> import MonoText from '../components/MonoText'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions'; </s> remove import { ImagePicker, Permissions, Video } from 'expo'; </s> add import { Video } from 'expo-av'; import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker'; </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/LocalizationScreen.tsx
keep keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { NavigationEvents } from 'react-navigation'; <mask> import { StyleSheet, Text, View, NativeSyntheticEvent } from 'react-native'; <mask> import { BlurView, Location, MapView, Notifications, TaskManager } from 'expo'; <mask> <mask> import Button from '../../components/Button'; <mask> <mask> const GEOFENCING_TASK = 'geofencing'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { BackgroundFetch, TaskManager } from 'expo'; </s> add import * as TaskManager from 'expo-task-manager'; import * as BackgroundFetch from 'expo-background-fetch'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; </s> add import { ScreenOrientation } from 'expo'; import * as Svg from 'react-native-svg'; import * as Permissions from 'expo-permissions'; import { BarCodeScanner } from 'expo-barcode-scanner'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Haptics } from 'expo'; </s> add import * as Haptics from 'expo-haptics';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Location/GeofencingScreen.tsx
keep keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { ActivityIndicator, ScrollView, Switch, Text, View } from 'react-native'; <mask> import { NavigationScreenProps } from 'react-navigation'; <mask> import { Location, Permissions } from 'expo'; <mask> import ListButton from '../../components/ListButton'; <mask> <mask> type OmitNested<T, K1 extends keyof T, K2 extends keyof T[K1]> = Pick<T, Exclude<keyof T, K1>> & <mask> { [P1 in K1]: Pick<T[K1], Exclude<keyof T[K1], K2>> }; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { MapView } from 'expo'; </s> add import MapView from 'react-native-maps'; </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { Contacts, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/Location/LocationScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, View } from 'react-native'; <mask> import { MailComposer } from 'expo'; <mask> import Button from '../components/Button'; <mask> <mask> export default class MailComposerScreen extends React.Component { <mask> static navigationOptions = { <mask> title: 'MailComposer', </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { IntentLauncher } from 'expo'; </s> add import * as IntentLauncher from 'expo-intent-launcher'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { Contacts } from 'expo'; </s> add import * as Contacts from 'expo-contacts';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/MailComposerScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { ScrollView, StyleSheet, Switch, Text, View } from 'react-native'; <mask> import { MapView } from 'expo'; <mask> import Layout from '../constants/Layout'; <mask> import ListButton from '../components/ListButton'; <mask> <mask> const REGION = { <mask> latitude: 37.78825, </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Localization } from 'expo'; </s> add import * as Localization from 'expo-localization'; </s> remove import { ImagePicker, Permissions, Video } from 'expo'; </s> add import { Video } from 'expo-av'; import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { BlurView, Location, MapView, Notifications, TaskManager } from 'expo'; </s> add import { Notifications } from 'expo'; import * as TaskManager from 'expo-task-manager'; import MapView from 'react-native-maps'; import * as Location from 'expo-location'; import { BlurView } from 'expo-blur';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/MapsScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Text, MaskedViewIOS, View } from 'react-native'; <mask> import { GL } from 'expo'; <mask> <mask> const vertSrc = ` <mask> attribute vec2 position; <mask> varying vec2 uv; <mask> void main() { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Asset, FileSystem, GLView, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { GLView } from 'expo-gl'; import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { Camera, GLView, Permissions, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import * as Permissions from 'expo-permissions'; import { GLView } from 'expo-gl'; import { Camera } from 'expo-camera'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { Asset, GL } from 'expo'; </s> add import * as GL from 'expo-gl'; import { Asset } from 'expo-asset'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { AuthSession, Constants } from 'expo'; </s> add import { AuthSession } from 'expo'; import Constants from 'expo-constants';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/MaskGLScreen.tsx
keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { MediaLibrary } from 'expo'; <mask> import { <mask> FlatList, <mask> StyleSheet, <mask> Text, <mask> TouchableOpacity, </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { Contacts } from 'expo'; </s> add import * as Contacts from 'expo-contacts'; </s> remove import { Permissions, MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; import * as Permissions from 'expo-permissions'; </s> remove import { FileSystem, MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; import * as FileSystem from 'expo-file-system';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/MediaLibrary/MediaAlbumsScreen.tsx
keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { MediaLibrary } from 'expo'; <mask> import { Image, ScrollView, StyleSheet, View } from 'react-native'; <mask> import { NavigationScreenProps } from 'react-navigation'; <mask> <mask> import Button from '../../components/Button'; <mask> import MonoText from '../../components/MonoText'; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { LinearGradient } from 'expo'; </s> add import { LinearGradient } from 'expo-linear-gradient'; </s> remove import { BlurView, Location, MapView, Notifications, TaskManager } from 'expo'; </s> add import { Notifications } from 'expo'; import * as TaskManager from 'expo-task-manager'; import MapView from 'react-native-maps'; import * as Location from 'expo-location'; import { BlurView } from 'expo-blur'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { ImagePicker, Permissions, Video } from 'expo'; </s> add import { Video } from 'expo-av'; import * as Permissions from 'expo-permissions'; import * as ImagePicker from 'expo-image-picker';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/MediaLibrary/MediaDetailsScreen.tsx
keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { MediaLibrary } from 'expo'; <mask> import { View, Image, StyleSheet, Text, TouchableOpacity, StyleProp, ViewStyle } from 'react-native'; <mask> import { FontAwesome } from '@expo/vector-icons'; <mask> <mask> export default class MediaLibraryCell extends React.Component<{ <mask> asset: MediaLibrary.Asset; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { Contacts } from 'expo'; </s> add import * as Contacts from 'expo-contacts'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { AdMobBanner, AdMobRewarded, AdMobInterstitial } from 'expo'; </s> add import { AdMobBanner, AdMobInterstitial, AdMobRewarded } from 'expo-ads-admob';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/MediaLibrary/MediaLibraryCell.tsx
keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Permissions, MediaLibrary } from 'expo'; <mask> import { <mask> ActivityIndicator, <mask> Button as RNButton, <mask> Dimensions, <mask> View, </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { GL } from 'expo'; </s> add import * as GL from 'expo-gl'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/MediaLibrary/MediaLibraryScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { Alert, ScrollView } from 'react-native'; <mask> import { Permissions, Notifications } from 'expo'; <mask> import HeadingText from '../components/HeadingText'; <mask> import ListButton from '../components/ListButton'; <mask> <mask> import registerForPushNotificationsAsync from '../api/registerForPushNotificationsAsync'; <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook'; </s> remove import { Localization } from 'expo'; </s> add import * as Localization from 'expo-localization'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants'; </s> remove import { Asset } from 'expo'; </s> add import { Asset } from 'expo-asset';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/NotificationScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> Text, <mask> TouchableOpacity, <mask> TouchableOpacityProps, <mask> } from 'react-native'; <mask> import { Permissions } from 'expo'; <mask> <mask> interface ButtonProps extends TouchableOpacityProps { <mask> title: string; <mask> } <mask> </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { SMS } from 'expo'; </s> add import * as SMS from 'expo-sms'; </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset'; </s> remove import { FileSystem, MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; import * as FileSystem from 'expo-file-system'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/PermissionsScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> StyleSheet, <mask> Text, <mask> View, <mask> } from 'react-native'; <mask> import { Print, DocumentPicker } from 'expo'; <mask> import ListButton from '../components/ListButton'; <mask> <mask> interface State { <mask> selectedPrinter?: Print.Printer; <mask> } </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker'; </s> remove import { Asset, FileSystem } from 'expo'; </s> add import * as FileSystem from 'expo-file-system'; import { Asset } from 'expo-asset'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Permissions, Notifications } from 'expo'; </s> add import { Notifications } from 'expo'; import * as Permissions from 'expo-permissions'; </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { Asset, ImageManipulator, Permissions, ImagePicker } from 'expo'; </s> add import * as ImagePicker from 'expo-image-picker'; import * as Permissions from 'expo-permissions'; import * as ImageManipulator from 'expo-image-manipulator'; import { Asset } from 'expo-asset';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/PrintScreen.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> StyleSheet, <mask> Text, <mask> View, <mask> } from 'react-native'; <mask> import { Calendar } from 'expo'; <mask> import { NavigationScreenProps } from 'react-navigation'; <mask> <mask> interface RowProps { <mask> reminder: Calendar.Reminder; <mask> getReminder: (reminder: Calendar.Reminder) => void; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Calendar } from 'expo'; </s> add import * as Calendar from 'expo-calendar'; </s> remove import { Calendar, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Calendar from 'expo-calendar'; </s> remove import { MediaLibrary } from 'expo'; </s> add import * as MediaLibrary from 'expo-media-library'; </s> remove import { Contacts, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as Contacts from 'expo-contacts'; </s> remove import { BlurView, Location, MapView, Notifications, TaskManager } from 'expo'; </s> add import { Notifications } from 'expo'; import * as TaskManager from 'expo-task-manager'; import MapView from 'react-native-maps'; import * as Location from 'expo-location'; import { BlurView } from 'expo-blur'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/RemindersScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import React from 'react'; <mask> import { StyleSheet, View, Button, TextInput, Text } from 'react-native'; <mask> import { SMS } from 'expo'; <mask> <mask> interface State { <mask> phoneNumbers: string[]; <mask> message?: string; <mask> error?: string; </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector'; </s> remove import { Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; </s> remove import { MediaLibrary, Permissions } from 'expo'; </s> add import * as Permissions from 'expo-permissions'; import * as MediaLibrary from 'expo-media-library'; </s> remove import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; </s> add import { ScreenOrientation } from 'expo'; import * as Svg from 'react-native-svg'; import * as Permissions from 'expo-permissions'; import { BarCodeScanner } from 'expo-barcode-scanner'; </s> remove import { DocumentPicker } from 'expo'; </s> add import * as DocumentPicker from 'expo-document-picker'; </s> remove import { Constants } from 'expo'; </s> add import Constants from 'expo-constants';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/SMSScreen.tsx
keep keep replace keep keep keep keep keep
<mask> // tslint:disable max-classes-per-file <mask> import React from 'react'; <mask> import { Svg } from 'expo'; <mask> import Example from './Example'; <mask> <mask> class CircleExample extends React.Component { <mask> static title = 'Circle'; <mask> render() { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/SVG/examples/Circle.tsx
keep keep replace keep keep keep keep keep
<mask> // tslint:disable max-classes-per-file <mask> import React from 'react'; <mask> import { Svg } from 'expo'; <mask> import Example from './Example'; <mask> <mask> const { <mask> ClipPath, <mask> Defs, </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; </s> add import { ScreenOrientation } from 'expo'; import * as Svg from 'react-native-svg'; import * as Permissions from 'expo-permissions'; import { BarCodeScanner } from 'expo-barcode-scanner'; </s> remove import { AuthSession, Constants } from 'expo'; </s> add import { AuthSession } from 'expo'; import Constants from 'expo-constants';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/SVG/examples/Clipping.tsx
keep keep replace keep keep keep keep keep
<mask> // tslint:disable max-classes-per-file <mask> import React from 'react'; <mask> import { Svg } from 'expo'; <mask> import Example from './Example'; <mask> <mask> class EllipseExample extends React.Component { <mask> static title = 'Ellipse'; <mask> render() { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake'; </s> remove import { Facebook } from 'expo'; </s> add import * as Facebook from 'expo-facebook';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/SVG/examples/Ellipse.tsx
keep keep replace keep keep keep keep keep
<mask> // tslint:disable max-classes-per-file <mask> import React from 'react'; <mask> import { Svg } from 'expo'; <mask> import Example from './Example'; <mask> <mask> const { Circle, Line, Rect, Text, Use } = Svg; <mask> <mask> interface State { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { BarCodeScanner, Permissions, Svg, ScreenOrientation } from 'expo'; </s> add import { ScreenOrientation } from 'expo'; import * as Svg from 'react-native-svg'; import * as Permissions from 'expo-permissions'; import { BarCodeScanner } from 'expo-barcode-scanner'; </s> remove import { FaceDetector } from 'expo'; </s> add import * as FaceDetector from 'expo-face-detector';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/SVG/examples/G.tsx
keep keep keep replace keep keep keep keep keep
<mask> // tslint:disable max-classes-per-file <mask> import React from 'react'; <mask> import { View } from 'react-native'; <mask> import { Svg } from 'expo'; <mask> import Example from './Example'; <mask> <mask> const { Defs, LinearGradient, RadialGradient, Stop, Ellipse, Circle, Text, Rect, G } = Svg; <mask> <mask> class LinearGradientHorizontal extends React.Component { </s> [ncl][test-suite] Change imports to SDK 33 syntax with the codemod (#4219) * [ncl][test-suite] Change imports to SDK 33 syntax with the codemod * [ncl][test-suite] Add new imported packages to dependencies </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { Svg } from 'expo'; </s> add import * as Svg from 'react-native-svg'; </s> remove import { BlurView } from 'expo'; </s> add import { BlurView } from 'expo-blur'; </s> remove import { KeepAwake } from 'expo'; </s> add import KeepAwake from 'expo-keep-awake';
https://github.com/expo/expo/commit/a47a147235a4b64230b86da45b8763472c68a18d
apps/native-component-list/src/screens/SVG/examples/Gradients.tsx
keep keep keep add keep keep keep keep
<mask> export declare function getUrlAsync(): Promise<string | null>; <mask> /** <mask> * Sets a URL in the user's clipboard. <mask> * <mask> * @param url The URL to save to the clipboard. <mask> * @platform ios <mask> */ <mask> export declare function setUrlAsync(url: string): Promise<void>; </s> [doc][ios][clipboard] Clarify documentation about `setUrlAsync` (#19103) </s> add * This function behaves the same as [`setStringAsync()`](#setstringasynctext-options), except that * it sets the clipboard content type to be a URL. It lets your app or other apps know that the * clipboard contains a URL and behave accordingly. * </s> add * This function behaves the same as [`setStringAsync()`](#setstringasynctext-options), except that * it sets the clipboard content type to be a URL. It lets your app or other apps know that the * clipboard contains a URL and behave accordingly. *
https://github.com/expo/expo/commit/a951355c3a627ea7366fd564bbdf7b8447e377d6
packages/expo-clipboard/build/Clipboard.d.ts
keep keep add keep keep keep keep keep
<mask> /** <mask> * Sets a URL in the user's clipboard. <mask> * <mask> * @param url The URL to save to the clipboard. <mask> * @platform ios <mask> */ <mask> export async function setUrlAsync(url) { <mask> if (!ExpoClipboard.setUrlAsync) { </s> [doc][ios][clipboard] Clarify documentation about `setUrlAsync` (#19103) </s> add * This function behaves the same as [`setStringAsync()`](#setstringasynctext-options), except that * it sets the clipboard content type to be a URL. It lets your app or other apps know that the * clipboard contains a URL and behave accordingly. * </s> add * This function behaves the same as [`setStringAsync()`](#setstringasynctext-options), except that * it sets the clipboard content type to be a URL. It lets your app or other apps know that the * clipboard contains a URL and behave accordingly. *
https://github.com/expo/expo/commit/a951355c3a627ea7366fd564bbdf7b8447e377d6
packages/expo-clipboard/build/Clipboard.js
keep add keep keep keep keep
<mask> * Sets a URL in the user's clipboard. <mask> * <mask> * @param url The URL to save to the clipboard. <mask> * @platform ios <mask> */ <mask> export async function setUrlAsync(url: string): Promise<void> { </s> [doc][ios][clipboard] Clarify documentation about `setUrlAsync` (#19103) </s> add * This function behaves the same as [`setStringAsync()`](#setstringasynctext-options), except that * it sets the clipboard content type to be a URL. It lets your app or other apps know that the * clipboard contains a URL and behave accordingly. * </s> add * This function behaves the same as [`setStringAsync()`](#setstringasynctext-options), except that * it sets the clipboard content type to be a URL. It lets your app or other apps know that the * clipboard contains a URL and behave accordingly. *
https://github.com/expo/expo/commit/a951355c3a627ea7366fd564bbdf7b8447e377d6
packages/expo-clipboard/src/Clipboard.ts
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> )} <mask> </div> <mask> <div className={STYLES_RIGHT}> <mask> {!this.props.hideAlgoliaSearch && ( <mask> <AlgoliaSearch <mask> className={STYLES_HIDE_MOBILE} <mask> router={this.props.router} <mask> activeVersion={this.props.activeVersion} <mask> /> <mask> )} <mask> <mask> {!this.props.isMenuActive && ( <mask> <Link <mask> prefetch </s> [docs] improves default search styling to prevent as much style jumping as possible </s> remove <div className={this.props.className} style={this.props.style}> </s> add <div className={STYLES_INPUT} style={this.props.style}> </s> remove className={`${STYLES_INPUT_FIELD}`} </s> add </s> remove placeholder="Search..." </s> add placeholder="Search the docs" </s> remove const STYLES_INPUT_FIELD = css` border: 1px solid ${Constants.colors.border}; border-radius: 3; font-size: 14px; padding: 2px 10px; </s> add const STYLES_INPUT = css` display: flex; align-items: flex-end; .searchbox { width: auto; } .searchbox__input, input { font-family: ${Constants.fontFamilies.book}; color: ${Constants.colors.black80}; box-sizing: border-box; width: 380px; font-size: 14px; padding: 0 36px 0 32px; border-radius: 5px; height: 32px; outline: 0; border: 1px solid ${Constants.colors.border}; box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.04); :focus { border: 1px solid ${Constants.colors.expo}; outline: 0; } } .svg-icons { left: 240px; } @media screen and (max-width: ${Constants.breakpoints.mobile}) { display: none; }
https://github.com/expo/expo/commit/aa5646ba73380a706ac3585d0dcabcebc3cff6f0
docs/components/DocumentationHeader.js
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> import * as Utilities from '~/common/utilities'; <mask> <mask> import { LATEST_VERSION } from '~/common/versions'; <mask> <mask> const STYLES_INPUT_FIELD = css` <mask> border: 1px solid ${Constants.colors.border}; <mask> border-radius: 3; <mask> font-size: 14px; <mask> padding: 2px 10px; <mask> `; <mask> <mask> // TODO(jim): Not particularly happy with how this component chunks in while loading. <mask> class AlgoliaSearch extends React.Component { <mask> componentWillReceiveProps(nextProps) { </s> [docs] improves default search styling to prevent as much style jumping as possible </s> remove <div className={this.props.className} style={this.props.style}> </s> add <div className={STYLES_INPUT} style={this.props.style}> </s> remove className={`${STYLES_INPUT_FIELD}`} </s> add </s> remove placeholder="Search..." </s> add placeholder="Search the docs" </s> remove <AlgoliaSearch className={STYLES_HIDE_MOBILE} router={this.props.router} activeVersion={this.props.activeVersion} /> </s> add <AlgoliaSearch router={this.props.router} activeVersion={this.props.activeVersion} />
https://github.com/expo/expo/commit/aa5646ba73380a706ac3585d0dcabcebc3cff6f0
docs/components/plugins/AlgoliaSearch.js
keep keep keep keep replace keep replace keep keep keep
<mask> } <mask> <mask> render() { <mask> return ( <mask> <div className={this.props.className} style={this.props.style}> <mask> <input <mask> className={`${STYLES_INPUT_FIELD}`} <mask> id="algolia-search-box" <mask> type="text" <mask> placeholder="Search..." </s> [docs] improves default search styling to prevent as much style jumping as possible </s> remove placeholder="Search..." </s> add placeholder="Search the docs" </s> remove const STYLES_INPUT_FIELD = css` border: 1px solid ${Constants.colors.border}; border-radius: 3; font-size: 14px; padding: 2px 10px; </s> add const STYLES_INPUT = css` display: flex; align-items: flex-end; .searchbox { width: auto; } .searchbox__input, input { font-family: ${Constants.fontFamilies.book}; color: ${Constants.colors.black80}; box-sizing: border-box; width: 380px; font-size: 14px; padding: 0 36px 0 32px; border-radius: 5px; height: 32px; outline: 0; border: 1px solid ${Constants.colors.border}; box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.04); :focus { border: 1px solid ${Constants.colors.expo}; outline: 0; } } .svg-icons { left: 240px; } @media screen and (max-width: ${Constants.breakpoints.mobile}) { display: none; } </s> remove <AlgoliaSearch className={STYLES_HIDE_MOBILE} router={this.props.router} activeVersion={this.props.activeVersion} /> </s> add <AlgoliaSearch router={this.props.router} activeVersion={this.props.activeVersion} />
https://github.com/expo/expo/commit/aa5646ba73380a706ac3585d0dcabcebc3cff6f0
docs/components/plugins/AlgoliaSearch.js
keep keep keep keep replace keep keep keep keep keep
<mask> <input <mask> className={`${STYLES_INPUT_FIELD}`} <mask> id="algolia-search-box" <mask> type="text" <mask> placeholder="Search..." <mask> autoComplete="off" <mask> spellCheck="false" <mask> dir="auto" <mask> /> <mask> </div> </s> [docs] improves default search styling to prevent as much style jumping as possible </s> remove className={`${STYLES_INPUT_FIELD}`} </s> add </s> remove <div className={this.props.className} style={this.props.style}> </s> add <div className={STYLES_INPUT} style={this.props.style}> </s> remove <AlgoliaSearch className={STYLES_HIDE_MOBILE} router={this.props.router} activeVersion={this.props.activeVersion} /> </s> add <AlgoliaSearch router={this.props.router} activeVersion={this.props.activeVersion} /> </s> remove const STYLES_INPUT_FIELD = css` border: 1px solid ${Constants.colors.border}; border-radius: 3; font-size: 14px; padding: 2px 10px; </s> add const STYLES_INPUT = css` display: flex; align-items: flex-end; .searchbox { width: auto; } .searchbox__input, input { font-family: ${Constants.fontFamilies.book}; color: ${Constants.colors.black80}; box-sizing: border-box; width: 380px; font-size: 14px; padding: 0 36px 0 32px; border-radius: 5px; height: 32px; outline: 0; border: 1px solid ${Constants.colors.border}; box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.04); :focus { border: 1px solid ${Constants.colors.expo}; outline: 0; } } .svg-icons { left: 240px; } @media screen and (max-width: ${Constants.breakpoints.mobile}) { display: none; }
https://github.com/expo/expo/commit/aa5646ba73380a706ac3585d0dcabcebc3cff6f0
docs/components/plugins/AlgoliaSearch.js
keep keep add keep keep keep keep keep keep
<mask> package expo.modules.updates.db.dao; <mask> <mask> import androidx.room.Delete; <mask> import expo.modules.updates.db.enums.UpdateStatus; <mask> import expo.modules.updates.db.entity.AssetEntity; <mask> import expo.modules.updates.db.entity.UpdateEntity; <mask> <mask> import java.util.Arrays; <mask> import java.util.List; </s> [expo-updates] update scopeKey in database if there's a mismatch (#10309) </s> add scopeKey:(NSString *)scopeKey </s> add @property (nonatomic, strong, readwrite) NSString *scopeKey; </s> add - (void)setScopeKey:(NSString *)scopeKey onUpdate:(EXUpdatesUpdate *)update error:(NSError ** _Nullable)error; </s> add // if something has gone wrong on the server and we have two updates with the same id // but different scope keys, we should try to launch something rather than show a cryptic // error to the user. if (existingUpdateEntity != null && !existingUpdateEntity.scopeKey.equals(newUpdateEntity.scopeKey)) { mDatabase.updateDao().setUpdateScopeKey(existingUpdateEntity, newUpdateEntity.scopeKey); Log.e(TAG, "Loaded an update with the same ID but a different scopeKey than one we already have on disk. This is a server error. Overwriting the scopeKey and loading the existing update."); } </s> add public void setUpdateScopeKey(UpdateEntity update, String newScopeKey) { update.scopeKey = newScopeKey; _updateUpdate(update); } </s> add @Update public abstract void _updateUpdate(UpdateEntity update);
https://github.com/expo/expo/commit/ab921b6664dbf4f4787a02ab0421d250b1c33532
packages/expo-updates/android/src/main/java/expo/modules/updates/db/dao/UpdateDao.java
keep keep add keep keep keep keep keep
<mask> @Query("UPDATE updates SET status = :status WHERE id = :id;") <mask> public abstract void _markUpdateWithStatus(UpdateStatus status, UUID id); <mask> <mask> <mask> /** <mask> * for public use <mask> */ <mask> </s> [expo-updates] update scopeKey in database if there's a mismatch (#10309) </s> add public void setUpdateScopeKey(UpdateEntity update, String newScopeKey) { update.scopeKey = newScopeKey; _updateUpdate(update); } </s> add // if something has gone wrong on the server and we have two updates with the same id // but different scope keys, we should try to launch something rather than show a cryptic // error to the user. if (existingUpdateEntity != null && !existingUpdateEntity.scopeKey.equals(newUpdateEntity.scopeKey)) { mDatabase.updateDao().setUpdateScopeKey(existingUpdateEntity, newUpdateEntity.scopeKey); Log.e(TAG, "Loaded an update with the same ID but a different scopeKey than one we already have on disk. This is a server error. Overwriting the scopeKey and loading the existing update."); } </s> add scopeKey:(NSString *)scopeKey </s> add @property (nonatomic, strong, readwrite) NSString *scopeKey; </s> add - (void)setScopeKey:(NSString *)scopeKey onUpdate:(EXUpdatesUpdate *)update error:(NSError ** _Nullable)error; </s> add import androidx.room.Update;
https://github.com/expo/expo/commit/ab921b6664dbf4f4787a02ab0421d250b1c33532
packages/expo-updates/android/src/main/java/expo/modules/updates/db/dao/UpdateDao.java
keep keep keep add keep keep keep keep
<mask> <mask> @Insert <mask> public abstract void insertUpdate(UpdateEntity update); <mask> <mask> @Transaction <mask> public void markUpdateFinished(UpdateEntity update, boolean hasSkippedEmbeddedAssets) { <mask> UpdateStatus statusToMark = UpdateStatus.READY; <mask> if (update.status == UpdateStatus.DEVELOPMENT) { </s> [expo-updates] update scopeKey in database if there's a mismatch (#10309) </s> add @Update public abstract void _updateUpdate(UpdateEntity update); </s> add // if something has gone wrong on the server and we have two updates with the same id // but different scope keys, we should try to launch something rather than show a cryptic // error to the user. if (existingUpdateEntity != null && !existingUpdateEntity.scopeKey.equals(newUpdateEntity.scopeKey)) { mDatabase.updateDao().setUpdateScopeKey(existingUpdateEntity, newUpdateEntity.scopeKey); Log.e(TAG, "Loaded an update with the same ID but a different scopeKey than one we already have on disk. This is a server error. Overwriting the scopeKey and loading the existing update."); } </s> add scopeKey:(NSString *)scopeKey </s> add @property (nonatomic, strong, readwrite) NSString *scopeKey; </s> add - (void)setScopeKey:(NSString *)scopeKey onUpdate:(EXUpdatesUpdate *)update error:(NSError ** _Nullable)error; </s> add import androidx.room.Update;
https://github.com/expo/expo/commit/ab921b6664dbf4f4787a02ab0421d250b1c33532
packages/expo-updates/android/src/main/java/expo/modules/updates/db/dao/UpdateDao.java
keep add keep keep keep keep keep
<mask> UpdateEntity newUpdateEntity = manifest.getUpdateEntity(); <mask> UpdateEntity existingUpdateEntity = mDatabase.updateDao().loadUpdateWithId(newUpdateEntity.id); <mask> if (existingUpdateEntity != null && existingUpdateEntity.status == UpdateStatus.READY) { <mask> // hooray, we already have this update downloaded and ready to go! <mask> mUpdateEntity = existingUpdateEntity; <mask> finishWithSuccess(); <mask> } else { </s> [expo-updates] update scopeKey in database if there's a mismatch (#10309) </s> add public void setUpdateScopeKey(UpdateEntity update, String newScopeKey) { update.scopeKey = newScopeKey; _updateUpdate(update); } </s> add @Update public abstract void _updateUpdate(UpdateEntity update); </s> add scopeKey:(NSString *)scopeKey </s> add @property (nonatomic, strong, readwrite) NSString *scopeKey; </s> add - (void)setScopeKey:(NSString *)scopeKey onUpdate:(EXUpdatesUpdate *)update error:(NSError ** _Nullable)error; </s> add import androidx.room.Update;
https://github.com/expo/expo/commit/ab921b6664dbf4f4787a02ab0421d250b1c33532
packages/expo-updates/android/src/main/java/expo/modules/updates/loader/RemoteLoader.java
keep keep keep add keep keep keep keep
<mask> - (BOOL)addExistingAsset:(EXUpdatesAsset *)asset toUpdateWithId:(NSUUID *)updateId error:(NSError ** _Nullable)error; <mask> - (void)updateAsset:(EXUpdatesAsset *)asset error:(NSError ** _Nullable)error; <mask> - (void)mergeAsset:(EXUpdatesAsset *)asset withExistingEntry:(EXUpdatesAsset *)existingAsset error:(NSError ** _Nullable)error; <mask> - (void)markUpdateFinished:(EXUpdatesUpdate *)update error:(NSError ** _Nullable)error; <mask> <mask> - (void)deleteUpdates:(NSArray<EXUpdatesUpdate *> *)updates error:(NSError ** _Nullable)error; <mask> - (nullable NSArray<EXUpdatesAsset *> *)deleteUnusedAssetsWithError:(NSError ** _Nullable)error; <mask> </s> [expo-updates] update scopeKey in database if there's a mismatch (#10309) </s> add scopeKey:(NSString *)scopeKey </s> add @property (nonatomic, strong, readwrite) NSString *scopeKey; </s> add // if something has gone wrong on the server and we have two updates with the same id // but different scope keys, we should try to launch something rather than show a cryptic // error to the user. if (existingUpdateEntity != null && !existingUpdateEntity.scopeKey.equals(newUpdateEntity.scopeKey)) { mDatabase.updateDao().setUpdateScopeKey(existingUpdateEntity, newUpdateEntity.scopeKey); Log.e(TAG, "Loaded an update with the same ID but a different scopeKey than one we already have on disk. This is a server error. Overwriting the scopeKey and loading the existing update."); } </s> add public void setUpdateScopeKey(UpdateEntity update, String newScopeKey) { update.scopeKey = newScopeKey; _updateUpdate(update); } </s> add @Update public abstract void _updateUpdate(UpdateEntity update); </s> add import androidx.room.Update;
https://github.com/expo/expo/commit/ab921b6664dbf4f4787a02ab0421d250b1c33532
packages/expo-updates/ios/EXUpdates/Database/EXUpdatesDatabase.h
keep keep keep add keep keep keep keep keep
<mask> <mask> @interface EXUpdatesUpdate () <mask> <mask> @property (nonatomic, strong, readwrite) NSUUID *updateId; <mask> @property (nonatomic, strong, readwrite) NSDate *commitTime; <mask> @property (nonatomic, strong, readwrite) NSString *runtimeVersion; <mask> @property (nonatomic, strong, readwrite, nullable) NSDictionary *metadata; <mask> @property (nonatomic, assign, readwrite) BOOL keep; <mask> @property (nonatomic, strong, readwrite) NSURL *bundleUrl; </s> [expo-updates] update scopeKey in database if there's a mismatch (#10309) </s> add scopeKey:(NSString *)scopeKey </s> add - (void)setScopeKey:(NSString *)scopeKey onUpdate:(EXUpdatesUpdate *)update error:(NSError ** _Nullable)error; </s> add // if something has gone wrong on the server and we have two updates with the same id // but different scope keys, we should try to launch something rather than show a cryptic // error to the user. if (existingUpdateEntity != null && !existingUpdateEntity.scopeKey.equals(newUpdateEntity.scopeKey)) { mDatabase.updateDao().setUpdateScopeKey(existingUpdateEntity, newUpdateEntity.scopeKey); Log.e(TAG, "Loaded an update with the same ID but a different scopeKey than one we already have on disk. This is a server error. Overwriting the scopeKey and loading the existing update."); } </s> add public void setUpdateScopeKey(UpdateEntity update, String newScopeKey) { update.scopeKey = newScopeKey; _updateUpdate(update); } </s> add @Update public abstract void _updateUpdate(UpdateEntity update); </s> add import androidx.room.Update;
https://github.com/expo/expo/commit/ab921b6664dbf4f4787a02ab0421d250b1c33532
packages/expo-updates/ios/EXUpdates/Update/EXUpdatesUpdate+Private.h
keep keep keep add keep keep keep keep
<mask> <mask> @property (nonatomic, assign) EXUpdatesUpdateStatus status; <mask> <mask> + (instancetype)updateWithId:(NSUUID *)updateId <mask> commitTime:(NSDate *)commitTime <mask> runtimeVersion:(NSString *)runtimeVersion <mask> metadata:(nullable NSDictionary *)metadata <mask> status:(EXUpdatesUpdateStatus)status </s> [expo-updates] update scopeKey in database if there's a mismatch (#10309) </s> add @property (nonatomic, strong, readwrite) NSString *scopeKey; </s> add - (void)setScopeKey:(NSString *)scopeKey onUpdate:(EXUpdatesUpdate *)update error:(NSError ** _Nullable)error; </s> add // if something has gone wrong on the server and we have two updates with the same id // but different scope keys, we should try to launch something rather than show a cryptic // error to the user. if (existingUpdateEntity != null && !existingUpdateEntity.scopeKey.equals(newUpdateEntity.scopeKey)) { mDatabase.updateDao().setUpdateScopeKey(existingUpdateEntity, newUpdateEntity.scopeKey); Log.e(TAG, "Loaded an update with the same ID but a different scopeKey than one we already have on disk. This is a server error. Overwriting the scopeKey and loading the existing update."); } </s> add public void setUpdateScopeKey(UpdateEntity update, String newScopeKey) { update.scopeKey = newScopeKey; _updateUpdate(update); } </s> add @Update public abstract void _updateUpdate(UpdateEntity update); </s> add import androidx.room.Update;
https://github.com/expo/expo/commit/ab921b6664dbf4f4787a02ab0421d250b1c33532
packages/expo-updates/ios/EXUpdates/Update/EXUpdatesUpdate.h
replace keep keep keep keep keep
<mask> import { UnavailabilityError } from '@unimodules/core'; <mask> import uuidv4 from 'uuid/v4'; <mask> import NotificationScheduler from './NotificationScheduler'; <mask> export default async function scheduleNotificationAsync(request) { <mask> if (!NotificationScheduler.scheduleNotificationAsync) { <mask> throw new UnavailabilityError('Notifications', 'scheduleNotificationAsync'); </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { Platform, UnavailabilityError } from '@unimodules/core'; </s> remove (typeof trigger === 'object' && trigger['date'])); </s> add (typeof trigger === 'object' && 'date' in trigger)); </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, // There's no notion of channels on platforms other than Android. android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> remove (typeof trigger === 'object' && trigger['date']) </s> add (typeof trigger === 'object' && 'date' in trigger) </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true);
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/build/scheduleNotificationAsync.js
keep keep keep keep replace replace keep keep keep keep keep
<mask> const { repeats, ...calendarTrigger } = userFacingTrigger; <mask> return { type: 'calendar', value: calendarTrigger, repeats }; <mask> } <mask> else { <mask> // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) <mask> return { type: 'channel', channelId: userFacingTrigger.channelId }; <mask> } <mask> } <mask> function isCalendarTrigger(trigger) { <mask> const { channelId, ...triggerWithoutChannelId } = trigger; <mask> return Object.keys(triggerWithoutChannelId).length > 0; </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, // There's no notion of channels on platforms other than Android. android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> remove (typeof trigger === 'object' && trigger['date'])); </s> add (typeof trigger === 'object' && 'date' in trigger)); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove return (Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> add const { channelId, ...triggerWithoutChannelId } = trigger;
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/build/scheduleNotificationAsync.js
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> function isDateTrigger(trigger) { <mask> return (trigger instanceof Date || <mask> typeof trigger === 'number' || <mask> (typeof trigger === 'object' && trigger['date'])); <mask> } <mask> function parseDateTrigger(trigger) { <mask> if (trigger instanceof Date || typeof trigger === 'number') { <mask> return { type: 'date', timestamp: toTimestamp(trigger) }; <mask> } </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove (typeof trigger === 'object' && trigger['date']) </s> add (typeof trigger === 'object' && 'date' in trigger) </s> remove return (Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, // There's no notion of channels on platforms other than Android. android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> add const { channelId, ...triggerWithoutChannelId } = trigger;
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/build/scheduleNotificationAsync.js
keep keep keep replace replace replace replace replace keep keep replace replace replace replace replace replace
<mask> return date; <mask> } <mask> function isDailyTriggerInput(trigger) { <mask> return (Object.keys(trigger).length === 3 && <mask> 'hour' in trigger && <mask> 'minute' in trigger && <mask> 'repeats' in trigger && <mask> trigger.repeats === true); <mask> } <mask> function isWeeklyTriggerInput(trigger) { <mask> return (Object.keys(trigger).length === 4 && <mask> 'weekday' in trigger && <mask> 'hour' in trigger && <mask> 'minute' in trigger && <mask> 'repeats' in trigger && <mask> trigger.repeats === true); </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> remove Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> remove (typeof trigger === 'object' && trigger['date'])); </s> add (typeof trigger === 'object' && 'date' in trigger));
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/build/scheduleNotificationAsync.js
replace keep keep keep keep keep
<mask> import { UnavailabilityError } from '@unimodules/core'; <mask> import uuidv4 from 'uuid/v4'; <mask> <mask> import NotificationScheduler from './NotificationScheduler'; <mask> import { NotificationTriggerInput as NativeNotificationTriggerInput } from './NotificationScheduler.types'; <mask> import { </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { Platform, UnavailabilityError } from '@unimodules/core'; </s> remove (typeof trigger === 'object' && trigger['date']) </s> add (typeof trigger === 'object' && 'date' in trigger) </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, // There's no notion of channels on platforms other than Android. android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> remove (typeof trigger === 'object' && trigger['date'])); </s> add (typeof trigger === 'object' && 'date' in trigger)); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true);
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/src/scheduleNotificationAsync.ts
keep keep keep keep replace replace keep keep keep keep keep
<mask> } else if (isCalendarTrigger(userFacingTrigger)) { <mask> const { repeats, ...calendarTrigger } = userFacingTrigger; <mask> return { type: 'calendar', value: calendarTrigger, repeats }; <mask> } else { <mask> // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) <mask> return { type: 'channel', channelId: userFacingTrigger.channelId }; <mask> } <mask> } <mask> <mask> function isCalendarTrigger( <mask> trigger: CalendarTriggerInput | ChannelAwareTriggerInput </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove // @ts-ignore Type '"channel"' is not assignable to type '"daily"'.ts(2322) return { type: 'channel', channelId: userFacingTrigger.channelId }; </s> add return Platform.select({ default: null, android: { type: 'channel', channelId: userFacingTrigger.channelId }, }); </s> remove (typeof trigger === 'object' && trigger['date'])); </s> add (typeof trigger === 'object' && 'date' in trigger)); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { Platform, UnavailabilityError } from '@unimodules/core'; </s> add const { channelId, ...triggerWithoutChannelId } = trigger;
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/src/scheduleNotificationAsync.ts
keep keep keep keep replace keep keep keep keep keep
<mask> ): trigger is DateTriggerInput { <mask> return ( <mask> trigger instanceof Date || <mask> typeof trigger === 'number' || <mask> (typeof trigger === 'object' && trigger['date']) <mask> ); <mask> } <mask> <mask> function parseDateTrigger(trigger: DateTriggerInput): NativeNotificationTriggerInput { <mask> if (trigger instanceof Date || typeof trigger === 'number') { </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove (typeof trigger === 'object' && trigger['date'])); </s> add (typeof trigger === 'object' && 'date' in trigger)); </s> remove Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> remove Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> remove return (Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger;
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/src/scheduleNotificationAsync.ts
keep keep add keep keep keep keep
<mask> function isDailyTriggerInput( <mask> trigger: WeeklyTriggerInput | DailyTriggerInput | CalendarTriggerInput | TimeIntervalTriggerInput <mask> ): trigger is DailyTriggerInput { <mask> return ( <mask> Object.keys(triggerWithoutChannelId).length === 3 && <mask> 'hour' in triggerWithoutChannelId && <mask> 'minute' in triggerWithoutChannelId && </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> remove Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> remove return (Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove (typeof trigger === 'object' && trigger['date']) </s> add (typeof trigger === 'object' && 'date' in trigger)
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/src/scheduleNotificationAsync.ts
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> function isDailyTriggerInput( <mask> trigger: WeeklyTriggerInput | DailyTriggerInput | CalendarTriggerInput | TimeIntervalTriggerInput <mask> ): trigger is DailyTriggerInput { <mask> return ( <mask> Object.keys(trigger).length === 3 && <mask> 'hour' in trigger && <mask> 'minute' in trigger && <mask> 'repeats' in trigger && <mask> trigger.repeats === true <mask> ); <mask> } <mask> <mask> function isWeeklyTriggerInput( <mask> trigger: WeeklyTriggerInput | DailyTriggerInput | CalendarTriggerInput | TimeIntervalTriggerInput </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> remove return (Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove (typeof trigger === 'object' && trigger['date']) </s> add (typeof trigger === 'object' && 'date' in trigger)
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/src/scheduleNotificationAsync.ts
keep keep keep add keep keep keep keep keep keep
<mask> <mask> function isWeeklyTriggerInput( <mask> trigger: WeeklyTriggerInput | DailyTriggerInput | CalendarTriggerInput | TimeIntervalTriggerInput <mask> ): trigger is WeeklyTriggerInput { <mask> return ( <mask> Object.keys(triggerWithoutChannelId).length === 4 && <mask> 'weekday' in triggerWithoutChannelId && <mask> 'hour' in triggerWithoutChannelId && <mask> 'minute' in triggerWithoutChannelId && <mask> 'repeats' in triggerWithoutChannelId && </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> remove Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove return (Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove (typeof trigger === 'object' && trigger['date']) </s> add (typeof trigger === 'object' && 'date' in trigger)
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/src/scheduleNotificationAsync.ts
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
<mask> function isWeeklyTriggerInput( <mask> trigger: WeeklyTriggerInput | DailyTriggerInput | CalendarTriggerInput | TimeIntervalTriggerInput <mask> ): trigger is WeeklyTriggerInput { <mask> return ( <mask> Object.keys(trigger).length === 4 && <mask> 'weekday' in trigger && <mask> 'hour' in trigger && <mask> 'minute' in trigger && <mask> 'repeats' in trigger && <mask> trigger.repeats === true <mask> ); <mask> } <mask> <mask> function isSecondsPropertyMisusedInCalendarTriggerInput( <mask> trigger: TimeIntervalTriggerInput | CalendarTriggerInput </s> [expo-notifications] Fix trigger type detection mechanism (#10454) # Why Fixes https://github.com/expo/expo/issues/10415. # How - added `const { channelId, ...triggerWithoutChannelId } = trigger;` structure to two remaining type guards - made it so that `ChannelAwareTriggerInput` is used only on Android (fixes a problem where on iOS this would result in _unrecognized trigger type_). Fixing this in TS lets us publish an SDK39-compatible update to `expo-notifications` (instead of adding support for `ChannelAwareTriggerInput` to iOS native code). # Test Plan Added tests! </s> remove Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true </s> add Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> add const { channelId, ...triggerWithoutChannelId } = trigger; </s> remove return (Object.keys(trigger).length === 4 && 'weekday' in trigger && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 4 && 'weekday' in triggerWithoutChannelId && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove return (Object.keys(trigger).length === 3 && 'hour' in trigger && 'minute' in trigger && 'repeats' in trigger && trigger.repeats === true); </s> add const { channelId, ...triggerWithoutChannelId } = trigger; return (Object.keys(triggerWithoutChannelId).length === 3 && 'hour' in triggerWithoutChannelId && 'minute' in triggerWithoutChannelId && 'repeats' in triggerWithoutChannelId && triggerWithoutChannelId.repeats === true); </s> remove (typeof trigger === 'object' && trigger['date']) </s> add (typeof trigger === 'object' && 'date' in trigger)
https://github.com/expo/expo/commit/ac3f968c3150edec91d50fb8daa0afe1c201ca4c
packages/expo-notifications/src/scheduleNotificationAsync.ts
keep keep add keep keep keep keep keep
<mask> // Copyright 2015-present 650 Industries. All rights reserved. <mask> <mask> #import <Foundation/Foundation.h> <mask> <mask> FOUNDATION_EXPORT NSString * const kEXShellBundleResourceName; <mask> FOUNDATION_EXPORT NSString * const kEXShellManifestResourceName; <mask> <mask> @interface EXShellManager : NSObject </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> add @property (nonatomic, readonly) EXTestEnvironment testEnvironment; </s> add typedef enum EXTestEnvironment { EXTestEnvironmentNone = 0, EXTestEnvironmentLocal = 1, EXTestEnvironmentCI = 2, } EXTestEnvironment; </s> remove #define TEST_ENVIRONMENT 1 </s> add </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString; </s> remove RCT_EXPORT_METHOD(action: (NSDictionary *)params) </s> add RCT_REMAP_METHOD(action, actionWithParams:(NSDictionary *)params withResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) </s> remove // TODO NSLog(@"action native"); </s> add // stub on iOS resolve(@{}); } RCT_REMAP_METHOD(shouldSkipTestsRequiringPermissionsAsync, shouldSkipTestsRequiringPermissionsWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) { resolve(@(_environment == EXTestEnvironmentCI)); } #pragma mark - util + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString { if ([testEnvironmentString isEqualToString:@"local"]) { return EXTestEnvironmentLocal; } else if ([testEnvironmentString isEqualToString:@"ci"]) { return EXTestEnvironmentCI; } return EXTestEnvironmentNone;
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Kernel/Environment/EXShellManager.h
keep keep keep add keep keep keep keep keep keep
<mask> @property (nonatomic, readonly) NSString *urlScheme; <mask> @property (nonatomic, readonly) NSArray *allManifestUrls; <mask> @property (nonatomic, readonly) BOOL isManifestVerificationBypassed; <mask> @property (nonatomic, readonly) BOOL isRemoteJSEnabled; <mask> <mask> /** <mask> * True if the given string is not null and equals self.urlScheme <mask> */ <mask> - (BOOL)isShellUrlScheme: (NSString *)scheme; <mask> </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> remove #define TEST_ENVIRONMENT 1 </s> add </s> add @interface EXTest () @property (nonatomic, assign) EXTestEnvironment environment; @end </s> add #import "EXTest.h" </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment { if (self = [super init]) { _environment = environment; } return self; } </s> remove // TODO NSLog(@"action native"); </s> add // stub on iOS resolve(@{}); } RCT_REMAP_METHOD(shouldSkipTestsRequiringPermissionsAsync, shouldSkipTestsRequiringPermissionsWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) { resolve(@(_environment == EXTestEnvironmentCI)); } #pragma mark - util + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString { if ([testEnvironmentString isEqualToString:@"local"]) { return EXTestEnvironmentLocal; } else if ([testEnvironmentString isEqualToString:@"ci"]) { return EXTestEnvironmentCI; } return EXTestEnvironmentNone; </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString;
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Kernel/Environment/EXShellManager.h
keep keep keep add keep keep
<mask> <key>manifestUrl</key> <mask> <string>exp://exp.host/@community/pomodoro</string> <mask> <key>isManifestVerificationBypassed</key> <mask> <false/> <mask> </dict> <mask> </plist> </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> remove #define TEST_ENVIRONMENT 1 </s> add </s> remove // TODO NSLog(@"action native"); </s> add // stub on iOS resolve(@{}); } RCT_REMAP_METHOD(shouldSkipTestsRequiringPermissionsAsync, shouldSkipTestsRequiringPermissionsWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) { resolve(@(_environment == EXTestEnvironmentCI)); } #pragma mark - util + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString { if ([testEnvironmentString isEqualToString:@"local"]) { return EXTestEnvironmentLocal; } else if ([testEnvironmentString isEqualToString:@"ci"]) { return EXTestEnvironmentCI; } return EXTestEnvironmentNone; </s> remove RCT_EXPORT_METHOD(action: (NSDictionary *)params) </s> add RCT_REMAP_METHOD(action, actionWithParams:(NSDictionary *)params withResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment { if (self = [super init]) { _environment = environment; } return self; } </s> add @interface EXTest () @property (nonatomic, assign) EXTestEnvironment environment; @end </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString;
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Supporting/EXShell.plist.example
keep keep add keep keep keep keep keep keep
<mask> <mask> FOUNDATION_EXPORT NSNotificationName EXTestSuiteCompletedNotification; <mask> <mask> @interface EXTest : NSObject <RCTBridgeModule> <mask> <mask> - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; <mask> - (instancetype)init NS_UNAVAILABLE; <mask> <mask> + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString; </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString; </s> add @interface EXTest () @property (nonatomic, assign) EXTestEnvironment environment; @end </s> add #import "EXTest.h" </s> remove // TODO NSLog(@"action native"); </s> add // stub on iOS resolve(@{}); } RCT_REMAP_METHOD(shouldSkipTestsRequiringPermissionsAsync, shouldSkipTestsRequiringPermissionsWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) { resolve(@(_environment == EXTestEnvironmentCI)); } #pragma mark - util + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString { if ([testEnvironmentString isEqualToString:@"local"]) { return EXTestEnvironmentLocal; } else if ([testEnvironmentString isEqualToString:@"ci"]) { return EXTestEnvironmentCI; } return EXTestEnvironmentNone; </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment { if (self = [super init]) { _environment = environment; } return self; } </s> add @property (nonatomic, readonly) EXTestEnvironment testEnvironment;
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Versioned/Modules/Internal/Test/EXTest.h
keep keep add keep
<mask> <mask> @interface EXTest : NSObject <RCTBridgeModule> <mask> <mask> @end </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> add typedef enum EXTestEnvironment { EXTestEnvironmentNone = 0, EXTestEnvironmentLocal = 1, EXTestEnvironmentCI = 2, } EXTestEnvironment; </s> add @interface EXTest () @property (nonatomic, assign) EXTestEnvironment environment; @end </s> add #import "EXTest.h" </s> remove // TODO NSLog(@"action native"); </s> add // stub on iOS resolve(@{}); } RCT_REMAP_METHOD(shouldSkipTestsRequiringPermissionsAsync, shouldSkipTestsRequiringPermissionsWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) { resolve(@(_environment == EXTestEnvironmentCI)); } #pragma mark - util + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString { if ([testEnvironmentString isEqualToString:@"local"]) { return EXTestEnvironmentLocal; } else if ([testEnvironmentString isEqualToString:@"ci"]) { return EXTestEnvironmentCI; } return EXTestEnvironmentNone; </s> remove #define TEST_ENVIRONMENT 1 </s> add </s> remove RCT_EXPORT_METHOD(action: (NSDictionary *)params) </s> add RCT_REMAP_METHOD(action, actionWithParams:(NSDictionary *)params withResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject)
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Versioned/Modules/Internal/Test/EXTest.h
keep keep add keep keep keep keep keep
<mask> <mask> NSNotificationName EXTestSuiteCompletedNotification = @"EXTestSuiteCompletedNotification"; <mask> <mask> @implementation EXTest <mask> <mask> + (NSString *)moduleName { return @"ExponentTest"; } <mask> <mask> - (instancetype)initWithEnvironment:(EXTestEnvironment)environment </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment { if (self = [super init]) { _environment = environment; } return self; } </s> add typedef enum EXTestEnvironment { EXTestEnvironmentNone = 0, EXTestEnvironmentLocal = 1, EXTestEnvironmentCI = 2, } EXTestEnvironment; </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString; </s> remove // TODO NSLog(@"action native"); </s> add // stub on iOS resolve(@{}); } RCT_REMAP_METHOD(shouldSkipTestsRequiringPermissionsAsync, shouldSkipTestsRequiringPermissionsWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) { resolve(@(_environment == EXTestEnvironmentCI)); } #pragma mark - util + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString { if ([testEnvironmentString isEqualToString:@"local"]) { return EXTestEnvironmentLocal; } else if ([testEnvironmentString isEqualToString:@"ci"]) { return EXTestEnvironmentCI; } return EXTestEnvironmentNone; </s> add @property (nonatomic, readonly) EXTestEnvironment testEnvironment; </s> remove #define TEST_ENVIRONMENT 1 </s> add
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Versioned/Modules/Internal/Test/EXTest.m
keep keep add keep keep keep keep keep keep
<mask> <mask> + (NSString *)moduleName { return @"ExponentTest"; } <mask> <mask> RCT_EXPORT_METHOD(completed: (NSString *)jsonStringifiedResult) <mask> { <mask> NSDictionary *failedResult = @{ @"failed": @(1) }; <mask> <mask> __block NSError *jsonError; <mask> NSData *jsonData = [jsonStringifiedResult dataUsingEncoding:NSUTF8StringEncoding]; </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> add @interface EXTest () @property (nonatomic, assign) EXTestEnvironment environment; @end </s> add typedef enum EXTestEnvironment { EXTestEnvironmentNone = 0, EXTestEnvironmentLocal = 1, EXTestEnvironmentCI = 2, } EXTestEnvironment; </s> remove #define TEST_ENVIRONMENT 1 </s> add </s> add @property (nonatomic, readonly) EXTestEnvironment testEnvironment; </s> remove // TODO NSLog(@"action native"); </s> add // stub on iOS resolve(@{}); } RCT_REMAP_METHOD(shouldSkipTestsRequiringPermissionsAsync, shouldSkipTestsRequiringPermissionsWithResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject) { resolve(@(_environment == EXTestEnvironmentCI)); } #pragma mark - util + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString { if ([testEnvironmentString isEqualToString:@"local"]) { return EXTestEnvironmentLocal; } else if ([testEnvironmentString isEqualToString:@"ci"]) { return EXTestEnvironmentCI; } return EXTestEnvironmentNone; </s> remove RCT_EXPORT_METHOD(action: (NSDictionary *)params) </s> add RCT_REMAP_METHOD(action, actionWithParams:(NSDictionary *)params withResolver:(RCTPromiseResolveBlock)resolve rejecter:(__unused RCTPromiseRejectBlock)reject)
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Versioned/Modules/Internal/Test/EXTest.m
keep keep keep replace keep keep keep keep keep keep keep replace replace
<mask> userInfo:resultObj]; <mask> } <mask> <mask> RCT_EXPORT_METHOD(action: (NSDictionary *)params) <mask> { <mask> // TODO <mask> NSLog(@"action native"); <mask> } <mask> <mask> RCT_EXPORT_METHOD(action: (NSDictionary *)params) <mask> { <mask> // TODO <mask> NSLog(@"action native"); </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> add #import "EXTest.h" </s> remove #define TEST_ENVIRONMENT 1 </s> add </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment { if (self = [super init]) { _environment = environment; } return self; } </s> add @interface EXTest () @property (nonatomic, assign) EXTestEnvironment environment; @end </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString;
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/Exponent/Versioned/Modules/Internal/Test/EXTest.m
keep keep keep keep replace replace keep keep keep keep keep
<mask> #import <React/RCTUtils.h> <mask> <mask> #import <XCTest/XCTest.h> <mask> <mask> #define TEST_ENVIRONMENT 1 <mask> <mask> @interface ExponentIntegrationTests : XCTestCase <mask> <mask> @property (nonatomic, strong) EXRootViewController *rootViewController; <mask> @property (nonatomic, strong) NSDictionary *jsTestSuiteResult; <mask> </s> Add flag to omit permissions-requiring tests on iOS CI fbshipit-source-id: 822b464 </s> add @property (nonatomic, readonly) EXTestEnvironment testEnvironment; </s> add #import "EXTest.h" </s> add @interface EXTest () @property (nonatomic, assign) EXTestEnvironment environment; @end </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment { if (self = [super init]) { _environment = environment; } return self; } </s> add - (instancetype)initWithEnvironment:(EXTestEnvironment)environment NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; + (EXTestEnvironment)testEnvironmentFromString:(NSString *)testEnvironmentString; </s> add typedef enum EXTestEnvironment { EXTestEnvironmentNone = 0, EXTestEnvironmentLocal = 1, EXTestEnvironmentCI = 2, } EXTestEnvironment;
https://github.com/expo/expo/commit/acb5d6db05ede1ca44febbc701b4d1570196f4cf
ios/ExponentIntegrationTests/ExponentIntegrationTests.m
keep keep keep add keep keep keep keep keep
<mask> mErrorMessageView.setText(mDefaultErrorMessage); <mask> } <mask> } <mask> <mask> EXL.e(TAG, "ErrorActivity message: " + mDefaultErrorMessage); <mask> <mask> if (!mKernel.isStarted()) { <mask> // Might not be started if the Experience crashed immediately. <mask> // ONLY start it if it hasn't been started already, don't want to retry immediately </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> remove if (normalizeUri(uri).equals(normalizeUri(embeddedResponse.url))) { </s> add String normalizedUri = normalizeUri(uri); // We only want to use embedded responses once. After they are used they will be added // to the OkHttp cache and we should use the version from that cache. We don't want a situation // where we have version 1 of a manifest saved as the embedded response, get version 2 saved // to the OkHttp cache, cache gets evicted, and we regress to version 1. Want to only use // monotonically increasing manifest versions. String sharedPrefKey = USED_EMBEDDED_RESPONSE_KEY + normalizedUri; if (normalizedUri.equals(normalizeUri(embeddedResponse.url)) && !mExponentSharedPreferences.getBoolean(sharedPrefKey, false)) { </s> add EventBus.getDefault().registerSticky(this); </s> remove EventBus.getDefault().registerSticky(this); </s> add // Can't call this here because subclasses need to do other initialization // before their listener methods are called. // EventBus.getDefault().registerSticky(this); </s> remove mExponentNetwork = new ExponentNetwork(mContext); </s> add mExponentNetwork = new ExponentNetwork(mContext, mExponentSharedPreferences); </s> add mExponentSharedPreferences.setBoolean(sharedPrefKey, true); </s> add EventBus.getDefault().registerSticky(this);
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/app/src/main/java/host/exp/exponent/experience/ErrorActivity.java
keep keep add keep keep keep keep keep
<mask> super.onCreate(savedInstanceState); <mask> <mask> NativeModuleDepsProvider.getInstance().inject(ExperienceActivity.class, this); <mask> <mask> mActivityId = Exponent.getActivityId(); <mask> <mask> // TODO: audit this now that kernel logic is in Java <mask> boolean shouldOpenImmediately = true; </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> remove EventBus.getDefault().registerSticky(this); </s> add // Can't call this here because subclasses need to do other initialization // before their listener methods are called. // EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this); </s> add public boolean getBoolean(String key, boolean defaultValue) { return mSharedPreferences.getBoolean(key, defaultValue); } </s> remove if (normalizeUri(uri).equals(normalizeUri(embeddedResponse.url))) { </s> add String normalizedUri = normalizeUri(uri); // We only want to use embedded responses once. After they are used they will be added // to the OkHttp cache and we should use the version from that cache. We don't want a situation // where we have version 1 of a manifest saved as the embedded response, get version 2 saved // to the OkHttp cache, cache gets evicted, and we regress to version 1. Want to only use // monotonically increasing manifest versions. String sharedPrefKey = USED_EMBEDDED_RESPONSE_KEY + normalizedUri; if (normalizedUri.equals(normalizeUri(embeddedResponse.url)) && !mExponentSharedPreferences.getBoolean(sharedPrefKey, false)) { </s> remove mExponentNetwork = new ExponentNetwork(mContext); </s> add mExponentNetwork = new ExponentNetwork(mContext, mExponentSharedPreferences);
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/app/src/main/java/host/exp/exponent/experience/ExperienceActivity.java
keep keep keep add keep keep keep keep
<mask> protected void onCreate(Bundle savedInstanceState) { <mask> super.onCreate(savedInstanceState); <mask> mShouldDestroyRNInstanceOnExit = false; <mask> <mask> mKernel.startJSKernel(); <mask> showLoadingScreen(null); <mask> <mask> tryInstallLeakCanary(true); </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> remove } protected OkHttpClient getOkHttpClient() { return mOkHttpClientFactory.getNewClient(); </s> add mExponentSharedPreferences = exponentSharedPreferences; </s> remove protected ExponentHttpClient(final Context context, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> add protected ExponentHttpClient(final Context context, final ExponentSharedPreferences exponentSharedPreferences, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> add EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this); </s> remove EventBus.getDefault().registerSticky(this); </s> add // Can't call this here because subclasses need to do other initialization // before their listener methods are called. // EventBus.getDefault().registerSticky(this); </s> add private static final String USED_EMBEDDED_RESPONSE_KEY = "USED_EMBEDDED_RESPONSE_"; ExponentSharedPreferences mExponentSharedPreferences;
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/app/src/main/java/host/exp/exponent/experience/HomeActivity.java
keep keep add keep keep keep keep
<mask> } <mask> } <mask> <mask> if (!mKernel.isStarted()) { <mask> mKernel.startJSKernel(); <mask> } <mask> } </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> add EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this); </s> remove mExponentNetwork = new ExponentNetwork(mContext); </s> add mExponentNetwork = new ExponentNetwork(mContext, mExponentSharedPreferences); </s> remove if (normalizeUri(uri).equals(normalizeUri(embeddedResponse.url))) { </s> add String normalizedUri = normalizeUri(uri); // We only want to use embedded responses once. After they are used they will be added // to the OkHttp cache and we should use the version from that cache. We don't want a situation // where we have version 1 of a manifest saved as the embedded response, get version 2 saved // to the OkHttp cache, cache gets evicted, and we regress to version 1. Want to only use // monotonically increasing manifest versions. String sharedPrefKey = USED_EMBEDDED_RESPONSE_KEY + normalizedUri; if (normalizedUri.equals(normalizeUri(embeddedResponse.url)) && !mExponentSharedPreferences.getBoolean(sharedPrefKey, false)) { </s> remove public ExponentNetwork(Context context) { </s> add public ExponentNetwork(Context context, ExponentSharedPreferences exponentSharedPreferences) { </s> remove mClient = new ExponentHttpClient(mContext, new OkHttpClientFactory() { </s> add mClient = new ExponentHttpClient(mContext, exponentSharedPreferences, new OkHttpClientFactory() {
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/app/src/main/java/host/exp/exponent/experience/InfoActivity.java
keep keep keep keep replace keep keep keep keep keep
<mask> public NativeModuleDepsProvider(Application application) { <mask> mContext = application; <mask> mApplicationContext = application; <mask> mExponentSharedPreferences = new ExponentSharedPreferences(mContext); <mask> mExponentNetwork = new ExponentNetwork(mContext); <mask> mCrypto = new Crypto(mExponentNetwork); <mask> mExponentManifest = new ExponentManifest(mContext, mExponentNetwork, mCrypto, mExponentSharedPreferences); <mask> <mask> for (Field field : NativeModuleDepsProvider.class.getDeclaredFields()) { <mask> if (field.isAnnotationPresent(Inject.class)) { </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> remove mClient = new ExponentHttpClient(mContext, new OkHttpClientFactory() { </s> add mClient = new ExponentHttpClient(mContext, exponentSharedPreferences, new OkHttpClientFactory() { </s> remove public ExponentNetwork(Context context) { </s> add public ExponentNetwork(Context context, ExponentSharedPreferences exponentSharedPreferences) { </s> remove mLongTimeoutClient = new ExponentHttpClient(mContext, new OkHttpClientFactory() { </s> add mLongTimeoutClient = new ExponentHttpClient(mContext, exponentSharedPreferences, new OkHttpClientFactory() { </s> remove } protected OkHttpClient getOkHttpClient() { return mOkHttpClientFactory.getNewClient(); </s> add mExponentSharedPreferences = exponentSharedPreferences; </s> add EventBus.getDefault().registerSticky(this); </s> remove if (normalizeUri(uri).equals(normalizeUri(embeddedResponse.url))) { </s> add String normalizedUri = normalizeUri(uri); // We only want to use embedded responses once. After they are used they will be added // to the OkHttp cache and we should use the version from that cache. We don't want a situation // where we have version 1 of a manifest saved as the embedded response, get version 2 saved // to the OkHttp cache, cache gets evicted, and we regress to version 1. Want to only use // monotonically increasing manifest versions. String sharedPrefKey = USED_EMBEDDED_RESPONSE_KEY + normalizedUri; if (normalizedUri.equals(normalizeUri(embeddedResponse.url)) && !mExponentSharedPreferences.getBoolean(sharedPrefKey, false)) {
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/expoview/src/main/java/host/exp/exponent/di/NativeModuleDepsProvider.java
keep keep keep keep replace keep keep keep keep keep
<mask> mDoubleTapReloadRecognizer = new DoubleTapReloadRecognizer(); <mask> Exponent.initialize(this, getApplication()); <mask> NativeModuleDepsProvider.getInstance().inject(ReactNativeActivity.class, this); <mask> <mask> EventBus.getDefault().registerSticky(this); <mask> } <mask> <mask> protected void setView(final View view) { <mask> mContainer.removeAllViews(); <mask> addView(view); </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> add EventBus.getDefault().registerSticky(this); </s> remove } protected OkHttpClient getOkHttpClient() { return mOkHttpClientFactory.getNewClient(); </s> add mExponentSharedPreferences = exponentSharedPreferences; </s> add EventBus.getDefault().registerSticky(this); </s> remove protected ExponentHttpClient(final Context context, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> add protected ExponentHttpClient(final Context context, final ExponentSharedPreferences exponentSharedPreferences, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> remove mExponentNetwork = new ExponentNetwork(mContext); </s> add mExponentNetwork = new ExponentNetwork(mContext, mExponentSharedPreferences); </s> remove mClient = new ExponentHttpClient(mContext, new OkHttpClientFactory() { </s> add mClient = new ExponentHttpClient(mContext, exponentSharedPreferences, new OkHttpClientFactory() {
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/expoview/src/main/java/host/exp/exponent/experience/ReactNativeActivity.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> package host.exp.exponent.network; <mask> <mask> import android.content.Context; <mask> import android.os.AsyncTask; <mask> <mask> import com.amplitude.api.Amplitude; <mask> <mask> import org.json.JSONException; <mask> import org.json.JSONObject; </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> remove import expolib_v1.okhttp3.OkHttpClient; </s> add </s> add import host.exp.exponent.storage.ExponentSharedPreferences; </s> add import host.exp.exponent.storage.ExponentSharedPreferences; </s> add EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this);
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/expoview/src/main/java/host/exp/exponent/network/ExponentHttpClient.java
keep keep keep keep replace keep keep keep keep keep
<mask> import expolib_v1.okhttp3.CacheControl; <mask> import expolib_v1.okhttp3.Call; <mask> import expolib_v1.okhttp3.Callback; <mask> import expolib_v1.okhttp3.MediaType; <mask> import expolib_v1.okhttp3.OkHttpClient; <mask> import expolib_v1.okhttp3.Protocol; <mask> import expolib_v1.okhttp3.Request; <mask> import expolib_v1.okhttp3.Response; <mask> import expolib_v1.okhttp3.ResponseBody; <mask> import expolib_v1.okio.BufferedSource; </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> add import host.exp.exponent.storage.ExponentSharedPreferences; </s> add import host.exp.exponent.storage.ExponentSharedPreferences; </s> remove import android.os.AsyncTask; </s> add </s> add EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this); </s> add EventBus.getDefault().registerSticky(this);
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/expoview/src/main/java/host/exp/exponent/network/ExponentHttpClient.java
keep keep add keep keep keep keep keep
<mask> import expolib_v1.okio.BufferedSource; <mask> import expolib_v1.okio.Okio; <mask> import expolib_v1.okio.Source; <mask> <mask> public class ExponentHttpClient { <mask> <mask> private static final String USED_EMBEDDED_RESPONSE_KEY = "USED_EMBEDDED_RESPONSE_"; <mask> </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> add private static final String USED_EMBEDDED_RESPONSE_KEY = "USED_EMBEDDED_RESPONSE_"; ExponentSharedPreferences mExponentSharedPreferences; </s> remove import expolib_v1.okhttp3.OkHttpClient; </s> add </s> add import host.exp.exponent.storage.ExponentSharedPreferences; </s> remove import android.os.AsyncTask; </s> add </s> remove protected ExponentHttpClient(final Context context, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> add protected ExponentHttpClient(final Context context, final ExponentSharedPreferences exponentSharedPreferences, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> remove if (normalizeUri(uri).equals(normalizeUri(embeddedResponse.url))) { </s> add String normalizedUri = normalizeUri(uri); // We only want to use embedded responses once. After they are used they will be added // to the OkHttp cache and we should use the version from that cache. We don't want a situation // where we have version 1 of a manifest saved as the embedded response, get version 2 saved // to the OkHttp cache, cache gets evicted, and we regress to version 1. Want to only use // monotonically increasing manifest versions. String sharedPrefKey = USED_EMBEDDED_RESPONSE_KEY + normalizedUri; if (normalizedUri.equals(normalizeUri(embeddedResponse.url)) && !mExponentSharedPreferences.getBoolean(sharedPrefKey, false)) {
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/expoview/src/main/java/host/exp/exponent/network/ExponentHttpClient.java
keep keep add keep keep keep keep keep keep
<mask> <mask> public class ExponentHttpClient { <mask> <mask> private static final String TAG = ExponentHttpClient.class.getSimpleName(); <mask> <mask> public interface SafeCallback { <mask> void onFailure(Call call, IOException e); <mask> void onResponse(Call call, Response response); <mask> void onCachedResponse(Call call, Response response); </s> Only use embedded response once in shell app fbshipit-source-id: 27fad370e3 </s> add import host.exp.exponent.storage.ExponentSharedPreferences; </s> remove if (normalizeUri(uri).equals(normalizeUri(embeddedResponse.url))) { </s> add String normalizedUri = normalizeUri(uri); // We only want to use embedded responses once. After they are used they will be added // to the OkHttp cache and we should use the version from that cache. We don't want a situation // where we have version 1 of a manifest saved as the embedded response, get version 2 saved // to the OkHttp cache, cache gets evicted, and we regress to version 1. Want to only use // monotonically increasing manifest versions. String sharedPrefKey = USED_EMBEDDED_RESPONSE_KEY + normalizedUri; if (normalizedUri.equals(normalizeUri(embeddedResponse.url)) && !mExponentSharedPreferences.getBoolean(sharedPrefKey, false)) { </s> add mExponentSharedPreferences.setBoolean(sharedPrefKey, true); </s> remove } protected OkHttpClient getOkHttpClient() { return mOkHttpClientFactory.getNewClient(); </s> add mExponentSharedPreferences = exponentSharedPreferences; </s> remove protected ExponentHttpClient(final Context context, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> add protected ExponentHttpClient(final Context context, final ExponentSharedPreferences exponentSharedPreferences, final ExponentNetwork.OkHttpClientFactory httpClientFactory) { </s> add public boolean getBoolean(String key, boolean defaultValue) { return mSharedPreferences.getBoolean(key, defaultValue); }
https://github.com/expo/expo/commit/ad77075d810b4d7ee0bcc04aeedcc1bcc15e0f0b
android/expoview/src/main/java/host/exp/exponent/network/ExponentHttpClient.java