Commit Graph

20 Commits

Author SHA1 Message Date
Benjamin Woodruff c089eece50 Switch to using comma-dangle: always-multiline
This is a machine-generated codemod, but it's pretty safe since it was
generated by hooking into eslint's own report.

A few files had to be touched up by hand because there were existing
formatting issues with nested arrays/objects:

src/shared/utils/__tests__/OrderedMap-test.js
src/shared/utils/__tests__/Transaction-test.js
src/shared/utils/__tests__/traverseAllChildren-test.js
src/isomorphic/children/__tests__/ReactChildren-test.js
2015-06-02 16:57:26 -07:00
Paul O’Shannessy 02f1626725 Better invariant / warning replacement 2015-05-21 19:20:56 -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
Rick Beerendonk 3e0750a4ad Update copyright headers for 2015 2015-01-31 20:18:25 +01:00
Martin Jul c9fb57feb3 Added missing semicolons identified by using `grunt jshint:project`. 2014-10-23 09:54:13 +02:00
Paul O’Shannessy dcf415c2b9 BSD + PATENTS 2014-10-10 13:34:07 -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 8a47813baa Update copyrights for 2014.
grep -rl 'Copyright 2013 Facebook' static_upstream | xargs perl -pi -w -e s/Copyright 2013 Facebook/Copyright 2013-2014 Facebook/g;'

Not going to check in a script to do this since it will just change every year.
Closes #1006
2014-02-18 17:06:43 -08:00
Ben Alpert 5795376961 Strip calls to warning() in __DEV__
Fixes #1120.
2014-02-17 19:01:45 -08:00
Ben Newman f3a6775098 Upgrade recast dev dependency to v0.5.6.
Paving the way for source maps.
2013-12-17 14:50:36 -05:00
Ben Alpert 277abbfe7b Fix lint error (unused variable) 2013-12-09 12:29:03 -08:00
petehunt 90e2258791 response to code review 2013-12-06 11:56:30 -08:00
petehunt 5466d0a063 first work: __DEV__
fix invariant

Get browserify working

remove dead code elimination step since it is not needed due to minifier

use industry standard NODE_ENV
2013-12-06 11:56:29 -08:00
Ben Newman b61eacd3c5 Explicitly require the assert module in vendor/constants.js. 2013-11-14 13:48:08 -05:00
Ben Newman da717977ed Better comments for vendor/constants.js. 2013-11-13 15:33:10 -05:00
Ben Newman 2b763fc452 Rewrite vendor/constants.js to use require("ast-types").traverse.
Most notably, this new style of transformation gives us access to
this.parent.node, which allows us to avoid replacing identifiers that are
not actually free variables, such as member expression properties.

Closes #496.
2013-11-13 15:33:10 -05:00
Ben Newman adda400602 Make constant propagation smarter about pruning if statements. 2013-09-18 13:33:45 -04:00
petehunt 7053f59ad1 Remove second argument to invariant() 2013-06-23 21:58:59 -07:00
Ben Newman 000928f9dc Use recast.parse and .print for require("vendor/constants").propagate.
This removes the need to pass a callback, which is a nice improvement.
2013-06-17 16:30:32 -04:00
Ben Newman 0f87e8ee87 Rename Woodchipper-related stuff.
No functional changes introduced by this commit.

Renamed:

    woodchipper.js -> constants.js
    Woodchipper -> ConstantVisitor
    debranch -> propagate
2013-06-17 16:21:51 -04:00