Commit Graph
81 Commits
Author SHA1 Message Date
Flarnie Marchan cd262c7e04 remove file mistakenly added in merge conflict resolution 2017-06-14 08:03:11 -07:00
Flarnie Marchan d5c2bdb92f Merge branch '15.6-dev' into 15-dev
In order to add https://github.com/facebook/react/pull/6648/files
fixes https://github.com/facebook/react/issues/9956
2017-06-14 07:55:30 -07:00
Dan Abramov d9d8cf658a 15.6.0 of addons 2017-06-14 13:51:05 +01:00
Dan Abramov 820310fcf4 Update transitiongroup readmes to be less scary 2017-06-14 13:14:24 +01:00
Dan Abramov 4d44dfb2a8 No need to call it deprecated 2017-06-14 12:49:08 +01:00
Dan Abramov 00917c80e8 Remove trailing commas in addons 2017-06-14 12:38:03 +01:00
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 AbramovandGitHub 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
Flarnie Marchan d095bc8391 bump minor version of create-react-class 2017-06-13 07:23:40 -07:00
Dan Abramov 9ac30f5477 Delete accidental .babelrc 2017-06-13 15:03:27 +01:00
Dan AbramovandGitHub 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
Flarnie MarchanandGitHub 207f3ef457 Update minified version of 'create-react-class' (#9939)
**what is the change?:**
We ran the latest version of
`addons/create-react-class/create-react-class.js` through https://jscompress.com/

**why make this change?:**
The last corner case I'm thinking of is this:
 - The `createClass` deprecation warning never went out in 15.5, and is going out now for real in 15.6.
 - The `createClass` UMD build is broken for AMD/CommonJS, but we fixed it. But not for the minified version of the file.
 - If someone see the warning, and tries to use the UMD build, then it's going to be broken in some cases.
 - Since we're skipping mentioning the add-ons in the blog post, and this might be a new warning for them, this could be a nasty surprise for folks.

We can do a quick 15.5.4 release of that package, we would at least fix that case.

This diverges from what @gaearon is doing to fix the add-ons. I would
probably try to use cherry-pick and interactive rebase to move this
commit to right after
https://github.com/facebook/react/commit/ce3ecfb1dfaacb311fb4b37eede56c2667014cfc
and then do the patch release of `create-react-class` from that spot in
history.

Alternately I can merge this into the forked branch
`15.6-before-addon-reconstruction` and then do the patch release from
there.

**test plan:**
I didn't test this. Ideally minifying this file won't break anything,
and it's high cost to test add-ons until we have some repeatable tests
in place.

**issue:**
https://github.com/facebook/react/issues/9765
2017-06-12 16:41:59 -07:00
Dan AbramovandFlarnie Marchan dd988162a1 react-addons-create-fragment@15.5.4 2017-06-12 16:33:40 -07:00
Dan AbramovandFlarnie Marchan a8e2a33f1e create-react-class@15.5.3 2017-06-12 16:33:40 -07:00
Dan AbramovandGitHub dea8f6a653 Use react-transition-group from npm (#9937) 2017-06-12 23:43:39 +01:00
Dan AbramovandGitHub 3e7c17217e Delete .babelrc from addons (#9938) 2017-06-12 23:42:44 +01:00
Dan AbramovandGitHub 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 RidgwayandDan Abramov 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 AbramovandGitHub 088d593b0b Use Object.assign polyfill for update addon (#9932) 2017-06-12 19:46:08 +01:00
Dan AbramovandGitHub 41e135e270 Remove broken GCC annotation from create-react-class (#9933) 2017-06-12 19:45:56 +01:00
Dan AbramovandGitHub 871bd7e0c0 Delete prebuilt addon UMDs (#9931) 2017-06-12 19:33:35 +01:00
Flarnie MarchanandGitHub 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 WANandFlarnie Marchan 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
Michael RidgwayandDan Abramov 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
Dan Abramov e0da5edd58 Merge branch '15.5-dev' into 15-stable 2017-04-11 20:12:14 +01:00
Dan Abramov 88b5c1401b Delete prop-types folder as it has moved 2017-04-11 20:12:05 +01:00
Andrew Clark 88bb4a2b50 create-react-class version 15.5.2 2017-04-10 09:51:38 -07:00
Andrew Clark 0b716b8896 Merge branch '15-stable' of https://github.com/facebook/react into 15-stable 2017-04-10 09:47:18 -07:00
Brian Vaughn 26b0530302 Bumped react-linked-input version from 15.5.0 to 15.5.1 2017-04-08 21:56:18 -07:00
Dan Abramov 63d98abeb3 Bump addons I have permissions for 2017-04-09 04:26:41 +01:00
Dan AbramovandGitHub 80b862395d Fixes for 15.5 addons (#9385)
* Add missing object-assign dep to create-react-class

* Remove unnecessary inlines and irrelevant tests in createFragment

* Uninline shallowEqual in shallowCompare

* Uninline invariant in update

* Uninline invariant/warning and remove unreachable code in react-linked-input

* Envify and collapse createClass UMD

* Envify and collapse createFragment

* ReactLink doesn't really need PropTypes dep

It is unnecessary because it is not explicitly exposed and was never public API.

* Rebuild, envify and collapse LinkedStateMixin UMD

* Collapse PureRenderMixin UMD

* Rebuild shallowCompare

* Envify and collapse update UMD

* Remove unused prop-types dep from linked-input

* Fix change handling in LinkedInput

* Compile LinkedInput to ES5

* Rebuild, collapse, and fix LinkedInput UMD

* Add full README for react-addons-create-fragment

* Mention compat version of transition-group so we can delete those docs

* README for react-addons-linked-state-mixin

* More docs

* Fix devDeps for createClass

* docs
2017-04-09 04:01:35 +01:00
Dan Abramov 9609cb7402 Merge branch '15.5-dev' into 15-stable 2017-04-08 23:15:35 +01:00
Derrick YeungandDan Abramov c2ca2f57f6 Fix the react-addons-create-fragment package to properly export the createReactFragment() function (#9383) 2017-04-08 23:03:18 +01:00
Andrew Clark 6456fa71d9 Add README to create-react-class 2017-04-07 21:08:21 -07:00
Andrew Clark 85d1816d03 Bump prop-types version 2017-04-07 15:29:38 -07:00
Andrew Clark e1919638b3 const -> var 2017-04-07 15:28:21 -07:00
Brian Vaughn c5c5524d20 Updated addons package versions 2017-04-07 14:50:01 -07:00
Brian Vaughn d1bae78189 Updated packages for 15.5.0-rc.2 2017-04-06 16:09:55 -07:00
Andrew Clark ce74e00e5a Fix ReactWithAddons umd build 2017-04-06 16:03:49 -07:00
Andrew Clark 22bde0e5ba Update yarn.lock in addons 2017-04-06 14:31:51 -07:00
Andrew Clark 49868d8615 Fix references to React.createClass and React.PropTypes 2017-04-06 14:21:49 -07:00
Brian Vaughn 486bbf0fe8 Added prop-types dep for react-linked-input and re-built 2017-04-06 13:47:34 -07:00
Andrew Clark 12a96b9482 Fix references to React.createClass and React.PropTypes 2017-04-06 13:17:34 -07:00
Brian Vaughn d11c5467bd Replaced another console.error() call with fbjs warning() 2017-04-06 11:39:31 -07:00
Brian Vaughn f686b8195b Updated react-addons-test-utils package.json for RC 2017-04-04 14:38:30 -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