Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

country-state-city

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

country-state-city - npm Package Compare versions

Comparing version 3.0.6 to 3.1.0

13

package.json
{
"name": "country-state-city",
"version": "3.0.6",
"version": "3.1.0",
"description": "Library for fetching Country, its States and Cities",

@@ -42,3 +42,5 @@ "main": "./lib/cjs/index.js",

"homepage": "https://github.com/harpreetkhalsagtbit/country-state-city#readme",
"dependencies": {},
"devDependencies": {
"ts-node": "^10.7.0",
"@types/jest": "^26.0.19",

@@ -51,8 +53,5 @@ "@typescript-eslint/eslint-plugin": "^4.12.0",

"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"husky": "^4.3.6",
"jest": "^26.6.3",
"json-minimizer-webpack-plugin": "^3.0.0",
"prettier": "^2.2.1",

@@ -62,4 +61,2 @@ "ts-jest": "^26.4.4",

"typescript": "^4.3.2",
"webpack": "^5.38.1",
"webpack-cli": "^4.7.2",
"@types/node": "^14.11.2"

@@ -80,7 +77,3 @@ },

]
},
"dependencies": {
"copy-webpack-plugin": "^9.0.0",
"ts-node": "^10.7.0"
}
}

@@ -7,3 +7,3 @@ country-state-city

https://github.com/dr5hn/countries-states-cities-database<br>
For any data related issue, you can raise a Issue [here](https://github.com/dr5hn/countries-states-cities-database/issues/new).
For any data related issue, you can also raise a Issue [here](https://github.com/dr5hn/countries-states-cities-database/issues/new).

@@ -13,2 +13,46 @@ # Install

# Release Info & Documentation
1. [Release v3.1.0](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#release--v310)
1. [Overview](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#overview)
2. [How to contribute to Country, State, City Database, request changes and report issue?
](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#how-to-contribute-to-country-state-city-database-request-changes-and-report-issue)
3. [How Data will be Released finally?
](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#how-data-will-be-released-finally)
2. [Usage](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#usage)
1. [Release : v3.0.0 (Major Version Release - Not backward compatible)
](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#release--v300-major-version-release---not-backward-compatible)
2. [For versions below v2.2.0 and above v0.1.8
](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#for-versions-below-v220-and-above-v018)
3. [Docs](https://github.com/harpreetkhalsagtbit/country-state-city/tree/hotfix/split-csc-data-for-better-debugging-and-fixing-data#docs)
## Release : `v3.1.0`
## Overview
1. The **data** folder in the root contains all the data of **Countries, their States and Cities**
2. The earlier **large big JSONs are split into smaller JSONs** and stored in separate files and folder
3. The advantage of doing so is to make it **easy to check, test and submit** the change. It's **easier to review** a small file than a large file. It's **easier to debug** any missing or wrong values in a small file.
4. This will help in future optimisation
5. There is a separate folder for each country
- Each **Country** folder contains **Country's** information and its **states as sub-child folders**
- The **Country's** info is also split into - **Country Lite, Plain, Geo, TimeZone's.**
- Inside each **Country** - there are **Sub-folder** of State
6. Each **State** folder contains **State's** information and its **Cities as sub-child** files
7. **State's** info is also split into - **State Lite, Geo**
8. Inside each **State** - there are JSON files of **City**
1. Each **City** file contains information of all the Cities of that particular State
2. **Cities** info is split into two files - **City Lite, Geo**
## How to contribute to Country, State, City Database, request changes and report issue?
1. **Code change** - make the necessary change, raise the PR.
2. **Data changes** - Database is in `data` folder in the root.
3. **Update**: Add the necessary changes in the particular files with proper structure and format and then raise the PR.
4. **Add New - Country, State, City** - follow the proper folder structure and raise the P.R or simply share the JSONs in an issue with proper and up to date reference.
6. **Deleting - Country, State, City** - remove the necessary files/folder - update the necessary files and raise the PR or simply share the updated JSONs in an issue with a proper and up to date reference.
7. Queries/Issues related to wrong data must be provided with some references.
8. For any **Geo-Political** related **queries, border conflicts** - things will be updated when multiple proper references has been provided.
## How Data will be Released finally?
1. After the changes gets merged, a script will be run to combine all the data in a separate but single file for each Country, State, City as we have earlier without affecting out library functions and only those three files are passed to the build code and then it gets released.
2. In future we will be working on how to use these split files to optimise this library further.
# Usage

@@ -15,0 +59,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc