Skip to content

Commit 499575d

Browse files
authored
Merge pull request #85 from taion/update
Update dependencies
2 parents cc8b034 + 116159c commit 499575d

File tree

8 files changed

+4648
-41
lines changed

8 files changed

+4648
-41
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"presets": [
3-
["latest", {
4-
"es2015": { "loose": true }
3+
["env", {
4+
"loose": true
55
}],
66
"stage-1",
77
"react"

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ env:
88
- BROWSER=ChromeCi
99
- BROWSER=Firefox
1010

11-
cache:
12-
directories:
13-
- node_modules
11+
cache: yarn
1412

1513
before_install:
1614
- export CHROME_BIN=chromium-browser

karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ module.exports = (config) => {
1414

1515
webpack: {
1616
module: {
17-
loaders: [
18-
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
17+
rules: [
18+
{ test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' },
1919
],
2020
},
2121
plugins: [

package.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"homepage": "https://github.com/taion/react-router-scroll#readme",
3232
"dependencies": {
33-
"prop-types": "^15.5.6",
33+
"prop-types": "^15.6.0",
3434
"scroll-behavior": "^0.9.3",
3535
"warning": "^3.0.0"
3636
},
@@ -41,41 +41,42 @@
4141
"react-router": "^2.3.0 || ^3.0.0"
4242
},
4343
"devDependencies": {
44-
"babel-cli": "^6.18.0",
45-
"babel-core": "^6.18.2",
46-
"babel-eslint": "^7.1.0",
47-
"babel-loader": "^6.2.7",
44+
"babel-cli": "^6.26.0",
45+
"babel-core": "^6.26.0",
46+
"babel-eslint": "^7.2.3",
47+
"babel-loader": "^7.1.2",
4848
"babel-plugin-add-module-exports": "^0.2.1",
4949
"babel-plugin-dev-expression": "^0.2.1",
50-
"babel-polyfill": "^6.16.0",
51-
"babel-preset-latest": "^6.16.0",
52-
"babel-preset-react": "^6.16.0",
53-
"babel-preset-stage-1": "^6.16.0",
54-
"chai": "^3.5.0",
55-
"cross-env": "^3.1.3",
56-
"dirty-chai": "^1.2.2",
57-
"dom-helpers": "^3.0.0",
58-
"eslint": "^3.9.1",
59-
"eslint-config-4catalyzer-react": "^0.1.3",
60-
"eslint-plugin-import": "^1.16.0",
61-
"eslint-plugin-jsx-a11y": "^2.2.3",
62-
"eslint-plugin-react": "^6.5.0",
50+
"babel-polyfill": "^6.26.0",
51+
"babel-preset-env": "^1.6.0",
52+
"babel-preset-react": "^6.24.1",
53+
"babel-preset-stage-1": "^6.24.1",
54+
"chai": "^4.1.2",
55+
"create-react-class": "^15.6.2",
56+
"cross-env": "^5.0.5",
57+
"dirty-chai": "^2.0.1",
58+
"dom-helpers": "^3.2.1",
59+
"eslint": "^4.7.2",
60+
"eslint-config-4catalyzer-react": "^0.3.2",
61+
"eslint-plugin-import": "^2.7.0",
62+
"eslint-plugin-jsx-a11y": "^5.1.1",
63+
"eslint-plugin-react": "^7.4.0",
6364
"history": "^2.1.2",
64-
"karma": "^1.3.0",
65-
"karma-chrome-launcher": "^2.0.0",
66-
"karma-firefox-launcher": "^1.0.0",
67-
"karma-mocha": "^1.2.0",
68-
"karma-mocha-reporter": "^2.2.0",
69-
"karma-sinon-chai": "^1.2.4",
65+
"karma": "^1.7.1",
66+
"karma-chrome-launcher": "^2.2.0",
67+
"karma-firefox-launcher": "^1.0.1",
68+
"karma-mocha": "^1.3.0",
69+
"karma-mocha-reporter": "^2.2.4",
70+
"karma-sinon-chai": "^1.3.2",
7071
"karma-sourcemap-loader": "^0.3.7",
71-
"karma-webpack": "^1.8.0",
72-
"mocha": "^3.1.2",
73-
"react": "^15.5.3",
74-
"react-dom": "^15.5.3",
72+
"karma-webpack": "^2.0.4",
73+
"mocha": "^3.5.3",
74+
"react": "^16.0.0",
75+
"react-dom": "^16.0.0",
7576
"react-router": "^2.8.1",
76-
"rimraf": "^2.5.4",
77-
"sinon": "^1.17.6",
78-
"sinon-chai": "^2.8.0",
79-
"webpack": "^1.13.3"
77+
"rimraf": "^2.6.2",
78+
"sinon": "^2.4.1",
79+
"sinon-chai": "^2.13.0",
80+
"webpack": "^3.6.0"
8081
}
8182
}

test/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
import 'babel-polyfill';
22

3+
import createReactClass from 'create-react-class';
34
import dirtyChai from 'dirty-chai';
5+
import PropTypes from 'prop-types';
6+
import React from 'react';
47

58
global.chai.use(dirtyChai);
69

10+
// FIXME: Tests fail with React Router v3, but React Router v2 doesn't work
11+
// with React v16. This hacks around that incompatibility.
12+
React.createClass = createReactClass;
13+
React.PropTypes = PropTypes;
14+
715
const testsContext = require.context('.', true, /\.test\.js$/);
816
testsContext.keys().forEach(testsContext);

test/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function delay(cb) {
22
// Give throttled scroll listeners time to settle down.
3-
requestAnimationFrame(() => setTimeout(cb));
3+
setTimeout(cb, 80);
44
}
55

66
export default function run(steps) {

test/useScroll.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('useScroll', () => {
6969
render={applyRouterMiddleware(useScroll())}
7070
onUpdate={run(steps)}
7171
/>,
72-
container
72+
container,
7373
);
7474
});
7575

0 commit comments

Comments
 (0)