Commit Graph
289 Commits
Author SHA1 Message Date
Ben AlpertandGitHub 44a12ba71b 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 AlpertandGitHub 2908a2a6fc Flow 0.34 (#8259) 2016-11-10 11:52:32 -08:00
Ben AlpertandGitHub 3b1c6c56e0 Run fiber tests just once on Travis (#8221)
Consolidate facts tracking with the other script.
2016-11-07 11:43:29 -08:00
Ben AlpertandGitHub 390224f10f 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 ShastselandDan Abramov a15c80bbe6 Add support for node v7 (#8135) 2016-10-29 11:24:12 +01:00
Sergey RubanovandDan Abramov 79679ece36 Add npm v4.0.0 support (#8082) 2016-10-24 23:57:12 +01:00
Dan AbramovandGitHub e61098cd6f Update Flow and fix issues (#8006) 2016-10-18 15:26:40 +01:00
Dmitrii AbramovandChristopher Chedeau 20b90cf1bf [email protected] (#7693) 2016-09-10 15:09:14 -07:00
Christopher ChedeauandGitHub 09841b5f44 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 9cf66a9871 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 ChedeauandGitHub bf351b20ad Update flow to 0.31 (#7557) 2016-08-25 09:43:28 -07:00
Paul O’ShannessyandGitHub 9e6fb5c530 Upgrade to fbjs v0.8.4 (#7532) 2016-08-19 10:40:03 -07:00
Sebastian MarkbågeandGitHub fa1708f118 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ågeandGitHub 544ecbb919 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ågeandGitHub 63e1203674 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 7f63ea262a upgraded babel-plugin-transform-class-properties
- babel/babel#3589 fixed inferring class name
2016-07-23 15:16:12 -07:00
Keyan ZhangandGitHub 8e4c195557 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 BowersandPaul O’Shannessy 6031037eee 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 55fc5b3744 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 6aaf1d1754 [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 ZhangandGitHub b6f0d3263d pinned babylon version for eslint to work (#7008) 2016-06-09 16:14:44 -07:00
Paul O’Shannessy d245eb6583 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 080f3c7023 Add a gulp script for extracting error codes (#6882) 2016-06-01 11:21:26 -07:00
Dmitrii AbramovandDan Abramov 082f23e3da [email protected] 2016-05-25 21:49:31 +01:00
Dmitrii AbramovandDan Abramov 1ddd0c09ac Upgrade to Jasmine 2 2016-05-25 21:48:32 +01:00
Paul O’ShannessyandDan Abramov 4aad796a39 Upgrade to [email protected] and use Jasmine2 2016-05-25 21:48:32 +01:00
Ben Alpert feff2d579a 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
chicoandDmitrii Abramov 57bfa0ae9e update typescript 2016-05-19 19:24:40 -07:00
Dan Abramov c45e3c73b2 Merge pull request #6377 from puradox/proptypes-symbol
Add new primitive PropType `Symbol`
2016-05-10 15:09:12 +01:00
Sebastian Markbåge 2b8edfdd0b Get patch versions of Flow (#6716)
Best practice or whatever.
2016-05-06 14:48:56 -07:00
Keyan ZhangandJim 5e2cc04c84 fixed transform-react-jsx-source devDep (#6697) 2016-05-03 23:50:27 -07:00
Paul O’Shannessy 1dc7dac68d Setup grunt flow task and run on travis (#6684) 2016-05-03 18:16:38 -07:00
Paul O’Shannessy 37266eeb79 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 LahfaandPaul O’Shannessy 0d8812b52f package(node-engine-version): accept 6.x versions (#6645) 2016-04-28 11:33:26 -07:00
cpojer 412c261ca2 Update to Jest 12. Codemod to new Jest APIs. 2016-04-28 14:54:57 +09:00
Sebastian Markbage 154e4702be 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 54f9442855 package(dependency): remove unused es6-symbol dependency 2016-04-11 20:19:09 +02:00
Paul O’Shannessy 4072850bca Bump version for v16 development 2016-04-07 11:27:28 -07:00
Paul O’Shannessy bdb78a9cd4 Upgrade browserify 2016-04-05 10:53:53 -07:00
Paul O’Shannessy aa769ad8f8 Upgrade fbjs 2016-04-05 10:50:54 -07:00
Paul O’Shannessy fc707182e4 Use Object.assign directly and inject object-assign at compile 2016-04-04 09:53:25 -07:00
Raito Bezarius 500170f001 devDependencies: add core-js and es6-symbol polyfill for tests 2016-04-02 14:26:35 +02:00
Christoffer Sawicki 35380f616b 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 cfbbca12c1 v15.0.0-rc.2 2016-03-16 21:21:34 +00:00
Paul O’Shannessy 1103aacc9a v15.0.0-rc.1 2016-03-07 17:02:10 -08:00
Paul O’Shannessy b372b97308 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 24ec3b8822 [docs] Upgrade to work with babel 6, fetch remote babel-browser for now 2016-03-07 10:37:06 -08:00
cpojer 36e8199af4 Update to jest 0.9.0. 2016-03-06 17:35:53 -08:00
Jason Quense 2d251e0a9b Reset Jest to use Jasmine1 so Tests pass again
fixes #6198
2016-03-06 15:16:50 -05:00
Paul O’Shannessy 3e81a6f760 Upgrade fbjs, fbjs-scripts 2016-03-04 16:07:20 -08:00