Summary:
Commit 06c13b3e066636b414f5dc19c919dcb138763c71 pretend to update jest
to new version, but also adds jest and jest-junit to runtime dependencies
list (in addition to dev dependencies).
This commit fixes this, by removing jest and jest-junit from runtime
dependeincies.
As for motivation... story is short:
1. Updating RN 0.58.1 -> 0.58.3 I found that whole babel@6 infrastructure was returned to my `node_modules` (it is dangerous, because many tools like metro can found it and use it instead of babel@7).
2. It was because of this commit: 9d19ab0c0ca3cb50b4edddde52ae25dc6e80e055 that have 130 random files changed (and provides no meaning description).
But it points to: b864e7e63ef496facd12d65919b624e446203922 (which also provides no meaning description, why it was reverted?)
And finally points to: 696bd89013aa08ebffcbd2c4595ac393b6c26531, which was a "sync with master" commit. Ok. So it was from master.
3. Then I checked that jest still in runtime dependencies on master and fixed that. Also I hope this will be cherry picked into 0.58-stable.
[General] [Fixed] - Fix jest and jest-junit to be only development dependencies
Pull Request resolved: https://github.com/facebook/react-native/pull/23276
Differential Revision: D13941275
Pulled By: cpojer
fbshipit-source-id: a6f3377e670554b21f3ebd2f12d33e29d2969df1
Summary:
Update `xcode` package from 1.0.0 to 2.0.0 due to vulnerability issues affecting `plist`. Please, find below excerpt of the Snyk report.
> LOW SEVERITY
> Regular Expression Denial of Service (ReDoS)
> **Vulnerable module**: plist
> **Introduced through**: react-native@0.57.5
> **Introduced through**: learner-tools-miniapp@0.0.1 › react-native@0.57.5 › xcode@1.0.0 › simple-plist@0.2.1 › plist@2.0.1
>
> **Overview**
> plist is a Mac OS X Plist parser/builder for Node.js and browsers
>
> Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks due to bundling a vulnerable version of the XMLBuilder package. This can cause an impact of about 10 seconds matching time for data 60 characters long.
Pull Request resolved: https://github.com/facebook/react-native/pull/23051
Differential Revision: D13716882
Pulled By: hramos
fbshipit-source-id: 8aa91c8ac85d31b72302b7d24e76bd61623bbbda
Summary:
This updates React Native to use latest CLI. We also create Metro configuration, because CLI looks for React Native in "node_modules" by default. Since we are running React Native from source, it will fail to find required files.
To avoid hacky logic to detect if we are running from source backed into the CLI, I decided to leverage the Metro configuration instead.
Pull Request resolved: https://github.com/facebook/react-native/pull/23052
Reviewed By: rickhanlonii
Differential Revision: D13719938
Pulled By: cpojer
fbshipit-source-id: 1f40a40b3cdbb07ccd42daf75feb457556d3e40f
Summary: Upgrades flow in xplat/js to 0.91. This diff also adds and removes suppressions.
Reviewed By: samwgoldman
Differential Revision: D13720697
fbshipit-source-id: 1bf8830ce286db92277476a2d2404cf0c0dddca2
Summary:
The current way the Jest preset work requires the different files to be in `<rootDir>/node_modules/react-native`. This is not necessarily true - especially in monorepoes.
If we instead do `require.resolve`, we do not need to do `rootDir` replacement in Jest.
Having a JS file as preset has been supported since Jest 23.0.0: https://github.com/facebook/jest/pull/6185
Changelog:
----------
[General] [Fixed] - use `require.resolve` in `jest-preset`
Pull Request resolved: https://github.com/facebook/react-native/pull/22972
Differential Revision: D13662758
Pulled By: hramos
fbshipit-source-id: ca79b5b89d9d05c6fe639b0d88619858e8d05da7
Summary:
Changelog:
----------
[General] [added] - Add `templates` to `react-native` package.
We need a `template` to initialize new RN project from `react-native-cli`. We are planning to remove `templates` from `cli` to be always synced with chosen rn version. Issue for that in `react-native-cli` is here: https://github.com/react-native-community/react-native-cli/issues/39 .
cc grabbou cpojer
Pull Request resolved: https://github.com/facebook/react-native/pull/22952
Differential Revision: D13644364
Pulled By: hramos
fbshipit-source-id: d5d7a820ffacb342e1e97d83739987678ff511e9
Summary:
Hi Team!
This PR fixes#22741
Thanks for labeling as Good First Issue!
Changelog:
----------
[General] [Fixed] - fix deprecation warning of testResultsProcessor flag in test-ci
Pull Request resolved: https://github.com/facebook/react-native/pull/22749
Differential Revision: D13542419
Pulled By: hramos
fbshipit-source-id: 84f33329a6b9431ed1db843a99e7db7dbeda5361
Summary:
This is very much a work in progress. Moving it into the open source repo to be able to hook it up to generate some Fabric files.
Will continue to iterate on it in the open.
Reviewed By: hramos, mdvacca
Differential Revision: D13500969
fbshipit-source-id: 79082447dc52b5834f24eb72bc6e07200b324238
Summary:
These comments were confusing since we don't use flow-typed.
cc bvaughn.
I have replaced our local types by flow-typed, removed metro custom stub and deleted `flow-github` directory.
As result, createReactClass, PropTypes and Metro types won't be distributed to RN users. If you need it, you should relay on flow-typed.
Pull Request resolved: https://github.com/facebook/react-native/pull/20320
Reviewed By: TheSavior
Differential Revision: D13517157
Pulled By: rickhanlonii
fbshipit-source-id: e52c0b6114114a706f6152b2031c600e3dece0d2
Summary:
Fixes two types of warnings that occur when running E2E tests:
1. A deprecation warning from Jest: 'Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.'
2. YellowBox warnings when running the app in debug mode, about components that are deprecated and that require main queue setup.
By fixing these warnings, we increase contributors' confidence that things are working correctly, and draw attention to any warnings that they _should_ pay attention to, if and when they arise.
I feel confident that we should hide the deprecated-component warnings; we _want_ to use these components because we want them to be tested, until they're removed entirely.
For the warning "Module RCTImagePickerManager requires main queue setup", if that's something that can be fixed with reasonable effort in the RNTester code then I think it would be better to do so. Otherwise, I think it is good to hide the warning, because this is a condition we expect: it's not something a contributor should pay attention to.
Pull Request resolved: https://github.com/facebook/react-native/pull/22621
Differential Revision: D13468553
Pulled By: hramos
fbshipit-source-id: 1a5952087dd6fcc9ba08ff7a60ad9f5b075bef57
Summary:
This diff removes the dependency of `metro` on `react-native` by using the newly created `metro-react-native-babel-transformer` package.
This package does not depend on any other internal metro logic and this will decouple RN from metro a bit more.
Reviewed By: cpojer
Differential Revision: D13434949
fbshipit-source-id: a02a3b327c71cef53111514b797f7d6bc9f9d71c
Summary: The current version of react-test-renderer is throwing an error when we use hooks. Upgrading to 16.7.0-alpha.2 fixes it.
Reviewed By: sahrens
Differential Revision: D13104634
fbshipit-source-id: ac7f8d603293907c8653e247563a4d12413b10b9
Summary:
By having this package we can remove the dependency from `react-native` to `metro` and then unblock the releases of metro to npm.
We cannot use this package yet from `react-native` since it hasn't been published, what I'm gonna do here is the following:
1. Land this diff
2. Publish manually a version of `metro-react-native-babel-transformer@0.50.0` once this diff lands.
3. Update the RN repo to depend on `metro-react-native-babel-transformer` instead of `metro`.
Then we should be able to publish versions of metro :)
Differential Revision: D13432231
fbshipit-source-id: 522152e32162cc5fc40aea2fa4c8fd53c528e2e3
Summary: This removes the remaining references to `local-cli`. We already have a `cli.js` file on the root that was just forwarding to the local-cli folder, so I removed that. It also seems that `setupBabel.js` is no longer necessary in RN.
Reviewed By: TheSavior
Differential Revision: D13396218
fbshipit-source-id: a945cb91dae39c4b58c5cabcca6b0f0328fc4717
Summary: We are using babel 7 and should not be using babel 6 any longer, this removes some references to babel 6 modules.
Reviewed By: yungsters
Differential Revision: D13137326
fbshipit-source-id: 4a2db84522e5613f72a8005f0b1e9943e815f9ec
Summary:
Adds a Detox configuration and instructions for running the app in development mode in Detox. This speeds up developing tests, because changes to production code don't require a full rebuild.
Pull Request resolved: https://github.com/facebook/react-native/pull/22572
Differential Revision: D13396883
Pulled By: cpojer
fbshipit-source-id: 186cc8d75eccae411b602cb0f68f0e11856e0743
Summary: This diff moves the React Native template from `local-cli/templates/HelloWorld` to `template`. Keeping it in the react-native repo will allow us to make changes to the template and version it together with react-native, instead of moving it out into a separate repo and trying to keep the template in sync with RN.
Reviewed By: TheSavior
Differential Revision: D13372949
fbshipit-source-id: e68e267b4dcf6384535d7b48fc11e297a12e9676
Summary: This cleans up various configurations after the removal of this folder.
Reviewed By: hramos
Differential Revision: D13338515
fbshipit-source-id: 9d6877921e15a183e46861626af831231333f42a
Summary: This is one more step to remove `fbjs` from `react-native-github`. This changes both the internal and external code to use `invariant` from zertosh instead of the copy in fbjs.
Reviewed By: yungsters
Differential Revision: D13195941
fbshipit-source-id: 73564ca1715110e7da9c7ef56dc57374d61377e0