Commit Graph
18 Commits
Author SHA1 Message Date
Michał Pierzchała 999059ab84 feat: detach doctor command (#1183)
* feat: detach doctor command

* update snapshot

* bring back doctor to project commands set as well
2020-06-03 16:16:01 +02:00
Antón MolledaandMichał Pierzchała 5819a17d14 chore: make cleanup async (#1156)
* chore: make `cleanup` async

Using `rimraf.sync` can cause `ENOTEMPTY` and `EBUSY` errors on Windows.
This can make the Windows CI to fail randomly. Changing to the async
method defaults to autoretry 3 times and thus avoiding this issues.

* chore: jest config

* chore: e2e tests use sync cleanup

* chore: pr feedback

* chore: revert timeout

* Update __e2e__/default.test.ts

* Update __e2e__/default.test.ts

Co-authored-by: Michał Pierzchała <[email protected]>
2020-05-12 15:53:04 +02:00
James George 5a2b719b79 test: e2e test case for init with --skip-install flag (#1161) 2020-05-08 12:18:42 +02:00
TMaszkoandMichał Pierzchała 9e44835025 fix: invalid output from config command (#1131)
* Moved disabling logger at the top when user used config command

* Added e2e tests for config command

* Added config command output snapshot

* Updated config test snapshot

* Added project root replacement helper

* Removed default terminal program from snapshots

* Moved tests to jest folder and removed additional snapshot

* less snapshots; use raw serializer

* strip unnecessary parts of the snapshot

* Added tmp directory to regex which replaces project root before snapshot

* Added slash before passing testFolder for project root replacing helper

* Fixed problem with windows paths replacing

* CR fixes

Co-authored-by: Michał Pierzchała <[email protected]>
2020-04-29 10:26:30 +02:00
Mike GrabowskiandMichał Pierzchała 21f1b03c01 fix: custom root or calling Gradle outside of project directory (#1057)
* fix: custom root

* chore: dont re-create file

* chore: refactor Jest helpers to allow arbitrary scripts to run

* chore: rename

* chore: add e2e test

* chore: no snapshot testing for Gradle output

* chore: final tweaks and uncomment cleanup

* fix: use proper env for e2e

* chore: move everything to beforeAll

* Update jest/helpers.ts

Co-Authored-By: Michał Pierzchała <[email protected]>

* chore: naming updates

* chore: address comments

Co-authored-by: Michał Pierzchała <[email protected]>
2020-03-18 16:48:49 +01:00
James George 8ed015a6ae chore: test case for passing in unknown command (#1014)
* chore: test case for passing in unknown command

* fix: lint
2020-02-24 10:06:30 -07:00
James George 15f5c7b85a chore: fixup usage misleading information (#1013)
* fix: usage info

* chore: update test snapshot
2020-02-24 13:39:17 +01:00
Michał Pierzchała f9dda5f6d1 chore: fix init e2e test flakiness (#1009)
* chore: skip legacy init test

* chore: avoid network in init test
2020-02-23 20:59:26 +01:00
James George 4553722ce4 chore: test case for default behavior (#1007)
* chore: test case for default behavior

* fix: update snapshot
2020-02-23 19:51:52 +01:00
James George 195edad73b chore: test case for command suggestion feature (#1004)
* chore: test case for command suggestion feature

* fix: lint

* chore: minor tweaks
2020-02-22 14:11:31 +01:00
Andrew Li 935805419c fix: respect --directory in init run instructions (#918)
* fix: Respect --directory when printing run instructions

* test: Ensure run instructions contain custom directory
2020-02-05 14:52:31 +01:00
Mike Grabowski 78bfbfbdd6 chore: finish migration to TypeScript (#788)
* Remove remaining pieces of Flow

* Update CircleCI configuration

* I lied, fix config one more time

* Remove flow-typed and console-log
2019-10-14 21:47:24 +02:00
Charles Assunção fde227d886 chore: convert e2e init test and helpers to TS (#705)
* chore: Convert e2e/init.test and jest/helpers to Typescript

* chore: remove readable stream types temporary

* chore: convert e2e tests to TypeScript

* chore: Adding temporary $FlowFixMe

* chore: Update Jest Config

* chore: Update Snaps

* Revert "chore: Update Snaps"

This reverts commit af5ae56d01d709e00b1ae23da9007e92a4f92ca4.

* chore: Update Snaps

* update snapshots
2019-09-11 10:33:06 +02:00
Michał Pierzchała 71656b1fdd chore: fix legacy init test 2019-08-15 11:52:21 +02:00
Michał Pierzchała f976b4cda6 chore: fix tests on Windows (#559) 2019-08-04 19:03:02 +02:00
Michał Pierzchała 3f116721eb fix: config on Windows & warnings breaking config JSON output on… (#464)
* fix: warnings breaking config JSON output

* fix legacy test
2019-07-03 16:44:55 +01:00
Lucas Bento c2fb83fb64 feat: support init with custom project directory (#365)
* Change `packageName` to `projectName` & add `projectPath` argument

* Add a way to specify a custom project path to init the app on

* Force the `init` command to create the project path recursively

* Add test for providing the project path on init

* Throw error if custom project path doesn’t exist and can’t be created

* Fix type error on `customProjectPath`

* Create directory before running the test with custom project path

* Use `mkdirp` to create project folder & Use `inquirer` to prompt for a directory replace

* Specify `directory` as an option

* Handle custom directory path after react logo

* Check if `ios` folder exists before trying to open it

* Update `init` tests

* Add `directory` type

* Remove unused `inquirer` from `init` test

* Only remove the project folder if it didn’t exist before running `init`

* Remove correct directory if it didn’t exist before `init`

* simplify

* make directory an argument instead of a flag

* update descriptions

* fix test

* use --directory after all

* address feedback; remove version handling from createFromTemplate

* flip the default
2019-05-17 18:25:11 +02:00
Mike Grabowski 5f7dba3d6e feat: extract iOS and Android specific linking files out of the core (#290)
Summary:
---------

Historically, Android and iOS platform were hardcoded inside CLI and provided by default. Then, other packages could export additional platforms on top of it.

React Native as a platform was hardcoded in Metro configuration (default platforms, default extensions) and inside link. That means all new features were always developed with these platforms in mind, leaving others behind. We often used private APIs, which made things more complicated for 3rd party platform developers.

From this PR on, there's no longer concept of an out-of-tree platform inside of the CLI. In a follow up PR to React Native, I am going to configure iOS and Android platforms inside React Native, just like React Native Windows exposes Windows platform.

This will open room for improvements and should make it even easier for the CLI to welcome other platforms.
2019-04-05 22:02:26 +02:00