Update Spectre.Console to 0.55.2 and simplify EmojiWidth#16349
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16349Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16349" |
There was a problem hiding this comment.
Pull request overview
This PR updates the repo’s Spectre.Console dependency to 0.55.2 and removes now-unnecessary custom emoji-width logic, relying on Spectre’s built-in measurement fixes.
Changes:
- Bump
Spectre.Consolefrom0.55.0to0.55.2. - Simplify
EmojiWidth.GetCellWidthby delegating directly to Spectre measurement (removing the Unicode lookup/rune logic). - Update emoji width tests to enumerate
KnownEmojisvia reflection, automatically covering newly-added emojis.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/Utils/EmojiWidthTests.cs | Switches test data source to reflect over KnownEmojis and validates measured widths for all known emoji names. |
| src/Aspire.Cli/Utils/EmojiWidth.cs | Removes the manual Emoji_Presentation workaround and uses Spectre.Console’s measurement directly. |
| Directory.Packages.props | Updates the central package version for Spectre.Console to 0.55.2. |
|
🎬 CLI E2E Test Recordings — 72 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #24698653461 |
|
No documentation update is required for this PR. This change is a dependency version bump (Spectre.Console 0.55.0 → 0.55.2) combined with an internal simplification of
|
Description
Update Spectre.Console from 0.55.0 to 0.55.2.
Spectre.Console 0.55.2 includes fixes for emoji width measurement, so the manual
HasDefaultEmojiPresentationworkaround inEmojiWidth.csis no longer needed. This PR:Spectre.Consoleto 0.55.2 inDirectory.Packages.propsEmojiWidth.csby removing theHasDefaultEmojiPresentationlookup table and rune-checking logic, delegating directly to Spectre's measurementEmojiWidthTests.csto use reflection overKnownEmojisinstead of hardcoded[InlineData]entries, so new emojis are automatically coveredChecklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: