Skip to content

Commit db04d49

Browse files
authored
Update data & types (new partOf, userAssigned params) (#135)
* Bump modules * Update types and data for cases like #36 and #132 * Update comments in types.ts * Update phone code for Kazakhstan to just `7` #134 * Case insensitive search in getCountryCode function #131 * Rebuild dist data
1 parent d92daf3 commit db04d49

File tree

16 files changed

+699
-358
lines changed

16 files changed

+699
-358
lines changed

dist/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/countries.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"KR","South Korea","대한민국","82","Asia","Seoul","KRW","ko"
124124
"KW","Kuwait","الكويت","965","Asia","Kuwait City","KWD","ar"
125125
"KY","Cayman Islands","Cayman Islands","1345","North America","George Town","KYD","en"
126-
"KZ","Kazakhstan","Қазақстан","76,77","Asia","Astana","KZT","kk,ru"
126+
"KZ","Kazakhstan","Қазақстан","7","Asia","Astana","KZT","kk,ru"
127127
"LA","Laos","ສປປລາວ","856","Asia","Vientiane","LAK","lo"
128128
"LB","Lebanon","لبنان","961","Asia","Beirut","LBP","ar,fr"
129129
"LC","Saint Lucia","Saint Lucia","1758","North America","Castries","XCD","en"

dist/countries.min.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/data.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ INSERT INTO `countries` (`code`, `name`, `native`, `phone`, `continent`, `capita
278278
('KR', 'South Korea', '대한민국', '82', 'AS', 'Seoul', 'KRW', 'ko'),
279279
('KW', 'Kuwait', 'الكويت', '965', 'AS', 'Kuwait City', 'KWD', 'ar'),
280280
('KY', 'Cayman Islands', 'Cayman Islands', '1345', 'NA', 'George Town', 'KYD', 'en'),
281-
('KZ', 'Kazakhstan', 'Қазақстан', '76,77', 'AS', 'Astana', 'KZT', 'kk,ru'),
281+
('KZ', 'Kazakhstan', 'Қазақстан', '7', 'AS', 'Astana', 'KZT', 'kk,ru'),
282282
('LA', 'Laos', 'ສປປລາວ', '856', 'AS', 'Vientiane', 'LAK', 'lo'),
283283
('LB', 'Lebanon', 'لبنان', '961', 'AS', 'Beirut', 'LBP', 'ar,fr'),
284284
('LC', 'Saint Lucia', 'Saint Lucia', '1758', 'NA', 'Castries', 'XCD', 'en'),

dist/index.d.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,20 @@ export interface ICountry {
3333
native: string
3434
/**
3535
* Specified in cases when entity is currently a part of another one.
36+
* Example: Åland is an autonomous and demilitarised region of Finland and has own ISO code.
37+
* @see: https://en.wikipedia.org/wiki/Åland
38+
* @todo: Type should be TCountryCode, but need to resolve cyclic referencing on dynamically generated type.
3639
*/
37-
parent?: TCountryCode
40+
partOf?: string
3841
/**
3942
* Calling phone codes.
4043
*/
4144
phone: number[]
45+
/**
46+
* Specified in cases when entity is not a part of the main ISO 3166-1 standart, but a User assigned code.
47+
* @see: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#User-assigned_code_elements
48+
*/
49+
userAssigned?: boolean
4250
}
4351

4452
export interface ILanguage {

dist/index.iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 644 additions & 333 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
"version": "cd ./packages/scripts && npm run version"
1717
},
1818
"devDependencies": {
19-
"@typescript-eslint/eslint-plugin": "6.8.0",
20-
"@typescript-eslint/parser": "6.8.0",
21-
"eslint": "8.51.0",
19+
"@typescript-eslint/eslint-plugin": "7.1.0",
20+
"@typescript-eslint/parser": "7.1.0",
21+
"eslint": "8.57.0",
2222
"eslint-config-custom": "*",
23-
"husky": "8.0.3",
24-
"lint-staged": "15.0.2",
25-
"prettier": "3.0.3",
26-
"turbo": "1.10.16"
23+
"husky": "9.0.11",
24+
"lint-staged": "15.2.2",
25+
"prettier": "3.2.5",
26+
"turbo": "1.12.4"
2727
},
2828
"devEngines": {
2929
"node": ">=18"

packages/countries/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"lint:fix": "eslint \"{/**,}/*.ts\" --fix"
2020
},
2121
"devDependencies": {
22-
"tsup": "7.2.0",
23-
"typescript": "~5.2.2"
22+
"tsup": "8.0.2",
23+
"typescript": "~5.3.3"
2424
},
2525
"license": "MIT"
2626
}

0 commit comments

Comments
 (0)