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 <[email protected]>
Co-authored-by: gziolo <[email protected]>
Co-authored-by: cbravobernal <[email protected]>
  • Loading branch information
4 people authored Oct 11, 2024
1 parent e24356a commit b6c321f
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:/WordPress/gutenberg/pull/66008).

### Bug Fixes

- Fix an issue where "default" could not be used as a directive suffix ([#65815](https:/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:/preactjs/preact/pull/4334
if ( localName === 'template' ) {
props.content = [
...( elementNode as HTMLTemplateElement ).content.childNodes,
Expand Down

1 comment on commit b6c321f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in b6c321f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https:/WordPress/gutenberg/actions/runs/11289610574
📝 Reported issues:

Please sign in to comment.