Skip to content

chore(deps): bump mobx-keystone from 1.23.0 to 2.2.0 - #2872

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/mobx-keystone-2.2.0
Open

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/mobx-keystone-2.2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 9, 2026 •

Copy link
Copy Markdown

Bumps mobx-keystone from 1.23.0 to 2.2.0.

Changelog

Sourced from mobx-keystone's changelog.

2.2.0

  • Now requires TypeScript 5.4 or newer (the types use the built-in NoInfer).
  • Faster TypeScript type-checking of models and runtime types: the snapshot, model data and types.object type mappings now create far fewer type instantiations (about 35% fewer in a typical model-heavy project), with no change to the resulting types. tProp defaults, fromSnapshot(type, snapshot), getSnapshot(type, value) and applySnapshot no longer infer their type parameter from the data / snapshot argument, which makes those calls much cheaper to type-check (e.g. about 40% fewer instantiations for a typed fromSnapshot call). The @model decorator also no longer computes the creation data type of the decorated class. A typed fromSnapshot(type, snapshot) call now also accepts the output snapshot type of type (which must always round-trip, as with applySnapshot and the untyped fromSnapshot(snapshot)), so round trips such as fromSnapshot(M, getSnapshot(m)) no longer compare the output and input snapshot types (about 65% cheaper to type-check).
  • Smaller and faster declaration (.d.ts) emit for exported model classes: the types of idProp and tProp properties (TypedModelIdProp, TypedMaybeOptionalModelProp, TypedOptionalModelProp) and CodecFromEncoded are now exported, so emitted declarations reference them by name instead of expanding them inline.
  • Fixed the types of tProp codec props (e.g. tProp(types.dateAsTimestamp)) after .withSetter(), .withSnapshotProcessor() or .withTransform(): $ and snapshots now use the encoded type (e.g. number) instead of the runtime type (e.g. Date). The new ModelPropWithSetter, ModelPropWithSnapshotProcessor and ModelPropWithTransform types describe the props these modifiers return.
  • Fixed applySnapshot throwing when the snapshot adds an object under a key named like an Object.prototype member (e.g. toString or constructor).
  • Fixed Draft's isDirty not being cached and commit / reset not running as MobX actions with MobX 6.
  • fromSnapshot (and cloneTreeValue for plain objects / arrays) now reports a clear error when the snapshot contains tree nodes, instead of a generic "unsupported snapshot".
  • Fixed ArraySet set operations (union, intersection, isSubsetOf, etc.) throwing on runtimes without the native ES2025 Set methods.

2.1.0

  • [BREAKING CHANGE] UndoStore keeps undo/redo events as frozen data, making recording ~4x faster and undo/redo ~3x faster:
    • Snapshots and patches store events as { $frozen: true, data: event }. Older snapshots still load, but earlier versions cannot load newer ones.
    • Events passed when creating an UndoStore must be wrapped with frozen(event).
    • undoQueue / redoQueue events are plain objects, and attached states are no longer copied.
  • Performance on large trees: operations that used to rescan or rebuild state for the whole tree now only update what changed (e.g. at 16,000 items, from milliseconds to microseconds):
    • array splices (shift, unshift, splice, detach);
    • rootRef / resolveId and getRefsResolvingTo;
    • structural applyPatches / applySnapshot, which also makes undo/redo no longer quadratic when the UndoStore is inside the tracked tree;
    • getSnapshot / onSnapshot after splices and key changes;
    • onChildAttachedTo;
    • runtime type checking of large arrays, records and ObjectMaps, and of key changes in deep trees;
    • transactions, which no longer build patches to roll back.
  • Tree nodes use ~30% less memory and are ~15% faster to create. Models without MobX decorators no longer get a MobX observable administration, so isObservableObject(model) is now false for them.
  • Rejected tree changes (e.g. assigning a Map, a node that already has a parent, or the same node twice) now leave the tree unchanged instead of half-changed.
  • Inserting an array item at its own index (e.g. arr.unshift(arr[0])) now throws instead of putting the same node in the array twice.
  • applySnapshot / applyPatches now undo their changes when they throw partway.
  • Fixed transactionMiddleware / @transaction not fully restoring the state when the failed action detached, changed and reattached a model.
  • Fixed applySnapshot / applyPatches not reusing a model whose id had changed.
  • Fixed onAttachedToRootStore not being called for models inside a plain tree node attached to a root store.

2.0.0

  • [BREAKING CHANGE] Preserve repeated property names and array indexes in type-check error paths when validating an attached subtree. Paths supplied to TypeCheckError and TypeCheckErrorFailure are now consistently treated as relative to the checked value; manually supplied rooted paths are no longer detected automatically.
  • [BREAKING CHANGE] Continue transaction rollback after patch listeners or patch recorders throw, including all inverse patches of an array edit; if any fail, throw a MobxKeystoneAggregateError whose first error is the original action error, followed by the callback failures.
  • [BREAKING CHANGE] Prevent replacement or deletion of checked frozen data and avoid repeated validation of shared frozen subtrees.
  • [BREAKING CHANGE] Reject arrays consistently in types.object and types.record, including snapshot matching.
  • [BREAKING CHANGE] Reject malformed JSON Pointer escapes instead of interpreting them as literal property names.
  • [BREAKING CHANGE] Enforce refinements around codec-backed values during model construction and writes, including rollback of invalid writes.
  • [BREAKING CHANGE] Support JSON Patch "-" array appends and root-content replacement at an empty path; reject root removal and malformed or out-of-range array indexes instead of silently changing unrelated data.
  • [BREAKING CHANGE] Continue patch delivery to remaining listeners after a listener throws, then report the failures once delivery has finished. This also covers patchRecorder callbacks, so a failing recorder no longer silently stops the recorders registered on ancestor nodes, nor the deep-change listeners and the deferred patch listeners of the same mutation. Failures from all three are reported together.
  • [BREAKING CHANGE] Added MobxKeystoneAggregateError, a MobxKeystoneError subclass with an errors array. Patch listeners, patch recorders, deep-change listeners and root store attachment hooks now share one failure rule: every callback runs, a lone failure is rethrown as is, and several failures are grouped in a MobxKeystoneAggregateError whose errors is a flat list, even across nested delivery.
  • [BREAKING CHANGE] Validate that types.ref values belong to the specified reference constructor.
  • [BREAKING CHANGE] Reject invalid undo/redo history limits instead of allowing negative limits to hang history trimming.
  • [BREAKING CHANGE] Run child-hook disposal callbacks in reverse attachment order, including explicit disposal. Continue remaining detachments and attachments when a callback throws, then report the first error.
  • [BREAKING CHANGE] Object property setters now use SameValueZero equality, so re-setting a NaN property is a no-op. 0 and -0 are treated as the same value throughout, matching deepEquals, literal type checks and JSON.
  • [BREAKING CHANGE] ID-checked path resolution now rejects missing array properties instead of resolving them as undefined.
  • [BREAKING CHANGE] resolvePath now distinguishes missing properties from properties whose value is undefined.

... (truncated)

Commits
  • f160bf6 mobx-keystone@v2.2.0
  • f27dfd9 fix to types
  • e993190 fix: update comparison table formatting for better readability and consistency
  • cdf073b Refactor mobx-keystone-loro and mobx-keystone-yjs bindings for improved perfo...
  • c46af8e Refactor snapshot processor plans in array, tuple, object, and record types
  • 69ae5e0 feat: implement Pulse and Ripple components for enhanced visual effects in Tr...
  • dd69e70 feat: enhance quotes section with improved styling and layout
  • 52b7569 fix: update snapshotPanel min-height for improved layout
  • c896b4c style: update sidebar section label styles for improved readability
  • 77ff436 fix: clarify context methods and improve mobile sidebar layout
  • Additional commits viewable in compare view

@dependabot
dependabot Bot requested a review from a team as a code owner October 9, 2026 22:03
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: dependabot/npm_and_yarn/mobx-keystone-2.2.0/89c8f21

@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/mobx-keystone-2.2.0 branch from 0bb10e7 to 8d9eea2 Compare October 9, 2026 22:09
Bumps [mobx-keystone](https://github.com/xaviergonz/mobx-keystone) from 1.23.0 to 2.2.0.
- [Changelog](https://github.com/xaviergonz/mobx-keystone/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xaviergonz/mobx-keystone/compare/mobx-keystone@v1.23.0...mobx-keystone@v2.2.0)

---
updated-dependencies:
- dependency-name: mobx-keystone
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/mobx-keystone-2.2.0 branch from 8d9eea2 to 89c8f21 Compare October 9, 2026 22:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants