18 Commits

Author SHA1 Message Date
Justin Spahr-Summers
1487ebfe01 Revert packager randomization revert 2015-09-25 10:24:06 -07:00
Justin Spahr-Summers
e2fdd59784 Revert packager module randomization 2015-09-25 07:41:25 -07:00
Amjad Masad
9293e54085 Warn and randomize colliding name selection
Summary: @​public

The issue of colliding haste modules have came up many times and have wasted countless engineering hours. This will start warning about it and will also start selecting modules at random so that people don't depend on undefined behavior.

Additionally, this surfaced an issue where with assets we may fatally throw if the directory doesn't exist. This is fixed by checking the existence of the directory before trying to match files in it.

Reviewed By: @jingc

Differential Revision: D2478480
2015-09-25 00:19:27 -07:00
Christoph Pojer
fa01b2e4cb Codemod tests to use top-level-requires
Reviewed By: @DmitrySoshnikov

Differential Revision: D2456250
2015-09-19 15:41:29 -07:00
Amjad Masad
3ee65225be Protect against races in deleting corrupt cache
Reviewed By: @cpojer

Differential Revision: D2426450
2015-09-09 16:05:39 -07:00
Christopher Chedeau
d3800c6615 Fix declareOpts test
Summary: When we updated joi, the error message was changed. I removed the content to prevent similar errors in the future.

Reviewed By: @amasad

Differential Revision: D2424048
2015-09-09 11:25:28 -07:00
Christopher Chedeau
c71c940803 Revert "unbreak tests"
This reverts commit f9b2709c8d39b1ec6f729d315855f05d427ab75b.
2015-09-09 11:10:50 -07:00
Christopher Chedeau
f9b2709c8d unbreak tests 2015-09-08 20:00:42 -07:00
Amjad Masad
936e1d4a11 [react-packager] Support platform extensions in image requires
Summary:
We don't currently support platform extensions in asset modules.
This adds supports for it:

```
require('./a.png');
```

Will require 'a.ios.png' if it exists and 'a.png' if it doesn't.
2015-09-04 15:17:14 -08:00
Amjad Masad
b17b328aed [react-packager] Fix cache issues 2015-09-01 16:43:17 -08:00
Martín Bigio
7fed668841 [react-packager] Cache BundlesLayout 2015-08-31 07:13:35 -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
Amjad Masad
b4c82a4089 [react-packager] Additional data to asset modules 2015-04-22 10:59:37 -08:00
Amjad Masad
fb7036eaac [react-packager] implement /assets endpoint to serve assets 2015-04-16 13:00:48 -08:00
Christopher Chedeau
f67a36733f [ReactNative] Expanded license on js packager files 2015-03-23 11:28:51 -08:00
Amjad Masad
78d03b89b7 [react-packager] Make dev a query param option 2015-03-04 21:24:08 -08:00
Amjad Masad
96312af117 [react-packager] Fix lint errors 2015-02-25 20:29:42 -08:00
Amjad Masad
f426ec8d7d [react-packager] Cleanup option passing and validation 2015-02-24 15:17:40 -08:00