Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
["latest", {
"es2015": { "loose": true }
["env", {
"loose": true
}],
"stage-1",
"react"
Expand Down
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ env:
- BROWSER=ChromeCi
- BROWSER=Firefox

cache:
directories:
- node_modules
cache: yarn

before_install:
- export CHROME_BIN=chromium-browser
Expand Down
4 changes: 2 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module.exports = (config) => {

webpack: {
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
rules: [
{ test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' },
],
},
plugins: [
Expand Down
65 changes: 33 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"homepage": "https://github.com/taion/react-router-scroll#readme",
"dependencies": {
"prop-types": "^15.5.6",
"prop-types": "^15.6.0",
"scroll-behavior": "^0.9.3",
"warning": "^3.0.0"
},
Expand All @@ -41,41 +41,42 @@
"react-router": "^2.3.0 || ^3.0.0"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.0",
"babel-loader": "^6.2.7",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-dev-expression": "^0.2.1",
"babel-polyfill": "^6.16.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-1": "^6.16.0",
"chai": "^3.5.0",
"cross-env": "^3.1.3",
"dirty-chai": "^1.2.2",
"dom-helpers": "^3.0.0",
"eslint": "^3.9.1",
"eslint-config-4catalyzer-react": "^0.1.3",
"eslint-plugin-import": "^1.16.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.5.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"chai": "^4.1.2",
"create-react-class": "^15.6.2",
"cross-env": "^5.0.5",
"dirty-chai": "^2.0.1",
"dom-helpers": "^3.2.1",
"eslint": "^4.7.2",
"eslint-config-4catalyzer-react": "^0.3.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.4.0",
"history": "^2.1.2",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.2.0",
"karma-mocha-reporter": "^2.2.0",
"karma-sinon-chai": "^1.2.4",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.0.1",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.4",
"karma-sinon-chai": "^1.3.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"mocha": "^3.1.2",
"react": "^15.5.3",
"react-dom": "^15.5.3",
"karma-webpack": "^2.0.4",
"mocha": "^3.5.3",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-router": "^2.8.1",
"rimraf": "^2.5.4",
"sinon": "^1.17.6",
"sinon-chai": "^2.8.0",
"webpack": "^1.13.3"
"rimraf": "^2.6.2",
"sinon": "^2.4.1",
"sinon-chai": "^2.13.0",
"webpack": "^3.6.0"
}
}
8 changes: 8 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import 'babel-polyfill';

import createReactClass from 'create-react-class';
import dirtyChai from 'dirty-chai';
import PropTypes from 'prop-types';
import React from 'react';

global.chai.use(dirtyChai);

// FIXME: Tests fail with React Router v3, but React Router v2 doesn't work
// with React v16. This hacks around that incompatibility.
React.createClass = createReactClass;
React.PropTypes = PropTypes;

const testsContext = require.context('.', true, /\.test\.js$/);
testsContext.keys().forEach(testsContext);
2 changes: 1 addition & 1 deletion test/run.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function delay(cb) {
// Give throttled scroll listeners time to settle down.
requestAnimationFrame(() => setTimeout(cb));
setTimeout(cb, 80);
}

export default function run(steps) {
Expand Down
2 changes: 1 addition & 1 deletion test/useScroll.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('useScroll', () => {
render={applyRouterMiddleware(useScroll())}
onUpdate={run(steps)}
/>,
container
container,
);
});

Expand Down
Loading