Commit Graph

289 Commits

Author SHA1 Message Date
Ben Alpert
64cba04bf9 Build infra for tracking dev-specific failures (#8228)
I'll plan to change all of our console.error and component-tree expects to expectDev. It's a little annoying that we need to make sure tests don't throw (see my change to normalizeCodeLocInfo) but any alternative would seem to require two separate test runs or a much more cumbersome syntax.
2016-11-13 14:00:07 -08:00
Ben Alpert
67dcc5861c Flow 0.34 (#8259) 2016-11-10 11:52:32 -08:00
Ben Alpert
75ff12e984 Run fiber tests just once on Travis (#8221)
Consolidate facts tracking with the other script.
2016-11-07 11:43:29 -08:00
Ben Alpert
08b4cc53b8 Track passing/failing tests in fiber (#8169)
* Work around jest toEqual bug in ReactTreeTraversal

![image](https://cloud.githubusercontent.com/assets/6820/19879640/1cd7595a-9fb2-11e6-94ac-8c38bdfc90d3.png)

* Track passing/failing tests in fiber

Run scripts/fiber/record-tests to re-record, then check git diff to see what you changed.
2016-10-31 23:26:38 -07:00
Maksim Shastsel
9dc7a9594a Add support for node v7 (#8135) 2016-10-29 11:24:12 +01:00
Sergey Rubanov
9626c838cb Add npm v4.0.0 support (#8082) 2016-10-24 23:57:12 +01:00
Dan Abramov
9bfa45bd2d Update Flow and fix issues (#8006) 2016-10-18 15:26:40 +01:00
Dmitrii Abramov
e3e03b30b2 jest@15.1.1 (#7693) 2016-09-10 15:09:14 -07:00
Christopher Chedeau
839697f60c Restore coverage in Travis (#7628)
We disabled coverage in Travis because the implementation was crashing ( https://github.com/facebook/react/issues/6290 ). Since we upgraded to Jest 15, the entire coverage implementation is brand new so we should give it another try.
2016-09-02 14:23:58 -07:00
Christopher Chedeau
1a113a15c9 Update to jest 15
Jest 15 has just been released and is way more awesome: http://facebook.github.io/jest/blog/2016/09/01/jest-15.html

This pull request updates jest from version 12 to 15. Right now there's a fix in jest around Symbol that hasn't been released yet, so this will break CI and cannot be merged it. But once it ships by the end of the day, we'll be good to go :)

See comments inline for all the changes I've done.
2016-08-31 18:25:03 -07:00
Christopher Chedeau
08614db025 Update flow to 0.31 (#7557) 2016-08-25 09:43:28 -07:00
Paul O’Shannessy
944be18357 Upgrade to fbjs v0.8.4 (#7532) 2016-08-19 10:40:03 -07:00
Sebastian Markbåge
c8f7215b20 Use aliasify everywhere instead of browserify-global-shim (#7476)
I already had to aliasify to have better control over the requires
so we might as well do it everywhere for consistency.

This probably makes it easier to rebase the rollup work too
because aliases seems to be how you solve this in that world.
2016-08-11 20:17:37 -07:00
Sebastian Markbåge
0f004efce2 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.
2016-08-10 18:17:49 -07:00
Sebastian Markbåge
8ef00dbb7d Bundle DOM renderers into their individual UMD bundles (#7164)
* Cut out isomorphic dependencies from the renderers

These files reaches into isomorphic files.

The ReactElement functions are exposed on the React object anyway
so I can just use those instead.

I also found some files that are not shared that should be in
renderers shared.

* Found a few more shared dependencies

renderSubtreeIntoContainer is only used by the DOM renderer.
It's not an addon.

ReactClass isn't needed as a dependency since injection doesn't
happen anymore.

* Use a shim file to load addons' dependencies on DOM

By replacing this intermediate file we can do the lazy loading
without needing any lazy requires. This set up works with ES
modules.

We could also replace the globalShim thing with aliased files
instead for consistency.

* Bundle DOM renderers into their individual UMD bundles

Instead of exposing the entire DOM renderer on the react.js
package, I only expose CurrentOwner and ComponentTreeDevtool which
are currently the only two modules that share __state__ with the
renderers.

Then I package each renderer in its own package. That could allow
us to drop more server dependencies from the client package. It
will also allow us to ship fiber as a separate renderer.

Unminified DEV            after     before
react.js                  123kb     696kb
react-with-addons.js      227kb     774kb
react-dom.js              668kb     1kb
react-dom-server.js       638kb     1kb

Minified PROD             after     before
react.min.js               24kb     154kb
react-with-addons.min.js   37kb     166kb
react-dom.min.js          149kb     1kb
react-dom-server.min.js   144kb     1kb

The total size for react.min.js + react-dom.min.js is +19kb larger
because of the overlap between them right now. I'd like to see
what an optimizing compiler can do to this. Some of that is fbjs
stuff. There shouldn't need to be that much overlap so that's
something we can hunt. We should keep isomorphic absolutely
minimal so there's no reason for other React clones not to use it.
There will be less overlap with Fiber.

However, another strategy that we could do is package the
isomorphic package into each renderer bundle and conditionally
initialize it if it hasn't already been initialized. That way
you only pay an overlap tax when there are two renderers on the
page but not without it. It's also easier to just pull in one
package. The downside is the versioning stuff that the separate
npm package would solve. That applies to CDNs as well.

ReactWithAddons is a bit weird because it is packaged into the
isomorphic package but has a bunch of DOM dependencies. So we have
to load them lazily since the DOM package gets initialized after.
2016-08-09 12:39:03 -07:00
Keyan Zhang
bf26e70374 upgraded babel-plugin-transform-class-properties
- babel/babel#3589 fixed inferring class name
2016-07-23 15:16:12 -07:00
Keyan Zhang
fc04e853f8 Add babel-plugin-transform-class-properties (#7322)
* added babel-plugin-transform-class-properties

* removed babel-plugin- prefix
2016-07-20 17:39:10 -07:00
Marshall Bowers
69703e04d5 Gulp: lint, flow, and version-check (#7174)
* Add plugin loading for gulp

* Convert `lint` task to gulp

* Convert `flow` task to gulp

* Convert `version-check` task to gulp

* Add missing semicolons
2016-07-05 13:30:09 -07:00
Sebastian Markbage
2f0ff6e974 Apply side-effects to host containers
This updates the host container root with new children.
Currently, this is always called for updates because we don't
track if any children reordered.
2016-06-30 14:29:17 -07:00
Christopher Chedeau
1c71970431 [flow] annotate accumulate and accumulateInto
Summary:
Trying to start adding flow types to files in React. I needed to add a script to package.json in order to run flow, flow-bin is already a dependency.

I had to rewrite the implementation a bit. Flow doesn't recognize

```
var currentIsArray = Array.isArray(current);
if (currentIsArray) {
  // not refined
}
```

but the following does work

```
if (Array.isArray(current)) {
  // refined
}
```

Test Plan:
npm run-script flow
npm run-script test accumulate

Reviewers: @zpao @spicyj
2016-06-16 17:33:32 +02:00
Keyan Zhang
46cd6a0b62 pinned babylon version for eslint to work (#7008) 2016-06-09 16:14:44 -07:00
Paul O’Shannessy
36d1a271c4 Upgrade to flow 0.26 & match internal config with strict args
Also ignore examples, important because react can be installed by the commonjs
one and the modules will get detected there too, resulting in duplicate
definitions
2016-06-03 13:12:47 -07:00
Keyan Zhang
bfd1531eca Add a gulp script for extracting error codes (#6882) 2016-06-01 11:21:26 -07:00
Dmitrii Abramov
00bc8ceaad jest@12.1.1 2016-05-25 21:49:31 +01:00
Dmitrii Abramov
517ed859b4 Upgrade to Jasmine 2 2016-05-25 21:48:32 +01:00
Paul O’Shannessy
d8a0b9a662 Upgrade to jest-cli@0.9 and use Jasmine2 2016-05-25 21:48:32 +01:00
Ben Alpert
5cbb68258b Add (failing) React ART tests
This helps us make sure we don't break React ART in a minor or patch release. The idea is to not change these files when making minor or patch changes. Copied directly from react-art with requires fixed. (I also picked a different haste name just in case.)
2016-05-24 16:44:33 -07:00
chico
655ac0f0dd update typescript 2016-05-19 19:24:40 -07:00
Dan Abramov
7bf96c08e6 Merge pull request #6377 from puradox/proptypes-symbol
Add new primitive PropType `Symbol`
2016-05-10 15:09:12 +01:00
Sebastian Markbåge
700b7148ef Get patch versions of Flow (#6716)
Best practice or whatever.
2016-05-06 14:48:56 -07:00
Keyan Zhang
9ce54210ea fixed transform-react-jsx-source devDep (#6697) 2016-05-03 23:50:27 -07:00
Paul O’Shannessy
c9504d99a5 Setup grunt flow task and run on travis (#6684) 2016-05-03 18:16:38 -07:00
Paul O’Shannessy
468901c336 Ensure we're using latest object-assign (#6681)
This picks up the change to feature test against order bugs.
2016-05-02 13:16:25 -07:00
Ryan Lahfa
9d201abb2b package(node-engine-version): accept 6.x versions (#6645) 2016-04-28 11:33:26 -07:00
cpojer
8e34514096 Update to Jest 12. Codemod to new Jest APIs. 2016-04-28 14:54:57 +09:00
Sebastian Markbage
8806463a66 Add Object Spread Support to Our Babel Config
Won't really use this in prod code yet but I have a benchmark that
uses it.
2016-04-20 03:35:30 +01:00
Raito Bezarius
95fed01634 package(dependency): remove unused es6-symbol dependency 2016-04-11 20:19:09 +02:00
Paul O’Shannessy
caa78f7985 Bump version for v16 development 2016-04-07 11:27:28 -07:00
Paul O’Shannessy
b72a098657 Upgrade browserify 2016-04-05 10:53:53 -07:00
Paul O’Shannessy
3cd39cbb8f Upgrade fbjs 2016-04-05 10:50:54 -07:00
Paul O’Shannessy
1573baaee8 Use Object.assign directly and inject object-assign at compile 2016-04-04 09:53:25 -07:00
Raito Bezarius
0d8ab0efa3 devDependencies: add core-js and es6-symbol polyfill for tests 2016-04-02 14:26:35 +02:00
Christoffer Sawicki
ecf824cc2a Use loose-envify instead of envify
This reduces the number of transitive dependencies and decreases the build time (by ~6% on my machine).
2016-03-21 20:18:17 +01:00
Dan Abramov
97038d1ff7 v15.0.0-rc.2 2016-03-16 21:21:34 +00:00
Paul O’Shannessy
36796348f2 v15.0.0-rc.1 2016-03-07 17:02:10 -08:00
Paul O’Shannessy
340b344b20 Merge pull request #6201 from zpao/docs-babel-6
[docs] Upgrade to work with babel 6, fetch remote babel-browser for now
2016-03-07 11:43:26 -08:00
Paul O’Shannessy
56f8321559 [docs] Upgrade to work with babel 6, fetch remote babel-browser for now 2016-03-07 10:37:06 -08:00
cpojer
626bb81241 Update to jest 0.9.0. 2016-03-06 17:35:53 -08:00
Jason Quense
6a5866f286 Reset Jest to use Jasmine1 so Tests pass again
fixes #6198
2016-03-06 15:16:50 -05:00
Paul O’Shannessy
4e2a0d14a9 Upgrade fbjs, fbjs-scripts 2016-03-04 16:07:20 -08:00