i18n-countries-continents 1.0.0 → 1.0.2
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
|
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.2] - 2025-03-10
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed `exports` field in `package.json` to correctly point to sub-directory service files (e.g. `./dist/services/countries/get-country-name.js` instead of old flat paths)
|
|
12
|
+
- Added missing sub-path exports: `./get-country-flag`, `./get-city-name`, `./get-cities`, `./search-cities`, `./get-continents`, `./get-continent-name`
|
|
13
|
+
- Removed duplicate `City` interface definition in `search-cities.ts` (now imports from `get-cities.ts`)
|
|
14
|
+
- Fixed `CHANGELOG.md` incorrectly excluded by `.npmignore` despite being listed in `files`
|
|
15
|
+
- Fixed `moduleResolution` in `tsconfig.json` from `"node"` to `"bundler"` for correct ESM resolution
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- `"sideEffects": false` in `package.json` for optimal tree-shaking support
|
|
19
|
+
- `"engines": { "node": ">=16.0.0" }` to document minimum Node.js version
|
|
20
|
+
- Added `cities`, `flags`, `iso-3166` keywords for better npm discoverability
|
|
21
|
+
- Updated package description to include cities
|
|
22
|
+
|
|
23
|
+
## [1.0.1] - 2025-11-18
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Added `"type": "module"` to package.json for better ES module support
|
|
27
|
+
- Explicit TypeScript type exports (Country, Continent, City) in index.ts
|
|
28
|
+
- Comprehensive test suite with 125 tests
|
|
29
|
+
- Real-world integration tests covering 10 use cases
|
|
30
|
+
- Performance benchmarks and validation
|
|
31
|
+
|
|
32
|
+
### Improved
|
|
33
|
+
- Better TypeScript support and type definitions
|
|
34
|
+
- Eliminated Node.js module type warnings
|
|
35
|
+
- Enhanced developer experience with explicit exports
|
|
36
|
+
|
|
8
37
|
## [1.0.0] - 2025-11-05
|
|
9
38
|
|
|
10
39
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export * from "./services/index.js";
|
|
2
2
|
export * from "./utils/index.js";
|
|
3
|
+
export type { Country } from "./services/countries/get-countries.js";
|
|
4
|
+
export type { Continent } from "./services/continents/get-continents.js";
|
|
5
|
+
export type { City } from "./services/cities/get-cities.js";
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC;AAGpC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC;AAGpC,cAAc,kBAAkB,CAAC;AAEjC,YAAY,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,YAAY,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,YAAY,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { SupportedLanguage } from "../../utils/types.js";
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
translatedName: string;
|
|
5
|
-
}
|
|
2
|
+
import { City } from "./get-cities.js";
|
|
6
3
|
export default function searchCities(query: string, language?: SupportedLanguage, limit?: number): City[];
|
|
7
4
|
//# sourceMappingURL=search-cities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-cities.d.ts","sourceRoot":"","sources":["../../../src/services/cities/search-cities.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"search-cities.d.ts","sourceRoot":"","sources":["../../../src/services/cities/search-cities.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,iBAAwB,EAClC,KAAK,GAAE,MAAW,GACjB,IAAI,EAAE,CA2BR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-cities.js","sourceRoot":"","sources":["../../../src/services/cities/search-cities.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,wBAAwB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"search-cities.js","sourceRoot":"","sources":["../../../src/services/cities/search-cities.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,wBAAwB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAItE,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,KAAa,EACb,WAA8B,IAAI,EAClC,QAAgB,EAAE;IAElB,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IAEnD,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,OAAO,GAAG,UAAU;SACvB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAG,CACrB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,IAAI,CACzC,CAAC,WAAW,EAAE,CAAC;QAEhB,OAAO,CACL,WAAW,CAAC,QAAQ,CAAC,eAAe,CAAC;YACrC,cAAc,CAAC,QAAQ,CAAC,eAAe,CAAC,CACzC,CAAC;IACJ,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,cAAc,EACZ,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI;KAC7D,CAAC,CAAC;SACF,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAEnB,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18n-countries-continents",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Get country and
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Get country, continent, and city names in different languages. 250 countries, 7 continents, and 4,010 cities with 5 languages. Works in React, Angular, Vue, Node.js, and any JavaScript environment.",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"module": "dist/index.js",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=16.0.0"
|
|
12
|
+
},
|
|
8
13
|
"files": [
|
|
9
14
|
"dist",
|
|
10
15
|
"README.md",
|
|
@@ -25,6 +30,7 @@
|
|
|
25
30
|
"internationalization",
|
|
26
31
|
"countries",
|
|
27
32
|
"continents",
|
|
33
|
+
"cities",
|
|
28
34
|
"multilanguage",
|
|
29
35
|
"localization",
|
|
30
36
|
"l10n",
|
|
@@ -36,7 +42,10 @@
|
|
|
36
42
|
"typescript",
|
|
37
43
|
"country-codes",
|
|
38
44
|
"country-names",
|
|
39
|
-
"continent-names"
|
|
45
|
+
"continent-names",
|
|
46
|
+
"city-names",
|
|
47
|
+
"flags",
|
|
48
|
+
"iso-3166"
|
|
40
49
|
],
|
|
41
50
|
"author": "Aissam EL Houref",
|
|
42
51
|
"repository": {
|
|
@@ -58,29 +67,49 @@
|
|
|
58
67
|
"types": "./dist/index.d.ts"
|
|
59
68
|
},
|
|
60
69
|
"./get-country-name": {
|
|
61
|
-
"import": "./dist/get-country-name.js",
|
|
62
|
-
"require": "./dist/get-country-name.js",
|
|
63
|
-
"types": "./dist/get-country-name.d.ts"
|
|
70
|
+
"import": "./dist/services/countries/get-country-name.js",
|
|
71
|
+
"require": "./dist/services/countries/get-country-name.js",
|
|
72
|
+
"types": "./dist/services/countries/get-country-name.d.ts"
|
|
64
73
|
},
|
|
65
|
-
"./get-
|
|
66
|
-
"import": "./dist/get-
|
|
67
|
-
"require": "./dist/get-
|
|
68
|
-
"types": "./dist/get-
|
|
74
|
+
"./get-country-flag": {
|
|
75
|
+
"import": "./dist/services/countries/get-country-flag.js",
|
|
76
|
+
"require": "./dist/services/countries/get-country-flag.js",
|
|
77
|
+
"types": "./dist/services/countries/get-country-flag.d.ts"
|
|
69
78
|
},
|
|
70
|
-
"./get-
|
|
71
|
-
"import": "./dist/get-
|
|
72
|
-
"require": "./dist/get-
|
|
73
|
-
"types": "./dist/get-
|
|
79
|
+
"./get-countries": {
|
|
80
|
+
"import": "./dist/services/countries/get-countries.js",
|
|
81
|
+
"require": "./dist/services/countries/get-countries.js",
|
|
82
|
+
"types": "./dist/services/countries/get-countries.d.ts"
|
|
74
83
|
},
|
|
75
84
|
"./get-continent-by-country": {
|
|
76
|
-
"import": "./dist/get-continent-by-country.js",
|
|
77
|
-
"require": "./dist/get-continent-by-country.js",
|
|
78
|
-
"types": "./dist/get-continent-by-country.d.ts"
|
|
85
|
+
"import": "./dist/services/countries/get-continent-by-country.js",
|
|
86
|
+
"require": "./dist/services/countries/get-continent-by-country.js",
|
|
87
|
+
"types": "./dist/services/countries/get-continent-by-country.d.ts"
|
|
79
88
|
},
|
|
80
89
|
"./get-continent-name": {
|
|
81
|
-
"import": "./dist/get-continent-name.js",
|
|
82
|
-
"require": "./dist/get-continent-name.js",
|
|
83
|
-
"types": "./dist/get-continent-name.d.ts"
|
|
90
|
+
"import": "./dist/services/continents/get-continent-name.js",
|
|
91
|
+
"require": "./dist/services/continents/get-continent-name.js",
|
|
92
|
+
"types": "./dist/services/continents/get-continent-name.d.ts"
|
|
93
|
+
},
|
|
94
|
+
"./get-continents": {
|
|
95
|
+
"import": "./dist/services/continents/get-continents.js",
|
|
96
|
+
"require": "./dist/services/continents/get-continents.js",
|
|
97
|
+
"types": "./dist/services/continents/get-continents.d.ts"
|
|
98
|
+
},
|
|
99
|
+
"./get-city-name": {
|
|
100
|
+
"import": "./dist/services/cities/get-city-name.js",
|
|
101
|
+
"require": "./dist/services/cities/get-city-name.js",
|
|
102
|
+
"types": "./dist/services/cities/get-city-name.d.ts"
|
|
103
|
+
},
|
|
104
|
+
"./get-cities": {
|
|
105
|
+
"import": "./dist/services/cities/get-cities.js",
|
|
106
|
+
"require": "./dist/services/cities/get-cities.js",
|
|
107
|
+
"types": "./dist/services/cities/get-cities.d.ts"
|
|
108
|
+
},
|
|
109
|
+
"./search-cities": {
|
|
110
|
+
"import": "./dist/services/cities/search-cities.js",
|
|
111
|
+
"require": "./dist/services/cities/search-cities.js",
|
|
112
|
+
"types": "./dist/services/cities/search-cities.d.ts"
|
|
84
113
|
}
|
|
85
114
|
}
|
|
86
115
|
}
|