Skip to content

Replace ora with picospinner#3035

Merged
bcotrim merged 2 commits intotrunkfrom
replace-ora-with-picospinner
Apr 14, 2026
Merged

Replace ora with picospinner#3035
bcotrim merged 2 commits intotrunkfrom
replace-ora-with-picospinner

Conversation

@bcotrim
Copy link
Copy Markdown
Contributor

@bcotrim bcotrim commented Apr 9, 2026

Related issues

How AI was used in this PR

AI assisted with identifying the API differences between ora and picospinner and performing the migration across all affected files. All changes were reviewed and tested.

Proposed Changes

  • Replace ora (8 dependencies) with picospinner (zero dependencies) for CLI spinners
  • Update Logger class in apps/cli/logger.ts to use picospinner's Spinner API: new Spinner(), .setText(), .running, .refresh(), .stop()
  • Update test mocks in both apps/cli/vitest.setup.ts and apps/studio/vitest.setup.ts

Testing Instructions

  • Build the CLI: npm run cli:build
  • Run node apps/cli/dist/cli/main.mjs site start <site-folder> and confirm the spinner animates and shows success/failure symbols correctly
  • Run node apps/cli/dist/cli/main.mjs site stop <site-folder> and confirm spinner stops cleanly
  • If you have a WordPress.com account, test site pull and site push to verify progress percentage updates render in-place
  • Run npm test to confirm all 141 test files pass

Pre-merge Checklist

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

@bcotrim bcotrim self-assigned this Apr 9, 2026
@bcotrim bcotrim requested a review from a team April 9, 2026 17:20
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Apr 9, 2026

📊 Performance Test Results

Comparing a9f88e4 vs trunk

app-size

Metric trunk a9f88e4 Diff Change
App Size (Mac) 1286.33 MB 1286.16 MB 0.17 MB ⚪ 0.0%

site-editor

Metric trunk a9f88e4 Diff Change
load 1937 ms 1875 ms 62 ms 🟢 -3.2%

site-startup

Metric trunk a9f88e4 Diff Change
siteCreation 9127 ms 9148 ms +21 ms ⚪ 0.0%
siteStartup 4951 ms 4953 ms +2 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@katinthehatsite
Copy link
Copy Markdown
Contributor

Some tests were failing so I retriggered them while I am reviewing the PR

Copy link
Copy Markdown
Contributor

@katinthehatsite katinthehatsite left a comment

Choose a reason for hiding this comment

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

The changes are straightforward and look good to me, I am not seeing any improvements to suggest.

Out of curiosity, what makes this switch beneficial?

@bcotrim
Copy link
Copy Markdown
Contributor Author

bcotrim commented Apr 14, 2026

The changes are straightforward and look good to me, I am not seeing any improvements to suggest.

Out of curiosity, what makes this switch beneficial?

From the original issue:

ora ships with 8 dependencies. picospinner seems to provide all the functionality we use in the ora package, but with zero dependencies. We should look into switching – it should be relatively simple.
Considering the total amount of code we ship, this is a negligible win in terms of file size, but it's a potential easy win in terms of supply chain security.

@bcotrim bcotrim merged commit e3c99cf into trunk Apr 14, 2026
11 checks passed
@bcotrim bcotrim deleted the replace-ora-with-picospinner branch April 14, 2026 09:50
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