Commit Graph

168 Commits

Author SHA1 Message Date
Dmitry Soshnikov 792b2db23c [jest] Update to v0.4.2 2015-05-13 13:24:35 -07:00
Alex Kotliarskyi 320208f4f7 Updates from Fri 8 May 2015-05-08 10:29:59 -07:00
Alex Kotliarskyi c76fb40ec4 [ReactNative] Register assets with AssetRegistry 2015-05-07 17:27:42 -08:00
Alex Kotliarskyi cad5cdef42 Updates from Wed 6 May 2015-05-06 16:08:10 -07:00
Amjad Masad 7362f11c22 [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 57348a4028 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 5df5602f1a Updates from Tue 5 May 2015-05-05 14:15:51 -07:00
Spencer Ahrens 66d2f600dd [ReactNative] improve console logging a little bit 2015-05-04 18:57:03 -08:00
Amjad Masad 43e038887d [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 d8ab648fce Updates from Wed 29 Apr 2015-04-29 18:55:07 -07:00
Tim Yung 43e7e69841 JS: Use Object.defineProperty for Array Polyfills 2015-04-28 15:56:40 -08:00
Alex Kotliarskyi 282a2071ad [ReactNative] Bump watchman timeout to 25s 2015-04-27 19:30:02 -08:00
Spencer Ahrens b94610887c [ReactNative] temp disable flow check in packager for OSS 2015-04-27 19:13:33 -08:00
Spencer Ahrens 469ae1f2ca 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 a1a15bda06 [ReactNative] Fix reloading in debug mode sometimes crashes packager 2015-04-24 15:07:57 -08:00
Alex Kotliarskyi 861c66e587 [ReactNative] Fix launchEditor script 2015-04-24 10:31:56 -08:00
Kevin Gozali 4c9ed22ff6 [ReactNative][madman] Reverted D2014357 2015-04-23 16:04:16 -08:00
Philipp von Weitershausen e88ba1a6a3 [ReactNative] Back out D2014163 entirely 2015-04-23 12:02:47 -08:00
Amjad Masad 24095fcc2d [react-packager] Change uri to name 2015-04-23 11:52:00 -08:00
Amjad Masad 4f89d1f76c [react-packager] Fix jest tests 2015-04-23 11:39:41 -08:00
Philipp von Weitershausen d2dbf4e0ed [ReactNative] Disable console.error => redboxes to unwedge Android 2015-04-23 09:56:15 -08:00
Alex Kotliarskyi b2e8dc9834 [ReactNative] Backport packager logs redirect 2015-04-22 16:28:54 -08:00
Spencer Ahrens e63bfae8f6 [ReactNative] console.error shows RedBox with pretty stack trace 2015-04-22 15:51:41 -08:00
Amjad Masad b4c82a4089 [react-packager] Additional data to asset modules 2015-04-22 10:59:37 -08:00
Amjad Masad 173615ae26 [react-packager] Add jpe?g to asset extensions 2015-04-21 11:06:01 -08:00
Amjad Masad c46c4a0ad4 [react-packager] bump watchman watch timeout to 10 seconds 2015-04-21 10:59:29 -08:00
Amjad Masad 77d908b975 [react-packager] Allow json files as modules 2015-04-21 10:51:15 -08:00
Amjad Masad 82704adead [react-packager] Implement Packager::getAssets 2015-04-20 16:01:15 -08:00
Alex Kotliarskyi a8a1798449 [ReactNative] Fix Chrome debugger 2015-04-20 14:37:24 -08:00
Tadeu Zagallo 0e8bc08d3f [ReactNative] Update method name on chrome debugger 2015-04-20 12:04:52 -08:00
Alex Kotliarskyi 5e2f90a73e [ReactNative] Skip flow checks for URLs that are not bundles 2015-04-20 11:52:07 -08:00
Alex Kotliarskyi f3e7511d2b [ReactNative] Dim packager output 2015-04-17 16:12:25 -08:00
Amjad Masad f1174836d7 [react-packager] Add more information to deprecated asset requires 2015-04-17 15:14:13 -08:00
James Ide 0b6dbdb827 [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 691297ab0d [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 2975f26e80 [react-packager] Add asset extensions to file watch glob in the project root 2015-04-17 09:03:41 -08:00
Tadeu Zagallo 1883ba535c [ReactNative] Send batched calls from objc to js every frame + add bridge profiling 2015-04-17 04:01:02 -08:00
Amjad Masad 642d6cf483 [react-packager] Remove links to internal wiki 2015-04-16 13:14:41 -08:00
Amjad Masad fb7036eaac [react-packager] implement /assets endpoint to serve assets 2015-04-16 13:00:48 -08:00
Amjad Masad 758dd0d376 [react-packager] Add Array.prototype.es6 polyfill 2015-04-14 15:15:53 -08:00
Amjad Masad 5bbb351816 [react-packager] Support @nx resolution postfix for assets 2015-04-14 10:43:39 -08:00
Philipp von Weitershausen 62d7cd643d [ReactNative] allow running JS app server for Android from fbobjc 2015-04-14 10:28:07 -08:00
Tim Yung d135da9193 React Native: Add String.prototyp.es6 Polyfill 2015-04-13 13:25:35 -08:00
Spencer Ahrens 7f9ee949ee [ReactNative] Don't redbox on flow config errors 2015-04-09 17:37:13 -08:00
Amjad Masad 21f45e8899 [react-packager] Correct module extension regexp 2015-04-09 12:07:23 -08:00
Amjad Masad e3ce3d0d84 [react-packager] Implement the browser field package.json spec 2015-04-09 11:59:48 -08:00
Ben Alpert 7a8d39e09c [react-native] Listen on all IPv6 interfaces 2015-04-08 14:23:52 -08:00
Amjad Masad 3d2413a38a [react-packager] Don't depend on error.stack being available 2015-04-08 14:23:18 -08:00
Amjad Masad bd7b9da64a [react-packager] Implement new style asset packaging (with dimensions) 2015-04-08 13:11:21 -08:00
Spencer Ahrens a1ec752019 [ReactNative] Do flow check when running packager 2015-04-07 21:40:05 -08:00
Alex Kotliarskyi f2d08f599b [ReactNative] Better error message for EADDRINUSE 2015-04-07 15:39:36 -08:00
Amjad Masad b6eeb61024 [react-packager] Deprecate global image namespace in favor of CommonJS resolution 2015-04-03 17:19:10 -08:00
Amjad Masad 749f6a69cd [react-packager] Don't cache rejected promise 2015-04-03 15:47:26 -08:00
Pilwon Huh a9af05f8ac 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
Steve Lacy 811a7aa492 Update deps order - core modules first
Summary:
**packager/packager.js**

- Update deps order - node core modules first

The core deps do not get installed, and do not need to be after the dep check.
Closes https://github.com/facebook/react-native/pull/224
Github Author: Steve Lacy <me@slacy.me>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-04-02 17:05:40 -08:00
Amjad Masad b1e502a083 [react-packager] Ignore dotfiles in file watching 2015-04-02 06:11:16 -08:00
Justin Carmony b6503ba431 Packager status page & build validating against it.
Summary:
Creating a packager status page so React can validate a proper packager instance is running on 8081.

See #257 for details on this bug.

The biggest thing in this PR is I have it perform an exit 2 in the build script if the check fails. This will cause the build to fail, they can click on the error and see a nice message. Not sure if there is a way to throw a warning instead.

Also, I broke the bash script into several lines, in the Xcode editor it looks fine but in the source code it looks less than ideal. We might want to break that out into it's own bash script that is called. Let me know if you want to do that.
Closes https://github.com/facebook/react-native/pull/308
Github Author: Justin Carmony <justin@justincarmony.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-31 23:01:04 -08:00
Jacob Gable 63c2f80a7c 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 87599bfcd1 [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 92a6c3e004 [react-packager] Fix EISDIR error 2015-03-31 19:49:05 -08:00
daviskoh 0ca3136371 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
Alex Kotliarskyi 9e931e9d36 [ReactNative] Add few hints in the UI 2015-03-31 16:15:40 -08:00
Amjad Masad c94f7c3656 [React Native] Sync from github 2015-03-27 22:09:11 -08:00
Amjad Masad c2b2d45b79 [react-packager] Inherit from Error correctly 2015-03-27 21:47:19 -08:00
Amjad Masad 7dc411b162 [react-packager] Fix assetRoots when starting in node_modules 2015-03-27 19:08:24 -08:00
Ben Alpert e2b2186aa8 Bump packager version to match GitHub 2015-03-27 11:54:16 -08:00
Amjad Masad a925082d2e [react-packager] Watch asset roots for changes to update dependency graph 2015-03-27 09:18:00 -08:00
Amjad Masad 35589d6f09 [react-packager] move dependencies to root package.json 2015-03-26 21:45:55 -08:00
Amjad Masad 39fe5ec266 [react-packager] Fix node v0.11.14 query parse bug 2015-03-26 14:33:33 -08:00
Kevin Kwok 4a6bcc34eb [CLI] react-native start won't run from dir with spaces
Summary:
Running "react-native start" from /Users/kevin/Dropbox (Personal)/Projects/AwesomeProject/ produces the following error

Error: Cannot find module '/Users/kevin/Dropbox'
    at Function.Module._resolveFilename (module.js:322:15)
    at Function.Module._load (module.js:264:25)
    at Function.Module.runMain (module.js:487:10)
    at startup (node.js:111:16)
    at node.js:809:3
Closes https://github.com/facebook/react-native/pull/214
Github Author: Kevin Kwok <antimatter15@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-26 12:37:27 -08:00
Amjad Masad 031adabd18 [react-packager] better error when main file not found 2015-03-26 10:38:50 -08:00
James Ide d2206d492d [Assets] Allow scripts to override assetRoots
Summary:
The CLI parse was accepting a string but assetRoots should be an array, so split on commas. Tested by specifying a root directory that was at least two folders up (../../stuff).
Closes https://github.com/facebook/react-native/pull/189
Github Author: James Ide <ide@jameside.com>

Test Plan:
* export to open source
* started server passing --assetRoots array
2015-03-26 01:24:08 -08:00
Christopher Chedeau 546d03d8ed [ReactNative] Update package.json to be npm-ready 2015-03-25 18:08:07 -08:00
Amjad Masad 7d8020751d [react-packager] Readme 2015-03-25 15:35:10 -08:00
Amjad Masad 909e393f26 [react-packager] kill non-standard RAW_SOURCE_MAP 2015-03-24 17:17:02 -08:00
Amjad Masad 8b79808a90 [react-packager] Fix more issues with node modules 2015-03-24 16:07:56 -08:00
Amjad Masad bc921916ed [react-packager] Fix regression with transform errors 2015-03-23 18:55:36 -08:00
Alex Kotliarskyi 463a5bc9a4 [ReactNative] Remove `arc build` instructions from require 2015-03-23 17:18:19 -08:00
Amjad Masad 540cb4bb8e [react-packager] Default to index.js from main if it's a dir 2015-03-23 14:55:52 -08:00
Christopher Chedeau f67a36733f [ReactNative] Expanded license on js packager files 2015-03-23 11:28:51 -08:00
Amjad Masad a6b154332b [react-packager] Pick up package changes while running 2015-03-23 11:15:52 -08:00
Alex Kotliarskyi 5023931272 [ReactNative] Print directories packager is serving files from 2015-03-22 22:37:55 -08:00
Alex Kotliarskyi b612741b21 [ReactNative] Move packager/init.sh to GitHub 2015-03-22 20:17:39 -08:00
Amjad Masad ce6354604c [react-packager] Allow entry point extensions like .ios.js 2015-03-20 17:24:51 -08:00
Alex Kotliarskyi 33b46c3ba9 [ReactNative] Adjust packager default root when running from within node_modules 2015-03-20 16:12:57 -08:00
Amjad Masad 258a81388e [react-packager] Make sure projectRoots is converted to an array 2015-03-20 14:09:31 -08:00
Alex Kotliarskyi 6d88898404 [ReactNative] Init script that bootstraps new Xcode project 2015-03-20 13:41:50 -08:00
Amjad Masad c68fc1a976 [react-packager] Hash cache file name information to avoid long names 2015-03-19 16:40:35 -08:00
Amjad Masad 115ad71831 [react-packager] Fix OOM 2015-03-19 11:50:27 -08:00
Alex Kotliarskyi 8dea55618d [ReactNative] Bring Chrome debugger to OSS. Part 2 2015-03-19 11:48:51 -08:00
Christopher Chedeau 737cae8f19 [ReactNative] Remove duplicate package.json with the same name 2015-03-19 09:04:39 -08:00
Amjad Masad 319ea3242a [react-packager] Add assetRoots option 2015-03-18 18:26:35 -08:00
Martin Kosiba 8b2e79dc68 [react_native] JS files from D1919491: Improve JS logging 2015-03-18 07:30:18 -08:00
Amjad Masad d3054788da [react-packager] small fixes to image loader 2015-03-16 14:45:40 -08:00
Christopher Chedeau 8694330d42 [ReactNative] Add website to blacklist 2015-03-15 19:24:56 -08:00
Christopher Chedeau 7fb8bff66b [ReactNative] Fix File Watcher test 2015-03-14 16:50:54 -08:00
Amjad Masad 9249545047 [react-packager] Implement image loading i.e. ix('img') -> require('image!img'); 2015-03-13 16:10:58 -08:00
Amjad Masad eabe9f43c8 [react-packager] package.json cleanup (seperate packager into it's own package) 2015-03-11 17:42:46 -08:00
Ben Alpert b335f88efd [React Native] Update core modules for React 0.13 2015-03-06 17:12:53 -08:00
Amjad Masad c99284bfdf [react-packager] onchange endpoint that informs of changes 2015-03-06 15:28:32 -08:00