Skip to content

Commit

Permalink
Widen range of recommended replacement module versions
Browse files Browse the repository at this point in the history
**what is the change?:**
Instead of recommending specific versions of 'prop-types' and
'create-react-class' we ask folks to use the latest available 15.* version.

**why make this change?:**
The latest version of those plugins, within the 15 version, is the most likely
to be stable. For example, we know that 'react-create-class' is broken for AMD
builds at the current latest version, so once we release a fix then the
recommended version will change.

**test plan:**
Visual inspection
Also fixed some tests.
  • Loading branch information
flarnie committed May 26, 2017
1 parent cc99621 commit 59d2074
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/isomorphic/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ if (__DEV__) {
didWarnPropTypesDeprecated,
'Accessing PropTypes via the main React package is deprecated,' +
' and will be removed in React v16.0.' +
' Use the prop-types package from npm instead.' +
' Version 15.5.10 provides a drop-in replacement.' +
' Use the latest available 15.* prop-types package from npm instead.' +
' For info on usage, compatibility, migration and more, see ' +
'https://fb.me/prop-types-docs',
);
Expand All @@ -129,7 +128,7 @@ if (__DEV__) {
'Accessing createClass via the main React package is deprecated,' +
' and will be removed in React v16.0.' +
" Use a plain JavaScript class instead. If you're not yet " +
'ready to migrade, create-react-class v15.5.3 is available ' +
'ready to migrade, create-react-class v15.* is available ' +
'on npm as a temporary, drop-in replacement. ' +
'For more info see https://fb.me/react-create-class',
);
Expand Down
11 changes: 5 additions & 6 deletions src/isomorphic/__tests__/React-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ describe('React', () => {
expect(console.warn.calls.count()).toBe(1);
expect(console.warn.calls.argsFor(0)[0]).toContain(
'Warning: Accessing createClass via the main React package is ' +
'deprecated, and will be removed in React v16.0. Use a plain ' +
"JavaScript class instead. If you're not yet ready to migrade," +
' create-react-class v15.5.3 is available on npm as a ' +
'temporary, drop-in replacement. ' +
'deprecated, and will be removed in React v16.0. ' +
'Use a plain JavaScript class instead. ' +
"If you're not yet ready to migrade, create-react-class " +
'v15.* is available on npm as a temporary, drop-in replacement. ' +
'For more info see https://fb.me/react-create-class',
);
});
Expand All @@ -63,8 +63,7 @@ describe('React', () => {
expect(console.warn.calls.argsFor(0)[0]).toContain(
'Warning: Accessing PropTypes via the main React package is ' +
'deprecated, and will be removed in React v16.0. ' +
'Use the prop-types package from npm instead. ' +
'Version 15.5.10 provides a drop-in replacement. ' +
'Use the latest available 15.* prop-types package from npm instead. ' +
'For info on usage, compatibility, migration and more, ' +
'see https://fb.me/prop-types-docs',
);
Expand Down

0 comments on commit 59d2074

Please sign in to comment.