Overview
The FE Monorepo follows a strict dependency management strategy:- Always use EXACT versions (no
^or~ranges) - Use
bun bump:depsfor automated dependency updates - Special process for Expo SDK upgrades
- Verify changes with testing and building
Upgrading Non-Expo Dependencies
For all packages except Expo-related ones, use the automated upgrade command.Step-by-Step Process
Check for Outdated Dependencies
Run the bump command to check and update dependencies:This command:
- Checks for outdated dependencies across all workspace packages
- Updates to the latest versions
- Excludes Expo-related packages (handled separately)
- Updates peer dependencies
Excluded Packages
Thebump:deps command excludes Expo-related packages:
expo*@expo*@dev-plugins*@babel*metro*react-native*@react-navigation*tamagui@tamagui*
These packages require coordinated upgrades with the Expo SDK version.
Upgrading Expo Dependencies
Expo apps require a special upgrade process to ensure compatibility.Step-by-Step Process
Check Expo SDK Changelog
Review the changelog for the target Expo SDK version:
- Check the “Deprecations, renamings, and removals” section
- Note any breaking changes that might affect your app
- Plan necessary code changes
Upgrade Expo SDK
Run the Expo upgrade command:Replace
53.0.0 with your target SDK version.The
--fix flag automatically updates all Expo-related packages to compatible versions.Run Expo Doctor
Check for known issues and compatibility problems:Fix any issues reported by the doctor.
Upgrade Development Tools
If required by the new SDK:
- Update Xcode (for iOS)
- Update Android Studio (for Android)
- Update Java version if needed
Detailed Expo Upgrade Guide
For more details, see the Expo app README.Upgrading IntentUI Components
The monorepo uses IntentUI components which require special handling:Manual Adjustments
After the update:
- Copy prop changes into
providers/toast/context.tsx - Remove the generated
toast.tsxfile if needed - Use
react-statelyinstead of@react-stately/color - Use
react-ariainstead of@react-aria/i18n
Version Management with Changesets
After upgrading dependencies and verifying everything works:Create Changeset
Document the changes:Follow the prompts to:
- Select affected packages
- Choose version bump type (major, minor, patch)
- Describe the changes
Verification Checklist
After upgrading dependencies, ensure you complete all verification steps:Troubleshooting
Dependency Conflicts
Peer dependency warnings:- Check if the warning is critical
- Try updating peer dependencies:
bun bump:depsincludes--peer - Manual resolution may be needed for some packages
- Check package changelogs for breaking changes
- Look for migration guides
- Consider pinning to a compatible version temporarily
Build Failures After Upgrade
Type errors:- Check for breaking type changes in updated packages
- Update type imports if packages changed structure
- Run
bun lint-typecheckto see all errors
- Check browser console / app logs
- Review breaking changes in package changelogs
- Test with development builds first
Expo-Specific Issues
Native build fails:- Ensure Xcode/Android Studio are up to date
- Run
bun expo doctorfor diagnostics - Clean and rebuild:
bun expo prebuild
- Run
bun expo install:checkto check compatibility - Run
bun expo install:fixto fix version mismatches
Best Practices
Upgrade Strategy:
- Upgrade dependencies regularly (weekly or bi-weekly)
- Test thoroughly after each upgrade
- Use exact versions to prevent surprises
- Read changelogs before upgrading major versions
- Upgrade one major package at a time for easier debugging
Safety First
- Branch Protection: Always upgrade on a feature branch
- Test Coverage: Run full test suite before merging
- Incremental Changes: Upgrade one package at a time for major versions
- Documentation: Use changesets to document what changed and why
Monitoring
- Check for security vulnerabilities:
bun audit - Review dependabot/renovate PRs regularly
- Monitor package deprecation notices
Quick Reference
| Task | Command |
|---|---|
| Update all non-Expo deps | bun bump:deps |
| Update Expo SDK | npx expo install expo@^XX.0.0 --fix |
| Update IntentUI | bun bump:ui |
| Install dependencies | bun install |
| Check Expo compatibility | bun expo doctor |
| Fix Expo versions | bun expo install:fix |
| Create changeset | bun cs |
| Version changeset | bun cs:v |
| Run all tests | bun spa test && bun web test |
| Lint and type check | bun lint-typecheck |
