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

@visma/react-intl-helpers

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visma/react-intl-helpers - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 0.1.2
* Do not use legacy lifecycle methods.
* Fix: Ensure same hash value for each messages object.
# 0.1.1

@@ -2,0 +7,0 @@

29

cjs/Localize/IntlProviderWrapper.js

@@ -32,4 +32,2 @@ "use strict";

var _propTypes = require("prop-types");
var _reactIntl = require("react-intl");

@@ -121,21 +119,12 @@

(0, _createClass2.default)(IntlProviderWrapper, [{
key: "getChildContext",
value: function getChildContext() {
var locale = this.props.locale;
return {
locale: locale
};
key: "componentDidMount",
value: function componentDidMount() {
this.switchLocale(this.props.locale);
}
}, {
key: "componentWillMount",
value: function componentWillMount() {
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.switchLocale(this.props.locale);
}
}, {
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(_ref3) {
var locale = _ref3.locale;
this.switchLocale(locale);
}
}, {
key: "setLocale",

@@ -165,10 +154,2 @@ value: function setLocale(locale) {

exports.default = IntlProviderWrapper;
Object.defineProperty(IntlProviderWrapper, "childContextTypes", {
configurable: true,
enumerable: true,
writable: true,
value: {
locale: _propTypes.string.isRequired
}
});
//# sourceMappingURL=IntlProviderWrapper.js.map

@@ -10,6 +10,8 @@ "use strict";

var _stringify = _interopRequireDefault(require("@babel/runtime/core-js/json/stringify"));
var _jsonStableStringify = _interopRequireDefault(require("json-stable-stringify"));
var _default = function _default(data) {
return (0, _stringify.default)(data, null, 2);
return (0, _jsonStableStringify.default)(data, {
space: ' '
});
};

@@ -16,0 +18,0 @@

@@ -11,3 +11,2 @@ import _extends from "@babel/runtime/helpers/extends";

import React from "react";
import { string } from 'prop-types';
import { Component } from 'react';

@@ -96,21 +95,12 @@ import { IntlProvider } from 'react-intl';

_createClass(IntlProviderWrapper, [{
key: "getChildContext",
value: function getChildContext() {
var locale = this.props.locale;
return {
locale: locale
};
key: "componentDidMount",
value: function componentDidMount() {
this.switchLocale(this.props.locale);
}
}, {
key: "componentWillMount",
value: function componentWillMount() {
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.switchLocale(this.props.locale);
}
}, {
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(_ref3) {
var locale = _ref3.locale;
this.switchLocale(locale);
}
}, {
key: "setLocale",

@@ -140,11 +130,3 @@ value: function setLocale(locale) {

Object.defineProperty(IntlProviderWrapper, "childContextTypes", {
configurable: true,
enumerable: true,
writable: true,
value: {
locale: string.isRequired
}
});
export { IntlProviderWrapper as default };
//# sourceMappingURL=IntlProviderWrapper.js.map

@@ -1,5 +0,7 @@

import _JSON$stringify from "@babel/runtime/core-js/json/stringify";
import stringify from 'json-stable-stringify';
export default (function (data) {
return _JSON$stringify(data, null, 2);
return stringify(data, {
space: ' '
});
});
//# sourceMappingURL=stringify.js.map
{
"name": "@visma/react-intl-helpers",
"version": "0.1.1",
"version": "0.1.2",
"description": "Modular messages.properties, loaded dynamically.",

@@ -41,2 +41,3 @@ "main": "cjs",

"intl": "^1.2.5",
"json-stable-stringify": "^1.0.1",
"loader-utils": "^1.1.0",

@@ -43,0 +44,0 @@ "lodash": "^4.17.5",

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

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