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

react-localize

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-localize - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0-beta

20

build/Localization.js

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

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _localizeFormatter = require('./util/localize-formatter');

@@ -30,6 +34,6 @@

var element = _react.PropTypes.element;
var bool = _react.PropTypes.bool;
var func = _react.PropTypes.func;
var object = _react.PropTypes.object;
var element = _propTypes2.default.element,
bool = _propTypes2.default.bool,
func = _propTypes2.default.func,
object = _propTypes2.default.object;

@@ -42,3 +46,3 @@ var Localization = function (_React$Component) {

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Localization).call(this, props, context));
var _this = _possibleConstructorReturn(this, (Localization.__proto__ || Object.getPrototypeOf(Localization)).call(this, props, context));

@@ -61,5 +65,5 @@ _this.localize = _this.localize.bind(_this);

values = values || [];
var _props = this.props;
var messages = _props.messages;
var xLocale = _props.xLocale;
var _props = this.props,
messages = _props.messages,
xLocale = _props.xLocale;

@@ -66,0 +70,0 @@

10

build/LocalizationConnector.js

@@ -13,2 +13,6 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -18,4 +22,4 @@

var LocalizeConnected = function LocalizeConnected(props, context) {
var localize = context.localize;
var _localizeDebug = context._localizeDebug;
var localize = context.localize,
_localizeDebug = context._localizeDebug;

@@ -42,3 +46,3 @@

LocalizeConnected.contextTypes = {
localize: _react.PropTypes.func
localize: _propTypes2.default.func
};

@@ -45,0 +49,0 @@

@@ -15,2 +15,6 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _lodash = require('lodash.get');

@@ -33,3 +37,3 @@

exports.default = function (ComposedComponent) {
var messages = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var customLocalizer = arguments[2];

@@ -43,3 +47,3 @@

return _possibleConstructorReturn(this, Object.getPrototypeOf(ConfigureLocalization).apply(this, arguments));
return _possibleConstructorReturn(this, (ConfigureLocalization.__proto__ || Object.getPrototypeOf(ConfigureLocalization)).apply(this, arguments));
}

@@ -76,3 +80,3 @@

ConfigureLocalization.displayName = 'Wrapped' + (ComposedComponent.displayName || ComposedComponent.name || 'Component');
ConfigureLocalization.childContextTypes = _extends({}, ComposedComponent.childContextTypes, { localize: _react.PropTypes.func });
ConfigureLocalization.childContextTypes = _extends({}, ComposedComponent.childContextTypes, { localize: _propTypes2.default.func });

@@ -79,0 +83,0 @@ return ConfigureLocalization;

@@ -11,2 +11,6 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -16,19 +20,18 @@

var arrayOf = _react.PropTypes.arrayOf;
var bool = _react.PropTypes.bool;
var func = _react.PropTypes.func;
var string = _react.PropTypes.string;
var any = _react.PropTypes.any;
var arrayOf = _propTypes2.default.arrayOf,
bool = _propTypes2.default.bool,
func = _propTypes2.default.func,
string = _propTypes2.default.string,
any = _propTypes2.default.any;
var Text = function Text(props, context) {
var message = props.message;
var values = props.values;
var message = props.message,
values = props.values,
rest = _objectWithoutProperties(props, ['message', 'values']);
var rest = _objectWithoutProperties(props, ['message', 'values']);
var localize = context.localize,
_localizeDebug = context._localizeDebug;
var localize = context.localize;
var _localizeDebug = context._localizeDebug;
var localized = message;

@@ -35,0 +38,0 @@

@@ -10,2 +10,14 @@ # Change Log

## 3.0.0-beta 2017-04-26
### Added
- Support for React 15.5 💯
- `peerDependencies` now includes `prop-types` 🎉.
- I don't have a strategy yet for you to only include that in development, and
strip PropTypes in prod bundles, but that is what you should do especially if size is a concern.
### Changed
- Updated devDependencies for mocha & babel-register 👍
- Update Travis CI matrix to test against a wider variety of
node and react versions.
## 2.0.1 2017-04-03

@@ -12,0 +24,0 @@ ### Added

{
"name": "react-localize",
"version": "2.0.1",
"version": "3.0.0-beta",
"description": "A simple context wrapper and text localization component for localizing strings",
"main": "build/index.js",
"files": ["build"],
"files": [
"build"
],
"scripts": {

@@ -35,7 +37,11 @@ "build": "gulp build",

"peerDependencies": {
"react": "^0.14.6 || 15.x"
"prop-types": ">=15",
"react": "^0.14.9 || >=15"
},
"devDependencies": {
"babel-preset-netflix-dea": "1.0.0-alpha.2",
"babel-register": "6.24.0",
"babel-preset-latest": "6.24.1",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-transform-react-jsx": "6.23.0",
"babel-preset-stage-2": "6.24.1",
"babel-register": "6.24.1",
"chai": "3.5.0",

@@ -52,6 +58,7 @@ "eslint": "3.19.0",

"gulp-util": "3.0.8",
"mocha": "3.2.0",
"react": "0.14.6 || 15.x",
"react-dom": "0.14.6 || 15.x"
"mocha": "3.3.0",
"prop-types": ">=15",
"react": "^0.14.9 || >=15",
"react-dom": "^0.14.9 || >=15"
}
}
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