Skip to content

Commit

Permalink
Upgrade to Expo SDK 47 (#360)
Browse files Browse the repository at this point in the history
* fix(runtime): drop sdkVersion from app.json

* refactor(runtime): upgrade to Expo SDK 47 beta

* refactor(runtime): update patches to used package versions

* refactor(snack-content): upgrade to Expo SDK 47 beta

* refactor(snack-sdk): upgrade bundled native modules fixture to Expo SDK 47 beta

* test(snack-sdk): update the tests for Expo SDK 47 beta

* docs(snack-sdk): add changelog entries

* refactor(website): upgrade to Expo SDK 47 beta

* fix(runtime): use event subscriptions in app

* fix(runtime: change barcode scanned types to match code

* test(snackager): update to Expo SDK 47 beta

* docs: update changelogs to include pr

* fix(runtime): work around reanimated issue #3437

See: software-mansion/react-native-reanimated#3437
See: expo/expo#19305

* fix(runtime): fix deployment script removing sdkVersion usage

* refactor(runtime): update dependencies for SDK 47 stable

* refactor(snack-sdk): upgrade bundled native modules fixture to Expo SDK 47 stable

* test(snack-sdk): update the tests for Expo SDK 47 stale
  • Loading branch information
byCedric committed Nov 10, 2022
1 parent c107e34 commit c7775ed
Show file tree
Hide file tree
Showing 24 changed files with 1,003 additions and 958 deletions.
3 changes: 1 addition & 2 deletions docs/expo-sdk-upgrade.md
Expand Up @@ -26,7 +26,6 @@ Update the Snack runtime (managed Expo app), snack-sdk and website to the latest
### runtime

- Either run `expo update <version>` or upgrade the dependencies in `package.json` to match those in `bundledNativeModules.json`.
- Set `expo.sdkVersion` in `app.json` to the new version.
- Update the patched packages in `./patches`.
- Update any default project files to match the template in `expo/templates/expo-template-blank`.
- Update the files in `./web` to match the latest expo-cli defaults (`expo customize:web`).
Expand Down Expand Up @@ -101,7 +100,7 @@ The Expo documentation contains excellent examples for verifying Snack. The easi

## Pre-release snack-sdk

To enable partners to use the new Expo SDK, snack-sdk can be released to the `next` channel.
To enable partners to use the new Expo SDK, snack-sdk can be released to the `next` channel.

- Update the version in `package.json`. Ex. "3.2.1-rc.0"
- `yarn build`
Expand Down
4 changes: 4 additions & 0 deletions packages/snack-content/CHANGELOG.md
Expand Up @@ -4,8 +4,12 @@

### πŸ›  Breaking changes

- Dropped Expo SDK 44 ([#360](https://github.com/expo/snack/pull/360) by [@bycedric](https://github.com/byCedric))

### πŸŽ‰ New features

- Upgrade to Expo SDK 47 ([#360](https://github.com/expo/snack/pull/360) by [@bycedric](https://github.com/byCedric))

## 1.2.0 - 2022-08-03

### πŸŽ‰ New features
Expand Down
4 changes: 2 additions & 2 deletions packages/snack-content/src/defaults.ts
Expand Up @@ -3,5 +3,5 @@ import { SDKVersion } from './types';
export const defaultSdkVersion: SDKVersion = '46.0.0';

// Mostly used for tests
export const oldestSdkVersion: SDKVersion = '44.0.0';
export const newestSdkVersion: SDKVersion = '46.0.0';
export const oldestSdkVersion: SDKVersion = '45.0.0';
export const newestSdkVersion: SDKVersion = '47.0.0';
42 changes: 20 additions & 22 deletions packages/snack-content/src/sdks/index.ts
Expand Up @@ -7,14 +7,14 @@ const assets = {
};

const sdks: { [version: string]: SDKSpec } = {
'44.0.0': {
version: '^44.0.0',
'45.0.0': {
version: '^45.0.0',
coreModules: {
...assets,
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 All @@ -33,17 +33,22 @@ const sdks: { [version: string]: SDKSpec } = {
'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().',
'expo-app-loading':
'Use expo-splash-screen directly instead: SplashScreen.preventAutoHideAsync() and SplashScreen.hideAsync().',
},
},
'45.0.0': {
version: '^45.0.0',
'46.0.0': {
version: '^46.0.0',
coreModules: {
...assets,
expo: '~45.0.0',
react: '17.0.1',
expo: '~46.0.0',
react: '18.0.0',
'react-dom': '*',
'react-native': '0.68.2',
'react-native': '0.69.3',
'react-native-web': '*',
// Used by @shopify/react-native-skia, on web only
// See runtime/src/NativeModules/ReactNativeSkia.tsx for more info
'@shopify/react-native-skia/lib/module/web': '*',
},
bundledModules: {
'expo-asset': '*',
Expand All @@ -65,14 +70,14 @@ const sdks: { [version: string]: SDKSpec } = {
'Use expo-splash-screen directly instead: SplashScreen.preventAutoHideAsync() and SplashScreen.hideAsync().',
},
},
'46.0.0': {
version: '^46.0.0',
'47.0.0': {
version: '^47.0.0',
coreModules: {
...assets,
expo: '~46.0.0',
react: '18.0.0',
expo: '~47.0.0-beta.3',
react: '18.1.0',
'react-dom': '*',
'react-native': '0.69.3',
'react-native': '0.70.4',
'react-native-web': '*',
// Used by @shopify/react-native-skia, on web only
// See runtime/src/NativeModules/ReactNativeSkia.tsx for more info
Expand All @@ -89,14 +94,7 @@ const sdks: { [version: string]: SDKSpec } = {
'expo-updates': '*',
'@react-native-async-storage/async-storage': '*',
},
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().',
'expo-app-loading':
'Use expo-splash-screen directly instead: SplashScreen.preventAutoHideAsync() and SplashScreen.hideAsync().',
},
deprecatedModules: {},
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/snack-content/src/sdks/types.ts
@@ -1,7 +1,7 @@
/**
* Version of the Expo SDK to use (e.g. "46.0.0").
*/
export type SDKVersion = '44.0.0' | '45.0.0' | '46.0.0';
export type SDKVersion = '45.0.0' | '46.0.0' | '47.0.0';

/** @internal */
export type SDKSpec = {
Expand Down
20 changes: 12 additions & 8 deletions packages/snack-sdk/CHANGELOG.md
Expand Up @@ -4,18 +4,22 @@

### πŸ›  Breaking changes

- Dropped Expo SDK 44 ([#360](https://github.com/expo/snack/pull/360) by [@bycedric](https://github.com/byCedric))

### πŸŽ‰ New features

- Upgrade to Expo SDK 47 ([#360](https://github.com/expo/snack/pull/360) by [@bycedric](https://github.com/byCedric))

### πŸ› Bug fixes

## 3.9.0 - 2022-08-03

### πŸŽ‰ New features

- Upgrade to Expo SDK 46 stable ([#337](https://github.com/expo/snack/pull/337)) by [@bycedric](https://github.com/byCedric))
- Add versioned endpoints for modules ([#334](https://github.com/expo/snack/pull/334)) by [@bycedric](https://github.com/byCedric))
- Upgrade pubnub to 7.2.0 ([#332](https://github.com/expo/snack/pull/332)) by [@bycedric](https://github.com/byCedric))
- Upgrade Snack to Expo SDK 45 ([#290](https://github.com/expo/snack/pull/290)) by [@danstepanov](https://github.com/danstepanov))
- Upgrade to Expo SDK 46 stable ([#337](https://github.com/expo/snack/pull/337) by [@bycedric](https://github.com/byCedric))
- Add versioned endpoints for modules ([#334](https://github.com/expo/snack/pull/334) by [@bycedric](https://github.com/byCedric))
- Upgrade pubnub to 7.2.0 ([#332](https://github.com/expo/snack/pull/332) by [@bycedric](https://github.com/byCedric))
- Upgrade Snack to Expo SDK 45 ([#290](https://github.com/expo/snack/pull/290) by [@danstepanov](https://github.com/danstepanov))

## 3.8.0 - 2022-04-20

Expand All @@ -25,16 +29,16 @@

### πŸŽ‰ New features

- Prepare snack-sdk and snack-content for SDK 44 ([#277](https://github.com/expo/snack/pull/277)) by [@bycedric](https://github.com/byCedric))
- Split out code related to Snack project definitions into `snack-content` ([#251](https://github.com/expo/snack/pull/251)) by [@ide](https://github.com/ide))
- Upgrade Snack to Expo SDK 44 ([#243](https://github.com/expo/snack/pull/243)) by [@bycedric](https://github.com/byCedric))
- Prepare snack-sdk and snack-content for SDK 44 ([#277](https://github.com/expo/snack/pull/277) by [@bycedric](https://github.com/byCedric))
- Split out code related to Snack project definitions into `snack-content` ([#251](https://github.com/expo/snack/pull/251) by [@ide](https://github.com/ide))
- Upgrade Snack to Expo SDK 44 ([#243](https://github.com/expo/snack/pull/243) by [@bycedric](https://github.com/byCedric))

## 3.7.0 β€” 2021-12-17

### πŸŽ‰ New features

- `SnackState` & `SnackOptions` include `snackId` and `accountSnackId` for tracking snacks, rather than only full name (id).
- `saveAsync` additionally returns `snackId` and `accountSnackId`.
- `saveAsync` additionally returns `snackId` and `accountSnackId`.

## 3.6.0 β€” 2021-10-29

Expand Down

0 comments on commit c7775ed

Please sign in to comment.