Bump Playground to 3.1.45 - #4230
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Studio’s embedded WordPress Playground/PHP-WASM runtime to v3.1.45 to pick up the upstream fix where runCLI() throws instead of calling process.exit(1), allowing Studio’s existing error-handling paths to receive and surface startup failures.
Changes:
- Bump
@wp-playground/*and@php-wasm/*dependencies to 3.1.45 across the monorepo packages that depend on Playground. - Regenerate
package-lock.jsonto reflect the new resolved dependency graph (including new transitive deps likezstddec). - Remove now-obsolete inline commentary about the previous
runCLI()process.exit()behavior in the Playground child process codepath.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/benchmark-site-editor/package.json | Bumps @wp-playground/cli to 3.1.45 for the benchmark tool. |
| packages/common/package.json | Bumps @wp-playground/blueprints to 3.1.45 in shared package deps. |
| apps/ui/package.json | Bumps @wp-playground/blueprints to 3.1.45 for the UI app. |
| apps/studio/package.json | Bumps @wp-playground/blueprints to 3.1.45 for the desktop app. |
| apps/cli/package.json | Bumps CLI’s pinned Playground and PHP-WASM runtime deps to 3.1.45. |
| apps/cli/playground-server-child.ts | Removes stale comment now that the upstream behavior has changed in 3.1.45. |
| package-lock.json | Updates lockfile to resolve the 3.1.45 dependency set (and associated dedupes/new transitive deps). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ase is locked" on Playground 3.1.45
…ayground-fix # Conflicts: # packages/data-liberation-agent/dist/mcp-server.bundle.mjs # packages/data-liberation-agent/dist/scripts/_validate.mjs # packages/data-liberation-agent/dist/scripts/carry-reconstruct-drive.mjs # packages/data-liberation-agent/dist/scripts/chunk-3QFGXLW4.mjs # packages/data-liberation-agent/dist/scripts/chunk-5ISMP4W6.mjs # packages/data-liberation-agent/dist/scripts/chunk-J2WXJEI3.mjs # packages/data-liberation-agent/dist/scripts/chunk-PXH76XU4.mjs
📊 Performance Test ResultsComparing 8949b1b vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
… journal mode Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ayground-fix # Conflicts: # packages/data-liberation-agent/dist/mcp-server.bundle.mjs
sejas
left a comment
There was a problem hiding this comment.
@gcsecsey , thanks fixing the issue in Playground repo WordPress/wordpress-playground#3478 and bringing the change to WordPress Studio ✨.
It seems we execute resetSqliteJournalModeToRollback for imports but not for Pulls, is that intentional? Maybe we could move the logic to the base importer.
I also noticed in your description you are tagging the PR 3478 of this repo, instead of the Playground repo.
…ayground-fix # Conflicts: # packages/data-liberation-agent/dist/mcp-server.bundle.mjs
|
Thanks @sejas for reviewing this!
No, this wasn't intentional, I addressed this in the recent commits.
Good catch, thanks, I updated the description. Could you take another look? Thanks! |
sejas
left a comment
There was a problem hiding this comment.
Thanks for the changes! Code LGTM and I tested pulling a site 👌.
…ayground-fix # Conflicts: # apps/cli/package.json # apps/studio/package.json # package-lock.json
Related issues
How AI was used in this PR
I used Claude to trace STU-1370 to the upstream
runCLI()process.exit()behavior, confirm the fix shipped in Playground 3.1.45, bump the dependencies, and regenerate the lockfile. I reviewed the diff and verified single-copy resolution of the Playground and PHP-WASM packages myself. Claude also diagnosed and fixed the Windows-only CLI E2E failure the bump surfaced (see below), reproducing it locally on Windows.Proposed Changes
Studio runs each site's Playground server in a child process that imports
runCLI()from@wp-playground/cli. When a site hit a PHP error during startup,runCLI()calledprocess.exit(1)before the error could propagate, which killed the child process, so Studio's error handling never ran and the real error was lost.The upstream fix (WordPress/wordpress-playground#3478, in 3.1.45) removes
process.exit()from the Playground CLI's library APIs, sorunCLI()now throws instead of exiting.This PR:
fast-xml-parser(a nested duplicate collapsed into a single top-level copy, within existing ranges) and addedzstddec, a new dependency of@wp-playground/wordpress@3.1.45.Error connecting to the SQLite database.wp sqlite importleaves the imported database in WAL journal mode, and 3.1.45 boots the site through the WASM SQLite driver, which cannot reopen a WAL-mode database on Windows (WAL needs shared memory the WASM filesystem can't provide there). After importing, Studio now converts the database back to rollback (DELETE) journal mode — using Node's nativenode:sqlite, since PHP-WASM itself can't touch the WAL database — so Playground can reliably reopen it.Testing Instructions
Because 3.1.45 is still inside the npm cooldown window, install locally with the cooldown bypassed. A plain
npm installworks from 2026-07-18 onward.npm install --min-release-age=0@wp-playground/*/@php-wasm/*package, with no nested duplicatesnpm run typecheckpassesnpm run cli:build && node apps/cli/dist/cli/main.mjs --versionbuilds and runsnpm run cli:buildthennpm test -- apps/cli/commands/tests/import.e2e.test.ts --tagsFilter='e2e' --no-file-parallelism -t 'imports a backup into a running site'Pre-merge Checklist