Upgrading i18n-iso-countries 5 to 6
Unknown5.5.0 → 6.8.0
Fetching 11 releases from GitHub…0 / 11
UnknownUpgrade verdict
DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.
In plain terms
- DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
- This page updates as the notes come in.
Must act Still reading release notes
DepDelta is still reading the release notes in this range. This updates as they come in.
Node.js requirement changed in 6.1.0: >= 8 → >= 10.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- changed:
function alpha2ToAlpha3(alpha2: string): string → function alpha2ToAlpha3(alpha2: string | Alpha2Code): string - changed:
function alpha2ToNumeric(alpha2: string): string → function alpha2ToNumeric(alpha2: string | Alpha2Code): string - changed:
function alpha3ToAlpha2(alpha3: string): string → function alpha3ToAlpha2(alpha3: string | Alpha3Code): string - changed:
function alpha3ToNumeric(alpha3: string): string → function alpha3ToNumeric(alpha3: string | Alpha3Code): string - changed:
function getName(alpha2orAlpha3orNumeric: string | number, lang: string): string → function getName(countryCode: string | number | Alpha2Code | Alpha3Code, lang: string): string - changed:
function getNames(lang: string): LocalizedCountryNames → function getNames(lang: string): LocalizedCountryNames<{ select: 'official' }> - changed:
function toAlpha2(alpha3orNumeric: number | string): string → function toAlpha2(alpha3orNumeric: number | string | Alpha3Code): string - changed:
function toAlpha3(alpha2orNumeric: number | string): string → function toAlpha3(alpha2orNumeric: number | string | Alpha2Code): string - changed:
type LocaleData = { locale: string, countries: LocalizedCountryNames } → type LocaleData = { locale: string, countries: { [alpha2Key: string]: string[] | string } } - changed:
type LocalizedCountryNames = { [alpha2Key: string]: string } → type LocalizedCountryNames<T extends GetNameOptions> = { [alpha2Key: string]: CountryName<T> } - added:
function getName<T extends GetNameOptions>(countryCode: string | number | Alpha2Code | Alpha3Code, lang: string, options: T): CountryName<T> - added:
function getNames<T extends GetNameOptions>(lang: string, options: T): LocalizedCountryNames<T> - added:
interface GetNameOptions - added:
property GetNameOptions.select: 'all' | 'official' | 'alias' - added:
type Alpha2Code = 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ'… - added:
type Alpha3Code = 'AFG' | 'ALB' | 'DZA' | 'ASM' | 'AND' | 'AGO' | 'AIA' | 'ATA' | 'ATG' | 'ARG' | 'ARM' | 'ABW' | 'AUS' | 'AUT' | 'AZE' | 'BHS' | 'BHR' | 'BGD' | 'BRB' | 'BLR' |… - added:
type CountryName<T extends GetNameOptions> = T extends { select: 'all' } ? string[] : string