Skip to content

Commit

Permalink
Add changelog from version 1 to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinsFrank committed Mar 25, 2023
1 parent e67b749 commit 7e8e3d7
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
# Ugrading from 1.x to 2.x

As this package is getting adopted and more people start using it, I got some valid feedback on the readability of the standards in codebases.
- If you want to use a country code in code, you need to navigate the namespaces or know the ISO code of the spec for the country codes
- If a country has a long formal name, using the enum name may span an entire line of code decreasing readability.

## Enum renames for readability

Both of the above issues have been solved by renaming the different specifications for readability. If you are currently using any of these classes below, you can find/replace the name in the left one with the one on the right;

| Old ClassName | New ClassName |
|--------------------------------|-----------------------------|
| ISO3166_1_Alpha_2 | CountryAlpha2 |
| ISO3166_1_Alpha_3 | CountryAlpha3 |
| ISO3166_1_Name | CountryName |
| ISO3166_1_Numeric | CountryNumeric |
| ITU_T_E_164 | CountryCallingCode |
| ISO4217_Alpha_3 | CurrencyAlpha3 |
| ISO4217_Name | CurrencyName |
| ISO4217_Numeric | CurrencyNumeric |
| ISO639_1_Alpha_2 | LanguageAlpha2 |
| ISO639_2_Alpha_3_Bibliographic | LanguageAlpha3Bibliographic |
| ISO639_2_Alpha_3_Common | LanguageAlpha3Common |
| ISO639_2_Alpha_3_Terminology | LanguageAlpha3Terminology |
| ISO639_Name | LanguageName |

## Renaming of some very long Country enum cases

Some enum cases were unnecessarily using the full country name as their name, which resulted in them taking up a full line of code. These have been renamed. If you were using any explicit names in your codebase, you should change them from their old value to the new values on the left;

| Old name | New name |
|----------------------------------------------------------|-----------------------------------------|
| Bahamas_the | Bahamas |
| Bolivia_Plurinational_State_of | Bolivia |
| British_Indian_Ocean_Territory_the | British_Indian_Ocean_Territory |
| Cayman_Islands_the | Cayman_Islands |
| Central_African_Republic_the | Central_African_Republic |
| Cocos_Keeling_Islands_the | Cocos_Islands |
| Comoros_the | Comoros |
| Congo_the | Congo |
| Congo_the_Democratic_Republic_of_the | Congo_Democratic_Republic |
| Cook_Islands_the | Cook_Islands |
| Dominican_Republic_the | Dominican_Republic |
| Falkland_Islands_the_Malvinas | Falkland_Islands |
| Faroe_Islands_the | Faroe_Islands |
| French_Southern_Territories_the | French_Southern_Territories |
| Gambia_the | Gambia |
| Holy_See_the | Holy_See |
| Iran_Islamic_Republic_of | Iran |
| Korea_the_Democratic_People_s_Republic_of | Korea_Democratic_Peoples_Republic |
| Korea_the_Republic_of | Korea_Republic |
| Lao_People_s_Democratic_Republic_the | Lao_Peoples_Democratic_Republic |
| Marshall_Islands_the | Marshall_Islands |
| Micronesia_Federated_States_of | Micronesia |
| Moldova_the_Republic_of | Moldova |
| Netherlands_the | Netherlands |
| Niger_the | Niger |
| Northern_Mariana_Islands_the | Northern_Mariana_Islands |
| Palestine_State_of | Palestine |
| Philippines_the | Philippines |
| Russian_Federation_the | Russian_Federation |
| Saint_Helena_Ascension_and_Tristan_da_Cunha | Saint_Helena_Ascension_Tristan_da_Cunha |
| South_Georgia_and_the_South_Sandwich_Islands | South_Georgia_South_Sandwich_Islands |
| Sudan_the | Sudan |
| Svalbard_and_Jan_Mayen | Svalbard_Jan_Mayen |
| Syrian_Arab_Republic_the | Syrian_Arab_Republic |
| Tanzania_the_United_Republic_of | Tanzania |
| Turks_and_Caicos_Islands_the | Turks_and_Caicos_Islands |
| United_Arab_Emirates_the | United_Arab_Emirates |
| United_Kingdom_of_Great_Britain_and_Northern_Ireland_the | United_Kingdom |
| United_States_Minor_Outlying_Islands_the | United_States_Outlying_Islands |
| United_States_of_America_the | United_States_of_America |
| Venezuela_Bolivarian_Republic_of | Venezuela |

## Merging of Country and CountryShort enums

As the Country enum has now been optimized for readability, the CountryShort enums have been removed. If you were using these from release 1.6, you can simply find/replace the '/CountryShort/' namespace usages with '/Country/'

# Upgrading from 0.x to 1.x

As this package reaches maturity and a first stable version is released, some breaking changes were introduced. As this package is now stable, the amount of breaking changes will be very low in the future.
Expand Down

0 comments on commit 7e8e3d7

Please sign in to comment.