Skip to content

Commit

Permalink
Upgrade Snack to Expo SDK 45 (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
danstepanov authored May 13, 2022
1 parent bc1ef73 commit 72b0944
Show file tree
Hide file tree
Showing 23 changed files with 3,172 additions and 1,168 deletions.
6 changes: 3 additions & 3 deletions packages/snack-content/src/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SDKVersion } from './types';

export const defaultSdkVersion: SDKVersion = '44.0.0';
export const defaultSdkVersion: SDKVersion = '45.0.0';

// Mostly used for tests
export const oldestSdkVersion: SDKVersion = '41.0.0';
export const newestSdkVersion: SDKVersion = '44.0.0';
export const oldestSdkVersion: SDKVersion = '43.0.0';
export const newestSdkVersion: SDKVersion = '45.0.0';
76 changes: 13 additions & 63 deletions packages/snack-content/src/sdks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,17 @@ const unimodules: { [name: string]: '*' } = {
'@unimodules/core': '*',
'@unimodules/react-native-adapter': '*',
};
const legacyUnimoduleInterfaces: { [name: string]: '*' } = {
'unimodules-barcode-scanner-interface': '*',
'unimodules-camera-interface': '*',
'unimodules-constants-interface': '*',
'unimodules-face-detector-interface': '*',
'unimodules-file-system-interface': '*',
'unimodules-font-interface': '*',
'unimodules-image-loader-interface': '*',
'unimodules-permissions-interface': '*',
'unimodules-sensors-interface': '*',
'unimodules-task-manager-interface': '*',
};

const sdks: { [version: string]: SDKSpec } = {
'41.0.0': {
version: '^41.0.0',
coreModules: {
...assets,
...unimodules,
...legacyUnimoduleInterfaces,
expo: '41.0.0',
react: '16.13.1',
'react-native': '0.63.2',
'react-dom': '*',
'react-native-web': '*',
},
bundledModules: {
// Packages that require special initialisation (see Modules.tsx)
'expo-asset': '*',
'expo-font': '*',
'react-native-gesture-handler': '*',
'react-native-safe-area-context': '*',
// 'react-native-vector-icons': '*',
'@expo/vector-icons': '*',

// Packages that are used internally by the runtime
'expo-constants': '*',
'expo-file-system': '*',
'expo-permissions': '*',
'expo-updates': '*',
'@react-native-async-storage/async-storage': '*',

// Common packages that are included for easy of use
'prop-types': '*',
},
deprecatedModules: {
'@react-native-community/async-storage':
'Async Storage has moved to new organization: https://github.com/react-native-async-storage/async-storage',
'expo-permissions':
'Use permissions getters and requesters in specific modules instead, such as MediaLibrary.getPermissionsAsync() and MediaLibrary.requestPermissionsAsync().',
},
},
'42.0.0': {
version: '^42.0.0',
'43.0.0': {
version: '^43.0.0',
coreModules: {
...assets,
...unimodules,
expo: '42.0.0',
react: '16.13.1',
'react-native': '0.63.4',
expo: '~43.0.0',
react: '17.0.1',
'react-dom': '*',
'react-native': '0.64.2',
'react-native-web': '*',
},
bundledModules: {
Expand All @@ -92,15 +42,15 @@ const sdks: { [version: string]: SDKSpec } = {
'Use permissions getters and requesters in specific modules instead, such as MediaLibrary.getPermissionsAsync() and MediaLibrary.requestPermissionsAsync().',
},
},
'43.0.0': {
version: '^43.0.0',
'44.0.0': {
version: '^44.0.0',
coreModules: {
...assets,
...unimodules,
expo: '~43.0.0',
expo: '~44.0.0',
react: '17.0.1',
'react-native': '0.64.2',
'react-dom': '*',
'react-native': '0.64.3',
'react-native-web': '*',
},
bundledModules: {
Expand All @@ -122,15 +72,15 @@ const sdks: { [version: string]: SDKSpec } = {
'Use permissions getters and requesters in specific modules instead, such as MediaLibrary.getPermissionsAsync() and MediaLibrary.requestPermissionsAsync().',
},
},
'44.0.0': {
version: '^44.0.0',
'45.0.0': {
version: '^45.0.0',
coreModules: {
...assets,
...unimodules,
expo: '~44.0.0',
expo: '~45.0.0',
react: '17.0.1',
'react-dom': '*',
'react-native': '0.64.3',
'react-native': '0.68.2',
'react-native-web': '*',
},
bundledModules: {
Expand Down
2 changes: 1 addition & 1 deletion packages/snack-content/src/sdks/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Version of the Expo SDK to use (e.g. "43.0.0").
*/
export type SDKVersion = '41.0.0' | '42.0.0' | '43.0.0' | '44.0.0';
export type SDKVersion = '43.0.0' | '44.0.0' | '45.0.0';

/** @internal */
export type SDKSpec = {
Expand Down
Loading

0 comments on commit 72b0944

Please sign in to comment.