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

redux-router-kit

Package Overview
Dependencies
Maintainers
5
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-router-kit - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

.idea/codeStyles/codeStyleConfig.xml

4

lib/components/History.js

@@ -62,3 +62,3 @@ 'use strict';

},
componentWillMount: function componentWillMount() {
UNSAFE_componentWillMount: function UNSAFE_componentWillMount() {
var _this = this;

@@ -145,3 +145,3 @@

},
componentWillReceiveProps: function componentWillReceiveProps(_ref3) {
UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(_ref3) {
var url = _ref3.url,

@@ -148,0 +148,0 @@ state = _ref3.state,

@@ -223,6 +223,8 @@ 'use strict';

var normalizeRoute = function normalizeRoute(pathPattern, value) {
var isComponent = typeof value === 'function' || (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.hasOwnProperty('$$typeof');
var route = {
path: pathPattern
};
if (typeof value === 'function') {
if (isComponent) {
return _extends({}, route, {

@@ -314,3 +316,5 @@ component: value

if (typeof component !== 'function' && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) {
var isComponent = typeof component === 'function' || (typeof component === 'undefined' ? 'undefined' : _typeof(component)) === 'object' && component.hasOwnProperty('$$typeof');
if (!isComponent && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) {
return childElement;

@@ -733,3 +737,3 @@ }

},
componentWillMount: function componentWillMount() {
UNSAFE_componentWillMount: function UNSAFE_componentWillMount() {
var _this = this;

@@ -816,3 +820,3 @@

},
componentWillReceiveProps: function componentWillReceiveProps(_ref3) {
UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(_ref3) {
var url = _ref3.url,

@@ -819,0 +823,0 @@ state = _ref3.state,

@@ -38,3 +38,5 @@ 'use strict';

if (typeof component !== 'function' && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) {
var isComponent = typeof component === 'function' || (typeof component === 'undefined' ? 'undefined' : _typeof(component)) === 'object' && component.hasOwnProperty('$$typeof');
if (!isComponent && (!component || (typeof components === 'undefined' ? 'undefined' : _typeof(components)) !== 'object')) {
return childElement;

@@ -41,0 +43,0 @@ }

@@ -7,6 +7,6 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
/**

@@ -18,6 +18,8 @@ * "Normalizes" routes to be an object with a `path`. If a route points directly

var normalizeRoute = function normalizeRoute(pathPattern, value) {
var isComponent = typeof value === 'function' || (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.hasOwnProperty('$$typeof');
var route = {
path: pathPattern
};
if (typeof value === 'function') {
if (isComponent) {
return _extends({}, route, {

@@ -24,0 +26,0 @@ component: value

{
"name": "redux-router-kit",
"version": "1.1.3",
"version": "1.1.4",
"description": "Routing tools for React+Redux",

@@ -39,10 +39,9 @@ "main": "lib/index.js",

"babel-register": "^6.7.2",
"create-react-class": "^15.6.2",
"eslint": "^2.5.3",
"eslint-plugin-react": "^4.2.3",
"jsdom": "^8.2.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-redux": "^4.4.1",
"redux": "^3.3.1",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"rollup": "^0.41.6",

@@ -53,2 +52,3 @@ "rollup-plugin-babel": "^2.7.1",

"dependencies": {
"create-react-class": "15.6.3",
"history": "^2.0.1",

@@ -61,4 +61,6 @@ "path-to-regexp": "^1.2.1",

"peerDependencies": {
"react": ">= 16.0.0",
"react-dom": ">= 16.0.0"
"react": ">= 16.9.0",
"react-dom": ">= 16.9.0",
"react-redux": ">= 7.0.0",
"redux": ">= 4.0.0"
},

@@ -65,0 +67,0 @@ "ava": {

@@ -305,3 +305,3 @@ # Redux Router Kit

(dispatch) => {
routeTo(..args) {
routeTo(...args) {
dispatch(routeTo(...args));

@@ -308,0 +308,0 @@ }

@@ -51,3 +51,3 @@ /**

componentWillMount() {
UNSAFE_componentWillMount() {
const { shouldEmitCrossOriginLinks } = this.props;

@@ -130,3 +130,3 @@ this.history = this.props.history || createHistory();

componentWillReceiveProps({url, state, isWaiting}) {
UNSAFE_componentWillReceiveProps({url, state, isWaiting}) {
// Cancel synchronously.

@@ -133,0 +133,0 @@ if (this.waitingUrl != null && !isWaiting) {

@@ -18,3 +18,6 @@ /**

const { component, components } = route;
if (typeof component !== 'function' && (!component || typeof components !== 'object')) {
const isComponent = typeof component === 'function' ||
(typeof component === 'object' && component.hasOwnProperty('$$typeof'));
if (!isComponent && (!component || typeof components !== 'object')) {
return childElement;

@@ -21,0 +24,0 @@ }

@@ -7,9 +7,12 @@ /**

const normalizeRoute = (pathPattern, value) => {
const isComponent = typeof value === 'function' ||
(typeof value === 'object' && value.hasOwnProperty('$$typeof'));
const route = {
path: pathPattern
path: pathPattern,
};
if (typeof value === 'function') {
if (isComponent) {
return {
...route,
component: value
component: value,
};

@@ -23,3 +26,3 @@ }

...value,
...route
...route,
};

@@ -30,3 +33,3 @@ }

...route,
name: value
name: value,
};

@@ -36,3 +39,3 @@ }

...route,
value
value,
};

@@ -39,0 +42,0 @@ };

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