Skip to content

fix: bump bundled Gutenberg packages, widen proof-tooling peer ranges - #116

Merged
noeltock merged 1 commit into
mainfrom
fix/bump-wordpress-blocks-16
Sep 22, 2026
Merged

noeltock merged 1 commit into
mainfrom
fix/bump-wordpress-blocks-16

Conversation

@mattheu

@mattheu mattheu commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

Someone installing block-runner into a project that already uses current versions of its dependencies gets blocked.

block-runner pins exact versions for six dependencies that are actually optional (only needed for its proof command). A project already on a newer, compatible version of one of these — a normal situation for an actively maintained project — hits a hard npm install failure, with no way past it except --force or --legacy-peer-deps.

Fix: loosen those six to version ranges, so npm can resolve them normally.

Also included

block-runner's bundled @wordpress/blocks is out of date, which can crash author() on a project running current WordPress. Bumped it, and the two related packages that need to move with it, to current versions.

Test plan

  • npm run typecheck, npm test (706 passed), npm run build — all clean
  • Fresh npm install block-runner into a project already on newer versions of the six loosened dependencies — succeeds, no flags needed
  • Packed and installed the built package into a project on current @wordpress/blocks — no duplicate copy, author() succeeds

@wordpress/blocks (15.27.0 -> 16.0.0), @wordpress/block-editor (17.0.0 ->
17.1.0) and @wordpress/block-library (10.5.0 -> 11.0.0) were pinned well
behind current WordPress. A consumer with a newer @wordpress/blocks at
its own top level (the common case for any actively-maintained WP
project) got two separate module instances - block-runner's own bundled
copy, and the consumer's - which is what surfaced as an internal
"Cannot read properties of undefined (reading 'align')" crash in
author(). Supersedes #115, which fixed the same symptom by making
block-runner's own resolution internally consistent regardless of the
consumer's version. That fix genuinely generalises further (works for
any future version mismatch too), but the team decided it wasn't worth
the added internal complexity versus simply tracking a current
WordPress version - understanding that a future consumer-side major
bump could reintroduce the same failure mode until this bundled version
next moves too. Verified against a real consumer project with a
matching @wordpress/blocks@^16.0.0/@wordpress/block-editor@^17.1.0 setup:
full npm dedupe (no nested copy at all), and the exact documented
author() reproduction now succeeds.

Also widens the six optional proof-tooling peerDependencies
(@playwright/test, @wordpress/e2e-test-utils-playwright,
@wordpress/env, axe-core, pixelmatch, pngjs) from exact pins to caret
ranges. These are unrelated to the crash above but were exact-pinned
peer dependencies, which forces npm 7+ to hard-fail with ERESOLVE for
any consumer that already has a newer compatible version for its own
purposes (e.g. a WordPress project's own e2e test setup) - the only
ways around it were --force or --legacy-peer-deps, the latter of which
silently disables peer-conflict checking for the entire install, not
just these packages. Internal proof-tooling version bookkeeping
(scripts/package-boundary-check.mjs, src/proof/runner.ts) now reads the
exact pin from devDependencies instead, since peerDependencies no
longer carries one.
@mattheu mattheu closed this Sep 21, 2026
@mattheu mattheu reopened this Sep 21, 2026
@mattheu
mattheu marked this pull request as ready for review September 21, 2026 19:40
@noeltock
noeltock merged commit b368b69 into main Sep 22, 2026
18 checks passed
@noeltock
noeltock deleted the fix/bump-wordpress-blocks-16 branch September 22, 2026 07:23
@noeltock

Copy link
Copy Markdown
Member

Thanks Matt, appreciate you tracking this down and checking it against a real project. Getting stuck at npm install is a pretty poor first impression. Merged!

@mattheu

mattheu commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

Thanks Matt, appreciate you tracking this down and checking it against a real project. Getting stuck at npm install is a pretty poor first impression. Merged!

This is always tough to stay aligned... and staying up to date can break older versions. Probably as the project matures, can just stay aligned with the version that matches your major WP version or something.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants