Skip to content

[pull] main from mobxjs:main - #64

Merged
pull[bot] merged 6 commits into
code:mainfrom
mobxjs:main
Aug 19, 2026
Merged

[pull] main from mobxjs:main#64
pull[bot] merged 6 commits into
code:mainfrom
mobxjs:main

Conversation

@pull

@pull pull Bot commented Aug 19, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

dependabot Bot and others added 6 commits August 19, 2026 10:07
Bumps [changesets/action](https://github.com/changesets/action) from 1.9.0 to 2.1.0.
- [Release notes](https://github.com/changesets/action/releases)
- [Changelog](https://github.com/changesets/action/blob/main/CHANGELOG.md)
- [Commits](changesets/action@v1.9.0...v2.1.0)

---
updated-dependencies:
- dependency-name: changesets/action
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dered component tree and its transitive closures] (#4689)

subscribe/getSnapshot were created inside useObserver's first
invocation and shared that invocation's closure context with the
reaction.track callback's captures (render, renderResult). Since
useSyncExternalStore holds subscribe for as long as the component
is mounted, the element tree returned by the first render (and
every fiber and DOM node reachable from it) could never be
garbage collected.

Create the administration object in a module-level factory instead,
so subscribe/getSnapshot close over nothing render-related.
…onBecomeUnobserved (#4684)

* Fix stack overflow in endBatch() when disposing a Reaction from onBecomeUnobserved

endBatch()'s pendingUnobservations drain loop calls onBUO() per observable,
which can dispose a Reaction (a common pattern). Reaction.dispose() calls
startBatch()/endBatch() again, and since inBatch is already back at 0 at
that point, the nested endBatch() recursed into the same drain loop instead
of returning, unlike runReactions() which already guards against this exact
kind of reentrancy with isRunningReactions. For long enough chains of
onBecomeUnobserved handlers disposing reactions, this recursion overflowed
the stack (issue #3954).

Add an analogous isRunningUnobservations guard: a nested endBatch() call
now just returns, and the already-running outer loop picks up anything a
nested dispose() pushes onto pendingUnobservations because it re-reads
list.length on every iteration.

* Address review feedback: release isRunningUnobservations via try/finally

If an onBecomeUnobserved handler threw, the guard flag never got reset,
permanently disabling pendingUnobservations draining for the rest of the
process. Wrap the drain in try/finally so it releases regardless of how
the block exits; pendingUnobservations itself is only cleared on the
success path, unchanged from before this fix, so a thrown exception still
leaves the array for a later pass to pick back up.

Added a regression test: a handler that throws still surfaces the error,
and a second, unrelated disposal right after still fires its own handler
instead of silently no-oping forever.
…rved atoms (#4682)

Co-authored-by: Michel Weststrate <mweststrate@gmail.com>
…4681)

union, intersection and symmetricDifference delegated to the argument
when it was a plain Set, so results came out in the argument's order
instead of the receiver's. Build every result from the receiver, as
difference/isSubsetOf/isSupersetOf already do, to match native Set.
@pull pull Bot locked and limited conversation to collaborators Aug 19, 2026
@pull pull Bot added the ⤵️ pull label Aug 19, 2026
@pull
pull Bot merged commit a908607 into code:main Aug 19, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants