react-i18next
Advanced tools
Comparing version 11.16.1 to 11.16.2
@@ -0,1 +1,5 @@ | ||
### 11.16.2 | ||
- update macro to wrap defaults in brackets when necessary [1472](https://github.com/i18next/react-i18next/pull/1472) | ||
### 11.16.1 | ||
@@ -2,0 +6,0 @@ |
@@ -265,5 +265,16 @@ const { createMacro } = require('babel-plugin-macros'); | ||
if (!attributeExistsAlready('defaults', finalAttributes)) | ||
finalAttributes.push( | ||
t.jSXAttribute(t.jSXIdentifier('defaults'), t.StringLiteral(extracted.defaults)), | ||
); | ||
if (extracted.defaults.includes(`"`)) { | ||
// wrap defaults that contain double quotes in brackets | ||
finalAttributes.push( | ||
t.jSXAttribute( | ||
t.jSXIdentifier('defaults'), | ||
t.jSXExpressionContainer(t.StringLiteral(extracted.defaults)), | ||
), | ||
); | ||
} else { | ||
finalAttributes.push( | ||
t.jSXAttribute(t.jSXIdentifier('defaults'), t.StringLiteral(extracted.defaults)), | ||
); | ||
} | ||
if (!attributeExistsAlready('components', finalAttributes)) | ||
@@ -270,0 +281,0 @@ finalAttributes.push( |
{ | ||
"name": "react-i18next", | ||
"version": "11.16.1", | ||
"version": "11.16.2", | ||
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js", |
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
344832
6108