Commit Graph
1190 Commits
Author SHA1 Message Date
Mike Grabowski ee49594000 chore: release a new version 2019-01-17 16:48:37 +01:00
Mike Grabowski c15e6147f5 fix: init requires folder, but require.resolve returns a file 2019-01-17 16:48:18 +01:00
Mike Grabowski 158f0d02cc chore: update package name and version 2019-01-17 15:35:57 +01:00
Kacper Wiszczuk 4c6d1d2d11 build: use template from react-native (#84)
* build: use template from react-native

* build: adjust init of new project

* fix: display name replace

* fix: rename helloworld files

* build: use require.resolve
2019-01-17 10:53:51 +01:00
Christoph Nakazawa 90b9d839a7 fix: add newline in package.json (#94)
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.
2019-01-16 16:49:58 +01:00
Christoph Nakazawa 1cb78bbe20 fix: typo (#93)
Fixes a small typo and adds some missing trailing commas.
2019-01-16 16:24:49 +01:00
Kacper Wiszczuk 664fa66662 build: deprecate link all behavior (#85)
* build: deprecate link all behavior

* Link project assets too

This reverts previous behaviour

* Fix small issue

* Add URL to an issue
2019-01-15 17:45:18 +01:00
Mike Grabowski 38502ce7c7 fix: Fix metro config when running from source (#56)
* Fix metro config when running from source

* nit

* Few tweaks
2019-01-15 14:36:32 +01:00
Telmen Munkhdalai 6441f4d152 style: remove double default value description in react-native run-ios (#86) 2019-01-14 13:02:23 +01:00
Alexander Zubko 9ed4c55688 fix: Prevent crash in findMatchingSimulator (#59) 2019-01-11 19:02:32 +01:00
Ferran Negre 9aaa508981 feat: be able to use link for specific --platforms only (#77)
* 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.
2019-01-11 18:45:45 +01:00
Michał Pierzchała 4b1aa98af8 fix: android duplicates in linked packages (#81)
* fix: android duplicates in linked packages

* chore: add a comment
2019-01-11 17:53:19 +01:00
Michał Pierzchała 12eb5a834e chore: update global-cli paths (#82)
chore: update global-cli paths
2019-01-11 17:53:04 +01:00
Kacper Wiszczuk de2c1966de Merge pull request #83 from thymikee/chore/jest-projects
chore: better monorepo with jest packages and global Flow
2019-01-11 17:51:10 +01:00
Michał Pierzchała abc00a372b chore: ease work with monorepo with jest packages and global Flow 2019-01-11 17:37:25 +01:00
Kacper Wiszczuk 89cdd7921f fix: revert dependencies removal (#80)
Bring back `dependencies` command with a deprecation warning.
2019-01-11 14:25:20 +01:00
Kacper Wiszczuk a88c78f18b fix: Flow erros (#79)
* fix: Fix flow erros

* fix: fix lint
2019-01-11 13:31:33 +01:00
Kacper Wiszczuk c0780b8cab docs: Add CONTIBUTING.md (#69)
This PR includes:
- [x] - Adding `CONTRIBUTING.md`
- [x] - Setting up `husky` with `commitlint` to force meaningul commit messages

Fixes #62
2019-01-11 13:28:18 +01:00
Kacper Wiszczuk c503519f04 Merge pull request #78 from ferrannp/fix/link-assets-test
fix: link tests
2019-01-10 17:25:18 +01:00
ferrannp 4db5fc01f3 fix: link tests 2019-01-10 17:23:01 +01:00
Ferran Negre 5c35f00311 fix: --appFolder should only install specific app on Android. (#67)
* 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`
2019-01-10 15:52:13 +01:00
Kacper Wiszczuk 1e83499f3b imp: Make package name a required argument in link (#64)
* imp: Make package name a required argument in link

* imp: Change function comment

* Update link.js

* Update link.js
2019-01-10 15:49:33 +01:00
Ferran Negre c5e37435e5 fix: no need from cd - on package.json so we can pass custom arguments. (#72) 2019-01-10 15:15:53 +01:00
Kacper Wiszczuk 9eba0f767e chore: Update yarn.lock (#66) 2019-01-09 18:23:36 +01:00
Janic Duplessis 6de63fed2c Fix launching chrome dev tools (#63) 2019-01-08 18:18:23 +01:00
Kacper Wiszczuk 260874d20c fix: Re-enable some unit tests (#58) 2018-12-20 23:24:42 +01:00
Mike Grabowski 861947180c Bump Metro dependency, use new Metro Transformer and remove old packages (#55) 2018-12-19 20:25:31 +01:00
Mike Grabowski 08962ecfc9 Add ESLint (#52)
* 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
2018-12-19 17:49:48 +01:00
Ignacio 601cbd4b42 Fix skipped test for add file to project (#44) 2018-12-15 11:03:11 +01:00
Mike Grabowski b8b5c98fff Remove manual check of the node version 2018-12-15 10:54:23 +01:00
Ville Immonen f9bf60e858 Add repository URLs to package.json files (#45) 2018-12-15 10:51:19 +01:00
Michał Pierzchała 6b598eb6a6 feat: restrict Node with engineStrict (#24) 2018-12-15 10:50:34 +01:00
Mike Grabowski f344c9c4c9 Decouple Metro config from CLI config (#30)
* 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
2018-12-15 10:49:21 +01:00
Mike Grabowski f0576af072 Bump Metro and Flow dependencies 2018-12-03 14:06:41 +01:00
Mike Grabowski c10eef8880 Import latest changes from React Native upstream 2018-12-03 14:01:37 +01:00
Mike Grabowski 3e633b03f8 Extract out CLI (#22337)
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
2018-12-02 22:21:43 -08:00
Panagiotis Vekris 9660e7fa5a 0.87.0 in xplat/js
Summary: allow-large-files

Reviewed By: samwgoldman

Differential Revision: D13230018

fbshipit-source-id: f07e2371a3b7382de0592cc7c7b20e7f4faa6889
2018-11-28 17:32:50 -08:00
Alexandre Kirszenberg e776b4ba8f DeltaClient: split DeltaBundle's modules into added and modified
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
2018-11-28 02:50:56 -08:00
Tim Yung 0588970767 flow-typed: Define minimist
Summary: Fixes a minor Flow type error when `minimist` is typed via `flow-typed`.

Reviewed By: TheSavior

Differential Revision: D13188680

fbshipit-source-id: 9ad35a3222c8937163a998a2751efd95945af3c7
2018-11-27 23:33:56 -08:00
Rubén Norte f4f84408ca eslint: Disable jasmine env and only enable jest env for test files
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
2018-11-27 03:51:02 -08:00
Rubén Norte 872d65d472 jest: rename tests to follow the new convention
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
2018-11-26 10:30:12 -08:00
Radovan Šmitala d1fe0688b6 Fix allocating Buffer in early commit (#22379)
Summary:
Commit https://github.com/facebook/react-native/commit/d9c2cdae41f41d879351516eeadd1fb608210242 brings compatibility with Node 10, but replaced allocating buffer incorrectly.
dulmandakh made two comments and shows how to do it based on NodeJS documentation https://nodejs.org/api/buffer.html#buffer_new_buffer_size

This PR just fixes that commit.
Pull Request resolved: https://github.com/facebook/react-native/pull/22379

Differential Revision: D13166867

Pulled By: hramos

fbshipit-source-id: 207528739889c044021a4b97ef94c33d56de3e89
2018-11-22 00:50:03 -08:00
Kacper Wiszczuk 2ed7b80096 fix: Fix opening dev tools (#28)
* fix: Fix opening dev tools

* fix: fix argument typo

* fix: fix nits
2018-11-19 04:47:00 -08:00
Panagiotis Vekris b20a7c8940 Flow v0.86.0 in xplat/js
Summary:
allow-large-files
bypass-lint
ignore-conflict-markers
ignore-signed-source
ignore-nocommit

drop-conflicts

Reviewed By: yungsters

Differential Revision: D13081129

fbshipit-source-id: fbb0ccaf3c0a2f224a56f6f6ac6c26811ebba583
2018-11-16 10:43:16 -08:00
Tim Yung 240736ef32 JS: Switch from new Buffer to Buffer.from
Summary:
Constructing `Buffer` using the constructor [[https://nodesource.com/blog/understanding-the-buffer-deprecation-in-node-js-10/ | has been deprecated in Node 10 due to security considerations]].

This is a simple and straightforward conversion.

Reviewed By: mjesun

Differential Revision: D13080655

fbshipit-source-id: 100d8f28c3b255422b26e820aaadcc4f32f41e0d
2018-11-15 12:13:05 -08:00
Stephy Ma b2ed45d6d4 Revert D12994045: Flow v0.86.0 in xplat/js [3/n]
Differential Revision:
D12994045

Original commit changeset: 04552bf081ba

fbshipit-source-id: 062b367b88a966a6efc895c99e9911f0ec0fe8ff
2018-11-14 23:04:04 -08:00
Panagiotis Vekris caeef8162a Flow v0.86.0 in xplat/js [3/n]
Summary:
allow-large-files
bypass-lint
ignore-conflict-markers
ignore-signed-source
ignore-nocommit

drop-conflicts

Reviewed By: avikchaudhuri

Differential Revision: D12994045

fbshipit-source-id: 04552bf081ba742de58e80fba08f8280cb86b1c3
2018-11-14 22:13:27 -08:00
Alexandre Kirszenberg 716f37ea94 DeltaPatcher: better support for the new Delta format
Summary: Adds support for the `deleted` key to remove modules from the bundle. Without this, source maps would break after removing a module, since it would still end up in the patched bundle but not in the source map.

Reviewed By: mjesun

Differential Revision: D12874011

fbshipit-source-id: 79239756854cb2c02f14ec8b0bb2b649766393fe
2018-11-12 08:41:06 -08:00
Michał Pierzchała 32c34e9051 fix: move @babel/core to deps (#23) 2018-11-09 06:50:16 -08:00
Mike Grabowski 3865818503 Bump version 2018-11-09 15:35:30 +01:00