Teardown

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

OptionDescriptionDefault
-f, --forceForce upgrade config files even if they existfalse
--skip-installSkip running bun install after upgradefalse
--skip-configSkip upgrading config filesfalse
--dry-runShow what would be upgraded without making changesfalse

Examples

Standard Upgrade

teardown upgrade

Upgrades all Teardown packages and config files.

Preview Changes

teardown upgrade --dry-run

Shows what would be upgraded without making changes.

Force Config Updates

teardown upgrade --force

Overwrites config files even if they've been modified.

Packages Only

teardown upgrade --skip-config

Updates packages without touching config files.

What Gets Upgraded

Packages

The following packages are checked and updated:

PackageDescription
@teardown/cliCLI tool
@teardown/dev-clientDevelopment client
@teardown/navigationNavigation library
@teardown/metro-configMetro configuration
@teardown/navigation-metroNavigation Metro plugin

Config Files

If not skipped, these files are updated:

FilePurpose
metro.config.jsMetro bundler configuration
babel.config.jsBabel transpiler configuration
react-native.config.jsReact Native CLI configuration
GemfileRuby dependencies for CocoaPods

Upgrade Process

  1. Check versions - Compares installed vs. latest versions
  2. Update package.json - Sets new version numbers
  3. Update config files - Refreshes with latest templates
  4. 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 --clean

Clear Metro Cache

Clear bundler cache after significant updates:

teardown dev --reset-cache

Check for Breaking Changes

Review the changelog for breaking changes:

# Check package changelog on npm
npm info @teardown/cli changelog

Handling 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 --force to overwrite with new templates
  • Use --skip-config to keep your changes
  • Manually merge changes

Version Mismatches

Keep Teardown packages in sync:

# All packages should use the same version
teardown upgrade

Mixing 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@latest

Install 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 install

Config Syntax Errors

If updated config files have errors:

# Regenerate with force
teardown upgrade --force

# Or reinitialize
teardown init YourAppName --force