upgrade
Upgrade Teardown packages and config files.
The upgrade command updates Teardown packages to the latest versions and refreshes configuration files.
Usage
teardown upgrade [options]Options
| Option | Description | Default |
|---|---|---|
-f, --force | Force upgrade config files even if they exist | false |
--skip-install | Skip running bun install after upgrade | false |
--skip-config | Skip upgrading config files | false |
--dry-run | Show what would be upgraded without making changes | false |
Examples
Standard Upgrade
teardown upgradeUpgrades all Teardown packages and config files.
Preview Changes
teardown upgrade --dry-runShows what would be upgraded without making changes.
Force Config Updates
teardown upgrade --forceOverwrites config files even if they've been modified.
Packages Only
teardown upgrade --skip-configUpdates packages without touching config files.
What Gets Upgraded
Packages
The following packages are checked and updated:
| Package | Description |
|---|---|
@teardown/cli | CLI tool |
@teardown/dev-client | Development client |
@teardown/navigation | Navigation library |
@teardown/metro-config | Metro configuration |
@teardown/navigation-metro | Navigation Metro plugin |
Config Files
If not skipped, these files are updated:
| File | Purpose |
|---|---|
metro.config.js | Metro bundler configuration |
babel.config.js | Babel transpiler configuration |
react-native.config.js | React Native CLI configuration |
Gemfile | Ruby dependencies for CocoaPods |
Upgrade Process
- Check versions - Compares installed vs. latest versions
- Update package.json - Sets new version numbers
- Update config files - Refreshes with latest templates
- Run install - Installs updated packages
Output
Checking for updates...
Packages to update:
@teardown/cli: ^2.0.70 → ^2.0.79
@teardown/navigation: ^2.0.70 → ^2.0.79
Config files to update:
metro.config.js
babel.config.js
Updating package.json...
Updating config files...
Running bun install...
Upgrade complete!After Upgrading
Rebuild Native Projects
Major version upgrades may require rebuilding:
teardown prebuild --cleanClear Metro Cache
Clear bundler cache after significant updates:
teardown dev --reset-cacheCheck for Breaking Changes
Review the changelog for breaking changes:
# Check package changelog on npm
npm info @teardown/cli changelogHandling Conflicts
Modified Config Files
If you've customized config files:
Config files modified locally:
metro.config.js (modified)
Use --force to overwrite, or --skip-config to preserve.Options:
- Use
--forceto overwrite with new templates - Use
--skip-configto keep your changes - Manually merge changes
Version Mismatches
Keep Teardown packages in sync:
# All packages should use the same version
teardown upgradeMixing versions may cause compatibility issues.
Troubleshooting
Upgrade Failed
If the upgrade fails:
# Check current versions
npm ls @teardown/cli
# Manual update
bun add @teardown/cli@latestInstall Failed
If bun install fails after upgrade:
# Try manual install
teardown upgrade --skip-install
bun install
# Or clear and reinstall
rm -rf node_modules bun.lock
bun installConfig Syntax Errors
If updated config files have errors:
# Regenerate with force
teardown upgrade --force
# Or reinitialize
teardown init YourAppName --forceRelated
- Configuration - Config file reference
- init - Initialize project