Skip to content

Commit

Permalink
Update node version to 11.10.1 and npm packages (#1385)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianguyen authored Mar 1, 2019
1 parent 6132b14 commit ea52c5c
Show file tree
Hide file tree
Showing 10 changed files with 756 additions and 588 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults: &defaults
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
command: /sbin/init
- image: circleci/ruby:2.3.4
- image: circleci/node:8.12.0
- image: circleci/node:11.10.1
jobs:
setup-coverage:
<<: *defaults
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
command: rm -f ifmeorg/ifme/.rvmrc; echo 2.3.4 > ifmeorg/ifme/.ruby-version; rvm use 2.3.4 --default
- run:
working_directory: ~/ifmeorg/ifme
command: nvm install 8.12.0 && nvm alias default 8.12.0
command: nvm install 11.10.1 && nvm alias default 11.10.1
- restore_cache:
keys:
- v1-dep-{{ .Branch }}-
Expand Down
5 changes: 4 additions & 1 deletion client/.babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"presets": [
"@babel/preset-env",
["@babel/env", {
"useBuiltIns": "usage",
"modules": "commonjs"
}],
"@babel/preset-flow",
"@babel/preset-react"
],
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/Form/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class Form extends React.Component<Props, State> {
);
};

displayInputs = () => {
displayInputs = (): any => {
const { inputs } = this.state;
return inputs.map((input: any) => {
if (INPUT_TYPES.includes(input.type)) {
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Header extends React.Component<Props, State> {
return <FontAwesomeIcon icon={faBars} />;
};

displayLinks = () => {
displayLinks = (): any => {
const { links } = this.props;
return links.map((link: Link) => (
<div className={css.headerLink} key={link.name}>
Expand Down
6 changes: 3 additions & 3 deletions client/app/components/Input/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import { REQUIRES_DEFAULT, DEFAULT_WITH_LABEL } from './InputDefault';

export const TYPES = REQUIRES_DEFAULT.concat([
export const TYPES: string[] = REQUIRES_DEFAULT.concat([
'textarea',
'submit',
'checkbox',
Expand All @@ -12,15 +12,15 @@ export const TYPES = REQUIRES_DEFAULT.concat([
'location',
]);

export const REQUIRES_LABEL = DEFAULT_WITH_LABEL.concat([
export const REQUIRES_LABEL: string[] = DEFAULT_WITH_LABEL.concat([
'textarea',
'select',
'checkboxGroup',
'tag',
'switch',
]);

export const REQUIRED_POSSIBLE = DEFAULT_WITH_LABEL.concat([
export const REQUIRED_POSSIBLE: string[] = DEFAULT_WITH_LABEL.concat([
'textarea',
'checkboxGroup',
]);
Expand Down
10 changes: 5 additions & 5 deletions client/app/widgets/Resources/__tests__/Resources.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { mount } from 'enzyme';
import React from 'react';
import { Resources } from '../index';

const component = props => (
const getComponent = props => (
<Resources
keywords={[]}
resources={[
Expand Down Expand Up @@ -36,7 +36,7 @@ const component = props => (

describe('Resources', () => {
it('filters when tag selected', () => {
const wrapper = mount(component());
const wrapper = mount(getComponent());
expect(wrapper.find('.resource').length).toEqual(2);
wrapper.find('.tagAutocomplete').simulate('focus');
expect(wrapper.find('.tagMenu').exists()).toEqual(true);
Expand All @@ -57,7 +57,7 @@ describe('Resources', () => {
});

it('unfilters when tag unselected', () => {
const wrapper = mount(component());
const wrapper = mount(getComponent());
expect(wrapper.find('.resource').length).toEqual(2);
wrapper.find('.tagAutocomplete').simulate('focus');
const id = wrapper
Expand Down Expand Up @@ -91,7 +91,7 @@ describe('Resources', () => {

describe('and the resources are being filtered', () => {
it('sends the selected tags to the URL', () => {
const wrapper = mount(component({ history }));
const wrapper = mount(getComponent({ history }));

wrapper.setState({
checkboxes: [
Expand All @@ -110,7 +110,7 @@ describe('Resources', () => {

describe('and there is no filters selected', () => {
it('resets the search query parameter', () => {
const wrapper = mount(component({ history }));
const wrapper = mount(getComponent({ history }));

wrapper.setState({
checkboxes: [],
Expand Down
4 changes: 2 additions & 2 deletions client/app/widgets/Resources/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ export class Resources extends React.Component<Props, State> {
});
};

filterList = (checkboxes: Checkbox[]) => {
filterList = (checkboxes: Checkbox[]): ResourceProp[] => {
const { resources } = this.props;
const selectedCheckboxes = checkboxes.filter(
const selectedCheckboxes: Checkbox[] = checkboxes.filter(
(checkbox: Checkbox) => !!checkbox.checked,
);
return resources.filter((resource: ResourceProp) => {
Expand Down
22 changes: 11 additions & 11 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"axios": "^0.18.0",
"babel-core": "7.0.0-bridge.0",
"chart.js": "^2.6.0",
"chartkick": "^2.2.4",
"chartkick": "^3.0.2",
"es5-shim": "^4.5.9",
"font-awesome": "^4.7.0",
"history": "^4.7.2",
Expand All @@ -40,7 +40,7 @@
"pell": "^1.0.6",
"react": "^16.4.0",
"react-autocomplete": "^1.8.1",
"react-chartkick": "^0.1.3",
"react-chartkick": "^0.3.0",
"react-dom": "^16.5.2",
"react-html-parser": "^2.0.2",
"react-lazyload": "^2.3.0",
Expand All @@ -61,31 +61,31 @@
"@storybook/addons": "^4.0.0-alpha.21",
"@storybook/react": "^4.0.0-alpha.21",
"babel-cli": "^6.24.1",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.6.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"babel-loader": "^8.0.2",
"babel-plugin-flow-react-proptypes": "^24.1.2",
"babel-plugin-flow-react-proptypes": "^25.0.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"compression-webpack-plugin": "^2.0.0",
"css-loader": "^1.0.0",
"css-loader": "^2.1.0",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.5.0",
"eslint": "^5.5.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-flowtype": "^2.50.0",
"eslint-import-resolver-webpack": "^0.11.0",
"eslint-plugin-flowtype": "^3.4.2",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^21.22.1",
"eslint-plugin-jest": "^22.3.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.11.1",
"extract-css-chunks-webpack-plugin": "^3.1.1",
"file-loader": "^2.0.0",
"file-loader": "^3.0.1",
"flow-bin": "^0.80.0",
"flow-typed": "^2.5.1",
"glob": "^7.1.2",
"identity-obj-proxy": "^3.0.0",
"imports-loader": "^0.8.0",
"jest": "^23.6.0",
"jest": "^24.1.0",
"node-sass": "^4.9.2",
"optimize-css-assets-webpack-plugin": "^5.0.0",
"prettier-eslint": "^8.8.2",
Expand Down
Loading

0 comments on commit ea52c5c

Please sign in to comment.