Skip to content

Commit 070cc1a

Browse files
author
Callum
committed
Update dependencies
1 parent 5d595ec commit 070cc1a

File tree

7 files changed

+40
-42
lines changed

7 files changed

+40
-42
lines changed

.eslintrc

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
{
22
"extends": "airbnb",
3-
"env": {
4-
"browser": true,
5-
"node": true
6-
},
73
"rules": {
4+
"comma-dangle": [2, "never"],
85
"semi": [2, "never"],
9-
"space-before-function-paren": [2, "always"],
10-
"comma-dangle": 0
11-
},
12-
"plugins": [
13-
"react"
14-
]
6+
"space-before-function-paren": [2, "always"]
7+
}
158
}

.npmignore

Whitespace-only changes.

package.json

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
"path-parser": "^0.3.2"
88
},
99
"devDependencies": {
10-
"babel": "^5.8.23",
11-
"babel-eslint": "^4.1.1",
12-
"babelify": "^6.3.0",
13-
"browserify": "^11.0.1",
14-
"eslint": "^1.3.1",
15-
"eslint-config-airbnb": "0.0.8",
16-
"eslint-plugin-react": "^3.3.1",
17-
"rimraf": "^2.4.3",
18-
"tape": "^4.2.0",
19-
"tape-run": "^1.1.0"
10+
"babel-cli": "^6.3.17",
11+
"babel-preset-es2015": "^6.3.13",
12+
"babelify": "^7.2.0",
13+
"browserify": "^12.0.1",
14+
"eslint": "^1.10.3",
15+
"eslint-config-airbnb": "^2.1.1",
16+
"eslint-plugin-react": "^3.13.0",
17+
"rimraf": "^2.5.0",
18+
"tape": "^4.3.0",
19+
"tape-run": "^2.1.0"
2020
},
2121
"scripts": {
22-
"build": "babel src --out-dir lib --stage 0",
22+
"build": "babel src --out-dir lib --presets es2015",
2323
"check": "npm run lint && npm test",
2424
"clean": "rimraf lib",
2525
"lint": "eslint src test",
2626
"prepublish": "npm run clean && npm run build",
27-
"test": "browserify test/*.js -t [ babelify --stage 0 ] | tape-run"
27+
"test": "browserify test/*.js -t [ babelify --presets [ es2015 ] ] | tape-run"
2828
},
2929
"repository": {
3030
"type": "git",
@@ -42,5 +42,10 @@
4242
"url": "https://github.com/callum/redux-routing/issues"
4343
},
4444
"homepage": "https://github.com/callum/redux-routing",
45-
"version": "0.3.0"
45+
"version": "0.3.0",
46+
"files": [
47+
"lib",
48+
"src",
49+
"test"
50+
]
4651
}

src/createMiddleware.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ export default function createMiddleware (History) {
2929
query = querystring.parse(parsed.query)
3030
}
3131

32-
const result = next({
33-
...action,
32+
const result = next(Object.assign({}, action, {
3433
href: url.format(location),
3534
location,
3635
query
37-
})
36+
}))
3837

3938
if (history) {
4039
history.update(result)

src/index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
export createMiddleware from './createMiddleware'
2-
export Hash from './Hash'
3-
export History from './History'
4-
export match from './match'
5-
export reducer from './reducer'
6-
export route from './route'
1+
import createMiddleware from './createMiddleware'
2+
import Hash from './Hash'
3+
import History from './History'
4+
import match from './match'
5+
import reducer from './reducer'
6+
import route from './route'
7+
8+
export { createMiddleware, Hash, History, match, reducer, route }
79
export { navigate, replace } from './actions'

src/reducer.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { NAVIGATE, REPLACE } from './constants'
22

33
export default function reducer (route = {}, action) {
44
switch (action.type) {
5-
case NAVIGATE:
6-
case REPLACE:
7-
return {
8-
href: action.href,
9-
location: action.location,
10-
query: action.query
11-
}
5+
case NAVIGATE:
6+
case REPLACE:
7+
return {
8+
href: action.href,
9+
location: action.location,
10+
query: action.query
11+
}
1212

13-
default:
14-
return route
13+
default:
14+
return route
1515
}
1616
}

test/match.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'babelify/polyfill'
21
import test from 'tape'
32
import match from '../src/match'
43

0 commit comments

Comments
 (0)