Commit Graph

7418 Commits

Author SHA1 Message Date
Dan Abramov a5e69ca8ea Add missing headers 2017-06-13 23:44:23 +01:00
Dan Abramov 4db80b960c Use lowPriorityWarning for TestUtils too 2017-06-13 23:42:32 +01:00
Dan Abramov a3ff734cbc Add missing devDependency 2017-06-13 23:22:39 +01:00
Dan Abramov 4ac06723e6 Addons: 15.6.0-rc.0 2017-06-13 23:15:16 +01:00
Dan Abramov 16d7773b3c Minor fixes to 15.6.0 changelog (#9951)
* Minor fixes to 15.6.0 changelog

* Remove remaining double space

* Backticks
2017-06-13 14:56:09 -07:00
Dan Abramov 129307f8a4 Add build process to all addons (#9946)
* Build createFragment addon

* Tack the addon onto React.addons object

* Generalize build process for all addons

* Fix lint

* Fix lint again
2017-06-13 18:08:17 +01:00
Dan Abramov 9ac30f5477 Delete accidental .babelrc 2017-06-13 15:03:27 +01:00
Dan Abramov f127ba6b21 Add build process for createReactClass (#9943)
* Switch trailing comma to ES5 mode in addons

* Add build process for createReactClass

* Test UMD bundles on CI

* Fix lint
2017-06-13 15:00:10 +01:00
Dan Abramov dea8f6a653 Use react-transition-group from npm (#9937) 2017-06-12 23:43:39 +01:00
Dan Abramov 3e7c17217e Delete .babelrc from addons (#9938) 2017-06-12 23:42:44 +01:00
Dan Abramov beb370c102 Lint and test addons on CI (#9936)
* Lint addons

* Run prettier on addons

* Fix all lint issues

* Remove unused variable

* Test addons on CI
2017-06-12 21:26:56 +01:00
Michael Ridgway 61e8ee71b6 [#9627] Fix create-react-class isMounted ordering issue (#9638)
* [#9627] Fix create-react-class isMounted ordering issue

Split the IsMountedMixin in two so that the __isMounted flag is set to false after componentWillUnmount is executed in mixins and the component.

* Revert changes to integration test
2017-06-12 20:21:27 +01:00
Dan Abramov 088d593b0b Use Object.assign polyfill for update addon (#9932) 2017-06-12 19:46:08 +01:00
Dan Abramov 41e135e270 Remove broken GCC annotation from create-react-class (#9933) 2017-06-12 19:45:56 +01:00
Dan Abramov 871bd7e0c0 Delete prebuilt addon UMDs (#9931) 2017-06-12 19:33:35 +01:00
Flarnie Marchan ce3ecfb1df [#9712] fix <input type="number" /> value '.98' should not be equal to '0.98'. (#9714) (#9929)
* [#9712] fix <input type="number" /> value ".98" should not be equal to "0.98".

* fix eslint error

* fix label error
2017-06-12 10:10:24 -07:00
Flarnie Marchan 3c898931ed Fix missing react dependency in some addon umd builds (#9919)
* Test 'create-react-class' with fixtures

NOTE: Never going to merge this commit, but I may cherry-pick it onto
branches in order to test fixes for issue #9765

**what is the change?:**
Require and use the UMD bundles of 'create-react-class' in three
fixtures to test the three supported uses;
 - test Global JS with globals.html
 - test AMD with requirejs.html
 - test CommonJS with webpack-alias

**why make this change?:**
To test https://github.com/facebook/react/pull/9761 and other PRs fixing https://github.com/facebook/react/issues/9765

**test plan:**
Manual testing;
 - cd into the directory in fixtures
 - run the build step if needed
 - open the file

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

* Rename fixtures testing create-react-class

**what is the change?:**
Renamed some fixtures.

**why make this change?:**
This is part of setting up manual tests of the add-ons we are fixing.

**test plan:**
`cd fixtures && node ./build-all.js` and manually open the renamed
fixtures.

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

* Prettify the unminified UMD build of `react-linked-input`

**what is the change?:**
`prettier addons/react-linked-input/react-linked-input.js | pbcopy` and
replaced the contents of the file.

**why make this change?:**
I am manually tweaking this file and want it to be more readable.

**test plan:**
about to set up manual testing of this with fixtures. I expect that
right now only the use of it as a global will work, and subsequent
commits will fix the AMD and CommonJS use cases.

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

* Test state of `react-linked-input` and `create-fragment` before fix

**what is the change?:**
Setting up the fixtures to enable manual testing of the
`react-linked-input` and `create-fragment` UMD builds.

This was a painstaking and frustrating process and we need something
better before making any more fixes to addons. Here is roughly what I
did;
- add 'console.log' statements to the add-on to confirm that you've loaded the right build case
- copy the add-on into 'build/packages' so that the 'webpack-alias' can find it.
- make copies of each of the following three fixtures for each add-on you want to test, renaming them to specify what you are testing:
	- globals.js
	- requirejs.js
	- webpack-alias/*
- modify those fixtures to use the add-on you intend to text

**why make this change?:**
We need to verify the current state of the bug before fixing it, to
confirm that the change actually is fixing the bug.

**test plan:**
`open fixtures/globals-with-create-react-fragment.html`
`open fixtures/globals-with-react-linked-input.html`
`open fixtures/requirejswith-create-react-fragment.html`
`open fixtures/requirejswith-react-linked-input.html`
`cd fixtures/webpack-aliaswith-create-react-fragment/ && yarn build && open index.html`
`cd fixtures/webpack-aliaswith-react-linked-input/ && yarn build && open index.html`

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

* Fix missing `React` in `react-linked-input` and `create-fragment`

**what is the change?:**
Manually tweaking the UMD builds for both add-ons to include a
dependency on React.

**why make this change?:**
They were broken before for AMD and CommonJS.
For reasons I have not debugged, the CommonJS builds are still broken,
but the AMD is now fixed and globals still work:

```
    do 'react-linked-input' and
    'create-react-fragment' work?

                before      after
              + my        + my        +
  en^ironment | fix       | fix       |
+----------------------------------------
              |           |           |
  Global JS   |  :) yes   |  :) yes   |
+----------------------------------------
              |           |           |
  AMD         |  X no     |  :) yes   |
+----------------------------------------
              |           |           |
  CommonJS    |  X no     |  X no     |
+-------------+-----------+-----------+--

```

**test plan:**
In the previous commit we set up fixtures to manually test these.

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

* More adjustments to enable testing with fixtures

Not worth explaining - just committing as a 'save point' while I fiddle
with the fixtures.

* Remove all cruft from manually testing addons in fixtures

**what is the change?:**
We forked three of the fixtures into two variations to test two of the
react addons. We also added `console.log` statements to the addons to
verify that we were loading the right build.

This commit cleans it up by
- deleting forked fixtures
- re-adding the original fixtures
- removing `console.log` statements

**why make this change?:**
To get this branch ready for review.

**test plan:**
`cd fixtures && node ./build-all.js` and then check the updated fixtures
manually

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

* Double to single quotes in 'react-linked-input'

**what is the change?:**
`:%s /"/'/gc`

I left double quotes wrapping cases where we have single quotes in the
string.

**why make this change?:**
I ran the code for the unminified 'react-linked-input' through
'prettier' so it would be easier for me to manually fix the UMD wrapper.
And 'prettier' changed many single quotes into double quotes. @spicyj
pointed out this will be treated differently by the google closure
compiler, and may have semantic differences.

**test plan:**
It's not worth testing imo.

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

* remove random newline
2017-06-12 08:43:08 -07:00
Mond WAN ae89a74091 Fix missing react in create-react-class (#9761)
* Fix missing react in create-react-class

refs #9689

* Modify the 'create-react-class' package to make 'globals' work again

**what is the change?:**
Pass the global 'react' into the global conditional in the UMD build of
'create-react-class'.

**why make this change?:**
Here is the deal:
 - @mondwan's original fix does fix the AMD build, but breaks the
   'global JS' build.
 - My modification makes it work with both AMD and the 'global JS'
   build.
 - @mondwan's fix seems to have fixed the CommonJS build too, and I
   maintained that fix with my modification.

```
                Does the 'create-react-class' UMD build work?

                 Before       After         After
               + @mondwan's + @mondwan's +  @flarnie's
  Build System | fix        | fix        |  modification
+---------------------------------------------------------+
               |            |            |
  Global JS    | :D Success | X Fail     | :D Success
               |            |            |
+---------------------------------------------------------+
               |            |            |
  AMD          | X Fail     | :D Success | :D Success
               |            |            |
+---------------------------------------------------------+
               |            |            |
  Common JS    | X Fail     | :D Success | :D Success
               |            |            |
               +            +            +

```

**test plan:**
The testing for this was really tricky and involves a fragile multi-step
process:

1) Make sure the fixtures are working on your branch

2) Modify some of the fixtures to use 'create-react-class', like in this
   commit (you can just cherry-pick it if you are on a branch based on
   the 15.* branches) -
   https://github.com/flarnie/react/commit/51dcbd5ef164b86bc509ae070a6273758a60e13c

3) Make sure React is set up, and then
   `cd fixures && node ./build-all.js`

4) The following fixtures could be used to test the various builds:
 - test GlobalJS with `globals.html`
 - test AMD with `requirejs.html`
 - test CommonJS with `webpack-alias/index.html`

**issue:**
https://github.com/facebook/react/issues/9689
and
https://github.com/facebook/react/issues/9765
2017-06-10 11:06:48 -07:00
Flarnie Marchan 63795005d3 Remove fiber-specific fixtures from 15.6 branch (#9902)
* Remove fixtures that only work with Fiber

**what is the change?:**
Removes three directories in the 'fixtures' directory.

**why make this change?:**
These fixtures were designed to work with Fiber, and were accidentally
pulled into this branch. They were causing errors when we try to build
the other fixtures.

**test plan:**
`cd react/fixtures && node ./build-all.js` no longer throws an error
from `fiber-debugger/App.js` - although it still throws another error

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

* Add back the 'babel-standalone' fixture

**what is the change?:**
Add this fixture back to the 15.6 branch

**why make this change?:**
This fixture is not fiber specific

**test plan:**
`node ./build-all.js` inside of ./fixtures

**issue:**
https://github.com/facebook/react/issues/9900
2017-06-08 17:23:28 -07:00
Flarnie Marchan 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 Marchan 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 Marchan 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
Nathan Hunzaker f93324496f Inputs should not mutate value on type conversion (#9806)
This is a follow-up on
https://github.com/facebook/react/pull/9584#discussion_r115642293. There
is no need to assign the value property of an input if the value
property of the React component changes types, but stringifies to the
same value. For example:

```javascript
DOM.render(<input value="true" />, el)
DOM.render(<input value={true} />, el)
```

In this case, the assignment to `input.value` will always be
cast to the string "true". There is no need to perform this
assignment. Particularly when we already cast the value to a string
later:

```javascript
// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
node.value = '' + value;
```
2017-05-30 13:30:28 -07:00
Flarnie Marchan 98fde611ef Improve warning for React.createClass (#9781)
* Improve warning for `React.createClass`

**what is the change?:**
- Explain that this will be removed in v16.0 specifically
- Mention the version number for the drop-in replacement module.
- Link to docs in the blog post about how to migrate

**why make this change?:**
We want to make our deprecation warnings more clear and helpful.

**test plan:**
Visual inspection and `yarn test`

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

* Widen range of recommended replacement module versions

**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.

* Fix typos and things

**what is the change?:**
- `migrade` -> `migrate`
- `15.* prop-types package` -> `v15.* prop-types package`

**why make this change?:**
Correctness

**test plan:**
`yarn test` and visual inspection
2017-05-30 13:25:41 -07:00
Dan Abramov b34a312e6c Remove PropTypes dependency from ReactLink (#9766)
It doesn't seem to be used. It was probably used by internal FB consumers of ReactLink which has long been removed.
2017-05-26 23:21:50 +01:00
Flarnie Marchan 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
Flarnie Marchan b48b2594fa Cherrypick warning and removal of react create class (#9771)
* react-create-class -> create-react-class

* Fix issues/bugs introduced by merge conflict resolution

**what is the change?:**
A couple of bugs and holes were introduced when cherry-picking https://github.com/facebook/react/pull/9232 onto the 15.6 branch. This fixes them.
We also needed to add some logic from https://github.com/facebook/react/pull/9399

**why make this change?:**
To keep tests passing and get this change working.

**test plan:**
`yarn test`

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

* Move component base classes into a single file (#8918)

* More fixes for issues introduced by rebasing

**what is the change?:**
- Remove some outdated 'require' statements that got orphaned in 'React.js'
- Change 'warning' to 'lowPriorityWarning' for 'React.createClass'
- Fix syntax issues in 'React-test'
- Use 'creatReactClass' instead of ES6 class in ReactART
- Update 'prop-type' dependency to use no higher than 15.7 because 15.8 limits the number of warnings, and this causes a test to fail.
- Fix some mixed-up and misnamed variables in `React.js`
- Rebase onto commit that updates deprecation messages
- Update a test based on new deprecation messages

**why make this change?:**
These were bugs introduced by rebasing and tests caught the regressions.

**test plan:**
`yarn test`

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

* Reset `yarn.lock`

**what is the change?:**
I didn't mean to commit changes to `yarn.lock` except for the `prop-types` and `create-react-class` updates.

**why make this change?:**
To minimize the changes we make to dependency versions.

**test plan:**
`rm -rf node_modules`
`yarn install`
`yarn run build`
`yarn test`

* Run `yarn prettier`
2017-05-25 15:12:17 -07:00
Flarnie Marchan 3f62cd557f Improve deprecation warnings by more info and links (#9768)
* Improve deprecation warnings by more info and links

**what is the change?:**
Updates the warnings for -
 - `React.createMixin` (was never implemented!)
 - `React.PropTypes`
 - `React.createClass`
 - `React.DOM.*`

We never added the warning for `React.createClass` to the 15.5 line, so
a follow-up PR will add that, with a link to docs etc.

Does *not* update the older warnings for -
 - Factory.type
 - 'isMounted' and 'replaceState'
 - ReactPerf

We could do a second pass if we want to improve those three warnings, but for now I don't think they are as hi-pri.

Still TODO:
 - Do an initial release of the [`react-addons-dom-factories`](https://github.com/facebook/react/tree/master/packages/react-dom-factories#react-addons-dom-factories) package on npm, making it 1.0.
 - Improve the docs for `react-addons-dom-factories` adding documentation and mention the [codemod](https://github.com/reactjs/react-codemod/blob/master/transforms/React-DOM-to-react-dom-factories.js)

**why make this change?:**
 - We want to make updating as easy as possible. Warning messages should increase clarity, and in the past they have caused confusion.

**test plan:**
`yarn test` and running these messages past some folks who use React.

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

* Rephrase deprecation messages for clarity

**what is the change?:**
We rephrased the deprecation messages to clarify that
 - these APIs are currently deprecated
 - they will be removed in React v16.0

The previous wording implied that they would be deprecated in v16.0.

**why make this change?:**
To make the messages easier to understand.

**test plan:**
Visual inspection
2017-05-25 07:22:54 -07:00
Flarnie Marchan 16a62c248b Improve low priority warning (#9754)
* Add back caught error and other checks to 'lowPriorityWarning'

**what is the change?:**
This change makes 'lowPriorityWarning' an exact copy of 'warning.js' from
https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
where before we had skipped some checks from that module.

- Adds an error which we catch, in order to let people find the error and resulting stack trace when using devtools with 'pause on caught errors' checked.
- Adds check that 'format' argument is passed

**why make this change?:**
- To maintain a closer fork to 'warning.js'
- To allow easier debugging using 'pause on caught errors'
- To validate inputs to 'lowPriorityWarning'

**test plan:**
`yarn test`
2017-05-24 08:25:30 -07:00
Flarnie Marchan d97317e806 Remove stray reference to React.PropTypes in ReactLink (#9757)
**what is the change?:**
It looks like we missed updating this callsite in https://github.com/facebook/react/commit/12a96b94823d6b6de6b1ac13bd576864abd50175

**why make this change?:**
We are deprecating the `React.PropTypes` syntax and splitting that functionality into [a separate module](https://github.com/facebook/react/commit/12a96b94823d6b6de6b1ac13bd576864abd50175).
@acdlite please correct me if there is a reason we left this here.

**test plan:**
`yarn test`

**issue:**
https://github.com/facebook/react/issues/9755
2017-05-23 18:39:17 -07:00
Flarnie Marchan 413c7b548a Cherrypick commit to downgrade deprecations to warnings (#9753)
* Downgrade deprecation warnings from errors to warnings (#9650)

* Downgrade deprecation warnings from errors to warnings

**what is the change?:**
Swapping out `warning` module for a fork that uses `console.warn`.
It looks like we were using the `warning` module for deprecation notices, *but* there is also a 'deprecated' module designed specifically for deprecation notices.

However, we could not find any place that it was currently used.

Since React's build process is not 100% clear to me, I assume it could still be used somewhere by something and just updated it along with other deprecation notices.

We might consider a follow-up diff that does some clean up here;
 - remove 'deprecated' module if it's unused, OR
 - use 'deprecated' module for all our current deprecation warnings

**why make this change?:**
- We have had complaints about noisy warnings, in particular after introducing new deprecations
- They potentially cause CI failures
- Deprecations are not really time-sensitive, can ship without breaking your app, etc.

For more context - https://github.com/facebook/react/issues/9395

**test plan:**
`npm run test`
and unit tests for the new modules
and manual testing (WIP)

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

* Add 'lowPriorityWarning' to ReactExternals

**what is the change?:**
We won't bundle 'lowPriorityWarning' with the rest of React when building for Facebook.
NOTE: A parallel commit will introduce an internal implementation of 'lowPriorityWarning' in Facebook's codebase, to compensate. Will post a comment with the diff number once that is up.

**why make this change?:**
So that the sync between github and Facebook can go more smoothly!

**test plan:**
We will see when I run the sync! But this is a reasonable first step imo.

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

* Tweaks to get tests passing after cherry-picking PR#9650

**what is the change?:**
- adds 'lowPriorityWarning' for deprecation of '__spread' and 'createMixin'
- tweaks test to check for 'warn' and not 'error'

**why make this change?:**
Both these issues were introduced by merge conflict resolution when cherry-picking this change from master onto 15.6.

**test plan:**
`yarn test`

**issue:**

* Fix mis-written 'require' for 'warning' module

**what is the change?:**
Fixes 'warning' to be required from 'warning'

**why make this change?:**
It was causing the browserify build to crash, because we don't expect to have a path to 'warning'.

**test plan:**
CI
2017-05-23 15:11:51 -07:00
Flarnie Marchan 1d7971a85a Run prettier 2017-05-20 11:19:21 -07:00
Jason Quense 68347c9985 Backport input fix (#8575)
* Only fire input value change events when the value changes (#5746)

* Allow simulated native events to propagate

fixes #7211 fixes #6822 fixes #6614

we should make sure it doesn't break #3926 any worse (or works with #8438)
2017-05-20 11:15:12 -07:00
Dan Abramov 5c415d1e64 Provide non-standard stack with invalid type warnings (#9679)
* Provide non-standard stack with invalid type warnings

* Include parent stack but mark owner chain as pertinent

* Just parent stack is enough for my needs

Because to avoid noise it is enough to collapse too close frames in the UI.

* functionName => name

* Hide behind a feature flag
2017-05-15 20:39:39 +01:00
Michael Ridgway 2bbe02456b Add browserify transform (#9642)
* Add loose-envify browserify transform

* Add transform to react-addons-create-fragment
2017-05-10 00:49:58 +01:00
Flarnie Marchan 4f7136e1d7 Minor tweak to adjust ReactDOM-test for #8356
**what is the change?:**
Changed a test to look for the warning we added in https://github.com/facebook/react/pull/8356/files

**why make this change?:**
To update our tests for new behavior.

**test plan:**
`npm run test`

**issue:**
https://github.com/facebook/react/issues/9398
2017-05-09 14:27:48 +01:00
Nathan Hunzaker 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
Flarnie Marchan 850231c6da Remove tests which use dependency that is missing in 15.6
**what is the change?:**
Removed some tests which were added in https://github.com/facebook/react/commit/e29871e6bed28676815aaf9259d33a99520a10d8

**why make this change?:**
These tests use `inputValueTracking`, which was only added on the master branch and has not yet been added to the 15.* branch.
[There is a PR out](https://github.com/facebook/react/pull/8575) to add this and related bug fixes to the 15.* branch, but there are some unresolved issues there. We plan to follow up on this after releasing 15.6.
For now, we are removing these to unblock releasing 15.6.

**test plan:**
`npm run test`

**issue:**
https://github.com/facebook/react/issues/9410
2017-05-09 13:51:21 +01:00
Nathan Hunzaker e29871e6be Remove loose check on non-number controlled inputs. Fix trailing dot issue. (#9584)
* Remove loose check when assigning non-number inputs

This commit removes a check I added when working on number input
issues where we perform a loose check on an input's value before we
assign it. This prevented controlled text inputs from disallowing
numeric text entry.

I also added a DOM fixture text case.

Related issues:

https://github.com/facebook/react/issues/9561#issuecomment-298394312

* Use strict equality as a guard before assigning input.value

This commit adds back the guard around assigning the value property to
an input, however it does it using a strict equals. This prevents
validated inputs, like emails and urls from losing the cursor
position.

It also adds associated test fixtures.

* Add copy command after build for interup with surge.sh
2017-05-03 11:45:52 -07:00
Brandon Dail 115452f87e Use setProperty when setting style properties (#9302)
* Use setProperty when setting style properties

setProperty is faster in all/most modern browsers. It also lets us support CSS variables.

* Only use setProperty when setting CSS variables

* Add test to ensure setting CSS variables do not warn

* Make this PR pretty again

* Run fiber test script
2017-05-03 11:04:25 -07:00
Flarnie Marchan 009c9f7201 Update tests to not warn due to moved PropTypes and shallowRenderer (#9486)
* Update tests to not warn due to moved PropTypes and shallowRenderer

We added some warnings in v15.5 for calling `React.PropTypes` and
calling the shallow renderer from the wrong place. These warnings were
causing test failures, and now they are fixed.

Most of these were for the `React.PropTypes` change.

* tweak from running prettier

* Final tweaks to get tests passing

**what is the change?:**
Updated 'PropTypes' and 'shallow renderer' syntax in a couple more
places to get tests passing.

**why make this change?:**
In order to verify any changes to the 15.6 and 15.* branches in general
we should have tests passing.

**test plan:**
`npm run test`

**issue:**
https://github.com/facebook/react/issues/9410
2017-04-24 18:48:20 -07:00
Flarnie Marchan ad1d3526f5 Run 'prettier' on the v15.6 branch (#9487)
* Run 'prettier' on the v15.6 branch

This is an easy fix and I'd like this branch to be as similar to master
(v16.0) as possible.

* `npm install --save-dev prettier && yarn prettier`

Checking in the updated `package.json` and `yarn.lock` for the 15.6
branch.

Oddly, running `yarn prettier` updated more files. I thought the
previous commit had covered all `prettier` syntax updates. Will commit
the new changes in a separate commit.

* Ran prettier

More syntax updates to get `prettier` checks passing on the `15.6-dev`
branch, and eventually, on 15-stable.

* Tweak eslint ignore comments to get linter passing

Something with running `prettier` moves or changes these comments in a
way that they were no longer being applied. We tweaked them so that both
'prettier' and 'eslint' pass.
2017-04-22 11:36:25 -07:00
Flarnie Marchan 1926f9ab06 Quick fix for flowconfig
We had a merge conflict sneak in somewhere, and also want to ignore the
'addons' directory.
2017-04-21 13:03:01 -07:00
Chris Pearce a6b51ed8fb Only attempt to clear measures if we created the measure (#9451)
This fixes an issue where if we decided not to create a measurement we would clear ALL measurements from the performance entry buffer due to passing `undefined` as the entry name.
2017-04-20 11:26:25 -07:00
Eric Sakmar 25177ec4ea Adds CSS Grid properties to list of unitless numbers (#9185) 2017-04-20 11:21:14 -07:00
Flarnie Marchan 6428cf7359 Quick fix for eslint on 15.6-dev branch
The `.eslintignore` had gotten a merge conflict committed accidentally
at some point, and also was not ignoring the `addons` directory. This
fixes that.

We also had a couple of missing commas that snuck in, and those are
fixed here too.
2017-04-13 11:42:48 -07:00
Brandon Dail ddd8260e4b Update deprecation wording to be less aggressive 2017-04-13 11:42:48 -07:00
Brandon Dail 16c4f9006a Add test for deprecation warnings 2017-04-13 11:42:48 -07:00
Brandon Dail 8a011282a0 Deprecate React.createMixin
This API was never fully implemented. Since mixins are no longer considered part of the future React API, it will be removed.
2017-04-13 11:07:09 -07:00