Граф коммитов

176 Коммитов

Автор SHA1 Сообщение Дата
Marshall Roch ce75f89667 Upgrade to Flow 0.198.2
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D42766915

fbshipit-source-id: 12248ce404902871509eea7b40aa6716931dbec3
2023-01-26 08:21:15 -08:00
Marshall Roch 9960327c41 Upgrade to Flow 0.198.1
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D42666047

fbshipit-source-id: d0cc4d048151f3aa1d1033f6096125080dbf2cbd
2023-01-23 07:38:48 -08:00
Sam Goldman 1542d71371 Deploy Flow 0.196.3
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D42203063

fbshipit-source-id: cf0281d202193e7c7fb232fc8db8029f3a700963
2022-12-21 19:19:09 -08:00
Marshall Roch b4dd2088e5 Deploy Flow 0.196.2
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D42188136

fbshipit-source-id: 6d9220f553ceece7871243ca73aa285df136ae72
2022-12-21 11:35:14 -08:00
Evan Yeung 62d100aaa9 Deploy 0.196.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D42061181

fbshipit-source-id: 7198ebbc41b1e9c6eba015bcc0c231b7066ef0b6
2022-12-15 03:32:40 -08:00
Sam Zhou 9f9111bd7b Deploy 0.195.2 to xplat
Summary: Changelog: [Internal]

Reviewed By: mroch, jbrown215

Differential Revision: D42023901

fbshipit-source-id: e3fe3720e82f6857e7be5198a400011917012dff
2022-12-13 20:03:15 -08:00
Lorenzo Sciandra 326109ba5d fix(metro): realign "leftover" metro packages from 0.73.3 to 0.73.5 (#35625)
Summary:
I just noticed while working on 0.71 that the PR https://github.com/facebook/react-native/pull/35580 was incomplete. This PR takes care of re-aligning the leftovers. (in 0.71 I've taken care of the changes locally)

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL] [FIXED] - realign "leftover" metro packages from 0.73.3 to 0.73.5

Pull Request resolved: https://github.com/facebook/react-native/pull/35625

Test Plan: N/A

Reviewed By: cortinico, cipolleschi

Differential Revision: D41996338

Pulled By: dmytrorykun

fbshipit-source-id: bc1c95b0159f639e33835b922555d2f5b8c22c66
2022-12-13 09:52:30 -08:00
Sam Zhou 3ee91089cf Deploy 0.195.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: mvitousek

Differential Revision: D41899730

fbshipit-source-id: 67885896647a4db2b0cb9330f4e5036b03d7e25e
2022-12-10 14:01:38 -08:00
Nicola Corti 3ab6274f0d Bump further patch packages to unblock nightly as they have unreleased changes on main
Summary:
There are other 3 packages which have unreleased changes on main:
```
babel-plugin-codegen/
eslint-plugin-specs/
eslint-config-react-native-community/
```
I'm bumping them in order to be able to publish them to NPM.

Changelog:
[Internal] [Changed] - Bump further patch packages to unblock nightly as they have unreleased changes on main

Reviewed By: hoxyq

Differential Revision: D41874749

fbshipit-source-id: 0b8cd69cab6fcb116f2635c964490927f4fb20be
2022-12-10 04:03:11 -08:00
Sam Zhou 44a533503c Deploy flow v0.195.0
Summary: Changelog: [Internal]

Reviewed By: pieterv, jbrown215

Differential Revision: D41854995

fbshipit-source-id: 9232bf3c5c8f379e68bc1792a40963ad70f66c15
2022-12-09 13:50:16 -08:00
Nicola Corti 177f30a323 Bump all the @react-native/ packages to publish on main
Summary:
Nightlies are currently broken on main. That's because nightlies rely on packages that got
re-scoped under `react-native`. We need to publish them to NPM.
In order to do so, I'm bumping versions for the one that have changes on main so that they
can be published to NPM to unblock nightlies.

Changelog:
[Internal] [Changed] - Bump all the react-native/ packages to publish on main

Reviewed By: hoxyq

Differential Revision: D41840985

fbshipit-source-id: 45b691611e33668df0922d4ff753738a773f162c
2022-12-09 02:10:17 -08:00
Rob Hogan 3e19c97646 Bump remaining build-time Babel deps
Summary:
Update `babel/*` dependencies specifying `^7.x.y` where `x > 0` to the latest available semver minor, and corresponding superficial snapshot updates reflecting a small decrease in JS bundle size.

 - `babel/core` to `^7.20.0`
 - `babel/parser` to `^7.20.0`
 - `babel/preset-env` to `^7.20.0`
 - `babel/traverse` to `^7.20.0`
 - `babel/cli` to `^7.19.0`
 - `babel/eslint-parser` to `^7.19.0`
 - `babel/preset-flow` to `^7.18.0`
 - `babel/preset-syntax-flow` to `^7.18.0`
 - Deduplicate / refresh others to take in patch updates

Changelog: [Internal] Bump Babel dependencies to latest 7.x

Reviewed By: JoeyMou

Differential Revision: D41449678

fbshipit-source-id: f04fe837a7961c4e2dde45fed59fcd138c2f8723
2022-11-30 19:16:23 -08:00
Pieter Vanderwerff fc13f4bf12 Deploy 0.194.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D41600876

fbshipit-source-id: a5e1214164603e6a376faec1b33a68ef16d549db
2022-11-29 18:59:06 -08:00
Rob Hogan 16343f5e1b Update @babel/generator to ^7.20.0, update snapshots (whitespace changes)
Summary:
Update `babel/generator` to the latest, which is a semver-minor update within the pre-existing range.

I'm separating this out for ease of review because it brings some noisy snapshot changes, including more granular source maps and fewer empty lines in generated output. The majority of this is a result of https://github.com/babel/babel/pull/14980 (`>=7.19.4`).

This and the previous diff clear the way for a general Babel update, which is currently blocking a perf-boosting Metro PR https://github.com/facebook/metro/pull/854.

Changelog: [Internal] Bump `babel/generator dependency` to `^7.20.0`

Reviewed By: motiz88

Differential Revision: D41438635

fbshipit-source-id: d56853169be22a2197ad53d6320ec6c1faf6b2a7
2022-11-29 13:25:48 -08:00
shivenmian b7a85b59b5 chore: renamed react-native-codegen to @react-native/codegen (#34804)
Summary:
Renamed react-native-codegen package to react-native/codegen and updated references, without changing the folder name; part of RFC480 (https://github.com/facebook/react-native/issues/34692). Follow-up from https://github.com/facebook/react-native/pull/34578

## Changelog

[General] [Changed] - Renamed react-native-codegen package to react-native/codegen and updated references

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

Pull Request resolved: https://github.com/facebook/react-native/pull/34804

Reviewed By: cortinico

Differential Revision: D39883584

Pulled By: hoxyq

fbshipit-source-id: 0ef384b75c6edd248b31e37b8f05f64b4d39ca6f
2022-11-28 08:28:51 -08:00
Lorenzo Sciandra b4fd178c96 fix(dependencies): move mockfs to the right package.json (#35476)
Summary:
While working on 0.71 we noticed that we were hitting a "mock-fs not found" issue on CI, caused by the fact that the dependency was set in the wrong spot.

This PR backports to main the fix: 05646f8f38 & ceaebc6975

This is related to the black magics of repo-config, and the fact that devDeps from repo-config don't get propagated back to the root package.json when on stable branch. Because of that, this commit doesn't NOT have a yarn.lock entry (the dep is there in main).

I'm confused as to how that dep ended in the devDeps of repo config, it seems something went wrong in migrating some commits from GH to monorepo and back?
check out:
* https://github.com/facebook/react-native/pull/34580
* f0ffd2291c

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - move mockfs to the right package.json

Pull Request resolved: https://github.com/facebook/react-native/pull/35476

Test Plan: N/A, change is transparent

Reviewed By: cortinico, cipolleschi, dmytrorykun

Differential Revision: D41530265

Pulled By: jacdebug

fbshipit-source-id: ec7a6426d9a2a766a98a3cccc339ca7ca090c3a0
2022-11-25 08:10:19 -08:00
Adam Foxman 5aead70e80 eslint config & plugin packages - prep for monorepo RFC (#34581)
Summary:
The [monorepo RFC](https://github.com/react-native-community/discussions-and-proposals/pull/480) calls for renaming:

* `react-native-community/eslint-config` -> `react-native/eslint-config`
* `react-native-community/eslint-plugin` -> `react-native/eslint-plugin`

It also calls for the versions to be aligned with the rest of main -- currently `0.72.0`.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General][Changed] - Renamed `react-native-community/eslint-config` to `react-native/eslint-config` v0.72.0 to align with other packages
[General][Changed] - Renamed `react-native-community/eslint-plugin` to `react-native/eslint-plugin` v0.72.0 to align with other packages

Pull Request resolved: https://github.com/facebook/react-native/pull/34581

Test Plan:
First test is to run `yarn lint`, and verify that output matches before and after this change.

Second test is to change the ESLint config to use the "old" packages (under `react-native-commnuity`) and run `yarn lint` to make sure that they work as expected. This is what customers will experience, until they manually move to the new ESLint packages.

Reviewed By: cortinico

Differential Revision: D41520500

Pulled By: hoxyq

fbshipit-source-id: a61e5ae15d5aaf11f0143a3b0257a60a03b1550b
2022-11-25 05:44:17 -08:00
Stian Jensen 462d93d9c1 Bump jscodeshift to 0.14 (#35356)
Summary:
Jscodeshift has become maintained again in the past year, and has gotten rid of quite a good chunk of old dependencies that are no longer needed!

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - update jscodeshift

Pull Request resolved: https://github.com/facebook/react-native/pull/35356

Reviewed By: cipolleschi

Differential Revision: D41325527

Pulled By: rshest

fbshipit-source-id: 666b25c9bb3b1720479e9e098968b3b983adc2b4
2022-11-17 08:04:00 -08:00
Evan Yeung 1bb67e7818 Deploy 0.193.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D41243915

fbshipit-source-id: ed4416898bfb53325d1958d173ad037cf24683d5
2022-11-14 12:08:53 -08:00
Dmitry Rykun d62b0b463b Bump dependency versions to 0.72.0 after the branch cut
Summary:
Changelog
[General][Changed] - Bump dependency versions to 0.72.0 after the branch cut.

Reviewed By: cipolleschi

Differential Revision: D41079762

fbshipit-source-id: 83e912c4eaf969c1673ccc5fa854646efa99fa4a
2022-11-07 06:57:35 -08:00
Sam Zhou fc9954ac14 Deploy Flow 0.192.0
Summary: Changelog: [Internal]

Reviewed By: bradzacher

Differential Revision: D41018709

fbshipit-source-id: 9e0e18d55815bd449b20b3a9a3e556cda74731ba
2022-11-04 08:03:05 -07:00
Lorenzo Sciandra 5cfb88685f fix (deps): add explicitly eslint config to dependencies (#35192)
Summary:
Basically since this change https://github.com/facebook/react-native/pull/34423 everything worked ok because in the main branch where the monorepo has the workspace section and everything, `react-native-community/eslint-config` was getting pulled in as a node_module anyway - but when moving to a stable branch and wanting to do a release, as we are now with 0.71, because of what the final package.json looks like for react-native and [the modifications that it goes through](f0054e1e30 (diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519)) (ex. the `workspace` section disappears), the fact that it's not directly listed as dependency makes [the CI fails](https://app.circleci.com/pipelines/github/facebook/react-native/17124/workflows/54a4162d-f466-4eab-94ba-ec9fe77e2ecf/jobs/339643) with `Error: Failed to load config "react-native-community" to extend from.`

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - add explicitly eslint config to dependencies

Pull Request resolved: https://github.com/facebook/react-native/pull/35192

Test Plan: In 0.71, add the deps to see the error disappear (it gets replaced by a different one though, looking into that)

Reviewed By: jacdebug, cortinico

Differential Revision: D40988407

Pulled By: cipolleschi

fbshipit-source-id: 38f433a0b4b47a7cb61b59e887459d11182a5b4b
2022-11-04 03:31:21 -07:00
Dmitry Rykun 8183aac0b1 Bump dependency versions before the branch cut 0.71.0
Summary: Changelog: [General][Changed] - Bump dependency versions.

Reviewed By: cipolleschi

Differential Revision: D40991336

fbshipit-source-id: 71c8edbeb274d095403b2f17e60f217d16fe01c0
2022-11-03 17:28:26 -07:00
Riccardo Cipolleschi a2166b24f8 bump codegen to v0.71.1 (#35154)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35154

This diff bumps the codegen to v0.71.1, preparing it for the branch cut.

## Changelog
[General][Changed] - Bump codegen version

Reviewed By: dmytrorykun

Differential Revision: D40852498

fbshipit-source-id: ba1dc87f3726bc27cbd176f160c62a0bdc291433
2022-10-31 12:31:00 -07:00
Marshall Roch d0f94e6c2d Upgrade to Flow 0.191.0
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D40768442

fbshipit-source-id: a8e4301d731a8be4ce21d19c6276795d1127bd6d
2022-10-28 08:11:57 -07:00
Lorenzo Sciandra f550606d4c chore(cli, metro): bump cli and metro to latest ahead of 71 (#35107)
Summary:
Small PR with bump to the new versions of CLI and Metro in preparation of the branch cut for 0.71.

While at it, did a cheeky `npx yarn-deduplicate` to clean up a bit the deps.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - Bump CLI to 10.0.0-alpha.1 and Metro to 0.73.3

Pull Request resolved: https://github.com/facebook/react-native/pull/35107

Test Plan: CI is green

Reviewed By: motiz88

Differential Revision: D40762683

Pulled By: huntie

fbshipit-source-id: e523a49c78588ca80351f44cb02bcd4c0137475e
2022-10-27 14:09:03 -07:00
Benny Singer cf5addf423 Revert D40716713: chore(deps): add wanted dependencies to remove yarn warnings
Differential Revision:
D40716713 (8422c5315c)

Original commit changeset: eeb95a91c6cd

Original Phabricator Diff: D40716713 (8422c5315c)

fbshipit-source-id: e85f111e7da0381e09f8a23d3bd0d553b3a7c4a9
2022-10-26 07:22:28 -07:00
Lorenzo Sciandra 8422c5315c chore(deps): add wanted dependencies to remove yarn warnings (#35088)
Summary:
I wanted to start working on a thing but this barrage of warnings was very annoying so ended up doing this instead: a very small PR to take care of some warnings during yarn install.

It doesn't change anything (the versions are the ones already used all around the repo), just makes yarn happier.

Also, while doing that I found a dependency that was lying there unused for 2 years so took care of it.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - add wanted dependencies to remove yarn warnings

Pull Request resolved: https://github.com/facebook/react-native/pull/35088

Test Plan:
### Before

<img width="1920" alt="Screenshot 2022-10-26 at 10 53 32" src="https://user-images.githubusercontent.com/16104054/197996489-f463be29-b35b-45cc-9d9c-2d176579fb7d.png">

### After

<img width="947" alt="Screenshot 2022-10-26 at 10 52 19" src="https://user-images.githubusercontent.com/16104054/197996505-3d60b319-006b-45ab-83bf-2f431272fdcd.png">

Reviewed By: jacdebug

Differential Revision: D40716713

Pulled By: robhogan

fbshipit-source-id: eeb95a91c6cdf37edfe868fefe4ba04aebe500ec
2022-10-26 06:42:50 -07:00
Marshall Roch 6e18f1fab1 upgrade to flow 0.190.1
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D40611965

fbshipit-source-id: 56c6dc10557fdb3a302a862fe80a1227df83850b
2022-10-22 06:38:54 -07:00
Rob Hogan 45db65be7e Update Jest to ^29.2.1 (#35014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35014

X-link: https://github.com/facebook/metro/pull/881

Following on from https://github.com/facebook/react-native/pull/34724 and https://github.com/facebook/react-native/pull/34972, this updates Jest to the latest version 29.2.1 across projects and in the OSS React Native new app template.

Importantly this version includes the [new `jest.now()` API](https://github.com/facebook/jest/pull/13245), which will be useful for exposing internally consistent fake timer mocks of `requestAnimationFrame`, etc., in the new React Native Jest environment.

Changelog:
[General] [Changed] - Upgrade Jest in React Native template to ^29.2.1

Reviewed By: jacdebug

Differential Revision: D40386349

fbshipit-source-id: 43f5a69cf546df09e2f02542ebf50130d65f0436
2022-10-19 12:17:39 -07:00
Sam Zhou 3e58a9c531 Deploy 0.190.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D40393734

fbshipit-source-id: cc7a5e1fd28512c8141a0f705580a447efcd5575
2022-10-14 14:07:54 -07:00
Jiamin Zhu 4631cf933e Revert D40374535: Deploy 0.190.0 to xplat
Differential Revision:
D40374535 (5359f1de12)

Original commit changeset: 92788a21a4f2

Original Phabricator Diff: D40374535 (5359f1de12)

fbshipit-source-id: a0115dc24590bc50fa1aee2770dbb13b2edaf580
2022-10-14 10:45:04 -07:00
Sam Zhou 5359f1de12 Deploy 0.190.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: mvitousek

Differential Revision: D40374535

fbshipit-source-id: 92788a21a4f22628782735dfb60d51661d6b27fa
2022-10-14 09:01:51 -07:00
Pieter Vanderwerff 5e9ac1fa13 Deploy 0.189.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D40320927

fbshipit-source-id: 05c74ddf966ab25308237e265113d1cbb920d3c6
2022-10-12 15:29:17 -07:00
Gabriel Donadel Dall'Agnol fa22a6e2d7 build: Bump ws to 6.2.2 due to ReDoS vulnerability (#34759)
Summary:
A moderate vulnerability was found in all versions of `ws` below 7.4.6 June last year. React native current uses v6.1.4 which is susceptible to it, fortunately this security fix has been backported to v6.X.X and we don't need to upgrade any major versions/worry about breaking changes. This PR bumps `ws` to 6.2.2 ([CHANGELOG](https://github.com/websockets/ws/releases/tag/6.2.2)) due to this ReDoS vulnerability

More information about this vulnerability can be found here -> https://github.com/advisories/GHSA-6fc8-4gx4-v693

Closes https://github.com/facebook/react-native/issues/31646

## Changelog

[Internal] [Security] - Bump ws to 6.2.2 due to ReDoS vulnerability

Pull Request resolved: https://github.com/facebook/react-native/pull/34759

Test Plan:
Ensure WebSocket tests are working as expected

Tested HMR working on Twilight
| iOS | Android |
| https://pxl.cl/2g70M | https://pxl.cl/2g70V |

Reviewed By: hramos, cortinico

Differential Revision: D39722905

fbshipit-source-id: 12088ab5ea26d904675de484e2014949d6696465
2022-10-10 02:58:40 -07:00
Lorenzo Sciandra f164556037 chore(deps): bump CLI to 9.1.3 and Metro to 0.72.3 (#34803)
Summary:
This PR bumps the dep version of Metro and the RN CLI to latest, and realigns them to avoid the issue we currently have in 0.70: https://github.com/facebook/react-native/issues/34714 (this commit will be cherry-picked there)

Also, it pins it all down to precise version. See comments for reasoning.

While at it, I gave a cleanup pass to the yarn.lock with [`yarn deduplicate`](https://github.com/scinos/yarn-deduplicate#readme).

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - bump CLI to 9.1.3 and Metro to 0.72.3

Pull Request resolved: https://github.com/facebook/react-native/pull/34803

Test Plan: CI is green

Reviewed By: dmytrorykun

Differential Revision: D39967392

Pulled By: dmytrorykun

fbshipit-source-id: 799dd745834c9ba349362f70afb4bdbd1a48260e
2022-09-30 06:22:21 -07:00
Sam Zhou 8340794c5e Deploy 0.188.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: vdjeric, evanyeung

Differential Revision: D39960121

fbshipit-source-id: c0606675f2897a9514520e577017e23ca1430049
2022-09-29 23:11:09 -07:00
Evan Yeung 8a7f7af753 Deploy 0.188.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D39919034

fbshipit-source-id: a8329aab9bf8f8da93a1c8d414518705048f0d8f
2022-09-29 14:31:12 -07:00
Tim Yung 80b8cefb26 RN: Lint for Internal Package Imports
Summary:
Creates an ESLint rule that prohibits (and autofixes) imports from `react-native` or `react-native/path/to/file`, within the React Native repository.

The ESLint rule is configured using the `eslint-plugin-lint` package instead of `react-native/eslint-plugin` because the rule is only applicable to the React Native repository. The rule does not (and should not) be publicly facing, and changes to the rule should not require publishing new versions of `react-native/eslint-plugin`. (As a follow-up, the `no-haste-imports` rule should be migrated over from `react-native/eslint-plugin`.)

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D39831222

fbshipit-source-id: 566330e6df77fdff5ce755324b9f592b9365019e
2022-09-27 09:22:58 -07:00
Rob Hogan c27501bb87 Update to Jest 29 (#34724)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34724

Following on from the recent upgrade from Jest 26->27, this brings us up to present day Jest 29 for tests of React Native itself, Metro, and Meta-internal code. An update to the template for RN apps will follow.

Changelog:
[Internal][Fixed] Update to Jest 29

Reviewed By: huntie

Differential Revision: D39543504

fbshipit-source-id: b47fdb678212b475881ec19085f6cd45a4530333
2022-09-20 14:15:50 -07:00
Marshall Roch 059e41e217 upgrade to flow 0.187.1
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D39643297

fbshipit-source-id: efdd6b41a79cc715b12ea442b6b57e400dbb6cac
2022-09-19 22:19:14 -07:00
Luna Wei 6b2a511cbb Move TypeScript declarations into react-native (#34614)
Summary:
## Changelog
[General] [Added] - Add `types` folder to house TypeScript types.

Release TypesScript types with react-native and eventually deprecate [types/react-native](https://www.npmjs.com/package/types/react-native).

The current plan is to release types/react-native for 0.70 and 0.71 while also maintaining types here. This will result in some double maintenance until 0.72 but will give community time to move off of types/react-native.

After this lands, there have been changes on `main` of types that we need to update. Then, when we release 0.71 from DefinitelyTyped, we can simply copy over the `types` folder from this repo.

Pull Request resolved: https://github.com/facebook/react-native/pull/34614

Test Plan:
`yarn run test-typescript` for linting types

* Created a new project using the TS template and my local clone of `react-native` on this branch.
`npx react-native init MyTSApp --version <path-to-my-local-rn-repo> --template react-native-template-typescript`
* Updated the `package.json` to remove `types/react-native`
* Deleted my node_modules and re-ran yarn
* Opened MyTSApp in VSCode and verified the type suggestions appeared and cmd+click to defnitions took me to the node_module dependency `react-native/types`

## Danger is failing on this PR and it's expected
 as it runs off the changes on `main`.  [This is expected](https://docs.github.com/en/github-ae@latest/actions/using-workflows/events-that-trigger-workflows?fbclid=IwAR2_AE0Jwndt8Gu-iTQnxGxLJq7nakbi7sz8jwZ6U62JWLSdcZuvjcQ6WvE#pull_request_target). However testing it locally passes. Once merged, and these changes are on `main`, danger will pass again.

```
$ react-native/packages/react-native-bots
❯ yarn danger pr https://github.com/facebook/react-native/pull/34614
yarn run v1.22.19
$ ..react-native/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/34614
Starting Danger PR on facebook/react-native#34614

Danger: ✓ found only warnings, not failing the build
## Warnings
🔒 package.json - <i>Changes were made to package.json. This will require a manual import by a Facebook employee.</i>

  Done in 13.24s.
```

Reviewed By: mdvacca

Differential Revision: D39479137

Pulled By: lunaleaps

fbshipit-source-id: 1d506f812d566b783b6e79104cd6339b077a42a7
2022-09-19 12:26:00 -07:00
Tim Yung 527ac2f2c5 JS: Upgrade to `yargs@^17.5.1`
Summary:
Upgrades all of our JavaScript tooling to use `yargs@^17.5.1`.

Of all [release notes](https://github.com/yargs/yargs/releases), these are the major version notes:

- [v17.0.0](https://github.com/yargs/yargs/releases/tag/v17.0.0)
- [v16.0.0](https://github.com/yargs/yargs/releases/tag/v16.0.0)

A cursory inspection suggests that these breaking changes are unlikely to seriously impact our use cases (or can be fixed forward).

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D39550338

fbshipit-source-id: 5b2c5265f8c7a95ab0cc9bab62873f9e4355f32f
2022-09-16 08:25:34 -07:00
Marshall Roch a8ece43a50 upgrade to flow 0.187.0
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D39542847

fbshipit-source-id: 2eeb8740dd0a142b7e411fbee4765a8f38685c76
2022-09-15 12:24:13 -07:00
Rob Hogan ff20062174 Update Jest to 27.5.1
Summary:
Update our internal tests to use Jest 27. If this sticks, we should follow up with updating the RN template.

Changelog:
[Internal][Fixed] Update Jest setup to v27.5.1

Reviewed By: motiz88

Differential Revision: D39383717

fbshipit-source-id: 0fbb5a7b1ab70ccbfaed22b2de92f445f756afe0
2022-09-15 07:37:40 -07:00
Satyajit Sahoo a5622165c1 feat: support custom library paths in `react-native.config.js` for codegen on iOS (#34580)
Summary:
Currently for codegen to work for a library on iOS, it needs to be located
inside `node_modules`. This patch adds support for libraries defined in
`react-native.config.js`.

This is useful when developing libraries as well as monorepos where the library
may exist outside of the `node_modules`.

Example:

```js
// react-native.config.js
const path = require('path');

module.exports = {
  dependencies: {
    'react-native-library-name': {
      root: path.join(__dirname, '..'),
    },
  },
};
```

## Changelog

[Internal] [Added] - Support custom library paths in `react-native.config.js` for codegen on iOS

Pull Request resolved: https://github.com/facebook/react-native/pull/34580

Test Plan:
Tested on a test application and ensured that codegen finds the library specified in `react-native.config.js`

https://user-images.githubusercontent.com/1174278/188141056-bce03730-2a13-4648-8889-9727aaf2c3c4.mp4

I have also added a basic test case for this scenario.

Reviewed By: jacdebug, cortinico

Differential Revision: D39257919

Pulled By: cipolleschi

fbshipit-source-id: 131189f1941128a59b9b1e28af61a9038eb4536b
2022-09-08 03:09:16 -07:00
Pieter Vanderwerff 3db19b464d Deploy 0.186.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D39185318

fbshipit-source-id: ca154a5c43eef3e30d5eab382947eedf30e9e850
2022-08-31 16:05:55 -07:00
Marshall Roch f3def13a92 Deploy 0.185.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: bradzacher

Differential Revision: D38886330

fbshipit-source-id: 7b3fa0c4c4ccfffa54770dac0ccd686d4e4753d5
2022-08-24 06:13:47 -07:00
Michał Pierzchała 0c2fe96998 Upgrade RN CLI to v9.0.0 and Metro to 0.72.1 (#34447)
Summary:
Stable v9 of the CLI, no major changes compared to previous alpha releases.

Metro release notes: https://github.com/facebook/metro/releases/tag/v0.72.1

cc kelset huntie

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - Upgrade RN CLI to v9.0.0, Metro to 0.72.1

Pull Request resolved: https://github.com/facebook/react-native/pull/34447

Test Plan: CI

Reviewed By: huntie

Differential Revision: D38838499

Pulled By: robhogan

fbshipit-source-id: 552e2e708270557e2b74c1a3b8d3325774fb0c48
2022-08-19 09:13:55 -07:00
Evan Yeung 5f8808a4f8 Deploy 0.185.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D38810908

fbshipit-source-id: a397d899ce436a65d187eee8369b6e5bfa405539
2022-08-17 21:59:58 -07:00