Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
- run: pnpm install
- run: pnpm test
- run: pnpm tsc
- run: pnpm build
84 changes: 41 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
{
"name": "@yusifaliyevpro/countries",
"version": "2.2.1",
"description": "TypeScript wrapper for Rest Countries API to fetch country data by codes, capitals, or all countries with full typings.",
"version": "2.2.2",
"license": "MIT",
"type": "commonjs",
"author": {
"name": "Yusif Aliyev",
"email": "[email protected]",
"url": "https://yusifaliyevpro.com/"
},
"homepage": "https://github.com/yusifaliyevpro/countries#readme",
"repository": {
"type": "git",
"url": "https://github.com/yusifaliyevpro/countries"
},
"scripts": {
"build": "tsdown",
"test": "tsdown && jest"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^22.15.34",
"jest": "^30.0.3",
"ts-jest": "^29.4.0",
"tsdown": "^0.12.9",
"typescript": "^5.8.3"
},
"keywords": [
"countries",
"restcountries",
"country-api",
"typescript",
"iso3166",
"cca2",
"cca3",
"country-data",
"world-countries",
"capital-cities",
"region",
"flags"
],
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -28,46 +67,5 @@
},
"files": [
"dist"
],
"scripts": {
"build": "tsdown",
"start": "node dist/index.js",
"test": "jest"
},
"keywords": [
"countries",
"restcountries",
"country-api",
"typescript",
"iso3166",
"cca2",
"cca3",
"country-data",
"world-countries",
"capital-cities",
"region",
"flags"
],
"author": {
"name": "Yusif Aliyev",
"email": "[email protected]",
"url": "https://yusifaliyevpro.com/"
},
"homepage": "https://github.com/yusifaliyevpro/countries#readme",
"repository": {
"type": "git",
"url": "https://github.com/yusifaliyevpro/countries"
},
"license": "MIT",
"type": "commonjs",
"description": "TypeScript wrapper for Rest Countries API to fetch country data by codes, capitals, or all countries with full typings.",
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/jest": "^29.5.14",
"@types/node": "^24.0.3",
"jest": "^29.7.0",
"ts-jest": "^29.3.4",
"tsdown": "^0.12.7",
"typescript": "^5.8.3"
}
]
}
1,852 changes: 1,035 additions & 817 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
onlyBuiltDependencies:
- unrs-resolver
2 changes: 1 addition & 1 deletion tests/getCountries.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountries } from "../src";
import { getCountries } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetchs all countries with specific fields correctly", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountriesByCodes.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountriesByCodes } from "../src";
import { getCountriesByCodes } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetchs specific countries correctly", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountriesByCurrency.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountriesByCurrency } from "../src";
import { getCountriesByCurrency } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetch specific countries by currency", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountriesByLang.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountriesByLang } from "../src";
import { getCountriesByLang } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetch specific countries by lang", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountriesByName.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountriesByName } from "../src";
import { getCountriesByName } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetchs specific countries by Name correctly", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountriesByRegion.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountriesByRegion } from "../src";
import { getCountriesByRegion } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetchs specific countries by Region correctly", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountriesBySubregion.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountriesBySubregion } from "../src";
import { getCountriesBySubregion } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetchs specific countries by Subregion correctly", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountryByCapital.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountryByCapital } from "../src";
import { getCountryByCapital } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetch specific country by Capital", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountryByCode.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountryByCode } from "../src";
import { getCountryByCode } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetch specific country by Code", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountryByDemonym.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountryByDemonym } from "../src";
import { getCountryByDemonym } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetchs specific country by Demonym correctly", async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/getCountryByTranslation.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCountryByTranslation } from "../src";
import { getCountryByTranslation } from "../dist";
import { API_BASE_URL } from "../src/constants";

test("fetchs specific country by Translation correctly", async () => {
Expand Down