Skip to content

Sync fork #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 234 commits into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
885f2c2
chore: use @react-native-community/eslint-config (#205)
dratwas Mar 5, 2019
82087ef
fix: change diff links for upgrade command (#206)
thymikee Mar 5, 2019
ccc1797
fix: correct paths for eject command (#208)
krizzu Mar 6, 2019
5564634
chore: simplify commander/minimist usage (#209)
thymikee Mar 11, 2019
a564410
chore: remove unnecessary noHelp option for a command (#215)
grabbou Mar 11, 2019
5d0a5d1
chore: remove unnecessary checks for react peer dep (#216)
thymikee Mar 11, 2019
9aadfd0
docs: fix cli path in contributing doc (#218)
belemaire Mar 11, 2019
d70b10f
fix: path to InitializeCore module in default metro config (#220)
belemaire Mar 11, 2019
0691633
chore: remove some unused files (#217)
thymikee Mar 12, 2019
e4ab21e
fix: android unlink regression (#221)
matei-radu Mar 12, 2019
a8bb073
docs: fix verdaccio command in contributing doc (#219)
belemaire Mar 12, 2019
13383b9
fix: re-export findPlugins under cli/core for backcompat with RN 0.59…
thymikee Mar 12, 2019
e32dbb9
v1.4.0
thymikee Mar 12, 2019
2057a9b
fix: set proper peer dependencies (#227)
thymikee Mar 12, 2019
52b0007
fix: debugger-ui incorrect path (#226)
thymikee Mar 12, 2019
b572a9c
v1.4.1
thymikee Mar 12, 2019
a79130c
fix: refine upgrade error handling; improve the output (#232)
thymikee Mar 14, 2019
07a9761
fix: linking assets on Android (#231)
thymikee Mar 14, 2019
a20aad7
v1.4.2
thymikee Mar 14, 2019
df17527
fix: correct export of findPlugins
grabbou Mar 14, 2019
962a59c
Publish
grabbou Mar 14, 2019
33647ab
Revert "fix: correct export of findPlugins"
grabbou Mar 14, 2019
4d7110d
chore: export findPlugins for ReactNative
grabbou Mar 14, 2019
ad65130
Publish
grabbou Mar 14, 2019
e1fa0d1
fix: reactNativePath and projectRoot not being parsed by commander (#…
thymikee Mar 14, 2019
f465789
v1.4.5
thymikee Mar 14, 2019
2c9729c
build: remove dependepcies command
cpojer Mar 15, 2019
c2fead3
chore: bump metro to 0.53
belemaire Mar 11, 2019
de88920
chore: remove legacy core/findPlugins (#235)
thymikee Mar 15, 2019
af7ac5e
v2.0.0
thymikee Mar 15, 2019
e91b1f0
Bring back lost customDebugger function (#237)
ruslan-bikkinin Mar 15, 2019
5bc8218
fix: throw an error if an invalid platform is passed to the bundle (#…
empyrical Mar 16, 2019
ea33229
Add verbose logging flag, debug logging for (un)link commands (#239)
matei-radu Mar 16, 2019
6a5e6e6
Refactor: Rework PackageManager implementation (#243)
Esemesek Mar 17, 2019
3879547
refactor: don't add purge as remote when upgrading (#245)
pvinis Mar 17, 2019
872d91a
feat: Add hint for browser extensions that may break debug (#253)
sunnylqm Mar 20, 2019
c6d46b3
feat: Add `eslint` to react native project template. (#229)
michalchudziak Mar 21, 2019
88d7459
fix: pass `--projectRoot` argument to Metro (#259)
oblador Mar 22, 2019
590ce4a
fix: set project directory to install packages in init command (#262)
BasitAli Mar 23, 2019
75ccf8e
chore: setup e2e tests (#264)
thymikee Mar 28, 2019
08fd511
[General] [Fixed] - Fixes Xcode 10.2 simulator not found issue (#274)
afxal Mar 28, 2019
60d93dc
feat: upgrade envinfo for better output of info command (#265)
thymikee Mar 28, 2019
43e37dd
chore: update deps to avoid security warnings (#270)
thymikee Mar 28, 2019
8e0ed9e
Refactor: Remove eject (#275)
Esemesek Mar 28, 2019
a76fcd4
Standardise configuration mechanism (#254)
grabbou Apr 1, 2019
05fc3f6
fix: set correct peer dep of RN 0.60 for [email protected] (#280)
thymikee Apr 1, 2019
30f430f
fix: sort modules in debugger delta patcher to match source map order…
motiz88 Apr 1, 2019
ecbafd6
fix: flaky tests; upgrade Jest to 24.6 (#282)
thymikee Apr 2, 2019
a121a3b
feat: new `init` command, leave legacy (#241)
Esemesek Apr 2, 2019
6244265
feat: point to --verbose when command fails (#283)
thymikee Apr 2, 2019
65f5f9c
v2.0.0-alpha.1
thymikee Apr 2, 2019
4bf4028
fix: properly copy template binary files (#285)
cpojer Apr 3, 2019
90c0f49
chore: make legacyInit test less flaky (#286)
thymikee Apr 3, 2019
4320d3e
feat: make legacy `link` use new configuration (#281)
grabbou Apr 4, 2019
323b9a2
chore: add better error handling for failing e2e tests (#289)
thymikee Apr 4, 2019
0d8f2e4
feat: add React logo and spinners to make `init` UI nicer (#292)
Esemesek Apr 5, 2019
5f7dba3
feat: extract iOS and Android specific linking files out of the core …
grabbou Apr 5, 2019
62b8b7c
remove clean on postinstall
thymikee Apr 5, 2019
49352be
v2.0.0-alpha.4
thymikee Apr 6, 2019
4d8cfe4
feat: apply upgrade patch in subdirectory if necessary (#272)
maxaggedon Apr 6, 2019
586f79b
fix: copy `.keystore` files as binary extensions. (#300)
cpojer Apr 9, 2019
f1c72e9
v2.0.0-alpha.5
thymikee Apr 9, 2019
978935f
feat: use `logkitty` to format android logs (#294)
Esemesek Apr 9, 2019
38129ea
feat: commands should be defined as object, unless defined via legacy…
grabbou Apr 9, 2019
ad702ed
fix: resolve relative paths for reactNativePath (#297)
grabbou Apr 9, 2019
fa08711
chore: bump Jest and Flow to latest (#304)
thymikee Apr 9, 2019
1440eb4
feat: infer package and project name for upgrade from config (#299)
thymikee Apr 10, 2019
6343e2a
feat: extract commands out to platform packages (#302)
grabbou Apr 10, 2019
f3e7717
fix: pass maxWorkers arg to server (#305)
sterlingwes Apr 10, 2019
51f4dca
chore: don't apply RN config automatically (#306)
grabbou Apr 10, 2019
0a04971
v2.0.0-alpha.6
thymikee Apr 10, 2019
5881ed5
feat: skip packages that have invalid config instead of throwing an e…
grabbou Apr 10, 2019
c608a88
feat: skip successful Metro server requests if --verbose not set (#291)
vancehu Apr 11, 2019
fc21e30
chore: fix typo in link debug message (#311)
shaundon Apr 11, 2019
964c452
chore: use files instead of npmignore for publishing (#314)
thymikee Apr 13, 2019
7ac73fa
fix: add new line to the help message (#319)
ifsnow Apr 16, 2019
4036fc5
chore: add documentation on link, unlink, start, upgrade (#316)
thymikee Apr 16, 2019
708211a
chore: move shared types to root; moar link styles; bye promiseWaterf…
thymikee Apr 16, 2019
fb94fef
Add support for assetPlugins argument to start command (#318)
brentvatne Apr 16, 2019
76f079e
feat: autolink on iOS
alloy Apr 16, 2019
048ab93
chore: fix CI
grabbou Apr 16, 2019
be4be8a
fix: give a better error message when CocoaPods linking fails (#321)
grabbou Apr 16, 2019
1b8c097
fix: prevent run-android failure when updating APK (#323)
ifsnow Apr 17, 2019
3a1eb61
fix: open Metro in the correct terminal (#310)
Apr 17, 2019
60606ef
v2.0.0-alpha.7
thymikee Apr 17, 2019
d4c7104
fix: prevent unnecessary actions if android build failed (#325)
ifsnow Apr 18, 2019
7d9f8cd
feat: refactor `run-ios` for readability and better error messages (#…
thymikee Apr 18, 2019
a759214
fix: publish native_modules.rb file (#331)
thymikee Apr 18, 2019
98d88d5
v2.0.0-alpha.8
thymikee Apr 18, 2019
c28fb93
Support functions in default (#333)
grabbou Apr 18, 2019
e7eeea4
v2.0.0-alpha.9
grabbou Apr 18, 2019
365be10
fix: allow empty strings to be used as defaults
grabbou Apr 18, 2019
cacaa07
v2.0.0-alpha.10
grabbou Apr 18, 2019
ac9a85e
feat: support platforms that ship with project (#335)
grabbou Apr 18, 2019
f7a7d4c
fix: update haste config with platforms too
grabbou Apr 18, 2019
a0b9e31
v2.0.0-alpha.11
grabbou Apr 18, 2019
9440b15
handle haste (#336)
grabbou Apr 18, 2019
15cea82
v2.0.0-alpha.12
grabbou Apr 18, 2019
83d58a6
chore: top-level unknown keys are now allowed, update test case
grabbou Apr 18, 2019
90a587e
fix: modify wrong install arguments (#337)
ifsnow Apr 19, 2019
256ae68
feat: check `ios-deploy` installation before proceeding to build on d…
Apr 19, 2019
6c575fd
feat: support init inside monorepos (#320)
thymikee Apr 19, 2019
f1105bc
feat: autolinking for Android with Gradle (#258)
Salakar Apr 19, 2019
827daa4
v2.0.0-alpha.13
thymikee Apr 19, 2019
7839c05
fix(autolinking): remove deprecated Gradle task syntax (#339)
Salakar Apr 20, 2019
513d27b
v2.0.0-alpha.14
thymikee Apr 20, 2019
2943ec7
fix: [android] remove forward slashes from package name (#340)
Salakar Apr 20, 2019
1040959
fix: stop resolving "react-native" from package.json as a config (#341)
thymikee Apr 22, 2019
b306c99
docs: update and rearrange documentation (#338)
thymikee Apr 23, 2019
29ae253
chore: remove unsupported CocoaPods options from a documentation
grabbou Apr 23, 2019
bca56c9
docs: initial documentation of plugins (#345)
grabbou Apr 23, 2019
86986a1
docs: add init documentation (#347)
Esemesek Apr 23, 2019
34f7df2
feat: add `platforms` doc (#349)
grabbou Apr 23, 2019
527d81d
feat: add dependency and project documentation (#350)
grabbou Apr 23, 2019
58b9143
v2.0.0-alpha.15
grabbou Apr 23, 2019
477ecc9
fix: ignore undefined when renaming
grabbou Apr 23, 2019
89a1420
chore: update wording in docs
grabbou Apr 23, 2019
53d8f78
chore: change `upgrade` to use new diff files approach (#348)
pvinis Apr 24, 2019
afa9680
feat: improve copying binary files in `init` (#353)
Esemesek Apr 24, 2019
9315f05
Update autolinking.md (#355)
orta Apr 25, 2019
c1a8ec8
[ios] Ensure that the right cwd is set up for auto-linking dependenci…
orta Apr 25, 2019
483003e
v2.0.0-alpha.17
thymikee Apr 25, 2019
dbe2fd8
feat(breaking): remove legacy `library` command (#358)
Esemesek Apr 26, 2019
267d368
fix: init from url (#361)
thymikee Apr 29, 2019
93e3eb6
feat: init from tarball (#362)
thymikee Apr 29, 2019
c7fe3a3
feat: copy all files in `init` through streams (#363)
thymikee Apr 30, 2019
a851637
docs: add `maintainers` section (#369)
grabbou May 6, 2019
8ba322e
fix: refactor init for less duplication; fix handling versioned templ…
thymikee May 6, 2019
809aef9
fix: reporter config option (#370)
fson May 6, 2019
093ce51
chore: Update prettier config (#379)
janicduplessis May 8, 2019
c3ed10c
Use `require.resolve` to resolve package path (#378)
janicduplessis May 8, 2019
bae6895
feat: improve `run-android` error messages; rename "installDebug" -> …
thymikee May 10, 2019
1e60601
v2.0.0-alpha.18
thymikee May 10, 2019
23c52cf
feat: automatically run `pod install` when running `init` command (#373)
May 12, 2019
c423d20
Add openURLMiddleware (#383)
ericlewis May 13, 2019
6947ae2
v2.0.0-alpha.19
thymikee May 13, 2019
7de5c3e
fix: run "config" from react-native binary in autolinking scripts (#384)
thymikee May 14, 2019
5612dde
Improve CocoaPods prompt question when running `init` (#389)
May 15, 2019
a41b7a3
chore: upgrade joi to @hapi/joi to remove npm warnings (#388)
thymikee May 15, 2019
6fb96af
fix: config.reporter undefined bug (#376)
yinhangfeng May 15, 2019
875a025
feat: automatically install pods in legacy init (#386)
May 15, 2019
27b2b52
feat: Show message if CocoaPods installation takes long (#390)
May 15, 2019
287fecf
chore: bump lerna to latest
thymikee May 15, 2019
d3f3aca
v2.0.0-alpha.20
thymikee May 15, 2019
8a79605
chore: Update npm version badge link (#391)
Ehesp May 16, 2019
c2fb83f
feat: support `init` with custom project directory (#365)
May 17, 2019
b03f741
chore: migrate `tools` to TypeScript (#296)
Esemesek May 17, 2019
1d2f254
chore: improve RNPM warnings (#395)
grabbou May 20, 2019
ba14149
v2.0.0-alpha.21
thymikee May 20, 2019
bb11ffd
feat: allow `dependencyConfig` to override `podspec` name (#393)
Salakar May 20, 2019
4053d07
feat: remove manifest from config output (#398)
thymikee May 21, 2019
24babd6
v2.0.0-alpha.22
thymikee May 21, 2019
644380f
feat: log error stacktrace by default (#396)
thymikee May 21, 2019
bceb068
[CI] Migrate to Circle 2.1, add Node LTS tests (#402)
hramos May 27, 2019
4be4c25
fix: Ensure that bundle URL origin matches debugger page origin (#403)
ide May 27, 2019
f0ca2c3
[android] Fixed a crash when adding non-autolinked custom `ReactPacka…
Salakar May 29, 2019
7c487fe
v2.0.0-alpha.23
thymikee May 29, 2019
190dc9f
chore: add CODEOWNERS file (#404)
thymikee May 30, 2019
3770603
chore(docs): update CONTRIBUTING.md (#409)
lithin May 31, 2019
2b19fc8
fix: no active iOS device case in `logIOS` (#410)
May 31, 2019
2f24a8c
fix: Add a simulator.isAvailable check for true value (#414)
invig Jun 5, 2019
8b71f88
feat: Only pass `hasteImplModulePath` if the `hasteImpl` file is avai…
cpojer Jun 5, 2019
c3dbf3a
chore: remove deprecated entries in DevTools middleware (#415)
thymikee Jun 5, 2019
7dec654
feat(breaking): link only assets by default; add `--all` flag (#416)
thymikee Jun 6, 2019
77944a8
feat: notify of new major RN version at most once a week (#268)
matei-radu Jun 6, 2019
3fcd4bc
v2.0.0-rc.0
thymikee Jun 6, 2019
56f41f6
chore: bump Metro to 0.54.1 (#420)
thymikee Jun 7, 2019
7ed0a0f
v2.0.0-rc.1
thymikee Jun 7, 2019
fe2c761
feat: Pass along CLI port configuration for Android (#421)
nhunzaker Jun 9, 2019
973e768
fix: make sure the port passed to Metro is a number (#424)
thymikee Jun 12, 2019
caaacb3
v2.0.0-rc.2
thymikee Jun 12, 2019
f316f92
Log `console` invocations to the terminal. (#426)
cpojer Jun 13, 2019
2d237b3
fix: Add fallback path check when not found app file for iOS (#428)
zhongwuzw Jun 14, 2019
982a18a
chore: update init docs to be more descriptive (#427)
emin93 Jun 14, 2019
116281f
fix: allow upgrading with binary files in the diff (#432)
thymikee Jun 17, 2019
f482f23
chore: bump Flow to 0.101 (#431)
thymikee Jun 17, 2019
5e2d7a0
fix: Add import for `applicationId.R` class in generated `PackageList…
robertying Jun 20, 2019
be699f7
chore: refactor packageManager.js for less redundancy (#433)
jamesgeorge007 Jun 21, 2019
0fcf6d3
feat: filter out non-native deps from config output; fix missing hook…
thymikee Jun 24, 2019
9a63f86
fix: use `packageName` instead of `applicationId` in gradle script (#…
robertying Jun 24, 2019
c6ad37d
feat(breaking): use 'podspecPath' instead of 'podspec', make it smart…
thymikee Jun 24, 2019
40242b9
docs: document how to disable autolinking for unsupported packag… (#444)
thymikee Jun 27, 2019
de936f6
v2.0.0-rc.3
thymikee Jun 27, 2019
023360b
fix: don't use yarn for spawning 'config' command (#449)
thymikee Jun 30, 2019
f6b546e
feat: add warnings for `run-ios` and `run-android` when manually… (#447)
thymikee Jun 30, 2019
5199d6a
chore: group deprecated rnpm warnings, add migration guide (#450)
thymikee Jul 1, 2019
616eaf2
chore: fix grammar in warning (#453)
thymikee Jul 1, 2019
00b9308
fix: incorrect condition for upgrade newer version check (#455)
thymikee Jul 2, 2019
32e6339
chore(docs): simplify autolinking (#454)
thymikee Jul 2, 2019
e50aa8d
feat: simplify passing root to gradle autolinking (#457)
thymikee Jul 2, 2019
024a432
v2.0.0-rc.4
thymikee Jul 2, 2019
ae7b78d
feat: support local RN libraries in autolinking (#451)
thymikee Jul 2, 2019
8cb7f88
v2.0.0-rc.5
thymikee Jul 2, 2019
870a4e2
feat: improve `upgrade` when patches fail to apply (#461)
thymikee Jul 3, 2019
2cd6c7f
v2.0.1
thymikee Jul 3, 2019
3f11672
fix: config on Windows & warnings breaking config JSON output on… (#464)
thymikee Jul 3, 2019
0758bd4
v2.0.2
thymikee Jul 3, 2019
dabc2f5
fix: Changed the URL to be valid for configuration.md (#466)
RohanTalip Jul 4, 2019
7220d3e
fix: log-android not working. update logkitty. (#469)
CallMeLaNN Jul 4, 2019
df0e6b7
fix: run release checker only after `start` and `info` command (#479)
thymikee Jul 5, 2019
f6560dd
fix: autolinking bug on Windows when reading config (#480)
Jul 5, 2019
653db76
fix: duplicate entires in rnpm warning (#481)
thymikee Jul 5, 2019
dfbb193
feat: make run-ios output leaner (#472)
thymikee Jul 5, 2019
a760af9
chore: use StringBuffer when getting config (#482)
Jul 5, 2019
34d6f70
v2.1.0
thymikee Jul 5, 2019
0fd831e
chore: revamp README for readability, about and updating info (#490)
Jul 6, 2019
4732edc
docs: add table of contents (#491)
jamesgeorge007 Jul 6, 2019
32bce31
fix: support an Application instance in PackageList for Android (#493)
Salakar Jul 7, 2019
617a014
fix: Metro Bundler crashing on `run-android` on Windows (#489)
Jul 7, 2019
debaa07
fix: passing iOS simulator name with brackets in latest Xcode (#460)
iKoala Jul 7, 2019
9e3134b
v2.1.1
thymikee Jul 7, 2019
09e77d8
fix: `init` command with scoped templates without version (#497)
BenLorantfy Jul 7, 2019
212587f
fix: don't set `projetRoot` for Metro (#496)
thymikee Jul 7, 2019
46aff3c
chore: fix typo in contribution guide (#501)
mciechanowicz Jul 8, 2019
6df50eb
v2.1.2
thymikee Jul 8, 2019
56ad887
chore: add more information to autolinking guide (#505)
thymikee Jul 8, 2019
c9aec25
feat: use relative paths for Podfile.lock (#502)
simka Jul 9, 2019
cbb9828
fix: use_native_modules! warns and skips dependencies without a podsp…
RyanThomas73 Jul 9, 2019
82ac1c7
fix: correct project directory in run instructions after `init` (#504)
Taym95 Jul 9, 2019
9e2be6c
v2.2.0
thymikee Jul 9, 2019
a3d468e
chore: remove unstable `init --template` shorthand support (#495)
thymikee Jul 9, 2019
f5d64fb
feat: support `unlink --platforms` (#511)
thymikee Jul 9, 2019
8d088e9
v2.3.0
thymikee Jul 9, 2019
c57f41e
docs: add docs for `unlink --platforms`
thymikee Jul 9, 2019
558fad2
feat: add `xed -b ios` for opening Xcode to init instructions (#514)
Jul 10, 2019
c8c0362
fix: run `pod repo update` after installing CocoaPods (#513)
simka Jul 10, 2019
a82902d
v2.4.0
thymikee Jul 10, 2019
681318f
fix: add chalk as dependency of cli-platform-android (#517)
thymikee Jul 10, 2019
3a17d44
v2.4.1
thymikee Jul 10, 2019
c58f3c1
fix: don't copy node_modules in templates (#519)
thymikee Jul 11, 2019
f81f53b
v2.4.2
thymikee Jul 11, 2019
0614548
fix: cache lazy project getter for perf when accessed repeatedly (#520)
thymikee Jul 11, 2019
db0ae51
adjust build-clean and publish scirpts
thymikee Jul 11, 2019
2fe5115
v2.4.3
thymikee Jul 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
113 changes: 90 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,123 @@
version: 2
version: 2.1

defaults: &defaults
docker:
- image: circleci/node:8
working_directory: ~/react-native-cli

jobs:
install-dependencies:
executors:
node8:
<<: *defaults
docker:
- image: circleci/node:8
nodelts:
<<: *defaults
docker:
- image: circleci/node:lts
noderuby:
<<: *defaults
docker:
- image: circleci/ruby:2.4-node

commands:
install-dependencies:
steps:
- checkout
- attach_workspace:
at: ~/react-native-cli
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}
- dependencies-
- run: yarn install
- v2-dependencies-{{ checksum "package.json" }}
- v2-dependencies-
- run: yarn --frozen-lockfile
- save_cache:
key: dependencies-{{ checksum "package.json" }}
key: v2-dependencies-{{ checksum "package.json" }}
paths:
- node_modules
- persist_to_workspace:
root: .
paths:
- .
lint-and-flow:
<<: *defaults
run-lint:
steps:
- attach_workspace:
at: ~/react-native-cli
- run: |
yarn lint
yarn flow-check
tests:
<<: *defaults
- run: yarn lint
run-typecheck:
steps:
- attach_workspace:
at: ~/react-native-cli
- run: yarn test
- run: yarn flow-check
run-cocoa-pods-tests:
steps:
- attach_workspace:
at: ~/react-native-cli
- run: yarn test:ci:cocoapods
run-unit-tests:
steps:
- attach_workspace:
at: ~/react-native-cli
- run: yarn test:ci:unit
- store_artifacts:
path: coverage
destination: coverage
run-e2e-tests:
steps:
- attach_workspace:
at: ~/react-native-cli
- run: yarn test:ci:e2e

jobs:
setup:
executor: node8
steps:
- install-dependencies
lint:
executor: node8
steps:
- run-lint
typecheck:
executor: node8
steps:
- run-typecheck
cocoa-pods:
executor: noderuby
steps:
- run-cocoa-pods-tests
unit-tests:
executor: node8
steps:
- run-unit-tests
e2e-tests:
executor: node8
steps:
- run-e2e-tests
lts-tests:
executor: nodelts
steps:
- install-dependencies
- run-lint
- run-typecheck
- run-unit-tests
# TODO: figure out why e2e tests fail even though not interfering with
# other tests
# - run-e2e-tests

workflows:
version: 2
build-and-test:
jobs:
- install-dependencies
- lint-and-flow:
- setup
- lint:
requires:
- setup
- typecheck:
requires:
- setup
- unit-tests:
requires:
- setup
- e2e-tests:
requires:
- install-dependencies
- tests:
- setup
- cocoa-pods:
requires:
- install-dependencies
- setup
- lts-tests
36 changes: 36 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
extends: ['@react-native-community', 'plugin:import/errors'],
env: {
node: true,
},
rules: {
'prettier/prettier': [2, 'fb'],
},
// @todo: remove once we cover whole codebase with types
plugins: ['import'],
settings: {
react: {
version: 'latest',
},
'import/resolver': {
alias: {
map: [['types', './types/index.js']],
},
// Use <rootDir>/tsconfig.json for typescript resolution
typescript: {},
},
},
overrides: [
{
files: [
'**/__mocks__/**',
'**/__fixtures__/**',
'**/__e2e__/**',
'jest/**',
],
env: {
jest: true,
},
},
],
};
6 changes: 3 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ flow-typed
[options]
emoji=true

esproposal.export_star_as=enable
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
module.name_mapper='types' -> '<PROJECT_ROOT>/types/index.js'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
Expand All @@ -43,6 +45,7 @@ module.ignore_non_literal_requires=true
all=warn
unnecessary-optional-chain=off
dynamic-export=off
unsafe-getters-setters=off

# There is an ESLint rule for this
unclear-type=off
Expand All @@ -63,6 +66,3 @@ unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.94.0
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ package-lock.json
*.log
build/
.eslintcache
!packages/cli/src/commands/init/__fixtures__/editTemplate/node_modules
*.tsbuildinfo
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
singleQuote: true,
trailingComma: 'all',
bracketSpacing: false,
jsxBracketSameLine: true,
};
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"redhat.vscode-yaml",
"flowtype.flow-for-vscode",
"esbenp.prettier-vscode"
]
}
24 changes: 24 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"editor.rulers": [80],
"files.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/build": true
},
"editor.formatOnSave": true,
"flow.useNPMPackagedFlow": true,
"javascript.validate.enable": false,
"prettier.eslintIntegration": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
]
}
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @grabbou @thymikee @esemesek
25 changes: 22 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Repository is splitted into two packages:
You can test your changes by calling `cli.js` directly from the cloned repository. You need to make sure the version of React Native matches the one present in devDependencies of the CLI. Otherwise, you may get unexpected errors.

```sh
node /path/to/cloned/project/packages/cli/index.js
node /path/to/cloned/project/packages/cli/build/index.js
```

## Testing `init` command
Expand All @@ -35,13 +35,13 @@ yarn global add verdaccio
```
* Run verdaccio
```sh
yarn verdaccio
verdaccio
```
* Set npm registry to `verdaccio` proxy server
```sh
npm set registry http://localhost:4873/
```
* Clone `react-native` and `@react-native-commiunity/cli`
* Clone `react-native` and `@react-native-community/cli`
* Release new version of `@react-native-community/cli` to local npm proxy. If you have any issues, head over to [verdaccio](https://github.com/verdaccio/verdaccio) and check out the docs.
```
cd /path/to/cli/packages/cli && npm publish
Expand All @@ -61,6 +61,25 @@ react-native init --version ${RN_VERSION}
npm config set registry https://registry.npmjs.org/
```

## Running `start` command

In order for symlinks to work correctly when running `start` locally, set REACT_NATIVE_APP_ROOT as the root folder of your cli project:

```
REACT_NATIVE_APP_ROOT=path/to/cli node path/to/cli/packages/cli/build/index.js start
```

## Running CLI with React Native from the source

First make sure you have RN repo checked out and CLI repo checked out and built. Then you can start a new RN project with local version of CLI and RN without publishing or proxy:

1. Check out `react-native` repo. Then update template in local `react-native/template/package.json`, replacing dependency version of `react-native` with the absolute path of the react native repo, for example: "react-native": "file:///Users/username/react-native" (you can find the absolute path using `pwd` command)

1. Go back up and create a new RN project: `node ./cli/packages/cli/build/index.js init --template=file:///path/to/local/react-native RNTestProject`

1. To work with android, update gradle config in the newly created project following the second part of [Christoph's instructions](https://gist.github.com/cpojer/38a91f90614f35769e88410e3a387b48)

1. Run start (as described above) and compile your app eg `node ../cli/packages/cli/build/index.js run-android` (make sure you definitely have NDK r17c installed before building android)

## Typechecking, linting and testing

Expand Down
Loading