From 3cc7d6d51dbc2893123649f782b20172ee7125e7 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Tue, 13 Oct 2015 10:55:47 -0700 Subject: [PATCH 1/2] [added] Peer dependency on history package Fixes #2211 Fixes #2252 --- README.md | 6 +++++- package.json | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b4de31a29..9cb7b87b0e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,11 @@ We support all browsers and environments where React runs. #### npm + webpack/browserify - $ npm install react-router@1.0.0-rc3 +Install using [npm](https://www.npmjs.com/): + + $ npm install history react-router@latest + +Note that you need to also install the [history](https://www.npmjs.com/package/history) package since it is a peer dependency of React Router and won't automatically be installed for you in npm 3+. Then with a module bundler or webpack, use as you would anything else: diff --git a/package.json b/package.json index 94d26fa678..082b690b9e 100644 --- a/package.json +++ b/package.json @@ -24,10 +24,12 @@ ], "license": "MIT", "dependencies": { - "history": "1.12.3", "invariant": "^2.0.0", "warning": "^2.0.0" }, + "peerDependencies": { + "history": "~1" + }, "devDependencies": { "babel": "^5.4.7", "babel-core": "^5.4.7", @@ -41,6 +43,7 @@ "express": "^4.13.3", "express-urlrewrite": "^1.2.0", "gzip-size": "^3.0.0", + "history": "^1.12.5", "karma": "^0.13.8", "karma-browserstack-launcher": "^0.1.4", "karma-chrome-launcher": "^0.2.0", From 8f729138ee86b722cade0f085bca8f7323609b64 Mon Sep 17 00:00:00 2001 From: Tim Dorr Date: Tue, 13 Oct 2015 17:14:32 -0400 Subject: [PATCH 2/2] Fix for pushState change in history useQueries. --- modules/__tests__/Link-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/__tests__/Link-test.js b/modules/__tests__/Link-test.js index 9b245a2710..7abc37525e 100644 --- a/modules/__tests__/Link-test.js +++ b/modules/__tests__/Link-test.js @@ -302,7 +302,7 @@ describe('A ', function () { }, function () { expect(node.innerHTML).toMatch(/Hello/) - expect(spy).toHaveBeenCalledWith({ you: 'doing?' }, '/hello#world?how=are') + expect(spy).toHaveBeenCalledWith({ you: 'doing?' }, { pathname: '/hello', search: '?how=are', hash: '#world' }) } ]