Commit Graph

191 Commits

Author SHA1 Message Date
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