# What changed in @jupyter/ydoc

> 40 changes in @jupyter/ydoc 1 to 4 from its official release notes, upgrade guides and advisories: 5 breaking, 13 new APIs and options. Each one cited. Sources checked 2026-11-12. HTML: https://unstale.sh/npm/@jupyter/ydoc/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @jupyter/ydoc 4

### Breaking changes

- The dirty argument is removed from methods. (4.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.0.0)
- Document changes set the dirty state automatically. (4.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.0.0)

### New APIs and options

- Adds an optional finish event to aset_progressively. (4.1.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.1.1)
- The fromJSON API accepts a dirty parameter. (4.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.0.0)

### Behavior and default changes

- Notebook cell source updates can now be made granularly. (4.2.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.2.0)
- Notebook loading streams content while delaying large outputs. (4.1.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.1.0)

### Fixes and other changes

- Notebook JSON is serialized with deterministic key order. (4.2.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.2.1)
- State changes are emitted after content observers finish. (4.2.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v4.2.1)

## @jupyter/ydoc 3

### Breaking changes

- The schema for notebook code cell stream output changed. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- The Python requirement was updated to Python 3.8 or higher. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- YBlob is stored as bytes instead of a base64-encoded string. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)

### New APIs and options

- Adds asynchronous document get/set so developers can access documents asynchronously. (3.4.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.4.0)
- A method to append stream output was added. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- Awareness was added to the shared document interface. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- Cell execution_state was added and exposed in the JS package. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- A hash property with a getter and setter was added. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- A method to remove stream output was added. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- YDocument gained a source getter and setter. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- Cell change objects gained a streamOutputChange attribute. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- Transactions can now take an optional origin; the 'modeldb' origin is filtered out. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- Y documents gained an undo_manager. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)

### Performance

- A fast path for initial set improves opening large textual files. (3.4.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.4.1)
- Slightly optimizes YNotebook.get by avoiding conversion of metadata for each cell. (3.3.6) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.6)

### Behavior and default changes

- Reloading textual files now performs granular updates. (3.3.2) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.2)
- Notebook output stream initialization was improved. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)

### Fixes and other changes

- redo returns true if changes are done. (3.4.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.4.1)
- undo returns true if changes are done. (3.4.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.4.1)
- Deduplicates results on YNotebook.get calls. (3.3.6) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.6)
- Make ystate a property. (3.3.5) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.5)
- Fixes cell duplication when YStore diverges from disk. (3.3.4) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.4)
- Fixes handling of multi-byte Unicode in files. (3.3.3) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.3)
- Cells are hard-reloaded when their outputs change, including when the outputs include stream. (3.3.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.1)
- Fixes cell modifications causing cell output reload and a shift to the active cell index. (3.3.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.3.0)
- Fixes a regression where the default metadata structure was not being set, affecting syntax highlighting. (3.2.1) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.2.1)
- Preserves document_id state when setting notebook source. (3.2.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.2.0)
- Improves document reloading to avoid spurious side-effects. (3.2.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.2.0)
- Fixed assignment of the attachments change attribute. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)
- createOutputs was fixed; the 'modeldb' origin was renamed to 'silent-change'. (3.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v3.0.0)

## @jupyter/ydoc 1

### New APIs and options

- Adds a model version. (1.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v1.0.0)

### Tooling

- Adds the py.typed marker to indicate that the package provides type information. (1.0.0) — [release notes](https://github.com/jupyter-server/jupyter_ydoc/releases/tag/v1.0.0)
