Skip to content

chore: upgrade expo and react native packages to their latest versions#926

Merged
kylemcd merged 10 commits intomainfrom
kyle-kno-12289-update-expo-example-app-in-javascript-sdk-to-latest-version
Apr 2, 2026
Merged

chore: upgrade expo and react native packages to their latest versions#926
kylemcd merged 10 commits intomainfrom
kyle-kno-12289-update-expo-example-app-in-javascript-sdk-to-latest-version

Conversation

@kylemcd
Copy link
Copy Markdown
Member

@kylemcd kylemcd commented Apr 1, 2026

Description

Upgrades Expo SDK from 53 to 55 across @knocklabs/expo, @knocklabs/react-native, and the example app.

Dependency upgrades:

  • Bump all expo-* packages to their SDK 55 equivalents
  • Bump React Native from 0.79 to 0.83, React from 19.0 to 19.2
  • Bump react-native-reanimated from 3.x to 4.x and add react-native-worklets (both bundled in Expo Go)
  • Bump react-native-svg to ~15.15.3 (fixes buffer import error on iOS)
  • Bump react-native-gesture-handler, react-native-screens, react-native-safe-area-context, navigation packages to SDK 55 compatible versions
  • Add @expo/log-box (new peer dep from expo-router 55)

Config changes:

  • Remove newArchEnabled from app.json (default/only option in SDK 55)
  • Remove edgeToEdgeEnabled from app.json (field removed in SDK 55)
  • Remove reactCanary experiment (React 19.2 is now stable)

Android Expo Go push notification handling:

  • Lazy-load expo-notifications via getNotificationsModule() to avoid a crash on Android Expo Go, where Expo removed remote push notification support in SDK 53 and made it a hard throw in SDK 55
  • Detect Android Expo Go via Constants.executionEnvironment before attempting require() — the module's top-level side-effect throws in a way that bypasses JavaScript try/catch
  • Log a clear console.warn explaining the limitation and linking to the development build docs
  • All other Knock features (feed, in-app UI, real-time updates) continue to work in Expo Go on Android

@linear
Copy link
Copy Markdown

linear bot commented Apr 1, 2026

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: 3070cd1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@knocklabs/expo-example Minor
@knocklabs/react-native Minor
@knocklabs/expo Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Apr 1, 2026 6:10pm
javascript-nextjs-example Ready Ready Preview, Comment Apr 1, 2026 6:10pm
javascript-slack-connect-example Ready Ready Preview, Comment Apr 1, 2026 6:10pm
javascript-slack-kit-example Ready Ready Preview, Comment Apr 1, 2026 6:10pm

Request Review

Copy link
Copy Markdown
Member Author

kylemcd commented Apr 1, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

kylemcd added 2 commits April 1, 2026 11:00
…d of local duplicate

Remove the locally defined NotificationBehavior type in utils.ts and import
it from getNotificationsModule, which derives it from the expo-notifications
namespace. This prevents the local type from silently diverging if the
canonical type evolves (e.g. shouldShowAlert deprecation in SDK 55).
… unavailable

When requestPushPermission returns 'unavailable' (e.g. Android Expo Go),
bail early instead of falling through to the 'User may have denied the
permission' warning, which is incorrect in that context.
…tion paths

Add tests covering:
- getNotificationsModule returns null and warns on Android Expo Go
- getNotificationsModule caches null result and only warns once
- utils.requestPushPermission returns 'unavailable' when module is null
- utils.getExpoPushToken returns null when module is null
- utils.setupDefaultAndroidChannel no-ops when module is null
- utils.registerForPushNotifications bails silently on 'unavailable' status
- utils.registerForPushNotifications warns on denied permission
…encies

Exact version pins in published library dependencies can cause duplicate
native module installs for consumers. Use ~15.15.3 for consistency with
other deps in the same block.

Addresses comment by @cursor: exact version pin on library dependency
@kylemcd kylemcd merged commit ecbfed1 into main Apr 2, 2026
13 checks passed
@kylemcd kylemcd deleted the kyle-kno-12289-update-expo-example-app-in-javascript-sdk-to-latest-version branch April 2, 2026 18:12
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.89%. Comparing base (6f079ff) to head (3070cd1).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #926      +/-   ##
==========================================
+ Coverage   64.61%   64.89%   +0.28%     
==========================================
  Files         207      208       +1     
  Lines        9711     9769      +58     
  Branches     1254     1274      +20     
==========================================
+ Hits         6275     6340      +65     
+ Misses       3411     3404       -7     
  Partials       25       25              
Files with missing lines Coverage Δ
...modules/push/KnockExpoPushNotificationProvider.tsx 96.17% <100.00%> (+0.12%) ⬆️
...es/expo/src/modules/push/getNotificationsModule.ts 100.00% <100.00%> (ø)
packages/expo/src/modules/push/utils.ts 93.45% <100.00%> (+8.67%) ⬆️

return cachedModule;
}

if (isAndroidExpoGo()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have a version check as well? E.g. checking the package version that they're running or the android device version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants