Skip to content

Rename JSON keys to camelCase in site status output#2552

Merged
bcotrim merged 1 commit intotrunkfrom
stu-1271-rename-json-keys-site-status
Feb 9, 2026
Merged

Rename JSON keys to camelCase in site status output#2552
bcotrim merged 1 commit intotrunkfrom
stu-1271-rename-json-keys-site-status

Conversation

@bcotrim
Copy link
Copy Markdown
Contributor

@bcotrim bcotrim commented Feb 6, 2026

Related issues

Proposed Changes

  • Add toCamelCase helper function to cli/lib/utils.ts for converting space and hyphen-separated strings to camelCase
  • Apply the conversion to JSON output in site status --format=json (e.g., "Site URL""siteUrl", "Auto-login URL""autoLoginUrl")
  • Table format remains unchanged with human-readable keys
  • Update test expectations to validate camelCase JSON keys

Testing Instructions

  1. Run unit tests: npm test -- cli/lib/tests/utils.test.ts cli/commands/site/tests/status.test.ts
  2. Build CLI: npm run cli:build
  3. Test JSON output: node dist/cli/main.js site status --format=json (keys should be camelCase)
  4. Verify table format: node dist/cli/main.js site status --format=table (keys should remain human-readable)
  5. Cross-platform testing completed on macOS and Windows ARM64

Pre-merge Checklist

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

@bcotrim bcotrim self-assigned this Feb 6, 2026
@bcotrim bcotrim requested a review from a team February 6, 2026 19:20
@bcotrim bcotrim force-pushed the stu-1271-rename-json-keys-site-status branch from c9438c5 to 6257b01 Compare February 6, 2026 19:21
@bcotrim bcotrim force-pushed the stu-1271-rename-json-keys-site-status branch from 6257b01 to 6e1676e Compare February 6, 2026 19:31
@wpmobilebot
Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 6e1676e vs trunk

site-editor

Metric trunk 6e1676e Diff Change
load 2777.00 ms 2784.00 ms +7.00 ms 🔴 0.3%

site-startup

Metric trunk 6e1676e Diff Change
siteCreation 7075.00 ms 7083.00 ms +8.00 ms 🔴 0.1%
siteStartup 3922.00 ms 3919.00 ms -3.00 ms 🟢 -0.1%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Copy link
Copy Markdown
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

Changes LGTM and on macOS work well, but on Windows I get an error that "Selected folder is not added to Studio". Could you please double-check that --path property works well on Windows? Probably it's not related to this PR, but still.

Image

Copy link
Copy Markdown
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

Regarding code and macOS - LOGTM and works well 👍
Screenshot 2026-02-09 at 09 58 25
Screenshot 2026-02-09 at 09 58 39

@bcotrim bcotrim merged commit a8a7da8 into trunk Feb 9, 2026
9 checks passed
@bcotrim bcotrim deleted the stu-1271-rename-json-keys-site-status branch February 9, 2026 12:10
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