Socket
Socket
Sign inDemoInstall

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.3.6 to 1.4.0

13

CHANGELOG.md

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

<a name="1.4.0"></a>
# [1.4.0](https://github.com/lingui/js-lingui/compare/lingui-react@1.3.6...lingui-react@1.4.0) (2017-11-21)
### Features
* Add forPure option for withI18n ([a47a22e](https://github.com/lingui/js-lingui/commit/a47a22e))
* Calculate quick hash of active language and messages ([24aef30](https://github.com/lingui/js-lingui/commit/24aef30))
* Enable i18n hash by default ([4a5a371](https://github.com/lingui/js-lingui/commit/4a5a371))
<a name="1.3.6"></a>

@@ -8,0 +21,0 @@ ## [1.3.6](https://github.com/lingui/js-lingui/compare/lingui-react@1.3.5...lingui-react@1.3.6) (2017-11-19)

11

dist/index.es.js

@@ -10,2 +10,3 @@ import { date, number } from 'lingui-formats';

import _extends from 'babel-runtime/helpers/extends';
import hashSum from 'hash-sum';
import { setupI18n } from 'lingui-i18n';

@@ -89,2 +90,4 @@ import _getIterator from 'babel-runtime/core-js/get-iterator';

update = _options$update === undefined ? true : _options$update,
_options$withHash = options.withHash,
withHash = _options$withHash === undefined ? true : _options$withHash,
_options$withRef = options.withRef,

@@ -148,5 +151,6 @@ withRef = _options$withRef === undefined ? false : _options$withRef;

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

@@ -195,2 +199,3 @@ }

i18n: i18n,
i18nHash: null,

@@ -218,2 +223,4 @@ getSubscribers: function getSubscribers() {

this.i18nHash = hashSum([i18n.language, i18n.messages]);
subscribers.forEach(function (f) {

@@ -220,0 +227,0 @@ return f();

@@ -17,2 +17,3 @@ 'use strict';

var _extends = _interopDefault(require('babel-runtime/helpers/extends'));
var hashSum = _interopDefault(require('hash-sum'));
var linguiI18n = require('lingui-i18n');

@@ -96,2 +97,4 @@ var _getIterator = _interopDefault(require('babel-runtime/core-js/get-iterator'));

update = _options$update === undefined ? true : _options$update,
_options$withHash = options.withHash,
withHash = _options$withHash === undefined ? true : _options$withHash,
_options$withRef = options.withRef,

@@ -155,5 +158,6 @@ withRef = _options$withRef === undefined ? false : _options$withRef;

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

@@ -202,2 +206,3 @@ }

i18n: i18n,
i18nHash: null,

@@ -225,2 +230,4 @@ getSubscribers: function getSubscribers() {

this.i18nHash = hashSum([i18n.language, i18n.messages]);
subscribers.forEach(function (f) {

@@ -227,0 +234,0 @@ return f();

3

package.json
{
"name": "lingui-react",
"version": "1.3.6",
"version": "1.4.0",
"description": "React components for translations",

@@ -37,2 +37,3 @@ "main": "index.js",

"babel-runtime": "^6.26.0",
"hash-sum": "^1.0.2",
"lingui-formats": "^1.0.3",

@@ -39,0 +40,0 @@ "lingui-i18n": "^1.3.3",

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