babel-plugin-formatjs
Advanced tools
Comparing version 10.2.3 to 10.2.4
{ | ||
"name": "babel-plugin-formatjs", | ||
"version": "10.2.3", | ||
"version": "10.2.4", | ||
"description": "Extracts string messages for translation from modules that use formatjs.", | ||
@@ -19,4 +19,4 @@ "repository": { | ||
"@babel/types": "^7.9.5", | ||
"@formatjs/icu-messageformat-parser": "1.1.1", | ||
"@formatjs/ts-transformer": "3.3.3", | ||
"@formatjs/icu-messageformat-parser": "1.1.2", | ||
"@formatjs/ts-transformer": "3.3.4", | ||
"@types/babel__core": "^7.1.7", | ||
@@ -23,0 +23,0 @@ "@types/babel__helper-plugin-utils": "7", |
@@ -57,6 +57,10 @@ "use strict"; | ||
var defaultMessageProp = properties.find(function (prop) { | ||
return prop.get('key').isIdentifier({ name: 'defaultMessage' }); | ||
var keyProp = prop.get('key'); | ||
return (keyProp.isIdentifier({ name: 'defaultMessage' }) || | ||
keyProp.isStringLiteral({ value: 'defaultMessage' })); | ||
}); | ||
var idProp = properties.find(function (prop) { | ||
return prop.get('key').isIdentifier({ name: 'id' }); | ||
var keyProp = prop.get('key'); | ||
return (keyProp.isIdentifier({ name: 'id' }) || | ||
keyProp.isStringLiteral({ value: 'id' })); | ||
}); | ||
@@ -72,3 +76,7 @@ // Insert ID potentially 1st before removing nodes | ||
(_a = properties | ||
.find(function (prop) { return prop.get('key').isIdentifier({ name: 'description' }); })) === null || _a === void 0 ? void 0 : _a.remove(); | ||
.find(function (prop) { | ||
var keyProp = prop.get('key'); | ||
return (keyProp.isIdentifier({ name: 'description' }) || | ||
keyProp.isStringLiteral({ value: 'description' })); | ||
})) === null || _a === void 0 ? void 0 : _a.remove(); | ||
// Pre-parse or remove defaultMessage | ||
@@ -75,0 +83,0 @@ if (defaultMessageProp) { |
Sorry, the diff of this file is not supported yet
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
28201
517
+ Added@formatjs/icu-messageformat-parser@1.1.2(transitive)
+ Added@formatjs/ts-transformer@3.3.4(transitive)
- Removed@formatjs/icu-messageformat-parser@1.1.1(transitive)
- Removed@formatjs/ts-transformer@3.3.3(transitive)