fix(data): update country currencies to current ISO 4217 - #167
Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCurrency codes for four countries are updated in Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates country→currency assignments and currency metadata to align with current ISO 4217, while keeping withdrawn legacy codes available for lookups via the full currencies table.
Changes:
- Update country currency codes:
CW/SXANG→XCG,SLSLL→SLE, and removeUSSfromUS. - Make the currency generator explicitly define withdrawn legacy currencies (name/symbol/numeric/decimals/withdrawn) rather than attempting CLDR derivation.
- Regenerate published artifacts (TS data, dist JS/JSON/SQL/CSV) including improved
symbolNativeforSLEandXCG.
Reviewed changes
Copilot reviewed 3 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/scripts/generateCurrencies.ts | Refactors generation to merge active ISO codes with fully-specified withdrawn legacy codes for stable re-runs. |
| packages/countries/src/data/currencies.ts | Updates symbolNative for SLE and XCG in the source currency table. |
| packages/countries/src/data/countries.ts | Updates affected countries’ currency arrays to the current ISO 4217 codes. |
| dist/mjs/currencies.js | Regenerated ESM currency bundle reflecting new symbols/withdrawn handling. |
| dist/cjs/currencies.js | Regenerated CJS currency bundle reflecting new symbols/withdrawn handling. |
| dist/data.sql | Updates currency/country rows to match the revised codes and symbols. |
| dist/currencies.min.json | Regenerates in-use currency subset to include XCG/SLE and exclude withdrawn codes. |
| dist/currencies.all.min.json | Regenerates full currency dataset retaining withdrawn codes with withdrawn: true. |
| dist/countries.min.json | Regenerates minified country dataset with updated currency codes. |
| dist/countries.csv | Regenerates CSV export with updated currency codes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b99c754 to
361d4bb
Compare
eab0c08 to
aeec6f2
Compare
361d4bb to
e3b8161
Compare
12139de to
96a4d29
Compare
e3b8161 to
60c7778
Compare
96a4d29 to
167fa53
Compare
60c7778 to
4393594
Compare
167fa53 to
49e3679
Compare
4393594 to
3910059
Compare
3910059 to
391f057
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/countries/src/data/currencies.ts`:
- Around line 1345-1347: Remove the period from the symbol field in the
Caribbean Guilder (Caribische gulden) currency definition. Change the symbol
from 'Cg.' to 'Cg' to match the official abbreviation. The native name
'Caribische gulden' and symbolNative 'Cg' are already correct and require no
changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c6838bbf-dc36-4616-9a71-f86f1b3dbff2
📒 Files selected for processing (2)
packages/countries/src/data/countries.tspackages/countries/src/data/currencies.ts
Replace currency codes withdrawn from ISO 4217 with their active successors, and drop a removed fund code: - CW, SX: ANG -> XCG (Caribbean Guilder, in circulation since 2025) - SL: SLL -> SLE (2022 redenomination) - US: drop USS (US Dollar Same-day, removed from ISO 4217) ANG, SLL and USS stay in the currencies table flagged `withdrawn` for legacy lookups; the generator specifies their display data directly since they no longer map to a country. Potentially breaking: getCountryData() currency values change for CW, SX, SL and US.
391f057 to
1ec4ea7
Compare
Stacked on #166 (currencies feature) — base retargets to
mainonce #166 merges.Summary
Brings country currency assignments up to date with current ISO 4217. The audit in #166 found exactly 3 codes in
countries.tswithdrawn from ISO 4217; this updates them to their active successors:CW), Sint Maarten (SX)ANGXCGSL)SLLSLEUS)USD, USN, USSUSD, USNUSS(Dollar Same-day) removed from ISO 4217This PR only touches
countries.tsand the regeneratedcurrencies.ts— the generator and the withdrawn-code handling live in #166.countries/getCountryData()currency values change for CW, SX, SL, US. Consumers hardcodingANG/SLL/USSfor these countries will see the new codes — suggest a minor or major bump with this called out.Currencies table (regenerated)
ANG,SLL,USSstay in the full table flaggedwithdrawn: true(defined directly in the generator, in feat(currencies): add ISO 4217 currency support (opt-in) #166), so legacy lookups still resolve andgetCurrencyByNumeric('532')still returns the activeXCG.currencies.min.json) now includesXCG/SLEand excludes the withdrawn codes (159 vs 160).XCG/SLEpick up home-locale data now that a country references them —XCGnameCaribische gulden,symbol/symbolNativeCg;SLEnative symbolLe. (XCGsymbol is corrected to the officialCgvia a small generator override — CLDR returnsCg.for the new code.)bun run cipasses; theevery country currency exists in the currencies tableintegrity test validates the updated data.