Skip to content

Proof of concept: Move GB into WordPress 5.3 - #13803

Draft
aaronjorbin wants to merge 6 commits into
WordPress:5.3from
aaronjorbin:poc/mv-gb-to-wpdevelop
Draft

aaronjorbin wants to merge 6 commits into
WordPress:5.3from
aaronjorbin:poc/mv-gb-to-wpdevelop

Conversation

@aaronjorbin

Copy link
Copy Markdown
Member

Proof of concept for testing purposes.

aaronjorbin and others added 6 commits September 28, 2026 12:13
node-sass 4.12.0 has no prebuilt binary for Node 14, which the 5.3 branch
of wordpress-develop requires. 4.14.1 bundles the same libsass (3.5.5), so
the compiled package stylesheets are byte-identical to the published ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a `build:gutenberg` Grunt task, run at the start of `build:js`, which
compiles the packages in `gb-src/packages` (build, build-module and
build-style) using Gutenberg's own build script and locked toolchain.

The toolchain is installed into `gb-src/node_modules` by a new root
`postinstall` script. Install scripts are skipped there except for
node-sass, which needs its native binding.

The webpack packages config no longer resolves symlinks so that once the
`@wordpress/*` dependencies are linked from gb-src, module paths (and so
the hashed module IDs) stay the same as when installed from npm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switches every `@wordpress/*` dependency, including the build tooling
packages and those pulled in transitively, from npm registry versions to
`file:gb-src/packages/*` references.

The lock file was rewritten to turn only the `@wordpress/*` entries into
links, so every third-party dependency keeps its previously locked
version. All versions in gb-src match what was locked before, and the
production build output is byte-identical to the npm-based build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ries.

The lock still carried nested `@wordpress/element` entries under
`@wordpress/compose`, `@wordpress/data`, `@wordpress/plugins` and
`@wordpress/babel-preset-default`, left over from the registry-based tree.
Now that they are all links to the same gb-src package they are redundant,
and npm 6 failed `npm install` on an existing tree while trying to move
them into `gb-src/packages/element/node_modules` (ENOENT on rename).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The package build script only counted completed files once the glob stream had ended. Files processed by workers before the stream emitted `end` were never counted, so the completed count could never reach the total, the worker farm was never ended, and the process hung indefinitely. This surfaced as the Windows "Core running from src" job timing out.

Always count completed files, and check whether the worker farm can be ended both when a file completes and when the stream ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

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.

1 participant