Skip to content

Commit

Permalink
Interactivity: Update preact packages (#66008)
Browse files Browse the repository at this point in the history
* Update preact packages

* Update package-lock

* Fix some EffectFn types

* Remove outdated ts-expect-error

* Add changelog

Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
  • Loading branch information
4 people authored and ciampo committed Oct 14, 2024
1 parent 5463f53 commit eec2c06
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 34 deletions.
61 changes: 32 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/interactivity/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Internal

- Upgrade preact libraries [#66008](https://github.com/WordPress/gutenberg/pull/66008).

### Bug Fixes

- Fix an issue where "default" could not be used as a directive suffix ([#65815](https://github.com/WordPress/gutenberg/pull/65815)).
Expand Down
4 changes: 2 additions & 2 deletions packages/interactivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"./debug": "./build-module/debug.js"
},
"dependencies": {
"@preact/signals": "^1.2.2",
"preact": "^10.19.3"
"@preact/signals": "^1.3.0",
"preact": "^10.24.2"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/interactivity/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export const splitTask = () => {
* @param notify The function that notifies listeners when the value is flushed.
* @return The Flusher object with `flush` and `dispose` properties.
*/
function createFlusher( compute: () => unknown, notify: () => void ): Flusher {
function createFlusher( compute: () => void, notify: () => void ): Flusher {
let flush: () => void = () => undefined;
const dispose = effect( function ( this: any ) {
const dispose = effect( function ( this: any ): void {
flush = this.c.bind( this );
this.x = compute;
this.c = notify;
Expand Down
1 change: 0 additions & 1 deletion packages/interactivity/src/vdom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ export function toVdom( root: Node ): Array< ComponentChild > {
}, {} );
}

// @ts-expect-error Fixed in upcoming preact release https://github.com/preactjs/preact/pull/4334
if ( localName === 'template' ) {
props.content = [
...( elementNode as HTMLTemplateElement ).content.childNodes,
Expand Down

0 comments on commit eec2c06

Please sign in to comment.