# `NPM.Dependency.Outdated`
[🔗](https://github.com/elixir-volt/npm_ex/blob/v0.7.4/lib/npm/dependency/outdated.ex#L1)

Checks for outdated packages by comparing installed versions
against the latest available versions on the registry.

# `outdated_entry`

```elixir
@type outdated_entry() :: %{
  name: String.t(),
  current: String.t(),
  wanted: String.t(),
  latest: String.t(),
  type: :major | :minor | :patch | :current
}
```

# `check`

```elixir
@spec check(map(), map(), map()) :: [outdated_entry()]
```

Checks a lockfile against wanted ranges and latest versions.

Given a lockfile (installed versions) and deps (wanted ranges from package.json),
and a map of latest versions from the registry, returns a list of outdated entries.

# `compute`

```elixir
@spec compute([{String.t(), String.t(), String.t()}]) :: [map()]
```

Computes all available updates from `{name, current, latest}` tuples.

# `filter_by_type`

```elixir
@spec filter_by_type([outdated_entry()], :major | :minor | :patch) :: [
  outdated_entry()
]
```

Filters outdated entries by update type.

# `format`

```elixir
@spec format([map()]) :: String.t()
```

Formats updates for display.

# `format_entry`

```elixir
@spec format_entry(outdated_entry()) :: String.t()
```

Formats an outdated entry as a human-readable string.

# `group_by_type`

```elixir
@spec group_by_type([map()]) :: map()
```

Groups updates by type.

# `summary`

```elixir
@spec summary([outdated_entry()] | [map()]) :: %{
  total: non_neg_integer(),
  major: non_neg_integer(),
  minor: non_neg_integer(),
  patch: non_neg_integer()
}
```

Returns a summary of outdated packages.

# `update_type`

```elixir
@spec update_type(String.t(), String.t()) :: :major | :minor | :patch | :current
```

Classifies an update type.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
