Socket
Socket
Sign inDemoInstall

@lingui/macro

Package Overview
Dependencies
101
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.13.2 to 3.13.3

6

global.d.ts

@@ -122,5 +122,5 @@ // @ts-ignore

* const message = selectOrdinal(count, {
* one: "1st",
* two: "2nd",
* few: "3rd",
* one: "#st",
* two: "#nd",
* few: "#rd",
* other: "#th",

@@ -127,0 +127,0 @@ * });

@@ -114,5 +114,5 @@ import type { ReactElement, ComponentType, ReactNode } from "react"

* const message = selectOrdinal(count, {
* one: "1st",
* two: "2nd",
* few: "3rd",
* one: "#st",
* two: "#nd",
* few: "#rd",
* other: "#th",

@@ -176,2 +176,3 @@ * });

context?: string
children?: React.ReactNode
component?: React.ComponentType<TransRenderProps>

@@ -178,0 +179,0 @@ render?: (props: TransRenderProps) => ReactElement<any, any> | null

@@ -69,2 +69,9 @@ "use strict";

(0, _defineProperty2.default)(this, "elementIndex", void 0);
(0, _defineProperty2.default)(this, "safeJsxAttribute", function (name, value) {
// Quoted JSX attributes use XML-style escapes instead of JavaScript-style escapes.
// This means that <Trans id="Say \"hi\"!" /> is invalid, but <Trans id={"Say \"hi\"!"} /> is valid.
// We could consider removing this condition and always wrap in a jsxExpressionContainer.
var attributeValue = value.includes('"') ? _this.types.jsxExpressionContainer(_this.types.stringLiteral(value)) : _this.types.stringLiteral(value);
return _this.types.jsxAttribute(_this.types.jsxIdentifier(name), attributeValue);
});
(0, _defineProperty2.default)(this, "replacePath", function (path) {

@@ -97,7 +104,7 @@ var tokens = _this.tokenizeNode(path.node);

if (message) {
attributes.push(_this.types.jsxAttribute(_this.types.jsxIdentifier(_constants.MESSAGE), _this.types.stringLiteral(message)));
attributes.push(_this.safeJsxAttribute(_constants.MESSAGE, message));
}
}
} else {
attributes.push(_this.types.jsxAttribute(_this.types.jsxIdentifier(_constants.ID), _this.types.stringLiteral(message)));
attributes.push(_this.safeJsxAttribute(_constants.ID, message));
}

@@ -104,0 +111,0 @@

{
"name": "@lingui/macro",
"version": "3.13.2",
"version": "3.13.3",
"description": "Macro for generating messages in ICU MessageFormat syntax",

@@ -33,3 +33,3 @@ "main": "index.js",

"@babel/runtime": "^7.11.2",
"@lingui/conf": "^3.13.2",
"@lingui/conf": "^3.13.3",
"ramda": "^0.27.1"

@@ -36,0 +36,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc