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

25659 Коммитов

Автор SHA1 Сообщение Дата
Ruslan Lesiutin 47d23374c2 feat(.circleci): support both architectures in rntester app (#34864)
Summary:
Added a new job to testing RNTester app on both architectures

## 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] [Added] - Support both architectures to test RNTester iOS app

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

Test Plan: CircleCI jobs

Reviewed By: cortinico, cipolleschi

Differential Revision: D40062371

fbshipit-source-id: 1a28890edc57b64232d647d85694b34d50a9cd64
2022-10-04 10:15:30 -07:00
Lorenzo Sciandra 8486b4c5ee chore: re-add fixes from Kudo's PR 34846 (#34861)
Summary:
I'm not sure why, but my commit 97f5ef05e6 landed despite the PR still having a couple of merge conflicts from after Kudo's PR https://github.com/facebook/react-native/issues/34846 being merged.

What happened is that basically it just "overwrote" those chances, so this PR is just a fix for that.

## 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] - re-adding Kudo's fix for nightly build

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D40059290

Pulled By: cortinico

fbshipit-source-id: 38e495a0dbecd39e836d15aa2a1a30e7354d9813
2022-10-04 09:06:01 -07:00
Lorenzo Sciandra 232e4474e6 chore: re-align version to be 1000.0.0 on main everywhere (#34817)
Summary:
While working on https://github.com/facebook/react-native/pull/34513 I noticed that on main branch the versioning is not really consistent everywhere. So this PR is an attempt at realigning so that on the main branch, RN is 1000.0.0 everywhere - in a way, it's cleaning up the room for the monorepo work to go flawlessly).

It's just a pass of `node scripts/set-rn-version.js --to-version 1000.0.0`.

There's the small chance that some versions where kept to 0.0.0 on purpose (build tools are weird), so we might just have to close this off. No big deal :)

## 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] -  re-align version to be 1000.0.0 on main everywhere

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

Test Plan: CI is green and when imported, nothing breaks.

Reviewed By: cortinico

Differential Revision: D39926953

Pulled By: cortinico

fbshipit-source-id: ff66530382f891e17c00b35edf97c03591b6a9a8
2022-10-04 08:36:21 -07:00
Lorenzo Sciandra 97f5ef05e6 infra(e2e): rework local E2E script (#34513)
Summary:
This is a long time coming effort to improve the situation around the local e2e script that in the release crew: the current bash-based script is quirky at best, and what you end up generating as a sample project is not really a true sample project. This is where this PR comes in: it migrates the flow from `./scripts/test-manual-e2e.sh` to `yarn test-e2e-local <options>`.

Here's the current shape of the options:

```sh
Options:
  --help          Show help                                            [boolean]
  --version       Show version number                                  [boolean]
  -t, --target      [choices: "RNTester", "RNTestProject"] [default: "RNTester"]
  -p, --platform                    [choices: "iOS", "Android"] [default: "iOS"]
  -h, --hermes                                         [boolean] [default: true]
```

The idea is to change it so that you can just run the script, and it will do that one specific thing "well", without the tester needing to do anything aside from actually testing the app once it's open.

Some of the key changes:
* tries to stick to the patterns of the other established *.js based scripts, in terms of tooling and approach (and even refactor parts that can be shared with other scripts) - like the android artifacts generation
* no need to start the android emulator on the side
* no need to start Metro on the side
* RNTester iOS will open up on the simulator (no Xcode open that then you need to press)

Things that still need work:
* see the #fixme and #todo in comments
* because we rely on exec, the output sent back is not formatted/shaped correctly so it's a bit more noisy/chaotic - but can't handle it right now because the package we use doesn't allow it - see https://github.com/shelljs/shelljs/issues/86

## 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] - Migrate bash E2E local testing script to new JS based command

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

Test Plan:
To test the script, you can run it passing the options showed above; this is the current situation:
* RNTester iOS Hermes 
* RNTester Android Hermes 
* RNTester iOS JSC 
* RNTester Android JSC 
* RNTestProject Android Hermes 
* RNTestProject iOS Hermes 
* RNTestProject Android JSC 
* RNTestProject iOS JSC 

Reviewed By: cortinico

Differential Revision: D39814692

Pulled By: cortinico

fbshipit-source-id: d4791798aaad764c6a3757269b7636f847ccf2ca
2022-10-04 04:56:44 -07:00
Ruslan Shestopalyuk 540ae39487 Fix race condition in RCTLoggingTests integration tests (#34858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34858

Changelog:

[iOS][Fixed] - Fix race condition in RCTLoggingTests integration tests

RCTLoggingTests work in the following way:
* Put a custom hook on logging (logging function) to intercept log messages
* Send several log messages via JS and see whether they hit the hook as expected

The problem with this approach was that there may be unexpected log messages, which squeeze inbetween the points of time when the hook was set and when the first message was sent.

There was a (now 6 years old!!!) fix to mitigate this problem, which was adding a lead pause of 2s to "make sure" that all the other possible log messages had been sent: https://github.com/facebook/react-native/pull/10568

That didn't actually guarantee fixing the problem in general, just partially mitigating it, as the race condition conceptually still remained there.

Here I take a different approach, which should guarantee that we skip all the rogue JS messages before we start sending and reading them on our own:
* Install the hook
* Log a "marker" message
* Pump the log until the marker appears - at this point we know that the hook has been definitely installed

Reviewed By: cipolleschi

Differential Revision: D40043442

fbshipit-source-id: b4aa617d27c2dcff26682dd72e47ec19cb0d11ca
2022-10-04 04:38:07 -07:00
Nicola Corti 06df917071 Propagate common flag to autolinked libraries (#34853)
Summary:
I'm handling this TODO i left to unbreak the CI.
We need to make sure all the autolinked libraries are getting the folly flags and other common flags propagated correctly.

## Changelog

[Internal] [Change] - Propagate common flag to autolinked libraries

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

Test Plan: Will rely on a green CI

Reviewed By: cipolleschi

Differential Revision: D40055134

Pulled By: cortinico

fbshipit-source-id: fb9afab954ab402f6a3ab417aba934035580f936
2022-10-04 04:18:53 -07:00
Nicola Corti 0b4417b43f Cleanup the template after prefab support (#34843)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34843

We can now remove a lot of unnecessary code to copy .so
files around as they're consumed via prefab from :ReactAndroid

Changelog:
[Android] [Changed] - Cleanup the Android template after prefab support

Reviewed By: cipolleschi

Differential Revision: D40014642

fbshipit-source-id: 00e69ea62bdb4882b40b8b6f19cdf80235c847b5
2022-10-04 03:27:07 -07:00
Nicola Corti 6d6d455618 Consume fbjni via Prefab (#34831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34831

Historically we had to download an unzip the fbjni Android Archive to use it.
Here I'm updating the way how we consume to use prefab so we can remove a lot
of unnecessary configuration, also from the app template.

Changelog:
[Internal] [Changed] - Consume fbjni via Prefab

Reviewed By: cipolleschi

Differential Revision: D39964574

fbshipit-source-id: 1b18682c2b36aabb1fc1a3819ca09e575182eae4
2022-10-04 02:54:49 -07:00
Yannic Bonenberger 793ebf6812 Re-add support for using Yoga without exceptions (#1006)
Summary:
This is a partial rollback of 07c0d539bdb3a248762d0a06fd3f622b278a7ecb.

X-link: https://github.com/facebook/yoga/pull/1006

Reviewed By: yungsters

Differential Revision: D40032544

Pulled By: yungsters

fbshipit-source-id: 9ef9b80672eced86a98cfae66c81710bd3ee6f9b
2022-10-03 23:35:46 -07:00
Yurii Nakonechnyi c1363984f1 Added suppression for warnings about unused parameters in 'publish<Type E>()' func (#1141)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1141

Reviewed By: yungsters

Differential Revision: D40025354

Pulled By: yungsters

fbshipit-source-id: 6eaaa77b71db95ab0dbc0a4f459c9d85f7e36c42
2022-10-03 22:04:06 -07:00
DaeWook, Kim d9a5c66baa Export YGInteropSetLogger method (#960)
Summary:
When building and using C # libraries,
EntryPointNotFoundException thrown from YGInteropSetLogger.

so, I added YOGA_EXPORT on YGInteropSetLogger.

X-link: https://github.com/facebook/yoga/pull/960

Reviewed By: yungsters

Differential Revision: D40027238

Pulled By: yungsters

fbshipit-source-id: 6af584a16e66a31c91374a1bb64434888762e3c8
2022-10-03 21:26:05 -07:00
迷渡 619d115822 fix missing dll exports (#1127)
Summary:
When I use libyogacore.so in other programming languages, it crash with message as

> Could not obtain symbol from the library: dlsym(0x20b84d220, YGConfigIsExperimentalFeatureEnabled): symbol not found

This function is defined as `WIN_EXPORT bool YGConfigIsExperimentalFeatureEnabled` in yoga.h, but is not defined using `YOGA_EXPORT` in yoga.cpp.

X-link: https://github.com/facebook/yoga/pull/1127

Reviewed By: yungsters

Differential Revision: D40024450

Pulled By: yungsters

fbshipit-source-id: f6f01eadccb13d593c68300059e96f4b0bbc9fb6
2022-10-03 21:09:58 -07:00
andrejborstnik 43cf78d99e chore: add headers.Content-type to openFileInEditor call (#33517)
Summary:
Currently the `Content-type` is not defined and defaults to `text/plain`. This makes it more accurate.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[internal] [Changed] - add `headers.Content-type` to `openFileInEditor` call

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

Test Plan: - [x] in development trigger `openFileInEditor`, e.g. by pressing on a line in a stack trace -> code editor opens

Reviewed By: cipolleschi

Differential Revision: D40022413

Pulled By: cortinico

fbshipit-source-id: 00ad3cdcdd1f82436c04aed3643c9f0b55778592
2022-10-03 10:32:29 -07:00
Riccardo Cipolleschi 75b688fba8 Improve readme with Testing instruction
Summary:
Currently, it is not clear how to run codegen tests in the OSS.

## Changelog
[General][Added] - Add instructions about how to add tests in the OSS

Reviewed By: cortinico

Differential Revision: D40020907

fbshipit-source-id: 073ec8bf08d2a9e8b26287763dd881371ecf561d
2022-10-03 10:29:23 -07:00
Ruslan Shestopalyuk 00458637da Add Mapbuffer module to podspec (#34847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34847

This fixes a missing intra-module dependency inside RN renderer core.

Changelog:
[iOS][Fixed] - Add missing react/renderer/mapbuffer module to podspec

Reviewed By: dmytrorykun

Differential Revision: D40020363

fbshipit-source-id: 5e9f3baab76536f1689f0aa5750fdb5a44d28942
2022-10-03 09:42:45 -07:00
Kudo Chien 93c3effc72 Fix issues for nightly build (#34846)
Summary:
There are two issues from nightly builds.

#### 1. `VERSION_NAME=1000.0.0-main` in  _ReactAndroid/gradle.properties_

the solution is to remove unused _ReactAndroid/gradle.properties_  git revert when publishing package.

#### 2. `pod install` error from downloading hermes, e.g. the url is unavailable. `https://github.com/facebook/react-native/releases/download/v0.0.0-20221002-2027-2319f75c8/hermes-runtime-darwin-debug-v0.0.0-20221002-2027-2319f75c8.tar.gz`

fix _hermes-engine.podspec_ to support nightly build and build hermes from main branch.

## Changelog

[General] [Fixed] - Fix nightly build issues

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

Test Plan:
1. i cannot fully test publish-npm.js workflow and it stops at `npm publish`. i can just check at this moment, the _ReactAndroid/gradle.properties_ is right.
2. create a `npx react-native init` project and `yarn add react-native@nightly`. patch `node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` and try `pod install`

Reviewed By: cipolleschi

Differential Revision: D40021649

Pulled By: cortinico

fbshipit-source-id: c9e2701e524f4b16eab6f2c72b5cfa34883082c3
2022-10-03 08:16:16 -07:00
Nicola Corti a88f805227 Make autorebase less restrictive (#34848)
Summary:
Currently the autorebase feature doesn't work because it fails the `if` validation due to how we distribute permissions.

For now I'm making this action less restricted. We can tweak it if we notice abuse.
Config now is the same as https://github.com/cirrus-actions/rebase

## Changelog

[Internal] - Make autorebase less restrictive

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

Test Plan: Nothing to test

Reviewed By: cipolleschi

Differential Revision: D40022304

Pulled By: cortinico

fbshipit-source-id: 74270b47c61267484c073706fa900f22b3569a94
2022-10-03 08:13:07 -07:00
Aelita e0a495899d Sync new changes in @types/react-native (TextProps, TouchableWithoutFeedbackProps) (#34794)
Summary:
Sync the changes in `types/react-native` https://github.com/DefinitelyTyped/DefinitelyTyped/pull/62394 to here as required by lunaleaps

## Changelog
[Internal] [Added] - Sync new changes in `types/react-native`

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

Test Plan: Tested in `types/__typetests__/index.tsx`

Reviewed By: cortinico

Differential Revision: D39846101

Pulled By: cortinico

fbshipit-source-id: cebe62aa97f764d9a10c8371936870c515fb9be3
2022-10-03 08:01:20 -07:00
Gabriel Donadel Dall'Agnol 32b6f319ba feat: Add support for verticalAlign style (#34567)
Summary:
This adds support for the `verticalAlign` style attribute, mapping the already existing `textAlignVertical` attribute as requested on https://github.com/facebook/react-native/issues/34425. This PR also updates the TextExample.android on the RNTester in order to facilitate the manual QA of this.

## Changelog

[Android] [Added] - Add support for verticalAlign style

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

Test Plan:
1. On Android open the RNTester app and navigate to the Text page
2. Check the text alignment through the `Text alignment` section

https://user-images.githubusercontent.com/11707729/188051914-bf15f7eb-e53f-4de5-8033-d1b572352935.mov

Reviewed By: jacdebug

Differential Revision: D39771237

Pulled By: cipolleschi

fbshipit-source-id: d2a81bec1edd8d49a0fcd36a42fea53734909739
2022-10-03 05:57:30 -07:00
Ruslan Shestopalyuk 9864586b21 Factor out feature flags for RN Fabric core
Summary:
A follow up to D38708718 (403fea25f6) review, this factors feature flags for Fabric core code into a separate file, `CoreFeatures`.

Keeping them together is arguably better for maintenance and makes code easier to reason about.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D40007784

fbshipit-source-id: 1885d5d6200575c6015f063d8b05813b18b47ffb
2022-10-03 05:38:31 -07:00
Anandraj Govindan 9d08d55bbe Use NMake generator for Hermes build on Windows (#34790)
Summary:
CMake on Windows uses "Visual Studio **" generators are [multi-configuration](https://cgold.readthedocs.io/en/latest/glossary/multi-config.html),

which requires the hermes cli and hermes runtime build flavors to be compatible. Using the "MakeFile" generator will avoid the requirement and keeps the gradle script simpler. Please note that the "Makefile" generator is the default when only "Visual Studio Community edition" with default packages is available.

Use NMake generator for Hermes build on Windows

## Changelog
CMake on Windows uses "Visual Studio **" generators are [multi-configuration](https://cgold.readthedocs.io/en/latest/glossary/multi-config.html),

which requires the hermes cli and hermes runtime build flavors to be compatible. Using the "MakeFile" generator will avoid the requirement and keeps the gradle script simpler. Please note that the "Makefile" generator is the default when only "Visual Studio Community edition"  with default packages  is available.

[Android] [Fixed] - Use NMake generator for Hermes build on Windows

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

Test Plan: Verified that RN build on Windows with multiple SKUs of Visual studio.d

Reviewed By: cortinico

Differential Revision: D39889332

Pulled By: cortinico

fbshipit-source-id: f2d39d981e7c58c8cb93a4322155c844cb6bded3
2022-10-03 05:09:20 -07:00
Anandraj Govindan 85c0c0f21f Fixing failure building RN codegen CLI on Windows (#34791)
Summary:
Ensuring the file paths uses forward slashes as separator to avoid the characters from being interpreted as ASCII escape characters.

## Changelog

Fixing build failure building RN codegen CLI on Windows. Ensuring the file paths uses forward slashes as separator to avoid the characters from being interpreted as ASCII escape characters.

[Android] [Fixed] - Fixing failure building RN codegen CLI on Windows

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

Test Plan: Ensured RN main branch builds on Windows with new architecture turned on.

Reviewed By: cipolleschi

Differential Revision: D39889468

Pulled By: cipolleschi

fbshipit-source-id: 7d79eac9f433908cc86dd7ca2eec841739ef6365
2022-10-03 04:56:32 -07:00
Liam Jones 121184bb8f Fix detectCliPath check for cliJsFromNode (#34808)
Summary:
`react.gradle`'s `detectCliPath` was not working correctly for the `cliJsFromNode` check, this fixes it.

## Changelog

[Android] [Fixed] - Fix react.gradle's detectCliPath's for finding the path from Node

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

Test Plan:
Tested manually from a monorepo setup, this incorrect check was preventing the CLI from being found correctly:

```
❯ pwd
/Users/liam.jones/code/monorepo/packages/apps/app1/android

❯ node --print "require.resolve('react-native/cli').bin" # old code
undefined

❯ node --print "require.resolve('react-native/cli')" # new code
/Users/liam.jones/code/monorepo/node_modules/react-native/cli.js

Reviewed By: cortinico

Differential Revision: D39883661

Pulled By: cortinico

fbshipit-source-id: 2120df3443e38631e0fbd9b844aa93a87449186f
2022-10-03 04:22:45 -07:00
Pieter De Baets b9a03ce197 Fix crash when exporting type of existing variable
Summary:
When using flow syntax like this, the parser would throw an error.

```
const foo = new ClassInstance();
export type {foo};
```

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D39850098

fbshipit-source-id: 28a7748892559c2c4a0fb8afa8612cbeb5568058
2022-10-03 04:15:04 -07:00
Pieter De Baets b9e9e852a6 Check for active catalyst instance when using RNLog
Summary:
Works around a crash identified by Sapienz in D39852058 (30411ae1a4)

These logs will still be logged to the console, as they were before

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D39968830

fbshipit-source-id: 5d7a5d935e85a7d67e7780d95b2253e50888ad90
2022-10-03 04:13:53 -07:00
Ruslan Shestopalyuk 110b191b14 Refactor ViewPropsMapBuffer -> general MapBuffer props mechanism
Summary:
Previously, ViewPropsMapBuffer conversions were hardcoded deep in Android infrastructrue. I've generalized this into a different mechanism to allow any Props struct to support MapBuffer props.

There are still some things that need to be cleaned up and this should be treated as experimental. One thing we likely want to do is remove the hardcoded IDs (fine for codegen'd code; less so for handwritten) and use compile-time-hashed IDs instead with human-readable string names.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D38708719

fbshipit-source-id: 64603dee7f21828be31346c555d99862dab304ea
2022-10-03 04:11:02 -07:00
Ruslan Shestopalyuk 2319f75c8e Support iterator-style prop parsing in ImageProps
Summary:
Support iterator-style prop parsing in ImageProps

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D38834100

fbshipit-source-id: 69274595cca8e6f40cd5e0ad9aac1582f57acc61
2022-10-02 03:38:07 -07:00
Ruslan Shestopalyuk 4766755420 Support iterator-style prop parsing in ParagraphProps
Summary:
Support iterator-style prop parsing in ParagraphProps

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D38833627

fbshipit-source-id: 31eac4e86c5855bb47f634da7cffaf2418273a36
2022-10-02 03:38:07 -07:00
Ruslan Shestopalyuk 7de2b6b415 Support iterator-style PropParsing for AndroidTextInput
Summary:
Support iterator-style PropParsing for AndroidTextInput

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D38833510

fbshipit-source-id: 4f424579a41e70fbe8c0eba430bd435dc60bfc04
2022-10-02 03:38:07 -07:00
Ruslan Shestopalyuk 403fea25f6 Refactor MapBuffer experimental setup: use one config for all Props, with a Trait to indicate support
Summary:
Instead of having a special flag just for View MapBuffer props, we now use one flag to indicate that MapBuffer should be used for all props; each XShadowNode must set a special trait indicating if that ShadowNode supports MapBuffer props.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D38708718

fbshipit-source-id: b398ec62a0db9c0ff23c0007c5503cf2838c4173
2022-10-02 02:46:25 -07:00
Tim Yung 4363626701 RN: Enforce `flow-typed` Signatures
Summary:
Creates a new `valid-flow-typed-signature` ESLint rule that validates the `flow-typed` signatures at the top of each file.

This lint rule will discourage contributors from locally forking the `flow-typed` definitions. Instead, any changes should be submitted as patches to the upstream definition in: https://github.com/flow-typed/flow-typed

Changelog:
[Internal]

Reviewed By: rickhanlonii

Differential Revision: D39868721

fbshipit-source-id: e5e3ffe7568dbe52c9b598b53110b0fcbcad3e38
2022-09-30 14:28:48 -07:00
Tim Yung b846849f69 RN: Normalize `flow-typed` Definitions
Summary:
Normalizes the `flow-typed` definitions to reflect what is actually intsalled.

Changelog:
[Internal]

Reviewed By: rickhanlonii

Differential Revision: D39868081

fbshipit-source-id: 85e903bf78f49a9d21e1956ff41c425df0491305
2022-09-30 14:28:48 -07:00
Tim Yung 494c47360f RN: Sort Imports via ESLint
Summary:
Applies the autofix from the newly introduced `lint/sort-imports` ESLint rule.

Changelog:
[Internal]

Reviewed By: cortinico, skinsshark

Differential Revision: D39907798

fbshipit-source-id: 17f5f11b08a5b4bb66286816b78eb26e07e829b8
2022-09-30 14:28:48 -07:00
Tim Yung 868be00d8c RN: Create Portable `sort-imports` ESLint Rule
Summary:
Introduces a portable bundle that implements the `sort-imports` ESLint rule that we use internally at Meta, to the React Native repository.

As a consequence of the rapid changes that occur to this rule internally (and the desire to minimize red tape for Meta engineers), the portable bundle is built with Rollup with a lot of context omitted.

Changelog:
[Internal]

Reviewed By: skinsshark

Differential Revision: D39907799

fbshipit-source-id: 58fb6dc08030f20ac02c0e3fd1b175e22e4d74c0
2022-09-30 14:28:48 -07:00
Nicola Corti 98aa66a646 Fix broken template tests due to missing boost headers (#34829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34829

I realized there is a race condition in how prefab headers are prepared and bundled. If the download of boost is not 'fast enough' the headers will be missing during prefab preparation.
This fixes it.

Changelog:
[Internal] [Changed] - Fix broken template tests due to missing boost headers

Reviewed By: cipolleschi

Differential Revision: D39968622

fbshipit-source-id: 4680f84c15f4443a16def45d41a10a1083f4f196
2022-09-30 14:25:41 -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
Riccardo Cipolleschi f3c98c5fa2 Handle properly negative values in TS parser (#34800)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34800

The TypeScript parser was not handling negative default values properly. The reason why is because the AST for those values is structurally different and wraps them in a `UnaryExpression` with the `-` operator.

This Diff adds the support for those default values and it also add some tests in both Flow and TS.

## Changelog
[General][Fixed] - Properly parse negative values

Reviewed By: cortinico

Differential Revision: D39847784

fbshipit-source-id: 95fc5768987477c540a54a7c4e4ff785d7a1e5d7
2022-09-30 04:02:48 -07:00
Nicola Corti 30371904c1 Unblock template jobs on main due to accidental PRIVATE linking
Summary:
I accidentally broke `main` as I added a PRIVATE link for external libraries.
I need to get back to this, but for the meantime I'm disabling this linking
to make the CI green.

Changelog:
[Internal] [Fixed] - Unblock template jobs on main due to accidental PRIVATE linking

Reviewed By: cipolleschi

Differential Revision: D39932205

fbshipit-source-id: 5acbf567e0c194224a01141273665a293ead8e32
2022-09-30 01:37:48 -07:00
Tim Yung cf98495f7b RN: Fix Copyright on `EventEmitter-test.js`
Summary:
Fixing the copyright header on `EventEmitter-test.js`.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D39961297

fbshipit-source-id: 37867c785e52455f72b489e62892a1ac676339a2
2022-09-30 01:15:29 -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
Nick Gerleman 87e7912b95 Add YGGutter Enum
Summary:
This adds the YGGutter enum, used to choose between row/column gap variants (row-gap, column-gap, gap).

This used later in changes from https://github.com/facebook/yoga/pull/1116, in the APIs which deal with setting gap on style on yoga node.

Note the original PR called this `YGGap`, but this ending up leading to a couple public method signatures that could appear ambiguous:
1. `SetGap(YGGap gap, float gapLength)`: Enums like `YGAlign` are the vaues for an `align` prop. `YGGap` controls the variant of the gap (like `YGEdge` does for left/right/top/bottom variants). So the enum reads as if it is the `gapValue`, and it looks like we have two of the same parameter.
2. `SetGap(YGGap gapDirection, float gap)`: This is misleading, because the direction gaps flow is the cross-axis of flex-direction.
3. `GetGap(YGGap gap)`: `gap` is the variant, but looks like an out param.

The [CSS Box Alignment](https://www.w3.org/TR/css-align-3/#column-row-gap) spec refers to these gaps as "Gutters", which removes the ambiguity.

Changelog:
[General][Added] - Add YGGutter Enum

Reviewed By: yungsters

Differential Revision: D39922412

fbshipit-source-id: 4b0baf800fecb3d03560a4267c7fb4c4330fd39e
2022-09-29 22:25:24 -07:00
Nick Gerleman 5f9689a0d0 Fixup Enum Generator
Summary:
https://github.com/facebook/yoga/pull/1116 adds a new enum. The enum generator is out of date with copyright header, and some codemods, but it also looks like there were manual changes, types added, etc since generation. I fixed up the script to incorporate generating the changes folks made manually, and also added an enum that was previously only added manually to the C ABI.

Changelog:
[General][Fixed] - Fixup Yoga Enum Generator

Reviewed By: yungsters

Differential Revision: D39922252

fbshipit-source-id: b678fa9a43a896873d8c434745bdaf3f16fd991f
2022-09-29 22:25:24 -07:00
Tim Yung 6cd388432d RN: Upgrade CocoaPods Dependencies
Summary:
Upgrades CocoaPods' transitive dependencies to address a security vulnerability.

Changelog:
[Internal]

Reviewed By: hramos

Differential Revision: D39935249

fbshipit-source-id: 7fafcbfbe2e4d60a75de8554bd230c4d78e64032
2022-09-29 17:02:46 -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
Christopher Jones 30411ae1a4 Replace Toast with Log.w on ReactImageView when null URL specified (#34819)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34819

This is crashing on A12 because of using the regular Context instead of the application context. That said, this probably makes more sense as a log warning.

Reviewed By: javache

Differential Revision: D39852058

fbshipit-source-id: 1ac93f8cc9ecdb14f60baca175c8ecff2ff42ac0
2022-09-29 11:21:10 -07:00
Tim Yung 5f5d6b786c RN: Upgrade Dependencies w/ Security Vulnerabilities
Summary:
Upgrades all (indirect) dependencies that had security vulnerabilities.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D39934079

fbshipit-source-id: 6e19c1c691ca2045c0ab6e3e4ac12cf2802ea060
2022-09-29 10:51:37 -07:00
Tim Yung cae0fb6acb RN: Delete `eslint-config-react-native-community/yarn.lock`
Summary:
Deletes `eslint-config-react-native-community/yarn.lock` because the package source directory is part of the `react-native` Yarn workspace (and therefore does not need its own `yarn.lock`).

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D39934080

fbshipit-source-id: dc00b3934965285208fc2fb066ec8b64e8111e9e
2022-09-29 10:51:37 -07:00
Nicola Corti 9f930e2572 Move `react_nativemodule_core` to be consumed via prefab
Summary:
This removes the old way of consuming `libreact_nativemodule_core.so` from
`Android-prebuilt.cmake` to using Prefab which is natively supported
by the Android pipeline.

This is the last mode that we'll have to handle the prefab for.
I'll do the cleanup just after this change landed.

Changelog:
[Internal] [Changed] - Move `react_nativemodule_core` to be consumed via prefab

Reviewed By: cipolleschi

Differential Revision: D39929261

fbshipit-source-id: 61669da2cfd0545160a2a4c596c8e4adb22303ec
2022-09-29 09:45:15 -07:00
Nicola Corti 427ce5f2d2 Expose folly flags and make `folly_runtime` available to be consumed via prefab
Summary:
This removes the old way of consuming `libfolly_runtime.so` from
`Android-prebuilt.cmake` to using Prefab which is natively supported
by the Android pipeline.

Moreover, I've exposed a `folly-flags.cmake` file which can be used by libraries
to know which lists of flags they need to use for Folly.

Changelog:
[Internal] [Changed] - Move `folly_runtime` to be consumed via prefab

Reviewed By: cipolleschi

Differential Revision: D39928571

fbshipit-source-id: 4864c37813ec681a6a464c97de6dfc078f5553f1
2022-09-29 07:44:56 -07:00
Riccardo Cipolleschi 8bb9717faa Back out "RN: Switch to `Choco-Install` from Windows Hermes CI" (#34818)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34818

Original commit changeset: 69c03845d2f2

I had to back this out because Choco-Install is not recognized by CircleCI and currently the OSS pipeline is broken.

This didn't happen in previous Jobs because Hermes has not changed and the build was skipped.
See [this job](https://app.circleci.com/pipelines/github/facebook/react-native/16088/workflows/d9e1c028-9422-4609-ba9f-6c35460efbb5/jobs/303255?invite=true#step-104-40) for example.

## Changelog
[General][Fixed] - Fix the Windows Pipeline

Reviewed By: cortinico

Differential Revision: D39928281

fbshipit-source-id: be641efe026a9d3f7cd75943e9b7a39ab1673e18
2022-09-29 07:22:39 -07:00