Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52168
# Changelog: [Internal]
The main reason for the stub is to make sure this method is always installed. The actual implementation will be part of the `jsinspector-modern` stack, which is fully initialized in production builds.
Once there is a gurantee that RuntimeTarget globals are always installed in any environments, we can remove polyfills altogether.
Reviewed By: rubennorte, GijsWeterings
Differential Revision: D76987507
fbshipit-source-id: 2602af28f9e4359cf58dfafdf84802c0bf92372d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51790
Adds `flow` or `noflow` to the remaining files that are outside of `packages/react-native/{Library,src}`.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75904614
fbshipit-source-id: cb2c0969065cf443c3a6e74da0fa3708fda67d18
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51788
Adds `flow` to the remaining files that are lacking it in the `packages/rn-tester` directory.
This also adds any necessary type annotations and fixes lint warnings.
Changelog:
[Internal]
Reviewed By: SamChou19815
Differential Revision: D75899307
fbshipit-source-id: 27a74ed0007b3b754446a45931c2c148312d5e3a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50964
Address/supress ESLint warnings across the codebase, currently flagged on every PR via GitHub's "Unchanged files with check annotations" check.
{F1977480883}
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D73778510
fbshipit-source-id: 91bed86877eae74fa3b9ebea71e26cdcaeee1761
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48592
Changelog: [General][Added] Add support for the second parameter of `console.table` to specify a list of columns to print in the table.
Reviewed By: javache
Differential Revision: D67803665
fbshipit-source-id: 354476404bad7cd2d280c8b3d963d5acba41f86b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48591
Changelog: [General][Changed] Improved formatting of values logged via `console.table` (including Markdown format).
This provides several improvements over the format of tables logged via `console.table`:
* Markdown format for easy integration in existing documents.
* Increased alignment with the spec and Chrome/Firefox implementations:
* Added index columns.
* Logged all available columns.
* Format for all types of values (including objects, functions, etc.).
Reviewed By: javache
Differential Revision: D67794858
fbshipit-source-id: 464c938ed51f28a8e071bc46f0f5b0d970005873
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48076
JSC for Android does not implement `String.prototype.replaceAll`:
{F1971791988}
https://github.com/facebook/react-native/pull/47466 introduced a use of it into runtime code, breaking JSC compatibility.
This.. replaces it.. with `replace`. Since the argument is already a regex with a `g` modifier, `replaceAll` wasn't necessary anyway.
Changelog:
[ANDROID][FIXED] Fix JSC by avoiding use of unavailable `str.replaceAll()`
Reviewed By: javache
Differential Revision: D66712312
fbshipit-source-id: 534b6db6834a2fda46ae8457437de3caa24f4eb0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47466
Now, when the useAlwaysAvailableJSErrorHandling feature flag is true, React Native will use the earlyjs c++ error reporting pipeline for handling all javascript errors!
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D64715159
fbshipit-source-id: 597a5278eb792f87dca10e06fa9816b3a8c47b84
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47276
This dates back all the way to D4021502 and is unused by any of our modern debugger tools.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D65134285
fbshipit-source-id: 44d8bf2553b28558755e9a603b8ddc8f7dd79b20
Summary:
While developing React Server Component support for React Native, I've been adding this patch to the `react-native` package. It opts the entire `react-native` package out of being server rendered.
In the future, we'll want to circle back and refactor the `react-native` package to be more isomorphic so we can allow for utilities like `processColor` to be used in server bundles that target native platforms.
## Changelog:
[GENERAL] [ADDED] - Added support for importing `react-native` in a `react-server` environment for React Server Components support.
<!-- 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/43986
Test Plan:
Using react-native with this patch in a framework that supports React Server Components for native platforms, such as my unreleased branch of Expo Router, will allow for server rendering views from `react-native` to RSC Flight code with client references to the `react-native` package, e.g.
```js
import { View } from 'react-native';
export default function App() {
return <View testID="basic-view" style={{ "backgroundColor":"#191A20" }}/>
}
```
Can be server rendered to ↓
```
2:I["/node_modules/react-native/index.bundle?platform=ios&dev=true#798513620",["..."],"View"]
1:["$","$L2",null,{"testID":"basic-view","style":{"backgroundColor":"#191A20"}}]
```
> The client boundaries (URL paths) are specific to the current Expo CLI implementation (based on Metro) and may look different in other implementations.
Reviewed By: rickhanlonii
Differential Revision: D55891243
Pulled By: TheSavior
fbshipit-source-id: d8dc9590039181ebf2c013dacca5f255d7a8f625
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43459
Changelog: [General][Changed] - Console polyfill now copies all properties from the existing `console` object
Fusebox now exposes a full WHATWG `console` object integrated directly with CDP debugging (D54826073). Some WHATWG `console` methods are missing from React Native's polyfill/shim, so let's pass those through unmodified so they can still be called.
(Long term, we shouldn't need most of `console.js`, but let's get there gradually as there are many RN users still depending on `nativeLoggingHook` etc.)
NOTE: We also update the "bundled" copy of `console.js` that lives in the jsinspector-modern C++ test suite.
Reviewed By: huntie
Differential Revision: D54827902
fbshipit-source-id: c6c9128903496810192614f4f8d80b68b02e25c4
Summary:
When I upgraded React Native to Prettier v2.x, I removed `format` from a few files to reduce the number of changes.
This is a follow-up to bring back `format` and fix any remaining issues.
Changelog:
[Internal]
Reviewed By: zertosh
Differential Revision: D32287259
fbshipit-source-id: 37ea6d2c973b1db5d37c46d73675bdf436fb9a9d
Summary:
We are in the middle of a Prettier upgrade and some of the files which disagree between Prettier v1.x and v2.x are now being flagged by `eslint-plugin-prettier` as lint errors.
The correct fix here is probably to update `eslint-config-prettier` and `eslint-plugin-prettier`, but I am landing this first to unbreak CI.
Reviewed By: mendoncakeegan
Differential Revision: D32129458
fbshipit-source-id: a5206a5ef58f1d7614f9459c99b9e39109be6de9