Skip to content

[auto-generated] Remove wordpress__blocks, wordpress__viewport, wordpress__wordcount#74886

Merged
typescript-bot merged 3 commits into
DefinitelyTyped:masterfrom
manzoorwanijk:remove/wordpress-builtin-types
Apr 17, 2026
Merged

[auto-generated] Remove wordpress__blocks, wordpress__viewport, wordpress__wordcount#74886
typescript-bot merged 3 commits into
DefinitelyTyped:masterfrom
manzoorwanijk:remove/wordpress-builtin-types

Conversation

@manzoorwanijk

Copy link
Copy Markdown
Contributor

Summary

  • Remove @types/wordpress__blocks@wordpress/blocks ships built-in types since v15.17.0
  • Remove @types/wordpress__viewport@wordpress/viewport ships built-in types since v6.44.0
  • Remove @types/wordpress__wordcount@wordpress/wordcount ships built-in types since v4.32.0
  • Update @types/wordpress__block-editor (the only dependent of wordpress__blocks) to import from the real package, adapting to the built-in type names (Block, BlockTypeIconDescriptor, etc.)

Test plan

  • pnpm test wordpress__block-editor passes
  • No other packages in DT depend on the removed packages

🤖 Generated with Claude Code

…ypes since v15.17.0

@wordpress/blocks now bundles its own TypeScript declarations.
Update @types/wordpress__block-editor to depend on the real package
and adapt imports to the built-in type names (Block, BlockTypeIconDescriptor).
…packages ship built-in types

@wordpress/viewport ships types since v6.44.0 and @wordpress/wordcount
since v4.32.0. Neither had any dependents in DefinitelyTyped.
@typescript-bot

typescript-bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@manzoorwanijk Thank you for submitting this PR!

This is a live comment that I will keep updated.

This PR touches some part of DefinitelyTyped infrastructure, so a DT maintainer will need to review it. This is rare — did you mean to do this?

4 packages in this PR (and infra files)

Code Reviews

Because this PR edits multiple packages, it can be merged once it's reviewed by a DT maintainer.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ A DT maintainer needs to approve changes that affect DT infrastructure (notNeededPackages.json)

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 74886,
  "author": "manzoorwanijk",
  "headCommitOid": "e56717b838fdb8b29cfd918d903fdfd21b5d4b7f",
  "mergeBaseOid": "f2fe721fa272d4cd5ff6733c434cc336e74bf514",
  "lastPushDate": "2026-04-16T11:56:48.000Z",
  "lastActivityDate": "2026-04-17T00:04:44.000Z",
  "mergeOfferDate": "2026-04-16T21:39:21.000Z",
  "mergeRequestDate": "2026-04-17T00:04:44.000Z",
  "mergeRequestUser": "manzoorwanijk",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": null,
      "kind": "edit",
      "files": [
        {
          "path": "notNeededPackages.json",
          "kind": "infrastructure"
        }
      ],
      "owners": [],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical",
      "isSafeInfrastructureEdit": false
    },
    {
      "name": "wordpress__block-editor",
      "kind": "edit",
      "files": [
        {
          "path": "types/wordpress__block-editor/components/inner-blocks.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__block-editor/components/provider.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__block-editor/components/rich-text.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__block-editor/hooks/use-typography-props.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__block-editor/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__block-editor/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__block-editor/store/actions.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__block-editor/store/selectors.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__block-editor/wordpress__block-editor-tests.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "dsifford",
        "sirreal",
        "dmsnell",
        "joshualip-plaudit"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "wordpress__blocks",
      "kind": "delete",
      "files": [
        {
          "path": "types/wordpress__blocks/.eslintrc.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__blocks/.npmignore",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__blocks/api/categories.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/children.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/factory.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/node.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/parser.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/raw-handling.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/registration.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/serializer.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/templates.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/utils.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/api/validation.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/block-content-provider.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__blocks/store/actions.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/store/selectors.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__blocks/tsconfig.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__blocks/wordpress__blocks-tests.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "dsifford",
        "sirreal",
        "dmsnell",
        "tomasztunik",
        "sunyatasattva",
        "bastolen",
        "joshualip-plaudit"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "wordpress__viewport",
      "kind": "delete",
      "files": [
        {
          "path": "types/wordpress__viewport/.npmignore",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__viewport/if-viewport-matches.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__viewport/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__viewport/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__viewport/store/actions.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__viewport/store/selectors.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__viewport/tsconfig.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__viewport/with-viewport-match.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__viewport/wordpress__viewport-tests.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "dsifford"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    },
    {
      "name": "wordpress__wordcount",
      "kind": "delete",
      "files": [
        {
          "path": "types/wordpress__wordcount/.npmignore",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__wordcount/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/wordpress__wordcount/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__wordcount/tsconfig.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/wordpress__wordcount/wordpress__wordcount-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "dsifford"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "gabritto",
      "date": "2026-04-16T21:38:40.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 4259866545,
  "ciResult": "pass"
}

@typescript-bot

Copy link
Copy Markdown
Contributor

🔔 @dsifford @sirreal @dmsnell @joshualip-plaudit @tomasztunik @sunyatasattva @bastolen — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot

Copy link
Copy Markdown
Contributor

@manzoorwanijk The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review.

@manzoorwanijk

Copy link
Copy Markdown
Contributor Author

I have created microsoft/DefinitelyTyped-tools#1279 to add @wordpress/blocks to the allowed pacakges.

@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Apr 16, 2026
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board Apr 16, 2026
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in Pull Request Status Board Apr 16, 2026
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Apr 16, 2026
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Author to Merge in Pull Request Status Board Apr 16, 2026
@manzoorwanijk

Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in Pull Request Status Board Apr 17, 2026
@typescript-bot typescript-bot merged commit 9d53984 into DefinitelyTyped:master Apr 17, 2026
4 checks passed
@manzoorwanijk manzoorwanijk deleted the remove/wordpress-builtin-types branch April 17, 2026 09:11
@joshualip-plaudit

joshualip-plaudit commented May 8, 2026

Copy link
Copy Markdown
Contributor

@gabritto / @manzoorwanijk This has been causing pretty much constant build problems at the company that I work for ever since it was merged.

Is it possible to get this republished as a major version bump (it is backwards incompatible, so the fact that this wasn't published with a major version bump in the first place confuses me) and have the version with types re-published as 15.17.1?

@manzoorwanijk

Copy link
Copy Markdown
Contributor Author

Versioning is handled by the CI tooling here, I don’t think we can change it.

@joshualip-plaudit

Copy link
Copy Markdown
Contributor

@manzoorwanijk Bumping the major version is perfectly possible. See #74306 for an example involving another WordPress typedefs package.

I'm having trouble seeing how publishing a 15.12.0 (or whatever the next version would be on here) that undoes this PR and then replaying this PR with the version bumped to 16.0.0 would be an issue.

I also said that this would be a problem and specifically warned you that not bumping the version to 16.x would be an issue (WordPress/gutenberg#77393 (comment)). While I'd normally just submit a PR to get this undone, it will take ~3-6 weeks depending on how I have to stagger them to get approval, and that's without accounting for having to explain why I'm trying to get a change submitted by a project owner undone. So, could you please either start the process to undo this, or sign off on me doing so?

@manzoorwanijk

Copy link
Copy Markdown
Contributor Author

If you want, please go ahead and create a PR, I will happily approve.

But, how will that make a difference when the patch version is already out after removal.

@joshualip-plaudit

joshualip-plaudit commented May 9, 2026

Copy link
Copy Markdown
Contributor

@manzoorwanijk My goal is problem count reduction.

  1. Undo this PR completely (but keep a backup - the problem isn't removing the types - the problem is that they were removed without a major version bump)
  2. Publish a new version that's just undoing this PR (that's the 15.12.x one)
    • This will make it so that references to the 15.x line will still get the types
  3. Redo this PR, but apply a major version bump to @types/wordpress__blocks and @types/wordpress__block-editor
    • This will technically desync the version from the one in the WordPress repo, but the versions have been out of sync more often than they've been in sync in the past few years, so I'm not exactly worried on that front
  4. Now we only have one set of busted packages with breaking changes published that didn't bump the major version instead of two

Ideally this would have been stopped at the @wordpress/blocks phase of the process, but that ship has long since sailed, so I'll settle for only having to wrangle one set of packages instead of two. For context, after I finally got all of the issues that this has caused in our build process settled, I got a message from a coworker showing that a project using our legacy build pipeline broke because of the typedef package versioning. So, while I realize that it's not a perfect solution, I will settle for having 1 less headache on my plate and not having to figure out an automated update process for every project using the legacy build pipeline.

I'm also going to be looking into getting some sort of partial NPM mirror set up the moment that I have the time because I am NOT going through this again if I can help it, and it seems like every tool short of just deleting packages from what my computer can see of NPM fails the moment that somebody stops following semver.

Also, I'm less concerned about the types coming back breaking things because any codebase that has been updated to use the new types from @wordpress/blocks will have had the @types/wordpress__blocks package removed, and, therefore, won't be affected by changes to this package anymore.

@joshualip-plaudit

Copy link
Copy Markdown
Contributor

Update: I've been informed that this is, "not a useful thing to be spending time on". Instead, we're going ahead with hardening our internal build tools against similar issues in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Edits Infrastructure Edits multiple packages Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants