-
Notifications
You must be signed in to change notification settings - Fork 932
Feat/reb #15
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: This makes the Metro config type readonly, only a couple of things inside Metro needed to be tweaked :) Reviewed By: mjesun Differential Revision: D10028083 fbshipit-source-id: 15f5d957a8ee7384d6156c973639d86240fd251f
Summary: There were approximately 350 unused suppressions in xplat/js when checking with .flowconfig.android The flow team is partially responsible for this, since our release process hasn't changed since we added the flowconfig. In the diff beneath this one, I added the functionality necessary for us to not add any more unused suppressions. To test it, I made this diff. The steps were: 1. Start iOS server 2. Start android server 3. remove unused ios suppressions 4. remove unused android suppressions 5. add ios suppressions with site=react_native_ios_fb 6. add android suppressions with site=react_native_android_fb 7. remove unused ios suppressions. The ones that are unused are ones where an android comment was inserted as well, since the ios comment no longer is next to the error 8. add suppressions using ios flowconfig with site=react_native_fb 9. remove unused android suppressions. The unused ones are ones that were moved up when the cross-platform suppressions were inserted. I'm going to make this into a script to make sure we don't contribute anymore unused suppressions from our side. The controller you requested could not be found. nolint Reviewed By: TheSavior Differential Revision: D10053893 fbshipit-source-id: 7bee212062f8b2153c6ba906a30cf40df2224019
Summary: Update several files to use the proper copyright header: ``` // Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. ``` In the case of Xcode project files, I used the shortform version, `Copyright (c) Facebook, Inc. and its affiliates.` Reviewed By: axe-fb Differential Revision: D10114529 fbshipit-source-id: a1f2d5a46d04797c1cf281ea9ab80d3a2caa6fb4
Reviewed By: yungsters Differential Revision: D10139929 fbshipit-source-id: ae44a8af7cab28c4acfd7c97e636467e44adcf37
Summary:
With the new xcode command line tools (10.1 beta2), running `xcrun simctl list --json devices` seems to gives us a slightly different format than what we were expecting. More specifically, the `availability` key is changed to `isAvailable` and returns `'YES'` if the simulator is available:
Before:
```js
devices: {
'iOS 9.2': [
{
state: 'Shutdown',
availability: '(unavailable, runtime profile not found)',
name: 'iPhone 4s',
udid: 'B9B5E161-416B-43C4-A78F-729CB96CC8C6',
},
{
state: 'Shutdown',
availability: '(unavailable, runtime profile not found)',
name: 'iPhone 5',
udid: '1CCBBF8B-5773-4EA6-BD6F-C308C87A1ADB',
},
...
]
}
```
After:
```js
devices: {
'iOS 12.1': [
{
state: 'Shutdown',
isAvailable: 'YES',
name: 'iPhone 6s',
udid: 'D0F29BE7-CC3C-4976-888D-C739B4F50508',
},
{
state: 'Shutdown',
isAvailable: 'YES',
name: 'iPhone 6',
udid: 'BA0D93BD-07E6-4182-9B0A-F60A2474139C',
},
...
]
}
```
Without this fix, `npm run ios` is not able to launch the simulator correctly and returns the following error:
```
Could not find iPhone 6 simulator
Error: Could not find iPhone 6 simulator
at resolve (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:148:13)
at new Promise (<anonymous>)
at runOnSimulator (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
at Object.runIOS [as func] (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
at Promise.resolve.then (/Users/antonyc/Projects/AwesomeProject/node_modules/react-native/local-cli/cliEntry.js:117:22)
```
Pull Request resolved: facebook/react-native#21557
Differential Revision: D10248115
Pulled By: TheSavior
fbshipit-source-id: 37197bbf828e4a6e254270d46411a6716a91afe3
Summary: @public Partly fixes facebook/react-native#20260 Reviewed By: rafeca Differential Revision: D10302150 fbshipit-source-id: 2d9a63b263c9e27c22989c447ce884934f1e4430
Summary:
This diff removes the `sinon` dependency from `metro` and `react-native-github`. It was only used in a handful of tests and having to learn and remember another mocking API just for these cases was not worth it IMO.
While doing the migration, most of the things that `sinon` provides can be done with `jest` in a very similar (and user friendly) way.
I've found, though, two small things that are more user friendly with `sinon`. I'm documenting them here because it may be worth adding them to jest:
With `sinon`:
```
stub.throws(new Error('foo'));
```
With `jest`:
```
mock.mockImplementation(() => {
throw new Error('foo');
});
```
Taking into account that `jest` has a `mockRejectedValue` method for mocks (to return a rejected promise) I don't see any reason why it does not have a `mockThrowError` method.
With `sinon`:
```
expect(mock1.calledBefore(mock2)).toBeTruthy();
```
With `jest`:
```
expect(mock1.mock.invocationCallOrder[0]).toBeLessThan(
mock2.mock.invocationCallOrder[0],
);
```
There's a community matcher that adds this matcher in `jest-extended`: https://github.com/jest-community/jest-extended#tohavebeencalledbefore, but we're not using `jest-extended` in `xplat/js`.
Reviewed By: jeanlauliac
Differential Revision: D10238331
fbshipit-source-id: 5441125b69596ad85bf8f56d203cfd20759bc358
Reviewed By: fishythefish Differential Revision: D10362346 fbshipit-source-id: 0f4cc9977cfaa947e3b23112dd1cf482642e2319
Summary:
Fixes #19069
The --simulator option for the run-ios command now can take an optional
iOS version between parenthesis to further match the desired simulator.
This is useful if you have installed simulators for different iOS
versions and you want to run the app in an especific one. Example:
react-native run-ios --simulator "iPhone 6s (9.3)"
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
Updated tests for the findMatchingSimulator function to include test cases specifying iOS version, and tested on the command line in my app to make sure it has the expected behavior.
[CLI] [ENHANCEMENT] [{/runIOS/findMatchingSimulator.js}] - run-ios command with the --simulator option now allows specifying the iOS version to run an specific simulator if you have multiple versions of the simulator installed. Example: `react-native run-ios --simulator "iPhone 6s (9.3)"`.
Pull Request resolved: facebook/react-native#19079
Differential Revision: D10432487
Pulled By: hramos
fbshipit-source-id: efa50d798b79d83bfe357ee17967a56c7c003bee
Summary: The only thing extra that we need to do is to include `JavaScriptCore.framework` inside the HelloWorld.xcodeproj file. Reviewed By: hramos Differential Revision: D9893035 fbshipit-source-id: 2a29d1fd645eafa2e09109ad14d09f812dfa2601
Summary: A while back Jest introduced `jest.requireActual` and `jest.requireMock` which are aliases to `require.requireActual` and `require.requireMock`. We believe that users should use official Jest API and are planning to deprecate the latter. Pull Request resolved: facebook/react-native#21849 Differential Revision: D10448849 Pulled By: TheSavior fbshipit-source-id: 34fffde97f48c26098c74ee222a56d99071703a6
Summary: Fixes facebook/react-native#21907 (comment) and prevent similar issues happening again Pull Request resolved: facebook/react-native#21910 Differential Revision: D10842256 Pulled By: hramos fbshipit-source-id: f4abaa1c8ff8df6f0fb57b1bad745f4df9da7143
Reviewed By: samwgoldman Differential Revision: D10851695 fbshipit-source-id: 951c628844bbbc7331d4e75f62485db88e5ba7c4
Summary: Makes the delta bundle data structures more consistent. The changes are as follows: * There are now two types of JSON bundles that can be downloaded from the delta endpoint. Base bundles (`Bundle` type), and Delta bundles (`DeltaBundle` type). * The `reset` boolean is renamed to `base`. * `pre` and `post` properties are now strings. * Only `Bundle` can define `pre` and `post` properties. * The `delta` property is renamed to `modules`. * Deleted modules are now listed inside of the `deleted` property, which is only defined by `DeltaBundle`. Reviewed By: mjesun Differential Revision: D10446831 fbshipit-source-id: 40e229a2811d48950f0bad8dd341ece189089e9b
…855) Summary: Fixes react-native start not using passed --sourceExts #21854 Pull Request resolved: facebook/react-native#21855 Differential Revision: D12840358 Pulled By: rafeca fbshipit-source-id: 4ee09341b5128d83274a39d8d01c13749efaa78b
Summary: Adds copyright headers to all files that are missing them. Reviewed By: hramos Differential Revision: D12837494 fbshipit-source-id: 6330a18919676dec9ff2c03b7c9329ed9127d930
Summary: Changed gradle repo list to have consistent priority. mavenLocal is top priority because it requires manual setup, also won't conflict with other repos. Pull Request resolved: facebook/react-native#22041 Differential Revision: D12871549 Pulled By: hramos fbshipit-source-id: c86730fde956dca77174c6454fdcb005a5eec8a9
Summary: Fixes `undefined` description message when running `react-native init --help` on an existing React Native project. Pull Request resolved: facebook/react-native#22045 Differential Revision: D12878956 Pulled By: TheSavior fbshipit-source-id: ede329ca88a02013a6c2f75f1b762d89eacdb34f
Summary: Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes. I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input. Pull Request resolved: facebook/react-native#22062 Differential Revision: D12889447 Pulled By: TheSavior fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
Reviewed By: fishythefish Differential Revision: D12898653 fbshipit-source-id: 2ed11ce569600fe4c12528939a350dd827c9a29a
Summary: `find js/react-native-github | xargs arc lint -a` Reviewed By: yungsters Differential Revision: D12902940 fbshipit-source-id: fd1158f7a0ec322cf89bc4f727943bff4600b399
Summary: Fix unused variable ESLint warnings. Pull Request resolved: facebook/react-native#22097 Differential Revision: D12919249 Pulled By: TheSavior fbshipit-source-id: f680fa7277c58cf685e70dfb911753a30fe01c1d
Summary: Fixes `no-shadow` warning for `local-cli/link/ios/getGroup.js` and remove `var` declaration keyword. ``` react-native/local-cli/link/ios/getGroup.js 13:23 warning 'group' is already declared in the upper scope no-shadow ``` - [x] Check `npm run flow` - [x] Check `npm run flow-check-ios` - [x] Check `npm run flow-check-android` - [x] Check `npm run lint` N/A Pull Request resolved: facebook/react-native#22124 Differential Revision: D12929717 Pulled By: TheSavior fbshipit-source-id: 10f8269ae7a0e61f4d0ec6fe710889c3a7c90b3b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.