Skip to content

Commit 1ffb961

Browse files
authored
Merge pull request #363 from integer32llc/maint
Maintenance
2 parents a105591 + 87d620d commit 1ffb961

File tree

6 files changed

+820
-2291
lines changed

6 files changed

+820
-2291
lines changed

.travis/compile-frontend.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ docker \
1010
-v $HOME/cache/node/node_modules:/ui/node_modules \
1111
-v $HOME/cache/node/yarn-cache:/root/.yarn-cache \
1212
--workdir /ui \
13-
node:8.7 \
13+
node:10.7 \
1414
bash -c 'yarn && \
1515
yarn test:lint && \
1616
yarn run build:production'

tests/Gemfile.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GEM
33
specs:
44
addressable (2.5.2)
55
public_suffix (>= 2.0.2, < 4.0)
6-
capybara (3.2.1)
6+
capybara (3.4.1)
77
addressable
88
mini_mime (>= 0.1.3)
99
nokogiri (~> 1.8)
@@ -16,7 +16,7 @@ GEM
1616
ffi (1.9.25)
1717
mini_mime (1.0.0)
1818
mini_portile2 (2.3.0)
19-
nokogiri (1.8.3)
19+
nokogiri (1.8.4)
2020
mini_portile2 (~> 2.3.0)
2121
public_suffix (3.0.2)
2222
rack (2.0.5)
@@ -36,7 +36,7 @@ GEM
3636
rspec-support (~> 3.7.0)
3737
rspec-support (3.7.1)
3838
rubyzip (1.2.1)
39-
selenium-webdriver (3.12.0)
39+
selenium-webdriver (3.13.1)
4040
childprocess (~> 0.5)
4141
rubyzip (~> 1.2)
4242
webdrivers (3.3.1)

ui/frontend/actions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const routes = {
3232
},
3333
};
3434

35-
type ThunkAction<T = void> = ReduxThunkAction<T, State, {}>;
35+
type ThunkAction<T = void> = ReduxThunkAction<T, State, {}, Action>;
3636

3737
const createAction = <T extends string, P extends {}>(type: T, props?: P) => (
3838
Object.assign({ type }, props)
@@ -126,7 +126,7 @@ export const changeMode = (mode: Mode) =>
126126
export const changeEdition = (edition: Edition) =>
127127
createAction(ActionType.ChangeEdition, { edition });
128128

129-
export const changeNightlyEdition: ThunkAction = (edition: Edition) => dispatch => {
129+
export const changeNightlyEdition = (edition: Edition): ThunkAction => dispatch => {
130130
dispatch(changeChannel(Channel.Nightly));
131131
dispatch(changeEdition(edition));
132132
};

ui/frontend/index.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ import 'babel-polyfill';
33
import React from 'react';
44
import ReactDOM from 'react-dom';
55
import { Provider } from 'react-redux';
6-
import { applyMiddleware, compose, createStore } from 'redux';
6+
import { AnyAction, applyMiddleware, compose, createStore } from 'redux';
77
import persistState from 'redux-localstorage';
8-
import thunk from 'redux-thunk';
8+
import thunk, { ThunkDispatch } from 'redux-thunk';
99
import * as url from 'url';
1010

11-
import { gotoPosition, performCratesLoad, performVersionsLoad } from './actions';
11+
import { Action, gotoPosition, performCratesLoad, performVersionsLoad } from './actions';
1212
import { configureRustErrors } from './highlighting';
1313
import { deserialize, serialize } from './local_storage';
1414
import PageSwitcher from './PageSwitcher';
1515
import playgroundApp from './reducers';
16+
import { State } from './reducers';
1617
import Router from './Router';
1718

1819
const baseUrl = url.resolve(window.location.href, '/');
@@ -23,9 +24,8 @@ const initialState = {
2324
},
2425
};
2526

26-
const mw = [thunk];
27-
const middlewares = applyMiddleware(...mw);
28-
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
27+
const middlewares = applyMiddleware<ThunkDispatch<State, {}, Action>, {}>(thunk);
28+
const composeEnhancers: typeof compose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
2929
const enhancers = composeEnhancers(middlewares, persistState(undefined, { serialize, deserialize }));
3030
const store = createStore(playgroundApp, initialState, enhancers);
3131

ui/frontend/package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"prop-types": "^15.5.10",
1616
"qs": "^6.4.0",
1717
"react": "^16.0.0",
18-
"react-ace": "^5.4.0",
18+
"react-ace": "^6.1.4",
1919
"react-copy-to-clipboard": "^5.0.1",
2020
"react-dom": "^16.0.0",
2121
"react-popper": "^0.9.5",
@@ -33,7 +33,7 @@
3333
"devDependencies": {
3434
"@types/react": "^16.0.0",
3535
"@types/react-dom": "^16.0.0",
36-
"autoprefixer": "^8.1.0",
36+
"autoprefixer": "^9.0.1",
3737
"babel-core": "^6.17.0",
3838
"babel-loader": "^7.0.0",
3939
"babel-plugin-syntax-dynamic-import": "^6.18.0",
@@ -44,7 +44,7 @@
4444
"basename": "^0.1.2",
4545
"compression-webpack-plugin": "^1.1.11",
4646
"copy-webpack-plugin": "^4.0.1",
47-
"css-loader": "^0.28.0",
47+
"css-loader": "^1.0.0",
4848
"glob": "^7.0.5",
4949
"html-webpack-plugin": "^3.0.0",
5050
"json-loader": "^0.5.4",
@@ -59,7 +59,10 @@
5959
"tslint-react": "^3.2.0",
6060
"typescript": "^2.5.3",
6161
"webpack": "^4.1.0",
62-
"webpack-cli": "^2.0.12"
62+
"webpack-cli": "^3.1.0"
63+
},
64+
"engines": {
65+
"node": "^10.7.0"
6366
},
6467
"scripts": {
6568
"test:lint": "tslint --config tslint.json --exclude \"./**/node_modules/**/*\" \"./**/*.ts?(x)\"",

0 commit comments

Comments
 (0)