Bump Playground to 3.1.45#4230
Open
gcsecsey wants to merge 8 commits into
Open
Conversation
2 tasks
Contributor
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
Collaborator
📊 Performance Test ResultsComparing 2bf6311 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>
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.
Related issues
Important
Do not merge before 2026-07-18 04:13 UTC. This PR pins the Playground and PHP-WASM packages to 3.1.45, published to npm on 2026-07-16 04:12 UTC. The repo's
.npmrcenforcesmin-release-age=2(a 48 hour supply-chain cooldown), so CI's npm install will refuse to resolve 3.1.45 until it is at least two days old. Merging earlier will break CI with an ETARGET "No matching version" error.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 (#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