* build: use template from react-native
* build: adjust init of new project
* fix: display name replace
* fix: rename helloworld files
* build: use require.resolve
The initial version of the package.json file does not contain a newline at the end. This means that the first time a user modifies the file using either an IDE that inserts trailing newlines or using Yarn, the last line will be changed and visible in version control. This is not a big deal, but it is annoying and shows a lack of polish.
I tested this by manually patching this file in a current version of React Native because there is currently no way to test the master of RN and RN cli together.
* feat: be able to use link for specific --platforms only
* fix rawPackageName
* fix flow
* Fix test specifying package name.
* Minor corrections.
* Replace setMock for doMock.
* fix: --appFolder should only install specific app on Android.
* Extract function from runAndroid and add tests for runOnAllDevices.
* Default to installDebug if no --appFolder is specified.
* Update the `getCommand`
* Fix skipped test for add file to project
* Add ESLint config and fix all the errors
* Use proper lint command
* Function is required here
* This file is unused
* Remove extraneous files and move utils to correct folders
* Add strict mode to global-cli again and use preset for other places
* Revert changes to debugger-ui for browser compatibility
* Revert changes in global-cli, package should run on older Node too
* Initial commit - delete Metro-related config
* Rewrite of the config, part 2
* Finish adopting link & unlink to new config format
* Rewrite 'server' command and the way we load config
* Fix errors and make server run
* Use require.resolve
* Simplify runServer code
* Updates to the config
* Remove duplicate platforms
* Use real and unified project root
* Fix projectRoots
* Unifiy root paths
* Remove projectRoot from type
* Leave two todos for tomororw
* Use projectRoot to read the root
* Fix projectRoot and implement config again
* Improve Metro config
* Fix configuration again
* Fix remaining Flow issues inside bundle
* Fix two failing test suites
* Fix getDependencyConfig tests and use snapshots
* Remove console
* Fix remaining Jest tests
* Remove console.log
* Fix issues with link/unlink tested in production
* Add legacy config to avoid breaking changes
* Fix a typo
* Exclude React Native CLI from being linked
* Remove console.log from production code
* Update getCommands.js
* Update loadMetroConfig.js
* Update package.json
* Update package.json
Summary:
Continuation of https://github.com/facebook/react-native/pull/22174 with an exception that `local-cli` folder is left in React Native repository to keep Facebook internal and React Native calls still working.
Separate strategy should be developed to remove all uses of `local-cli` in favor of dedicated utilities.
Pull Request resolved: https://github.com/facebook/react-native/pull/22337
Reviewed By: TheSavior
Differential Revision: D13172898
Pulled By: cpojer
fbshipit-source-id: 0217867f9944648307475ebe629eb729da7bfaaf
Summary:
The reasoning behind this change is that right now, having both added and modified modules inside of a single `modules` field doesn't allow for basic operations like combining two deltas.
For instance, say I have three different bundle revisions: A, B and C.
Module 42 was added in B, and then removed in C.
A->B = `{modules: [42, "..."], deleted: []}`
B->C = `{modules: [], deleted: [42]}`
A->C = `{modules: [], deleted: []}`
However, were we to compute A->C as the combination of A->B and B->C, it would result in `{modules: [], deleted: [42]}` because we have no way of knowing that module 42 was only just added in B.
This means that the `deleted` field of delta X->Y might eventually contain module ids that were never present in revision X, because they were added and then removed between revisions X and Y.
The last time I changed the delta format, we had a few bug reports pop out from people who had desync issues between their version of React Native and their version of Metro. As such, I've tried to make this change backwards compatible in at least one direction (new RN, old Metro). However, this will still break if someone is using a newer version of Metro and an older version of RN. I created T37123645 to follow up on this.
Reviewed By: rafeca, fromcelticpark
Differential Revision: D13156514
fbshipit-source-id: 4a4ee3b6cc0cdff5dca7368a46d7bf663769e281
Summary: Fixes a minor Flow type error when `minimist` is typed via `flow-typed`.
Reviewed By: TheSavior
Differential Revision: D13188680
fbshipit-source-id: 9ad35a3222c8937163a998a2751efd95945af3c7
Summary:
Modified the ESLint configuration to only enable the Jest environment for files we consider now tests, which are files with the `-test.js` suffix under `__tests__`. Also enabled some globals for test helpers (any file under `__tests__`).
This will allow us to catch misspelled tests, while allowing test helpers to use most Jest APIs.
Also disabled the Jasmine environment so people stop using Jasmine APIs and we can rollout Circus soon.
Reviewed By: aaronabramov
Differential Revision: D13199591
fbshipit-source-id: 12a32cf5835630b9987452b0c33d3f8085001689
Summary:
Renamed test files to match `-test.js`, so people can add test helpers without blacklisting.
Codemod code: P60365841
Script executed:
```
cd xplat/js
./scripts/node/node rename-script.js > result.txt
```
Reviewed By: mjesun
Differential Revision: D13185673
fbshipit-source-id: 87451635aa538c2c1d1886e75574d0e5c889596e