npm / @jupyter/ydoc
@jupyter/ydoc
What changed in @jupyter/ydoc 1 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.
5 breaking13 new APIs and options2 performance4 behavior and defaults1 tooling15 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@jupyter/ydoc 48 changes
Breaking changes 2
The dirty argument is removed from methods.
Document changes set the dirty state automatically.
New APIs and options 2
Adds an optional finish event to aset_progressively.
The fromJSON API accepts a dirty parameter.
Behavior and default changes 2
Notebook cell source updates can now be made granularly.
Notebook loading streams content while delaying large outputs.
Fixes and other changes 2
Notebook JSON is serialized with deterministic key order.
State changes are emitted after content observers finish.
@jupyter/ydoc 330 changes
Breaking changes 3
The schema for notebook code cell stream output changed.
The Python requirement was updated to Python 3.8 or higher.
YBlob is stored as bytes instead of a base64-encoded string.
New APIs and options 10
Adds asynchronous document get/set so developers can access documents asynchronously.
A method to append stream output was added.
Awareness was added to the shared document interface.
Cell execution_state was added and exposed in the JS package.
A hash property with a getter and setter was added.
A method to remove stream output was added.
YDocument gained a source getter and setter.
Cell change objects gained a streamOutputChange attribute.
Transactions can now take an optional origin; the 'modeldb' origin is filtered out.
Y documents gained an undo_manager.
Performance 2
A fast path for initial set improves opening large textual files.
Slightly optimizes YNotebook.get by avoiding conversion of metadata for each cell.
Behavior and default changes 2
Reloading textual files now performs granular updates.
Notebook output stream initialization was improved.
Fixes and other changes 13
redo returns true if changes are done.
undo returns true if changes are done.
Deduplicates results on YNotebook.get calls.
Make ystate a property.
Fixes cell duplication when YStore diverges from disk.
Fixes handling of multi-byte Unicode in files.
Cells are hard-reloaded when their outputs change, including when the outputs include stream.
Fixes cell modifications causing cell output reload and a shift to the active cell index.
Fixes a regression where the default metadata structure was not being set, affecting syntax highlighting.
Preserves document_id state when setting notebook source.
Improves document reloading to avoid spurious side-effects.
Fixed assignment of the attachments change attribute.
createOutputs was fixed; the 'modeldb' origin was renamed to 'silent-change'.
@jupyter/ydoc 12 changes
New APIs and options 1
Adds a model version.
Tooling 1
Adds the py.typed marker to indicate that the package provides type information.