diff --git a/NOTICE.txt b/NOTICE.txt index 4d52366eac0..966bef9ed58 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -382,10 +382,53 @@ limitations under the License. --- +## prop-types + +This product contains a modified portion of 'prop-types', runtime type checking for React props and similar objects, by Facebook, Inc. + +* HOMEPAGE: + * https://github.com/facebook/prop-types + +* LICENSE: + +BSD License + +For React software + +Copyright (c) 2013-present, Facebook, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + ## react -This product contains a modified portion of 'react', a declarative, efficient, and flexible JavaScript library for building user interfaces, -'react-addons-css-transition-group', the React CSSTransitionGroup add-on, and 'react-dom', the entry point of the DOM-related +This product contains a modified portion of 'react', a declarative, efficient, and flexible JavaScript library for building user interfaces, +'create-react-class', a drop-in replacement for React.createClass, and 'react-dom', the entry point of the DOM-related rendering paths, by Facebook, Inc. * HOMEPAGE: @@ -489,6 +532,48 @@ THE SOFTWARE. --- +## react-transition-group + +This product contains a modified portion of 'react-transition-group', a fork, and "drop in" replacement for the original React TransitionGroup addons, by React Community. + +* HOMEPAGE: + * https://github.com/reactjs/react-transition-group + +* LICENSE: + +BSD 3-Clause License + +Copyright (c) 2016, React Community +Forked from React (https://github.com/facebook/react) Copyright 2013-present, Facebook, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + ## simple-spellchecker This product contains a modified portion of 'simple-spellchecker', a simple and fast spellchecker with spelling suggestions and Electron's integration, by jfmdev. diff --git a/package.json b/package.json index d366ed3e299..869423ae3b1 100644 --- a/package.json +++ b/package.json @@ -38,27 +38,27 @@ }, "devDependencies": { "7zip-bin": "^2.0.4", - "babel-core": "^6.23.1", - "babel-eslint": "^7.1.1", - "babel-loader": "^6.3.2", + "babel-core": "^6.24.1", + "babel-eslint": "^7.2.3", + "babel-loader": "^7.0.0", "babel-plugin-transform-object-rest-spread": "^6.23.0", - "babel-preset-react": "^6.23.0", + "babel-preset-react": "^6.24.1", "chai": "^3.5.0", - "cross-env": "^3.1.4", + "cross-env": "^4.0.0", "devtron": "^1.4.0", - "electron": "1.6.2", - "electron-builder": "^14.5.3", - "electron-builder-squirrel-windows": "^15.0.0", + "electron": "1.6.6", + "electron-builder": "17.4.0", + "electron-builder-squirrel-windows": "17.4.0", "electron-connect": "^0.6.1", - "eslint": "^3.16.1", - "eslint-plugin-react": "^6.10.0", - "mocha": "^3.2.0", + "eslint": "^3.19.0", + "eslint-plugin-react": "^7.0.0", + "mocha": "^3.3.0", "mocha-circleci-reporter": "0.0.2", "npm-run-all": "^4.0.2", - "spectron": "~3.6.0", + "spectron": "~3.6.2", "url-loader": "^0.5.8", - "webpack": "^2.2.1", - "webpack-dev-server": "^2.4.1", - "webpack-merge": "^3.0.0" + "webpack": "^2.5.1", + "webpack-dev-server": "^2.4.5", + "webpack-merge": "^4.1.0" } } diff --git a/scripts/cp_artifacts.sh b/scripts/cp_artifacts.sh index ae56ff41828..b99dfb3c11c 100644 --- a/scripts/cp_artifacts.sh +++ b/scripts/cp_artifacts.sh @@ -10,7 +10,7 @@ cp "${SRC}/Mattermost-${VERSION}-ia32-win.zip" "${DEST}/mattermost-desktop-${VER cp "${SRC}/win/Mattermost Setup ${VERSION}.exe" "${DEST}/mattermost-setup-${VERSION}-win64.exe" cp "${SRC}/win-ia32/Mattermost Setup ${VERSION}-ia32.exe" "${DEST}/mattermost-setup-${VERSION}-win32.exe" -cp "${SRC}/mac/Mattermost-${VERSION}-mac.tar.gz" "${DEST}/mattermost-desktop-${VERSION}-mac.tar.gz" +cp "${SRC}/Mattermost-${VERSION}-mac.tar.gz" "${DEST}/mattermost-desktop-${VERSION}-mac.tar.gz" cp "${SRC}/mattermost-desktop-${VERSION}.tar.gz" "${DEST}/mattermost-desktop-${VERSION}-linux-x64.tar.gz" cp "${SRC}/mattermost-desktop-${VERSION}-ia32.tar.gz" "${DEST}/mattermost-desktop-${VERSION}-linux-ia32.tar.gz" diff --git a/src/browser/components/AutoSaveIndicator.jsx b/src/browser/components/AutoSaveIndicator.jsx index 6685502eb17..d2a16499ab4 100644 --- a/src/browser/components/AutoSaveIndicator.jsx +++ b/src/browser/components/AutoSaveIndicator.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const {Alert} = require('react-bootstrap'); const baseClassName = 'AutoSaveIndicator'; @@ -34,8 +35,8 @@ function AutoSaveIndicator(props) { } AutoSaveIndicator.propTypes = { - savingState: React.PropTypes.string.isRequired, - errorMessage: React.PropTypes.string + savingState: PropTypes.string.isRequired, + errorMessage: PropTypes.string }; module.exports = AutoSaveIndicator; diff --git a/src/browser/components/DestructiveConfirmModal.jsx b/src/browser/components/DestructiveConfirmModal.jsx index 8a87869264b..172e8cb6aef 100644 --- a/src/browser/components/DestructiveConfirmModal.jsx +++ b/src/browser/components/DestructiveConfirmModal.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const {Button, Modal} = require('react-bootstrap'); function DestructiveConfirmationModal(props) { @@ -31,12 +32,12 @@ function DestructiveConfirmationModal(props) { } DestructiveConfirmationModal.propTypes = { - title: React.PropTypes.string.isRequired, - body: React.PropTypes.node.isRequired, - acceptLabel: React.PropTypes.string.isRequired, - cancelLabel: React.PropTypes.string.isRequired, - onAccept: React.PropTypes.func.isRequired, - onCancel: React.PropTypes.func.isRequired + title: PropTypes.string.isRequired, + body: PropTypes.node.isRequired, + acceptLabel: PropTypes.string.isRequired, + cancelLabel: PropTypes.string.isRequired, + onAccept: PropTypes.func.isRequired, + onCancel: PropTypes.func.isRequired }; module.exports = DestructiveConfirmationModal; diff --git a/src/browser/components/ErrorView.jsx b/src/browser/components/ErrorView.jsx index 0326635b713..cde8bd04bc3 100644 --- a/src/browser/components/ErrorView.jsx +++ b/src/browser/components/ErrorView.jsx @@ -1,6 +1,7 @@ // ErrorCode: https://code.google.com/p/chromium/codesearch#chromium/src/net/base/net_error_list.h const React = require('react'); +const PropTypes = require('prop-types'); const {Grid, Row, Col} = require('react-bootstrap'); const errorPage = { @@ -92,10 +93,10 @@ function ErrorView(props) { } ErrorView.propTypes = { - errorInfo: React.PropTypes.object, - id: React.PropTypes.number, - active: React.PropTypes.bool, - withTab: React.PropTypes.bool + errorInfo: PropTypes.object, + id: PropTypes.number, + active: PropTypes.bool, + withTab: PropTypes.bool }; module.exports = ErrorView; diff --git a/src/browser/components/HoveringURL.jsx b/src/browser/components/HoveringURL.jsx index ba96211b54b..adfa87a736c 100644 --- a/src/browser/components/HoveringURL.jsx +++ b/src/browser/components/HoveringURL.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); function HoveringURL(props) { return ( @@ -9,8 +10,8 @@ function HoveringURL(props) { } HoveringURL.propTypes = { - style: React.PropTypes.object, - targetURL: React.PropTypes.string + style: PropTypes.object, + targetURL: PropTypes.string }; module.exports = HoveringURL; diff --git a/src/browser/components/LoginModal.jsx b/src/browser/components/LoginModal.jsx index 0e04156e0a3..26440c03765 100644 --- a/src/browser/components/LoginModal.jsx +++ b/src/browser/components/LoginModal.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const ReactDOM = require('react-dom'); const {Button, Col, ControlLabel, Form, FormGroup, FormControl, Modal} = require('react-bootstrap'); @@ -86,12 +87,12 @@ class LoginModal extends React.Component { } LoginModal.propTypes = { - authInfo: React.PropTypes.object, - authServerURL: React.PropTypes.string, - onCancel: React.PropTypes.func, - onLogin: React.PropTypes.func, - request: React.PropTypes.object, - show: React.PropTypes.bool + authInfo: PropTypes.object, + authServerURL: PropTypes.string, + onCancel: PropTypes.func, + onLogin: PropTypes.func, + request: PropTypes.object, + show: PropTypes.bool }; module.exports = LoginModal; diff --git a/src/browser/components/MainPage.jsx b/src/browser/components/MainPage.jsx index a1d6bcf001d..35d4a6ffab0 100644 --- a/src/browser/components/MainPage.jsx +++ b/src/browser/components/MainPage.jsx @@ -1,5 +1,7 @@ const React = require('react'); -const ReactCSSTransitionGroup = require('react-addons-css-transition-group'); +const PropTypes = require('prop-types'); +const createReactClass = require('create-react-class'); +const ReactCSSTransitionGroup = require('react-transition-group/CSSTransitionGroup'); const {Grid, Row} = require('react-bootstrap'); const {ipcRenderer, remote} = require('electron'); @@ -34,14 +36,14 @@ const styles = { } }; -const MainPage = React.createClass({ +const MainPage = createReactClass({ propTypes: { - onUnreadCountChange: React.PropTypes.func.isRequired, - teams: React.PropTypes.array.isRequired, - onTeamConfigChange: React.PropTypes.func.isRequired, - initialIndex: React.PropTypes.number.isRequired, - useSpellChecker: React.PropTypes.bool.isRequired, - onSelectSpellCheckerLocale: React.PropTypes.func.isRequired + onUnreadCountChange: PropTypes.func.isRequired, + teams: PropTypes.array.isRequired, + onTeamConfigChange: PropTypes.func.isRequired, + initialIndex: PropTypes.number.isRequired, + useSpellChecker: PropTypes.bool.isRequired, + onSelectSpellCheckerLocale: PropTypes.func.isRequired }, getInitialState() { diff --git a/src/browser/components/MattermostView.jsx b/src/browser/components/MattermostView.jsx index 76bcab18bb0..26acd04a43e 100644 --- a/src/browser/components/MattermostView.jsx +++ b/src/browser/components/MattermostView.jsx @@ -1,4 +1,6 @@ const React = require('react'); +const PropTypes = require('prop-types'); +const createReactClass = require('create-react-class'); const {findDOMNode} = require('react-dom'); const {ipcRenderer, remote, shell} = require('electron'); const url = require('url'); @@ -8,17 +10,17 @@ const ErrorView = require('./ErrorView.jsx'); const preloadJS = `file://${remote.app.getAppPath()}/browser/webview/mattermost_bundle.js`; -const MattermostView = React.createClass({ +const MattermostView = createReactClass({ propTypes: { - name: React.PropTypes.string, - id: React.PropTypes.string, - onTargetURLChange: React.PropTypes.func, - onUnreadCountChange: React.PropTypes.func, - src: React.PropTypes.string, - active: React.PropTypes.bool, - withTab: React.PropTypes.bool, - useSpellChecker: React.PropTypes.bool, - onSelectSpellCheckerLocale: React.PropTypes.func + name: PropTypes.string, + id: PropTypes.string, + onTargetURLChange: PropTypes.func, + onUnreadCountChange: PropTypes.func, + src: PropTypes.string, + active: PropTypes.bool, + withTab: PropTypes.bool, + useSpellChecker: PropTypes.bool, + onSelectSpellCheckerLocale: PropTypes.func }, getInitialState() { diff --git a/src/browser/components/NewTeamModal.jsx b/src/browser/components/NewTeamModal.jsx index c0d92526e13..248838803d0 100644 --- a/src/browser/components/NewTeamModal.jsx +++ b/src/browser/components/NewTeamModal.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const {Modal, Button, FormGroup, FormControl, ControlLabel, HelpBlock} = require('react-bootstrap'); class NewTeamModal extends React.Component { @@ -199,11 +200,11 @@ class NewTeamModal extends React.Component { } NewTeamModal.propTypes = { - onClose: React.PropTypes.func, - onSave: React.PropTypes.func, - team: React.PropTypes.object, - editMode: React.PropTypes.bool, - show: React.PropTypes.bool + onClose: PropTypes.func, + onSave: PropTypes.func, + team: PropTypes.object, + editMode: PropTypes.bool, + show: PropTypes.bool }; module.exports = NewTeamModal; diff --git a/src/browser/components/RemoveServerModal.jsx b/src/browser/components/RemoveServerModal.jsx index 37d56fa175d..8955cab0b99 100644 --- a/src/browser/components/RemoveServerModal.jsx +++ b/src/browser/components/RemoveServerModal.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const {Modal} = require('react-bootstrap'); const DestructiveConfirmationModal = require('./DestructiveConfirmModal.jsx'); @@ -26,7 +27,7 @@ function RemoveServerModal(props) { } RemoveServerModal.propTypes = { - serverName: React.PropTypes.string.isRequired + serverName: PropTypes.string.isRequired }; module.exports = RemoveServerModal; diff --git a/src/browser/components/SettingsPage.jsx b/src/browser/components/SettingsPage.jsx index f9307a97937..5a3f71d6589 100644 --- a/src/browser/components/SettingsPage.jsx +++ b/src/browser/components/SettingsPage.jsx @@ -1,4 +1,6 @@ const React = require('react'); +const PropTypes = require('prop-types'); +const createReactClass = require('create-react-class'); const ReactDOM = require('react-dom'); const {Button, Checkbox, Col, FormGroup, Grid, HelpBlock, Navbar, Radio, Row} = require('react-bootstrap'); @@ -22,9 +24,9 @@ function backToIndex(index) { remote.getCurrentWindow().loadURL(`${indexURL}?index=${target}`); } -const SettingsPage = React.createClass({ +const SettingsPage = createReactClass({ propTypes: { - configFile: React.PropTypes.string + configFile: PropTypes.string }, getInitialState() { diff --git a/src/browser/components/TabBar.jsx b/src/browser/components/TabBar.jsx index 021f451e53c..f59c0b534db 100644 --- a/src/browser/components/TabBar.jsx +++ b/src/browser/components/TabBar.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); const {Nav, NavItem, Button} = require('react-bootstrap'); class TabBar extends React.Component { @@ -116,11 +117,11 @@ class TabBar extends React.Component { } TabBar.propTypes = { - activeKey: React.PropTypes.number, - id: React.PropTypes.string, - onSelect: React.PropTypes.func, - teams: React.PropTypes.array, - onAddServer: React.PropTypes.func + activeKey: PropTypes.number, + id: PropTypes.string, + onSelect: PropTypes.func, + teams: PropTypes.array, + onAddServer: PropTypes.func }; module.exports = TabBar; diff --git a/src/browser/components/TeamList.jsx b/src/browser/components/TeamList.jsx index 195f3529366..1bba6240b23 100644 --- a/src/browser/components/TeamList.jsx +++ b/src/browser/components/TeamList.jsx @@ -1,19 +1,21 @@ const React = require('react'); +const PropTypes = require('prop-types'); +const createReactClass = require('create-react-class'); const {ListGroup} = require('react-bootstrap'); const TeamListItem = require('./TeamListItem.jsx'); const NewTeamModal = require('./NewTeamModal.jsx'); const RemoveServerModal = require('./RemoveServerModal.jsx'); -const TeamList = React.createClass({ +const TeamList = createReactClass({ propTypes: { - onTeamsChange: React.PropTypes.func, - showAddTeamForm: React.PropTypes.bool, - teams: React.PropTypes.array, - addServer: React.PropTypes.func, - updateTeam: React.PropTypes.func, - toggleAddTeamForm: React.PropTypes.func, - setAddTeamFormVisibility: React.PropTypes.func, - onTeamClick: React.PropTypes.func + onTeamsChange: PropTypes.func, + showAddTeamForm: PropTypes.bool, + teams: PropTypes.array, + addServer: PropTypes.func, + updateTeam: PropTypes.func, + toggleAddTeamForm: PropTypes.func, + setAddTeamFormVisibility: PropTypes.func, + onTeamClick: PropTypes.func }, getInitialState() { diff --git a/src/browser/components/TeamListItem.jsx b/src/browser/components/TeamListItem.jsx index 8d128c13433..bb73ccccaca 100644 --- a/src/browser/components/TeamListItem.jsx +++ b/src/browser/components/TeamListItem.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); class TeamListItem extends React.Component { constructor(props) { @@ -49,11 +50,11 @@ class TeamListItem extends React.Component { } TeamListItem.propTypes = { - name: React.PropTypes.string, - onTeamEditing: React.PropTypes.func, - onTeamRemove: React.PropTypes.func, - onTeamClick: React.PropTypes.func, - url: React.PropTypes.string + name: PropTypes.string, + onTeamEditing: PropTypes.func, + onTeamRemove: PropTypes.func, + onTeamClick: PropTypes.func, + url: PropTypes.string }; module.exports = TeamListItem; diff --git a/src/package.json b/src/package.json index 3a72965b240..039fc3c535c 100644 --- a/src/package.json +++ b/src/package.json @@ -14,14 +14,16 @@ "dependencies": { "auto-launch": "^5.0.1", "bootstrap": "^3.3.7", - "electron-context-menu": "^0.8.0", - "electron-devtools-installer": "^2.1.0", + "create-react-class": "^15.5.3", + "electron-context-menu": "^0.9.0", + "electron-devtools-installer": "^2.2.0", "electron-is-dev": "^0.1.2", "electron-squirrel-startup": "^1.0.0", - "react": "^15.4.2", - "react-addons-css-transition-group": "^15.4.2", - "react-bootstrap": "~0.30.7", - "react-dom": "^15.4.2", + "prop-types": "^15.5.9", + "react": "^15.5.4", + "react-bootstrap": "~0.31.0", + "react-dom": "^15.5.4", + "react-transition-group": "^1.1.1", "simple-spellchecker": "git://github.com/jfmdev/simple-spellchecker.git#723062952a0290c6285aeaf02f14d9c74c41cadb", "underscore": "^1.8.3", "yargs": "^3.32.0"