Skip to content

Blocks: Update hpq to 1.4.0 and drop the ts-expect-error suppressions - #81199

Merged
manzoorwanijk merged 1 commit into
trunkfrom
update/hpq-1.4.0
Aug 5, 2026
Merged

Blocks: Update hpq to 1.4.0 and drop the ts-expect-error suppressions#81199
manzoorwanijk merged 1 commit into
trunkfrom
update/hpq-1.4.0

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Member

What?

Updates hpq to 1.4.0 and drops the two @ts-expect-error suppressions on its imports.

Follow up to #81148 (comment).

Why?

hpq 1.4.0 ships TypeScript declarations, so the suppressions are no longer accurate.

How?

With the imports typed, the call sites in get-block-attributes.ts are checked for the first time and needed fixing, mostly Node where hpq's MatcherFn expects Element. Two casts are dropped as redundant; a non-null assertion and a MatcherObj cast are added where hpq's types are stricter than its runtime. Type-level only, no runtime changes.

Testing Instructions

  1. npm run build succeeds.
  2. npm run test:unit packages/blocks passes.
  3. npm run lint:js passes.

Use of AI Tools

Authored with Claude Code. I have reviewed and take responsibility for the changes.

@github-actions github-actions Bot added the [Package] Blocks /packages/blocks label Aug 5, 2026
hpq 1.4.0 ships TypeScript declarations, so the two suppressions added in
#81148 are no longer needed. Type the call sites against the new declarations.
@manzoorwanijk manzoorwanijk added the [Type] Code Quality Issues or PRs that relate to code quality label Aug 5, 2026
@manzoorwanijk manzoorwanijk self-assigned this Aug 5, 2026
@manzoorwanijk
manzoorwanijk marked this pull request as ready for review August 5, 2026 05:00
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Size Change: +43 B (0%)

Total Size: 7.81 MB

📦 View Changed
Filename Size Change
build/scripts/blocks/index.min.js 45.4 kB +43 B (+0.09%)

compressed-size-action

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me, but I'll defer to @aduth as lib author :)

@aduth aduth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

@manzoorwanijk
manzoorwanijk merged commit 503dad4 into trunk Aug 5, 2026
56 checks passed
@manzoorwanijk
manzoorwanijk deleted the update/hpq-1.4.0 branch August 5, 2026 12:36
@github-actions github-actions Bot added this to the Gutenberg 23.8 milestone Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Blocks /packages/blocks [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants