@visma/react-intl-helpers
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -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 @@ |
@@ -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
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
130860
11
1672
+ Addedjson-stable-stringify@^1.0.1
+ Addedcall-bind@1.0.7(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedjson-stable-stringify@1.1.1(transitive)
+ Addedjsonify@0.0.1(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedset-function-length@1.2.2(transitive)