Commit Graph

60 Commits

Author SHA1 Message Date
Amjad Masad ed3aaadc39 [react-packager] Add more information to deprecated asset requires 2015-04-17 15:14:13 -08:00
James Ide a68cc06f0b [Errors] Fix Red Box by fixing providesModule parsing
Summary:
cc @amasad

An error occurred while trying to display the Red Box since loadSourceMap was not included in the JS
bundle. This is because node-haste was treating its docblock as a multiline directive which doesn't make sense for `@providesModule`.

In loadSourceMap.js's case, the directive's value was parsed as "loadSourceMap -- disabled flow due to mysterious validation errors --".

There are two fixes: add a newline under the `@providesModule` directive, and change the module ID code to look at only the first token of the directive. I opted for the latter so we avoid this class of bugs entirely and AFAIK it's nonsensical to have multiple `@providesModule` values anyway.

Closes https://github.com/facebook/react-native/pull/866
Github Author: James Ide <ide@jameside.com>

Test Plan:  Run the packager, trigger an error in an app, see the red box now show up again.
2015-04-17 09:45:35 -08:00
Peter Cottle 83ee7ad9dd [ReactNative|Easy] Change watchman too-long error message
Summary:
@wez Mentioned this in Issue #239 -- right now when watchman takes too long we recommend you run `watchman` from your terminal which actually expects some arguments, so it prints out the following:

```
[pcottle:~/Desktop/react-native:changeErrorMessage]$ watchman
{
    "error": "invalid command (expected an array with some elements!)",
    "cli_validated": true,
    "version": "3.0.0"
}
```

basically this ends up being more confusing since the command we recommend you run errors out, so lets change it to `watchman version` which at least exists cleanly.

I kept the troubleshooting link as https://facebook.github.io/watchman/docs/troubleshooting.html since it sounds like we will update that with the issue people run into in #239
Closes https://github.com/facebook/react-native/pull/825
Github Author: Peter Cottle <pcottle@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-17 09:16:22 -08:00
Amjad Masad 2fabfdae11 [react-packager] Add asset extensions to file watch glob in the project root 2015-04-17 09:03:41 -08:00
Tadeu Zagallo 4b52f2eacc [ReactNative] Send batched calls from objc to js every frame + add bridge profiling 2015-04-17 04:01:02 -08:00
Amjad Masad f45d032659 [react-packager] Remove links to internal wiki 2015-04-16 13:14:41 -08:00
Amjad Masad 852f8533a1 [react-packager] implement /assets endpoint to serve assets 2015-04-16 13:00:48 -08:00
Amjad Masad a998049c08 [react-packager] Add Array.prototype.es6 polyfill 2015-04-14 15:15:53 -08:00
Amjad Masad 4a3e69ec74 [react-packager] Support @nx resolution postfix for assets 2015-04-14 10:43:39 -08:00
Tim Yung 39da8034dd React Native: Add String.prototyp.es6 Polyfill 2015-04-13 13:25:35 -08:00
Amjad Masad 4b9ec6c5f7 [react-packager] Correct module extension regexp 2015-04-09 12:07:23 -08:00
Amjad Masad 21f1497418 [react-packager] Implement the browser field package.json spec 2015-04-09 11:59:48 -08:00
Amjad Masad 408160de7d [react-packager] Don't depend on error.stack being available 2015-04-08 14:23:18 -08:00
Amjad Masad f88167157c [react-packager] Implement new style asset packaging (with dimensions) 2015-04-08 13:11:21 -08:00
Spencer Ahrens 061de15c1c [ReactNative] Do flow check when running packager 2015-04-07 21:40:05 -08:00
Amjad Masad 31e0018c1c [react-packager] Deprecate global image namespace in favor of CommonJS resolution 2015-04-03 17:19:10 -08:00
Amjad Masad e22b4e000b [react-packager] Don't cache rejected promise 2015-04-03 15:47:26 -08:00
Pilwon Huh d476461120 react-packager: Add ES6 import statement support to DependencyGraph.
Summary:
This PR teaches packager's `DependencyGraph` how to extract dependencies written with ES6 `import` statements.

It fixes the issue where you are not able to write your app with ES6 `import` statements when your custom transformer (replacing the default [JSTransform](https://github.com/facebook/jstransform), for example, [babel](http://babeljs.io/)) already supports the ES6 `import` syntax.

It will also be useful for [JSTransform](https://github.com/facebook/jstransform) later on once it implements `import` feature too.
Closes https://github.com/facebook/react-native/pull/386
Github Author: Pilwon Huh <pilwon@gmail.com>

Test Plan: runJestTests.sh
2015-04-03 11:40:54 -08:00
Amjad Masad bedd4029c8 [react-packager] Ignore dotfiles in file watching 2015-04-02 06:11:16 -08:00
Jacob Gable ab9f78496f Do not expose define references in require polyfill
Summary:
See #406

Made sure the jest tests pass but didn't know a good unit test to add for this.
Closes https://github.com/facebook/react-native/pull/427
Github Author: Jacob Gable <jacob.gable@gmail.com>

Test Plan:
* ./runJestTests
* start app and click around
2015-03-31 22:32:39 -08:00
Pilwon Huh 7f6255b16f [react-packager] Switch from Q to Bluebird as promises library
Summary:
This PR improves performance of `react-packager` by switching the promises library from the [Q](https://github.com/kriskowal/q) to [Bluebird](https://github.com/petkaantonov/bluebird).

[Here is the test result](https://github.com/facebook/react-native/issues/361#issuecomment-87829808) showing a noticeable difference. (2x speed improvement)

Please refer to [this issue](https://github.com/facebook/react-native/issues/361) for more details.
Closes https://github.com/facebook/react-native/pull/516
Github Author: Pilwon Huh <pilwon@gmail.com>

Test Plan:
./runJestTests
start app and click around
2015-03-31 21:24:13 -08:00
Amjad Masad 69ae1bb3b7 [react-packager] Fix EISDIR error 2015-03-31 19:49:05 -08:00
daviskoh 28a0a2586d Bugfix/require module regexp
Summary:
Resolves https://github.com/facebook/react-native/issues/316. Also updated the spec for the Haste Dependency Resolver. Not sure if these changes are the ones desired so feedback would be welcome!
Closes https://github.com/facebook/react-native/pull/368
Github Author: daviskoh <koh.davis.0@gmail.com>

Test Plan: ./runJestTests
2015-03-31 17:37:39 -08:00
Amjad Masad e306f4e8d5 [react-packager] Inherit from Error correctly 2015-03-27 21:47:19 -08:00
Amjad Masad 4a67c84426 [react-packager] Watch asset roots for changes to update dependency graph 2015-03-27 09:18:00 -08:00
Amjad Masad b2eba1072b [react-packager] Fix node v0.11.14 query parse bug 2015-03-26 14:33:33 -08:00
Amjad Masad f68c24069e [react-packager] better error when main file not found 2015-03-26 10:38:50 -08:00
Amjad Masad ec1b9ec735 [react-packager] kill non-standard RAW_SOURCE_MAP 2015-03-24 17:17:02 -08:00
Amjad Masad bef3d46cee [react-packager] Fix more issues with node modules 2015-03-24 16:07:56 -08:00
Amjad Masad fc92348d8b [react-packager] Fix regression with transform errors 2015-03-23 18:55:36 -08:00
Alex Kotliarskyi 7e2b9bfd77 [ReactNative] Remove `arc build` instructions from require 2015-03-23 17:18:19 -08:00
Amjad Masad 81634084bc [react-packager] Default to index.js from main if it's a dir 2015-03-23 14:55:52 -08:00
Christopher Chedeau a2c32d4d29 [ReactNative] Expanded license on js packager files 2015-03-23 11:28:51 -08:00
Amjad Masad 375797ae36 [react-packager] Pick up package changes while running 2015-03-23 11:15:52 -08:00
Amjad Masad 01c8933949 [react-packager] Allow entry point extensions like .ios.js 2015-03-20 17:24:51 -08:00
Amjad Masad 2e2f3b3d9b [react-packager] Hash cache file name information to avoid long names 2015-03-19 16:40:35 -08:00
Amjad Masad 566a177464 [react-packager] Fix OOM 2015-03-19 11:50:27 -08:00
Amjad Masad ace7e3613f [react-packager] Add assetRoots option 2015-03-18 18:26:35 -08:00
Martin Kosiba 8a1b71c287 [react_native] JS files from D1919491: Improve JS logging 2015-03-18 07:30:18 -08:00
Amjad Masad be992c90e9 [react-packager] small fixes to image loader 2015-03-16 14:45:40 -08:00
Christopher Chedeau 6dfa8c0e4d [ReactNative] Fix File Watcher test 2015-03-14 16:50:54 -08:00
Amjad Masad d2cf0de12e [react-packager] Implement image loading i.e. ix('img') -> require('image!img'); 2015-03-13 16:10:58 -08:00
Amjad Masad 7874698b6b [react-packager] onchange endpoint that informs of changes 2015-03-06 15:28:32 -08:00
Amjad Masad 50220f1384 [react-packager] dev option needs to default to true for backwards compat 2015-03-06 14:45:23 -08:00
Amjad Masad 3d92dd422c [react-packager] Add minify option as query param 2015-03-05 12:12:42 -08:00
Amjad Masad a4d041ce62 [react-packager] Make dev a query param option 2015-03-04 21:24:08 -08:00
Amjad Masad 5bd8155f0b [react-packager] Start converting options to query params 2015-03-04 19:06:51 -08:00
Amjad Masad 41743e5987 [react-packager] Recover and warn from corrupted cache file 2015-03-03 17:49:42 -08:00
Amjad Masad 37cab152b5 [react-packager] check-in node_modules and update tests 2015-03-03 02:02:51 -08:00
Amjad Masad c289844144 [react-packager] Implement bundle minification 2015-03-02 23:19:41 -08:00