terra-i18n
Advanced tools
Comparing version 4.32.0 to 4.33.0
@@ -5,2 +5,7 @@ # Changelog | ||
## 4.33.0 - (September 29, 2020) | ||
* Changed | ||
* Disable the regex cached maintained by the Intl Polyfill that can result in regex syntax errors. | ||
## 4.32.0 - (August 4, 2020) | ||
@@ -7,0 +12,0 @@ |
@@ -45,2 +45,16 @@ "use strict"; | ||
if (global.IntlPolyfill) { | ||
/** | ||
* Intl polyfill attempts to cache and restore static RegExp properties before executing any regular expressions in order | ||
* to comply with ECMA-402. There are times this results in regex syntax error so we are disabling this feature. | ||
* | ||
* Reference: https://github.com/andyearnshaw/Intl.js#regexp-cache--restore | ||
*/ | ||
/* eslint-disable no-underscore-dangle */ | ||
if (Intl.__disableRegExpRestore && typeof Intl.__disableRegExpRestore === 'function') { | ||
Intl.__disableRegExpRestore(); | ||
} | ||
/* eslint-enable no-underscore-dangle */ | ||
(0, _intlLoaders.default)(locale); | ||
@@ -47,0 +61,0 @@ } |
{ | ||
"name": "terra-i18n", | ||
"main": "lib/I18n.js", | ||
"version": "4.32.0", | ||
"version": "4.33.0", | ||
"description": "The terra-i18n package provides on-demand internationalization of React components.", | ||
@@ -46,3 +46,3 @@ "repository": { | ||
}, | ||
"gitHead": "25fa65c7df029c2a5341095ada3341e558a3257b" | ||
"gitHead": "95141beff02c3e36ad8e83433fdda3881fcc083a" | ||
} |
@@ -33,2 +33,14 @@ /* eslint-disable global-require, import/no-named-as-default */ | ||
if (global.IntlPolyfill) { | ||
/** | ||
* Intl polyfill attempts to cache and restore static RegExp properties before executing any regular expressions in order | ||
* to comply with ECMA-402. There are times this results in regex syntax error so we are disabling this feature. | ||
* | ||
* Reference: https://github.com/andyearnshaw/Intl.js#regexp-cache--restore | ||
*/ | ||
/* eslint-disable no-underscore-dangle */ | ||
if (Intl.__disableRegExpRestore && typeof Intl.__disableRegExpRestore === 'function') { | ||
Intl.__disableRegExpRestore(); | ||
} | ||
/* eslint-enable no-underscore-dangle */ | ||
loadIntl(locale); | ||
@@ -35,0 +47,0 @@ } |
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
92473
1180