This project is mirrored from https://github.com/facebook/react-native.git.
Pull mirroring updated .
- Jul 12, 2023
-
-
Lorenzo Sciandra authored
This reverts commit 7a4ae799.
- Jul 11, 2023
-
- Jul 10, 2023
-
-
Lorenzo Sciandra authored
-
Lorenzo Sciandra authored
This reverts commit 73ca0448.
-
Lorenzo Sciandra authored
-
Lorenzo Sciandra authored
#publish-packages-to-npm
-
Lorenzo Sciandra authored
-
Riccardo Cipolleschi authored
Summary: We had to disable the envinfo command on test_windows to get the CI back to green. The reason why it started failing is because they released 7.9.0 which does not seem to have the executable on Windows, so `npx` fails to find what to run. This fix restore the command in a way that it should display the envinfo using an older version of the package. I also added a task to come back to this periodically. ## Changelog: [Internal] - Restore envinfo on windows Pull Request resolved: https://github.com/facebook/react-native/pull/38062 Test Plan: - CircleCI: test_windows stays green Reviewed By: cortinico Differential Revision: D47016995 Pulled By: cipolleschi fbshipit-source-id: 368367caed7ea49d7419475580a39f9406c54757 # Conflicts: # .circleci/config.yml
-
Lorenzo Sciandra authored
#publish-packages-to-npm
-
Riccardo Cipolleschi authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38223 Before this change, the InteropLayer was adding the view to the registry right before invoking a command and right after the command was invoked. This model was too strict as some view commands may have async behaviors that make the lookup in the registry fail. After this change, we are going to register the view when it's created and we are going to remove it when the view is deallocated. ## Changelog: [iOS][Changed] - Update logic to add and remove views in the view registry for the interop layer. Reviewed By: sammy-SC Differential Revision: D47262664 fbshipit-source-id: 503f4e29e03bfc7ad861c1502129822b383ffcc0
-
Kudo Chien authored
Summary: the `IntializeCore` is critical to react-native for setup polyfills. without this, we would have some erros like undefined `global.performance`. since the effort is now proposing `react-native/metro-config` as universal metro-config, it is better to have the `IntializeCore` in it. we ran into issues when using expo-cli in bare react-native projects. it happens when using [the default metro config](https://github.com/facebook/react-native/blob/5f84d7338f42fe9b1d5bf2a9b1c8321b59551f15/packages/react-native/template/metro.config.js) and starting metro server without the react-native-community-cli. ### Why the issue does not happen on `yarn react-native start`? when using `yarn react-native start`, the react-native-community-cli will merge its internal metro-config with the `InitializeCore` ([https://github.com/facebook/react-native/issues/1](https://github.com/react-native-community/cli/blob/5d8a8478cd104adf4a4dd34c09c2e256325ae61d/packages/cli-plugin-metro/src/commands/start/runServer.ts#L56), [https://github.com/facebook/react-native/issues/2](https://github.com/react-native-community/cli/blob/e8e7402512da8c3fbbc58a195284ef0008c7491f/packages/cli-plugin-metro/src/tools/loadMetroConfig.ts#L51-L61)). that's why the issue doesn't happen on react-native-community-cli. ## Changelog: [GENERAL][FIXED] - `global.performance` in undefined when starting metro from Expo CLI Pull Request resolved: https://github.com/facebook/react-native/pull/38207 Test Plan: ```sh $ npx react-native init RN072 --version 0.72 $ cd RN072 $ yarn add expo $ npx expo run:ios # then it hits the exception because the global.performance is undefined. ``` Reviewed By: rshest Differential Revision: D47257439 Pulled By: huntie fbshipit-source-id: ae294e684047e503d674f0c72563b56d1803ba36
-
fergusean authored
Summary: Fixes a regression added [on merge of https://github.com/facebook/react-native/issues/37531](https://github.com/facebook/react-native/commit/260bcf7f1bf78022872eb2f40f33fb552a414809#diff-16a358d6a9dea8469bfdb899d0990df1c32b8c3b1149c86685bec81f50bd24beR179) (though oddly I don't see it in [https://github.com/facebook/react-native/issues/37531's diff](https://github.com/facebook/react-native/pull/37531/files#diff-16a358d6a9dea8469bfdb899d0990df1c32b8c3b1149c86685bec81f50bd24beR179), so perhaps added during conflict resolution?) where multiple arguments in `$EXTRA_COMPILER_ARGS` are now incorrectly wrapped in quotes, including RN's own sourcemap support: ``` runner@SeansMacBookGo sampleapp % /Users/runner/builds/y_x6gsp4/0/sampleapp/ios/Pods/hermes-engine/destroot/bin/hermesc -emit-binary -max-diagnostic-width=80 '-O -output-source-map' -out /Users/runner/builds/y_x6gsp4/0/sampleapp/ios/build/derived-data/Build/Intermediates.noindex/ArchiveIntermediates/sampleapp/BuildProductsPath/Release-iphoneos/sampleapp.app/main.jsbundle /Users/runner/builds/y_x6gsp4/0/sampleapp/ios/build/derived-data/Build/Intermediates.noindex/ArchiveIntermediates/sampleapp/BuildProductsPath/Release-iphoneos/main.jsbundle hermesc: Unknown command line argument '-O -output-source-map'. Try: '/Users/runner/builds/y_x6gsp4/0/sampleapp/ios/Pods/hermes-engine/destroot/bin/hermesc -help' hermesc: Did you mean '-output-source-map'? ``` ## 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 --> [IOS] [FIXED] - Fix build error when there are multiple EXTRA_COMPILER_ARGS Pull Request resolved: https://github.com/facebook/react-native/pull/38147 Test Plan: Removing the quotes and running the command results a successful run of `hermesc` (exit code 0 and the expected files produced). Reviewed By: rshest Differential Revision: D47254412 Pulled By: cipolleschi fbshipit-source-id: 96b71bb05c7a6939088816e76a9a2d02e89ed768
-
Nicola Corti authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38212 This mirrors the same logic that the Hermes team has on facebook/hermes. Practically, we want to pass the CMake config flag `HERMES_ENABLE_DEBUGGER=False` only for Release so that their CMake build is configured correctly. Their build always enables the Debugger and allows us to selectively turn it off only for release builds. More context: https://github.com/facebook/hermes/commit/eabf5fcd25 Changelog: [Internal] [Changed] - Compile hermes-engine with -DHERMES_ENABLE_DEBUGGER=False on Release Reviewed By: cipolleschi Differential Revision: D47252735 fbshipit-source-id: 9b5cd801dea3b540a3f80b0d0975e05984f1d9b9
-
evelant authored
Summary: Fix build failure on iOS with pnpm and use_frameworks! due to cocoapods copying symlinked headers to wrong paths When using pnpm all packages are symlinked to node_modules/.pnpm to prevent phantom dependency resolution. This causes react-native iOS build to fail because Cocoapods copies headers to incorrect destinations when they're behind symlinks. The fix resolves absolute paths to the header_mappings_dir at pod install time. With absolute paths cocoapods copies the headers correctly. This commit also adds a few missing header search paths in use_frameworks! mode. Fixes https://github.com/facebook/react-native/issues/38140 ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [IOS] [FIXED] - Build failure with pnpm and use_frameworks! due to incorrect header paths For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: https://github.com/facebook/react-native/pull/38158 Test Plan: 1. `pnpm pnpx react-native@latest init AwesomeProject` 2. `cd AwesomeProject` 3. `rm -rf node_modules yarn.lock` 4. `mkdir patches` 5. copy [react-native@0.72.1.patch](https://github.com/facebook/react-native/files/11937570/react-native%400.72.1.patch) to `patches/` 6. Add patch to package.json ``` "pnpm": { "patchedDependencies": { "react-native@0.72.1": "patches/react-native@0.72.1.patch" } } ``` 7. `pnpm install` 8. `cd ios` 9. `NO_FLIPPER=1 USE_FRAMEWORKS=static pod install` 10. `cd ..` 11. `pnpm react-native run-ios` Hopefully an automated test of building with `pnpm` can be added to CI. I don't know how to make that happen, hopefully someone at facebook can do it. Reviewed By: dmytrorykun Differential Revision: D47211946 Pulled By: cipolleschi fbshipit-source-id: 87640bd3f32f023c43291213b5291a7b990d7e1f
-
Matt Blagden authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38205 Enable the preprocessor flag to allow debugging when in a debug build. This flag influences the Hermes headers included in the inspector, and causes them to include the debugging functionality. Changelog: [General][Fixed] - Re-enabled debugging for debug builds Reviewed By: lunaleaps, cortinico Differential Revision: D47243235 fbshipit-source-id: 7982c69ab554335a9ad985394e4416ed69831137
-
Koichi Nagaoka authored
Fix onChangeText not firing when clearing the value of TextInput with multiline=true on iOS (#37958) Summary: This fix fixes the TextInput issue in https://github.com/facebook/react-native/issues/37784 with onChangeText not working on iOS only. ## 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 --> [IOS] [FIXED] - Fix onChangeText not firing when clearing the value of TextInput with multiline=true on iOS Pull Request resolved: https://github.com/facebook/react-native/pull/37958 Test Plan: 1. Run the repro code given in the issue (https://github.com/facebook/react-native/issues/37784). 2. Verified that onChangeText works after pressing the submit button. 3. Run the repro code from the issue (https://github.com/facebook/react-native/issues/36494) that caused this issue. 4. Verified that issue (https://github.com/facebook/react-native/issues/36494) is not reoccurring. Reviewed By: rshest Differential Revision: D47185775 Pulled By: dmytrorykun fbshipit-source-id: 1a1a6534d6bf8b5bb8cf1090734dd894bab43f82
-
Samuel Susla authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38129 changelog: [iOS] Disable NSTextStorage caching in OSS A [bug was reported](https://github.com/facebook/react-native/issues/37944) for NSTextStorage caching. Even thought I fixed the bug in D47019250, I want to disable the feature in OSS until the fix is verified in Facebook app. My plan is to pick this commit for 0.72.1 and reenable NSTextStorage caching once the fix is validated. Reviewed By: NickGerleman Differential Revision: D47127912 fbshipit-source-id: 97694e383eb751e89b776c0599969f2c411bac6f
-
louiszawadzki authored
Summary: This fixes a bug that started with React Native 0.72.0 when using the new architecture and installing a native lib that has Swift code (in my case, `datadog/mobile-react-native`). Running `pod install` errors with the following output (`DatadogSDKReactNative` is the pod containing the Swift code): ``` [...] Analyzing dependencies Downloading dependencies Installing DatadogSDKReactNative 1.8.0-rc0 [!] The following Swift pods cannot yet be integrated as static libraries: The Swift pod `DatadogSDKReactNative` depends upon `React-Fabric`, `React-graphics`, `React-utils`, and `React-debug`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies. ``` Indeed, this pods were added as dependencies in `packages/react-native/scripts/cocoapods/new_architecture.rb` but do not define modules contrary to the other pods in the list. This PR is solving a problem that already occured in the past and was solved here: https://github.com/facebook/react-native/pull/33743 It's a new implementation for the PR initially opened here: https://github.com/facebook/react-native/pull/38039 ## Changelog: [IOS] [FIXED] - Fix pod install for libraries using Swift code when the new architecture is enabled Pull Request resolved: https://github.com/facebook/react-native/pull/38121 Test Plan: 1. Clone [this](https://github.com/louiszawadzki/react-native) repo 2. From `main`, add a Swift file to the `MyNativeView` native module in the RN tester app (see inspiration from [this commit](https://github.com/fortmarek/react-native/commit/26958fccf4b4ac90d0bf9bb3699f12760a6b2b58)) 3. Try to run `RCT_NEW_ARCH_ENABLED=1 USE_HERMES=0 bundle exec pod install` inside the `packages/rn-tester` 4. Observe errors 5. Apply [the commit](https://github.com/facebook/react-native/commit/7b7c3ff530cae07daccc5b5ea6b72d239f913be0) from this PR 6. Both pod install and the subsequent build should succeed. 7. Revert the changes and repeat steps 2 to 6 with `RCT_NEW_ARCH_ENABLED=1 USE_HERMES=1 bundle exec pod install` Reviewed By: cortinico Differential Revision: D47127854 Pulled By: cipolleschi fbshipit-source-id: bf7f65e0d126195a76a0fafbe2f3172f00d5adc1 # Conflicts: # packages/react-native/ReactCommon/react/renderer/debug/React-rendererdebug.podspec
-
Alex Hunt authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38126 Towards https://github.com/react-native-community/cli/issues/1987. Will be paired with a CLI PR targeting React Native 0.72.1. Changelog: None Reviewed By: motiz88 Differential Revision: D47125080 fbshipit-source-id: b3b9d93ba747240f5168021ccb793ffe5d34251d
-
Adrian Hartanto authored
Summary: Remove okhttp internal `Util` usage so it can be compatible with [okhttp 5.0.0 alpha](https://square.github.io/okhttp/changelogs/changelog/#version-500-alpha7). ## 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 --> [ANDROID] [CHANGED] - Remove okhttp3 internal util usage Pull Request resolved: https://github.com/facebook/react-native/pull/37843 Test Plan: None, the implementation is based on okhttp internal util Reviewed By: NickGerleman Differential Revision: D46764363 Pulled By: cortinico fbshipit-source-id: e46770625f19057fa7374be15e92903d7966f880
-
Harry Yu authored
Summary: We've been encountering a crash in `runAnimationStep` with "Calculated frame index should never be lower than 0" https://github.com/facebook/react-native/issues/35766 with OnePlus/Oppo devices as well, but don't have one on hand to test. This just works around the issue: if the time is before the start time of an animation, we shouldn't do anything anyways, so we just log a message instead of throwing while in production. We still throw in debug mode though for easier debugging. ### Hypothesis of the root cause Based on stacktrace in https://github.com/facebook/react-native/issues/35766 (which is the same one we see) Normally, this should happen 1. Choreographer.java constructs a FrameDisplayEventReceiver 2. FrameDisplayEventReceiver.onVSync gets called, which sets the `mTimestampNanos` 3. FrameDisplayEventReceiver.run gets called, which then eventually calls our `doFrame` callback with `mTimestampNanos`. This then causes `FrameBasedAnimationDriver.runAnimationStep` to be called with the same timestamp I suspect what's happening on OnePlus devices is that the `onVSync` call either doesn't happen or happens rarely enough that the `mTimestampNanos` when `run` is called is sometime in the past ### Fix 1. Add logging so we get the parameters to debug more if we end up getting this error 2. In production, just ignore past times instead of throwing an Error ## Changelog: Pick one each for the category and type tags: [ANDROID] [FIXED] - Prevent crash on OnePlus/Oppo devices in runAnimationStep Pull Request resolved: https://github.com/facebook/react-native/pull/37487 Test Plan: Ran our app using patched version and verified no issues showed up when using it Reviewed By: cipolleschi Differential Revision: D46102968 Pulled By: cortinico fbshipit-source-id: bcb36a0c2aed0afdb8e7e68b141a3db4eb02695a
-
Luna authored
Co-authored-by:
Pieter De Baets <pieterdb@meta.com> resolved: https://github.com/facebook/react-native/pull/38125
-
- Jul 05, 2023
-
-
Lorenzo Sciandra authored
-
- Jun 30, 2023
-
- Jun 29, 2023
-
-
Riccardo Cipolleschi authored
-
Lorenzo Sciandra authored
-
Bernhard Owen Josephus authored
Summary: Multiline text in Android shows some extra space. It's easily noticeable when you set the text `alignSelf` to `flex-start`. This is because we are using `layout.getLineWidth` which will include trailing whitespace. <img width="300" alt="image" src="https://github.com/facebook/react-native/assets/50919443/8939092b-caef-4ad8-9b34-2ccef5d20968"> Based on Android doc, `getLineMax` exclude trailing whitespace. <img width="625" alt="image" src="https://github.com/facebook/react-native/assets/50919443/0b32e842-5fab-4fc7-8fd9-299877b9c553"> ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID] [FIXED] - Exclude trailing whitespace from newline character on measuring text line width For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [FIXED] - Exclude trailing whitespace from newline character on measuring text line width Pull Request resolved: https://github.com/facebook/react-native/pull/37790 Test Plan: After applying the changes: <img width="300" alt="image" src="https://github.com/facebook/react-native/assets/50919443/bfbf52b0-7e7d-4c89-8958-6af38d8bc1c7"> Code snippet: ``` <Text style={{backgroundColor: 'red', alignSelf: 'flex-start', color: 'white'}}> 1{'\n'} </Text> ``` Reviewed By: cortinico Differential Revision: D46586516 Pulled By: NickGerleman fbshipit-source-id: 3ea9c150ad92082f9b4d1da453ba0ef04b09ce51
-
- Jun 28, 2023
-
-
Riccardo Cipolleschi authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38089 This change add a warning if a component is registered in both the New Renderer and in the Interop layer. This can help users migrating their components once the library has been migrated. [iOS][Added] - Add warning to help users migrate away from the interop layer. Reviewed By: cortinico Differential Revision: D47053556 fbshipit-source-id: cc2ba09db16aaa370947a77173b6ea6a0acfa519
-
Riccardo Cipolleschi authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38093 In [this issue](https://github.com/facebook/react-native/issues/37905), the community detected a strict assumption in the interop layer for which, given a component `XXXView`, its ViewManager must be called `RCTXXXViewManager`. That's not the case for some components, for example, `BVLinearGradient`, which View manager is `BVLinearGradientManager` and not `RCTBVLinearGradientManager`. This diff adds a secondary lookup logic: 1. We look for the `RCTXXXViewManager`. 2. If not found, we look for `XXXViewManager`. We will assess whether to generalize this logic once and for all or to expand other lookup cases on an example/failure basis as it's not a goal to have a 100% accurate interop layer. The Goal is to cover most use cases. [iOS][Added] - Allow to lookup for ViewManager without the RCT prefix in the Interop Layer Reviewed By: sammy-SC Differential Revision: D47055969 fbshipit-source-id: 1d31f3f4bc6f1f543edbd157ce04ad9daf23dbc6
-
Lorenzo Sciandra authored
#publish-packages-to-npm
-
Lorenzo Sciandra authored
-
Lorenzo Sciandra authored
-
Alex Hunt authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38092 Reverts https://github.com/facebook/react-native/pull/36777. This is motivated by reducing user friction when the widespread assumption is for `react-native/metro-config` to export a complete Metro config, as with Expo/rnx-kit, and like previously understood uses of `metro-config`. See https://github.com/facebook/metro/issues/1010#issuecomment-1609215165 for further notes. Fixes: - https://github.com/facebook/metro/issues/1010 - https://github.com/facebook/react-native/issues/38069 - https://github.com/kristerkari/react-native-svg-transformer/issues/276 Note that we do not intend for `react-native/metro-config` to directly export `assetExts` etc — these can be accessed on the `resolver` property from the full config object. Changelog: [General][Changed] `react-native/metro-config` now includes all base config values from `metro-config` Reviewed By: robhogan Differential Revision: D47055973 fbshipit-source-id: 5ad23cc9700397110de5c0e81c7d76299761ef0a
-
Samuel Susla authored
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38075 changelog: [internal] `SharedFunction<>` is created with nullptr for its internal `std::function`. If called after created with default constructor, it crashes app. It also does not have API to check if its internal function is not nullptr. With image cancelation, there is a race between when native component calls `imageRequest.cancel()` and when cancelation function is set in `RCTImageManager`. To fix this, this diff adds a nullptr check inside SharedFunction. So it is always safe to call. Reviewed By: javache Differential Revision: D47022957 fbshipit-source-id: 0a04a87cd1ffe6bf3ca2fded38f689f06cc92ca9
-
Tommy Nguyen authored
Summary: Installing `react-native` 0.72.x causes a warning about `react-test-renderer` because `react-native/virtualized-lists` has declared a peer dependency on it. As far as I know, it is not used for anything but tests. ``` ➤ YN0002: │ react-native@npm:0.72.0-rc.6 [292eb] doesn't provide react-test-renderer (p5a2fb), requested by react-native/virtualized-lists ``` Note that while many package managers default to warnings in this case, there are still a number of users out there for which this is an error. ## Changelog: [GENERAL] [FIXED] - `react-native/virtualized-lists` does not need `react-test-renderer` at runtime Pull Request resolved: https://github.com/facebook/react-native/pull/37955 Test Plan: n/a Reviewed By: rshest Differential Revision: D46871536 Pulled By: NickGerleman fbshipit-source-id: 1e5e15608ab394bc43cd4e6ac727a74734874642
-
Pranav Yadav authored
Summary: [skip-ci] I noticed that; when a _new_ RN App is created using RN CLI there is ***NO*** *README* file added to the project. Having a simple README file explaining what type of project it is, for example how other web projects do it, such as long lived `create-react-app`, now widely used `create-next-app`, etc. Why not for React Native App then? This PR; Adds README file to RN Template App
, which should be added to the project when a new project is created using RN CLI. ### Website PR: https://github.com/facebook/react-native-website/pull/3732 bypass-github-export-checks ## Changelog: [INTERNAL] [ADDED] - Add README to RN Template App Pull Request resolved: https://github.com/facebook/react-native/pull/37521 Test Plan: - The README file should be included in the newly created RN App using RN CLI Reviewed By: NickGerleman Differential Revision: D46075719 Pulled By: cipolleschi fbshipit-source-id: efcccc09d72c57a065b36de6e787594082000e15
-
- Jun 23, 2023
-
-
Tommy Nguyen authored
-
- Jun 21, 2023
-
- Jun 14, 2023
-
-
Riccardo Cipolleschi authored
-