Commit Graph
36 Commits
Author SHA1 Message Date
Mike Grabowski 6c4e95c083 Publish
- @react-native-community/[email protected]
2019-02-13 16:01:15 +01:00
Mike Grabowski 6bf3c2a39f chore: use else-if 2019-02-13 15:59:35 +01:00
Mike Grabowski 50aa974767 chore: make the flags appear in the output 2019-02-13 15:46:21 +01:00
Mike Grabowski f6020d2f10 fix: Improve CLI logic 2019-02-13 15:42:27 +01:00
Mike Grabowski 9699388443 fix: use absolute path in init 2019-02-13 15:34:47 +01:00
Mike Grabowski 2d185c72ef Publish
- @react-native-community/[email protected]
 - [email protected]
2019-02-13 15:00:56 +01:00
ifsnow b3c20b9351 Fix: problem on run-android with deviceId (#137)
* fix: problem on run-android with deviceId

* fix: change the logic to find the appropriate apk file

* fix: adding logging message

* fix: added command default value
2019-02-12 15:11:02 +01:00
Kacper Wiszczuk 7b77b36ddb fix: make prettier happy (#161) 2019-02-12 10:53:26 +01:00
Connor Love 6178e05d93 fix: ignore non-nativetargets during ios linking (#123)
* fix: ignore non-nativetargets during ios linking

fixes issue #57

* refactor: reuse variable and reorder array methods

Makes use of the single variable nativeTargetSection and puts filter before map when filtering out non-native targets.
2019-02-11 17:09:37 +01:00
Lucas Bento fb62f9b27d feat: show help when no arguments are provided (#160)
* feat: show help when no arguments are provided

* fix: add unknown command info back

* chore: visual adjustments
2019-02-11 12:20:56 +01:00
Kacper Wiszczuk 72c3dd4282 refactor: use PackageManager and improve init logging (#156)
* refactor: use PackageManager and improve init logging

* fix: review suggestions

* refactor: improve logger once again

* refactor: bold to logs status
2019-02-11 12:11:14 +01:00
Sid Ferreira fb4c39940f chore: use ESM exports where appropriate (#151)
This is an extra for #150 
Fixes exports and tweaks some tests.

The `link`, `linkAssets`, and `linkDependency` where trickier as hell, but we have all tests working.

I suggest take it easy in this review as I'm worried in a "false positive" in tests as there was a LOT of changes.

We need to improve the code coverage for changes like this have smaller chances of failing...
2019-02-07 19:16:24 +01:00
Kacper Wiszczuk d485824105 build: refactor installing packages
* build: refactor installing packages

* chore: revert version change

* fix: review fixes

* fix: review changes and install/uninstall command fixes

* fix: one more review fix
2019-02-06 17:31:47 +01:00
Kacper Wiszczuk 5fa631d2ae refactor: disable logger in tests (#155)
* refactor: disable logger in tests

* fix: review fixes

* fix: implement review suggestion
2019-02-06 16:40:23 +01:00
Sid Ferreira b2a6359a74 refactor: change require to imports (#150)
* refactor(imports): replaces most uses of require by import

* fix: fixes export and revert wrong change

* fix: fix import order

* fix: revert export change

* fix: revert global-cli/index

* fix: typo
2019-02-05 14:06:03 +01:00
Devin Canterberry b7d2c8fe23 fix: xcode 10.2 compatibility for run-ios command (#138)
parse output of simulator list provided by xcode 10.2

In Xcode 10.2, the output of `xcrun simctl list --json devices`
has changed to include a namespace within each version group.
This commit makes a backwards-compatible adjustment to account
for this change in format.

To illustrate:

Before
======

```
{
  "devices": {
    "iOS 10.0": [
      ...
    ]
  }
}
```

After
=====

```
{
  "devices": {
    "com.apple.CoreSimulator.SimRuntime.iOS-10-0": [
      ...
    ]
  }
}
```
2019-02-04 23:12:07 +01:00
Michał Pierzchała 986fc35384 chore: remove npmlog dependency (#149) 2019-02-04 14:26:02 +01:00
Sid Ferreira 486a65a931 refactor: Unify logging (#146)
* refactor(logger): replaces all `console` uses

* refactor(logger): tweaks chalk usage

* fix: remove unused chalk

* fix: remove `chalk.yellow` and unused chalk

* fix: changes some info to error

* fix: revert Debugger changes

* fix: remove pending bold, join outputs
2019-02-04 14:22:30 +01:00
Mike Grabowski 65eff59246 build: update xcode version to 2.0.0 (#147) 2019-02-04 13:16:37 +01:00
Mike Grabowski 2a180e0231 feat: allow setting different React Native path (#144)
* feat: allow setting different React Native path

* fix: remaining flow errors

* feat: remove dep on React Native

* chore: ignore error from init

* Update packages/cli/src/cliEntry.js

Co-Authored-By: grabbou <[email protected]>

* chore: explicitly disable eslint
2019-02-04 13:12:27 +01:00
Mike Grabowski 4ee44da8f8 fix: run-android not finding scripts to overwrite (#141)
Fixes #126 

We need to change this approach, issue tracking in #140.
2019-02-01 15:36:06 +01:00
Mike Grabowski 6526bdd834 fix: improve overall run-ios experience and get rid of CFBundleIdentifier (#139)
Fixes #107 

Summary:
---------

Bugs fixed:
- "CFBundleIdentifier" printed every time "run-ios" fails, shadowing the real cause for the problem
- "run-ios" running a previous/cached version of an app (usually when there was an error during build step that was ignored)

Changes made:
- Decided to turn Flow and ESLint and apply all the changes as I am working on it. I know the diff might be strange at first sight, but if you look closely, it's just cosmetics to satisfy various rules
- I also extracted some blocks to separate utilities for better readability
- I also removed a no longer needed check for CRNA which is deprecated (and IMO, is not needed)
- Converted few functions to "async" form for better readability
- Started capturing the "stderr" of "xcodebuild" and started relying on its error code in order to avoid going to next step when it fails
- Added a new type of error to differentiate from other errors and also be able to capture additional data. Logic and styling subject to change, encapsulated inside Logger.

Test Plan:
----------

Here's how the error messages look before/now:

While try to build a project with a wrong "schema" :

Before:
<img width="882" alt="screenshot 2019-01-31 at 18 07 43" src="https://user-images.githubusercontent.com/2464966/52071369-200a4c00-2583-11e9-8700-28766daae122.png">

After:
<img width="880" alt="screenshot 2019-01-31 at 18 05 23" src="https://user-images.githubusercontent.com/2464966/52071244-d91c5680-2582-11e9-83e7-e9e549a570cc.png">

While building a project that has a typo in "AppDelegate.m":

Before:
<img width="885" alt="screenshot 2019-01-31 at 18 08 19" src="https://user-images.githubusercontent.com/2464966/52071411-344e4900-2583-11e9-8613-96ddf6c68006.png">

After:
<img width="886" alt="screenshot 2019-01-31 at 18 06 36" src="https://user-images.githubusercontent.com/2464966/52071300-f6e9bb80-2582-11e9-9c9f-3a4b67318119.png">

You can try it out by running `run-ios` command on a broken project (typo, wrong configuration) or by passing a non-existing `schema`
2019-02-01 11:33:17 +01:00
Soo Jae Hwang b33d079eb9 fix: schema option on run-ios not installing and loading the right bundle (#128) 2019-01-31 15:54:44 +01:00
Kacper Wiszczuk 2ff7ef9260 feat: use logger to cliEntry and bin files (#120)
* feat: add logger

* feat: change separator of logs

* feat: use logger

* feat: add logger in bin and cliEntry files

* feat: review suggestions
2019-01-28 17:36:48 +01:00
Michał Pierzchała 56e890dc7f fix: normalize paths for Gradle on Windows (#130)
Summary:
---------

Fixes #129


Test Plan:
----------

I added a test that simulates Windows on POSIX machines, because we don't run our tests on Windows.
@cherniavskii can you test this on a Windows machine?
2019-01-28 17:36:18 +01:00
Michał Pierzchała baae22176c feat: use logger in info, init, install, uninstall (#122)
Summary:
---------

More files using `logger`!

Test Plan:
----------

Green CI
2019-01-28 17:28:15 +01:00
Arnab Sen 03dc0768f7 Update runAndroid.js (#119)
Remove non-existent react-native android message
2019-01-24 16:46:07 +01:00
Michał Pierzchała ec1e97d7a0 feat: add logger to link command (#118)
* feat: add logger to link command

* chore: simplify jest config

* fix: lint
2019-01-24 12:33:40 +01:00
K. P. Sroka 1c181095c2 feat: Removes calls to process.pwd() in favor of using context.root (#116)
* feat: use ctx.root instead of process.cwd() in several commands

* test: upgrading patch version of jest to avoid worker system bug
2019-01-23 19:59:16 +01:00
Kacper Wiszczuk 7ca57a5ad8 feat: use common logger part 1
Introduce logger to bundle core and eject
2019-01-23 19:04:27 +01:00
Kacper Wiszczuk 802e4ec3f2 feat: add logger (#113)
Add simple logger.
2019-01-23 18:28:36 +01:00
Michał Pierzchała 61bc2882f5 chore: setup monorepo with Lerna (#109)
* chore: setup monorepo with lerna

* chore: move flow to root

* fix: lint

* chore: add watch command
2019-01-23 18:04:01 +01:00
Michał Pierzchała 861b0c3fb4 chore: don't publish src now that we build it (#108) 2019-01-21 14:18:54 +01:00
Michał Pierzchała db27b413a2 chore: use babel --copy-files flag (#106) 2019-01-21 13:54:05 +01:00
Michał Pierzchała 5480060e5f chore: followup after #104 (#105)
* feat: build before publishing

* fix(tests): use jest.doMock instead of setMock

* chore: rename local-cli -> cli

* chore: get rid of local-cli leftovers

* fix: typo
2019-01-21 13:49:30 +01:00
Michał Pierzchała 3aac9df01c feat: build before publishing (#104)
* feat: build before publishing

* fix(tests): use jest.doMock instead of setMock

* chore: rename local-cli -> cli
2019-01-21 13:40:58 +01:00