Commit Graph
127 Commits
Author SHA1 Message Date
Flarnie MarchanandGitHub e5b3554edc Add 'create-react-class' to react dependencies for build (#9847)
**what is the change?:**
We needed this dependency in the package.json

**why make this change?:**
Even though `create-react-class` was added as a dependency to the
`package.json` in https://github.com/facebook/react/pull/9399/files we
didn't completely cherry-pick this change onto 15.6 from master in https://github.com/facebook/react/commit/b48b2594fae7af3228ff6a0727cf8828b33b419e

This fixes that omission.
Following this fix we will review PR 9399 and make sure nothing else was
missed.

**test plan:**
`yarn build` and inspect the `builds/packages/react/package.json`, see
that `create-react-class` is included.

**issue:**
https://github.com/facebook/react/issues/9830
2017-06-04 18:08:15 -07:00
Flarnie MarchanandGitHub fe031caf69 Hello 15.6 Release Candidate (#9828)
* Hello 15.6 Release Candidate

**what is the change?:**
We update the versions of all associated React packages when bumping the
version of React.

**why make this change?:**
We want to publish a RC to give folks time to try out the latest version
before it's final.

Why bump the version of every other associated package?

It makes the dependency between them more clear.

There will be cases where we make a fix in React-DOM and it requires
changes in React core. In that case, it will be more clear to people
when we update the versions of both and they remain in sync.

**test plan:**
Visual inspection

**issue:**
https://github.com/facebook/react/issues/9398

* Update a couple more packages versions

**what is the change?:**
Updates version for 'react-dom-factories' package and 'react-addons'
template.

**why make this change?:**
We missed these in the previous commit, which was copying the approach
from https://github.com/facebook/react/pull/9828/files

**test plan:**
Visual inspection, and running the build

**issue:**
https://github.com/facebook/react/issues/9398
2017-06-01 10:34:01 -07:00
Flarnie MarchanandGitHub 78fc25f251 Prepare react-dom-factories for publishing (#9823)
* Prepare `react-dom-factories` for publishing

**what is the change?:**
- copies the `React.DOM.*` factory helpers into the package and wraps
  them with an IIFE
- set peerDependency on React to latest 15 version

**why make this change?:**
We are deprecating `React.DOM.*` and this provides a fallback option for
those using it.

We just copied the code in order to avoid a circular dependency, which
keeps complexity down since we are supporting every possible build
system.

**test plan:**
TODO -
1. Copy this into one of our fixtures using a UMD/AMD build and see if
   it works there.
2. Do an initial publish of the package on npm and then pull it into
   CRA, and try it there.
3. Try it in https://github.com/duncanbeevers/jade-react or some other
   project that actually uses the `React.DOM.*` helpers, using the
   related codemod.

**issue:**
https://github.com/facebook/react/issues/9398

* Fix lints and capitalization of 'reactDOMFactories'

**what is the change?:**
Fixing nits in capitalization, quotes, and defined globals

**why make this change?:**
To get CI passing, consistency, correctness

**test plan:**
see prev. commit

**issue:**
https://github.com/facebook/react/issues/9398
2017-05-31 16:04:16 -07:00
Flarnie MarchanandGitHub 6086a22482 react-addons-dom-factories (#9780)
**what is the change?:**
`grep -r "react-addons-dom-factories" ./src` and the same in `./packages`
then `%s /react-addons-dom-factories/react-dom-factories/gc`

**why make this change?:**
React dom factories were never part of the 'addons' and we want to minimize the
whole 'addons' thing, since we are deprecating the `React.addons.*` API.

**test plan:**
`yarn test`
and manually look at the README that was updated.

**issue:**
https://github.com/facebook/react/issues/9398
2017-05-25 16:01:23 -07:00
Flarnie Marchan b43f830101 Remove random comment in react-dom-factories README
Remove a comment saying `es6`, since this is potentially unclear. We aren't
contrasting to an es5 example here.

Thanks to @gaearon for catching this in review of
https://github.com/facebook/react/pull/9780
2017-05-25 15:18:45 -07:00
Nathan HunzakerandFlarnie Marchan 0001036d35 Move ReactDOMFactories into separate package (#8356)
- Update examples to no longer use React.DOM
- Add package and documentation entries for react-addons-dom-factories
- Update dom-factories readme
- Set up proxy to intercept React.DOM usage
- Update ReactDOM children tests to use createElement
- Add more specific warning assertion for React DOM factories
- Do not use expectDev in ReactDOMFactories tests
2017-05-09 13:51:22 +01:00
Dan Abramov cef396d092 15.5.4 2017-04-11 20:23:39 +01:00
Dan Abramov 53a3b46fa9 Update prop-types version 2017-04-11 20:08:49 +01:00
Andrew Clark 0a7c4b3858 15.5.3 2017-04-07 21:08:39 -07:00
Andrew Clark 32c04c038f 15.5.2 2017-04-07 21:08:22 -07:00
Andrew Clark e2db791e75 15.5.1 2017-04-07 21:08:21 -07:00
Dan AbramovandBrian Vaughn 6c74952077 Build shallow renderer independently (#9375) 2017-04-07 21:06:47 -07:00
Andrew Clark e19c70013e 15.5.0 2017-04-07 14:21:27 -07:00
Andrew Clark cf205f35f4 Merge branch '15.5-dev' into 15-stable 2017-04-07 14:18:32 -07:00
Flarnie MarchanandAndrew Clark 0420e96a41 All doc updates forv15.5 (#9359)
* `react-addons-test-utils` -> `react-dom/test-utils`

Updating all references and docs on the `React.addons.TestUtils` and the
shallow renderer to refer to the correct targets.

Instead of:
```
const React = require('react');

// ...
React.addons.Testutils
// or

const ReactTestUtils = require('react-addons-test-utils');
```
we now show:
```
const ReactTestUtils = require('react-dom/test-utils');
```

And for shallow renderer, instead of:
```
const shallowRenderer = TestUtils.createRenderer();
```

we now show:
```
const shallowRenderer = require('react-test-renderer/shallow');
```

* Update the 'prev' and 'next' attributes of 'add-ons' docs

These flags are used to set arrow links to easily navigate through the
documents. They were wrong or missing in some of the 'add-ons' pages and
this bothered me when manually testing the updates from the previous
commit.

* Update syntax for instantiating shallow renderer

Missed this when updating the docs for the changes to shallow-renderer
in React 15.5.

* Fix pointers in addons docs

Thanks @bvaughn for catching this

* Make example of shallow renderer more consistent

We should show using the same variable names between code samples.

* Make names in example even more consistent

We should use the same variable name for the same thing across examples.
`renderer` -> `shallowRenderer`.

* Update docs to deprecate React<CSS>TransitionGroup

 - removes link to the docs about `ReactCSSTransitionGroup` and
   `ReactTransitionGroup` from the main navigation
 - updates 'prev' and 'next' pointers to skip this page
 - adds deprecation warning to the top of the page
 - remove references to these modules from the packages README
 - updates 'add-ons' main page to list this as a deprecated add-on

* Update `React.createClass` to `createReactClass` in the docs

The `React.createClass` method is being deprecated in favor of
`createReactClass`.

* Remove 'React.createClass' from top level API docs

It no longer makes sense to have a section for the 'createClass' method
in this page, since it won't be available as a top level method on
'React'.

I initially was going to pull the section about 'createClass' into a
separate page to add under 'addons' but it was short and duplicative of
the 'react-without-es6' docs. So I just linked to those.

* Remove *most* `React.PropTypes` from the docs

I am doing the docs for `context` in a separate commit because that case
was a bit less clear-cut.

We will no longer support `React.PropTypes` as a built-in feature of
React, and instead should direct folks to use the `PropTypes` project
that stands alone.

Rather than retaining the `React.PropTypes` examples and just revamping
them to show the use of the stand-alone `PropTypes` library with React,
it makes more sense to direct people to that project and reduce the
perceived API area and complexity of React core. The proper place to
document `PropTypes` is in the README or docs of that project, not in
React docs.

* Update `context` docs to not use `React.PropTypes`

We use `React.PropTypes` to define the `contextType` for the `context`
feature of React. It's unclear how this will work once `React.PropTypes`
is replaced by the external `PropTypes` library. Some options;

a) Deprecate `context`, either in v16 or shortly after. Seems reasonable
based on the intense warnings against using context that we have in the
docs -
https://facebook.github.io/react/docs/context.html#why-not-to-use-context
**Except** that probably some widely used libraries depend on it, like
`React-Router`.

b) Expect users will use external `PropTypes` library when defining
`contextTypes` and just don't do our `checkReactTypeSpec` against them
any more in v16.

c) Stop masking context and pass the whole context
unmasked everywhere. Worst option, do not recommend.

I went with `b` and assume that, for now, we will get users to use the
external `PropTypes` when defining context. I will update this PR if we
want a different approach.

* Remove 'addons' items from left nav, and deprecate 'addons' doc page

The plan:
[X] Remove links to 'addons' items from main navigation
[X] Add deprecation notices where appropriate, and update syntax to show
using the separate modules.
[ ] Update other references to 'React.addons' in docs. Coming in next
commit.
--- blocked but coming in future PRs
[ ] Link to a blog post describing the new locations of add-ons in the
deprecation notice on the '/docs/addons.html' page. Blocked until we
actually publish that blog post.
[ ] Move the docs for each add-on to the actual github repo where it now
lives.
[ ] Redirect the old add-ons doc permalinks to the docs in the separate
github repos for those modules.
[ ] Remove the old add-ons doc markdown files from React core docs.

* Remove references to `React.addons` from docs

Just misc. places where we referenced the 'addons' feature. All gone!
2017-04-07 14:12:10 -07:00
Andrew Clark ce74e00e5a Fix ReactWithAddons umd build 2017-04-06 16:03:49 -07:00
Andrew Clark 49868d8615 Fix references to React.createClass and React.PropTypes 2017-04-06 14:21:49 -07:00
Andrew Clark 72531d330d TransitionGroup should use prop-types package 2017-04-06 11:07:46 -07:00
Brian Vaughn 67e3e0e856 Added missing files:test-utils.js entry to react-dom package.json 2017-04-06 10:56:57 -07:00
Andrew Clark 1f487eb933 15.5.0-rc.1 2017-04-05 11:39:12 -07:00
Andrew Clark 043845ce75 Extract ReactPropTypes to separate module 2017-04-04 14:29:11 -07:00
Brian Vaughn 3a7eef2bcf Test utils deprecations and updates:
1. Moved react-addons-test-utils to react-dom/test-utils and added deprecation message.
2. Moved shallow renderer (previous accessible via TestUtils.createRenderer) to react-test-renderer/shallow and added deprecation message.
3. Updated READMEs for react-addons-test-utils and react-test-renderer
2017-04-04 13:47:05 -07:00
Jon BretmanandBrian Vaughn e33eab40a6 Bump fbjs to 0.8.9 (#8910) 2017-03-28 11:00:38 -07:00
Dan Abramov 03464f06d2 15.4.2 2017-01-06 19:52:54 +00:00
Kurt WeiberthandDan Abramov 3ec576ec1d add dependencies to react-test-renderer and react-addons (#8467)
**What** and **Why**:

* When using npm version 2, `object-assign` and `fbjs` were not getting properly installed
* This PR adds `object-assign` and `fbjs` as explicit dependencies to both `react-test-renderer` and `react-addons`
(cherry picked from commit 7cd26024ce)
2017-01-06 16:58:22 +00:00
Ben Alpert 2075139ce5 15.4.1 2016-11-22 17:47:12 -08:00
tomocchino 1c1f68e8dc 15.4.0 2016-11-16 14:16:57 +00:00
Sebastian Markbage 457730dded 15.4.0-rc.4 2016-10-14 14:56:30 -07:00
Dan Abramov c577b82875 15.4.0-rc.3 2016-10-14 19:56:21 +01:00
Paul O’Shannessy c8c879f1c5 15.4.0-rc.2 2016-10-05 15:45:23 -07:00
Paul O’Shannessy a107f6d12e Fix npm package builds (#7888)
* Ensure lib/ is packaged for react-test-renderer

* Run npm pack from right working directory

We were running this on the original packages not the compiled ones, resulting in missing files

(cherry picked from commit 077d660a27)
2016-10-05 15:41:25 -07:00
Paul O’Shannessy 4717d2480c 15.4.0-rc.1 2016-10-04 15:33:38 -07:00
Sebastian MarkbågeandPaul O’Shannessy 5c2a88a9a1 Build React DOM Fiber package (#7173)
This builds a `react-dom-fiber.js` bundle which exposes ReactDOMFiber.
This allows early experiments with the new Fiber reconciler.

I also expose it in the npm package through `react-dom/fiber`.
(cherry picked from commit f7e0db9a18)
2016-10-03 16:18:51 -07:00
Sebastian MarkbågeandPaul O’Shannessy 5bc9daa125 Build renderers into their individual npm packages (#7168)
This copies modules into three separate packages instead of
putting it all in React.

The overlap in shared and between renderers gets duplicated.

This allows the isomorphic package to stay minimal. It can also
be used as a direct dependency without much risk.

This also allow us to ship versions to each renderer independently
and we can ship renderers without updating the main react package
dependency.
(cherry picked from commit 0f004efce2)
2016-10-03 16:18:46 -07:00
Paul O’Shannessy bdf263625d 15.3.2 2016-09-19 10:35:00 -07:00
Paul O’Shannessy 1907f72934 15.3.2-rc.1 2016-09-15 16:40:56 -07:00
Paul O’Shannessy 681c68c62a 15.3.1 2016-08-19 11:42:05 -07:00
Paul O’Shannessy 12ab5baff4 Upgrade to fbjs v0.8.4 (#7532)
(cherry picked from commit 944be18357)
2016-08-19 10:46:22 -07:00
Paul O’Shannessy 9e88467485 15.3.1-rc.2 2016-08-15 15:53:40 -07:00
Paul O’Shannessy 5372e66c0c 15.3.1-rc.1 2016-08-12 16:34:14 -07:00
Paul O’Shannessy 7608eda1ff Fix JSON in package.json (#7408)
(cherry picked from commit d1cff59ddc)
2016-08-12 16:02:28 -07:00
Paul O’Shannessy 21d9b85d66 Specify "files" field for npm packages (#7396)
(cherry picked from commit c5cb5b8bd8)
2016-08-12 16:02:23 -07:00
Paul O’Shannessy 66cee497e7 15.3.0 2016-07-29 11:26:23 -07:00
Paul O’Shannessy e5efe5f568 Update version of react-test-renderer 2016-07-28 22:35:19 -07:00
Dustan KastenandPaul O’Shannessy 396ab3eba1 ReactTestRenderer package (#7362)
(cherry picked from commit 7e874f59f5)
2016-07-28 21:42:42 -07:00
Paul O’Shannessy f8a698e9af 15.3.0-rc.3 2016-07-21 14:36:01 -07:00
Paul O’Shannessy 42d7d0adad 15.3.0-rc.2 2016-07-13 14:03:52 -07:00
Paul O’Shannessy 86cc1d4e67 15.3.0-rc.1 2016-07-13 11:57:28 -07:00
Paul O’Shannessy 68faf9d1b9 15.2.1 2016-07-08 15:15:02 -07:00
Paul O’Shannessy c650249339 15.2.0 2016-07-01 11:31:05 -07:00