Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lingui-react

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lingui-react - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

<a name="1.3.0"></a>
# [1.3.0](https://github.com/lingui/js-lingui/compare/lingui-react@1.2.1...lingui-react@1.3.0) (2017-10-02)
### Bug Fixes
* Fix default text rendering ([ccf7e45](https://github.com/lingui/js-lingui/commit/ccf7e45))
### Features
* Render translation as a text only ([519d450](https://github.com/lingui/js-lingui/commit/519d450))
<a name="1.2.1"></a>

@@ -8,0 +24,0 @@ ## [1.2.1](https://github.com/lingui/js-lingui/compare/lingui-react@1.2.0...lingui-react@1.2.1) (2017-09-12)

15

dist/index.es.js

@@ -32,6 +32,12 @@ import { date, number } from 'lingui-formats';

var render = this.props.render || this.context.linguiDefaultRender || 'span';
var render = this.props.render !== undefined ? this.props.render : this.context.linguiDefaultRender;
// Built-in element: h1, p
if (typeof render === 'string') {
if (render === undefined) {
render = 'span';
}
if (render === null) {
return value;
} else if (typeof render === 'string') {
// Built-in element: h1, p
return React.createElement(render, { className: className }, value);

@@ -143,3 +149,4 @@ }

return React.createElement(WrappedComponent, _extends({ ref: this.setWrappedInstance }, this.props, { i18n: i18n }));
var props = _extends({}, this.props, withRef ? { ref: this.setWrappedInstance } : {});
return React.createElement(WrappedComponent, _extends({}, props, { i18n: i18n }));
}

@@ -146,0 +153,0 @@ }]);

@@ -39,6 +39,12 @@ 'use strict';

var render = this.props.render || this.context.linguiDefaultRender || 'span';
var render = this.props.render !== undefined ? this.props.render : this.context.linguiDefaultRender;
// Built-in element: h1, p
if (typeof render === 'string') {
if (render === undefined) {
render = 'span';
}
if (render === null) {
return value;
} else if (typeof render === 'string') {
// Built-in element: h1, p
return React__default.createElement(render, { className: className }, value);

@@ -150,3 +156,4 @@ }

return React__default.createElement(WrappedComponent, _extends({ ref: this.setWrappedInstance }, this.props, { i18n: i18n }));
var props = _extends({}, this.props, withRef ? { ref: this.setWrappedInstance } : {});
return React__default.createElement(WrappedComponent, _extends({}, props, { i18n: i18n }));
}

@@ -153,0 +160,0 @@ }]);

{
"name": "lingui-react",
"version": "1.2.1",
"version": "1.3.0",
"description": "React components for translations",

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

"peerDependencies": {
"react": "15.x || ^16.0.0-alpha"
"react": "^15.0.0"
},

@@ -39,4 +39,4 @@ "engines": {

"lingui-formats": "^1.0.3",
"lingui-i18n": "^1.3.0",
"prop-types": "^15.5.10"
"lingui-i18n": "^1.3.1",
"prop-types": "^15.6.0"
},

@@ -43,0 +43,0 @@ "scripts": {

@@ -28,5 +28,5 @@ [![License][Badge-License]][License]

[jsLingui]: https://github.com/lingui/js-lingui
[Documentation]: https://lingui.gitbooks.io/js/
[Tutorial]: https://lingui.gitbooks.io/js/tutorials/react.html
[Reference]: https://lingui.gitbooks.io/js/ref/react.html
[Documentation]: https://lingui.github.io/js-lingui/
[Tutorial]: https://lingui.github.io/js-lingui/tutorials/react.html
[Reference]: https://lingui.github.io/js-lingui/ref/react.html
[Package]: https://www.npmjs.com/package/lingui-react

@@ -33,0 +33,0 @@ [Badge-Downloads]: https://img.shields.io/npm/dw/lingui-react.svg

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 not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc