fix: bump bundled Gutenberg packages, widen proof-tooling peer ranges - #116
Merged
Merged
Conversation
@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.
Member
|
Thanks Matt, appreciate you tracking this down and checking it against a real project. Getting stuck at |
Member
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
proofcommand). A project already on a newer, compatible version of one of these — a normal situation for an actively maintained project — hits a hardnpm installfailure, with no way past it except--forceor--legacy-peer-deps.Fix: loosen those six to version ranges, so npm can resolve them normally.
Also included
block-runner's bundled
@wordpress/blocksis out of date, which can crashauthor()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 cleannpm install block-runnerinto a project already on newer versions of the six loosened dependencies — succeeds, no flags needed@wordpress/blocks— no duplicate copy,author()succeeds