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

587 Коммитов

Автор SHA1 Сообщение Дата
Pieter Vanderwerff bd4ddbe5e5 Deploy 0.225.0 to xplat (#42004)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42004

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D52305312

fbshipit-source-id: b18045c450dc3204b08452ede17b76d1a43cce50
2023-12-19 14:40:47 -08:00
Alex Taylor (alta) 1fed7ab8ea Deploy 0.224.0 to xplat (#41949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41949

Changelog: [internal]

Reviewed By: gkz

Differential Revision: D52177280

fbshipit-source-id: 37fe478645ad30b40f4fb4e81d7fc467ac971928
2023-12-14 14:58:43 -08:00
Michał Pierzchała 6e88d67b8c Bump CLI to 13.0.0 (#41722)
Summary:
Updates the RN CLI to v13.0.0, which targets main and future 0.74

## Changelog:

[GENERAL] [CHANGED] - Bump CLI to v13.0.0

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

Reviewed By: robhogan

Differential Revision: D51809848

Pulled By: huntie

fbshipit-source-id: 653d747526bec5c4f766c22ffd3fcae8eac620a0
2023-12-10 18:13:00 -08:00
Sam Zhou ea309a7583 Deploy 0.223.3 to xplat (#41809)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41809

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D51855821

fbshipit-source-id: 4fe9c937aff925150fb015be2ea93fa120e7f462
2023-12-05 10:45:32 -08:00
Ji An Yang be9196855d Revert D51839509: Deploy 0.223.3 to xplat
Differential Revision:
D51839509

Original commit changeset: 961fc4e8fc0f

Original Phabricator Diff: D51839509

fbshipit-source-id: 71a97ee1971d5c882cb704f4f9ff42a95e6d52f6
2023-12-05 00:34:49 -08:00
Sam Zhou 09451ae17c Deploy 0.223.3 to xplat (#41797)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41797

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D51839509

fbshipit-source-id: 961fc4e8fc0f7a45c3882753301d027f319b9ea6
2023-12-04 23:04:11 -08:00
Sam Zhou 448e6b8f84 Deploy 0.223.2 to xplat
Summary: Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D51768863

fbshipit-source-id: 716add02d82cdfa56f2d3fc4d4560fcb26e8f426
2023-12-01 13:42:10 -08:00
Pieter Vanderwerff ede35df163 Deploy 0.223.0 to fbsource (#41725)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41725

Reviewed By: SamChou19815

Differential Revision: D51713020

fbshipit-source-id: 84dc8c882f7603d642cb4ccb735fad0fb7e25d4d
2023-11-30 11:25:47 -08:00
Alex Taylor (alta) c98fa9ce8b Update hermes-parser and related packages in fbsource to 0.18.0 (#41689)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41689

Bump hermes-parser and related packages to 0.18.0.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D51642821

fbshipit-source-id: b7abde7d3e0de195c18a5cb18d4cdd0a1d435127
2023-11-30 10:35:12 -08:00
Sam Zhou a1b7a20779 Deploy 0.222.0 to xplat (#41505)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41505

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D51385560

fbshipit-source-id: 66848643776e40bd92b23d8b6147b32659ec6ec5
2023-11-16 00:43:48 -08:00
Moti Zilberman 560e0f0005 Migrate to @rnx-kit/chromium-edge-launcher for Windows fix (#41367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41367

Andrew Coates graciously published the Windows Edge launcher fix from https://github.com/cezaraugusto/chromium-edge-launcher/pull/1 as a new package (https://github.com/microsoft/rnx-kit/pull/2796), so let's pull that into `dev-middleware`.

Changelog: [Internal] - Fix experimental debugger launch flow with Edge on Windows

Reviewed By: robhogan

Differential Revision: D51086297

fbshipit-source-id: 3a8db351f71eb31a9609c987cdb4dc66f24f9403
2023-11-15 00:18:10 -08:00
Sam Zhou d7af27dd7d Deploy 0.221.0 to xplat (#41400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41400

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D51181099

fbshipit-source-id: 9489dc78e305eb44602baf0a719aaee0ba898a76
2023-11-09 16:57:15 -08:00
Moti Zilberman 3afadef6d6 Add tests for source map fetching and URL rewriting hacks (#41339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41339

Tests for D42973408, D14800976, and D15116579.

Changelog: [Internal]

Reviewed By: blakef

Differential Revision: D51013055

fbshipit-source-id: cff8a9d1dd22b642117594da16e6b74cf679aa34
2023-11-08 07:19:40 -08:00
Moti Zilberman c6eccda2c7 Add tests for HTTPS-specific behaviour (#41341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41341

* Extends `dev-middleware`'s test utilities to enable testing against an HTTPS server with a self-signed cert.
* Runs the CDP transport integration tests (D51002261) using both HTTP and HTTPS.
* Adds a test to explicitly cover the `ws=...` / `wss=...` variation in `devtoolsFrontendUrl` first introduced in D49158227.

Changelog: [Internal]

Reviewed By: blakef

Differential Revision: D51006835

fbshipit-source-id: df3db8cd865898248cd0d8f307f75949a7f313fd
2023-11-08 07:19:40 -08:00
Moti Zilberman 38a878194b Add CDP transport tests (#41343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41343

Changelog: [Internal]

Adds basic tests for two-way communication between a debugger (frontend) and a target (backend) using CDP over `inspector-proxy`.

Reviewed By: blakef

Differential Revision: D51002261

fbshipit-source-id: 44e571f89437c26e76ef6e6192b2bf6244665cf0
2023-11-08 07:19:40 -08:00
Moti Zilberman 5abaf388cd Use hermes-parser for Flow codegen specs (#39036)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39036

Changelog: [General][Changed] Use `hermes-parser` instead of `flow-parser` to parse Flow Codegen specs.

`hermes-parser` is a WASM build of the Hermes parser (plus supporting code), maintained by the Flow and Hermes teams. It is the recommended way of parsing Flow code in Node and its benefits (compared to `flow-parser`) include better performance and improved type safety.

Here we update `react-native/codegen` to use `hermes-parser` instead of `flow-parser`. Both parsers produce ASTs that conform to the ESTree spec so this is mostly a drop-in replacement.

In future work we should be able to use the improved AST types available in `hermes-estree` to improve type safety within `react-native/codegen` itself.

Reviewed By: huntie

Differential Revision: D48384078

fbshipit-source-id: 310ad150ec62671ba395b0e2f6415ccae97ac04d
2023-11-08 01:33:42 -08:00
George Zahariev 1e21e34695 Update hermes-parser and related packages in fbsource to 0.17.1 (#41328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41328

Update hermes-parser and related packages in fbsource to 0.17.1

Changes are just bug fixes: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D50999408

fbshipit-source-id: 0d8e01719fecff648fb0c3800296c335962d7fd9
2023-11-06 11:56:03 -08:00
Jon Thysell (JAUNTY) c90485eb10 Add detection of logical assignment operators to `react-native-babel-preset` (#39186)
Summary:
Though not currently in use in the RN code, when `react-native-windows` tried to integrate changes up to 7/28/23 (see PR https://github.com/microsoft/react-native-windows/pull/11970) there happened to be a `??=` operator in the `virtualized-lists` package (see [diff here](ccc50ddd2...c168a4f88 (diff-abeff2daf5909e54a23562e43569de1d5b8db1d7170119eed485b618cdf04ec7R322))). (The offending line was removed in a later commit).

The default RNW engine is still Chakra and it couldn't handle the syntax. It looks like the `babel/plugin-proposal-nullish-coalescing-operator` plugin only handles `??`, so to handle `??=` I've added `babel/plugin-proposal-logical-assignment-operators`, which also happens to handle the logical assignment operators `||=` and `&&=`.

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

## Changelog:

[GENERAL] [FIXED] - Add detection of logical assignment operators to `react-native-babel-preset`

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

Test Plan: We started using these plugins in RNW's babel config to resolve the issue in our integrate PR.

Reviewed By: motiz88

Differential Revision: D50936554

Pulled By: rozele

fbshipit-source-id: 0a924b6085524d8c9551a158b91195b1f7448c19
2023-11-06 08:52:25 -08:00
szymonrybczak d077239fff Upgrade CLI to v12.0.0 (#41249)
Summary:
Related https://github.com/react-native-community/cli/issues/2143

## Changelog:

[General] [Changed] - Upgrade CLI to v12.0.0

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

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D50810438

Pulled By: lunaleaps

fbshipit-source-id: de96015557019446d268489c5ae534c255b3ddc8
2023-11-04 00:04:33 -07:00
Sam Zhou 2a9caecf31 Deploy 0.220.1 to xplat (#41318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41318

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D50992189

fbshipit-source-id: 0b3b9adfdef6cffbb9f3dacce3ced8b8dbbffc4e
2023-11-03 17:08:45 -07:00
Sam Zhou edcee71318 Deploy 0.220.0 to xplat (#41246)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41246

Changelog: [Internal]

Reviewed By: mroch

Differential Revision: D50793514

fbshipit-source-id: 33ac73116e94c7dbf892afa9b6bb26a456c0c4b0
2023-10-31 21:35:31 -07:00
Rob Hogan 7853b06929 Update Metro to ^0.80.0 - don't pin to exact version (#41219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41219

Bump to the latest Metro release. This includes minor breaking changes to Metro subpackages that should *not* be visible to RN users.

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

## Moving to unpinned versioning
Metro is a multi-package project, and not pinning to an exact version means multiple versions of `metro*` packages may appear in an RN project.

This isn't unusual in the NPM ecosystem and *shouldn't* be a problem, but historically has caused issues (eg https://github.com/facebook/react-native/issues/34714, https://github.com/facebook/metro/issues/1017). The root cause of all of these issues, as far as we know, was fixed in 6d46078e74, a bug where Node hierarchical resolution was effectively sidestepped via a relative worker path, resulting in a mismatch between transformer and host process.

In addition, the fact that `react-refresh`, `metro-react-native-babel-transformer` and `metro-react-native-babel-preset` are now fully moved into the `react-native/` scope and versioned with React Native means there are no circular dependencies between React Native and Metro, explicit or implicit, and we're much more clearly decoupled.

So, we're moving to caret versioning to allow React Native users to pick up Metro fixes and features without requiring React Native releases and user upgrades.

Changelog:
[General][Changed] - Update Metro to ^v0.80.0, stop pinning to an exact version

Reviewed By: GijsWeterings

Differential Revision: D50731999

fbshipit-source-id: 57b07bf73c0b31f392c4d36376ca48b48a8bd598
2023-10-27 10:42:46 -07:00
Sam Zhou 615057c239 Deploy 0.219.4 to xplat (#41173)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41173

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D50589991

fbshipit-source-id: c221988e75fccccabec8ee69f6941bb83e42a052
2023-10-24 08:32:35 -07:00
Sam Zhou 6e42c98aa3 Deploy 0.219.2 to xplat (#41069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41069

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D50438577

fbshipit-source-id: 429050072e48b081b8449468b6878190108f23b9
2023-10-18 19:33:04 -07:00
Pieter Vanderwerff 03594c219d Update xplat and arvr to 0.17.0 (#41067)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41067

Bump `hermes-parser` packages to the latest released version.

Changelog: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Notable changes:
- Added parsing support for `as` expressions as well as `renders*` and renders?`.
- Updated internal prettier version to `3.0.3`.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D50395762

fbshipit-source-id: 8a9131ea1b0683e79c7bc74b4df9deafac7450f9
2023-10-18 14:21:40 -07:00
Alex Taylor (alta) 191c3deae2 Deploy 0.219.0 to xplat (#41066)
Summary:
X-link: https://github.com/facebook/metro/pull/1119

X-link: https://github.com/facebook/relay/pull/4490

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

X-link: https://github.com/facebook/hermes/pull/1163

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D50413448

fbshipit-source-id: f77f8a1907e9a2589993cdc0f9b2838c6d0355a5
2023-10-18 13:43:26 -07:00
Rob Hogan f00594b262 Bump dependency on `deprecated-react-native-prop-types` (#40869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40869

Bumps DRNPT to v5 - the significant change is that this one depends on `react-native/normalize-color: ^0.73.0`, instead of `*`, so is protected from future breaking changes to that package.

NOTE: We can't safely include `react-native/normalize-color: ^0.74.0` in the dependency range of DRNPT because `0.74.0` isn't a semver-compliant release (0.74 isn't cut yet), so this will pull 0.73.2 from NPM, which is fine.  We may need to publish DRNPT@6 if 0.74 final turns out to contain breaking changes (eg, a Node 20 bump).

Changelog:
[General][Fixed] Update `deprecated-react-native-prop-types` to remove fragile transitive `*` dependencies.

Reviewed By: huntie

Differential Revision: D50228564

fbshipit-source-id: 01aafafad40d9a93d00de2b5f45d2796620b9b5d
2023-10-13 08:24:09 -07:00
Alex Hunt 9e068ac163 Add --experimental-debugger-frontend flag, restore 0.72 flow as base (#40766)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40766

This changeset allows users to opt into the new debugger frontend experience by passing `--experimental-debugger` to `react-native start`. **We are defaulting this option to `true`** for now, but will continue to evaluate this feature before 0.73 ships. It restores Flipper (via `flipper://`) as the default handling for `/open-debugger` (matching 0.72 behaviour) when this flag is not enabled.

Detailed changes:

- Replaces `enableCustomDebuggerFrontend` experiment in `dev-middleware` with `enableNewDebugger`. The latter now hard-swaps between the Flipper and new launch flows.
    - Removes now-unused switching of `devtoolsFrontendUrl`.
- Implements `deprecated_openFlipperMiddleware` (matching previous RN CLI implementation).
- Disables "`j` to debug" key handler by default.
- Marks "`j` to debug" and `/open-debugger` console logs as experimental.

Changelog:
[Changed][General] Gate new debugger frontend behind `--experimental-debugger` flag, restore Flipper as base launch flow

Reviewed By: motiz88

Differential Revision: D50084590

fbshipit-source-id: 5234634f20110cb7933b1787bd2c86f645411fff
2023-10-10 09:37:41 -07:00
Marc Rousavy 5de0ddae30 chore: Upgrade ESLint for `eslint-config-react-native` (#39654)
Summary:
When upgrading ESLint to latest, the RN plugin fails to run because of a deprecated API:

```
Error: Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
```

## Changelog:

- [GENERAL] [FIXED] Updated ESLint version to fix `originalKeywordKind` deprecation error

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

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

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

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

Test Plan: Run CI and Lint

Reviewed By: NickGerleman

Differential Revision: D49634978

Pulled By: robhogan

fbshipit-source-id: f65f0d56053acf1c877fe0f368a7f4e13c8c57d1
2023-10-09 10:19:37 -07:00
Pieter Vanderwerff 2268756fa4 Deploy 0.218.0 to xplat (#39837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39837

Changelog: [Internal]

Reviewed By: alexmckenley

Differential Revision: D49965791

fbshipit-source-id: 40c661e81e69add96831405e75aea02fb768f2e6
2023-10-05 17:44:21 -07:00
Pieter Vanderwerff 48c542449c Upgrade xplat/js + arvr/js to hermes-parser 0.16.0 (again) (#39819)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39819

Bump `hermes-parser` packages to the latest released version.

Changelog: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Notable changes:
- Upgraded to the lastest version of emscripten for the parser.
- The babel interop logic now more closely matches babel's AST.
  - The biggest change is we now add the `extra.raw` properties to literal nodes, which results in Babel more closely outputting literal sources. e.g. previously the following would happen `1.0` -> `1`, `'foo'` -> `"foo"` and `1n` -> `1` but now the raw source value is preserved.
- Upgraded `prettier-plugin-hermes-parser` to use the latest prettier formatting logic, which causes some minor formatting changes.
- `hermes-parser` no longer fails when the `component` name is used within a function type, e.g. `type Foo = (component: string) => void`.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D49935231

fbshipit-source-id: a905838396fdd7281442c211970e0caa773a1256
2023-10-05 11:19:05 -07:00
Hakeem King 7a320f1a9d Revert D49838842: Upgrade xplat/js + arvr/js to hermes-parser 0.16.0
Differential Revision:
D49838842

Original commit changeset: ebfd2f89852d

Original Phabricator Diff: D49838842

fbshipit-source-id: 3a4ecd10c4ed4f425dde7d70f43dc89fc1a7549f
2023-10-04 14:42:50 -07:00
Pieter Vanderwerff 4416de35f7 Upgrade xplat/js + arvr/js to hermes-parser 0.16.0 (#39791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39791

Bump `hermes-parser` packages to the latest released version.

Changelog: https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md

Notable changes:
- Upgraded to the lastest version of emscripten for the parser.
- The babel interop logic now more closely matches babel's AST.
  - The biggest change is we now add the `extra.raw` properties to literal nodes, which results in Babel more closely outputting literal sources. e.g. previously the following would happen `1.0` -> `1`, `'foo'` -> `"foo"` and `1n` -> `1` but now the raw source value is preserved.
- Upgraded `prettier-plugin-hermes-parser` to use the latest prettier formatting logic, which causes some minor formatting changes.
- `hermes-parser` no longer fails when the `component` name is used within a function type, e.g. `type Foo = (component: string) => void`.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D49838842

fbshipit-source-id: ebfd2f89852d1bd3b1671ce77f58240d7e17cfbb
2023-10-04 11:14:59 -07:00
Sam Zhou d95433f824 Deploy 0.217.2 to xplat (#39716)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39716

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D49786290

fbshipit-source-id: c29e57d133134c538fd96384e0e19a6d73c525f6
2023-10-01 10:53:18 -07:00
evanbacon 030663bb06 bump react-refresh to latest (#39486)
Summary:
- Companion PR to https://github.com/facebook/metro/pull/1085
- The Fast Refresh changes appear to be required for using static rendering and React DOM. In frameworks like Expo Router which support both native and web, this causes users to not be able to use Fast Refresh on web.

## Changelog:

[GENERAL] [CHANGED] - Upgrade React Refresh package from 0.4.0 to 0.14.0

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

Test Plan:
1. In a React Native project's `package.json`:
```json
 "resolutions": {
    "react-refresh": "~0.14.0"
  },
```
2. Start the server with a clear Metro cache.
3. Changes should update while preserving React state.

Reviewed By: huntie

Differential Revision: D49348078

Pulled By: robhogan

fbshipit-source-id: ac3dcb096c35c6c29c6e6a919cf263559bceaa7c
2023-09-24 07:16:28 -07:00
Pieter Vanderwerff 29f62a41b4 Deploy 0.217.0 to fbsource (#39610)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39610

Reviewed By: SamChou19815

Differential Revision: D49522399

fbshipit-source-id: 98dc8ce53a4dea2b68909fda5f92251c6cc91717
2023-09-22 17:29:26 -07:00
Alex Hunt 1e44a5f518 Bump CLI to 12.0.0-alpha.15 (#39576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39576

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D49496981

fbshipit-source-id: bae2a5fed9d795afcd58e8e24c3ff47c01707d4e
2023-09-21 10:18:51 -07:00
Arushi Kesarwani 982f6f99d4 Upgrade Metro to 0.79.1 in RN (#39273)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39273

Upgrade Metro dependencies to 0.79.1 in `react-native`

This includes Metro breaking changes for disabling global package resolution by default and adds features like: Haste packages, enable resolution through symlinks and passing custom customTransformOptions and customResolverOptions to bundle_build_started log event so as to refine the bundling message. It also fixes arbitrary transformation of Babel plugins during registration in `metro-babel-register` and fixes "unexpected null" crash when handling a batch of file changes and symlinks with indirections.

**Full Metro Changelog:** https://github.com/facebook/metro/releases/tag/v0.79.1
https://github.com/facebook/metro/releases/tag/v0.79.0

Changelog:
[General][Changed] Upgraded Metro to 0.79.1

Reviewed By: motiz88, mdvacca

Differential Revision: D48922815

fbshipit-source-id: 37aea6194fe587e0d094c96ceec1122c588f0fbb
2023-09-19 21:42:33 -07:00
Alex Hunt 850e550422 Add serverBaseUrl option, set client-accessible URL value externally (#39456)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39456

**Fixes new debugger launch flow on Android:**

D49158227 aimed to improve proxy-safe behaviour for remote dev servers by auto-detecting the appropriate server URL for clients using the `Host` header (etc) from the HTTP request. However, this approach broke the local case for Android emulators and externally connected devices since they would originate from a device-relative server hostname — e.g. `10.0.2.2` for the stock Android emulator.

https://pxl.cl/3mVmR

This commit reverts to an explicit approach where callers specify the base URL to the dev server that should be addressible from the development machine — now as a single `serverBaseUrl` option.

**Changes**

- Adds new `serverBaseUrl` option to `createDevMiddleware`, designed to be the base URL value for constructing dev server URLs returned in endpoints such as `/json/list`.
    - This changes little for the `localhost` case (now enabling `https://` URLs), but enables remote dev server setups to specify this cleanly.
- Updates call site in `community-cli-plugin`.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D49276125

fbshipit-source-id: 2b6a8507073649832993971aa9d0870f54c9bd44
2023-09-15 13:11:04 -07:00
szymonrybczak 9d52767c01 fix(e2e): add versions when installing appium drivers (#39275)
Summary:
Right now we're fetching latests versions of drivers which isn't the best, we should always download the same versions.

## Changelog:

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

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

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

[INTERNAL] - Add versions when installing Appium drivers.

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

Test Plan: CI Green - (side note: if jobs `test_e2e_ios` and `test_e2e_android` are green it doesn't mean that they passed.)

Reviewed By: cipolleschi

Differential Revision: D49248778

Pulled By: NickGerleman

fbshipit-source-id: 5b114b7dc1172993afc4b02e9d3380afa9f03c40
2023-09-14 05:21:09 -07:00
Tim Yung db4a253c1e RN: Support Private Methods & Properties (#39318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39318

Updates `react-native/babel-preset` to support private methods and properties.

Changelog:
[General][Added] Added plugins for private methods and properties to `react-native/babel-preset`.

Reviewed By: asiandrummer

Differential Revision: D49029339

fbshipit-source-id: 2e0578886b22770d3f037ce184b842ee15a59c8e
2023-09-11 13:39:50 -07:00
Sam Zhou d31d16b19c Deploy 0.216.1 to xplat (#39343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39343

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D49082963

fbshipit-source-id: a2ad631fa1efcc83eecb1a47bd24cbbd96a3f08f
2023-09-08 10:53:35 -07:00
Pieter Vanderwerff 2608a37564 Deploy 0.216.0 to xplat (#39319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39319

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D49031141

fbshipit-source-id: 926f471d0843484466918f28dd0369d38db333a7
2023-09-07 09:00:56 -07:00
Moti Zilberman 3ec22c1e69 Add option to enable experimental debugger frontend (#39227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39227

Changelog: [Internal]

1. Adds an `unstable_experiments` option to `createDevMiddleware` in `react-native/dev-middleware`.
2. Adds `enableCustomDebuggerFrontend` (default `false` for now) as an experiment flag controlling whether the new debugger frontend (D48680624, D48682302) is in use. We plan to enable this by default in RN 0.73 after additional testing.

If enabled, the new debugger frontend will only be used for the `/open-debugger` flow

Reviewed By: huntie

Differential Revision: D48602725

fbshipit-source-id: 598865b559478df1f19420daf3633ee6c233362a
2023-09-04 12:21:47 -07:00
Moti Zilberman b27607f853 Add debugger-frontend package and manual build script (#39161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39161

Changelog: [Internal]

Creates a new stub package named `react-native/debugger-frontend`, which will contain a minimal build of the Chrome DevTools frontend adapted for React Native. Initially, the compiled frontend assets will be checked into the React Native repo, but we intend to replace this with a fully automated build in CI at a later date.

Reviewed By: huntie

Differential Revision: D48680624

fbshipit-source-id: a24c8b019881187963d0be88e773bc0a97a2437d
2023-08-31 08:34:33 -07:00
Alex Hunt 4cb9706331 Add Microsoft Edge support for opening debugger (#39146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39146

Adds Microsoft Edge fallback for the `/open-debugger` endpoint when no Chrome installation is found.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48563386

fbshipit-source-id: 74baba7c03a062bd769b2f9ac0cc35bac0b2ae65
2023-08-24 10:57:39 -07:00
Sam Zhou 06d472c05f Deploy 0.215.1 to xplat (#39133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39133

Changelog: [Internal]

Reviewed By: samwgoldman

Differential Revision: D48615176

fbshipit-source-id: 6fe1d27eff1fb29b63bf982cf8ed6eabc000f3a2
2023-08-23 14:10:27 -07:00
Alex Hunt a002fbbd6c Upgrade CLI, restore prev status check value (#39077)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39077

Follow-up to https://github.com/facebook/react-native/pull/38988.

- Upgrade to RN CLI `12.0.0-alpha.11`.
- Restore previous value check against `/status` response in test scripts (restored in above CLI alpha).

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48432629

fbshipit-source-id: 175241ad75676281f4638e179873b2ce32f0ea3e
2023-08-22 12:56:19 -07:00
Moti Zilberman d10a8098b2 Log debugger command latency and status (#39107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39107

Augments D48466760 to report debugger commands (request/response pairs) through `EventReporter`. With the appropriate backend integration, this can help validate the correctness/completeness of the CDP implementation (in the client, proxy and server) and measure the latency of debugger commands - more accurately, the time between the proxy receiving a command from the client and receiving the corresponding response from the server.

Most of the new logic here is in the `DeviceEventReporter` class, which is responsible for associating responses with requests. Requests are kept in a buffer with a 10s TTL which serves as a timeout in case of an unresponsive server.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D48480372

fbshipit-source-id: 55360a14bbea05ef8ad1622e0d54f18b47483809
2023-08-22 11:11:50 -07:00
Sam Zhou ffcbff8374 Deploy 0.215.0 to xplat (#39098)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39098

Changelog: [Internal]

Reviewed By: pieterv

Differential Revision: D48535689

fbshipit-source-id: 67ab2ea08a6ae7530fe25c14021dfc1b952a3db6
2023-08-21 17:08:00 -07:00