From 73ee40972e2deea24533c369b1d6ab5ddcc8e79c Mon Sep 17 00:00:00 2001 From: Robbie dela Victoria Date: Sat, 8 Apr 2017 15:39:54 -0700 Subject: [PATCH 1/2] Update React.propTypes -> PropTypes --- package.json | 5 +++-- src/Helmet.js | 35 ++++++++++++++++++----------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index ce27f42a..0f5def05 100644 --- a/package.json +++ b/package.json @@ -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 ", "contributors": [ @@ -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" }, "devDependencies": { "babel-cli": "^6.24.0", diff --git a/src/Helmet.js b/src/Helmet.js index 0d3640d2..7474e5d5 100644 --- a/src/Helmet.js +++ b/src/Helmet.js @@ -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 { @@ -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 = { From fac572129eb7bc1c2db394b24c7dbca528e38bdd Mon Sep 17 00:00:00 2001 From: Robbie dela Victoria Date: Sun, 9 Apr 2017 09:32:03 -0700 Subject: [PATCH 2/2] add yarn.lock --- yarn.lock | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 10737175..8f053f0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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: @@ -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"