Stop runtime update checks for WP-CLI and sqlite-command#3086
Conversation
📊 Performance Test ResultsComparing ccc681e 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) |
fredrikekelund
left a comment
There was a problem hiding this comment.
Nice and simple change 👍 I haven't tested, but I trust the E2E tests to show that the fundamentals still work as expected.
|
We could maybe fold STU-1455 into this PR… I don't think that's a must-have, given that we only check for updates to a single dependency now, but it's also a really simple change and does improve bottom-line efficiency. |
Since is already done and approved let's ship it. I'll follow-up with the change for STU-1455 so we release them together in the next Studio version. |
Related issues
How AI was used in this PR
AI-assisted implementation: code changes were reviewed and validated by the author.
Proposed Changes
updateServerFiles()wp-cli.tsandsqlite-command.tsdependency management modulesfetchLatestGithubRelease()utility and its zod schema fromutils.tsupdateServerFiles()as it remains neededThese dependencies (WP-CLI, sqlite-database-integration, wp-cli-sqlite-command) are tightly coupled — if one assumes a specific version of another, runtime updates risk breaking the app. They are now shipped as fixed, bundled versions only (via
setupServerFiles()).Testing Instructions
npm run typecheck— should pass with no errorsnpm test -- apps/cli/commands/site/tests/create.test.ts— all 46 tests should passnpm run cli:build && node apps/cli/dist/cli/main.mjs site create ~/Studio/test-site) — should still check for WordPress updates but no longer check for WP-CLI or sqlite-command updatesPre-merge Checklist