@visulima/iso-locale 1.0.0-alpha.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,128 @@
1
+ ## @visulima/iso-locale 1.0.0 (2026-07-03)
2
+
3
+ ### Features
4
+
5
+ * add new exports for countries, currencies, regions, timezones, and types in iso-locale package ([acb2104](https://github.com/visulima/visulima/commit/acb210457cd57160cadd49b84a22c1098ada70eb))
6
+ * create new iso-locale package ([#584](https://github.com/visulima/visulima/issues/584)) ([3436f36](https://github.com/visulima/visulima/commit/3436f36aa96636c08f74df1a4eed28a6a29881fb))
7
+ * **iso-locale:** add typed codes, unified lookups and i18n names ([5c09bb6](https://github.com/visulima/visulima/commit/5c09bb61823c7997f034091f1cbeddc838d305a3))
8
+ * update imports and add new data files for countries, currencies, regions, and timezones in iso-locale package ([639dd6e](https://github.com/visulima/visulima/commit/639dd6ee41ac89a21539f8eac17f1db298bce5ee))
9
+ * **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
10
+
11
+ ### Bug Fixes
12
+
13
+ * added missing og image ([7712247](https://github.com/visulima/visulima/commit/771224739f29e977d5684849dcf015486c75ff00))
14
+ * **data-manipulation:** resolve eslint and type-safety issues ([f1682c2](https://github.com/visulima/visulima/commit/f1682c2611cbcc6c85d4bbea520d43464b42e7ee))
15
+ * **iso-locale:** 2 bug fixes + 1 perf ([5a75216](https://github.com/visulima/visulima/commit/5a752163531e8bd458dffa264e05466e33f9d444))
16
+ * **iso-locale:** cast readonly Country array to mutable type for public export ([b93bc50](https://github.com/visulima/visulima/commit/b93bc5064e123c541140b1ab072c280989087afc))
17
+ * **iso-locale:** resolve eslint errors ([8f24691](https://github.com/visulima/visulima/commit/8f246919ecf1c5d08a3f85a019d8857bcbf31c4f))
18
+ * **iso-locale:** update packem to 2.0.0-alpha.54 ([17ce847](https://github.com/visulima/visulima/commit/17ce8479d65e21f26da08674cedadfd69bf8fbeb))
19
+ * Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
20
+ * **security:** address codeql findings across packages ([3366f9c](https://github.com/visulima/visulima/commit/3366f9c07d54bdde5242fbd90780baa4634de179))
21
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
22
+ * **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
23
+
24
+ ### Documentation
25
+
26
+ * **humanizer,html,iso-locale,package,tsconfig:** add comprehensive Fumadocs documentation ([19781ce](https://github.com/visulima/visulima/commit/19781ce5d27605971a9f2fdf0a99863effd98091))
27
+ * prettier-format agent instructions ([71b6414](https://github.com/visulima/visulima/commit/71b6414528780ac82c4e0bb25b5f4f11faba5549))
28
+
29
+ ### Miscellaneous Chores
30
+
31
+ * add fallow code-intelligence across all packages ([a3b4821](https://github.com/visulima/visulima/commit/a3b48215002e86fed20f2973038b5d4a0aa1ce04))
32
+ * apply eslint + prettier autofixes across packages ([c1bb784](https://github.com/visulima/visulima/commit/c1bb7848a0d93d0dfe2960c77e3cda22239c79a0))
33
+ * apply linting and formatting fixes across packages ([5d150a5](https://github.com/visulima/visulima/commit/5d150a578f9ce861c791843c683deeb849b774a9))
34
+ * bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
35
+ * **ci-stability:** green CI across vis, native, lint, tests, attw ([#651](https://github.com/visulima/visulima/issues/651)) ([d4eb684](https://github.com/visulima/visulima/commit/d4eb684b5f75c818c9251048c605a0ed54a268e3))
36
+ * **data-manipulation:** remove empty dependency objects from package.json ([c0e8f76](https://github.com/visulima/visulima/commit/c0e8f7689a2da413f771494f6ecb07babc4b5e06))
37
+ * **data-manipulation:** update dependencies ([49458ab](https://github.com/visulima/visulima/commit/49458ab8f8e17d875840b1b4fe8b5efe12ff3513))
38
+ * fixed changelog ([6ebdc5b](https://github.com/visulima/visulima/commit/6ebdc5b56e94054f4ac88d2bc2235a2c14d3d608))
39
+ * fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
40
+ * **iso-locale:** add tsconfig.eslint.json for type-aware linting ([0322596](https://github.com/visulima/visulima/commit/0322596031774fef5e1bbbce188de31d2033824b))
41
+ * **iso-locale:** apply prettier formatting ([420b06e](https://github.com/visulima/visulima/commit/420b06e28f37beea0679b16f2ada733518e2cffe))
42
+ * **iso-locale:** housekeeping cleanup ([326d3e4](https://github.com/visulima/visulima/commit/326d3e4be152fdcb828da32a67341fae0c274709))
43
+ * **iso-locale:** migrate .prettierrc.cjs to prettier.config.js ([ecc98a0](https://github.com/visulima/visulima/commit/ecc98a0b65de3b5c97cc5b12bd55732e193b2dc9))
44
+ * **iso-locale:** migrate deps to pnpm catalogs ([77a0af9](https://github.com/visulima/visulima/commit/77a0af94f3ee1c405cfca1df1db16af6c6b288ea))
45
+ * **iso-locale:** update dependencies ([171ce31](https://github.com/visulima/visulima/commit/171ce31272306c952d35018dea8ec4072f11cd52))
46
+ * **iso-locale:** update dependencies ([78c7b5e](https://github.com/visulima/visulima/commit/78c7b5e3528c2ec4a32cab44449c5840664fa94d))
47
+ * **iso-locale:** upgrade packem to 2.0.0-alpha.76 ([9908d9c](https://github.com/visulima/visulima/commit/9908d9c57641ade481016ea711981e03d53c746c))
48
+ * re-sort workspace package.json files via vis sort-package-json ([f625696](https://github.com/visulima/visulima/commit/f625696cfac974325774b3243e1a83c3d23acbd7))
49
+ * **release:** @visulima/iso-locale@1.0.0-alpha.1 [skip ci]\n\n## @visulima/iso-locale 1.0.0-alpha.1 (2026-01-17) ([3f7b49a](https://github.com/visulima/visulima/commit/3f7b49adf1a3bb5f44d8a22023b47427b9de844a))
50
+ * **release:** @visulima/iso-locale@1.0.0-alpha.10 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.9...@visulima/iso-locale@1.0.0-alpha.10) (2026-05-27) ([6d97146](https://github.com/visulima/visulima/commit/6d971460b699e1df2c68beea20e1a56ea49e3c82))
51
+ * **release:** @visulima/iso-locale@1.0.0-alpha.11 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.10...@visulima/iso-locale@1.0.0-alpha.11) (2026-06-04) ([8a03313](https://github.com/visulima/visulima/commit/8a03313cac594fae7d843dd7f3abb8c58ae549c9))
52
+ * **release:** @visulima/iso-locale@1.0.0-alpha.12 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.11...@visulima/iso-locale@1.0.0-alpha.12) (2026-06-13) ([0f1b344](https://github.com/visulima/visulima/commit/0f1b344010761c3066f621e658fdf8845ed417c1))
53
+ * **release:** @visulima/iso-locale@1.0.0-alpha.2 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.2](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.1...@visulima/iso-locale@1.0.0-alpha.2) (2026-01-17) ([f2797cb](https://github.com/visulima/visulima/commit/f2797cb81a08f00d0fc93184c9dfce5eaa5785fe))
54
+ * **release:** @visulima/iso-locale@1.0.0-alpha.3 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.3](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.2...@visulima/iso-locale@1.0.0-alpha.3) (2026-03-06) ([b75f385](https://github.com/visulima/visulima/commit/b75f385895dd3e7c795700463e3fdfbd0b4b4da2))
55
+ * **release:** @visulima/iso-locale@1.0.0-alpha.4 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.4](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.3...@visulima/iso-locale@1.0.0-alpha.4) (2026-03-26) ([a0f5e1f](https://github.com/visulima/visulima/commit/a0f5e1f14d47c1ec1a410123e9988dc7baf42ebc))
56
+ * **release:** @visulima/iso-locale@1.0.0-alpha.5 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.5](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.4...@visulima/iso-locale@1.0.0-alpha.5) (2026-03-26) ([6623bbc](https://github.com/visulima/visulima/commit/6623bbc44df37d132e277680bb79393445f3fe08))
57
+ * **release:** @visulima/iso-locale@1.0.0-alpha.6 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.6](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.5...@visulima/iso-locale@1.0.0-alpha.6) (2026-04-08) ([318e26f](https://github.com/visulima/visulima/commit/318e26f8478e629902b86179ed2bbc43aa053bed))
58
+ * **release:** @visulima/iso-locale@1.0.0-alpha.7 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.7](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.6...@visulima/iso-locale@1.0.0-alpha.7) (2026-04-15) ([8ff1822](https://github.com/visulima/visulima/commit/8ff1822e8e14b7de707d918a0751cd887ed42719))
59
+ * **release:** @visulima/iso-locale@1.0.0-alpha.8 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.7...@visulima/iso-locale@1.0.0-alpha.8) (2026-04-22) ([00a4701](https://github.com/visulima/visulima/commit/00a4701abf040e30cf5a90fd993878bf5859f15e))
60
+ * **release:** @visulima/iso-locale@1.0.0-alpha.9 [skip ci]\n\n## @visulima/iso-locale [1.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.8...@visulima/iso-locale@1.0.0-alpha.9) (2026-05-26) ([b693ac3](https://github.com/visulima/visulima/commit/b693ac3481705dd42dc847838fcef6d190b3efe0))
61
+ * **repo:** sort package.json keys across all packages ([e1fd9ab](https://github.com/visulima/visulima/commit/e1fd9ab467ef96a98c777da1572ff6a50fcf7e71))
62
+ * sorted package.json ([b47c545](https://github.com/visulima/visulima/commit/b47c545591600fdab17d5cd3a3fbc68b61e199da))
63
+ * sorting package.json ([430ed68](https://github.com/visulima/visulima/commit/430ed683d3e38e4c5c5530f787ca832f083b17e4))
64
+ * update lock file maintenance ([d83e716](https://github.com/visulima/visulima/commit/d83e71697b75d24704185b66bb521a934d2db02d))
65
+ * visulima website ([#591](https://github.com/visulima/visulima/issues/591)) ([59ab2e2](https://github.com/visulima/visulima/commit/59ab2e2befb03e51cd2088956f83d9b87de6d033))
66
+ * year update ([47f4105](https://github.com/visulima/visulima/commit/47f410596ce7190cfea36a073db32e0cec50bbcd))
67
+
68
+ ### Code Refactoring
69
+
70
+ * **iso-locale:** apply eslint/prettier formatting cleanup ([d9875f0](https://github.com/visulima/visulima/commit/d9875f073d73d66f19ef9272b11694a80b3552be))
71
+ * **iso-locale:** derive literal unions from datasets ([c843246](https://github.com/visulima/visulima/commit/c843246db0a9b474cb68740b90b5718f6bc09d6e))
72
+ * streamline installation instructions and enhance data structure for countries, currencies, and regions in iso-locale package ([17b9e20](https://github.com/visulima/visulima/commit/17b9e201fef738ff80c6439da4998c4d1da7fbd3))
73
+ * update ESLint configuration, improve data handling in regions and timezones, and enhance currency data structure in iso-locale package ([229680d](https://github.com/visulima/visulima/commit/229680d0ecd6b422b594893b8f13e3de504d5475))
74
+
75
+ ### Tests
76
+
77
+ * improve coverage across packages ([91bd6d3](https://github.com/visulima/visulima/commit/91bd6d3b61736e3c8bd1fc59b0b5955f76a5d323))
78
+ * **iso-locale:** cover numeric country lookups, currency fallbacks, and bcp47 parse branches ([695bf35](https://github.com/visulima/visulima/commit/695bf354daac3699c166b6a3a671cec15bd639ee))
79
+ * **repo:** add dist runtime + types integration tests ([32ee300](https://github.com/visulima/visulima/commit/32ee300b7184117a0ddf9f9d390f75f8932d5ed9))
80
+
81
+ ### Continuous Integration
82
+
83
+ * **fallow:** make fallow:health advisory (--report-only) ([d57148e](https://github.com/visulima/visulima/commit/d57148ea0e3556b4c24d8d336b9fa14987f5dc7d))
84
+ * **lint:** raise eslint job timeout and cache slow per-package eslint runs ([#717](https://github.com/visulima/visulima/issues/717)) ([c93878d](https://github.com/visulima/visulima/commit/c93878dbfa1888cc834704448ae6eefd3098597e)), closes [#713](https://github.com/visulima/visulima/issues/713)
85
+
86
+ ## @visulima/iso-locale [1.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.11...@visulima/iso-locale@1.0.0-alpha.12) (2026-06-13)
87
+
88
+ ### Features
89
+
90
+ * **iso-locale:** add typed codes, unified lookups and i18n names ([5c09bb6](https://github.com/visulima/visulima/commit/5c09bb61823c7997f034091f1cbeddc838d305a3))
91
+
92
+ ### Code Refactoring
93
+
94
+ * **iso-locale:** apply eslint/prettier formatting cleanup ([d9875f0](https://github.com/visulima/visulima/commit/d9875f073d73d66f19ef9272b11694a80b3552be))
95
+ * **iso-locale:** derive literal unions from datasets ([c843246](https://github.com/visulima/visulima/commit/c843246db0a9b474cb68740b90b5718f6bc09d6e))
96
+
97
+ ## @visulima/iso-locale [1.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.10...@visulima/iso-locale@1.0.0-alpha.11) (2026-06-04)
98
+
99
+ ### Bug Fixes
100
+
101
+ * **iso-locale:** 2 bug fixes + 1 perf ([5a75216](https://github.com/visulima/visulima/commit/5a752163531e8bd458dffa264e05466e33f9d444))
102
+
103
+ ### Miscellaneous Chores
104
+
105
+ * apply eslint + prettier autofixes across packages ([c1bb784](https://github.com/visulima/visulima/commit/c1bb7848a0d93d0dfe2960c77e3cda22239c79a0))
106
+
107
+ ### Tests
108
+
109
+ * improve coverage across packages ([91bd6d3](https://github.com/visulima/visulima/commit/91bd6d3b61736e3c8bd1fc59b0b5955f76a5d323))
110
+ * **iso-locale:** cover numeric country lookups, currency fallbacks, and bcp47 parse branches ([695bf35](https://github.com/visulima/visulima/commit/695bf354daac3699c166b6a3a671cec15bd639ee))
111
+
112
+ ## @visulima/iso-locale [1.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.9...@visulima/iso-locale@1.0.0-alpha.10) (2026-05-27)
113
+
114
+ ### Bug Fixes
115
+
116
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
117
+
118
+ ### Documentation
119
+
120
+ * prettier-format agent instructions ([71b6414](https://github.com/visulima/visulima/commit/71b6414528780ac82c4e0bb25b5f4f11faba5549))
121
+
122
+ ### Miscellaneous Chores
123
+
124
+ * sorted package.json ([b47c545](https://github.com/visulima/visulima/commit/b47c545591600fdab17d5cd3a3fbc68b61e199da))
125
+
1
126
  ## @visulima/iso-locale [1.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/iso-locale@1.0.0-alpha.8...@visulima/iso-locale@1.0.0-alpha.9) (2026-05-26)
2
127
 
3
128
  ### Bug Fixes
package/README.md CHANGED
@@ -53,12 +53,16 @@ pnpm add @visulima/iso-locale
53
53
  ### Countries
54
54
 
55
55
  ```typescript
56
- import { getByAlpha2, getCountryByName, getEmoji, getCallingCode, getLanguages } from "@visulima/iso-locale";
56
+ import { getByAlpha2, getCountry, getCountryByName, getCountryName, getEmoji, getCallingCode, getLanguages } from "@visulima/iso-locale";
57
57
 
58
58
  // Get country by code
59
59
  const country = getByAlpha2("US");
60
60
  console.log(country.name); // "United States"
61
61
 
62
+ // Get country by ANY code format (alpha-2, alpha-3, or numeric)
63
+ console.log(getCountry("US")?.name); // "United States"
64
+ console.log(getCountry("USA")?.name); // "United States"
65
+
62
66
  // Get country by name
63
67
  const country2 = getCountryByName("United States");
64
68
 
@@ -70,6 +74,23 @@ console.log(getCallingCode("US")); // "+1"
70
74
 
71
75
  // Get languages
72
76
  console.log(getLanguages("US")); // ["eng"]
77
+
78
+ // Localized country name (uses the runtime Intl.DisplayNames API)
79
+ console.log(getCountryName("DE", "fr")); // "Allemagne"
80
+ console.log(getCountryName("US")); // "United States"
81
+ ```
82
+
83
+ ### Strongly-typed codes
84
+
85
+ The country and currency code unions are derived directly from the bundled
86
+ datasets, so consumers get autocomplete and compile-time validation for free:
87
+
88
+ ```typescript
89
+ import type { Alpha2Code, Alpha3Code, CurrencyCode } from "@visulima/iso-locale";
90
+
91
+ const region: Alpha2Code = "US"; // ✅
92
+ const wrong: Alpha2Code = "ZZ"; // ❌ compile error
93
+ const money: CurrencyCode = "EUR"; // ✅
73
94
  ```
74
95
 
75
96
  ### Currencies
@@ -145,8 +166,41 @@ const parsed = parseBCP47Tag("zh-Hant-TW");
145
166
  console.log(parsed);
146
167
  // { language: "zh", script: "Hant", country: "TW" }
147
168
 
148
- // Generate BCP 47 tag
169
+ // Generate BCP 47 tag (script subtags are canonicalized to title case)
149
170
  console.log(generateBCP47Tag("en", "US")); // "en-US"
171
+ console.log(generateBCP47Tag("zh", "TW", "hant")); // "zh-Hant-TW"
172
+ ```
173
+
174
+ ### Languages
175
+
176
+ ```typescript
177
+ import { getCountriesByLanguage, getLanguageName } from "@visulima/iso-locale";
178
+
179
+ // Reverse lookup: which countries use a language (accepts ISO 639-1 or 639-3)
180
+ console.log(getCountriesByLanguage("de")); // ["AT", "BE", "CH", "DE", "LI", ...]
181
+
182
+ // Localized language name (uses the runtime Intl.DisplayNames API)
183
+ console.log(getLanguageName("de", "fr")); // "allemand"
184
+ ```
185
+
186
+ ## Subpath entrypoints
187
+
188
+ Every domain is also available as a focused entrypoint, so you can import only
189
+ the dataset you need and let bundlers tree-shake the rest:
190
+
191
+ | Import | Contents |
192
+ | --------------------------------- | ------------------------------------------------------ |
193
+ | `@visulima/iso-locale` | Aggregate barrel re-exporting everything below |
194
+ | `@visulima/iso-locale/countries` | ISO 3166-1 country lookups + `Alpha2Code`/`Alpha3Code` |
195
+ | `@visulima/iso-locale/currencies` | ISO 4217 currency lookups + `CurrencyCode` |
196
+ | `@visulima/iso-locale/locale` | BCP 47 helpers, `getCurrency`, `getLanguageName` |
197
+ | `@visulima/iso-locale/regions` | UN M.49 region helpers |
198
+ | `@visulima/iso-locale/timezones` | IANA timezone helpers |
199
+ | `@visulima/iso-locale/types` | Shared TypeScript interfaces |
200
+
201
+ ```typescript
202
+ // Only pulls in the currency dataset, not countries/regions/timezones
203
+ import { getByCode, getSymbol } from "@visulima/iso-locale/currencies";
150
204
  ```
151
205
 
152
206
  ## Related