Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update to Expo SDK 39 #747

Merged
merged 6 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export function App(): React.ReactElement {
useEffect(() => {
Promise.all([
Font.loadAsync({
// eslint-disable-next-line @typescript-eslint/no-var-requires
'gotham-black': require('@shootismoke/ui/assets/fonts/Gotham-Black.ttf') as Font.FontResource,
// eslint-disable-next-line @typescript-eslint/no-var-requires
'gotham-book': require('@shootismoke/ui/assets/fonts/Gotham-Book.ttf') as Font.FontResource,
}),
// Add Amplitude if available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import Switch from '@dooboo-ui/native-switch-toggle';
import { FontAwesome } from '@expo/vector-icons';
import { Frequency } from '@shootismoke/graphql';
import { Notifications } from 'expo';
import * as Notifications from 'expo-notifications';
import * as Localization from 'expo-localization';
import * as Permissions from 'expo-permissions';
import * as C from 'fp-ts/lib/Console';
Expand Down Expand Up @@ -184,9 +184,9 @@ export function SelectNotifications(
)
),
TE.map((expoPushToken) => ({
expoPushToken,
expoPushToken: expoPushToken.data,
frequency,
timezone: Localization.timezone as string,
timezone: Localization.timezone,
universalId: api.pm25.location,
})),
TE.chain(
Expand Down
2 changes: 1 addition & 1 deletion App/Screens/routeParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type ErrorStackParams = {
};

export type RootStackParams = {
About: {
About?: {
scrollInto?: string;
};
Details: undefined;
Expand Down
2 changes: 1 addition & 1 deletion App/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function Button(props: ButtonProps): React.ReactElement {
color={theme.primaryColor}
name={icon}
size={15}
style={children && styles.icon}
style={children ? styles.icon : undefined}
/>
)}
{children &&
Expand Down
11 changes: 4 additions & 7 deletions App/stores/util/fetchGpsPosition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export function fetchReverseGeocode(
),
TE.map((reverse) => ({
...currentLocation,
city: reverse.city,
country: reverse.country,
city: reverse.city || undefined, // Convert null to undefined.
country: reverse.country || undefined, // Convert null to undefined.
name:
[reverse.street, reverse.city, reverse.country]
.filter((x) => x)
Expand All @@ -57,7 +57,7 @@ export function fetchReverseGeocode(

export function fetchGpsPosition(): TE.TaskEither<
Error,
ExpoLocation.LocationData
ExpoLocation.LocationObject
> {
return pipe(
promiseToTE(
Expand All @@ -71,10 +71,7 @@ export function fetchGpsPosition(): TE.TaskEither<
),
TE.chain(() =>
promiseToTE(
() =>
ExpoLocation.getCurrentPositionAsync({
timeout: 5000,
}),
() => ExpoLocation.getCurrentPositionAsync(),
// Uncomment to get other locations
// Promise.resolve({
// coords: {
Expand Down
1 change: 0 additions & 1 deletion App/util/amplitude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export function setupAmplitude(): Promise<void> {
disableAdid: true,
disableCarrier: true,
disableDMA: true,
disableIDFA: true,
disableIDFV: true,
disableIPAddress: true,
disableLatLng: true,
Expand Down
1 change: 1 addition & 0 deletions app.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"icon": "assets/logos/android/playstore-icon.png",
"package": "com.shitismoke.app",
"permissions": ["ACCESS_FINE_LOCATION"],
"useNextNotificationsApi": true,
"versionCode": 14
},
"assetBundlePatterns": [
Expand Down
2 changes: 1 addition & 1 deletion e2e/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { cleanup, init } from 'detox';
import adapter from 'detox/runners/jest/adapter';

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line
const config = require('../package.json').detox;

jest.setTimeout(30 * 60 * 1000); // 30 minutes timeout
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test-runner": "jest"
},
"dependencies": {
"@apollo/client": "3.0.0-rc.12",
"@apollo/client": "^3.2.1",
"@apollo/link-error": "^2.0.0-beta.3",
"@apollo/link-retry": "^2.0.0-beta.3",
"@dooboo-ui/native-switch-toggle": "^0.7.0",
Expand All @@ -36,25 +36,25 @@
"@shootismoke/graphql": "^0.2.31",
"@shootismoke/ui": "^0.2.30",
"@types/i18n-js": "^3.0.3",
"@types/react-native": "~0.62.13",
"@types/react-native": "~0.63.2",
"apollo-cache-persist": "^0.1.1",
"date-fns": "^2.16.1",
"expo": "^38.0.0",
"expo-analytics-amplitude": "~8.2.1",
"expo-av": "~8.2.1",
"expo": "^39.0.0",
"expo-analytics-amplitude": "~8.3.1",
"expo-av": "~8.6.0",
"expo-detox-hook": "^1.0.10",
"expo-localization": "~8.2.1",
"expo-notifications": "~0.3.3",
"expo-status-bar": "^1.0.0",
"graphql": "^14.7.0",
"expo-localization": "~9.0.0",
"expo-notifications": "~0.7.2",
"expo-status-bar": "~1.0.2",
"graphql": "^15.3.0",
"i18n-js": "^3.7.1",
"react": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-gesture-handler": "~1.6.0",
"react": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-maps": "0.27.1",
"react-native-reanimated": "~1.9.0",
"react-native-safe-area-context": "~3.0.7",
"react-native-screens": "~2.9.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"react-native-scroll-into-view": "^1.0.3",
"react-native-size-matters": "^0.3.0",
"react-native-view-shot": "3.1.2",
Expand All @@ -65,11 +65,11 @@
"@amaurymartiny/config": "^1.3.1",
"@types/detox": "^16.4.1",
"@types/jest": "^26.0.14",
"detox": "^16.8.2",
"detox": "^17.8.0",
"detox-expo-helpers": "^0.6.0",
"jest": "^24.9.0",
"jest-expo": "^38.0.0",
"jest-expo": "^39.0.0",
"ts-jest": "^24.3.0",
"typescript": "~3.9.5"
"typescript": "~3.9.2"
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"module": "es6",
"moduleResolution": "node",
"noEmit": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "esnext",
"resolveJsonModule": true
},
"exclude": ["node_modules"],
"extends": "./node_modules/@amaurymartiny/tsconfig/tsconfig"
Expand Down
Loading