fix: strip trailing .0 in formatCompactCurrency for cross-environment consistency - #671
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…environment output Fixes CI test failure where Intl.NumberFormat produced "$150.0K" instead of "$150K" in certain Node.js/ICU versions. The regex strips trailing ".0" before compact suffixes (K/M/B/T) while preserving meaningful decimals like "$1.5M". Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CI errors in test and build process
fix: strip trailing .0 in formatCompactCurrency for cross-environment consistency
Feb 21, 2026
hotlong
marked this pull request as ready for review
February 21, 2026 03:43
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a cross-environment consistency issue in currency formatting where different Node.js/ICU versions produce inconsistent compact currency notation output (e.g., $150.0K vs $150K), causing mobile-card-view tests to fail in CI.
Changes:
- Added regex post-processing to strip trailing
.0before compact suffixes (K/M/B/T) while preserving meaningful decimals like$1.5M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intl.NumberFormatwithnotation: 'compact'produces$150.0Kinstead of$150Kin certain Node.js/ICU versions, causingmobile-card-view.test.tsxto fail in CI..0before compact suffixes (K/M/B/T) via regex post-processing, preserving meaningful decimals like$1.5MOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.