Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

update packages and remove proptypes, createClass reference from React main package #106

Closed
Closed
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
14 changes: 8 additions & 6 deletions examples/dynamic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
"author": "Chris Johnson <[email protected]>",
"private": true,
"scripts": {
"start": "browserify -t babelify --standalone main views/main.js -o public/main.js && node app.js"
"start": "browserify -t [ babelify --presets [ es2015 react ] --standalone main views/main.js -o public/main.js ] && node app.js"
},
"dependencies": {
"babelify": "^6.3.0",
"browserify": "^8.0.3",
"express": "^4.10.6",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babelify": "^7.3.0",
"browserify": "^14.3.0",
"express": "^4.15.3",
"express-react-views": "file:../../",
"react": "^15.0.0",
"react-dom": "^15.0.0"
"react": "^15.5.4",
"react-dom": "^15.5.4"
}
}
11 changes: 6 additions & 5 deletions examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
"start": "node app.js"
},
"dependencies": {
"errorhandler": "^1.4.3",
"express": "^4.13.4",
"errorhandler": "^1.5.0",
"express": "^4.15.3",
"express-react-views": "file:../../",
"morgan": "^1.7.0",
"react": "^15.0.0",
"react-dom": "^15.0.0"
"morgan": "^1.8.1",
"prop-types": "^15.5.10",
"react": "^15.5.4",
"react-dom": "^15.5.4"
}
}
3 changes: 2 additions & 1 deletion examples/simple/views/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var React = require('react');
var PropTypes = require('prop-types');
var Layout = require('./layout');

// Contrived example to show how one might use Flow type annotations
Expand Down Expand Up @@ -26,7 +27,7 @@ class Index extends React.Component {
}

Index.propTypes = {
title: React.PropTypes.string
title: PropTypes.string
};

module.exports = Index;
3 changes: 2 additions & 1 deletion examples/simple/views/layout.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var React = require('react');
var PropTypes = require('prop-types');

class Layout extends React.Component {
render() {
Expand All @@ -23,7 +24,7 @@ class Layout extends React.Component {
}

Layout.propTypes = {
title: React.PropTypes.string
title: PropTypes.string
};

module.exports = Layout;
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@
"react-dom": "^0.14.0 || ^15.0.0"
},
"dependencies": {
"babel-preset-es2015": "^6.5.0",
"babel-preset-react": "^6.5.0",
"babel-register": "^6.5.1",
"js-beautify": "^1.5.10",
"lodash.escaperegexp": "^4.1.1",
"object-assign": "^4.0.1"
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-register": "^6.24.1",
"js-beautify": "^1.6.14",
"lodash.escaperegexp": "^4.1.2",
"object-assign": "^4.1.1"
},
"devDependencies": {
"react": "^15.0.0",
"react-dom": "^15.0.0",
"async": "^1.4.2"
"async": "^2.4.0",
"create-react-class": "^15.5.3",
"prop-types": "^15.5.10",
"react": "^15.5.4",
"react-dom": "^15.5.4"
}
}
6 changes: 4 additions & 2 deletions test/es5-component.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
var React = require('react');
var PropTypes = require('prop-types');
var createClass = require('create-react-class');

function countTo(n) {
var a = [];
Expand All @@ -8,9 +10,9 @@ function countTo(n) {
return a.join(', ');
}

var Index = React.createClass({
var Index = createClass({
propTypes: {
title: React.PropTypes.string
title: PropTypes.string
},

render: function() {
Expand Down
5 changes: 3 additions & 2 deletions test/es6-component.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const React = require('react');
const PropTypes = require('prop-types');

function countTo(n) {
var a = [];
Expand All @@ -8,7 +9,7 @@ function countTo(n) {
return a.join(', ');
}

class Index = extends React.Component {
class Index extends React.Component {
render() {
return (
<div>
Expand All @@ -24,7 +25,7 @@ class Index = extends React.Component {
}

Index.propTypes = {
title: React.PropTypes.string
title: PropTypes.string
};

module.exports = Index;
3 changes: 2 additions & 1 deletion test/es6-flow-component.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const React = require('react');
const PropTypes = require('prop-types');

// Contrived example to show how one might use Flow type annotations
function countTo(n:number):string {
Expand All @@ -25,7 +26,7 @@ class Index = extends React.Component {
}

Index.propTypes = {
title: Read.PropTypes.string
title: PropTypes.string
};

module.exports = Index;