Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update React.propTypes -> PropTypes #265

Merged
merged 2 commits into from
Apr 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-helmet",
"description": "A document head manager for React",
"version": "5.0.2",
"version": "5.0.3",
"main": "./lib/Helmet.js",
"author": "NFL <[email protected]>",
"contributors": [
Expand Down Expand Up @@ -32,7 +32,8 @@
"dependencies": {
"deep-equal": "^1.0.1",
"object-assign": "^4.1.1",
"react-side-effect": "^1.1.0"
"react-side-effect": "^1.1.0",
"prop-types": "^15.5.4"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(sorry for nitpicking)
I guess this line should be moved before react-side-effect (to keep the list sorted alphabetically).

},
"devDependencies": {
"babel-cli": "^6.24.0",
Expand Down
35 changes: 18 additions & 17 deletions src/Helmet.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import PropTypes from "prop-types";
import withSideEffect from "react-side-effect";
import deepEqual from "deep-equal";
import {
Expand Down Expand Up @@ -28,24 +29,24 @@ const Helmet = (Component) => class HelmetWrapper extends React.Component {
* @param {String} titleTemplate: "MySite.com - %s"
*/
static propTypes = {
base: React.PropTypes.object,
bodyAttributes: React.PropTypes.object,
children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.node),
React.PropTypes.node
base: PropTypes.object,
bodyAttributes: PropTypes.object,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]),
defaultTitle: React.PropTypes.string,
encodeSpecialCharacters: React.PropTypes.bool,
htmlAttributes: React.PropTypes.object,
link: React.PropTypes.arrayOf(React.PropTypes.object),
meta: React.PropTypes.arrayOf(React.PropTypes.object),
noscript: React.PropTypes.arrayOf(React.PropTypes.object),
onChangeClientState: React.PropTypes.func,
script: React.PropTypes.arrayOf(React.PropTypes.object),
style: React.PropTypes.arrayOf(React.PropTypes.object),
title: React.PropTypes.string,
titleAttributes: React.PropTypes.object,
titleTemplate: React.PropTypes.string
defaultTitle: PropTypes.string,
encodeSpecialCharacters: PropTypes.bool,
htmlAttributes: PropTypes.object,
link: PropTypes.arrayOf(PropTypes.object),
meta: PropTypes.arrayOf(PropTypes.object),
noscript: PropTypes.arrayOf(PropTypes.object),
onChangeClientState: PropTypes.func,
script: PropTypes.arrayOf(PropTypes.object),
style: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string,
titleAttributes: PropTypes.object,
titleTemplate: PropTypes.string
};

static defaultProps = {
Expand Down
8 changes: 7 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,7 @@ fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"

fbjs@^0.8.1, fbjs@^0.8.4:
fbjs@^0.8.1, fbjs@^0.8.4, fbjs@^0.8.9:
version "0.8.11"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.11.tgz#340b590b8a2278a01ef7467c07a16da9b753db24"
dependencies:
Expand Down Expand Up @@ -3847,6 +3847,12 @@ promise@^7.1.1:
dependencies:
asap "~2.0.3"

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

prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
Expand Down