Commit Graph

367 Commits

Author SHA1 Message Date
Cristian Carlesso 7b2080e118 Removing automatically reset modules between test run
Reviewed By: bestander

Differential Revision: D3886125

fbshipit-source-id: c8f47c3466add1e2c89649a1c6f47b01f0d7a89e
2016-09-19 12:43:55 -07:00
David Aurelio b62ed2f291 Add support for module groups to iOS Random Access Bundle format
Summary:
Adds the possibility to specify an array of files (group roots) that are used to bundle modules outside of the “startup section” into bigger groups by colocating their code.
A require call for any grouped module will load all modules in that group.
Files contained by multiple groups are deoptimized (i.e. bundled as individual script)

Reviewed By: martinbigio

Differential Revision: D3841780

fbshipit-source-id: 8d37782792efd66b5f557c7567489f68c9b229d8
2016-09-16 10:13:49 -07:00
Charles Dick 0c157bea36 Move aggrow table header into its own component
Reviewed By: bnham

Differential Revision: D3759285

fbshipit-source-id: befee1f060992ac8049042e4389d944d13bc3ae7
2016-09-16 03:13:44 -07:00
Charles Dick 8af84c6788 logging to jsc heap capture expand contract
Reviewed By: bnham

Differential Revision: D3757560

fbshipit-source-id: 00046797b17c9fa9e37dab597f11d9db7f7bd08a
2016-09-16 02:43:45 -07:00
Charles Dick d2c333acaf name functions in JSC cpu profiles
Reviewed By: bestander

Differential Revision: D3835094

fbshipit-source-id: 164afb7878dde528ee2573e1d499b5e0911662ed
2016-09-15 07:13:37 -07:00
Charles Dick e6bec9cb80 Add option to bundle server to generate full sourcemaps from babel
Reviewed By: bestander

Differential Revision: D3863894

fbshipit-source-id: a282758e022d403743841bc59277196e6741ed18
2016-09-15 06:58:26 -07:00
aleclarsoniv fa6191f6ac Support symlinks-to-symlinks
Summary:
In response to [this comment](https://github.com/facebook/react-native/pull/9009#issuecomment-245322397).

I could be wrong here, but I think Watchman can't handle symlinks, so we need to make sure symlinks-to-symlinks are handled up front.
Closes https://github.com/facebook/react-native/pull/9792

Differential Revision: D3858349

Pulled By: bestander

fbshipit-source-id: f3a34dae90ed9a7004a03158288db5e1932bfc69
2016-09-15 05:28:34 -07:00
Eric Rozell 3dac49a4f5 Update getCommands.js
Summary:
Fixes issue with path for Windows. cc grabbou
Closes https://github.com/facebook/react-native/pull/9898

Differential Revision: D3864923

fbshipit-source-id: e785bfe0f01f9cf0c1964518fed03e2090300a31
2016-09-14 13:43:47 -07:00
Damien f4e3e19f8c Add shorcuts for windows & linux to debugger.html
Summary:
Very simple PR to add the shorcuts for windows/linux to the web debuger interface so it's less mac-centric.

**Test plan**: Open the debugger and see the shorcuts for windows/linux/mac
Closes https://github.com/facebook/react-native/pull/9812

Differential Revision: D3862570

fbshipit-source-id: 54605af66b674d176b3cbbb9efcfa93f84fcd552
2016-09-14 02:58:40 -07:00
David Aurelio 178407da40 add missing method invocation
Reviewed By: bestander

Differential Revision: D3853357

fbshipit-source-id: 0c10b4162438aa8d670522dd1fe5392eb1e6d62f
2016-09-13 03:13:30 -07:00
Philipp von Weitershausen 111ed8d180 Allow rn-cli.config.js to specify the default transformer, again
Summary:
Restores feature introduced in #7961 after it's been paved partially by #7899

**Test Plan:** ran example in https://github.com/philikon/ReactNativify against a React Native with and without this patch
Closes https://github.com/facebook/react-native/pull/9799

Differential Revision: D3852601

Pulled By: mkonicek

fbshipit-source-id: fc3c80bdb254145fefa870eea1828b4ef33f9297
2016-09-12 15:14:01 -07:00
Philipp von Weitershausen 4ab455b37d packager: dedupe symlinks if they point to already covered paths
Summary:
If the packager is already watching `/path/to/MyProject`, and it finds symlinks inside `/path/to/MyProject/node_modules` that point to `/path/to/MyProject/path/to/somewhere/else`, there's no need to add the latter to the project roots.

**Test Plan:** replicate an aforementioned project set-up, and verify that only `/path/to/MyProject` is a project root for the packager, while files in `/path/to/MyProject/path/to/somewhere/else` can still be imported so long as they're part of an npm-style package (e.g. `/path/to/MyProject/path/to/somewhere/else/package.json` exists).
Closes https://github.com/facebook/react-native/pull/9819

Differential Revision: D3852591

Pulled By: mkonicek

fbshipit-source-id: 558ab3f835ee3d2bf6174c31595e242992f75601
2016-09-12 15:14:01 -07:00
Gant db870f8729 Adjust rnpm link to colorize skipped linking steps
Summary:
Sometimes when working with a team of developers, someone adds a library but does not link it. To identify if this required linking, you have to type react-native link and then read a wall of text to see if rnpm handled the issue. This can be sped up with a friendly logging level for previously linked messages.

Continuation of #9507

![image](https://cloud.githubusercontent.com/assets/997157/17908676/119884a2-6947-11e6-8297-818fefed26a0.png)

![image](https://cloud.githubusercontent.com/assets/997157/17908687/1bad1b56-6947-11e6-9cf5-b8eec1f2d6ef.png)
Closes https://github.com/facebook/react-native/pull/9551

Differential Revision: D3821468

Pulled By: bestander

fbshipit-source-id: 3e83bf46454519debdd95cf3d5e8561e3c77364a
2016-09-12 06:28:44 -07:00
Charles Dick 84ce9d9aea add module categorization to jsc heap capture visualization
Reviewed By: bnham

Differential Revision: D3757536

fbshipit-source-id: 87e5d605f7490b00bde741dc5dc7a68428a25b50
2016-09-12 03:13:44 -07:00
kentaromiura 8689b0f21c Adding jest and jest babel preset to the react-native init command
Summary:
Adding jest and its presets to the react-native init command

**Test plan (required)**
run react-native init foo (using `npm link` to use the local `react-native` version)
inside foo there are now a .babelrc file and the package.json is set up as described by
https://facebook.github.io/jest/docs/tutorial-react-native.html#setup
Closes https://github.com/facebook/react-native/pull/9719

Differential Revision: D3843037

Pulled By: bestander

fbshipit-source-id: 004e27ebd3f257a202ed43f378d6fe6cc23ced52
2016-09-09 17:43:42 -07:00
Charles Dick 73d7f36d8f refactor how path and react tree are done in jsc heap capture
Reviewed By: bnham

Differential Revision: D3757510

fbshipit-source-id: dff0f85586ef910b28c3fedf06a5178a2c2b28b2
2016-09-09 09:13:37 -07:00
Philip Nuzhnyy ad0c8e63fc enable versionning in xcode project
Summary:
Current Xcode project does not include settings to enable auto-incrementing build numbers using ```agvtool``` as described [here](https://developer.apple.com/library/ios/qa/qa1827/_index.html). Tools like Fastlane, for example, rely on this for commands like ```increment_build_number```. Having these settings enabled by default ensures that people will have one less thing to worry about setting up CI for RN based projects.
Closes https://github.com/facebook/react-native/pull/9511

Differential Revision: D3841281

Pulled By: javache

fbshipit-source-id: 9b9640edf608efd0835371dbe90a2f51786748af
2016-09-09 04:28:33 -07:00
Radek Czemerys 9289e4f7b2 Android package name validator consistent with docs
Summary:
I removed `$` and `_` (only from the starting substring) as they
cannot be used in creating Android package name according to official
android documentation. Also removed a duplicate function (there is the
same one in `react-native-cli/index.js`). This fixes #7115.
Closes https://github.com/facebook/react-native/pull/7127

Differential Revision: D3841253

Pulled By: mkonicek

fbshipit-source-id: 677c7e4277c783180b04dee57d3ccd509e2b99d3
2016-09-09 04:13:49 -07:00
Alex Kotliarskyi 7398780357 Exit with error code 11 when port is taken
Reviewed By: javache

Differential Revision: D3831703

fbshipit-source-id: ef92cacbc9178b7b661b3a9731dffb97cfc66b7a
2016-09-08 15:58:55 -07:00
Andrew Y. Chen bbd1e455f3 Show a redbox when scripts fail to load
Reviewed By: yungsters

Differential Revision: D3670186

fbshipit-source-id: 1c61b69c74a8f7cc255aa6d7afcdb117205922eb
2016-09-07 13:10:12 -07:00
David Gröger 48ab5eb436 cli run-ios on device
Summary:
At the moment the run-ios command from the react-native cli does only work for simulators.
The pull request adds a new option to the existing command: **"--device 'device-name'" which installs and launches an iOS application on a connected device.**
This makes it easier to build a test environment using react-native for connected devices.

I've tested my code with the following commands:
react-native run-ios --device "Not existing device"
react-native run-ios --device
react-native run-ios --device "name-of-a-simulator"
react-native run-ios --device "name-of-connected-device"

Output of the first three commands:
![example_error_output](https://cloud.githubusercontent.com/assets/9102810/17669443/f53d5948-630d-11e6-9a80-7df2f352c6a3.png)

Additional to the manual command tests i've added a test file 'parseIOSDevicesList-test.js'.

I used **ios-deploy** In order to launch and install the .app-bundle on a connected device.
ios-deploy on github:
Closes https://github.com/facebook/react-native/pull/9414

Differential Revision: D3821638

Pulled By: javache

fbshipit-source-id: c07b7bf25283a966e45613a22ed3184bb1aac714
2016-09-06 08:13:41 -07:00
Christoph Pojer d7fdc448d5 Update to Jest 15
Reviewed By: kassens

Differential Revision: D3805404

fbshipit-source-id: 0aa60cf1be889b306b41876f7b09f4f7f933fcf1
2016-09-02 05:58:34 -07:00
Pieter De Baets 07553d0f1c Update React Native minimum OS version to iOS8
Reviewed By: majak

Differential Revision: D3723143

fbshipit-source-id: 482f9820370b752d937e6df7f74c33d53a0a2e7d
2016-09-01 19:43:47 -07:00
Charles Dick c06c1e1786 Add values to JSC heap capture visualizaion
Reviewed By: bnham

Differential Revision: D3757492

fbshipit-source-id: 2e311878ca773b7d1ec680a2dc6422633f98a3a7
2016-09-01 17:29:05 -07:00
Charles Dick a0f55c9bca Change how values are captured in JSC heap snapshots
Reviewed By: dcaspi

Differential Revision: D3757449

fbshipit-source-id: 9952f7ffb9b725ad3e0e3ca0b13b02d2d469bb95
2016-09-01 17:29:05 -07:00
Mike Grabowski ab8c00e896 Attach origin of a 3rd party command
Summary:
Fixes #9236 as suggested.

<img width="505" alt="screen shot 2016-08-22 at 21 34 44" src="https://cloud.githubusercontent.com/assets/2464966/17868740/701a0ba0-68b0-11e6-87a5-4753d5bec688.png">

(just used dummy plugin that is actually deprecated to show the output)
Closes https://github.com/facebook/react-native/pull/9529

Differential Revision: D3784933

fbshipit-source-id: ee7d6a5b82a51b3dd9fa9e4cbca31bcf14761ae4
2016-08-29 08:43:49 -07:00
Geoffrey Goh e7521a114f Add pre/postunlink
Summary:
An attempt to address https://github.com/facebook/react-native/issues/9156.

cc grabbou Kureev

**Test plan (required)**

1. Added the following to the `package.json` of a `react-native-plugin`

```
  "rnpm": {
    "commands": {
      "preunlink": "node node_modules/react-native-plugin/scripts/preunlink"
      "postunlink": "node node_modules/react-native-plugin/scripts/postunlink"
    }
  }
```

2. Added files, `scripts/preunlink.js` and `scripts/postunlink.js` to the plugin. Each of them simply logs a string to the console.

3. Ran `react-native unlink react-native-plugin` to verify that those logs get printed.
Closes https://github.com/facebook/react-native/pull/9157

Differential Revision: D3749434

fbshipit-source-id: 40b94c9026db4f11e8f5be4a417a0670e8069be6
2016-08-24 10:58:46 -07:00
Gant Laborde c19339783d Reverted commit D3757516
Summary:
Sometimes when working with a team of developers, someone adds a library but does not link it.  To identify if this required linking, you have to type `react-native link` and then read a wall of text to see if rnpm handled the issue.   This can be sped up with a friendly logging level for previously linked messages.

**This PR turns this:**
![screen shot 2016-08-21 at 11 49 07 am](https://cloud.githubusercontent.com/assets/997157/17838588/84223264-6796-11e6-81d2-075d30942a69.png)

**Into this:**
![screen shot 2016-08-21 at 11 52 31 am](https://cloud.githubusercontent.com/assets/997157/17838592/92c2ce64-6796-11e6-884d-e5af8f4c2b5a.png)

Which is a pretty nice experience!   This also helps you quickly identify when 1 thing wasn't linked, at a glance, like so!
![image](https://cloud.githubusercontent.com/assets/997157/17838613/22568c8c-6797-11e6-8e12-c73746ec0eff.png)
Closes https://github.com/facebook/react-native/pull/9507

Differential Revision: D3757516

Pulled By: bestander

fbshipit-source-id: 811436d354383581ca77bdc82665040aac962c06
2016-08-23 09:43:30 -07:00
Gant Laborde 85a2d6a65d Add logging level for RNPM previous linking
Summary:
Sometimes when working with a team of developers, someone adds a library but does not link it.  To identify if this required linking, you have to type `react-native link` and then read a wall of text to see if rnpm handled the issue.   This can be sped up with a friendly logging level for previously linked messages.

**This PR turns this:**
![screen shot 2016-08-21 at 11 49 07 am](https://cloud.githubusercontent.com/assets/997157/17838588/84223264-6796-11e6-81d2-075d30942a69.png)

**Into this:**
![screen shot 2016-08-21 at 11 52 31 am](https://cloud.githubusercontent.com/assets/997157/17838592/92c2ce64-6796-11e6-884d-e5af8f4c2b5a.png)

Which is a pretty nice experience!   This also helps you quickly identify when 1 thing wasn't linked, at a glance, like so!
![image](https://cloud.githubusercontent.com/assets/997157/17838613/22568c8c-6797-11e6-8e12-c73746ec0eff.png)
Closes https://github.com/facebook/react-native/pull/9507

Differential Revision: D3757516

fbshipit-source-id: e4c691824e9318d36f4c1d89673b7e747fb972f1
2016-08-23 07:43:32 -07:00
Mike Grabowski 993cfa1826 Bring back missing android command
Summary:
Fixes #9312

(Sorry for inconvenience, could've been removed by mistake!)

Bonus: projectName can be configured rather than always defaulting to package.json name, not sure if helpful, but just added it since we have a `default` function that makes sense in this case.
Closes https://github.com/facebook/react-native/pull/9525

Differential Revision: D3753610

Pulled By: bestander

fbshipit-source-id: 641872855b9865502f4055910262686edc4b504e
2016-08-23 04:28:36 -07:00
Mike Grabowski 107fc72dab Fixes #9294
Differential Revision: D3752878

fbshipit-source-id: f248082effde9133dd6a9edf8a2f2cfc05279eab
2016-08-22 13:13:42 -07:00
Mike Grabowski 0af640bfae Further RNPM integration
Summary:
This commit removes `rnpm` folder that we left during initial merge to keep the diff cleaner. The `core`, `link` and `install` have now the same directory structure as any other command to make development more natural for all of us.

From most notable differences:
1) the `src` folder is now gone. The new structure should make it easier for people to work with the stuff and also move us closer to 100% rnpm integration,
2) There's also no `package.json` present in any of the `rnpm` packages, since they are no longer standalone modules,
3) There's no `bugs.url` in link.js since main package.json of React doesn't specify it. Decided to hardcode it to facebook/react-native since it's really unlikely to change. If one would prefer to use pkg.bugs.url as before, a separate PR modifying package.json should be sent.
Closes https://github.com/facebook/react-native/pull/9509

Differential Revision: D3751115

fbshipit-source-id: 74ae8330f7634df0887ad676808f47eee4b8de85
2016-08-22 08:58:37 -07:00
Gant Laborde 1b6e67e991 Present perfect continuous matches plural
Summary:
This isn't a big deal, just saw it and submitted a PR.

https://www.englishforums.com/English/HasBeenVSHaveBeen/zzbx/post.htm
Closes https://github.com/facebook/react-native/pull/9508

Differential Revision: D3749803

fbshipit-source-id: c234ae102af055ecabcedae2e483441e26284516
2016-08-21 20:28:34 -07:00
Geoffrey Goh f31b6ba953 Fix params patch
Summary:
`this` is a `ReactNativeHost` post RN 0.29, so the current patch doesn't compile. Simply `getResources()` will work for all versions - Post RN 0.29, it will be the method in the outer `MainApplication`, Pre RN 0.29, it will be the method on the `MainActivity`.

grabbou Kureev
Closes https://github.com/facebook/react-native/pull/9381

Differential Revision: D3744162

fbshipit-source-id: 1fa270bb3268b7b40c6160da948d99ff993c83b1
2016-08-19 13:58:34 -07:00
JRK 6f7ade1b0f Add `checkAndroid` back
Summary:
`checkAndroid` has been lost from my last PR. Finally...

[Reminder: https://github.com/facebook/react-native/pull/9190 and https://github.com/facebook/react-native/pull/9448]

I've created a new PR from this fresh new cloned repository. I think we're done with this one !
Closes https://github.com/facebook/react-native/pull/9457

Differential Revision: D3731997

fbshipit-source-id: 4ec3285bc43093b23517a36fd952e9cfae832e37
2016-08-17 17:43:53 -07:00
Charles Dick 28768a715f add keyboard shortcuts to aggrow
Differential Revision: D3724598

fbshipit-source-id: e744d710ccb49f67101abcdded17085f6e7c8b23
2016-08-17 11:28:31 -07:00
Lukas Piatkowski 3d7fe3e6d3 Mark in Sampling Profiler when the execution is outside of the VM
Differential Revision: D3722907

fbshipit-source-id: c988c3ea2ab33496dc1453e6e54e624d9f295173
2016-08-17 08:28:48 -07:00
Charles Dick 294c70cc63 use string values to get names for JSC heap capture react tree
Reviewed By: dcaspi

Differential Revision: D3723800

fbshipit-source-id: a013525f77484dfb8dc39ced81feee42bccba70d
2016-08-17 08:13:49 -07:00
Charles Dick 348a8078bc dump string values in JSC heap capture
Reviewed By: dcaspi

Differential Revision: D3723764

fbshipit-source-id: 06ca770808a94bb8b567bab36c1729f1e696484e
2016-08-17 08:13:49 -07:00
Charles Dick f2f27d6254 add marked block overhead to JSC heap capture aggrow
Reviewed By: bnham

Differential Revision: D3728678

fbshipit-source-id: 2c17003449dddb0ea68d3f6b097fd7704758cf5f
2016-08-17 03:43:34 -07:00
Charles Dick d54b3b8701 Add react component names to JSC heap capture
Differential Revision: D3709253

fbshipit-source-id: dc158d6a096c3e91baeadbaafbf14904493392aa
2016-08-16 13:58:41 -07:00
Charles Dick 1199c5ade9 Add function name, url, line, column to heap capture
Reviewed By: bnham

Differential Revision: D3703012

fbshipit-source-id: 8e15deeeabe15da2a87a71c2baf0fa72d5bc6568
2016-08-16 06:59:06 -07:00
JRK dd6370fed2 Ask for device when using adb with run-android
Summary:
Sometimes adb see many devices (see: http://puu.sh/qoASz/c13f010dd0.jpg) and it can't `adb reverse` because of that (see: http://puu.sh/qoAR1/8412dfe25a.jpg)

So I've added the possibility to choose a device when you `run-android` your app.

Final result: http://puu.sh/qoB12/329d5c27db.jpg
Closes https://github.com/facebook/react-native/pull/9190

Differential Revision: D3719050

fbshipit-source-id: 269cf8507e067218880aa1e0c0e0e625228e25b5
2016-08-16 00:58:26 -07:00
Adam Miskiewicz 757ab0b936 Add `--config` option to CLI to allow passing a path to an `rn-cli.config.js`
Summary:
Currently we just try to resolve a rn-cli.config.js file by walking up the tree from node_modules/react-native. In non-standard uses of RN, when your copy of RN may not live within node_modules, it's impossible to use rn-cli.config.js. This PR adds a "config" flag to the cli that let's you pass in a path to rn-cli.config.js.

cc ide
Closes https://github.com/facebook/react-native/pull/7883

Differential Revision: D3382823

Pulled By: bestander

fbshipit-source-id: b946f3bb355050fc2fe99273d0e99e441dbed111
2016-08-12 11:58:33 -07:00
Dan Caspi 0cc3b4b079 Fixes to jscProfilerMiddleware
Reviewed By: bnham

Differential Revision: D3691098

fbshipit-source-id: dbadda69ff0b6a8d9d349b33c45234ff4f8c3b65
2016-08-10 06:43:51 -07:00
Jhen f89f09f14c Fix tabs in project.pbxproj of iOS template
Summary:
Should be `tab` instead of `space`.
Closes https://github.com/facebook/react-native/pull/9317

Differential Revision: D3691795

fbshipit-source-id: 812c63d16ab56ed943949026a11dfb172de5e3ed
2016-08-09 13:28:19 -07:00
David Aurelio a5678983bb Fix building without writing a source map
Reviewed By: bestander

Differential Revision: D3690117

fbshipit-source-id: f162352c09c4c2a387a9414dbd7da55b86551ee3
2016-08-09 09:43:26 -07:00
Charles Dick c43c80bd7c fix error handling in react native heap capture server middleware
Reviewed By: bnham

Differential Revision: D3684092

fbshipit-source-id: 1856fa4c04a173e1df49dfe17ebef09a066447e5
2016-08-09 04:28:53 -07:00
David Aurelio 6ead260508 don't use full path to source map in bundles
Summary: This shortens the source map URL to its basename for bundles built via the command line API. This makes builds reproducible across different file system locations.

Reviewed By: michalgr

Differential Revision: D3684263

fbshipit-source-id: 2d5fdb5c5d0aa229f5a85465b2d1919f54e33d55
2016-08-08 18:28:48 -07:00
Charles Dick 54f867f0d6 Process heap capture into trace html
Reviewed By: bestander

Differential Revision: D3642188

fbshipit-source-id: c9a4699b2a0d60eb5961333dec45941085e19324
2016-08-08 04:28:32 -07:00