> ## Documentation Index
> Fetch the complete documentation index at: https://docs.depfixer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate

> Upgrade your framework to a newer version

# Migrate Command

The migrate command helps you upgrade your framework (Angular, React, Vue) to a newer version with automatic dependency alignment.

## Usage

```bash theme={null}
npx depfixer migrate [options]
```

## Options

| Option         | Description                          |
| -------------- | ------------------------------------ |
| `--path <dir>` | Project directory (default: current) |

## How It Works

### 1. Framework Detection

DepFixer automatically detects your framework:

```
  ██████╗  ███████╗ ██████╗ ███████╗██╗██╗  ██╗███████╗██████╗
  ██╔══██╗ ██╔════╝ ██╔══██╗██╔════╝██║╚██╗██╔╝██╔════╝██╔══██╗
  ██║  ██║ █████╗   ██████╔╝█████╗  ██║ ╚███╔╝ █████╗  ██████╔╝
  ██║  ██║ ██╔══╝   ██╔═══╝ ██╔══╝  ██║ ██╔██╗ ██╔══╝  ██╔══██╗
  ██████╔╝ ███████╗ ██║     ██║     ██║██╔╝ ██╗███████╗██║  ██║
  ╚═════╝  ╚══════╝ ╚═╝     ╚═╝     ╚═╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝
           Upgrade Fearlessly. We Handle the Rest.

⚡ DepFixer CLI v1.0.0
──────────────────────────────────────────────────

📦 PROJECT: my-angular-app
   Framework: Angular 16.0.0

Fetching available versions...
```

### 2. Version Selection

Use arrow keys to select your target version:

```
Select target version:

    Angular 19 (Latest)
      -> 19.0.0 - Latest stable

  > Angular 18 (LTS)
      -> 18.2.0 - Long-term support

    Angular 17
      -> 17.3.0 - Stable

Up/Down Navigate  Enter Select  Esc Cancel
```

### 3. Migration Plan

Review what will change:

```
🚀 MIGRATION PLAN: Angular 16 → 18
──────────────────────────────────────────────────

📊 Projection:
    • Health:     65/100 → 95/100 (Estimated)
    • Packages:   12 updates
    • Breaking:   ⚠️  2 Major Changes

PACKAGE                            CURRENT       TARGET        TYPE
---------------------------------------------------------------------------
@angular/core                      16.0.0        18.2.0        Major
@angular/cli                       16.0.0        18.2.0        Major
@angular/compiler                  16.0.0        18.2.0        Major
typescript                         4.9.5         5.4.5         Major
zone.js                            0.13.0        0.14.0        Minor
rxjs                               7.5.0         7.8.1         Patch

+--------------------------------------------------+
|                                                  |
|  MIGRATION COST:   35 CREDITS                    |
|  PLAN SIZE:        Tier: Standard                |
|                                                  |
+--------------------------------------------------+
```

### 4. Apply Migration

After confirmation and payment:

```
✨ SUCCESS
──────────────────────────────────────────────────

    ✓ 12 Packages Updated
    ✓ Backup: package.json.bak

    👉 NEXT STEP:
    Run the following command to finalize changes:

    $ npm install
```

## Supported Migrations

### Angular

| From | To    | Notes                           |
| ---- | ----- | ------------------------------- |
| 12.x | 15-19 | Multi-version jump supported    |
| 13.x | 16-19 | TypeScript upgrade included     |
| 14.x | 17-19 | Standalone components available |
| 15.x | 18-19 | Signals API available           |
| 16.x | 18-19 | Control flow syntax             |
| 17.x | 18-19 | Latest features                 |

### React

| From | To    | Notes                     |
| ---- | ----- | ------------------------- |
| 16.x | 17-19 | Concurrent mode available |
| 17.x | 18-19 | Automatic batching        |
| 18.x | 19    | React Compiler ready      |

### Vue

| From | To   | Notes                             |
| ---- | ---- | --------------------------------- |
| 2.x  | 3.x  | Composition API, major rewrite    |
| 3.0  | 3.4+ | Script setup, improved reactivity |

## What Gets Updated

The migrate command updates:

* **Core framework packages** - Main framework and related packages
* **TypeScript** - Version compatible with target framework
* **Build tools** - CLI, webpack plugins, etc.
* **Ecosystem packages** - Router, state management, UI libraries
* **Type definitions** - `@types/*` packages

## Migration vs Analyze

| Feature            | Analyze | Migrate |
| ------------------ | ------- | ------- |
| Fix current issues | Yes     | No      |
| Upgrade framework  | No      | Yes     |
| Version selection  | No      | Yes     |
| Multi-version jump | No      | Yes     |

**Tip:** Run `npx depfixer` (analyze) first to fix current issues, then use `migrate` to upgrade your framework version.
