Skip to content

fix: pin @wp-playground/blueprints to exact version#3260

Open
wojtekn wants to merge 3 commits intotrunkfrom
fix-pin-blueprints-exact-version
Open

fix: pin @wp-playground/blueprints to exact version#3260
wojtekn wants to merge 3 commits intotrunkfrom
fix-pin-blueprints-exact-version

Conversation

@wojtekn
Copy link
Copy Markdown
Contributor

@wojtekn wojtekn commented Apr 27, 2026

Related issues

Follow-up to #3254.

How AI was used in this PR

Fix identified by Claude while investigating a 455 MB app size regression shown in CodeVitals on trunk.

Proposed Changes

Pins @wp-playground/blueprints to an exact version in all package.json files, consistent with how all other Playground/PHP-WASM packages are already pinned.

Root cause of the regression: ^3.1.20 on blueprints meant that when 3.1.21 published to npm, install:bundle (which runs npm install --no-workspaces inside apps/cli) resolved blueprints to 3.1.21. That version of blueprints depends on @php-wasm/node@3.1.21, but apps/cli/package.json pinned @php-wasm/node@3.1.20 — so npm installed both versions, with the 3.1.21 copies nested under blueprints/node_modules/. The prune-php-wasm vite plugin only globs top-level @php-wasm/node-*/asyncify/ paths, so the nested copies (8 PHP versions × ~58 MB each) were never pruned, adding ~466 MB to the app bundle.

Testing Instructions

  • CodeVitals app-size should stay at ~1450 MB, not jump to ~1907 MB after the next Playground release

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn requested a review from a team April 27, 2026 16:03
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Apr 27, 2026

📊 Performance Test Results

Comparing 1328611 vs trunk

app-size

Metric trunk 1328611 Diff Change
App Size (Mac) 1453.91 MB 1453.91 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 1328611 Diff Change
load 1776 ms 1781 ms +5 ms ⚪ 0.0%

site-startup

Metric trunk 1328611 Diff Change
siteCreation 8084 ms 8093 ms +9 ms ⚪ 0.0%
siteStartup 4937 ms 4947 ms +10 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

Copy link
Copy Markdown
Contributor

@fredrikekelund fredrikekelund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 I took the liberty of updating the lockfile

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.

3 participants