Releases: preactjs/preact
Releases · preactjs/preact
10.17.0
Features
- Support the
isElement
function in preact/compat (#4041, thanks @cbbfcd) - Support the
isFragment
function in preact/compat (#4042, thanks @cbbfcd)
Types
- Support the HTML search element (#4092, thanks @JoviDeCroock)
- Re-export
ComponentChild
asReactNode
in the preact/compat types (#4077, thanks @rschristian) - Add missing SvgProps and make the generics mandatory (#4071, thanks @JoviDeCroock)
- Fix dom-event types(#4066, thanks @JoviDeCroock)
Fixes
- Eagerly unmount placeholders (#4090, thanks @andrewiggins)
- Avoid skipping re-orders in child diffing (#4088, thanks @JoviDeCroock)
- reduce stack size of try catch by excluding non components (#4067, thanks @JoviDeCroock)
- Fix react-frame-component by supporting nullish portals (#3896, thanks @JoviDeCroock)
Maintenance
- Fix running our benchmarks since the branch rename (#4089, thanks @JoviDeCroock)
- Fix IE11 attribute test by sorting them (#4070, thanks @marvinhagemeister)
- Switch default branch to
main
(#4069, thanks @marvinhagemeister)
10.16.0
Improved child diffing
- Port skew based child diffing (#4010, thanks @JoviDeCroock)
We have noticed a few scenario's where children would get unmounted and remounted eagerly due to some offset bugs in our child-diffing, with skew-based diffing we plan to address those. This is already part of v11 and has been introduced there by @andrewiggins. This has now been backported to Preact X so we can benefit from the consistency improvements here as well.
Defer setting refs
- fix: setting ref to null after updating it with new element (#4054, thanks @JoviDeCroock)
We used to set refs as part of the children, synchronously this caused several issues when a ref would go down a level, i.e. the following example
const App = () => {
return phase === 1 ? <div ref={x}><p>Foo</p></div> : <div><div ref={x}><p>Foo</p></div>
}
In this example when we go from phase 1 to phase 2 we would mount a new ref but only after we bubble back up diffing clean up the outer ref making the ref reset to null.
Fixes
- fix: incorrect actDepth calculation in test-utils (#4051, thanks @ottomao)
- Server compat should have a default export (#4047, thanks @MikaFima)
- Fix forceUpdate edge cases (#4048, thanks @dmitrage)
- Include HTML above render root for DOM validation (#4043, thanks @marvinhagemeister)
Types
- Types: add missing aria attributes (#4032, thanks @shoonia)
- improve VNode typings when generic is passed in (#4050, thanks @JoviDeCroock)
10.15.1
Fixes
- Fix TS FunctionComponent w/ exactOptionalPropertyTypes (#4025, thanks @rschristian)
Types
- Add W3C aria attributes (#4026, thanks @shoonia)
- Adds missing Context and Dispatch types to compat (#4028, thanks @Scott-Fischer)
10.15.0
Revert
- Revert controlled components (#4009, thanks @JoviDeCroock)
fixes
Types
- Add Missing
ForwardRefExoticComponent
andRefAttributes
types in compat (#3996, thanks @rschristian) - Add types for
<dialog>
's close & cancel events (#4017, thanks @rschristian) - Add missing types of TransitionEvent (#4019, thanks @shoonia)
- Add types of PictureInPictureEvent (#4020, thanks @shoonia)
10.14.1
Fixes
- Add microtick delay for restoring the value of controlled inputs (#4006, thanks @JoviDeCroock)
10.14.0
Features
- Add default props in cloneElement (#3968, thanks @nnhk23)
- Throw an error in debug if NaN is in a hook's dependency array (#3964, thanks @andrewiggins)
- Add deeper controlled input support in compat (#3926, thanks @andrewiggins)
Fixes
- Fix rowspan and colspan not cleared (#3997, thanks @marvinhagemeister)
- Should not transform imageSourceSet to image-source-set (#3995, thanks @JoviDeCroock)
Types
- Add some JSX attribute types (#3970, thanks @kidonng)
indeterminate
's SignalLike type (#3971, thanks @rschristian)
Maintenance
- Add missing type fields for tools (#3990, thanks @marvinhagemeister)
- Add isNaN helper for IE11 (#3981, thanks @andrewiggins)
- Fix firefox saucelabs not running (#3963, thanks @JoviDeCroock)
- Wait a major task after triggering GC to measure memory (#3962, thanks @andrewiggins)
- Add test for unmounting callback ref passed to
useImperativeHandle
(#3960, thanks @andrewiggins) - Improve perf of prop access (#3956, thanks @JoviDeCroock)
10.13.2
Performance
- Optimization for aria-/data- attr detection (#3948, thanks @developit)
- Optimize compat by hoisting the vnode handling func (#3941, thanks @JoviDeCroock)
Maintenance
- Upgrade prettier and run on more files (#3945, thanks @andrewiggins)
10.13.1
Bug Fixes
- Skip over function children when rendering (#3919, thanks @andrewiggins)
- Fix hook update not being applied when a forced context update was enqueued at the same time (#3922, thanks @marvinhagemeister)
Performance
- Improve render queue sorting performance by hoisting out function (#3921, thanks @developit)
- Improve compat performance by hoisting out regexes (#3903, thanks @JoviDeCroock)
Maintenance
- Some more IE11 specific fixes in our test suite (#3914, thanks @marvinhagemeister)
10.13.0
Features
- Switch back to microticks for scheduling as the default (#3911, thanks @marvinhagemeister , @JoviDeCroock)
Bug Fixes
- Fix hydrating
<textarea>
with value prop (#3891, thanks @andrewiggins) - Prevent memory leak when creating and destroying root nodes by clearing
currentComponent
(#3908, thanks @JoviDeCroock) - Fix regression in
10.12.1
from #3889 which could lead to a state not updating after a context update was enqueued (#3906, thanks @JoviDeCroock) - Fix tests assertions for IE11 (#3912, thanks @marvinhagemeister)
Types
- Add
indeterminate
property (#3837, thanks @rschristian) - Add aria role attribute values (#3904, thanks @shoonia)
- Add missing SVG Elements to types (#3905, thanks @shoonia)
- Add Missing
MemoExoticComponent
type inpreact/compat
(#3898, thanks @rschristian) - Add ARIA attribute types (#3910, thanks @andrewiggins)
10.12.1
Bug Fixes
- Fix non-numeric numbers passed to
width
orheight
attribute not working correctly (#3888, thanks @JoviDeCroock) - Fix
createContext
update being blocked byshouldComponentUpdate
(#3889, thanks @marvinhagemeister)