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

react-router-path-normalize

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-path-normalize - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

31

lib/index.js

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -6,16 +6,13 @@ Object.defineProperty(exports, "__esModule", {

});
exports.default = void 0;
var _react = require('react');
var React = _interopRequireWildcard(require("react"));
var React = _interopRequireWildcard(_react);
var _reactRouter = require("react-router");
var _reactRouter = require('react-router');
var _pathNormalize = _interopRequireDefault(require("path-normalize"));
var _pathNormalize = require('path-normalize');
var _pathNormalize2 = _interopRequireDefault(_pathNormalize);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

@@ -30,10 +27,14 @@ var handleTraversal = function handleTraversal(path) {

var _ref$location$pathnam = _ref.location.pathname,
pathname = _ref$location$pathnam === undefined ? '' : _ref$location$pathnam,
pathname = _ref$location$pathnam === void 0 ? '' : _ref$location$pathnam,
children = _ref.children;
var normalized = (0, _pathNormalize.default)(handleTraversal(pathname));
return normalized === pathname ? children : React.createElement(_reactRouter.Redirect, {
to: normalized
});
}; // $FlowFixMe
var normalized = (0, _pathNormalize2.default)(handleTraversal(pathname));
return normalized === pathname ? children : React.createElement(_reactRouter.Redirect, { to: normalized });
};
exports.default = (0, _reactRouter.withRouter)(Normalize);
module.exports = exports['default'];
var _default = (0, _reactRouter.withRouter)(Normalize);
exports.default = _default;
module.exports = exports.default;
{
"name": "react-router-path-normalize",
"description": "Normalize paths for React Router.",
"version": "1.3.3",
"version": "1.3.4",
"author": {
"email": "zac@zacanger.com",
"name": "Zac Anger",
"email": "zac@zacanger.com",
"url": "http://zacanger.com"

@@ -17,2 +17,3 @@ },

"build": "babel src/index.js --out-file lib/index.js",
"clean": "rm -rf lib && mkdir -p lib",
"cover": "run-s -s cover:tape cover:flow",

@@ -23,4 +24,3 @@ "cover:flow": "flow-coverage-report --config .flow-coverage-report.json",

"prebuild": "run-s -s test:lint cover clean",
"clean": "rm -rf lib && mkdir -p lib",
"preversion": "npm run build",
"preversion": "npm run build && sortpack",
"test": "run-s -s test:lint test:flow test:tape",

@@ -46,32 +46,33 @@ "test:flow": "flow && flow stop",

"dependencies": {
"path-normalize": "3.0.2"
"path-normalize": "3.0.4"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-eslint": "8.2.6",
"babel-plugin-add-module-exports": "0.2.1",
"babel-preset-env": "1.7.0",
"babel-preset-flow": "6.23.0",
"babel-preset-react": "6.24.1",
"babel-preset-stage-3": "6.24.1",
"babel-tape-runner": "2.0.1",
"eslint": "5.3.0",
"eslint-config-zacanger": "3.4.1",
"eslint-plugin-babel": "5.1.0",
"eslint-plugin-flowtype": "2.50.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.1",
"eslint-plugin-promise": "3.8.0",
"eslint-plugin-react": "7.11.1",
"eslint-plugin-unicorn": "5.0.0",
"flow-bin": "0.78.0",
"flow-coverage-report": "0.5.0",
"npm-run-all": "4.1.3",
"nyc": "12.0.2",
"@babel/cli": "7.2.3",
"@babel/core": "7.3.4",
"@babel/preset-env": "7.3.4",
"@babel/preset-flow": "7.0.0",
"@babel/preset-react": "7.0.0",
"babel-eslint": "10.0.1",
"babel-plugin-add-module-exports": "1.0.0",
"babel-tape-runner": "3.0.0",
"eslint": "5.15.1",
"eslint-config-zacanger": "3.4.2",
"eslint-plugin-babel": "5.3.0",
"eslint-plugin-flowtype": "3.4.2",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-unicorn": "7.1.0",
"flow-bin": "0.95.0",
"flow-coverage-report": "0.6.1",
"npm-run-all": "4.1.5",
"nyc": "13.3.0",
"react": "16.4.2",
"react-dom": "16.4.2",
"react-dom": "16.8.4",
"react-router": "4.3.1",
"react-router-dom": "4.3.1",
"react-test-renderer": "16.4.2",
"tape": "4.9.1"
"react-test-renderer": "16.8.4",
"sortpack": "1.1.3",
"tape": "4.10.1"
},

@@ -85,6 +86,2 @@ "engines": {

],
"require": [
"babel-register"
],
"sourceMap": true,
"instrument": true,

@@ -95,8 +92,12 @@ "reporter": [

"html"
]
],
"require": [
"@babel/register"
],
"sourceMap": true
},
"peerDependencies": {
"react": "^15.6.1 || ^16.0.0",
"react-router": "^4.1.2"
"react": "^16.8.4",
"react-router": "^4.3.1"
}
}

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