• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

preactjs / preact / 6790956210 / 1
99%
master: 100%

Build:
Build:
LAST BUILD BRANCH: strict-equal-vnode-constructor
DEFAULT BRANCH: master
Ran 07 Nov 2023 10:17PM UTC
Files 31
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Nov 2023 10:16PM UTC coverage: 99.465% (+0.001%) from 99.464%
6790956210.1

push

github

web-flow
Rework children diffing to run in multiple phases (#4180)

Rework children diffing to run in multiple phases:

1. First, find matches for all new VNodes in the old VNode tree, and determine which VNodes moved
2. Second, remove any unmatched VNodes in the old tree from the DOM
3. Finally, diff, move, and insert all VNodes in the new tree

A couple additional changes to highlight
* Add new _flags VNode field to capture some diffing state (whether an oldVNode was matched and whether to insert a newVNode)
* Combine `placeChild` and `reorderChildren` into a single `insert` function & simplify insertion logic in diffChildren
* Simplify some _nextDom logic by always setting & clearing it
* Fold _hydrating field into _flags field (+12 B)

Fixes #4156 

Commit list:

* Redo two phase diff on top of main (+108 B)
* Use single flag field for matched and insert (+28 B)
* WIP: add some tests from v11
* Fix new keyed tests
* Replace oldDomRef with newParentVNode._nextDom and move unmounting into constructNewChildrenArray (-27 B)
* Always set _nextDom to simplify code (-4 B)
   Will always be cleared in parent diffChildren or commitRoot
* Combine `placeChild` and `reorderChildren` & simplify insertion condition (-24 B)
* Use .to.equalNode in test
* Always initialize commitQueue & refQueue (-5 B)
* Directly store and read newChildren on newParentVNode (-9 B)
* Fold _hydrating field into _flags field (+12 B)
* Apply Jovi's suggestions from code review
* Add additional suspense hydration test

---------

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>

1221 of 1252 branches covered (0.0%)

744 of 748 relevant lines covered (99.47%)

866.06 hits per line

Source Files on job 6790956210.1
  • Tree
  • List 31
  • Changed 16
  • Source Changed 7
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 6790956210
  • 9aa47287 on github
  • Prev Job for on main (#6785853856.1)
  • Next Job for on main (#6791966213.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc