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

# Comparing releases

> See what changed between two versions of WhatsApp Web, as text, JSON, NDJSON or Markdown.

Comparing two versions is how you find features before they are announced.

```bash theme={null}
cellar diff
```

With no arguments this compares the two newest versions you have stored. Name them
explicitly when you want a specific pair.

```bash theme={null}
cellar diff whatsapp-1030882912 whatsapp-1044822804 --filter protocol --no-hunks
```

```
whatsapp-1030882912 -> whatsapp-1044822804  (filter `protocol`)
  considered 4711 of 172040 modules (old) / 5269 of 187892 (new)
  added 913 | removed 355 | modified 1515 | unchanged 2841
  suppressed as noise: 41 | diffs skipped for size: 0
```

Read the summary before the details. Added and removed modules are where new features
appear. Modified modules that gained dependencies or exports are where existing
features grew.

<Tip>
  Start with `--no-hunks` to see the shape of a release, then run it again without
  that flag for the handful of modules worth reading.
</Tip>

## What counts as a change

A module is compared by the fingerprint of every definition it ships, not by its text.
Reformatting alone never registers as a change, and a module that gained a second
build variant does register, even if the main definition is untouched.

Changes where every altered line is compiler output are counted as `noiseOnly` in the
summary and left out of the list. Add `--include-noise` if you suspect the noise rules
are hiding something.

## Export formats

<Tabs>
  <Tab title="Text">
    Human-readable, the default.

    ```bash theme={null}
    cellar diff --no-hunks
    ```

    ```
    [modified] WAWebSendMsgStanza
      + deps: WAWebAddonEncryption
      81.4% similar, +4 -7 lines
      new: /Users/you/.cellar/bundles/whatsapp-1044822804/modules/WAWebSendMsgStanza.js
    ```
  </Tab>

  <Tab title="JSON">
    One document, for scripts and assistants.

    ```bash theme={null}
    cellar diff --format json | jq '.summary'
    ```

    ```json theme={null}
    {
      "added": 913,
      "removed": 355,
      "modified": 1515,
      "unchanged": 2841,
      "noiseOnly": 41,
      "diffsSkipped": 0,
      "oldTotal": 172040,
      "newTotal": 187892
    }
    ```

    List just the new modules:

    ```bash theme={null}
    cellar diff --format json | jq -r '.changes[] | select(.kind=="added") | .name'
    ```
  </Tab>

  <Tab title="NDJSON">
    One JSON object per line. The first line is the summary with an empty change
    list, then one line per change, so you can stream a large comparison instead of
    buffering it.

    ```bash theme={null}
    cellar diff --format ndjson --no-hunks | head -2
    ```

    ```json theme={null}
    {"changes":[],"filter":"protocol","new":"whatsapp-1044822804","old":"whatsapp-1030882912","summary":{"added":913,"modified":1515,...}}
    {"kind":"added","name":"A2UIWidgetStateContext","newFile":"modules/A2UIWidgetStateContext.js","newSha256":"953e62318175bd4cd3d4039ccc41b70e049246bd6c4d729edd2d9869575065b3"}
    ```
  </Tab>

  <Tab title="Markdown">
    A report you can paste into an issue or a changelog.

    ```bash theme={null}
    cellar diff --format md --limit 40 > release-notes.md
    ```

    ```markdown theme={null}
    # whatsapp-1030882912 → whatsapp-1044822804

    Filter: `protocol`

    | metric | count |
    | --- | --- |
    | Added | 913 |
    | Removed | 355 |
    | Modified | 1515 |
    | Unchanged | 2841 |
    | Noise-only (suppressed) | 41 |
    | Diffs skipped for size | 0 |

    ## added (913)

    ### `A2UIWidgetStateContext`
    ```
  </Tab>
</Tabs>

## Options

| Flag              | Meaning                                                      |
| ----------------- | ------------------------------------------------------------ |
| `--filter NAME`   | Which modules to consider. Defaults to `default`.            |
| `--no-hunks`      | List what changed without the line-by-line diff.             |
| `--include-noise` | Include changes that are only compiler output.               |
| `-C N`            | Context lines around each change. Default `3`.               |
| `--limit N`       | Cap the list. The summary still reports true totals.         |
| `--platform`      | Which product to pick defaults from. Defaults to `whatsapp`. |

<Warning>
  The `default` filter skips `.pb` and `.graphql` files, because they are generated
  and compare badly as text. When looking for a new protobuf field, use
  `--filter schemas` instead. See [filters](/filters).
</Warning>
