From 3e03e0ebbfc392a0d55af07710ac3c64e707fea3 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 9 Sep 2017 09:38:18 -0700 Subject: [PATCH] update npm/gem dependencies (#1131) * update npm/gem dependencies * move to react prop-types package and fix jsdom usage * fix sinon * fix test support * eslint? --- Gemfile | 2 +- Gemfile.lock | 269 +++++++++--------- frontend/src/Metamaps/PasteInput.js | 3 + frontend/src/components/App/AccountMenu.js | 3 +- frontend/src/components/App/LoginForm.js | 3 +- frontend/src/components/App/MobileHeader.js | 3 +- .../src/components/App/NotificationIcon.js | 3 +- frontend/src/components/App/Toast.js | 3 +- frontend/src/components/App/UpperLeftUI.js | 3 +- frontend/src/components/App/UpperRightUI.js | 3 +- frontend/src/components/App/index.js | 3 +- .../src/components/MapView/ImportDialogBox.js | 3 +- .../src/components/MapView/Instructions.js | 3 +- .../components/MapView/MapChat/NewMessage.js | 3 +- .../components/MapView/MapChat/Participant.js | 3 +- .../src/components/MapView/MapChat/index.js | 3 +- frontend/src/components/MapView/MapInfoBox.js | 3 +- frontend/src/components/MapView/index.js | 3 +- frontend/src/components/Maps/Header.js | 3 +- frontend/src/components/Maps/MapCard.js | 3 +- frontend/src/components/Maps/MapperCard.js | 3 +- frontend/src/components/Maps/index.js | 3 +- frontend/src/components/MetacodeSelect.js | 3 +- .../src/components/TopicCard/Attachments.js | 3 +- frontend/src/components/TopicCard/Desc.js | 3 +- .../components/TopicCard/EmbedlyLink/Card.js | 3 +- .../components/TopicCard/EmbedlyLink/index.js | 3 +- frontend/src/components/TopicCard/Follow.js | 3 +- frontend/src/components/TopicCard/Links.js | 3 +- .../src/components/TopicCard/Permission.js | 3 +- frontend/src/components/TopicCard/Title.js | 3 +- frontend/src/components/TopicCard/index.js | 3 +- frontend/src/components/TopicView/index.js | 3 +- frontend/src/components/common/DataVis.js | 3 +- frontend/src/components/common/FilterBox.js | 3 +- frontend/src/components/common/InfoAndHelp.js | 3 +- frontend/src/components/common/Sprite.js | 3 +- .../src/components/common/UpperOptions.js | 3 +- .../common/VisualizationControls.js | 3 +- frontend/test_support/dom.js | 20 +- package.json | 79 ++--- 41 files changed, 265 insertions(+), 216 deletions(-) diff --git a/Gemfile b/Gemfile index 36426058..be366c49 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ ruby '2.3.0' gem 'rails', '~> 5.0.0' gem 'active_model_serializers' -gem 'aws-sdk' +gem 'aws-sdk', '~> 2.7.0' gem 'best_in_place' gem 'delayed_job' gem 'delayed_job_active_record' diff --git a/Gemfile.lock b/Gemfile.lock index 62e6e8c0..fe922d7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,50 +1,50 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.0.1) - actionpack (= 5.0.1) - nio4r (~> 1.2) + actioncable (5.0.5) + actionpack (= 5.0.5) + nio4r (>= 1.2, < 3.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.1) - actionpack (= 5.0.1) - actionview (= 5.0.1) - activejob (= 5.0.1) + actionmailer (5.0.5) + actionpack (= 5.0.5) + actionview (= 5.0.5) + activejob (= 5.0.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.1) - actionview (= 5.0.1) - activesupport (= 5.0.1) + actionpack (5.0.5) + actionview (= 5.0.5) + activesupport (= 5.0.5) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.1) - activesupport (= 5.0.1) + actionview (5.0.5) + activesupport (= 5.0.5) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - active_model_serializers (0.10.4) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + active_model_serializers (0.10.6) actionpack (>= 4.1, < 6) activemodel (>= 4.1, < 6) case_transform (>= 0.2) - jsonapi (= 0.1.1.beta6) - activejob (5.0.1) - activesupport (= 5.0.1) + jsonapi-renderer (>= 0.1.1.beta1, < 0.2) + activejob (5.0.5) + activesupport (= 5.0.5) globalid (>= 0.3.6) - activemodel (5.0.1) - activesupport (= 5.0.1) - activerecord (5.0.1) - activemodel (= 5.0.1) - activesupport (= 5.0.1) + activemodel (5.0.5) + activesupport (= 5.0.5) + activerecord (5.0.5) + activemodel (= 5.0.5) + activesupport (= 5.0.5) arel (~> 7.0) - activesupport (5.0.1) + activesupport (5.0.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.0) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) arel (7.1.4) ast (2.3.0) aws-sdk (2.7.0) @@ -54,53 +54,54 @@ GEM jmespath (~> 1.0) aws-sdk-resources (2.7.0) aws-sdk-core (= 2.7.0) - aws-sigv4 (1.0.0) + aws-sigv4 (1.0.2) bcrypt (3.1.11) - best_in_place (3.1.0) + best_in_place (3.1.1) actionpack (>= 3.2) railties (>= 3.2) - better_errors (2.1.1) + better_errors (2.3.0) coderay (>= 1.0.0) - erubis (>= 2.6.6) + erubi (>= 1.0.0) rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - brakeman (3.4.1) + brakeman (3.7.2) builder (3.2.3) - byebug (9.0.6) - carrierwave (1.0.0) + byebug (9.1.0) + carrierwave (1.1.0) activemodel (>= 4.0.0) activesupport (>= 4.0.0) mime-types (>= 1.16) case_transform (0.2) activesupport - climate_control (0.1.0) + climate_control (0.2.0) cocaine (0.5.8) climate_control (>= 0.0.3, < 1.0) - coderay (1.1.1) - concurrent-ruby (1.0.4) - debug_inspector (0.0.2) - delayed_job (4.1.2) - activesupport (>= 3.0, < 5.1) - delayed_job_active_record (4.1.1) - activerecord (>= 3.0, < 5.1) + coderay (1.1.2) + concurrent-ruby (1.0.5) + debug_inspector (0.0.3) + delayed_job (4.1.3) + activesupport (>= 3.0, < 5.2) + delayed_job_active_record (4.1.2) + activerecord (>= 3.0, < 5.2) delayed_job (>= 3.0, < 5) - devise (4.2.0) + devise (4.3.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.1) + railties (>= 4.1.0, < 5.2) responders warden (~> 1.2.3) diff-lcs (1.3) docile (1.1.5) - doorkeeper (4.2.0) + doorkeeper (4.2.6) railties (>= 4.2) - dotenv (2.1.2) - dotenv-rails (2.1.2) - dotenv (= 2.1.2) - railties (>= 3.2, < 5.1) + dotenv (2.2.1) + dotenv-rails (2.2.1) + dotenv (= 2.2.1) + railties (>= 3.2, < 5.2) + erubi (1.6.1) erubis (2.7.0) - exception_notification (4.2.1) + exception_notification (4.2.2) actionmailer (>= 4.0, < 6) activesupport (>= 4.0, < 6) execjs (2.7.0) @@ -109,28 +110,25 @@ GEM factory_girl_rails (4.8.0) factory_girl (~> 4.8.0) railties (>= 3.0.0) - faker (1.7.3) + faker (1.8.4) i18n (~> 0.5) - globalid (0.3.7) - activesupport (>= 4.1.0) - httparty (0.14.0) + ffi (1.9.18) + globalid (0.4.0) + activesupport (>= 4.2.0) + httparty (0.15.6) multi_xml (>= 0.5.2) - i18n (0.7.0) + i18n (0.8.6) jmespath (1.3.1) - jquery-rails (4.2.2) + jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-ui-rails (6.0.1) railties (>= 3.2.16) - json (2.0.3) - json-schema (2.7.0) + json (2.1.0) + json-schema (2.8.0) addressable (>= 2.4) - jsonapi (0.1.1.beta6) - jsonapi-parser (= 0.1.1.beta3) - jsonapi-renderer (= 0.1.1.beta1) - jsonapi-parser (0.1.1.beta3) - jsonapi-renderer (0.1.1.beta1) + jsonapi-renderer (0.1.3) kaminari (1.0.1) activesupport (>= 4.1.0) kaminari-actionview (= 1.0.1) @@ -145,22 +143,22 @@ GEM kaminari-core (1.0.1) loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.4) + mail (2.6.6) mime-types (>= 1.16, < 4) - mailboxer (0.14.0) + mailboxer (0.15.1) carrierwave (>= 0.5.8) - rails (>= 4.2.0) + rails (>= 5.0.0) method_source (0.8.2) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mimemagic (0.3.2) - mini_portile2 (2.1.0) - minitest (5.10.1) + mini_portile2 (2.2.0) + minitest (5.10.3) multi_xml (0.6.0) - nio4r (1.2.1) - nokogiri (1.7.0.1) - mini_portile2 (~> 2.1.0) + nio4r (2.1.0) + nokogiri (1.8.0) + mini_portile2 (~> 2.2.0) orm_adapter (0.5.0) paperclip (5.1.0) activemodel (>= 4.2.0) @@ -168,122 +166,133 @@ GEM cocaine (~> 0.5.5) mime-types mimemagic (~> 0.3.0) - parser (2.3.3.1) + parallel (1.12.0) + parser (2.4.0.0) ast (~> 2.2) - pg (0.19.0) + pg (0.21.0) powerpack (0.1.1) pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry-byebug (3.4.2) - byebug (~> 9.0) + pry-byebug (3.5.0) + byebug (~> 9.1) pry (~> 0.10) - pry-rails (0.3.4) - pry (>= 0.9.10) - public_suffix (2.0.5) - puma (3.6.2) + pry-rails (0.3.6) + pry (>= 0.10.4) + public_suffix (3.0.0) + puma (3.10.0) pundit (1.1.0) activesupport (>= 3.0.0) pundit_extra (0.3.0) - rack (2.0.1) + rack (2.0.3) rack-attack (5.0.1) rack - rack-cors (0.4.0) + rack-cors (1.0.1) rack-test (0.6.3) rack (>= 1.0) - rails (5.0.1) - actioncable (= 5.0.1) - actionmailer (= 5.0.1) - actionpack (= 5.0.1) - actionview (= 5.0.1) - activejob (= 5.0.1) - activemodel (= 5.0.1) - activerecord (= 5.0.1) - activesupport (= 5.0.1) - bundler (>= 1.3.0, < 2.0) - railties (= 5.0.1) + rails (5.0.5) + actioncable (= 5.0.5) + actionmailer (= 5.0.5) + actionpack (= 5.0.5) + actionview (= 5.0.5) + activejob (= 5.0.5) + activemodel (= 5.0.5) + activerecord (= 5.0.5) + activesupport (= 5.0.5) + bundler (>= 1.3.0) + railties (= 5.0.5) sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.2) - activesupport (>= 4.2.0, < 6.0) - nokogiri (~> 1.6) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (5.0.1) - actionpack (= 5.0.1) - activesupport (= 5.0.1) + railties (5.0.5) + actionpack (= 5.0.5) + activesupport (= 5.0.5) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.2.1) + rainbow (2.2.2) + rake rake (12.0.0) - redis (3.3.2) - responders (2.3.0) - railties (>= 4.2.0, < 5.1) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + redis (4.0.0) + responders (2.4.0) + actionpack (>= 4.2.0, < 5.3) + railties (>= 4.2.0, < 5.3) + rspec-core (3.6.0) + rspec-support (~> 3.6.0) + rspec-expectations (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) + rspec-support (~> 3.6.0) + rspec-mocks (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.2) + rspec-support (~> 3.6.0) + rspec-rails (3.6.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) - rubocop (0.47.1) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-support (~> 3.6.0) + rspec-support (3.6.0) + rubocop (0.49.1) + parallel (~> 1.10) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.8.1) - sass (3.4.23) + sass (3.5.1) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) sass-rails (5.0.6) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - shoulda-matchers (3.1.1) + shoulda-matchers (3.1.2) activesupport (>= 4.0.0) - simplecov (0.12.0) + simplecov (0.15.0) docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.0) - slack-notifier (2.0.0) + simplecov-html (0.10.2) + slack-notifier (2.3.1) slop (3.6.0) snorlax (0.1.6) rails (> 4.1) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.0) + sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sucker_punch (2.0.2) + sucker_punch (2.0.3) concurrent-ruby (~> 1.0.0) - thor (0.19.4) - thread_safe (0.3.5) - tilt (2.0.5) - timecop (0.8.1) + thor (0.20.0) + thread_safe (0.3.6) + tilt (2.0.8) + timecop (0.9.1) tunemygc (1.0.69) - tzinfo (1.2.2) + tzinfo (1.2.3) thread_safe (~> 0.1) - uglifier (3.0.4) + uglifier (3.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.1.3) - warden (1.2.6) + unicode-display_width (1.3.0) + warden (1.2.7) rack (>= 1.0) - websocket-driver (0.6.4) + websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) @@ -292,7 +301,7 @@ PLATFORMS DEPENDENCIES active_model_serializers - aws-sdk + aws-sdk (~> 2.7.0) best_in_place better_errors binding_of_caller diff --git a/frontend/src/Metamaps/PasteInput.js b/frontend/src/Metamaps/PasteInput.js index 4083db03..dc76ed3b 100644 --- a/frontend/src/Metamaps/PasteInput.js +++ b/frontend/src/Metamaps/PasteInput.js @@ -67,6 +67,9 @@ const PasteInput = { Import.handleJSON(text) } else if (text.match(/^[Tt]opics\t/) || text.match(/^[Ss]ynapses\t/)) { Import.handleTSV(text) + } else if ((text.match(/^[Tt]opics/) && text.match(/[\n,][Nn]ame[,\n]/)) || + (text.match(/^[Ss]ynapses/) && text.match(/[\n,][Tt]opic1[,\n]/))) { + Import.handleCSV(text) } else { // Handle as plain text let textItems = text.split('\n') diff --git a/frontend/src/components/App/AccountMenu.js b/frontend/src/components/App/AccountMenu.js index 99ab9301..f23cda61 100644 --- a/frontend/src/components/App/AccountMenu.js +++ b/frontend/src/components/App/AccountMenu.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import onClickOutsideAddon from 'react-onclickoutside' diff --git a/frontend/src/components/App/LoginForm.js b/frontend/src/components/App/LoginForm.js index fee8bab8..0813c1c0 100644 --- a/frontend/src/components/App/LoginForm.js +++ b/frontend/src/components/App/LoginForm.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import onClickOutsideAddon from 'react-onclickoutside' diff --git a/frontend/src/components/App/MobileHeader.js b/frontend/src/components/App/MobileHeader.js index 16821853..a9acce37 100644 --- a/frontend/src/components/App/MobileHeader.js +++ b/frontend/src/components/App/MobileHeader.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Link } from 'react-router' import Sprite from '../common/Sprite' diff --git a/frontend/src/components/App/NotificationIcon.js b/frontend/src/components/App/NotificationIcon.js index 3f9c8980..36b86b72 100644 --- a/frontend/src/components/App/NotificationIcon.js +++ b/frontend/src/components/App/NotificationIcon.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class NotificationIcon extends Component { diff --git a/frontend/src/components/App/Toast.js b/frontend/src/components/App/Toast.js index 4d27f007..7e53442d 100644 --- a/frontend/src/components/App/Toast.js +++ b/frontend/src/components/App/Toast.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class Toast extends Component { static propTypes = { diff --git a/frontend/src/components/App/UpperLeftUI.js b/frontend/src/components/App/UpperLeftUI.js index 427e63d8..cbead88e 100644 --- a/frontend/src/components/App/UpperLeftUI.js +++ b/frontend/src/components/App/UpperLeftUI.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Link } from 'react-router' class UpperLeftUI extends Component { diff --git a/frontend/src/components/App/UpperRightUI.js b/frontend/src/components/App/UpperRightUI.js index e8494b54..d1e53652 100644 --- a/frontend/src/components/App/UpperRightUI.js +++ b/frontend/src/components/App/UpperRightUI.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import AccountMenu from './AccountMenu' import LoginForm from './LoginForm' diff --git a/frontend/src/components/App/index.js b/frontend/src/components/App/index.js index 0c6bd403..ed24e9d1 100644 --- a/frontend/src/components/App/index.js +++ b/frontend/src/components/App/index.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import MobileHeader from './MobileHeader' import UpperLeftUI from './UpperLeftUI' diff --git a/frontend/src/components/MapView/ImportDialogBox.js b/frontend/src/components/MapView/ImportDialogBox.js index 9a9c777b..e9e0539e 100644 --- a/frontend/src/components/MapView/ImportDialogBox.js +++ b/frontend/src/components/MapView/ImportDialogBox.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Dropzone from 'react-dropzone' class ImportDialogBox extends Component { diff --git a/frontend/src/components/MapView/Instructions.js b/frontend/src/components/MapView/Instructions.js index 66331fa1..7fc1358f 100644 --- a/frontend/src/components/MapView/Instructions.js +++ b/frontend/src/components/MapView/Instructions.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class Instructions extends Component { diff --git a/frontend/src/components/MapView/MapChat/NewMessage.js b/frontend/src/components/MapView/MapChat/NewMessage.js index 2046ac9f..b5aee5fa 100644 --- a/frontend/src/components/MapView/MapChat/NewMessage.js +++ b/frontend/src/components/MapView/MapChat/NewMessage.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Emoji, Picker } from 'emoji-mart' class NewMessage extends Component { diff --git a/frontend/src/components/MapView/MapChat/Participant.js b/frontend/src/components/MapView/MapChat/Participant.js index 0fede6aa..b064ae28 100644 --- a/frontend/src/components/MapView/MapChat/Participant.js +++ b/frontend/src/components/MapView/MapChat/Participant.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class Participant extends Component { render() { diff --git a/frontend/src/components/MapView/MapChat/index.js b/frontend/src/components/MapView/MapChat/index.js index 64b7b10e..4f702125 100644 --- a/frontend/src/components/MapView/MapChat/index.js +++ b/frontend/src/components/MapView/MapChat/index.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Unread from './Unread' import Participant from './Participant' import Message from './Message' diff --git a/frontend/src/components/MapView/MapInfoBox.js b/frontend/src/components/MapView/MapInfoBox.js index 7f64da0f..43d56c13 100644 --- a/frontend/src/components/MapView/MapInfoBox.js +++ b/frontend/src/components/MapView/MapInfoBox.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class MapInfoBox extends Component { static propTypes = { diff --git a/frontend/src/components/MapView/index.js b/frontend/src/components/MapView/index.js index 8a9901a3..fe8c23b1 100644 --- a/frontend/src/components/MapView/index.js +++ b/frontend/src/components/MapView/index.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import DataVis from '../common/DataVis' import UpperOptions from '../common/UpperOptions' diff --git a/frontend/src/components/Maps/Header.js b/frontend/src/components/Maps/Header.js index 39fa6c62..2168e0c0 100644 --- a/frontend/src/components/Maps/Header.js +++ b/frontend/src/components/Maps/Header.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Link } from 'react-router' import _ from 'lodash' diff --git a/frontend/src/components/Maps/MapCard.js b/frontend/src/components/Maps/MapCard.js index b2b36d7c..0f07d2ba 100644 --- a/frontend/src/components/Maps/MapCard.js +++ b/frontend/src/components/Maps/MapCard.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Link } from 'react-router' import { find, values } from 'lodash' diff --git a/frontend/src/components/Maps/MapperCard.js b/frontend/src/components/Maps/MapperCard.js index dbb06cbc..c08d146e 100644 --- a/frontend/src/components/Maps/MapperCard.js +++ b/frontend/src/components/Maps/MapperCard.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class MapperCard extends Component { render = () => { diff --git a/frontend/src/components/Maps/index.js b/frontend/src/components/Maps/index.js index 6412a33c..081515fe 100644 --- a/frontend/src/components/Maps/index.js +++ b/frontend/src/components/Maps/index.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { throttle } from 'lodash' import Header from './Header' import MapperCard from './MapperCard' diff --git a/frontend/src/components/MetacodeSelect.js b/frontend/src/components/MetacodeSelect.js index 68da09e8..3f4146c7 100644 --- a/frontend/src/components/MetacodeSelect.js +++ b/frontend/src/components/MetacodeSelect.js @@ -8,7 +8,8 @@ * passes that metacode's id to the callback. */ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class MetacodeSelect extends Component { render = () => { diff --git a/frontend/src/components/TopicCard/Attachments.js b/frontend/src/components/TopicCard/Attachments.js index 6f26aed2..fcb5bea8 100644 --- a/frontend/src/components/TopicCard/Attachments.js +++ b/frontend/src/components/TopicCard/Attachments.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import EmbedlyLink from './EmbedlyLink' diff --git a/frontend/src/components/TopicCard/Desc.js b/frontend/src/components/TopicCard/Desc.js index c94f30fb..711dcc5e 100644 --- a/frontend/src/components/TopicCard/Desc.js +++ b/frontend/src/components/TopicCard/Desc.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { RIETextArea } from 'riek' import Util from '../../Metamaps/Util' diff --git a/frontend/src/components/TopicCard/EmbedlyLink/Card.js b/frontend/src/components/TopicCard/EmbedlyLink/Card.js index 6d251310..da7474cb 100644 --- a/frontend/src/components/TopicCard/EmbedlyLink/Card.js +++ b/frontend/src/components/TopicCard/EmbedlyLink/Card.js @@ -1,5 +1,6 @@ /* global $, embedly */ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class EmbedlyCard extends Component { constructor(props) { diff --git a/frontend/src/components/TopicCard/EmbedlyLink/index.js b/frontend/src/components/TopicCard/EmbedlyLink/index.js index c2413930..0f6df211 100644 --- a/frontend/src/components/TopicCard/EmbedlyLink/index.js +++ b/frontend/src/components/TopicCard/EmbedlyLink/index.js @@ -1,5 +1,6 @@ /* global embedly */ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Card from './Card' diff --git a/frontend/src/components/TopicCard/Follow.js b/frontend/src/components/TopicCard/Follow.js index 653d8b18..2b4c8162 100644 --- a/frontend/src/components/TopicCard/Follow.js +++ b/frontend/src/components/TopicCard/Follow.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class Follow extends Component { render = () => { diff --git a/frontend/src/components/TopicCard/Links.js b/frontend/src/components/TopicCard/Links.js index accf2bfa..a20e637c 100644 --- a/frontend/src/components/TopicCard/Links.js +++ b/frontend/src/components/TopicCard/Links.js @@ -1,6 +1,7 @@ /* global $ */ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { Link } from 'react-router' import MetacodeSelect from '../MetacodeSelect' diff --git a/frontend/src/components/TopicCard/Permission.js b/frontend/src/components/TopicCard/Permission.js index bceb2d4c..27ebf2a5 100644 --- a/frontend/src/components/TopicCard/Permission.js +++ b/frontend/src/components/TopicCard/Permission.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import onClickOutsideAddon from 'react-onclickoutside' diff --git a/frontend/src/components/TopicCard/Title.js b/frontend/src/components/TopicCard/Title.js index 1eca527b..4ebdeedd 100644 --- a/frontend/src/components/TopicCard/Title.js +++ b/frontend/src/components/TopicCard/Title.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import { RIETextArea } from 'riek' const maxTitleLength = 140 diff --git a/frontend/src/components/TopicCard/index.js b/frontend/src/components/TopicCard/index.js index 0ed56224..17e0a4a7 100644 --- a/frontend/src/components/TopicCard/index.js +++ b/frontend/src/components/TopicCard/index.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import Draggable from 'react-draggable' import Title from './Title' diff --git a/frontend/src/components/TopicView/index.js b/frontend/src/components/TopicView/index.js index edd7b92e..5ca9a050 100644 --- a/frontend/src/components/TopicView/index.js +++ b/frontend/src/components/TopicView/index.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import DataVis from '../common/DataVis' import UpperOptions from '../common/UpperOptions' diff --git a/frontend/src/components/common/DataVis.js b/frontend/src/components/common/DataVis.js index f5f370d4..f39bdd7f 100644 --- a/frontend/src/components/common/DataVis.js +++ b/frontend/src/components/common/DataVis.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' class DataVis extends Component { static propTypes = { diff --git a/frontend/src/components/common/FilterBox.js b/frontend/src/components/common/FilterBox.js index 01343d3c..dc583159 100644 --- a/frontend/src/components/common/FilterBox.js +++ b/frontend/src/components/common/FilterBox.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import onClickOutsideAddon from 'react-onclickoutside' diff --git a/frontend/src/components/common/InfoAndHelp.js b/frontend/src/components/common/InfoAndHelp.js index fe298691..8a4edf25 100644 --- a/frontend/src/components/common/InfoAndHelp.js +++ b/frontend/src/components/common/InfoAndHelp.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import MapInfoBox from '../MapView/MapInfoBox' diff --git a/frontend/src/components/common/Sprite.js b/frontend/src/components/common/Sprite.js index 7283b421..44859403 100644 --- a/frontend/src/components/common/Sprite.js +++ b/frontend/src/components/common/Sprite.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' export default class Sprite extends Component { static propTypes = { diff --git a/frontend/src/components/common/UpperOptions.js b/frontend/src/components/common/UpperOptions.js index d17214ee..5108eab3 100644 --- a/frontend/src/components/common/UpperOptions.js +++ b/frontend/src/components/common/UpperOptions.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' import FilterBox from '../common/FilterBox' diff --git a/frontend/src/components/common/VisualizationControls.js b/frontend/src/components/common/VisualizationControls.js index 0b45f827..b3cf5665 100644 --- a/frontend/src/components/common/VisualizationControls.js +++ b/frontend/src/components/common/VisualizationControls.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react' +import React, { Component } from 'react' +import PropTypes from 'prop-types' export default class VisualizationControls extends Component { static propTypes = { diff --git a/frontend/test_support/dom.js b/frontend/test_support/dom.js index 5dd4a9ef..6c5306dd 100644 --- a/frontend/test_support/dom.js +++ b/frontend/test_support/dom.js @@ -1,22 +1,22 @@ const jsdom = require('jsdom') -const doc = jsdom.jsdom('') -const win = doc.defaultView -global.document = doc -global.window = win +const { JSDOM } = jsdom +const dom = new JSDOM('') + +global.document = dom.window.document +global.window = dom.window // take all properties of the window object and also attach it to the // mocha global object -propagateToGlobal(win) +propagateToGlobal(dom.window) // from mocha-jsdom https://github.com/rstacruz/mocha-jsdom/blob/master/index.js#L80 function propagateToGlobal(window) { - for (let key in window) { - if (!window.hasOwnProperty(key)) continue - if (key in global) continue - + global.HTMLElement = window.HTMLElement + Object.keys(window).forEach(key => { + if (key in global) return global[key] = window[key] - } + }) } // Metamaps dependencies fixes diff --git a/package.json b/package.json index dfa67ded..1dde78ad 100644 --- a/package.json +++ b/package.json @@ -21,56 +21,57 @@ "homepage": "https://github.com/metamaps/metamaps#readme", "dependencies": { "ajaxq": "0.0.7", - "attachmediastream": "1.4.2", - "autolinker": "1.4.0", - "babel-cli": "6.22.2", - "babel-loader": "6.2.10", + "attachmediastream": "2.0.0", + "autolinker": "1.4.3", + "babel-cli": "6.26.0", + "babel-loader": "7.1.2", "babel-plugin-lodash": "3.2.11", - "babel-plugin-transform-class-properties": "6.22.0", - "babel-preset-es2015": "6.22.0", - "babel-preset-react": "6.22.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-preset-es2015": "6.24.1", + "babel-preset-react": "6.24.1", "backbone": "1.3.3", - "clipboard-js": "0.3.2", - "commonmark": "0.27.0", - "csv-parse": "1.1.10", - "emoji-mart": "0.3.7", - "getscreenmedia": "2.0.0", + "clipboard-js": "0.3.5", + "commonmark": "0.28.1", + "csv-parse": "1.2.1", + "emoji-mart": "1.0.1", + "getscreenmedia": "4.0.1", "hark": "1.1.5", - "howler": "2.0.2", - "jquery": "3.1.1", - "json-loader": "0.5.4", + "howler": "2.0.4", + "jquery": "3.2.1", + "json-loader": "0.5.7", "lodash": "4.17.4", - "node-uuid": "1.4.7", + "node-uuid": "1.4.8", "outdent": "0.3.0", - "react": "15.4.2", - "react-dom": "15.4.2", - "react-draggable": "2.2.3", - "react-dropzone": "3.9.1", - "react-onclickoutside": "5.9.0", - "react-router": "3.0.2", - "redux": "3.6.0", - "riek": "1.0.7", + "prop-types": "15.5.10", + "react": "15.6.1", + "react-dom": "15.6.1", + "react-draggable": "3.0.3", + "react-dropzone": "4.1.2", + "react-onclickoutside": "6.5.0", + "react-router": "4.2.0", + "redux": "3.7.2", + "riek": "1.1.0", "simplewebrtc": "2.2.2", "socket.io": "1.3.7", - "webpack": "2.2.1" + "webpack": "3.5.6" }, "devDependencies": { - "babel-eslint": "^7.1.1", - "chai": "^3.5.0", - "circular-dependency-plugin": "^2.0.0", - "enzyme": "^2.8.2", - "eslint": "^3.11.1", - "eslint-config-standard": "^6.2.1", - "eslint-plugin-promise": "^3.4.0", - "eslint-plugin-react": "^6.8.0", - "eslint-plugin-standard": "^2.0.1", - "jsdom": "^9.11.0", - "mocha": "^3.2.0", + "babel-eslint": "^7.2.3", + "chai": "^4.1.2", + "circular-dependency-plugin": "^4.2.0", + "enzyme": "^2.9.1", + "eslint": "^4.6.1", + "eslint-config-standard": "^10.2.1", + "eslint-plugin-promise": "^3.5.0", + "eslint-plugin-react": "^7.3.0", + "eslint-plugin-standard": "^3.0.1", + "jsdom": "^11.2.0", + "mocha": "^3.5.0", "mocha-webpack": "^0.7.0", - "react-addons-test-utils": "^15.5.1", - "sinon": "^2.2.0" + "react-addons-test-utils": "^15.6.0", + "sinon": "2.2.0" }, "optionalDependencies": { - "raml2html": "4.0.5" + "raml2html": "6.4.1" } }