Skip to content

Commit

Permalink
refactor: upgrade to latest Expo SDK 50 (#556)
Browse files Browse the repository at this point in the history
* refactor(runtime): upgrade to Expo SDK 50

* refactor(snack-content): upgrade to latest Expo SDK 50

* refactor(snack-sdk): upgrade to latest Expo SDK 50

* fix(snack-sdk): add missing snackager mock

* test(snackager): update to SDK 50
  • Loading branch information
byCedric authored Feb 12, 2024
1 parent 19969b7 commit f496d87
Show file tree
Hide file tree
Showing 11 changed files with 321 additions and 245 deletions.
4 changes: 2 additions & 2 deletions packages/snack-content/src/sdks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ const sdks: { [version: string]: SDKSpec } = {
version: '^50.0.0',
coreModules: {
...assets,
expo: '~50.0.2',
expo: '~50.0.6',
react: '18.2.0',
'react-dom': '*',
'react-native': '0.73.2',
'react-native': '0.73.4',
'react-native-web': '*',
// Used by @shopify/react-native-skia, on web only
// See runtime/src/NativeModules/ReactNativeSkia.tsx for more info
Expand Down
53 changes: 27 additions & 26 deletions packages/snack-sdk/src/__fixtures__/bundledNativeModules.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
"@sentry/react-native": "5.5.0"
},
"^50.0.0": {
"@expo/metro-runtime": "~3.1.3",
"@expo/vector-icons": "^14.0.0",
"@react-native-async-storage/async-storage": "1.21.0",
"@react-native-community/datetimepicker": "7.6.1",
Expand All @@ -328,98 +329,98 @@
"@react-native-community/viewpager": "5.0.11",
"@react-native-picker/picker": "2.6.1",
"@react-native-segmented-control/segmented-control": "2.4.1",
"@stripe/stripe-react-native": "0.35.0",
"@stripe/stripe-react-native": "~0.35.1",
"expo-analytics-amplitude": "~11.3.0",
"expo-app-auth": "~11.1.0",
"expo-app-loader-provider": "~8.0.0",
"expo-apple-authentication": "~6.3.0",
"expo-application": "~5.8.3",
"expo-asset": "~9.0.2",
"expo-auth-session": "~5.4.0",
"expo-av": "~13.10.3",
"expo-background-fetch": "~11.8.0",
"expo-av": "~13.10.5",
"expo-background-fetch": "~11.8.1",
"expo-barcode-scanner": "~12.9.2",
"expo-battery": "~7.7.2",
"expo-blur": "~12.9.1",
"expo-brightness": "~11.8.0",
"expo-build-properties": "~0.11.0",
"expo-build-properties": "~0.11.1",
"expo-calendar": "~12.2.1",
"expo-camera": "~14.0.1",
"expo-camera": "~14.0.4",
"expo-cellular": "~5.7.1",
"expo-checkbox": "~2.7.0",
"expo-clipboard": "~5.0.1",
"expo-constants": "~15.4.5",
"expo-contacts": "~12.8.2",
"expo-crypto": "~12.8.0",
"expo-dev-client": "~3.3.6",
"expo-dev-client": "~3.3.8",
"expo-device": "~5.9.3",
"expo-document-picker": "~11.10.1",
"expo-face-detector": "~12.6.1",
"expo-file-system": "~16.0.4",
"expo-file-system": "~16.0.6",
"expo-font": "~11.10.2",
"expo-gl": "~13.6.0",
"expo-google-app-auth": "~8.3.0",
"expo-haptics": "~12.8.1",
"expo-image": "~1.10.4",
"expo-image": "~1.10.6",
"expo-image-loader": "~4.6.0",
"expo-image-manipulator": "~11.8.0",
"expo-image-picker": "~14.7.1",
"expo-intent-launcher": "~10.11.0",
"expo-insights": "~0.6.1",
"expo-keep-awake": "~12.8.2",
"expo-linear-gradient": "~12.7.0",
"expo-linear-gradient": "~12.7.1",
"expo-linking": "~6.2.2",
"expo-local-authentication": "~13.8.0",
"expo-localization": "~14.8.3",
"expo-location": "~16.5.2",
"expo-location": "~16.5.3",
"expo-mail-composer": "~12.7.1",
"expo-media-library": "~15.9.1",
"expo-module-template": "~10.12.8",
"expo-modules-core": "~1.11.7",
"expo-module-template": "~10.12.11",
"expo-modules-core": "~1.11.8",
"expo-navigation-bar": "~2.8.1",
"expo-network": "~5.8.0",
"expo-notifications": "~0.27.3",
"expo-notifications": "~0.27.6",
"expo-print": "~12.8.1",
"expo-random": "~13.6.0",
"expo-router": "~3.4.3",
"expo-screen-capture": "~5.8.0",
"expo-router": "~3.4.7",
"expo-screen-capture": "~5.8.1",
"expo-screen-orientation": "~6.4.1",
"expo-secure-store": "~12.8.1",
"expo-sensors": "~12.9.0",
"expo-sensors": "~12.9.1",
"expo-sharing": "~11.10.0",
"expo-sms": "~11.7.1",
"expo-speech": "~11.7.0",
"expo-splash-screen": "~0.26.3",
"expo-sqlite": "~13.2.1",
"expo-splash-screen": "~0.26.4",
"expo-sqlite": "~13.2.2",
"expo-status-bar": "~1.11.1",
"expo-store-review": "~6.8.3",
"expo-system-ui": "~2.9.3",
"expo-task-manager": "~11.7.0",
"expo-task-manager": "~11.7.2",
"expo-tracking-transparency": "~3.3.0",
"expo-updates": "~0.24.8",
"expo-updates": "~0.24.9",
"expo-video-thumbnails": "~7.9.0",
"expo-web-browser": "~12.8.1",
"jest-expo": "~50.0.1",
"expo-web-browser": "~12.8.2",
"jest-expo": "~50.0.2",
"lottie-react-native": "6.5.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.2",
"react-native-web": "~0.19.6",
"react-native-gesture-handler": "~2.14.0",
"react-native-get-random-values": "~1.8.0",
"react-native-maps": "1.8.0",
"react-native-maps": "1.10.0",
"react-native-pager-view": "6.2.3",
"react-native-reanimated": "~3.6.0",
"react-native-reanimated": "~3.6.2",
"react-native-screens": "~3.29.0",
"react-native-safe-area-context": "4.8.2",
"react-native-svg": "14.1.0",
"react-native-view-shot": "3.8.0",
"react-native-webview": "13.6.4",
"sentry-expo": "~7.0.0",
"sentry-expo": "~7.1.0",
"unimodules-app-loader": "~4.5.0",
"unimodules-image-loader-interface": "~6.1.0",
"@shopify/react-native-skia": "0.1.221",
"@shopify/flash-list": "1.6.3",
"@sentry/react-native": "5.16.0"
"@sentry/react-native": "5.17.0"
}
}
4 changes: 4 additions & 0 deletions packages/snack-sdk/src/__fixtures__/snackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ const config: SnackagerConfig = {
version: '13.10.3',
peerDependencies,
},
'expo-av@~13.10.5': {
version: '13.10.5',
peerDependencies,
},
'@react-navigation/native@5.1.1': {
peerDependencies,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Object {
"react-native-gesture-handler": "1.6.0",
},
"version": "1.6.0",
"wantedVersion": "~2.12.0",
"wantedVersion": "~2.14.0",
},
}
`;
Expand All @@ -220,13 +220,13 @@ Object {
exports[`dependencies updates preloaded module version when changing SDK version 2`] = `
Object {
"expo-av": Object {
"handle": "snackager-1/expo-av@13.10.3",
"handle": "snackager-1/expo-av@13.10.5",
"peerDependencies": Object {
"react": "*",
"react-native": "*",
},
"version": "~13.10.3",
"wantedVersion": "~13.10.3",
"version": "~13.10.5",
"wantedVersion": "~13.10.5",
},
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`devsession receives sendBeaconCloseRequest 1`] = `
Object {
"data": Blob {
"config": Array [
"{\\"session\\":{\\"url\\":\\"exp://u.expo.dev/933fd9c0-1666-11e7-afca-d980795c5824?runtime-version=exposdk%3A49.0.0&channel-name=production&snack-channel=10spnBnPxi\\"}}",
"{\\"session\\":{\\"url\\":\\"exp://u.expo.dev/933fd9c0-1666-11e7-afca-d980795c5824?runtime-version=exposdk%3A50.0.0&channel-name=production&snack-channel=10spnBnPxi\\"}}",
],
},
"url": "https://exp.host/--/api/v2/development-sessions/notify-close?deviceId=1234",
Expand Down
3 changes: 2 additions & 1 deletion runtime/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"bundler": "metro"
},
"plugins": [
"expo-font"
"expo-font",
"expo-router"
],
"runtimeVersion": {
"policy": "sdkVersion"
Expand Down
16 changes: 8 additions & 8 deletions runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@
"canvaskit-wasm": "0.38.0",
"diff": "^5.0.0",
"escape-string-regexp": "^5.0.0",
"expo": "^50.0.2",
"expo": "^50.0.6",
"expo-asset": "~9.0.2",
"expo-barcode-scanner": "~12.9.2",
"expo-constants": "~15.4.5",
"expo-file-system": "~16.0.4",
"expo-file-system": "~16.0.6",
"expo-font": "~11.10.2",
"expo-keep-awake": "~12.8.2",
"expo-linking": "~6.2.2",
"expo-random": "~13.6.0",
"expo-router": "~3.4.3",
"expo-splash-screen": "~0.26.3",
"expo-router": "~3.4.7",
"expo-splash-screen": "~0.26.4",
"expo-status-bar": "~1.11.1",
"expo-updates": "~0.24.8",
"expo-updates": "~0.24.10",
"path": "^0.12.7",
"prop-types": "^15.7.2",
"pubnub": "^7.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.2",
"react-native": "0.73.4",
"react-native-gesture-handler": "~2.14.0",
"react-native-pager-view": "6.2.3",
"react-native-reanimated": "~3.6.0",
"react-native-reanimated": "~3.6.2",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-view-shot": "3.8.0",
Expand All @@ -75,7 +75,7 @@
"eslint-config-universe": "^12.0.0",
"getenv": "^1.0.0",
"jest": "^29.2.1",
"jest-expo": "~50.0.1",
"jest-expo": "~50.0.2",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.2.4",
Expand Down
File renamed without changes.
Loading

0 comments on commit f496d87

Please sign in to comment.