Skip to content

Commit

Permalink
Fixes depricated prop types, now we use separate npm package
Browse files Browse the repository at this point in the history
Resolves brave#8152

Auditors: @bsclifton @bbondy

Test Plan:
  • Loading branch information
NejcZdovc committed Apr 10, 2017
1 parent 16ac2ab commit e9e3f1d
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 20 deletions.
7 changes: 4 additions & 3 deletions js/about/passwords.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const React = require('react')
const PropTypes = require('prop-types')
const messages = require('../constants/messages')
const Immutable = require('immutable')
const aboutActions = require('./aboutActions')
Expand Down Expand Up @@ -82,7 +83,7 @@ class SiteItem extends React.Component {
}

SiteItem.propTypes = {
site: React.PropTypes.string
site: PropTypes.string
}

class PasswordItem extends React.Component {
Expand Down Expand Up @@ -161,8 +162,8 @@ class PasswordItem extends React.Component {
}

PasswordItem.propTypes = {
password: React.PropTypes.object,
id: React.PropTypes.number
password: PropTypes.object,
id: PropTypes.number
}

class AboutPasswords extends React.Component {
Expand Down
13 changes: 7 additions & 6 deletions js/components/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const React = require('react')
const PropTypes = require('prop-types')
const ImmutableComponent = require('./immutableComponent')
const KeyCodes = require('../../app/common/constants/keyCodes')

Expand Down Expand Up @@ -41,13 +42,13 @@ class Dialog extends ImmutableComponent {
}

Dialog.propTypes = {
children: React.PropTypes.oneOfType([
React.PropTypes.element,
React.PropTypes.array
children: PropTypes.oneOfType([
PropTypes.element,
PropTypes.array
]),
className: React.PropTypes.string,
isClickDismiss: React.PropTypes.bool,
onHide: React.PropTypes.func
className: PropTypes.string,
isClickDismiss: PropTypes.bool,
onHide: PropTypes.func
}

module.exports = Dialog
11 changes: 6 additions & 5 deletions js/components/dialogButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const React = require('react')
const PropTypes = require('prop-types')
const ReactDOM = require('react-dom')
const ImmutableComponent = require('./immutableComponent')

Expand Down Expand Up @@ -30,11 +31,11 @@ class DialogButton extends ImmutableComponent {
}

DialogButton.propTypes = {
'data-l10n-id': React.PropTypes.string,
onClick: React.PropTypes.func,
returnValue: React.PropTypes.bool,
returnValueCallback: React.PropTypes.func,
text: React.PropTypes.string
'data-l10n-id': PropTypes.string,
onClick: PropTypes.func,
returnValue: PropTypes.bool,
returnValueCallback: PropTypes.func,
text: PropTypes.string
}

module.exports = DialogButton
3 changes: 2 additions & 1 deletion js/components/loginRequired.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const React = require('react')
const PropTypes = require('prop-types')
const Dialog = require('./dialog')
const Button = require('./button')
const appActions = require('../actions/appActions')
Expand Down Expand Up @@ -99,5 +100,5 @@ class LoginRequired extends React.Component {
}
}

LoginRequired.propTypes = { frameProps: React.PropTypes.object }
LoginRequired.propTypes = { frameProps: PropTypes.object }
module.exports = LoginRequired
5 changes: 3 additions & 2 deletions js/components/noScriptInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const React = require('react')
const PropTypes = require('prop-types')
const Immutable = require('immutable')
const ImmutableComponent = require('./immutableComponent')
const Dialog = require('./dialog')
Expand Down Expand Up @@ -129,8 +130,8 @@ class NoScriptInfo extends ImmutableComponent {
}

NoScriptInfo.propTypes = {
frameProps: React.PropTypes.object,
onHide: React.PropTypes.func
frameProps: PropTypes.object,
onHide: PropTypes.func
}

module.exports = NoScriptInfo
5 changes: 3 additions & 2 deletions js/components/siteInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */

const React = require('react')
const PropTypes = require('prop-types')
const ImmutableComponent = require('./immutableComponent')
const cx = require('../lib/classSet')
const {isPotentialPhishingUrl} = require('../lib/urlutil')
Expand Down Expand Up @@ -228,8 +229,8 @@ class SiteInfo extends ImmutableComponent {
}

SiteInfo.propTypes = {
frameProps: React.PropTypes.object,
onHide: React.PropTypes.func
frameProps: PropTypes.object,
onHide: PropTypes.func
}

const styles = StyleSheet.create({
Expand Down
3 changes: 2 additions & 1 deletion js/components/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Controller view which manages the top level immutable state for the app

const React = require('react')
const PropTypes = require('prop-types')
const Immutable = require('immutable')
const windowStore = require('../stores/windowStore')
const appStoreRenderer = require('../stores/appStoreRenderer')
Expand Down Expand Up @@ -117,6 +118,6 @@ class Window extends React.Component {
}
}

Window.propTypes = { appState: React.PropTypes.object, frames: React.PropTypes.array, initWindowState: React.PropTypes.object }
Window.propTypes = { appState: PropTypes.object, frames: PropTypes.array, initWindowState: PropTypes.object }

module.exports = Window
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"normalize-url": "^1.7.0",
"parse-torrent": "^5.8.1",
"prettier-bytes": "^1.0.3",
"prop-types": "^15.5.6",
"punycode": "^2.0.0",
"qr-image": "3.2.0",
"random-lib": "2.1.0",
Expand Down

0 comments on commit e9e3f1d

Please sign in to comment.