@formatjs/intl-locale
Advanced tools
Comparing version 2.4.32 to 2.4.33
12
index.js
@@ -7,5 +7,3 @@ "use strict"; | ||
var intl_getcanonicallocales_1 = require("@formatjs/intl-getcanonicallocales"); | ||
var likelySubtagsData = tslib_1.__importStar(require("cldr-core/supplemental/likelySubtags.json")); | ||
var get_internal_slots_1 = tslib_1.__importDefault(require("./get_internal_slots")); | ||
var likelySubtags = likelySubtagsData.supplemental.likelySubtags; | ||
var RELEVANT_EXTENSION_KEYS = ['ca', 'co', 'hc', 'kf', 'kn', 'nu']; | ||
@@ -114,3 +112,3 @@ var UNICODE_TYPE_REGEX = /^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i; | ||
if (script && region) { | ||
var match_1 = likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: lang, script: script, region: region, variants: [] })]; | ||
var match_1 = intl_getcanonicallocales_1.likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: lang, script: script, region: region, variants: [] })]; | ||
if (match_1) { | ||
@@ -123,3 +121,3 @@ var parts_1 = intl_getcanonicallocales_1.parseUnicodeLanguageId(match_1); | ||
if (script) { | ||
var match_2 = likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: lang, script: script, variants: [] })]; | ||
var match_2 = intl_getcanonicallocales_1.likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: lang, script: script, variants: [] })]; | ||
if (match_2) { | ||
@@ -132,3 +130,3 @@ var parts_2 = intl_getcanonicallocales_1.parseUnicodeLanguageId(match_2); | ||
if (region) { | ||
var match_3 = likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: lang, region: region, variants: [] })]; | ||
var match_3 = intl_getcanonicallocales_1.likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: lang, region: region, variants: [] })]; | ||
if (match_3) { | ||
@@ -140,4 +138,4 @@ var parts_3 = intl_getcanonicallocales_1.parseUnicodeLanguageId(match_3); | ||
} | ||
var match = likelySubtags[lang] || | ||
likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: 'und', script: script, variants: [] })]; | ||
var match = intl_getcanonicallocales_1.likelySubtags[lang] || | ||
intl_getcanonicallocales_1.likelySubtags[intl_getcanonicallocales_1.emitUnicodeLanguageId({ lang: 'und', script: script, variants: [] })]; | ||
if (!match) { | ||
@@ -144,0 +142,0 @@ throw new Error("No match for addLikelySubtags"); |
import { __assign, __spreadArray } from "tslib"; | ||
import { GetOption, invariant, SameValue, CoerceOptionsToObject, } from '@formatjs/ecma402-abstract'; | ||
import { isStructurallyValidLanguageTag, isUnicodeLanguageSubtag, isUnicodeRegionSubtag, parseUnicodeLanguageId, isUnicodeScriptSubtag, emitUnicodeLocaleId, parseUnicodeLocaleId, emitUnicodeLanguageId, } from '@formatjs/intl-getcanonicallocales'; | ||
import * as likelySubtagsData from 'cldr-core/supplemental/likelySubtags.json'; | ||
import { isStructurallyValidLanguageTag, isUnicodeLanguageSubtag, isUnicodeRegionSubtag, parseUnicodeLanguageId, isUnicodeScriptSubtag, emitUnicodeLocaleId, parseUnicodeLocaleId, emitUnicodeLanguageId, likelySubtags, } from '@formatjs/intl-getcanonicallocales'; | ||
import getInternalSlots from './get_internal_slots'; | ||
var likelySubtags = likelySubtagsData.supplemental.likelySubtags; | ||
var RELEVANT_EXTENSION_KEYS = ['ca', 'co', 'hc', 'kf', 'kn', 'nu']; | ||
@@ -8,0 +6,0 @@ var UNICODE_TYPE_REGEX = /^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i; |
{ | ||
"name": "@formatjs/intl-locale", | ||
"version": "2.4.32", | ||
"version": "2.4.33", | ||
"description": "Intl.Locale polyfill", | ||
@@ -27,7 +27,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@formatjs/ecma402-abstract": "1.9.3", | ||
"@formatjs/intl-getcanonicallocales": "1.7.0", | ||
"cldr-core": "38", | ||
"@formatjs/ecma402-abstract": "1.9.4", | ||
"@formatjs/intl-getcanonicallocales": "1.7.1", | ||
"tslib": "^2.1.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
190033
5542
+ Added@formatjs/ecma402-abstract@1.9.4(transitive)
+ Added@formatjs/intl-getcanonicallocales@1.7.1(transitive)
- Removedcldr-core@38
- Removed@formatjs/ecma402-abstract@1.9.3(transitive)
- Removed@formatjs/intl-getcanonicallocales@1.7.0(transitive)
- Removedcldr-core@38.1.0(transitive)