Commit Graph

530 Commits

Author SHA1 Message Date
Brian Vaughn 2905e56904 Bumped version numbers and built 16.0.0-alpha.11 2017-04-24 18:52:10 -07:00
Brian Vaughn 41290742e6 Bumped version numbers for alpha 10 (#9474) 2017-04-20 13:06:51 -07:00
Ben Alpert b1768b5a48 Prettier 1.2 (#9462) 2017-04-20 11:18:33 -07:00
Dan Abramov e59506c478 Bump prop-types 2017-04-20 16:40:58 +01:00
Brian Vaughn 6cd7618bd7 Bumped versions for 16.0.0-alpha.9 and re-built 2017-04-11 14:40:56 -07:00
Brian Vaughn 2beec2f308 createClass + PropTypes + checkPropTypes warnings (#9399)
(Temporarily) re-adds getters with deprecation warnings for React.PropTypes, React.checkPropTypes, and React.createClass.

* 08bd020: Replace all references to React.PropTypes with prop-types to avoid triggering our own warning message.
* ef5b5c6: Removed several references to React.createClass that appeared after rebasing this branch. (reviewed by @flarnie)
* 524ce20: Added getters for createClass and PropTypes to the main React isomorphic object, behind one-time warning messages. (reviewed by @spicyj)
* db48f54: Fixed Rollup bundles to inline 'prop-types' and 'create-react-class' for UMD builds only. (reviewed by @spicyj, @trueadm )
* cf49cfd: Updated tests-passing.txt to remove tests that were deleted in this branch.
* d34109a: Responses to PR feedback from @spicyj. (Added package.json dependencies to packages/react and packages/react-dom. Renamed a var. Expanded on an inline comment.)
* 488c8d2: Added warning for moved package to React.checkPropTypes accessor too and updated build script.
* 83bcb29: Wordsmithing for deprecation notices (added fb.me links).
* afdc9d2: Tweaked legacy module inlining to remove order-of-deps constraint
* d1348b9: Removed $FlowFixMe.
* 7dbc3e7: More wordsmithing of deprecation notices based on Dan's feedback.
2017-04-11 14:28:03 -07:00
Ben Alpert b1a06bd945 Fix ignore patterns in package.json (#9409) 2017-04-11 13:58:14 -07:00
Andrew Clark 957fbc92b1 react-create-class -> create-react-class 2017-04-10 17:06:32 -07:00
Dan Abramov d88696941d 16.0.0-alpha.8 2017-04-07 18:47:23 +01:00
Dan Abramov 21bb8c00d4 16.0.0-alpha.7 2017-04-06 19:50:22 +01:00
Dan Abramov 398d449c48 Fix the print warnings script (#9344) 2017-04-05 18:54:48 +01:00
Dominic Gannaway 4b2eac3de7 Convert current build system to Rollup and adopt flat bundles (#9327)
* WIP

* fbjs support

* WIP

* dev/prod mode WIP

* More WIP

* builds a cjs bundle

* adding forwarding modules

* more progress on forwarding modules and FB config

* improved how certain modules get inlined for fb and cjs

* more forwarding modules

* added comments to the module aliasing code

* made ReactPerf and ReactTestUtils bundle again

* Use -core suffix for all bundles

This makes it easier to override things in www.

* Add a lazy shim for ReactPerf

This prevents a circular dependency between ReactGKJSModule and ReactDOM

* Fix forwarding module for ReactCurrentOwner

* Revert "Add a lazy shim for ReactPerf"

This reverts commit 723b402c07.

* Rename -core suffix to -fb for clarity

* Change forwarding modules to import from -fb

This is another, more direct fix for ReactPerf circular dependency

* should fix fb and cjs bundles for ReactCurrentOwner

* added provides module for ReactCurrentOwner

* should improve console output

* fixed typo with argument passing on functon call

* Revert "should improve console output"

This breaks the FB bundles.

This reverts commit 65f11ee64f.

* Work around internal FB transform require() issue

* moved  ReactInstanceMap out of React and into ReactDOM and ReactDOMFiber

* Expose more internal modules to www

* Add missing modules to Stack ReactDOM to fix UFI

* Fix onlyChild module

* improved the build tool

* Add a rollup npm script

* Rename ReactDOM-fb to ReactDOMStack-fb

* Fix circular dependencies now that ReactDOM-fb is a GK switch

* Revert "Work around internal FB transform require() issue"

This reverts commit 0a50b6a90b.

* Bump rollup-plugin-commonjs to include a fix for rollup/rollup-plugin-commonjs#176

* Add more forwarding modules that are used on www

* Add even more forwarding modules that are used on www

* Add DOMProperty to hidden exports

* Externalize feature flags

This lets www specify them dynamically.

* Remove forwarding modules with implementations

Instead I'm adding them to react-fb in my diff.

* Add all injection necessary for error logging

* Add missing forwarding module (oops)

* Add ReactART builds

* Add ReactDOMServer bundle

* Fix UMD build of ReactDOMFiber

* Work in progress: start adding ReactNative bundle

* tidied up the options for bundles, so they can define what types they output and exclude

* Add a working RN build

* further improved and tidied up build process

* improved how bundles are built by exposing externals and making the process less "magical", also tidied up code and added more comments

* better handling of bundling ReactCurrentOwner and accessing it from renderer modules

* added NODE_DEV and NODE_PROD

* added NPM package creation and copying into build chain

* Improved UMD bundles, added better fixture testing and doc plus prod builds

* updated internal modules (WIP)

* removed all react/lib/* dependencies from appearing in bundles created on build

* added react-test-renderer bundles

* renamed bundles and paths

* fixed fixture path changes

* added extract-errors support

* added extractErrors warning

* moved shims to shims directory in rollup scripts

* changed pathing to use build rather than build/rollup

* updated release doc to reflect some rollup changes

* Updated ReactNative findNodeHandle() to handle number case (#9238)

* Add dynamic injection to ReactErrorUtils (#9246)

* Fix ReactErrorUtils injection (#9247)

* Fix Haste name

* Move files around

* More descriptive filenames

* Add missing ReactErrorUtils shim

* Tweak reactComponentExpect to make it standalone-ish in www

* Unflowify shims

* facebook-www shims now get copied over correctly to build

* removed unnecessary resolve

* building facebook-www/build is now all sync to prevent IO issues plus handles extra facebook-www src assets

* removed react-native-renderer package and made build make a react-native build dir instead

* 😭😭😭

* Add more SSR unit tests for elements and children. (#9221)

* Adding more SSR unit tests for elements and children.

* Some of my SSR tests were testing for react-text and react-empty elements that no longer exist in Fiber. Fixed the tests so that they expect correct markup in Fiber.

* Tweaked some test names after @gaearon review comment https://github.com/facebook/react/pull/9221#discussion_r107045673 . Also realized that one of the tests was essentially a direct copy of another, so deleted it.

* Responding to code review https://github.com/facebook/react/pull/9221#pullrequestreview-28996315 . Thanks @spicyj!

* ReactElementValidator uses temporary ReactNative View propTypes getter (#9256)

* Updating packages for 16.0.0-alpha.6 release

* Revert "😭😭😭"

This reverts commit 7dba33b2cf.

* Work around Jest issue with CurrentOwner shared state in www

* updated error codes

* splits FB into FB_DEV and FB_PROD

* Remove deps on specific builds from shims

* should no longer mangle FB_PROD output

* Added init() dev block to ReactTestUtils

* added shims for DEV only code so it does not get included in prod bundles

* added a __DEV__ wrapping code to FB_DEV

* added __DEV__ flag behind a footer/header

* Use right haste names

* keeps comments in prod

* added external babel helpers plugin

* fixed fixtures and updated cjs/umd paths

* Fixes Jest so it run tests correctly

* fixed an issue with stubbed modules not properly being replaced due to greedy replacement

* added a WIP solution for ReactCurrentOwner on FB DEV

* adds a FB_TEST bundle

* allows both ReactCurrentOwner and react/lib/ReactCurrentOwner

* adds -test to provides module name

* Remove TEST env

* Ensure requires stay at the top

* added basic mangle support (disbaled by default)

* per bundle property mangling added

* moved around plugin order to try and fix deadcode requires as per https://github.com/rollup/rollup/issues/855

* Fix flow issues

* removed gulp and grunt and moved tasks to standalone node script

* configured circleci to use new paths

* Fix lint

* removed gulp-extract-errors

* added test_build.sh back in

* added missing newline to flow.js

* fixed test coverage command

* changed permissions on test_build.sh

* fixed test_html_generations.sh

* temp removed html render test

* removed the warning output from test_build, the build should do this instead

* fixed test_build

* fixed broken npm script

* Remove unused ViewportMetrics shim

* better error output

* updated circleci to node 7 for async/await

* Fixes

* removed coverage test from circleci run

* circleci run tets

* removed build from circlci

* made a dedicated jest script in a new process

* moved order around of circlci tasks

* changing path to jest in more circleci tests

* re-enabled code coverage

* Add file header to prod bundles

* Remove react-dom/server.js (WIP: decide on the plan)

* Only UMD bundles need version header

* Merge with master

* disabled const evaluation by uglify for <script></script> string literal

* deal with ART modules for UMD bundles

* improved how bundle output gets printed

* fixed filesize difference reporting

* added filesize dep

* Update yarn lockfile for some reason

* now compares against the last run branch built on

* added react-dom-server

* removed un-needed comment

* results only get saved on full builds

* moved the rollup sized plugin into a plugins directory

* added a missing commonjs()

* fixed missing ignore

* Hack around to fix RN bundle

* Partially fix RN bundles

* added react-art bundle and a fixture for it

* Point UMD bundle to Fiber and add EventPluginHub to exported internals

* Make it build on Node 4

* fixed eslint error with resolve being defined in outer scope

* Tweak how build results are calculated and stored

* Tweak fixtures build to work on Node 4

* Include LICENSE/PATENTS and fix up package.json files

* Add Node bundle for react-test-renderer

* Revert "Hack around to fix RN bundle"

We'll do this later.

This reverts commit 59445a6259.

* Revert more RN changes

We'll do them separately later

* Revert more unintentional changes

* Revert changes to error codes

* Add accidentally deleted RN externals

* added RN_DEV/RN_PROD bundles

* fixed typo where RN_DEV and RN_PROD were the wrong way around

* Delete/ignore fixture build outputs

* Format scripts/ with Prettier

* tidied up the Rollup build process and split functions into various different files to improve readability

* Copy folder before files

* updated yarn.lock

* updated results and yarn dependencies to the latest versions
2017-04-05 16:47:29 +01:00
Brian Vaughn 1a29b4e2a3 Updating packages for 16.0.0-alpha.6 release 2017-03-24 15:44:09 -07:00
Brian Vaughn 8ce5fe97b5 Bumped React version to 16.0.0-alpha.5 2017-03-21 13:04:08 -07:00
Brian Vaughn ad2b6545fe Upgraded Flow dev dependency to 41 for 'implements' support (#9196) 2017-03-16 17:12:50 -07:00
Andrew Clark f365e52dd7 Add prettier script
`scripts/prettier/index.js write` will run prettier on source files.
Run using `yarn prettier`.

`scripts/prettier/index.js` will throw if any source files are not
formatted with prettier. We'll use this to block CI.

Based on similar script in Jest repo.
2017-03-16 11:53:44 -07:00
Sebastian Markbage b363803d26 Update to prettier 0.22 2017-03-13 17:02:21 -07:00
Sebastian Markbage 898ba574d6 Try 80-character line limit instead 2017-03-13 16:57:16 -07:00
Sebastian Markbage 9d34dd3c01 More options 2017-03-13 16:55:59 -07:00
Sebastian Markbage 4adad94eac Add prettier option in scripts 2017-03-13 16:55:58 -07:00
Ben Alpert 0d7b4d6dba 16.0.0-alpha.4 2017-03-13 08:54:41 -07:00
Dan Abramov 73378c9293 [Fiber] Performance measurements (#9071)
* wip

* better

* better

* track commits

* better

* wip

* Fix

* Add some lifecycles

* wip

* Naming

* Moar emojis

* Remove stacks in favor of a flag

* Fix Flow

* Gate behind __DEV__

* Revert flag for testing

* Measure all lifecycles

* Push it to the limits

* Polish

* Indent

* Refactor and track cascading updates

* More prominent warnings

* Make mark names themselves readable

This is useful for RN Systrace which doesn't let us assign labels after the fact.

* Keep track of how many effects we call

* Fix typo

* Do less work to reduce the overhead

* Fix lint

* Remove closure

* Remove unintentional formatting changes

* Add tests

* Fix test regex and record tests

* Disable irrelevant tests needed for ReactPerf

* Fix typo

* Fix lint and flow

* Don't treat cWM or cWRP as cascading

* Whitespace

* Update tests

* Gate callComponentWillUnmountWithTimerInDev definition by DEV
2017-03-08 18:28:53 +00:00
Sasha Aickin fcf41e7ca2 Add async/await to unit tests; modify server rendering tests to use async/await. (#9089) 2017-03-03 10:34:14 -08:00
Andrew Clark 9c8547cc9f Add script to print out a list of warnings
We'll use this in the GH sync script to track which warnings have
changed since the last sync
2017-03-02 11:37:01 -08:00
Andrew Clark 6ac5fd3c2b Rename rule to no-primitive-constructors 2017-02-28 18:57:06 -08:00
Sebastian Markbåge e35724a03d Move webcomponents.js polyfill to mocks (#8993)
* Move webcomponents.js polyfill to mocks

I'd like to move it out of shared to make it easier to sync this to RN.
Since this is only used for testing and a polyfill is essentially a mock.
Maybe this makes sense?

Rename to camel case to be consistent with providesModule.

* Update path to ignore in configs
2017-02-27 18:35:05 -08:00
Andrew Clark ca4325e3ef 16.0.0-alpha.3 2017-02-23 15:36:08 -08:00
Michał Pierzchała 67c1fde70e Upgrade Jest to v19 (#9034) 2017-02-22 16:59:18 +00:00
Ben Alpert d20dea1de2 Update to babel-plugin-transform-es2015-block-scoping 6.23 (#9002)
Now we won't add closures unnecessarily. I verified that we have no code that throws -- adding some then running `grunt build:modules` correctly throws.
2017-02-14 11:24:01 -08:00
Dan Abramov c7ebe88c2a 16.0.0-alpha.2 2017-02-09 16:07:56 +00:00
Jon Bretman afdf47f425 Bump fbjs to 0.8.9 (#8910) 2017-02-06 19:02:17 +00:00
Brian Vaughn 88b6175cb1 Bumping package.json versions from 16.0.0-alpha.0 to 16.0.0-alpha.1 2017-01-25 12:14:00 -08:00
Dan Abramov c6a7dc7f24 Preserve license headers from dependencies in minified build (#8803)
* Preserve license headers from dependencies in minified build

Fixes #8789.

* Bump minimal object-assign version
2017-01-20 02:29:06 +01:00
Dustan Kasten 2da35fcae8 [Fiber] Implement test renderer (#8628)
* ReactTestRenderer move current impl to stack dir

* ReactTestRenderer on fiber: commence!

* ReactTestRenderer: most non-ref/non-public-instance tests are passing

* Move ReactTestFiberComponent functions from Renderer to Component file

* test renderer: get rid of private root containers and root Maps

* TestRenderer: switch impl based on ReactDOMFeatureFlag.useFiber

* ReactTestRenderer: inline component creation

* ReactTestRenderer: return to pristine original glory (+ Fiber for error order difference)

* TestRendererFiber: use a simple class as TestComponentInstances

* Add `getPublicInstance` to support TestRenderer `createNodeMock`

* Rename files to end. Update for `mountContainer->createContainer` change

* test renderer return same object to prevent unnecessary context pushing/popping

* Fiber HostConfig add getPublicInstance. This should be the identity fn everywhere except the test renderer

* appease flow

* Initial cleanup from sleepy work

* unstable_batchedUpdates

* Stack test renderer: cache nodeMock to not call on unmount

* add public instance type parameter to the reconciler

* test renderer: set _nodeMock when mounted

* More cleanup

* Add test cases for root fragments and (maybe?) root text nodes

* Fix the npm package build

Explicitly require the Stack version by default.
Add a separate entry point for Fiber.

We don't add fiber.js to the package yet since it's considered internal until React 16.

* Relax the ref type from Object to mixed

This seems like the most straightforward way to support getPublicInstance for test renderer.

* Remove accidental newline

* test renderer: unify TestComponent and TestContainer, handle root updates

* Remove string/number serialization attempts since Fiber ensures all textInstances are strings

* Return full fragments in toJSON

* Test Renderer remove TestComponent instances for simple objects

* Update babylon for exact object type syntax

* Use $$typeof because clarity > punching ducks.

* Minor Flow annotation tweaks

* Tweak style, types, and naming

* Fix typo
2017-01-11 11:19:32 -08:00
Brian Vaughn 378ef5e730 16.0.0-alpha.0 2017-01-09 16:45:56 -08:00
Dan Abramov 0e6f784259 Replace Starter Kit with doc link (#8682)
* Replace Starter Kit with doc link

* https in Babel link
2017-01-04 09:39:01 -08:00
Dan Abramov c79af45f1e Update to Jest 18 (#8621) 2016-12-21 19:28:27 -08:00
Sebastian Markbåge b49210f498 Update Flow to 0.37.0 (#8608)
Nothing really changes.
2016-12-20 11:09:03 -08:00
Dan Abramov 9c87506ad9 Update Flow to 0.36 (#8420) 2016-11-25 16:25:09 +00:00
Evan Scott 77c890dfa2 Update all Jest packages to 17.x (#8327)
* Update all Jest packages to 17.x, cache babel-jest transforms

* Remove the caching

Looking at the other builds it doesn't seem to actually be that necessary.  The bottleneck is executors, not build time.

* Remove unnecessary package, fix fiber test runner

* Regenerate yarn lockfile
2016-11-20 16:10:08 +00:00
Tom Occhino 32f5b034ed Upgrade ESLint and dependencies, fix new lint errors, switch Travis to Yarn (#8309)
* Update ESLint to 3.10.2

Also pull in fbjs for extending properly, per @zpao. This also disables consistent-return, which has about 80 failing cases in React currently. If we'd like to turn this back on, we should do it separately and fix all the call sites properly (rather than just adding 'return undefined;' everywhere, which adds no value.

Fixes to all existing lint errors plus an update for yarn.lock to follow.

* Update yarn.lock after the eslint update.

* Fix all new eslint failures

Unfortunately I had to add three eslint-disable-next-line instances. All have explanations inline.

* Switch Travis to use yarn instead of npm
2016-11-17 22:16:44 +00:00
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
Paul O’Shannessy 093bb22030 Update lint config, dependencies, fix issues
This also fixes messages from new synthetic events warnings
2016-03-03 10:16:02 -08:00
Sebastian McKenzie 1365498b81 Update to Babel 6 2016-02-26 16:49:32 -08:00
cpojer 383e2f938d Update to jest-cli 0.9. 2016-02-17 13:01:14 +09:00
Paul O’Shannessy a1dab9edbf Fix lint
- Upgrade babel-eslint
- Ignore coverage
- Fix actual lint warning
2016-02-05 10:56:51 -08:00
Paul O’Shannessy 7c52b802b4 Clean up ununsed devDeps
Also removed object-assign. We only support building with node v4+ which has Object.assign.
2016-01-22 10:17:30 -08:00
Paul O’Shannessy b41f5a1cdf v0.15.0-alpha.1 2016-01-20 20:07:37 -08:00
Paul O’Shannessy 19db8e13bc Upgrade to fbjs@^0.6.1
(cherry picked from commit f305deb065)
2016-01-07 10:10:14 -08:00
Ben Alpert 99dc2a73f6 Upgrade fbjs to 0.6
(counterpart to a29b4938a8)
2015-12-29 14:11:33 -08:00
Paul O’Shannessy e68e17503e Remove coverage options from package.json
They don't provide any value and since one of them isn't a valid config usage,
it blurs the line. Instead just store these pieces in the tasks and write them
to the temp config.
2015-12-22 11:14:44 -08:00
John-David Dalton 9b0ef9244d Add coveralls. 2015-12-22 06:48:33 -06:00
chico dbe8212974 update deps 2015-11-13 01:15:23 +03:00
chico b9fd77a4bd update eslint and eslint-plugin-react 2015-11-05 05:14:51 +03:00
chico 8987522a2a remove eslint-disable when possible and update eslint version 2015-11-05 05:11:39 +03:00
Sergey Rubanov 57b0c8efd0 add Node 5 to devEngines 2015-11-01 04:55:33 +03:00
Paul O’Shannessy bd6417e24e Merge pull request #5293 from chicoxyzzy/update-deps
update dependancies
2015-10-30 13:25:31 -07:00
chico 38b80b5b37 update deps 2015-10-30 16:34:39 +03:00
cpojer ac17bdaaba Remove `generateFromMetadata` and `getMetadata` usage. 2015-10-29 15:45:30 -07:00
cpojer 9d25303d89 Update jest. 2015-10-29 12:40:52 -07:00
Paul O’Shannessy a79fcd7a7f [lint] Lock eslint version
The automatic updating really sucks here as bugs are fixed / behavior of rules changes. Local versions are updated, cached versions on Travis aren't. It's messy. Now we must explicitly update for any thing to change.
2015-10-22 20:15:25 -07:00
Paul O’Shannessy 5bd04cf259 Merge pull request #5154 from cmatheson/master
add npm 3.x to devengines
2015-10-19 13:52:20 -07:00
Timothy Yung 278939ec58 Upgrade dependency fbjs@0.4.0 2015-10-16 16:10:06 -07:00
Cameron Matheson 2c1c7fad4d add npm 3.x to devengines 2015-10-13 02:06:48 -06:00
Paul O’Shannessy 59cd224a03 Bump version in master for 0.15 development 2015-10-07 09:57:53 -07:00
Paul O’Shannessy 693dd3567b Update to fbjs@0.3
As far as we're concerned, the only difference is that we moved some files from React to fbjs.
2015-10-01 14:30:05 -07:00
Sebastian Markbage 41cba2e77b Enforce NODE_ENV=test
You could make the argument that this should be optional, but it doesn't
work without it so we might as well just enforce it.

Makes `jest` work by default.
2015-09-30 17:43:06 -07:00
Ben Alpert b8c7b13042 Fail jest tests on any un-spied warnings
Originally #4223 -- we lost this when we switched to jest.
2015-09-29 17:35:39 -07:00
Paul O’Shannessy 7037ef9d8b [lint] Update and fix 2015-09-25 12:32:51 -07:00
Paul O’Shannessy 2afc9a445f Upgrade to node@4, jest@0.5 2015-09-23 13:46:41 -07:00
Paul O’Shannessy 20f0b0f464 Upgrade eslint to 1.4.1 2015-09-16 12:16:46 -07:00
Ben Alpert 4a4174b9e8 0.14.0-rc1 2015-09-10 08:47:40 -07:00
Paul O’Shannessy 52b4c9eabf Upgrade to fbjs, fbjs-scripts @ 0.2 2015-08-31 17:19:42 -07:00
Paul O’Shannessy ec9b866bc0 Check for compatible node,npm versions on install
This is only for building React and doesnn't apply to production installs.
2015-08-18 23:45:12 -07:00
Paul O’Shannessy ecb34de574 Upgrade ESLint, fix code 2015-08-10 17:04:29 -07:00
Paul O’Shannessy 3f6bca7b16 0.14.0-beta3 2015-08-03 14:24:24 -07:00
Paul O’Shannessy 681bbb629f 0.14.0-beta2 2015-07-30 21:29:09 -07:00
Paul O’Shannessy e9c53364e5 Update fbjs dependency 2015-07-30 21:28:11 -07:00
Paul O’Shannessy d982d5e153 Move react-tools from root.
ReactTools is deprecated, it doesn't belong at the root of the project. We'll remove it after 0.14 but for now this moves it so that it's contained and not intermixed with the rest of the project. The currect behavior of copying src/ into the package is maintained.
2015-07-30 10:15:36 -07:00
Jim 6296d1cad2 Removed `npm run jest` script. Users can use `npm test` instead. 2015-07-27 16:03:59 -07:00
Paul O’Shannessy be5c09c24d Update fbjs dependency
- remove a file that got moved over there
- update for renamed babel transform
2015-07-27 13:37:48 -07:00
Paul O’Shannessy 83c88578e9 Replace grunt-jest with our own runner
This gives us more control
2015-07-23 17:52:58 -07:00
Paul O’Shannessy 1d0c1b1817 Use fbjs package from npm, gulp
This reworks a few things in building and distributing React. The biggest change is using fbjs to share dependencies with other libraries. We're also using Gulp for some build steps.
2015-07-23 15:48:02 -07:00
Paul O’Shannessy 458714ab2f Lock typescript dep at 1.4 2015-07-23 12:49:21 -07:00
Paul O’Shannessy ecb4433cc9 Upgrade babel, babel-eslint; remove babel-core dep 2015-07-21 17:23:52 -07:00
Paul O’Shannessy ce8a152c49 Lock babel @ 5.6.x.
5.7 and 5.8 are having big issues with linting
2015-07-21 12:20:39 -07:00
Ben Alpert 06304d59de Upgrade eslint
Fixes #4428.
2015-07-20 08:37:47 -07:00
Paul O’Shannessy 5da408297f Remove in-browser unit testing
Rely on jest for now until we get a better and less hacky solution to running tests in the browser, probably a totally different test suite with different behavior/goals.
2015-07-17 00:13:16 -07:00
Paul O’Shannessy 91a87174bc Use more specific ignore pattern for jest
TravisCI clones into /home/travis/build/facebook/react, which /build/ matches so we never ran any of our tests.
2015-07-14 18:28:30 -07:00
Benjamin Woodruff fc0b42dc07 Run eslint tests with jest
Turns out eslint-tester works with jest (!)

We take advantage of this internally at FB, so we'll do it here too.

Fixes #4328
2015-07-09 15:59:59 -07:00
Ben Alpert b4e74e38e4 Bump version to beta1 2015-07-03 10:46:35 +02:00
Ben Alpert 33d5201a94 Finish addons packaging
- Add missing object-assign dependency
- Add batchedUpdates to ReactDOMClient, rename the two addons to `unstable_`
- Delete react/addons/* (leaving react/addons with a slightly updated warning)
- Add README.md, LICENSE, PATENTS to each addons package
2015-07-02 23:33:16 +02:00
Baraa Hamodi c1ec407bd9 More conservative dependency update. 2015-06-26 18:37:15 -07:00
Paul O’Shannessy ddac9473ca npm script to run lint only on changed files 2015-06-16 11:24:02 -07:00
Paul O’Shannessy b4b542303d Update jest to latest 2015-06-11 11:01:00 -07:00
Benjamin Woodruff f27d130323 Merge pull request #4040 from PiPeep/eslint-updates
Update eslint-related dependencies
2015-06-08 13:00:13 -07:00
Benjamin Woodruff 52eca1eb69 Update eslint-related dependencies
- babel-eslint ^3.1.14 fixes babel/babel-eslint#120
- babel updated from ^5.3.3 to ^3.5.5, which changes stuff, I guess
- eslint updated from ^0.21.2 to ^0.22.1, which makes `no-shadow` also
  check class declarations
2015-06-08 08:41:13 -07:00
Benjamin Woodruff 30cce21ae6 Load custom eslint rules as plugin, w/o --rulesdir
This allows us to load the eslint rules without requiring command-line
arguments, which avoids breaking editors with eslint plugins.

https://github.com/eslint/eslint/issues/2180#issuecomment-87722150
2015-06-04 17:04:45 -07:00
Benjamin Woodruff 40eb94d13e Roll back to babel-eslint 3.1.9
spicyj noticed newer versions of babel-eslint seemed not to error on
no-unused-vars, and I was able to repro. It seems like something broke
between 3.1.9 and 3.1.10. (Smaller repro case and babel-eslint bug
report to come)

His commit failed on travis, but not on his local machine:
https://travis-ci.org/facebook/react/jobs/65468729
2015-06-04 15:43:41 -07:00
Ben Alpert b1538e36e3 Fix `npm run lint`
Broke in #4021.
2015-06-04 13:20:42 -07:00
Benjamin Woodruff c04a9e632c Enable react/wrap-multilines eslint rule
Multiline jsx literals in a return should be paren-wrapped.
2015-06-04 09:44:47 -07:00
Paul O’Shannessy 6b79977c31 Merge pull request #3416 from koba04/remove-jshint
Remove the codes relating to jshint
2015-06-03 19:45:51 -07:00
Toru Kobayashi ce46068def Remove the codes relating to jshint 2015-06-04 09:32:37 +09:00
Benjamin Woodruff 17e7046754 Add custom eslint rule for warning and invariant
See #2869

Checks that the *second* argument of warning and invariant are a literal
string, or a concatination of literal strings, and that the number of
arguments is correct based on the number of %s substrings.

This commit also fixes a few places where the existing code had broken
error messages!

The rule itself is pretty straightforward, although adding the tests
ended up being a bit painful, as eslint-tester depends on mocha, and
therefore needs to be run in a separate grunt task.
2015-06-03 17:19:32 -07:00
Benjamin Woodruff 21ca3f732f Enable linting for __tests__
Closes #3971.

> After #3968, the next thing we should do is start linting our tests.
> Historically we've ignored them due to lack of parser compatibility.
> But that shouldn't be a problem anymore. We may want to integrate
> https://www.npmjs.com/package/eslint-plugin-react to more aggressively
> lint our JSX in tests.

I understand this diff touches a lot of stuff, so I tried to keep it to
a near-minimal set of changes to make eslint happy.
2015-06-01 16:01:03 -07:00
Benjamin Woodruff 58fb322e21 Use babel-eslint and update eslint
-   Removes esprima-fb dependency
-   Tightens up eslintrc with some minor rules we were pretty-much
    following anyways.
-   Adds pretty colors to the `grunt lint` output
-   Breaks block-scoped-var :(
2015-05-28 09:42:55 -07:00
Ben Alpert 8471cc5f47 0.14.0-alpha3 2015-05-27 16:47:35 -07:00
Paul O’Shannessy 02f1626725 Better invariant / warning replacement 2015-05-21 19:20:56 -07:00
Paul O’Shannessy b687a22953 0.14.0-alpha2 2015-05-20 13:37:42 -07:00
Paul O’Shannessy 76d016c6f1 Use Babel to transform JS in docs, update other calls 2015-05-13 15:26:23 -07:00
Paul O’Shannessy b258d34c73 Don't run non-existant fbtransform tests 2015-05-13 10:52:51 -07:00
Paul O’Shannessy 7839e07231 0.14.0-alpha1 2015-05-10 22:36:50 -07:00
Paul O’Shannessy 64014c4641 Fix esprima-fb dependency 2015-05-10 22:25:08 -07:00
Paul O’Shannessy 2b9a74c0e6 Merge pull request #3777 from zpao/deprecate-react-tools
Deprecate react-tools
2015-05-05 11:06:15 -07:00
Paul O’Shannessy d2fe87892d Remove transforms from repo, react-tools
Time to just use jstransform.
2015-05-05 10:51:51 -07:00
Ben Alpert ceb92cd78c Replace vendor/constants recast transform with babel
Built files look the same up to parenthesization and quoting. This only saves 1.5 seconds out of ~20 on a clean build but it's a little simpler.
2015-05-04 17:05:42 -07:00
Ben Alpert 8897b00989 Remove es3ify 2015-05-04 16:13:36 -07:00
Ben Alpert 93a782b40b Use Babel to build React
Size comparison:

```
   raw     gz Compared to master @ 6ed98ec0c8
     =      = build/JSXTransformer.js
-15736  -3247 build/react-with-addons.js
  +287     +7 build/react-with-addons.min.js
-14412  -2887 build/react.js
  +274    +15 build/react.min.js
```

Differences mostly look to be various bits of whitespace that Babel ends up removing during its transforms (https://gist.github.com/spicyj/21ef31f4d95fb7a58daf). In minified files, mostly additions of `"use strict";`.
2015-05-04 14:14:09 -07:00
Ben Alpert e534e0730e Use local `grunt` executable on Travis
Builds have been flaky lately. Maybe this will help?
2015-04-28 14:45:55 -07:00
Reed Loden 3e8951e8c7 SSL/TLSize all the things! (convert http:// to https:// where appropriate)
Update links to use https:// where it is supported. There's probably a lot
more that could be fixed, but these are the core ones I found (especially
the download links in order to prevent MITM attacks). Note that there are
some fb.me links that will redirect to http:// even while accessed over
https://, but this seemed like the best way to fix those for now.

NOTE: Only non-third-party files were modified. There are references to
http:// URLs in vendored/third-party files, but seems appropriate to fix
upstream for those rather than editing the files.

Also, copy one image locally to the blog, as it was hotlinking to a site
that did not support https://.

Last, use youtube-nocookie.com instead of youtube.com for video embeds,
as the former doesn't try to set a cookie on load (privacy enhancement).
2015-04-18 16:49:32 -07:00
Paul O’Shannessy d467b52758 Update uglify dependency
Apparently we needed to get to v2.4.17 to get the fix for #2247. We
shrinkwrapped on the same day but the timing didn't work out so we missed it.
2015-04-13 12:49:45 -07:00
Ben Alpert 0b6c7c29fe Keep docs/js/{react,JSXTransformer}.js in repo
This way we don't need to rebuild them each time for the website.
2015-03-28 14:56:54 -07:00
Ben Alpert d12c968dec Only run src/ and vendor/fbtransform/ tests in jest
Test Plan: jest
2015-03-25 16:49:01 -07:00
Paul O’Shannessy e313616be7 Bump version so we can get back to work 2015-03-10 15:06:35 -07:00
Paul O’Shannessy eaed4d7804 Merge pull request #3345 from zertosh/update-derequire
Update derequire (and greatly improve build speed)
2015-03-09 13:46:49 -07:00
Andres Suarez 9941095dc3 Update to derequire@^2.0.0 2015-03-08 23:43:47 -04:00
Gabe Levi ac5af1ec45 Update jstransform and esprima-fb dependencies 2015-03-06 18:31:29 -05:00
Paul O’Shannessy 21b41480a5 v0.13.0-rc2 2015-03-03 11:46:01 -08:00
Paul O’Shannessy dc92fa480a Upgrade package dependencies for new esprima/jstransform 2015-03-01 11:25:16 -08:00
Paul O’Shannessy 06126ad3f4 v0.13.0-rc1 2015-02-22 13:26:13 -08:00
Paul O’Shannessy 4f26cc1414 Update dependencies 2015-02-22 13:26:13 -08:00
Artem Nezvigin d7791a7cbb Add vendor/inline-source-map.js to package.json 2015-02-22 11:11:48 -08:00
fisherwebdev 10d336d4eb Remove lodash devDependency 2015-02-18 22:41:58 -08:00
Paul O’Shannessy 5126cee0f5 v0.13.0-beta.2 2015-02-13 18:28:03 -08:00
jeffmo 34bb8e85a2 Bump jstransform version to 9.1.0 to include new flow updates 2015-02-13 17:40:52 -05:00
Paul O’Shannessy dae1dc6292 Upgrade to newer eslint, use esprima-fb
Eslint now allows us to use a different parser, which allows us to use
esprima-fb explicitly. This means we don't have to wait for espree to add
things like rest-param parsing. Though we do need eslint to upgrade its rules
to handle that AST.

I had hoped to enable parsing of our tests but we can't do that until we
change esprima-fb's XJS nodes to JSX.

While I was here, I also enabled the no-unused-vars rule since eslint
understands template strings. I also made the single quote enforcement
actually fail instead of just warn.
2015-02-09 14:27:28 -08:00
Sebastian Markbage f6fd4a8506 Use TypeScript Compiler API Directly
In 1.4.0 we can use the TypeScript API directly to preprocess our files.
This lets us get rid of a dependency.

https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API

We can also use this to provide our default libraries so that we don't
need to keep the references in the test file.
2015-02-01 22:41:00 -08:00
Paul O’Shannessy 5bd078508a v0.13.0-beta.1 2015-01-27 21:13:35 -08:00
Paul O’Shannessy bd56b731de Merge pull request #2967 from zpao/jest-match-internal
[jest] Use persistModuleRegistryBetweenSpecs
2015-01-27 20:54:19 -08:00
Paul O’Shannessy 14d88d4e38 [jest] Use persistModuleRegistryBetweenSpecs
This more closely matches how we have jest configured at FB, so when we
pull in and run internally we will have fewer things to waste time on.
2015-01-27 19:17:31 -08:00
Paul O’Shannessy 49eb84efdd Run jest with grunt, add to travis
This is to make sure we don't end up with differences in our different
testing methods. We may switch out the failure allowances later (maybe
just jest will be good enough and we can let phantom fail for a little
bit).
2015-01-27 18:04:58 -08:00
Sebastian Markbage 6c145c31f5 Add Basic TypeScript Class Test
As part of the new class effort it is now possible to define React
Components using any type of generic JavaScript class syntax.

This includes TypeScript classes. This test ensures that we don't regress
that support, and also serves as an example for using React in TypeScript.
TypeScript provides a good demo of where we think property initializers
are going.

We don't have any official *type* support for TypeScript yet.

This test trails the ReactES6Class-test file. Some manual tweaking is
required when converting tests.
2015-01-26 16:59:11 -08:00
Sebastian Markbage 5f150822e6 Add CoffeeScript Class Test
As part of the new class effort it is now possible to define React
Components using any type of generic JavaScript class syntax.

This includes CoffeeScript. This test ensures that we don't regress that
support, and also serves as an example for using React in CoffeeScript.

This test fail trails the ReactES6Class-test file. Some manual tweaking is
required when converting tests.
2015-01-26 02:19:35 -08:00
Paul O’Shannessy 4b2e89dd99 Add `npm run build`
It's a "shortcut" to `grunt build`
2015-01-21 17:23:36 -08:00
Paul O’Shannessy deae575dae v0.13.0-alpha.2 2015-01-16 10:33:42 -08:00
Paul O’Shannessy 588032da51 Update package deps 2015-01-16 10:33:42 -08:00
Paul O’Shannessy 3f8d4eaa63 Use eslint
These rules are very close to what we have internally. We may still miss
a couple things (jsdoc params being a big one) but it's good enough.
This is also more restrictive than what we enforce internally, but it's
for the best.
2015-01-13 14:01:34 -08:00
ShihChi Huang f214776a97 use bundle-collapser to reduce browserified file size 2014-12-30 23:16:04 -08:00
Paul O’Shannessy 3fec78638d v0.13.0-alpha.1
Bumping version numbers so we can push to npm.
2014-12-23 12:04:23 -08:00
Paul O’Shannessy 401d4dd108 Update NPM dependencies
This was mostly to update Jest, but the others were the safe ones from
`npm outdated --depth=0`
2014-12-16 14:17:10 -08:00
Paul O’Shannessy 3ce88d7c17 Use jest for `npm test`
I've given in and this is easier than `npm run jest`. `grunt test` still
exists and is used by Travis so this has no CI implications.
2014-11-25 15:07:46 -08:00
Gabe Levi 0d308add09 Update stripTypes transform to use fixed up jstransform transform 2014-11-14 18:25:11 -08:00
Andres Suarez bf0a857a92 Remove esprima-fb and use Syntax from jstransform 2014-11-04 17:10:12 -05:00
Zacharias c260c45db3 Update jstransform version to ^7.0.0 2014-10-28 13:48:48 +01:00
Paul O’Shannessy b78fe39b60 Bump version to 0.13.0-alpha 2014-10-22 14:19:54 -07:00
Paul O’Shannessy 2b4e35870b v0.12.0-rc1 2014-10-16 14:56:50 -07:00
Paul O’Shannessy d03d49101b browserify update 2014-10-14 22:40:28 -07:00
Paul O’Shannessy 67307ce850 Update dependencies, removed unused ones
Also picked up a bit of JSON reformatting, presumably from npm >= 2

Test plan: build, run tests
2014-10-14 16:18:20 -07:00
Paul O’Shannessy dcf415c2b9 BSD + PATENTS 2014-10-10 13:34:07 -07:00
Paul O’Shannessy 584e6bd648 Ignore .module-cache from jest [skip ci]
I hit a case where running jest was including files from the module
cache. I don't think that should have happened, but this works.
2014-09-11 15:28:20 -07:00
jeffmo bcc291b591 Bump esprima + jstransform versions 2014-09-05 15:42:07 -04:00
Ben Alpert 1ba022b1ea Include vendor/ when running jest tests
Now the two transform tests get run alongside the React core tests.

Test Plan: jest
2014-08-30 01:08:57 -07:00
Paul O’Shannessy 4d9a2c4a29 Make `npm run-script jest` available
This is slightly shorter than typing `./node_modules/.bin/jest`.
2014-08-20 11:48:01 -07:00
Paul O’Shannessy 32d3f79dc5 Upgrade Commoner
It no longer parses @providesModule directives by default.

Fixes #1145
2014-08-18 15:12:39 -07:00
Paul O’Shannessy d7f21d760b Update recast to 0.6, update constants.js
I dropped the part of constants.js that we weren't using (namely the
part where we insert constants) but left it open to do that. It should
be trivial, we just aren't using it.

Fixes #1824
2014-08-14 11:14:20 -07:00
Paul O’Shannessy 5bfee601ce Bump version for 0.12.0-alpha
[skip ci]
2014-07-17 14:22:50 -07:00
Paul O’Shannessy 5f77e6dc51 Upgrade commoner dependency
0.9.5 depended on Node 0.11+, so make sure we don't ever get that.
See https://github.com/reactjs/commoner/pull/65
2014-07-17 12:59:53 -07:00
Paul O’Shannessy 0f9cec2e78 0.11.0-rc1 2014-07-12 19:50:45 -07:00
Paul O’Shannessy 87c8e69fca Bump dependencies that are known safe
Most of these would have been installed anyway, just making sure what
got shrinkwrapped is what others would experience.
2014-07-12 19:09:00 -07:00
Paul O’Shannessy 5c85f33184 Custom readme for react-tools
Of course this means I can no longer just npm publish from the project
root, but I haven't been anyway.
2014-07-03 17:39:33 -07:00
Paul O’Shannessy 676aac13d0 Update npm dependencies [skip ci] 2014-07-03 09:57:12 -07:00
Paul O’Shannessy 7f757347bc Update many npm dependencies
Sauce/connect related things need some more work and I didn't want to
figure those out right now.

Fixes #1701
2014-06-17 14:21:24 -07:00
Ben Alpert e60a893d2f Bump esprima-fb and jstransform versions
Fixes #1584, fixes #1475.
2014-05-22 20:16:37 -07:00
Ben Alpert 2d26451821 Add configuration for running tests with Jest
Can be run with `node_modules/.bin/jest` for now; didn't want to disturb the grunt setup.

Right now one test fails with:

```
 FAIL  browser/ui/__tests__/ReactDOMComponent-test.js (1.423s)
● ReactDOMComponent › updateDOM › it should update styles when mutating style object
  - Expected: '0' toEqual: '0.5'
        at Spec.<anonymous> (src/browser/ui/__tests__/ReactDOMComponent-test.js:99:33)
```

which I can only assume is a jsdom problem -- no other asserts fail.
2014-05-19 16:58:33 -07:00
jeffmo a7c3dc8b08 Bump jstransform dependency to point at 4.0.1 or higher 2014-04-26 15:34:40 -07:00
Paul O’Shannessy 4ed9e22a44 Upgrade jstransform to 4.0
Also enables the object-concise-method transform for --harmony

closes #1438
2014-04-23 16:36:45 -07:00
Cheng Lou e9c00b1bae Remove grunt-complexity
The report itself is more or less useful because it detects stuff like
big objects (e.g. CSSProperty) as being too complicated. Furthermore, afaik
nobody refactors the code based on what the report says =).
2014-04-16 11:52:25 -07:00
Paul O’Shannessy f0eae5086b version bump for 0.11 development 2014-03-21 14:58:52 -07:00
Ben Newman 7807413256 Upgrade Commoner to v0.9.2 to silence deprecation warnings.
Closes #1278.
2014-03-20 14:43:47 -04:00
Paul O’Shannessy 7f24943e5a update version for 0.10rc 2014-03-18 22:09:32 -07:00
Paul O’Shannessy 55b0222596 Upgrade browserify 2014-03-18 21:33:39 -07:00
Paul O’Shannessy 8d495f3b6e Revert "Merge pull request #1234 from RReverser/pure-cjs"
This reverts commit 7987e6a51d, reversing
changes made to d88d479685.
2014-03-18 11:25:21 -07:00
Ingvar Stepanyan 9e224e615f Renamed `browserify` tasks/configs to `cjs`, updated pure-cjs to 1.9.0 for better build speed. 2014-03-11 13:26:36 +02:00
Ingvar Stepanyan 3171436d97 Switched from browserify to pure-cjs bundler.
Optimizations and fix for JSXTransformer build.
Dropped dependency on emulation of Node.js native modules.
Added deamdify step for JSXTransformer build.
2014-03-08 16:33:58 +02:00
jeffmo a4d6796705 Add support for `npm test` 2014-02-20 13:10:05 -08:00
Paul O’Shannessy 95edc396df version bump to 0.10.0-alpha 2014-02-19 22:53:29 -08:00
Paul O’Shannessy e59daa8ed8 Add descriptions to package.jsons
Otherwise, npm just reads the first non-header of our readmes, which doesn't
match up accurately or cleanly (no markdown parsing).
2014-02-19 11:35:11 -08:00
Paul O’Shannessy c79974db3a Merge pull request #1122 from spicyj/gh-1120
Strip calls to warning() in __DEV__
2014-02-17 19:44:53 -08:00
Ben Alpert 5795376961 Strip calls to warning() in __DEV__
Fixes #1120.
2014-02-17 19:01:45 -08:00
Andrey Popp 39c9b539e9 Update envify to 1.2.0 2014-02-18 03:38:58 +04:00
Paul O’Shannessy 9125f68194 0.9.0-rc1 2014-02-16 17:38:52 -08:00
Paul O’Shannessy 3e77f64141 Merge pull request #1097 from spicyj/es3ify
Run es3ify over unminified builds
2014-02-16 12:49:16 -08:00
Ben Newman 1e7bdc79e1 Upgrade Commoner dependency to v0.9.1 to fix mkdirP bug. 2014-02-15 20:49:17 -05:00
Ben Alpert e87c8a2aa4 Run es3ify over unminified builds
Makes no difference to react.js and react-with-addons.js; quotes .static in four
places for JSXTransformer.js:

https://gist.github.com/spicyj/aada5352e813752a4667
2014-02-15 16:32:36 -08:00
JeffMo adcbf0806c Sync out transforms from fb internal 2014-02-15 12:35:32 -08:00
Paul O’Shannessy d00b11ef03 Remove React from react-tools package
All of this is provided by the react package now, so there's no point in having
it available in multiple places. We *may* go back on that in the future for
shipping test utils, but for the time being, this is better for all.
2014-02-07 13:59:19 -08:00
Ben Newman 9f1ed709d0 Revert "Switched from browserify to pure-cjs bundler."
This reverts commit bff9731b66.
2014-02-03 19:05:22 -05:00
Ben Newman 77c53dd5d4 Revert "More optimizations and fix for JSXTransformer build"
This reverts commit f1b7db9aef.
2014-02-03 19:05:15 -05:00
Ingvar Stepanyan f1b7db9aef More optimizations and fix for JSXTransformer build
* Dropped dependency on emulation of Node.js native modules.
* Added deamdify step for JSXTransformer build.
2014-01-31 21:53:08 +02:00
Ingvar Stepanyan bff9731b66 Switched from browserify to pure-cjs bundler. 2014-01-31 18:25:09 +02:00
Ben Newman 933681b42c Upgrade Commoner to v0.9.0 to get rid of output directory locking.
Closes #957.
2014-01-27 19:07:00 -08:00