Skip to content

Commit

Permalink
Updated PropTypes to come from prop-types. Added prop-types dependenc…
Browse files Browse the repository at this point in the history
…y to avoid deprecation warnings for React 15.5+.
  • Loading branch information
Brian Vaughn committed Apr 9, 2017
1 parent a24c3ef commit 5ef2445
Show file tree
Hide file tree
Showing 33 changed files with 72 additions and 32 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
------------

##### 9.7.1
* ✨ Added `prop-types` dependency to avoid deprecation warnings for React 15.5+.

##### 9.7.0
* Added public animation-friendly API methods to `Grid`/`List`/`Table` for an alternative to props-based animating. ([@imadha](https://github.com/imadha) - [#641](https://github.com/bvaughn/react-virtualized/pull/641))

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "React components for efficiently rendering large, scrollable lists and tabular data",
"author": "Brian Vaughn <brian.david.vaughn@gmail.com>",
"user": "bvaughn",
"version": "9.7.0",
"version": "9.7.1",
"homepage": "https://github.com/bvaughn/react-virtualized",
"main": "dist/commonjs/index.js",
"module": "dist/es/index.js",
Expand Down Expand Up @@ -150,7 +150,8 @@
"babel-runtime": "^6.11.6",
"classnames": "^2.2.3",
"dom-helpers": "^2.4.0 || ^3.0.0",
"loose-envify": "^1.3.0"
"loose-envify": "^1.3.0",
"prop-types": "^15.5.4"
},
"peerDependencies": {
"react": "^15.3.0 || ^16.0.0-alpha",
Expand Down
3 changes: 2 additions & 1 deletion source/ArrowKeyStepper/ArrowKeyStepper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'

/**
* This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time.
Expand Down
3 changes: 2 additions & 1 deletion source/AutoSizer/AutoSizer.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import AutoSizer from './AutoSizer'
import List from '../List'
Expand Down
3 changes: 2 additions & 1 deletion source/AutoSizer/AutoSizer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import createDetectElementResize from '../vendor/detectElementResize'

/**
Expand Down
3 changes: 2 additions & 1 deletion source/CellMeasurer/CellMeasurer.DynamiHeightGrid.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import CellMeasurer from './CellMeasurer'
import CellMeasurerCache from './CellMeasurerCache'
import Grid from '../Grid'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import CellMeasurer from './CellMeasurer'
import CellMeasurerCache from './CellMeasurerCache'
import MultiGrid from '../MultiGrid'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import CellMeasurer from './CellMeasurer'
import CellMeasurerCache from './CellMeasurerCache'
import List from '../List'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import CellMeasurer from './CellMeasurer'
import CellMeasurerCache from './CellMeasurerCache'
import { Column, Table } from '../Table'
Expand Down
3 changes: 2 additions & 1 deletion source/CellMeasurer/CellMeasurer.DynamicWidthGrid.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import CellMeasurer from './CellMeasurer'
import CellMeasurerCache from './CellMeasurerCache'
import Grid from '../Grid'
Expand Down
3 changes: 2 additions & 1 deletion source/CellMeasurer/CellMeasurer.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import AutoSizer from '../AutoSizer'
import cn from 'classnames'
Expand Down
3 changes: 2 additions & 1 deletion source/Collection/Collection.example.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import Immutable from 'immutable'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import { LabeledInput, InputRow } from '../demo/LabeledInput'
Expand Down
3 changes: 2 additions & 1 deletion source/Collection/Collection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import CollectionView from './CollectionView'
import calculateSizeAndPositionData from './utils/calculateSizeAndPositionData'
import getUpdatedOffsetForIndex from '../utils/getUpdatedOffsetForIndex'
Expand Down
3 changes: 2 additions & 1 deletion source/Collection/CollectionView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import cn from 'classnames'
import createCallbackMemoizer from '../utils/createCallbackMemoizer'
import getScrollbarSize from 'dom-helpers/util/scrollbarSize'
Expand Down
3 changes: 2 additions & 1 deletion source/ColumnSizer/ColumnSizer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import { PureComponent } from 'react'

/**
* High-order component that auto-calculates column-widths for `Grid` cells.
Expand Down
3 changes: 2 additions & 1 deletion source/Grid/Grid.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import { LabeledInput, InputRow } from '../demo/LabeledInput'
import AutoSizer from '../AutoSizer'
Expand Down
3 changes: 2 additions & 1 deletion source/Grid/Grid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import React, { PropTypes, PureComponent } from 'react'
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import cn from 'classnames'
import calculateSizeAndPositionDataAndUpdateScrollOffset from './utils/calculateSizeAndPositionDataAndUpdateScrollOffset'
import ScalingCellSizeAndPositionManager from './utils/ScalingCellSizeAndPositionManager'
Expand Down
3 changes: 2 additions & 1 deletion source/List/List.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*/
import cn from 'classnames'
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import styles from './List.example.css'
import AutoSizer from '../AutoSizer'
import List from './List'
Expand Down
3 changes: 2 additions & 1 deletion source/List/List.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Grid, { accessibilityOverscanIndicesGetter } from '../Grid'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import cn from 'classnames'

/**
Expand Down
3 changes: 2 additions & 1 deletion source/Masonry/Masonry.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import { LabeledInput, InputRow } from '../demo/LabeledInput'
import { CellMeasurer, CellMeasurerCache } from '../CellMeasurer'
Expand Down
3 changes: 2 additions & 1 deletion source/MultiGrid/MultiGrid.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import { LabeledInput, InputRow } from '../demo/LabeledInput'
import AutoSizer from '../AutoSizer'
Expand Down
3 changes: 2 additions & 1 deletion source/MultiGrid/MultiGrid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import Grid from '../Grid'

const SCROLLBAR_SIZE_BUFFER = 20
Expand Down
3 changes: 2 additions & 1 deletion source/ScrollSync/ScrollSync.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import { PureComponent } from 'react'

/**
* HOC that simplifies the process of synchronizing scrolling between two or more virtualized components.
Expand Down
3 changes: 2 additions & 1 deletion source/Table/Column.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import { Component, PropTypes } from 'react'
import PropTypes from 'prop-types'
import { Component } from 'react'
import defaultHeaderRenderer from './defaultHeaderRenderer'
import defaultCellRenderer from './defaultCellRenderer'
import defaultCellDataGetter from './defaultCellDataGetter'
Expand Down
3 changes: 2 additions & 1 deletion source/Table/SortIndicator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { PropTypes } from 'react'
import cn from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import SortDirection from './SortDirection'

/**
Expand Down
3 changes: 2 additions & 1 deletion source/Table/Table.example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import { LabeledInput, InputRow } from '../demo/LabeledInput'
import AutoSizer from '../AutoSizer'
Expand Down
3 changes: 2 additions & 1 deletion source/Table/Table.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/** @flow */
import cn from 'classnames'
import Column from './Column'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { findDOMNode } from 'react-dom'
import Grid, { accessibilityOverscanIndicesGetter } from '../Grid'
import defaultRowRenderer from './defaultRowRenderer'
Expand Down
3 changes: 2 additions & 1 deletion source/WindowScroller/WindowScroller.example.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/** @flow */
import cn from 'classnames'
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { ContentBox, ContentBoxHeader, ContentBoxParagraph } from '../demo/ContentBox'
import WindowScroller from './WindowScroller'
import List from '../List'
Expand Down
3 changes: 2 additions & 1 deletion source/WindowScroller/WindowScroller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @flow */
import { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import { PureComponent } from 'react'
import ReactDOM from 'react-dom'
import { registerScrollListener, unregisterScrollListener } from './utils/onScroll'
import { getDimensions, getPositionOffset, getScrollOffset } from './utils/dimensions'
Expand Down
3 changes: 2 additions & 1 deletion source/demo/Application.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @flow */
import Immutable from 'immutable'
import React, { PropTypes, PureComponent } from 'react'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { HashRouter, Match, Redirect } from 'react-router'

import ComponentLink from './ComponentLink'
Expand Down
3 changes: 2 additions & 1 deletion source/demo/Icon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import cn from 'classnames'
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import styles from './Icon.css'

// TODO: Remove unused BURGER and ARROW_LEFT?
Expand Down
3 changes: 2 additions & 1 deletion source/demo/LabeledInput.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react'
import PropTypes from 'prop-types'
import React from 'react'
import cn from 'classnames'
import styles from './LabeledInput.css'

Expand Down
6 changes: 6 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4491,6 +4491,12 @@ promise@^7.1.1:
dependencies:
asap "~2.0.3"

prop-types@^15.5.4:
version "15.5.4"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.4.tgz#2ed3692716a5060f8cc020946d8238e7419d92c0"
dependencies:
fbjs "^0.8.9"

proxy-addr@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.2.tgz#b4cc5f22610d9535824c123aef9d3cf73c40ba37"
Expand Down

0 comments on commit 5ef2445

Please sign in to comment.