main
Name already in use
Commits on Oct 28, 2022
-
Gate the Maven Central publishing to 0.x version. (#35109)
Summary: Pull Request resolved: #35109 This is just a safety check to make sure we don't accidentally publish a 1.x or a 1000.x version on Maven Central by mistake. Changelog: [Internal] [Changed] - Gate the Maven Central publishing to 0.x version. Reviewed By: mdvacca Differential Revision: D40767782 fbshipit-source-id: 58f2906c3b01bfd0fd388a300ba303b289633d4e
Commits on Oct 27, 2022
-
Cleanup the template documentation after RNGP & hermesEnabled to grad…
…le.properties (#35108) Summary: Pull Request resolved: #35108 I've rewritten the comment in the android/app/build.gradle. They were really old, contained wrong links and most of the people ignored it. I've also moved the enabling of Hermes to the `gradle.properties` file. RNGP still supports the old method, but we must be sure that we notify library authors if they were reading project.ext.react.enableHermes in the past (also the website needs to be updated). I've also cleaned up the CircleCI setup as now we can specify Hermes enabled/disabled via the CLI (this will also make easier to do e2e testing). Changelog: [Android] [Changed] - Cleanup the template documentation after RNGP & hermesEnabled to gradle.properties Reviewed By: cipolleschi Differential Revision: D40762872 fbshipit-source-id: 2c09245e0a923faac53cc6c8a89e99788ae47f8a
-
chore(cli, metro): bump cli and metro to latest ahead of 71 (#35107)
Summary: Small PR with bump to the new versions of CLI and Metro in preparation of the branch cut for 0.71. While at it, did a cheeky `npx yarn-deduplicate` to clean up a bit the deps. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Changed] - Bump CLI to 10.0.0-alpha.1 and Metro to 0.73.3 Pull Request resolved: #35107 Test Plan: CI is green Reviewed By: motiz88 Differential Revision: D40762683 Pulled By: huntie fbshipit-source-id: e523a49c78588ca80351f44cb02bcd4c0137475e
-
Summary: Just bumping RNGP to make the new sources avialable to the template. Changelog: [Internal] [Changed] - Bump RNGP to 0.71.7 Reviewed By: cipolleschi Differential Revision: D40760927 fbshipit-source-id: 909c88377a231ea6678c6af14c5594fdc4830b79
-
Add support
Promise.anyout of box (#35080)Summary: `promise` module diff: [`8.2.0...8.3.0`](https://npmfs.com/compare/promise/8.2.0/8.3.0/) - Hermes issue: facebook/hermes#766 ## Changelog [General] [Added] - Added support `Promise.any` Pull Request resolved: #35080 Test Plan: Release notes [`promise@8.3.0`](https://github.com/then/promise/releases/tag/8.3.0) ```tsx typeof Promise.any // function ``` Reviewed By: cortinico Differential Revision: D40681373 Pulled By: jacdebug fbshipit-source-id: ecd589186483f3aa0f48da28a1f6dfcb1e26c8bc
-
Update the template to load the correct JS engine at runtime. (#35095)
Summary: Pull Request resolved: #35095 This change will make sure that we load the correct JS engine at runtime, by using the BuildConfig flag that RNGP sets for us. This will solve a lot of noise in adb logcat for users seeing stacktraces mentioning failing to load `jscexecutor` library. This is also a breaking change, but as the API was not widely used nor advertised in the template, we should be fine by just mentioning this in the release notes. Changelog: [Android] [Changed] - Update the template to load the correct JS engine at runtime Reviewed By: cipolleschi Differential Revision: D40710597 fbshipit-source-id: d59a7a52b22a9bf273ea89094c6620c3ecf6eb00
-
RNGP - Do not set GENERATED_SRC_DIR and REACT_ANDROID_BUILD_DIR (#35101)
Summary: Pull Request resolved: #35101 Those CMake variables are effectively unused now. They're raising a warning on CMake builds of templates + let's not expose them as we haven't released RNGP yet, before libraries or other tools start relying on them. Changelog: [Internal] [Changed] - RNGP - Do not set GENERATED_SRC_DIR and REACT_ANDROID_BUILD_DIR Reviewed By: cipolleschi Differential Revision: D40751998 fbshipit-source-id: 13f54a6247e4734c21c263f8b1e6b4b9e8ba406c
-
Summary: Pull Request resolved: #35100 That's just a minor bump of AGP before the branch cut. Changelog: [Android] [Changed] - Bump AGP to 7.3.1 allow-large-files Reviewed By: cipolleschi Differential Revision: D40752006 fbshipit-source-id: 4856bc7ca275cf46d3afcc7c24928c5f1d5e6e33
-
Do not import/use the deprecated ReactFlipperPlugin (#35099)
Summary: Pull Request resolved: #35099 I'm removing the ReactFlipperPlugin from the new app template. That plugin is effectively empty and is a stub + is deprecated so is generating a warning for all the users. Changelog: [Android] [Changed] - Do not import/use the deprecated ReactFlipperPlugin Reviewed By: cipolleschi Differential Revision: D40751984 fbshipit-source-id: 1f1fdf9c7dfccb9e7bbd4c8c2292df71e00c644f
-
Add back deprecated prop-types
Summary: In 2017, React published v15.5 which extracted the built-in `prop types` to a separate package to reflect the fact that not everybody uses them. In 2018, React Native started to remove `PropTypes` from React Native for the same reason. In 0.68 React Native introduced a deprecation warning which notified users that the change was coming, and in 0.69 we removed the PropTypes entirely. The feedback we've received from the community is that there has not been enough time to migrate libraries off of PropTypes. This has resulted in users needing to patch the React Native package `index.js` file directly to add back the PropTypes, instead of migrating off of them. We can empathize with this fix short term (it unblocks the upgrade) but long term this patch will cause users to miss important changes to `index.js`, and add a maintenance cost for users. Part of the reason there was not enough time is that we didn't do a good job surfacing libraries that were using PropTypes. This means, when you got a deprecation warning, it wasn't clear where the source of the usage was (either in your code or in a library). So even if you wanted to migrate, it was difficult to know where to actually make the change. In the next release, we've made it easier to find call sites using deprecated types by [fixing the code frame in errors](react-native-community/cli#1699) reporting in LogBox, and ensuring that [the app doesn't crash without a warning](#34650). This should make it easier to identify exactly where the deprecated usage is, so you can migrate it. To help users get off of the patch, and allow more time to migrate, we're walking back the removal of PropTypes, and keeping it as a deprecation for a couple more versions. We ask that you either migrate off PropTypes to a type system like TypeScript, or migrate to the `deprecated-react-native-prop-types` package. Once we feel more confident that the community has migrated and will not need to patch React Native in order to fix this issue, we'll remove the PropTypes again. **If you have any trouble finding the source of the PropType usage, please file an issue so we can help track it down with you.** Changelog: [General][Changed] - Add back deprecated PropTypes Reviewed By: yungsters Differential Revision: D40725705 fbshipit-source-id: 8ce61be30343827efd6dc89a012eeef0b6676deb
-
Do not filter errors/warnings from console
Summary: ## Overview When I implemented `ignoreLogs` it was originally just to move `console.ignoreYellowBox` over to LogBox. When I did that, I also added filtering for console messages too. My thought process was: Developers probably don't want to configure hiding logs twice, so the LogBox method can handle both. This was a mistake. We should never hide console errors and warnings, because it completely silences important feedback to the users such as deprecation warnings. These issues should be fixed, not silenced, and since adding the silencing behavior it's clear that this feature is being abused to ignore legitimate warnings that need address. Issue #33557 is a great reason why - the correct fix for this is not to ignore the errors, it's to address the deprecation / removal of the API. Allowing an easy `ignoreLog` method to hide the problem made this migration much more painful. Thus, we're reverting back to the pre-logbox behavior of always showing console logs, even if they're ignored by LogBox in the app UI. Hopefully, this results in more of these issue being addressed instead of ignored. Changelog: [General] [Changed] - Do not filter errors/warnings from console Reviewed By: yungsters Differential Revision: D40724661 fbshipit-source-id: de3d2db1b0c32dee96acf92c9b1ca07ba0f4e218
-
Log Abnormal Closes to Metro Websocket
Summary: We are running into a group seeing frequent disconnects from Metro in a specific office. These are surfaced (at least on iOS) as websocket closures, without a prior websocket error. WebSocket closure can be for a variety of reasons, and the spec for a CloseEvent is to include fields `wasClean`, `code`, and `reason`, with `code` having the most well-defined meaning. This change makes it so that we emit extra context when the websocket is closed. That should help inform developers the reason behind any close that may be abnormal. Changelog: [General][Added] - Log Abnormal Closes to Metro Websocket Reviewed By: motiz88 Differential Revision: D40660765 fbshipit-source-id: ef606d8d809af1c697a78eb00cc5666c29a8bca3
-
feat: make RCTBlobManager TurboModule-compatible (#35047)
Summary: Currently, RCTBlobManager (the native module for Blob support) cannot be loaded on iOS when the new architecture is enabled. ## Changelog [General] [Added] - `BlobModule` to `RCTCoreModulesClassProvider` Pull Request resolved: #35047 Test Plan: The snippet below can be used to test Blob support with the new architecture enabled. ``` // App.tsx import { useEffect } from 'react'; import { View } from 'react-native'; function uriToBlob(uri: any) { return new Promise((resolve, reject) => { const xhr = new XMLHttpRequest(); xhr.responseType = 'blob'; xhr.onload = () => { const blob = xhr.response; resolve(blob); }; xhr.onerror = err => { reject(err); }; xhr.open('GET', uri); xhr.send(); }); } export default function App() { useEffect(() => { uriToBlob('https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png'); }); return <View />; } ``` Related issue: #35042 Reviewed By: NickGerleman Differential Revision: D40716048 Pulled By: cipolleschi fbshipit-source-id: 17643d230fa7ea83baee363d137d51f87818baa8
Commits on Oct 26, 2022
-
Remove the --dry-run gate from publishing to Sonatype
Summary: This remove a flag to effectively go publishing to Sonatype. The idea was to protect us against accidentally publishing a nightly as a stable release. We need to remove this before RC0 Changelog: [Internal] [Changed] - Remove the --dry-run gate from publishing to Sonatype Reviewed By: cipolleschi Differential Revision: D40687038 fbshipit-source-id: e6821905f41899430813f9575f17a5068b05a9bb
-
RNGP - Use the File Api to specify cliPath and remove ComposeSourceMa…
…p path (#35092) Summary: Pull Request resolved: #35092 As we're close to the cut of the 0.71 branch, I'll take the opportunity to polish our Gradle public API. We're exposing a mixture of Path (String) and File (java.io.File or RegularFileProperty). Here I've moved everything to use File as it's more configurable for the users, specifically if they're using monorepos or other setup. This also allows us to remove the resolution logic for the cliPath. Changelog: [Internal] [Changed] - RNGP - Use the File Api to specify cliPath and remove ComposeSourceMap path Reviewed By: cipolleschi Differential Revision: D40710595 fbshipit-source-id: a17095eebae5123b70fd2b8e3d512656817006ca
-
Make it easier for user to toggle only Fabric or TurboModules in New …
…Architecture (#35091) Summary: Pull Request resolved: #35091 This diff refines the DefaultNewArchitectureEntryPoint to make it easier for user to either turn on Fabric, TurboModules or both. Changelog: [Internal] [Changed] - Make it easier for user to toggle only Fabric or TurboModules in New Architecture Reviewed By: cipolleschi Differential Revision: D40710596 fbshipit-source-id: 236060b2ebccb1bf25e7f5c0fc15f54c5ce5f608
-
Revert D40333083: Support persisted settings in Android + iOS
-
fix: add mixed to aria-checked typings (#34633)
Summary: `aria-checked` prop should accept `mixed` as value as given [here](https://www.w3.org/WAI/GL/wiki/Using_WAI-ARIA_aria-checked%3Dmixed) and also [accessibilityState.checked](https://reactnative.dev/docs/accessibility#accessibilitystate) accepts mixed to represent checkboxes. This change refers to issue #34424 and PR #34524 ## Changelog [General] [Added] - Added `mixed` value for `aria-checked`. Pull Request resolved: #34633 Test Plan: ```js <TouchableOpacity accessibilityRole="checkbox" aria-checked="mixed" accessibilityHint="click me to change state"> <Text>Checkbox example</Text> </TouchableOpacity> ``` Reviewed By: lunaleaps Differential Revision: D39382158 Pulled By: necolas fbshipit-source-id: fa026274111305cc0bcbb42ed974ca1be7d779a5
-
Summary: Changelog: [Internal] Flow InputAccessoryView Reviewed By: yungsters Differential Revision: D39855166 fbshipit-source-id: 9c389854e6d76a0c0e881190cd1808088de324fd
-
RNGP - Do the .so cleanup using pickFirst and exclude (#35093)
Summary: Pull Request resolved: #35093 It turns out that using the Artifacts API to manipulate the APK to remove .so has unintended side effects and is causing the `installDebug` and `installRelease` commands to fail. I've resorted to register a packaging option for each variant to make sure we include only the correct artifacts we want. This should fix the current startup crash that is experienced on main. Changelog: [Android] [Fixed] - RNGP - Do the .so cleanup using pickFirst and exclude Reviewed By: cipolleschi Differential Revision: D40722285 fbshipit-source-id: 982e1e9c474522fc4419c969ede5ee14e5404f3a
-
RNGP - Remove enableCodegenInApps and infer it from package.json (#35083
) Summary: Pull Request resolved: #35083 We don't need to `enableCodegenInApps` keys but we can instead rely on the existence of the `codegenConfig` key inside the `package.json` to decide if Codegen should run in App modules or not. Changelog: [Internal] [Changed] - RNGP - Remove enableCodegenInApps and infer it from package.json Reviewed By: cipolleschi Differential Revision: D40687079 fbshipit-source-id: cd4a6c67caa19c1d199ae75388a0551339f876a0
-
Refactor translate UniontypeAnnotation (#35050)
Summary: Part of #34872 > [Assigned to youedd] This task is more advanced than the others Create a function to unify the [unionType](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L372-L396) and the [TSUnionType](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L407-L431). This task may share some logic from the previous task. The function should accept a ParserType parameter to implement the proper logic to extract the memberType variable. Ideally, we should create a couple of supporting functions to implement those logics. ## 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] - Refactor translate UniontypeAnnotation Pull Request resolved: #35050 Test Plan: `yarn jest react-native-codegen`  Reviewed By: cortinico Differential Revision: D40637299 Pulled By: cipolleschi fbshipit-source-id: 1490001a3398c3af79d465c40de3c3687f058523
-
Extract
getConfigTypefunction toparsers/utils.js(#35035)Summary: This PR is part of #34872. This PR contains two changes, extracting the visitor object and then factoring out the `getConfigType()` function to the `parsers/utils.js` file. Then we can reuse the same function in both flow and typescript by passing the extracted visitor object. ## Changelog [Internal] [Changed] - Extract visitor object in the same file and factor out `getConfigType()` to `parsers/utils.js`. Pull Request resolved: #35035 Test Plan: Output of `yarn jest react-native-codegen` ensures all passed test cases Reviewed By: cortinico Differential Revision: D40548855 Pulled By: cipolleschi fbshipit-source-id: 310b8565322a4e4800a3fffc67479a9dfa45d620
-
Rewrite of ScrollViewStickyHeader for concurrent rendering
Summary: changelog: [general][Added] - Concurrent rendering safe implementation of ScrollViewStickyHeader This is a re-land of ScrollViewStickyHeader from Kacie Bawiec. Reviewed By: yungsters Differential Revision: D40380217 fbshipit-source-id: 60dc86086a4d9d97eef71c4ed2e26536f7e72889
-
Revert D40716713: chore(deps): add wanted dependencies to remove yarn…
-
chore(deps): add wanted dependencies to remove yarn warnings (#35088)
Summary: I wanted to start working on a thing but this barrage of warnings was very annoying so ended up doing this instead: a very small PR to take care of some warnings during yarn install. It doesn't change anything (the versions are the ones already used all around the repo), just makes yarn happier. Also, while doing that I found a dependency that was lying there unused for 2 years so took care of it. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Fixed] - add wanted dependencies to remove yarn warnings Pull Request resolved: #35088 Test Plan: ### Before <img width="1920" alt="Screenshot 2022-10-26 at 10 53 32" src="https://user-images.githubusercontent.com/16104054/197996489-f463be29-b35b-45cc-9d9c-2d176579fb7d.png"> ### After <img width="947" alt="Screenshot 2022-10-26 at 10 52 19" src="https://user-images.githubusercontent.com/16104054/197996505-3d60b319-006b-45ab-83bf-2f431272fdcd.png"> Reviewed By: jacdebug Differential Revision: D40716713 Pulled By: robhogan fbshipit-source-id: eeb95a91c6cdf37edfe868fefe4ba04aebe500ec
-
Back out "Add enum example to Android/iOS rn-tester TurboModule" (#35089
) Summary: Pull Request resolved: #35089 Changelog: [General][Fixed] - Back out "Add enum example to Android/iOS rn-tester TurboModule" This broke the rn-tester adding due to an invalid flow-enum setup. Needs further investigation Reviewed By: cipolleschi Differential Revision: D40714320 fbshipit-source-id: 9831276762f90df0ffaca3304382fe5925009343
-
refactor(rn tester app): change activity indicator to hooks (#35071)
Summary: This pull request migrates the activity indicator example to using React Hooks. ## Changelog [General] [Changed] - RNTester: Migrate ActivityIndicator to hooks Pull Request resolved: #35071 Test Plan: The animation works exactly as it did as when it was a class component Reviewed By: jacdebug Differential Revision: D40698379 Pulled By: NickGerleman fbshipit-source-id: 08b275fcc4e3a10b5872e0031fa2ecce5360a7b9
-
Fix RCTLoggingTests in OSS (#35085)
Summary: fd91748 added a condition not to pump an extra message when we didn't see symbolication warnings (which do not seem to show up in a stock internal build), but I missed that the test specific to RCTLogLevelError checked for string containment instead of equality, and the last assertion we process on log level is incorrect in OSS as a result. Changelog: [Internal][Fixed] - Fix RCTLoggingTests in OSS Pull Request resolved: #35085 Test Plan: `test_ios-Hermes` passes again in OSS: #35085 (JSC and Android failures look unrelated) RCTLoggingTests still pass running `buck test //xplat/js/react-native-github/packages/rn-tester:RNTesterIntegrationTests` Reviewed By: rshest Differential Revision: D40699773 Pulled By: NickGerleman fbshipit-source-id: 5acc8ec2b26a1f9acac2f070b85f1d65ee15a011
-
Support persisted settings in Android + iOS (#34964)
Summary: * Add a DevToolsSettingsManager, which has android and iOS variants, which uses a new TM (Android) or takes advantage of the Settings TM (iOS) to get/set console patch settings * This is backed by either the existing Settings module (iOS) or a new Java TM, which uses the SharedPreferences AP ## Testing Manual testing ## Changelog [General] [Added] - Add DevToolsSettingsManager Pull Request resolved: #34964 Test Plan: * Extensive manual testing Reviewed By: NickGerleman Differential Revision: D40333083 Pulled By: rbalicki2 fbshipit-source-id: f3816e3bd7dea3086f6f2269c3a099af14aebb3b
Commits on Oct 25, 2022
-
trivial: display target name in CocoaPods output
Summary: Without this, the CocoaPods output would display multiple "Building RNTester..." logs. With these changes, we make it clear that these are separate targets that are being configured. Changelog: [internal] Reviewed By: mdvacca, cipolleschi Differential Revision: D40656813 fbshipit-source-id: a317112e804d08b9e64e2d62e8b27e4045b317b0
-
Add enum example to Android/iOS rn-tester TurboModule
Summary: Add enum example to Android/iOS rn-tester TurboModule Changelog: [General][Added] - Add enum example to Android/iOS rn-tester TurboModule Reviewed By: javache Differential Revision: D40619020 fbshipit-source-id: a113c5c78bcff3275e80d11bce8d0e6421b0b97d
-
Fix deadlock in RCTLoggingTests
Summary: Some portions of continuous test runs RNTesterIntegrationTests will hang for an hour when running in Sandcastle without outputting anything. Locally debugging, I see a deadlock waiting on a semaphore, where the test assumed an extraneous symbolication warning would be fired. This change makes it so that we only look for the extraneous messages if we haven't already seen the target message, since they do not seem to show up in local testing. I also added assertions per semaphore that the log statement is propagated within a still very gracious 10 seconds. This means we still can see what tests are running/failing if this test has issues, instead of a deadlocked test runner with no output. Changelog: [Internal][Fixed] - Fix deadlock in RCTLoggingTests Reviewed By: cipolleschi Differential Revision: D40667275 fbshipit-source-id: ab78f3c2ef47e2fd740b1dad2a65912e9542301d
-
Bump the Android Docker image to 6.0 (for NDK 23) (#35079)
Summary: Pull Request resolved: #35079 This bumps the Docker image for React Native Android to 6.0 shipping the NDK 23 with it, finalizing all the work needed to support NDK 23. Changelog: [Internal] [Changed] - Bump the Android Docker image to 6.0 (for NDK 23) Reviewed By: cipolleschi Differential Revision: D40675449 fbshipit-source-id: 5fb53080ce796263cd592dbc489743e6295060ba
-
Update the template to use RNGP (#35075)
Summary: Pull Request resolved: #35075 This diff updates the New App template for Android to use the React Native Gradle Plugin. With this we can: 1. Get rid of all the C++ code. 2. Remove a lot of New Architecture logic in the build.gradle 3. Reuse the prebuilts of React Native/Hermes via prefab Changelog: [Android] [Changed] - Update the template to use RNGP Reviewed By: cipolleschi Differential Revision: D40673732 fbshipit-source-id: 70935248993d1e24904c982e75f12ad580faa9d8

