Skip to content

Commit

Permalink
Remove unaffiliated countries (#119)
Browse files Browse the repository at this point in the history
* Remove unaffiliated countries

* Bump version
  • Loading branch information
scriptex committed Feb 14, 2022
1 parent d94ce5e commit fa102aa
Show file tree
Hide file tree
Showing 14 changed files with 782 additions and 409 deletions.
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": {
"node": true
},
"extends": ["prettier", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"ignorePatterns": ["demo/**/*"],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"bracketSameLine": false,
"arrowParens": "avoid",
"proseWrap": "preserve"
}
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ This package contains geographical data for all USA states including:
There is no counties information for the following US overseas territories:

- American Samoa
- Federated States Of Micronesia
- Marshall Islands
- Northern Mariana Islands
- Palau
- Puerto Rico
- Virgin Islands

Expand Down Expand Up @@ -237,7 +234,7 @@ The usage is not so straight-forward, so please refer to the [demo](https://gith

## Module bundlers

`typed-usa-states` exposes several pretty large arrays.
`typed-usa-states` exposes several pretty large arrays.

It is possible that you experience issues with insufficient memory when using `create-react-app` or Webpack, Parcel, Rollup, etc. or if you are using the package in Docker or other CI environment.

Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typed-usa-states",
"version": "2.0.1",
"version": "2.1.0",
"description": "An array of geographical data for all USA states with full TypeScript support",
"scripts": {
"generate": "ts-node ./build/index.ts",
Expand All @@ -9,7 +9,7 @@
"minify": "./bin/minify.sh dist",
"clean": "rm -rf dist",
"build": "yarn clean && yarn generate && yarn tsc && yarn prettier && yarn minify",
"lint": "tslint -p tsconfig.json -c tslint.json index.ts"
"lint": "eslint 'src/**/*.ts'"
},
"keywords": [
"USA",
Expand All @@ -35,12 +35,14 @@
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@types/node": "16.11.24",
"@types/node": "17.0.17",
"@typescript-eslint/eslint-plugin": "5.11.0",
"@typescript-eslint/parser": "5.11.0",
"eslint": "8.9.0",
"eslint-config-prettier": "8.3.0",
"prettier": "2.5.1",
"terser": "5.10.0",
"ts-node": "10.5.0",
"tslint": "6.1.3",
"tslint-config-prettier": "1.18.0",
"typescript": "4.5.5"
},
"main": "dist/index.js",
Expand Down
51 changes: 0 additions & 51 deletions src/states-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,22 +497,6 @@ export const usaStatesFull: IUSAState[] = [
},
counties: ['District of Columbia']
},
{
name: 'Federated States Of Micronesia',
abbreviation: 'FM',
territory: true,
capital: 'Palikir',
contiguous: false,
zipCodes: [['96941', '96944']],
area: {
year: 2019,
value: 271
},
population: {
year: 2018,
count: 114079
}
},
{
name: 'Florida',
abbreviation: 'FL',
Expand Down Expand Up @@ -1604,25 +1588,6 @@ export const usaStatesFull: IUSAState[] = [
'York County'
]
},
{
name: 'Marshall Islands',
abbreviation: 'MH',
territory: true,
capital: 'Majuro',
contiguous: false,
zipCodes: [
['96960', '96960'],
['96970', '96970']
],
area: {
year: 2019,
value: 70
},
population: {
year: 2018,
count: 58791
}
},
{
name: 'Maryland',
abbreviation: 'MD',
Expand Down Expand Up @@ -3017,22 +2982,6 @@ export const usaStatesFull: IUSAState[] = [
'Yamhill County'
]
},
{
name: 'Palau',
abbreviation: 'PW',
territory: true,
capital: 'Ngerulmud',
contiguous: false,
zipCodes: [['96939', '96940']],
area: {
year: 2019,
value: 177.2
},
population: {
year: 2018,
count: 21503
}
},
{
name: 'Pennsylvania',
abbreviation: 'PA',
Expand Down
33 changes: 0 additions & 33 deletions src/states-with-area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,6 @@ export const usaStatesWithArea: IUSAState[] = [
value: 68.34
}
},
{
name: 'Federated States Of Micronesia',
abbreviation: 'FM',
territory: true,
capital: 'Palikir',
contiguous: false,
area: {
year: 2019,
value: 271
}
},
{
name: 'Florida',
abbreviation: 'FL',
Expand Down Expand Up @@ -254,17 +243,6 @@ export const usaStatesWithArea: IUSAState[] = [
value: 35385
}
},
{
name: 'Marshall Islands',
abbreviation: 'MH',
territory: true,
capital: 'Majuro',
contiguous: false,
area: {
year: 2019,
value: 70
}
},
{
name: 'Maryland',
abbreviation: 'MD',
Expand Down Expand Up @@ -474,17 +452,6 @@ export const usaStatesWithArea: IUSAState[] = [
value: 98466.1
}
},
{
name: 'Palau',
abbreviation: 'PW',
territory: true,
capital: 'Ngerulmud',
contiguous: false,
area: {
year: 2019,
value: 177.2
}
},
{
name: 'Pennsylvania',
abbreviation: 'PA',
Expand Down
21 changes: 0 additions & 21 deletions src/states-with-counties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,6 @@ export const usaStatesWithCounties: IUSAState[] = [
contiguous: true,
counties: ['District of Columbia']
},
{
name: 'Federated States Of Micronesia',
abbreviation: 'FM',
territory: true,
capital: 'Palikir',
contiguous: false
},
{
name: 'Florida',
abbreviation: 'FL',
Expand Down Expand Up @@ -1383,13 +1376,6 @@ export const usaStatesWithCounties: IUSAState[] = [
'York County'
]
},
{
name: 'Marshall Islands',
abbreviation: 'MH',
territory: true,
capital: 'Majuro',
contiguous: false
},
{
name: 'Maryland',
abbreviation: 'MD',
Expand Down Expand Up @@ -2610,13 +2596,6 @@ export const usaStatesWithCounties: IUSAState[] = [
'Yamhill County'
]
},
{
name: 'Palau',
abbreviation: 'PW',
territory: true,
capital: 'Ngerulmud',
contiguous: false
},
{
name: 'Pennsylvania',
abbreviation: 'PA',
Expand Down
33 changes: 0 additions & 33 deletions src/states-with-population.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,6 @@ export const usaStatesWithPopulation: IUSAState[] = [
count: 702455
}
},
{
name: 'Federated States Of Micronesia',
abbreviation: 'FM',
territory: true,
capital: 'Palikir',
contiguous: false,
population: {
year: 2018,
count: 114079
}
},
{
name: 'Florida',
abbreviation: 'FL',
Expand Down Expand Up @@ -254,17 +243,6 @@ export const usaStatesWithPopulation: IUSAState[] = [
count: 1338404
}
},
{
name: 'Marshall Islands',
abbreviation: 'MH',
territory: true,
capital: 'Majuro',
contiguous: false,
population: {
year: 2018,
count: 58791
}
},
{
name: 'Maryland',
abbreviation: 'MD',
Expand Down Expand Up @@ -474,17 +452,6 @@ export const usaStatesWithPopulation: IUSAState[] = [
count: 4190713
}
},
{
name: 'Palau',
abbreviation: 'PW',
territory: true,
capital: 'Ngerulmud',
contiguous: false,
population: {
year: 2018,
count: 21503
}
},
{
name: 'Pennsylvania',
abbreviation: 'PA',
Expand Down
27 changes: 0 additions & 27 deletions src/states-with-zipcodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ export const usaStatesWithZipCodes: IUSAState[] = [
contiguous: true,
zipCodes: [['20001', '20020']]
},
{
name: 'Federated States Of Micronesia',
abbreviation: 'FM',
territory: true,
capital: 'Palikir',
contiguous: false,
zipCodes: [['96941', '96944']]
},
{
name: 'Florida',
abbreviation: 'FL',
Expand Down Expand Up @@ -199,17 +191,6 @@ export const usaStatesWithZipCodes: IUSAState[] = [
contiguous: true,
zipCodes: [['04032', '04034']]
},
{
name: 'Marshall Islands',
abbreviation: 'MH',
territory: true,
capital: 'Majuro',
contiguous: false,
zipCodes: [
['96960', '96960'],
['96970', '96970']
]
},
{
name: 'Maryland',
abbreviation: 'MD',
Expand Down Expand Up @@ -365,14 +346,6 @@ export const usaStatesWithZipCodes: IUSAState[] = [
contiguous: true,
zipCodes: [['97201', '97225']]
},
{
name: 'Palau',
abbreviation: 'PW',
territory: true,
capital: 'Ngerulmud',
contiguous: false,
zipCodes: [['96939', '96940']]
},
{
name: 'Pennsylvania',
abbreviation: 'PA',
Expand Down
Loading

0 comments on commit fa102aa

Please sign in to comment.