Commit Graph

276 Commits

Author SHA1 Message Date
Amjad Masad b05ca45244 [react-packager] Use gracful-fs to avoid EMFILE errors
Summary:
@public
Currently, every time we call into the packager we have to change the ulimit to make sure
we don't hit the EMFILE error (the packager uses as much concurrency as possible).

Using graceful-fs, the fs module -- with monkey patching -- becomes intelligent enough to recover
from EMFILE errors.

Test Plan:
* set `ulimit -n 256*
* start server
* request from your browser: http://localhost:8081/RKJSModules/MainBundle/CatalystBundle.includeRequire.bundle
* it works
2015-05-05 14:30:43 -08:00
Evgen Filatov acd777a906 Fixed name of Chome window, Connects to #297
Summary:
Hi!

I have the same problem as described here https://github.com/facebook/react-native/issues/297
It could occurs after restarting `packager.sh` or `debuger-ui` page.

I found simple solution that works for me, but I am not 100% sure it will works for any user with this problem.

How could this be tested automatically?
Closes https://github.com/facebook/react-native/pull/1101
Github Author: Evgen Filatov <evgen.filatov@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-05 14:10:13 -08:00
Alex Kotliarskyi 3e5308274e Updates from Tue 5 May 2015-05-05 14:15:51 -07:00
Spencer Ahrens 95a120b663 [ReactNative] improve console logging a little bit 2015-05-04 18:57:03 -08:00
Amjad Masad 830646529a [react-packager] Combine source maps coming from transformer
Summary:
@public
Fixes [#393](https://github.com/facebook/react-native/issues/393). Currently the transformer assumes line-preserving compilers and defaults to a super-fast source map generation process. However, we need to support compilers that aren't preserving lines.
I had feared this wuold slow down the server but I came about a little known peace of the spec that defines an "indexed source map" just for the purpose of concating files: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

Test Plan:
1. runJestTests.sh
2. run server and click around example apps
3. add a custom transporter like babel
4. add a custom file and a debugger statement
5. debug in chrome and make sure it works

redbox still works
2015-05-01 16:59:14 -08:00
Ben Alpert ff53859b52 Updates from Wed 29 Apr 2015-04-29 18:55:07 -07:00
Tim Yung 0fde2c2583 JS: Use Object.defineProperty for Array Polyfills 2015-04-28 15:56:40 -08:00
Alex Kotliarskyi fca69ad9d5 [ReactNative] Bump watchman timeout to 25s 2015-04-27 19:30:02 -08:00
Spencer Ahrens 876f1084af [ReactNative] temp disable flow check in packager for OSS 2015-04-27 19:13:33 -08:00
Spencer Ahrens 09f6ad84fe temporarily disable flow check in packager while we figure out versioning issues.
cc @gabelevi, @bhosmer
2015-04-27 16:13:47 -07:00
Alex Kotliarskyi 3a012f5d46 [ReactNative] Fix reloading in debug mode sometimes crashes packager 2015-04-24 15:07:57 -08:00
Spencer Ahrens 02aba9adee Updates from Fri 24 Apr 2015-04-24 11:46:18 -07:00
Alex Kotliarskyi 04da81d4d5 [ReactNative] Fix launchEditor script 2015-04-24 10:31:56 -08:00
Kevin Gozali 2115b67bd9 [ReactNative][madman] Reverted D2014357 2015-04-23 16:04:16 -08:00
Philipp von Weitershausen 0b3ca1c53e [ReactNative] Back out D2014163 entirely 2015-04-23 12:02:47 -08:00
Amjad Masad f635db3b6d [react-packager] Change uri to name 2015-04-23 11:52:00 -08:00
Amjad Masad 91b320cf35 [react-packager] Fix jest tests 2015-04-23 11:39:41 -08:00
Philipp von Weitershausen 240424714e [ReactNative] Disable console.error => redboxes to unwedge Android 2015-04-23 09:56:15 -08:00
Alex Kotliarskyi 98c10d72d2 [ReactNative] Backport packager logs redirect 2015-04-22 16:28:54 -08:00
Spencer Ahrens 4e96edb8b1 [ReactNative] console.error shows RedBox with pretty stack trace 2015-04-22 15:51:41 -08:00
Amjad Masad d4b5f2e514 [react-packager] Additional data to asset modules 2015-04-22 10:59:37 -08:00
Amjad Masad 749c81842c [react-packager] Add jpe?g to asset extensions 2015-04-21 11:06:01 -08:00
Amjad Masad 2645ffb69a [react-packager] bump watchman watch timeout to 10 seconds 2015-04-21 10:59:29 -08:00
Amjad Masad f91f7084ec [react-packager] Allow json files as modules 2015-04-21 10:51:15 -08:00
Amjad Masad 201d65dead [react-packager] Implement Packager::getAssets 2015-04-20 16:01:15 -08:00
Alex Kotliarskyi 10cd77b533 [ReactNative] Fix Chrome debugger 2015-04-20 14:37:24 -08:00
Tadeu Zagallo d108061db3 [ReactNative] Update method name on chrome debugger 2015-04-20 12:04:52 -08:00
Alex Kotliarskyi 259894046c [ReactNative] Skip flow checks for URLs that are not bundles 2015-04-20 11:52:07 -08:00
Alex Kotliarskyi 2d258f4fa0 Print server logs from e2e tests 2015-04-18 20:56:12 -07:00
Alex Kotliarskyi f7e2e4114b [ReactNative] Dim packager output 2015-04-17 16:12:25 -08:00
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
Christopher Chedeau 6911c1f9c3 Updates from Fri 17 Apr 2015-04-17 08:42:57 -07: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
Christopher Chedeau cfb38b1ece Merge branch 'oss-sync/master' into HEAD 2015-04-14 18:16:23 -07: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
Philipp von Weitershausen 241e263e5e [ReactNative] allow running JS app server for Android from fbobjc 2015-04-14 10:28:07 -08:00
Tim Yung 39da8034dd React Native: Add String.prototyp.es6 Polyfill 2015-04-13 13:25:35 -08:00
Amjad Masad 81077c8560 Updates from Fri 10 Apr
- Implemented response headers when using `XMLHttpRequest` | Nick Lockwood
- [ReactNative] Don't redbox on flow config errors | Spencer Ahrens
- [ReactNative] Fix suggestions in TextInput when setting value prop | Spencer Ahrens
- Link LinkingIOS in SampleApp | Nick Lockwood
- unify use of password and secureTextEntry for TextInput | Nick Lockwood
- Added random js queue+execution time sampling in react native | Bryce Redd
- [react_native] JS files from D1980312:     [react_native] Fix webview | Andrei Coman
- [react-packager] Correct module extension regexp | Amjad Masad
- [react-packager] Implement the browser field package.json spec | Amjad Masad
- [ReactNative] Bring back crash reporting | Alex Kotliarskyi
- Remove duplicate word | Nick Lockwood
- NavigatorIOS navigationBarHidden property support | Nick Lockwood
- [Scroll] Include content insets in scroll events | Nick Lockwood
2015-04-10 01:33:10 -07:00
Spencer Ahrens 4d9f4301ec [ReactNative] Don't redbox on flow config errors 2015-04-09 17:37:13 -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
Christopher Chedeau dddf121b64 Unbreak fatal 2015-04-09 09:32:07 -07:00
Christopher Chedeau caa89c36f0 Updates from Thu 9 Apr
- [React Native] Fix RCTText crashes | Alex Akers
- Ensure that NSLocationWhenInUseUsageDescription is set, throw error if not | Alex Kotliarskyi
- [ReactNative] fix exception handler method name | Spencer Ahrens
- [ReactNative] Re-configure horizontal swipe animations | Eric Vicenti
- [ReactNative] <Text>: apply the fontWeight correctly if fontFamily style is also present | Kevin Gozali
- [MAdMan] Dimensions.get('window') considered harmful | Philipp von Weitershausen
- Navigator: Changed transitioner background color to 'transparent' | Eric Vicenti
- [react-native] Listen on all IPv6 interfaces | Ben Alpert
- [react-packager] Don't depend on error.stack being available | Amjad Masad
- [ReactNative] fixup AnimationExperimental a bit | Spencer Ahrens
- [react-packager] Implement new style asset packaging (with dimensions) | Amjad Masad
- [React Native] RCT_EXPORT lvl.2 | Alex Akers
- [react_native] Implement TextInput end editing | Andrei Coman
- [react_native] Make TextInput focus, blur, dismiss and show keyboard work | Andrei Coman
- Added non-class-scanning-based approach fror registering js methods | Nick Lockwood
- [ReactNative] Update package.json | Christopher Chedeau
- [ReactNative] Do flow check when running packager | Spencer Ahrens
- [ReactNative] Fix typo/bug in Navigator._completeTransition | Eric Vicenti
- [ReactNative] Fix Navigator exception when touching during transition | Eric Vicenti
- [ReactNative] Remove bridge retaining cycles | Tadeu Zagallo
- [ReactNative] Fix and re-add WebView executor | Tadeu Zagallo
2015-04-09 08:46:53 -07:00
Ben Alpert c24fc75a53 [react-native] Listen on all IPv6 interfaces 2015-04-08 14:23:52 -08:00