From d2f5044c379b2152ab68ffe5a3d3cdad6109c4de Mon Sep 17 00:00:00 2001 From: John Porto Date: Fri, 28 Jan 2022 13:37:12 -0800 Subject: [PATCH 001/109] Catch exceptions thrown by user callbacks Summary: Calls to Inspector::evaluate() and Inspector::executeIfEnabled() take a user-provided callback which are not try-guarded. This means that, should the user code throw, the inspector's process will likely die due to the unhandled exception. This change makes sure that, if the user provided callback throws, then the promise attached to those methods will be fulfilled by an exception. Change: [internal] Reviewed By: avp Differential Revision: D33852073 fbshipit-source-id: 7fbb6662b28d393a5d5b494c004aa9521e23ebb6 --- ReactCommon/hermes/inspector/Exceptions.h | 6 +++++ ReactCommon/hermes/inspector/Inspector.cpp | 7 ++++-- ReactCommon/hermes/inspector/Inspector.h | 14 +++++++++++ .../hermes/inspector/InspectorState.cpp | 24 ++++++++++++------- 4 files changed, 41 insertions(+), 10 deletions(-) diff --git a/ReactCommon/hermes/inspector/Exceptions.h b/ReactCommon/hermes/inspector/Exceptions.h index 134fe28291..928b795448 100644 --- a/ReactCommon/hermes/inspector/Exceptions.h +++ b/ReactCommon/hermes/inspector/Exceptions.h @@ -47,6 +47,12 @@ class MultipleCommandsPendingException : public std::runtime_error { ": a step or resume is already pending") {} }; +class UserCallbackException : public std::runtime_error { + public: + UserCallbackException(const std::exception &e) + : std::runtime_error(std::string("callback exception: ") + e.what()) {} +}; + } // namespace inspector } // namespace hermes } // namespace facebook diff --git a/ReactCommon/hermes/inspector/Inspector.cpp b/ReactCommon/hermes/inspector/Inspector.cpp index efdba70c6b..8ec9f82b6b 100644 --- a/ReactCommon/hermes/inspector/Inspector.cpp +++ b/ReactCommon/hermes/inspector/Inspector.cpp @@ -589,8 +589,11 @@ void Inspector::executeIfEnabledOnExecutor( state_->pushPendingFunc( [wrappedFunc = std::move(wrappedFunc), promise]() mutable { - wrappedFunc(); - promise->setValue(); + if (auto userCallbackException = runUserCallback(wrappedFunc)) { + promise->setException(*userCallbackException); + } else { + promise->setValue(); + } }); } diff --git a/ReactCommon/hermes/inspector/Inspector.h b/ReactCommon/hermes/inspector/Inspector.h index dc85d90d64..648499207f 100644 --- a/ReactCommon/hermes/inspector/Inspector.h +++ b/ReactCommon/hermes/inspector/Inspector.h @@ -15,11 +15,13 @@ #include #include +#include #include #include #include #include #include +#include #include namespace facebook { @@ -363,6 +365,18 @@ class Inspector : public facebook::hermes::debugger::EventObserver, std::unique_ptr executor_; }; +/// Helper function that guards user code execution in a try-catch block. +template +folly::Optional runUserCallback(C &cb, A &&...arg) { + try { + cb(std::forward(arg)...); + } catch (const std::exception &e) { + return UserCallbackException(e); + } + + return {}; +} + } // namespace inspector } // namespace hermes } // namespace facebook diff --git a/ReactCommon/hermes/inspector/InspectorState.cpp b/ReactCommon/hermes/inspector/InspectorState.cpp index a318180a43..8ee53e9005 100644 --- a/ReactCommon/hermes/inspector/InspectorState.cpp +++ b/ReactCommon/hermes/inspector/InspectorState.cpp @@ -249,10 +249,14 @@ std::pair InspectorState::Running::didPause( } else if (reason == debugger::PauseReason::EvalComplete) { assert(pendingEvalPromise_); - pendingEvalResultTransformer_( - inspector_.debugger_.getProgramState().getEvalResult()); - pendingEvalPromise_->setValue( - inspector_.debugger_.getProgramState().getEvalResult()); + if (auto userCallbackException = runUserCallback( + pendingEvalResultTransformer_, + inspector_.debugger_.getProgramState().getEvalResult())) { + pendingEvalPromise_->setException(*userCallbackException); + } else { + pendingEvalPromise_->setValue( + inspector_.debugger_.getProgramState().getEvalResult()); + } pendingEvalPromise_.reset(); } else if ( reason == debugger::PauseReason::Breakpoint && @@ -364,10 +368,14 @@ std::pair InspectorState::Paused::didPause( break; case debugger::PauseReason::EvalComplete: { assert(pendingEvalPromise_); - pendingEvalResultTransformer_( - inspector_.debugger_.getProgramState().getEvalResult()); - pendingEvalPromise_->setValue( - inspector_.debugger_.getProgramState().getEvalResult()); + if (auto userCallbackException = runUserCallback( + pendingEvalResultTransformer_, + inspector_.debugger_.getProgramState().getEvalResult())) { + pendingEvalPromise_->setException(*userCallbackException); + } else { + pendingEvalPromise_->setValue( + inspector_.debugger_.getProgramState().getEvalResult()); + } pendingEvalPromise_.reset(); } break; case debugger::PauseReason::ScriptLoaded: From 6351064b75644f746139430e2fdb63ee0205831f Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Fri, 28 Jan 2022 16:28:42 -0800 Subject: [PATCH 002/109] Introduce RuntimeScheduler::callImmediates Summary: changelog: [internal] React on web uses microtasks to schedule a synchronous update for discrete event. Microtasks are not yet available in React Native and as a fallback, React uses native scheduler and task with immediate priority. Until Microtasks are in place, React Native needs to make sure all immediate tasks are executed after it dispatches each event. I tried to stay as close to [microtask standard](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask) as I reasonably could. Once microtasks on RN are shipped, this code can be removed. Reviewed By: mdvacca Differential Revision: D33742583 fbshipit-source-id: eddebb1bd5131ee056252faad48327a70de78a4a --- .../runtimescheduler/RuntimeScheduler.cpp | 65 ++++++++++--------- .../runtimescheduler/RuntimeScheduler.h | 11 ++++ .../tests/RuntimeSchedulerTest.cpp | 9 ++- .../react/renderer/scheduler/Scheduler.cpp | 23 ++++++- 4 files changed, 74 insertions(+), 34 deletions(-) diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp index 6f52dffca3..82a9f7c201 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp @@ -71,28 +71,8 @@ void RuntimeScheduler::executeNowOnTheSameThread( runtimeExecutor_, [this, callback = std::move(callback)](jsi::Runtime &runtime) { shouldYield_ = false; - auto task = jsi::Function::createFromHostFunction( - runtime, - jsi::PropNameID::forUtf8(runtime, ""), - 3, - [callback = std::move(callback)]( - jsi::Runtime &runtime, - jsi::Value const &, - jsi::Value const *arguments, - size_t) -> jsi::Value { - callback(runtime); - return jsi::Value::undefined(); - }); - - // We are about to trigger work loop. Setting `isCallbackScheduled_` to - // true prevents unnecessary call to `runtimeExecutor`. - isWorkLoopScheduled_ = true; - this->scheduleTask( - SchedulerPriority::ImmediatePriority, std::move(task)); - isWorkLoopScheduled_ = false; - isSynchronous_ = true; - startWorkLoop(runtime); + callback(runtime); isSynchronous_ = false; }); @@ -102,6 +82,37 @@ void RuntimeScheduler::executeNowOnTheSameThread( scheduleWorkLoopIfNecessary(); } +void RuntimeScheduler::callImmediates(jsi::Runtime &runtime) { + auto previousPriority = currentPriority_; + try { + while (!taskQueue_.empty()) { + auto topPriorityTask = taskQueue_.top(); + auto now = now_(); + auto didUserCallbackTimeout = topPriorityTask->expirationTime <= now; + + if (!didUserCallbackTimeout) { + break; + } + + currentPriority_ = topPriorityTask->priority; + auto result = topPriorityTask->execute(runtime); + + if (result.isObject() && result.getObject(runtime).isFunction(runtime)) { + topPriorityTask->callback = + result.getObject(runtime).getFunction(runtime); + } else { + if (taskQueue_.top() == topPriorityTask) { + taskQueue_.pop(); + } + } + } + } catch (jsi::JSError &error) { + handleFatalError(runtime, error); + } + + currentPriority_ = previousPriority; +} + #pragma mark - Private void RuntimeScheduler::scheduleWorkLoopIfNecessary() const { @@ -123,17 +134,11 @@ void RuntimeScheduler::startWorkLoop(jsi::Runtime &runtime) const { auto now = now_(); auto didUserCallbackTimeout = topPriorityTask->expirationTime <= now; - // This task hasn't expired and we need to yield. - auto shouldBreakBecauseYield = !didUserCallbackTimeout && shouldYield_; - - // This task hasn't expired but we are in synchronous mode and need to - // only execute the necessary minimum. - auto shouldBreakBecauseSynchronous = - !didUserCallbackTimeout && isSynchronous_; - - if (shouldBreakBecauseYield || shouldBreakBecauseSynchronous) { + if (!didUserCallbackTimeout && getShouldYield()) { + // This currentTask hasn't expired, and we need to yield. break; } + currentPriority_ = topPriorityTask->priority; auto result = topPriorityTask->execute(runtime); diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h index a76805b2a0..63ed4ab031 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h @@ -96,6 +96,17 @@ class RuntimeScheduler final { */ RuntimeSchedulerTimePoint now() const noexcept; + /* + * Immediate is a task that is expired and should have been already executed + * or has priority set to Immediate. Designed to be called in the event + * pipeline after an event is dispatched to React. React may schedule events + * with immediate priority which need to be handled before the next event is + * sent to React. + * + * Thread synchronization must be enforced externally. + */ + void callImmediates(jsi::Runtime &runtime); + private: mutable std::priority_queue< std::shared_ptr, diff --git a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp index a7b014022e..ad7c33a1e9 100644 --- a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp @@ -517,7 +517,7 @@ TEST_F(RuntimeSchedulerTest, sameThreadTaskCreatesImmediatePriorityTask) { std::thread t1([this, &didRunSynchronousTask, &didRunSubsequentTask]() { runtimeScheduler_->executeNowOnTheSameThread( [this, &didRunSynchronousTask, &didRunSubsequentTask]( - jsi::Runtime &rt) { + jsi::Runtime &runtime) { didRunSynchronousTask = true; auto callback = createHostFunctionFromLambda( @@ -529,6 +529,8 @@ TEST_F(RuntimeSchedulerTest, sameThreadTaskCreatesImmediatePriorityTask) { runtimeScheduler_->scheduleTask( SchedulerPriority::ImmediatePriority, std::move(callback)); + + runtimeScheduler_->callImmediates(runtime); }); }); @@ -553,7 +555,7 @@ TEST_F(RuntimeSchedulerTest, sameThreadTaskCreatesLowPriorityTask) { std::thread t1([this, &didRunSynchronousTask, &didRunSubsequentTask]() { runtimeScheduler_->executeNowOnTheSameThread( [this, &didRunSynchronousTask, &didRunSubsequentTask]( - jsi::Runtime &rt) { + jsi::Runtime &runtime) { didRunSynchronousTask = true; auto callback = createHostFunctionFromLambda( @@ -565,6 +567,9 @@ TEST_F(RuntimeSchedulerTest, sameThreadTaskCreatesLowPriorityTask) { runtimeScheduler_->scheduleTask( SchedulerPriority::LowPriority, std::move(callback)); + runtimeScheduler_->callImmediates(runtime); + + EXPECT_FALSE(didRunSubsequentTask); }); }); diff --git a/ReactCommon/react/renderer/scheduler/Scheduler.cpp b/ReactCommon/react/renderer/scheduler/Scheduler.cpp index 3a782a9b37..87dae5277a 100644 --- a/ReactCommon/react/renderer/scheduler/Scheduler.cpp +++ b/ReactCommon/react/renderer/scheduler/Scheduler.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -50,7 +50,23 @@ Scheduler::Scheduler( auto eventOwnerBox = std::make_shared(); eventOwnerBox->owner = eventDispatcher_; - auto eventPipe = [uiManager]( +#ifdef ANDROID + auto enableCallImmediates = reactNativeConfig_->getBool( + "react_native_new_architecture:enable_call_immediates_android"); +#else + auto enableCallImmediates = reactNativeConfig_->getBool( + "react_native_new_architecture:enable_call_immediates_ios"); +#endif + + auto weakRuntimeScheduler = + contextContainer_->find>( + "RuntimeScheduler"); + auto runtimeScheduler = + (enableCallImmediates && weakRuntimeScheduler.hasValue()) + ? weakRuntimeScheduler.value().lock() + : nullptr; + + auto eventPipe = [uiManager, runtimeScheduler = runtimeScheduler.get()]( jsi::Runtime &runtime, const EventTarget *eventTarget, const std::string &type, @@ -62,6 +78,9 @@ Scheduler::Scheduler( runtime, eventTarget, type, priority, payloadFactory); }, runtime); + if (runtimeScheduler) { + runtimeScheduler->callImmediates(runtime); + } }; auto statePipe = [uiManager](StateUpdate const &stateUpdate) { From b4b5c596451df4738ab9ec9eef29252720312746 Mon Sep 17 00:00:00 2001 From: Paige Sun Date: Fri, 28 Jan 2022 18:44:26 -0800 Subject: [PATCH 003/109] Add ComponentNameResolverManager to make UIManager.hasViewManagerConfig() work on Venice Summary: Changelog: [Internal] Reviewed By: RSNara Differential Revision: D33860658 fbshipit-source-id: 41079b13acef531877c82dc0b2063dbe2b42edcf --- .../facebook/react/ReactInstanceManager.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index d081827eba..918f8b612e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -97,8 +97,6 @@ import com.facebook.react.surface.ReactStage; import com.facebook.react.turbomodule.core.TurboModuleManager; import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate; import com.facebook.react.turbomodule.core.interfaces.TurboModuleRegistry; -import com.facebook.react.uimanager.ComponentNameResolver; -import com.facebook.react.uimanager.ComponentNameResolverManager; import com.facebook.react.uimanager.DisplayMetricsHolder; import com.facebook.react.uimanager.ReactRoot; import com.facebook.react.uimanager.UIImplementationProvider; @@ -168,7 +166,6 @@ public class ReactInstanceManager { private final DevSupportManager mDevSupportManager; private final boolean mUseDeveloperSupport; private final boolean mRequireActivity; - private @Nullable ComponentNameResolverManager mComponentNameResolverManager; private final @Nullable NotThreadSafeBridgeIdleDebugListener mBridgeIdleDebugListener; private final Object mReactContextLock = new Object(); private @Nullable volatile ReactContext mCurrentReactContext; @@ -770,7 +767,6 @@ public class ReactInstanceManager { synchronized (mPackages) { mViewManagerNames = null; } - mComponentNameResolverManager = null; FLog.d(ReactConstants.TAG, "ReactInstanceManager has been destroyed"); } @@ -1399,23 +1395,6 @@ public class ReactInstanceManager { if (Systrace.isTracing(TRACE_TAG_REACT_APPS | TRACE_TAG_REACT_JS_VM_CALLS)) { catalystInstance.setGlobalVariable("__RCTProfileIsProfiling", "true"); } - if (ReactFeatureFlags.enableExperimentalStaticViewConfigs) { - mComponentNameResolverManager = - new ComponentNameResolverManager( - catalystInstance.getRuntimeExecutor(), - new ComponentNameResolver() { - @Override - public String[] getComponentNames() { - List viewManagerNames = getViewManagerNames(); - if (viewManagerNames == null) { - FLog.e(TAG, "No ViewManager names found"); - return new String[0]; - } - return viewManagerNames.toArray(new String[0]); - } - }); - catalystInstance.setGlobalVariable("__fbStaticViewConfig", "true"); - } ReactMarker.logMarker(ReactMarkerConstants.PRE_RUN_JS_BUNDLE_START); Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "runJSBundle"); From 79ae50f3e9a674ec1b64d3a817943b303a56d9c5 Mon Sep 17 00:00:00 2001 From: Paige Sun Date: Fri, 28 Jan 2022 23:38:05 -0800 Subject: [PATCH 004/109] Remove Static View Configs from bridge mode Summary: Changelog: [Internal] Remove all the MCs that enable SVCs in Fabric, because we'll only test SVCs in Bridgeless mode to simplify rollout. There were complications with enabling SVCs in Fabric at a previous rollout. Reviewed By: RSNara Differential Revision: D33861243 fbshipit-source-id: fdbfedce77f8bd1bab2a807237017787ae8bf7c1 --- .../com/facebook/react/config/ReactFeatureFlags.java | 3 --- .../com/facebook/react/fabric/FabricUIManager.java | 2 +- .../com/facebook/react/uimanager/UIManagerModule.java | 11 ----------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java index 1ccc2230fe..b4ab457195 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -64,9 +64,6 @@ public class ReactFeatureFlags { /** This feature flag enables logs for Fabric */ public static boolean enableFabricLogs = false; - /** Enables Static ViewConfig in RN Android native code. */ - public static boolean enableExperimentalStaticViewConfigs = false; - public static boolean enableRuntimeScheduler = false; public static boolean enableRuntimeSchedulerInTurboModule = false; diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java index 8e2b4402de..383b2e6310 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java @@ -405,7 +405,7 @@ public class FabricUIManager implements UIManager, LifecycleEventListener { ViewManagerPropertyUpdater.clear(); - // When using ReactFeatureFlags.enableExperimentalStaticViewConfigs enabled, FabriUIManager is + // When using StaticViewConfigs is enabled, FabriUIManager is // responsible for initializing and deallocating EventDispatcher. // TODO T83943316: Remove this IF once StaticViewConfigs are enabled by default if (mShouldDeallocateEventDispatcher) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index bcf11bf677..57f383b81a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -40,7 +40,6 @@ import com.facebook.react.bridge.UiThreadUtil; import com.facebook.react.bridge.WritableMap; import com.facebook.react.common.MapBuilder; import com.facebook.react.common.ReactConstants; -import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.module.annotations.ReactModule; import com.facebook.react.uimanager.common.ViewUtil; import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugListener; @@ -288,16 +287,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule @Deprecated @Override public void preInitializeViewManagers(List viewManagerNames) { - if (ReactFeatureFlags.enableExperimentalStaticViewConfigs) { - for (String viewManagerName : viewManagerNames) { - mUIImplementation.resolveViewManager(viewManagerName); - } - // When Static view configs are enabled it is not necessary to pre-compute the constants for - // viewManagers, although the pre-initialization of viewManager objects is still necessary - // for performance reasons. - return; - } - Map constantsMap = new ArrayMap<>(); for (String viewManagerName : viewManagerNames) { WritableMap constants = computeConstantsForViewManager(viewManagerName); From ab843c5736c1a0be0c6898586e3deefee5cdecd7 Mon Sep 17 00:00:00 2001 From: Paige Sun Date: Fri, 28 Jan 2022 23:38:05 -0800 Subject: [PATCH 005/109] Disable static ViewConfigs in bridge mode & enable for bridgeless mode - for codegenNativeComponent Summary: Changelog: [Internal] Since DummyUIManager.getViewManagerConfig() & hasViewManagerConfig() are the same, it's safe to ship this before the native changes in this stack lands. Reviewed By: RSNara Differential Revision: D33832926 fbshipit-source-id: c0f0a169d02397e0f9125bb45d95d395c8bbc492 --- .../src/generators/components/GenerateViewConfigJs.js | 8 +++----- .../__snapshots__/GenerateViewConfigJs-test.js.snap | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js b/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js index 7dff6eaccc..b1872a9176 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js +++ b/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js @@ -130,9 +130,8 @@ export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL `.trim(); }; -// If static view configs are enabled, get whether the native component exists -// in the app binary using hasViewManagerConfig() instead of getViewManagerConfig(). -// Old getViewManagerConfig() checks for the existance of the native Paper view manager. +// Check whether the native component exists in the app binary. +// Old getViewManagerConfig() checks for the existance of the native Paper view manager. Not available in Bridgeless. // New hasViewManagerConfig() queries Fabric’s native component registry directly. const DeprecatedComponentNameCheckTemplate = ({ componentName, @@ -142,8 +141,7 @@ const DeprecatedComponentNameCheckTemplate = ({ paperComponentNameDeprecated: string, }) => ` -const staticViewConfigsEnabled = global.__fbStaticViewConfig === true; -if (staticViewConfigsEnabled) { +if (global.__nativeComponentRegistry__hasComponent) { if (UIManager.hasViewManagerConfig('${componentName}')) { nativeComponentName = '${componentName}'; } else if (UIManager.hasViewManagerConfig('${paperComponentNameDeprecated}')) { diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap index c6fd84f913..757ee7a65f 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap @@ -1046,8 +1046,7 @@ const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/ const {UIManager} = require(\\"react-native\\") let nativeComponentName = 'NativeComponentName'; -const staticViewConfigsEnabled = global.__fbStaticViewConfig === true; -if (staticViewConfigsEnabled) { +if (global.__nativeComponentRegistry__hasComponent) { if (UIManager.hasViewManagerConfig('NativeComponentName')) { nativeComponentName = 'NativeComponentName'; } else if (UIManager.hasViewManagerConfig('DeprecatedNativeComponentName')) { From 0ab0c5a42e4100113d3824bf612ee89f4a4ac50e Mon Sep 17 00:00:00 2001 From: Paige Sun Date: Fri, 28 Jan 2022 23:38:05 -0800 Subject: [PATCH 006/109] Disable static ViewConfigs in bridge mode & enable for bridgeless mode - Remove __fbStaticViewConfig & UIManagerInjection Summary: Changelog: [Internal] Reviewed By: RSNara Differential Revision: D33835081 fbshipit-source-id: ed625de3b2da73f98cdb9c9dc97086aa2c477e3a --- Libraries/ReactNative/DummyUIManager.js | 8 +++++--- Libraries/ReactNative/UIManager.js | 3 +-- Libraries/ReactNative/UIManagerInjection.js | 15 --------------- 3 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 Libraries/ReactNative/UIManagerInjection.js diff --git a/Libraries/ReactNative/DummyUIManager.js b/Libraries/ReactNative/DummyUIManager.js index a8fba2edc6..126fe9b1d9 100644 --- a/Libraries/ReactNative/DummyUIManager.js +++ b/Libraries/ReactNative/DummyUIManager.js @@ -19,14 +19,16 @@ module.exports = { 'getViewManagerConfig is unavailable in Bridgeless, use hasViewManagerConfig instead. viewManagerName: ' + viewManagerName, ); - if (viewManagerName === 'RCTVirtualText') { + if ( + viewManagerName === 'RCTVirtualText' || + viewManagerName === 'RCTShimmeringView' + ) { return {}; } return null; }, hasViewManagerConfig: (viewManagerName: string): boolean => { - const staticViewConfigsEnabled = global.__fbStaticViewConfig === true; - if (staticViewConfigsEnabled) { + if (global.__nativeComponentRegistry__hasComponent) { return unstable_hasComponent(viewManagerName); } else { return ( diff --git a/Libraries/ReactNative/UIManager.js b/Libraries/ReactNative/UIManager.js index 98b5c80d0f..e0ec53c061 100644 --- a/Libraries/ReactNative/UIManager.js +++ b/Libraries/ReactNative/UIManager.js @@ -34,7 +34,6 @@ export interface UIManagerJSInterface extends Spec { const UIManager: UIManagerJSInterface = global.RN$Bridgeless === true ? require('./DummyUIManager') - : require('./UIManagerInjection').default.unstable_UIManager ?? - require('./PaperUIManager'); + : require('./PaperUIManager'); module.exports = UIManager; diff --git a/Libraries/ReactNative/UIManagerInjection.js b/Libraries/ReactNative/UIManagerInjection.js deleted file mode 100644 index b1f74df852..0000000000 --- a/Libraries/ReactNative/UIManagerInjection.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - */ - -import type {UIManagerJSInterface} from './UIManager'; - -export default { - unstable_UIManager: (null: ?UIManagerJSInterface), -}; From 3f49e6763e66447f6ae17dc2f032e27330b7b74a Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Sat, 29 Jan 2022 13:50:34 -0800 Subject: [PATCH 007/109] Support color animation with native driver for Android Summary: Adds support for Animated.Color with native driver for Android. Reads the native config for the rbga channel AnimatedNodes, and on update(), converts the values into an integer (0xaarrggbb) Followup changes will include support for iOS and platform colors. Changelog: [Android][Added] - Support running animations with AnimatedColor with native driver Reviewed By: javache Differential Revision: D33833600 fbshipit-source-id: 2bf05c9715b603cf014ace09e9308b2bfd67f30a --- .../Animated/animations/TimingAnimation.js | 9 +-- Libraries/Animated/nodes/AnimatedColor.js | 21 +++++- .../java/com/facebook/react/animated/BUCK | 1 + .../react/animated/ColorAnimatedNode.java | 66 +++++++++++++++++++ .../animated/NativeAnimatedNodesManager.java | 2 + .../react/animated/PropsAnimatedNode.java | 2 + .../react/animated/StyleAnimatedNode.java | 2 + .../facebook/react/views/view/ColorUtil.java | 19 ++++++ .../test/java/com/facebook/react/views/BUCK | 7 +- .../react/views/view/ColorUtilTest.java | 9 +++ 10 files changed, 128 insertions(+), 10 deletions(-) create mode 100644 ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java diff --git a/Libraries/Animated/animations/TimingAnimation.js b/Libraries/Animated/animations/TimingAnimation.js index 3ed0e0f128..748bb47cc6 100644 --- a/Libraries/Animated/animations/TimingAnimation.js +++ b/Libraries/Animated/animations/TimingAnimation.js @@ -19,6 +19,7 @@ const {shouldUseNativeDriver} = require('../NativeAnimatedHelper'); import type {PlatformConfig} from '../AnimatedPlatformConfig'; import type {AnimationConfig, EndCallback} from './Animation'; +import type {RgbaValue} from '../nodes/AnimatedColor'; import AnimatedColor from '../nodes/AnimatedColor'; @@ -33,13 +34,7 @@ export type TimingAnimationConfig = { ... } | AnimatedValueXY - | { - r: number, - g: number, - b: number, - a: number, - ... - } + | RgbaValue | AnimatedColor | AnimatedInterpolation, easing?: (value: number) => number, diff --git a/Libraries/Animated/nodes/AnimatedColor.js b/Libraries/Animated/nodes/AnimatedColor.js index 1178a45b24..4a5cdc5d74 100644 --- a/Libraries/Animated/nodes/AnimatedColor.js +++ b/Libraries/Animated/nodes/AnimatedColor.js @@ -15,11 +15,12 @@ import AnimatedWithChildren from './AnimatedWithChildren'; import normalizeColor from '../../StyleSheet/normalizeColor'; import {processColorObject} from '../../StyleSheet/PlatformColorValueTypes'; +import type {PlatformConfig} from '../AnimatedPlatformConfig'; import type {ColorValue} from '../../StyleSheet/StyleSheet'; import type {NativeColorValue} from '../../StyleSheet/PlatformColorValueTypes'; type ColorListenerCallback = (value: string) => mixed; -type RgbaValue = { +export type RgbaValue = { +r: number, +g: number, +b: number, @@ -263,4 +264,22 @@ export default class AnimatedColor extends AnimatedWithChildren { this.a.__removeChild(this); super.__detach(); } + + __makeNative(platformConfig: ?PlatformConfig) { + this.r.__makeNative(platformConfig); + this.g.__makeNative(platformConfig); + this.b.__makeNative(platformConfig); + this.a.__makeNative(platformConfig); + super.__makeNative(platformConfig); + } + + __getNativeConfig(): {...} { + return { + type: 'color', + r: this.r.__getNativeTag(), + g: this.g.__getNativeTag(), + b: this.b.__getNativeTag(), + a: this.a.__getNativeTag(), + }; + } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK b/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK index 1f4e245b01..2a61c4707f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/BUCK @@ -28,6 +28,7 @@ rn_android_library( react_native_target("java/com/facebook/react/modules/core:core"), react_native_target("java/com/facebook/react/uimanager:uimanager"), react_native_target("java/com/facebook/react/uimanager/annotations:annotations"), + react_native_target("java/com/facebook/react/views/view:view"), ], exported_deps = [react_native_root_target(":FBReactNativeSpec")], ) diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java new file mode 100644 index 0000000000..0624a866ab --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.animated; + +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.views.view.ColorUtil; + +/** Animated node that represents a color. */ +/*package*/ class ColorAnimatedNode extends AnimatedNode { + + private final NativeAnimatedNodesManager mNativeAnimatedNodesManager; + private final int mRNodeId; + private final int mGNodeId; + private final int mBNodeId; + private final int mANodeId; + private int mColor; + + public ColorAnimatedNode( + ReadableMap config, NativeAnimatedNodesManager nativeAnimatedNodesManager) { + mNativeAnimatedNodesManager = nativeAnimatedNodesManager; + mRNodeId = config.getInt("r"); + mGNodeId = config.getInt("g"); + mBNodeId = config.getInt("b"); + mANodeId = config.getInt("a"); + + // TODO (T110930421): Support platform color + } + + public int getColor() { + return mColor; + } + + @Override + public void update() { + AnimatedNode rNode = mNativeAnimatedNodesManager.getNodeById(mRNodeId); + AnimatedNode gNode = mNativeAnimatedNodesManager.getNodeById(mGNodeId); + AnimatedNode bNode = mNativeAnimatedNodesManager.getNodeById(mBNodeId); + AnimatedNode aNode = mNativeAnimatedNodesManager.getNodeById(mANodeId); + + double r = ((ValueAnimatedNode) rNode).getValue(); + double g = ((ValueAnimatedNode) gNode).getValue(); + double b = ((ValueAnimatedNode) bNode).getValue(); + double a = ((ValueAnimatedNode) aNode).getValue(); + + mColor = ColorUtil.normalize(r, g, b, a); + } + + @Override + public String prettyPrint() { + return "ColorAnimatedNode[" + + mTag + + "]: r: " + + mRNodeId + + " g: " + + mGNodeId + + " b: " + + mBNodeId + + " a: " + + mANodeId; + } +} diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java index 8321acffb8..10252abfa1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java @@ -129,6 +129,8 @@ import java.util.Queue; node = new StyleAnimatedNode(config, this); } else if ("value".equals(type)) { node = new ValueAnimatedNode(config); + } else if ("color".equals(type)) { + node = new ColorAnimatedNode(config, this); } else if ("props".equals(type)) { node = new PropsAnimatedNode(config, this); } else if ("interpolation".equals(type)) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java b/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java index 9ee330d7dd..759675e661 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java @@ -105,6 +105,8 @@ import java.util.Map; } else { mPropMap.putDouble(entry.getKey(), ((ValueAnimatedNode) node).getValue()); } + } else if (node instanceof ColorAnimatedNode) { + mPropMap.putInt(entry.getKey(), ((ColorAnimatedNode) node).getColor()); } else { throw new IllegalArgumentException( "Unsupported type of node used in property node " + node.getClass()); diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java b/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java index 65b65a10ed..68ef6a4186 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/StyleAnimatedNode.java @@ -43,6 +43,8 @@ import java.util.Map; ((TransformAnimatedNode) node).collectViewUpdates(propsMap); } else if (node instanceof ValueAnimatedNode) { propsMap.putDouble(entry.getKey(), ((ValueAnimatedNode) node).getValue()); + } else if (node instanceof ColorAnimatedNode) { + propsMap.putInt(entry.getKey(), ((ColorAnimatedNode) node).getColor()); } else { throw new IllegalArgumentException( "Unsupported type of node used in property node " + node.getClass()); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java index cc804ef703..f1efecf3f0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ColorUtil.java @@ -39,6 +39,7 @@ public class ColorUtil { /** * Gets the opacity from a color. Inspired by Android ColorDrawable. * + * @param color color to get opacity from * @return opacity expressed by one of PixelFormat constants */ public static int getOpacityFromColor(int color) { @@ -51,4 +52,22 @@ public class ColorUtil { return PixelFormat.TRANSLUCENT; } } + + /** + * Converts individual {r, g, b, a} channel values to a single integer representation of the color + * as 0xAARRGGBB. + * + * @param r red channel value, [0, 255] + * @param g green channel value, [0, 255] + * @param b blue channel value, [0, 255] + * @param a alpha channel value, [0, 1] + * @return integer representation of the color as 0xAARRGGBB + */ + public static int normalize(double r, double g, double b, double a) { + return (clamp255(a * 255) << 24) | (clamp255(r) << 16) | (clamp255(g) << 8) | clamp255(b); + } + + private static int clamp255(double value) { + return Math.max(0, Math.min(255, (int) Math.round(value))); + } } diff --git a/ReactAndroid/src/test/java/com/facebook/react/views/BUCK b/ReactAndroid/src/test/java/com/facebook/react/views/BUCK index 29dc6d734d..a8548c6f57 100644 --- a/ReactAndroid/src/test/java/com/facebook/react/views/BUCK +++ b/ReactAndroid/src/test/java/com/facebook/react/views/BUCK @@ -2,9 +2,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "YOGA_TARGET", "react_native_dep", "r rn_robolectric_test( name = "views", - # TODO Disabled temporarily until Yoga linking is fixed t14964130 + # TODO (T110934492): Disabled temporarily until tests are fixed # srcs = glob(['**/*.java']), - srcs = glob(["image/*.java"]), + srcs = glob([ + "image/*.java", + "view/*.java", + ]), contacts = ["oncall+fbandroid_sheriff@xmail.facebook.com"], deps = [ YOGA_TARGET, diff --git a/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java b/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java index 5bb2bd71e0..a7ea56f0e2 100644 --- a/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java +++ b/ReactAndroid/src/test/java/com/facebook/react/views/view/ColorUtilTest.java @@ -44,4 +44,13 @@ public class ColorUtilTest { assertEquals(PixelFormat.OPAQUE, ColorUtil.getOpacityFromColor(0xFF123456)); assertEquals(PixelFormat.OPAQUE, ColorUtil.getOpacityFromColor(0xFFFFFFFF)); } + + @Test + public void testNormalize() { + assertEquals(0x800B1621, ColorUtil.normalize(11, 22, 33, 0.5)); + assertEquals(0x00000000, ColorUtil.normalize(0, 0, 0, 0)); + assertEquals(0xFFFFFFFF, ColorUtil.normalize(255, 255, 255, 1)); + assertEquals(0xFF00FFFF, ColorUtil.normalize(-1, 256, 255, 1.1)); + assertEquals(0x000001FF, ColorUtil.normalize(0.4, 0.5, 255.4, -1)); + } } From d682753244feba28c6a15c31966a3da075a090e6 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Mon, 31 Jan 2022 04:05:08 -0800 Subject: [PATCH 008/109] Support setting hitSlop with single value (JS) [re-land] Summary: JS changes to support D32138347 (https://github.com/facebook/react-native/commit/a96bdb7154b0d8c7f43977d8a583e8d2cbdcb795). This was previously reverted due to missing iOS Paper support. Changelog: [Android][Fixed] Enable hitSlop to be set using a single number. Original commit changeset: 91cfcc86582c Original Phabricator Diff: D32559015 (https://github.com/facebook/react-native/commit/589b129581903a737a64e14eab3f2e29620831d5) Reviewed By: yungsters Differential Revision: D33453327 fbshipit-source-id: d289a0a8b8208bc9c68e6ca537632b745e8196ed --- Libraries/Components/Pressable/Pressable.js | 5 ++--- Libraries/Components/View/ViewPropTypes.js | 4 ++-- Libraries/Pressability/PressabilityDebug.js | 14 +++++--------- Libraries/StyleSheet/EdgeInsetsPropType.js | 5 ++++- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Libraries/Components/Pressable/Pressable.js b/Libraries/Components/Pressable/Pressable.js index 877595adcf..6aca016984 100644 --- a/Libraries/Components/Pressable/Pressable.js +++ b/Libraries/Components/Pressable/Pressable.js @@ -22,7 +22,7 @@ import type { } from '../View/ViewAccessibility'; import {PressabilityDebugView} from '../../Pressability/PressabilityDebug'; import usePressability from '../../Pressability/usePressability'; -import {normalizeRect, type RectOrSize} from '../../StyleSheet/Rect'; +import {type RectOrSize} from '../../StyleSheet/Rect'; import type { LayoutEvent, MouseEvent, @@ -181,6 +181,7 @@ function Pressable(props: Props, forwardedRef): React.Node { delayLongPress, disabled, focusable, + hitSlop, onHoverIn, onHoverOut, onLongPress, @@ -201,8 +202,6 @@ function Pressable(props: Props, forwardedRef): React.Node { const [pressed, setPressed] = usePressState(testOnly_pressed === true); - const hitSlop = normalizeRect(props.hitSlop); - const accessibilityState = disabled != null ? {...props.accessibilityState, disabled} diff --git a/Libraries/Components/View/ViewPropTypes.js b/Libraries/Components/View/ViewPropTypes.js index 0e6f739470..4e22c3b3b5 100644 --- a/Libraries/Components/View/ViewPropTypes.js +++ b/Libraries/Components/View/ViewPropTypes.js @@ -18,7 +18,7 @@ import type { Layout, LayoutEvent, } from '../../Types/CoreEventTypes'; -import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType'; +import type {EdgeInsetsOrSizeProp} from '../../StyleSheet/EdgeInsetsPropType'; import type {Node} from 'react'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; import type { @@ -481,7 +481,7 @@ export type ViewProps = $ReadOnly<{| * * See https://reactnative.dev/docs/view#hitslop */ - hitSlop?: ?EdgeInsetsProp, + hitSlop?: ?EdgeInsetsOrSizeProp, /** * Controls whether the `View` can be the target of touch events. diff --git a/Libraries/Pressability/PressabilityDebug.js b/Libraries/Pressability/PressabilityDebug.js index 2d37a26dd9..9c5bb0830e 100644 --- a/Libraries/Pressability/PressabilityDebug.js +++ b/Libraries/Pressability/PressabilityDebug.js @@ -10,18 +10,14 @@ import normalizeColor from '../StyleSheet/normalizeColor'; import type {ColorValue} from '../StyleSheet/StyleSheet'; +import {normalizeRect, type RectOrSize} from '../StyleSheet/Rect'; import View from '../Components/View/View'; import * as React from 'react'; type Props = $ReadOnly<{| color: ColorValue, - hitSlop: ?$ReadOnly<{| - bottom?: ?number, - left?: ?number, - right?: ?number, - top?: ?number, - |}>, + hitSlop: ?RectOrSize, |}>; /** @@ -39,16 +35,16 @@ type Props = $ReadOnly<{| * ); * */ -export function PressabilityDebugView({color, hitSlop}: Props): React.Node { +export function PressabilityDebugView(props: Props): React.Node { if (__DEV__) { if (isEnabled()) { - const normalizedColor = normalizeColor(color); + const normalizedColor = normalizeColor(props.color); if (typeof normalizedColor !== 'number') { return null; } const baseColor = '#' + (normalizedColor ?? 0).toString(16).padStart(8, '0'); - + const hitSlop = normalizeRect(props.hitSlop); return ( Date: Mon, 31 Jan 2022 07:57:04 -0800 Subject: [PATCH 009/109] Android: Fix crash when WindowInsets is null on ReactRootView (#32989) Summary: Fixes a potential crash was introduced by https://github.com/facebook/react-native/issues/30919 that aimed to get the keyboard height on devices with a Notch. The problem is that it considers that any ReactRootView will have an insets available. When using [react-native-navigation](https://github.com/wix/react-native-navigation) and assigning a Navigation button to the TopBar as a component, the component gets registered as a RootView but won't have any insets attach to the view. [getRootWindowInsets()](https://developer.android.com/reference/android/view/View#getRootWindowInsets()) in fact return a `WindowInset` only available if the view is attached, so when executing `checkForKeyboardEvents` method from ReactRootView, is trying to access the `DisplayCutout` of a null object, leading to a crash. ## Changelog [Android] [Fixed] - Fix potential crash if ReactRootView does not have insets attached. Pull Request resolved: https://github.com/facebook/react-native/pull/32989 Test Plan: Without the code change: Notice how the second screen being push contains a React Component on the top right of the navigation bar, and when component is unmounted (going back) the app crashes. https://user-images.githubusercontent.com/6757047/151558235-39b9a8b5-be73-4c31-8053-02ce188637b8.mp4 crash log ``` 2022-01-28 10:27:52.902 15600-15600/com.mattermost.rnbeta E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mattermost.rnbeta, PID: 15600 java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayCutout android.view.WindowInsets.getDisplayCutout()' on a null object reference at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.checkForKeyboardEvents(ReactRootView.java:778) at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.onGlobalLayout(ReactRootView.java:769) at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1061) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3214) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2143) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8665) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1037) at android.view.Choreographer.doCallbacks(Choreographer.java:845) at android.view.Choreographer.doFrame(Choreographer.java:780) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) ``` After applying the patch which is only a null check validation and does not change any previous behavior https://user-images.githubusercontent.com/6757047/151558429-9ff1a608-abb6-4168-8db9-df0c3c71d79e.mp4 Reviewed By: cortinico Differential Revision: D33844955 Pulled By: ShikaSD fbshipit-source-id: ed5579ad3afeed009c61cc1851eee45c70087cf5 --- .../main/java/com/facebook/react/ReactRootView.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java b/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java index 30f84700db..3d5ee96820 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java @@ -27,6 +27,7 @@ import android.view.Surface; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; +import android.view.WindowInsets; import android.view.WindowManager; import android.widget.FrameLayout; import androidx.annotation.Nullable; @@ -826,9 +827,12 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot { getRootView().getWindowVisibleDisplayFrame(mVisibleViewArea); int notchHeight = 0; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - DisplayCutout displayCutout = getRootView().getRootWindowInsets().getDisplayCutout(); - if (displayCutout != null) { - notchHeight = displayCutout.getSafeInsetTop(); + WindowInsets insets = getRootView().getRootWindowInsets(); + if (insets != null) { + DisplayCutout displayCutout = insets.getDisplayCutout(); + if (displayCutout != null) { + notchHeight = displayCutout.getSafeInsetTop(); + } } } final int heightDiff = From c1bb94527742f2ba6a3b4c605e8b4c9e0c05e379 Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Mon, 31 Jan 2022 10:45:24 -0800 Subject: [PATCH 010/109] Changelog for 0.67.2 (#33007) Summary: Changelog for 0.67.2 ## Changelog [Internal][Changed] - Release Changelog Pull Request resolved: https://github.com/facebook/react-native/pull/33007 Test Plan: N/A Reviewed By: cortinico Differential Revision: D33894314 Pulled By: ShikaSD fbshipit-source-id: fc7571e39adc25e2f39db362f35d685cbc10d096 --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af18fc2100..a72434de86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## v0.67.2 + +### Fixed + +- Fix error "mockModal is not a function" ([507b05f4c0](https://github.com/facebook/react-native/commit/507b05f4c02b46109f483a2b79c924a775fd7bd3) by [@AntoineDoubovetzky](https://github.com/AntoineDoubovetzky)) + +#### Android specific + +- Fix potential crash if ReactRootView does not have insets attached. ([6239e2f5ce](https://github.com/facebook/react-native/commit/6239e2f5ce82f7c2e683eb4699b9ce3ff1b58ac5) by [@enahum](https://github.com/enahum)) +- Upgrading OkHttp from 4.9.1 to 4.9.2 to fix CVE-2021-0341. ([e896d21](https://github.com/facebook/react-native/commit/e896d21ced3c0c917c2fc0044d2b93b44df9a081) by [@owjsub](https://github.com/owjsub)) + +#### iOS specific + +- Fix `Time.h` patch not being applied when running `pod install --project-directory=ios` ([60cef850bd](https://github.com/facebook/react-native/commit/60cef850bd3fd12c32ee1196bd19a559592d1465) by [@tido64](https://github.com/tido64)) +- Find-node.sh now respects .nvmrc ([35bcf934b1](https://github.com/facebook/react-native/commit/35bcf934b186e581d100d43e563044300759557f) by [@igrayson](https://github.com/igrayson)) + ## v0.67.1 ### Fixed From 50c8e973f067d4ef1fc3c2eddd360a0709828968 Mon Sep 17 00:00:00 2001 From: Kuba Holuj Date: Mon, 31 Jan 2022 11:31:27 -0800 Subject: [PATCH 011/109] Update StatusBar for Android 11+ (#32975) Summary: Android 11 (API 30) introduced a new interface for changing the appearance of the status bars with [`WindowInsetsController#setSystemBarsAppearance`](https://developer.android.com/reference/kotlin/android/view/WindowInsetsController#setsystembarsappearance) and deprecated using the `WindowManager#systemUiVisibility` properties. Apparently, once you call `setSystemBarsAppearance` Android will no longer respect `systemUiVisibility` and if anyone, such as the Android 12 Splash Screen library, happens to call it, it will break status bars. This PR augments the RN StatusBarModule to use the new interface on Android 11+. Also updated the rn-tester app, see video. https://user-images.githubusercontent.com/1124321/151321561-8202e237-cf7d-45ce-b957-18b5bafd17c4.mov ## Changelog [Android] [Changed] - Use new StatusBar API on Android 11 (API 30)+ Pull Request resolved: https://github.com/facebook/react-native/pull/32975 Reviewed By: cortinico Differential Revision: D33814853 Pulled By: ShikaSD fbshipit-source-id: c0f2651015dddb4871a3e3b26642f76a46da2a76 --- .../modules/statusbar/StatusBarModule.java | 28 ++++++++---- .../js/examples/StatusBar/StatusBarExample.js | 43 +++++++++++++++++-- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java index e8dc15272e..a3beef47e7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java @@ -15,6 +15,7 @@ import android.content.Context; import android.os.Build; import android.view.View; import android.view.WindowInsets; +import android.view.WindowInsetsController; import android.view.WindowManager; import androidx.annotation.Nullable; import androidx.core.view.ViewCompat; @@ -184,12 +185,23 @@ public class StatusBarModule extends NativeStatusBarManagerAndroidSpec { return; } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - UiThreadUtil.runOnUiThread( - new Runnable() { - @TargetApi(Build.VERSION_CODES.M) - @Override - public void run() { + UiThreadUtil.runOnUiThread( + new Runnable() { + @TargetApi(Build.VERSION_CODES.R) + @Override + public void run() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + WindowInsetsController insetsController = activity.getWindow().getInsetsController(); + if ("dark-content".equals(style)) { + // dark-content means dark icons on a light status bar + insetsController.setSystemBarsAppearance( + WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS, + WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS); + } else { + insetsController.setSystemBarsAppearance( + 0, WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS); + } + } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { View decorView = activity.getWindow().getDecorView(); int systemUiVisibilityFlags = decorView.getSystemUiVisibility(); if ("dark-content".equals(style)) { @@ -199,7 +211,7 @@ public class StatusBarModule extends NativeStatusBarManagerAndroidSpec { } decorView.setSystemUiVisibility(systemUiVisibilityFlags); } - }); - } + } + }); } } diff --git a/packages/rn-tester/js/examples/StatusBar/StatusBarExample.js b/packages/rn-tester/js/examples/StatusBar/StatusBarExample.js index 5db186500b..452e04e1d1 100644 --- a/packages/rn-tester/js/examples/StatusBar/StatusBarExample.js +++ b/packages/rn-tester/js/examples/StatusBar/StatusBarExample.js @@ -23,7 +23,7 @@ const { const colors = ['#ff0000', '#00ff00', '#0000ff', 'rgba(0, 0, 0, 0.4)']; -const barStyles = ['default', 'light-content']; +const barStyles = ['default', 'light-content', 'dark-content']; const showHideTransitions = ['fade', 'slide']; @@ -129,11 +129,16 @@ class StatusBarStyleExample extends React.Component<{...}, $FlowFixMeState> { style: '{getValue(barStyles, this._barStyleIndex)}' + + (default is dark for iOS, light for Android) + - animated: {this.state.animated ? 'true' : 'false'} + + animated (ios only): {this.state.animated ? 'true' : 'false'} + @@ -288,6 +293,9 @@ class StatusBarStaticIOSExample extends React.Component<{...}> { setBarStyle('default', true) + + (default is dark for iOS, light for Android) + { @@ -342,6 +350,36 @@ class StatusBarStaticAndroidExample extends React.Component<{...}> { setHidden(false) + { + StatusBar.setBarStyle('light-content'); + }}> + + setBarStyle('light-content') + + + { + StatusBar.setBarStyle('dark-content'); + }}> + + setBarStyle('dark-content') + + + { + StatusBar.setBarStyle('default'); + }}> + + setBarStyle('default') + + + + (default is dark for iOS, light for Android) + { @@ -448,7 +486,6 @@ exports.examples = [ render(): React.Node { return ; }, - platform: 'ios', }, { title: 'StatusBar network activity indicator', From dc507be4d9a9d3edce4b2a0b2b7a0cbbcd0cffd0 Mon Sep 17 00:00:00 2001 From: Keshav Kolur Date: Mon, 31 Jan 2022 13:40:13 -0800 Subject: [PATCH 012/109] Replace fb_xplat_platform_specific_rule calls where rule = fb_java_library with direct call to fb_java_library_android Summary: Replace fb_xplat_platform_specific_rule calls where rule = fb_java_library with direct call to fb_java_library_android Reviewed By: alexmalyshev Differential Revision: D33852709 fbshipit-source-id: 1ff3a1225e681d0924ec04e955b0039724182b1c --- .../src/main/java/com/facebook/react/module/processing/BUCK | 6 +++--- .../src/main/java/com/facebook/react/processing/BUCK | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK b/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK index cc44f729d1..16441a8b64 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK @@ -22,8 +22,8 @@ rn_java_library( react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/javapoet:javapoet"), react_native_dep("third-party/java/jsr-305:jsr-305"), - react_native_target("java/com/facebook/react/module/annotations:annotations"), - react_native_target("java/com/facebook/react/module/model:model"), - react_native_target("java/com/facebook/react/turbomodule/core/interfaces:interfaces"), + react_native_target("java/com/facebook/react/module/annotations:annotationsAndroid"), + react_native_target("java/com/facebook/react/module/model:modelAndroid"), + react_native_target("java/com/facebook/react/turbomodule/core/interfaces:interfacesAndroid"), ], ) diff --git a/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK index c31511049c..d596417c65 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK @@ -22,7 +22,7 @@ rn_java_library( react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/javapoet:javapoet"), react_native_dep("third-party/java/jsr-305:jsr-305"), - react_native_target("java/com/facebook/react/uimanager/annotations:annotations"), - react_native_target("java/com/facebook/react/bridge:bridge"), + react_native_target("java/com/facebook/react/uimanager/annotations:annotationsAndroid"), + react_native_target("java/com/facebook/react/bridge:bridgeAndroid"), ], ) From 554b35daf4d1cb3130a6563d50eb9367cc0d02d2 Mon Sep 17 00:00:00 2001 From: Keshav Kolur Date: Mon, 31 Jan 2022 14:14:10 -0800 Subject: [PATCH 013/109] Revert D33852709: Replace fb_xplat_platform_specific_rule calls where rule = fb_java_library with direct call to fb_java_library_android Differential Revision: D33852709 (https://github.com/facebook/react-native/commit/dc507be4d9a9d3edce4b2a0b2b7a0cbbcd0cffd0) Original commit changeset: 1ff3a1225e68 Original Phabricator Diff: D33852709 (https://github.com/facebook/react-native/commit/dc507be4d9a9d3edce4b2a0b2b7a0cbbcd0cffd0) fbshipit-source-id: 10db2d1bda1ea69b9a0226041493af06b78c16c4 --- .../src/main/java/com/facebook/react/module/processing/BUCK | 6 +++--- .../src/main/java/com/facebook/react/processing/BUCK | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK b/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK index 16441a8b64..cc44f729d1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/module/processing/BUCK @@ -22,8 +22,8 @@ rn_java_library( react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/javapoet:javapoet"), react_native_dep("third-party/java/jsr-305:jsr-305"), - react_native_target("java/com/facebook/react/module/annotations:annotationsAndroid"), - react_native_target("java/com/facebook/react/module/model:modelAndroid"), - react_native_target("java/com/facebook/react/turbomodule/core/interfaces:interfacesAndroid"), + react_native_target("java/com/facebook/react/module/annotations:annotations"), + react_native_target("java/com/facebook/react/module/model:model"), + react_native_target("java/com/facebook/react/turbomodule/core/interfaces:interfaces"), ], ) diff --git a/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK index d596417c65..c31511049c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK @@ -22,7 +22,7 @@ rn_java_library( react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/javapoet:javapoet"), react_native_dep("third-party/java/jsr-305:jsr-305"), - react_native_target("java/com/facebook/react/uimanager/annotations:annotationsAndroid"), - react_native_target("java/com/facebook/react/bridge:bridgeAndroid"), + react_native_target("java/com/facebook/react/uimanager/annotations:annotations"), + react_native_target("java/com/facebook/react/bridge:bridge"), ], ) From 7b9490b4b122183c34bd6228836ffb1d2f394f0a Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Mon, 31 Jan 2022 14:50:51 -0800 Subject: [PATCH 014/109] Introduce PlatformBaseViewConfig and fix SVC for RCTView Summary: ## Impact Fix the Static ViewConfig for . This diff fixes the base ViewConfig for all HostComponents on both platforms. Consequently, it simplifies SVC reconciliation efforts, by nearly eliminating the first of these classes of SVC errors: 1. Unexpected properties in SVC 2. Missing properties in SVC 3. Not matching properites in SVC ## What is the base ViewConfig on each iOS/Android? **On iOS:** - All props come from ViewManagers - All HostComponent ViewManagers extend ViewManager https://pxl.cl/1SxdF Therefore, the base ViewConfig for all components should be 's static ViewConfig. **On Android:** The component model is a bit more complicated: https://pxl.cl/1Vmp5 Takeaways: - Props come from Shadow Nodes **and** ViewManagers - Nearly all HostComponent ViewManagers extend BaseViewManager. But, that's not 's ViewManager. - 's ViewManager is [ReactViewManager](https://fburl.com/code/0zalv8zk), which is a descendent of BaseViewManager, and declares its own ReactProps. So, on Android, it's not safe for the base ViewConfig to be 's ViewConfig: 1. No components actualy incorportate 's props 2. Some components don't even incorporate BaseViewManager's props. So, what should the base ViewConfig be on Android? - Nearly all components extend BaseViewManager. BaseViewManager must have a shadow node [that extends LayoutShadowNode](https://www.internalfb.com/code/fbsource/[47d68ebc06e64d97da9d069f1ab662b392f0df8a]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java?lines=40). Therefore, we'll make the base ViewConfig on Android be generated by BaseViewManager + LayoutShadowNode. ## Changes In this diff, I removed ReactNativeViewViewConfig, and introduced a new view config called PlatformBaseViewConfig. This ViewConfig partial will capture all the props available on all HostComponents on **both** platforms. This may not necessarily be the props made available on . The only components that don't extend the base platform props are: RCTTextInlineImage. What we do with these components is TBD. Changelog: [Internal] Reviewed By: p-sun, yungsters Differential Revision: D33135055 fbshipit-source-id: 7299f60ae45ed499ce47c0d0a6309a047bff90bb --- .../View/ReactNativeViewViewConfig.js | 360 -------------- .../View/ReactNativeViewViewConfigAndroid.js | 83 ---- .../Components/View/ViewNativeComponent.js | 71 ++- Libraries/Core/setUpReactDevTools.js | 5 +- Libraries/Inspector/Inspector.js | 6 +- .../NativeComponent/PlatformBaseViewConfig.js | 452 ++++++++++++++++++ .../StaticViewConfigValidator.js | 6 +- Libraries/NativeComponent/ViewConfig.js | 8 +- Libraries/NativeComponent/ViewConfigIgnore.js | 27 ++ .../verifyComponentAttributeEquivalence.js | 4 +- 10 files changed, 559 insertions(+), 463 deletions(-) delete mode 100644 Libraries/Components/View/ReactNativeViewViewConfig.js delete mode 100644 Libraries/Components/View/ReactNativeViewViewConfigAndroid.js create mode 100644 Libraries/NativeComponent/PlatformBaseViewConfig.js create mode 100644 Libraries/NativeComponent/ViewConfigIgnore.js diff --git a/Libraries/Components/View/ReactNativeViewViewConfig.js b/Libraries/Components/View/ReactNativeViewViewConfig.js deleted file mode 100644 index e56eb0dfe3..0000000000 --- a/Libraries/Components/View/ReactNativeViewViewConfig.js +++ /dev/null @@ -1,360 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - * @format - */ - -import type {ViewConfig} from '../../Renderer/shims/ReactNativeTypes'; -import ReactNativeViewViewConfigAndroid from './ReactNativeViewViewConfigAndroid'; -import {Platform} from 'react-native'; - -const ReactNativeViewConfig: ViewConfig = { - uiViewClassName: 'RCTView', - baseModuleName: null, - Manager: 'ViewManager', - Commands: {}, - Constants: {}, - bubblingEventTypes: { - ...ReactNativeViewViewConfigAndroid.bubblingEventTypes, - topBlur: { - phasedRegistrationNames: { - bubbled: 'onBlur', - captured: 'onBlurCapture', - }, - }, - topChange: { - phasedRegistrationNames: { - bubbled: 'onChange', - captured: 'onChangeCapture', - }, - }, - topEndEditing: { - phasedRegistrationNames: { - bubbled: 'onEndEditing', - captured: 'onEndEditingCapture', - }, - }, - topFocus: { - phasedRegistrationNames: { - bubbled: 'onFocus', - captured: 'onFocusCapture', - }, - }, - topKeyPress: { - phasedRegistrationNames: { - bubbled: 'onKeyPress', - captured: 'onKeyPressCapture', - }, - }, - topPress: { - phasedRegistrationNames: { - bubbled: 'onPress', - captured: 'onPressCapture', - }, - }, - topSubmitEditing: { - phasedRegistrationNames: { - bubbled: 'onSubmitEditing', - captured: 'onSubmitEditingCapture', - }, - }, - topTouchCancel: { - phasedRegistrationNames: { - bubbled: 'onTouchCancel', - captured: 'onTouchCancelCapture', - }, - }, - topTouchEnd: { - phasedRegistrationNames: { - bubbled: 'onTouchEnd', - captured: 'onTouchEndCapture', - }, - }, - topTouchMove: { - phasedRegistrationNames: { - bubbled: 'onTouchMove', - captured: 'onTouchMoveCapture', - }, - }, - topTouchStart: { - phasedRegistrationNames: { - bubbled: 'onTouchStart', - captured: 'onTouchStartCapture', - }, - }, - }, - directEventTypes: { - ...ReactNativeViewViewConfigAndroid.directEventTypes, - topAccessibilityAction: { - registrationName: 'onAccessibilityAction', - }, - topAccessibilityEscape: { - registrationName: 'onAccessibilityEscape', - }, - topAccessibilityTap: { - registrationName: 'onAccessibilityTap', - }, - topLayout: { - registrationName: 'onLayout', - }, - topMagicTap: { - registrationName: 'onMagicTap', - }, - topPointerEnter: { - registrationName: 'pointerenter', - }, - topPointerLeave: { - registrationName: 'pointerleave', - }, - topPointerMove: { - registrationName: 'pointermove', - }, - // Events for react-native-gesture-handler (T45765076) - // Remove once this library can handle JS View Configs - onGestureHandlerEvent: { - registrationName: 'onGestureHandlerEvent', - }, - onGestureHandlerStateChange: { - registrationName: 'onGestureHandlerStateChange', - }, - }, - validAttributes: { - ...ReactNativeViewViewConfigAndroid.validAttributes, - accessibilityActions: true, - accessibilityElementsHidden: true, - accessibilityHint: true, - accessibilityIgnoresInvertColors: true, - accessibilityLabel: true, - accessibilityLiveRegion: true, - accessibilityRole: true, - accessibilityState: true, - accessibilityValue: true, - accessibilityViewIsModal: true, - accessible: true, - alignContent: true, - alignItems: true, - alignSelf: true, - aspectRatio: true, - backfaceVisibility: true, - backgroundColor: {process: require('../../StyleSheet/processColor')}, - borderBottomColor: {process: require('../../StyleSheet/processColor')}, - borderBottomEndRadius: true, - borderBottomLeftRadius: true, - borderBottomRightRadius: true, - borderBottomStartRadius: true, - borderBottomWidth: true, - borderColor: {process: require('../../StyleSheet/processColor')}, - borderEndColor: {process: require('../../StyleSheet/processColor')}, - borderEndWidth: true, - borderLeftColor: {process: require('../../StyleSheet/processColor')}, - borderLeftWidth: true, - borderRadius: true, - borderRightColor: {process: require('../../StyleSheet/processColor')}, - borderRightWidth: true, - borderStartColor: {process: require('../../StyleSheet/processColor')}, - borderStartWidth: true, - borderStyle: true, - borderTopColor: {process: require('../../StyleSheet/processColor')}, - borderTopEndRadius: true, - borderTopLeftRadius: true, - borderTopRightRadius: true, - borderTopStartRadius: true, - borderTopWidth: true, - borderWidth: true, - bottom: true, - clickable: true, - collapsable: true, - direction: true, - display: true, - elevation: true, - end: true, - flex: true, - flexBasis: true, - flexDirection: true, - flexGrow: true, - flexShrink: true, - flexWrap: true, - height: true, - hitSlop: {diff: require('../../Utilities/differ/insetsDiffer')}, - importantForAccessibility: true, - justifyContent: true, - left: true, - margin: true, - marginBottom: true, - marginEnd: true, - marginHorizontal: true, - marginLeft: true, - marginRight: true, - marginStart: true, - marginTop: true, - marginVertical: true, - maxHeight: true, - maxWidth: true, - minHeight: true, - minWidth: true, - nativeID: true, - needsOffscreenAlphaCompositing: true, - onAccessibilityAction: true, - onAccessibilityEscape: true, - onAccessibilityTap: true, - pointerenter: true, - pointerleave: true, - pointermove: true, - onLayout: true, - onMagicTap: true, - opacity: true, - overflow: true, - padding: true, - paddingBottom: true, - paddingEnd: true, - paddingHorizontal: true, - paddingLeft: true, - paddingRight: true, - paddingStart: true, - paddingTop: true, - paddingVertical: true, - pointerEvents: true, - position: true, - removeClippedSubviews: true, - renderToHardwareTextureAndroid: true, - right: true, - rotation: true, - scaleX: true, - scaleY: true, - shadowColor: {process: require('../../StyleSheet/processColor')}, - shadowOffset: {diff: require('../../Utilities/differ/sizesDiffer')}, - shadowOpacity: true, - shadowRadius: true, - shouldRasterizeIOS: true, - start: true, - style: { - alignContent: true, - alignItems: true, - alignSelf: true, - aspectRatio: true, - backfaceVisibility: true, - backgroundColor: {process: require('../../StyleSheet/processColor')}, - borderBottomColor: {process: require('../../StyleSheet/processColor')}, - borderBottomEndRadius: true, - borderBottomLeftRadius: true, - borderBottomRightRadius: true, - borderBottomStartRadius: true, - borderBottomWidth: true, - borderColor: {process: require('../../StyleSheet/processColor')}, - borderEndColor: {process: require('../../StyleSheet/processColor')}, - borderEndWidth: true, - borderLeftColor: {process: require('../../StyleSheet/processColor')}, - borderLeftWidth: true, - borderRadius: true, - borderRightColor: {process: require('../../StyleSheet/processColor')}, - borderRightWidth: true, - borderStartColor: {process: require('../../StyleSheet/processColor')}, - borderStartWidth: true, - borderStyle: true, - borderTopColor: {process: require('../../StyleSheet/processColor')}, - borderTopEndRadius: true, - borderTopLeftRadius: true, - borderTopRightRadius: true, - borderTopStartRadius: true, - borderTopWidth: true, - borderWidth: true, - bottom: true, - color: {process: require('../../StyleSheet/processColor')}, - decomposedMatrix: true, - direction: true, - display: true, - elevation: true, - end: true, - flex: true, - flexBasis: true, - flexDirection: true, - flexGrow: true, - flexShrink: true, - flexWrap: true, - fontFamily: true, - fontSize: true, - fontStyle: true, - fontVariant: true, - fontWeight: true, - height: true, - includeFontPadding: true, - justifyContent: true, - left: true, - letterSpacing: true, - lineHeight: true, - margin: true, - marginBottom: true, - marginEnd: true, - marginHorizontal: true, - marginLeft: true, - marginRight: true, - marginStart: true, - marginTop: true, - marginVertical: true, - maxHeight: true, - maxWidth: true, - minHeight: true, - minWidth: true, - opacity: true, - overflow: true, - overlayColor: {process: require('../../StyleSheet/processColor')}, - padding: true, - paddingBottom: true, - paddingEnd: true, - paddingHorizontal: true, - paddingLeft: true, - paddingRight: true, - paddingStart: true, - paddingTop: true, - paddingVertical: true, - position: true, - resizeMode: true, - right: true, - rotation: true, - scaleX: true, - scaleY: true, - shadowColor: {process: require('../../StyleSheet/processColor')}, - shadowOffset: {diff: require('../../Utilities/differ/sizesDiffer')}, - shadowOpacity: true, - shadowRadius: true, - start: true, - textAlign: true, - textAlignVertical: true, - textDecorationColor: {process: require('../../StyleSheet/processColor')}, - textDecorationLine: true, - textDecorationStyle: true, - textShadowColor: {process: require('../../StyleSheet/processColor')}, - textShadowOffset: true, - textShadowRadius: true, - textTransform: true, - tintColor: {process: require('../../StyleSheet/processColor')}, - top: true, - transform: - Platform.OS === 'ios' - ? {diff: require('../../Utilities/differ/matricesDiffer')} - : {process: require('../../StyleSheet/processTransform')}, - transformMatrix: true, - translateX: true, - translateY: true, - width: true, - writingDirection: true, - zIndex: true, - }, - testID: true, - top: true, - transform: - Platform.OS === 'ios' - ? {diff: require('../../Utilities/differ/matricesDiffer')} - : {process: require('../../StyleSheet/processTransform')}, - translateX: true, - translateY: true, - width: true, - zIndex: true, - }, -}; - -module.exports = ReactNativeViewConfig; diff --git a/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js b/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js deleted file mode 100644 index 504e529027..0000000000 --- a/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -const ReactNativeViewViewConfigAndroid = { - uiViewClassName: 'RCTView', - bubblingEventTypes: { - topSelect: { - phasedRegistrationNames: { - bubbled: 'onSelect', - captured: 'onSelectCapture', - }, - }, - topAssetDidLoad: { - phasedRegistrationNames: { - bubbled: 'onAssetDidLoad', - captured: 'onAssetDidLoadCapture', - }, - }, - }, - directEventTypes: { - topClick: { - registrationName: 'onClick', - }, - topContentSizeChange: { - registrationName: 'onContentSizeChange', - }, - topLoadingError: { - registrationName: 'onLoadingError', - }, - topLoadingFinish: { - registrationName: 'onLoadingFinish', - }, - topLoadingStart: { - registrationName: 'onLoadingStart', - }, - topMessage: { - registrationName: 'onMessage', - }, - topMomentumScrollBegin: { - registrationName: 'onMomentumScrollBegin', - }, - topMomentumScrollEnd: { - registrationName: 'onMomentumScrollEnd', - }, - topScroll: { - registrationName: 'onScroll', - }, - topScrollBeginDrag: { - registrationName: 'onScrollBeginDrag', - }, - topScrollEndDrag: { - registrationName: 'onScrollEndDrag', - }, - topSelectionChange: { - registrationName: 'onSelectionChange', - }, - onAssetDidLoad: { - registrationName: 'onAssetDidLoad', - }, - }, - validAttributes: { - hasTVPreferredFocus: true, - focusable: true, - nativeBackgroundAndroid: true, - nativeForegroundAndroid: true, - nextFocusDown: true, - nextFocusForward: true, - nextFocusLeft: true, - nextFocusRight: true, - nextFocusUp: true, - }, -}; - -module.exports = ReactNativeViewViewConfigAndroid; diff --git a/Libraries/Components/View/ViewNativeComponent.js b/Libraries/Components/View/ViewNativeComponent.js index 9d6db6e23c..378e4a5982 100644 --- a/Libraries/Components/View/ViewNativeComponent.js +++ b/Libraries/Components/View/ViewNativeComponent.js @@ -10,18 +10,75 @@ import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry'; import {type HostComponent} from '../../Renderer/shims/ReactNativeTypes'; -import Platform from '../../Utilities/Platform'; import codegenNativeCommands from '../../Utilities/codegenNativeCommands'; -import ReactNativeViewViewConfigAndroid from './ReactNativeViewViewConfigAndroid'; import {type ViewProps as Props} from './ViewPropTypes'; +import Platform from '../../Utilities/Platform'; + import * as React from 'react'; +const ViewPartialViewConfig = + Platform.OS === 'android' + ? { + uiViewClassName: 'RCTView', + validAttributes: { + // ReactClippingViewManager @ReactProps + removeClippedSubviews: true, + + // ReactViewManager @ReactProps + accessible: true, + hasTVPreferredFocus: true, + nextFocusDown: true, + nextFocusForward: true, + nextFocusLeft: true, + nextFocusRight: true, + nextFocusUp: true, + + borderRadius: true, + borderTopLeftRadius: true, + borderTopRightRadius: true, + borderBottomRightRadius: true, + borderBottomLeftRadius: true, + borderTopStartRadius: true, + borderTopEndRadius: true, + borderBottomStartRadius: true, + borderBottomEndRadius: true, + + borderStyle: true, + hitSlop: true, + pointerEvents: true, + nativeBackgroundAndroid: true, + nativeForegroundAndroid: true, + needsOffscreenAlphaCompositing: true, + + borderWidth: true, + borderLeftWidth: true, + borderRightWidth: true, + borderTopWidth: true, + borderBottomWidth: true, + borderStartWidth: true, + borderEndWidth: true, + + borderColor: {process: require('../../StyleSheet/processColor')}, + borderLeftColor: {process: require('../../StyleSheet/processColor')}, + borderRightColor: {process: require('../../StyleSheet/processColor')}, + borderTopColor: {process: require('../../StyleSheet/processColor')}, + borderBottomColor: { + process: require('../../StyleSheet/processColor'), + }, + borderStartColor: {process: require('../../StyleSheet/processColor')}, + borderEndColor: {process: require('../../StyleSheet/processColor')}, + + focusable: true, + overflow: true, + backfaceVisibility: true, + }, + } + : { + uiViewClassName: 'RCTView', + }; + const ViewNativeComponent: HostComponent = - NativeComponentRegistry.get('RCTView', () => - Platform.OS === 'android' - ? ReactNativeViewViewConfigAndroid - : {uiViewClassName: 'RCTView'}, - ); + NativeComponentRegistry.get('RCTView', () => ViewPartialViewConfig); interface NativeCommands { +hotspotUpdate: ( diff --git a/Libraries/Core/setUpReactDevTools.js b/Libraries/Core/setUpReactDevTools.js index 7665ad4002..46955da620 100644 --- a/Libraries/Core/setUpReactDevTools.js +++ b/Libraries/Core/setUpReactDevTools.js @@ -58,12 +58,13 @@ if (__DEV__) { isWebSocketOpen = true; }); - const viewConfig = require('../Components/View/ReactNativeViewViewConfig'); + const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes'); + reactDevTools.connectToDevTools({ isAppActive, resolveRNStyle: require('../StyleSheet/flattenStyle'), nativeStyleEditorValidAttributes: Object.keys( - viewConfig.validAttributes.style, + ReactNativeStyleAttributes, ), websocket: ws, }); diff --git a/Libraries/Inspector/Inspector.js b/Libraries/Inspector/Inspector.js index cc239e4846..1134e25429 100644 --- a/Libraries/Inspector/Inspector.js +++ b/Libraries/Inspector/Inspector.js @@ -19,6 +19,7 @@ const React = require('react'); const ReactNative = require('../Renderer/shims/ReactNative'); const StyleSheet = require('../StyleSheet/StyleSheet'); const View = require('../Components/View/View'); +const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes'); const invariant = require('invariant'); @@ -47,10 +48,7 @@ const renderers = findRenderers(); // Required for React DevTools to view/edit React Native styles in Flipper. // Flipper doesn't inject these values when initializing DevTools. hook.resolveRNStyle = require('../StyleSheet/flattenStyle'); -const viewConfig = require('../Components/View/ReactNativeViewViewConfig'); -hook.nativeStyleEditorValidAttributes = Object.keys( - viewConfig.validAttributes.style, -); +hook.nativeStyleEditorValidAttributes = Object.keys(ReactNativeStyleAttributes); function findRenderers(): $ReadOnlyArray { const allRenderers = Array.from(hook.renderers.values()); diff --git a/Libraries/NativeComponent/PlatformBaseViewConfig.js b/Libraries/NativeComponent/PlatformBaseViewConfig.js new file mode 100644 index 0000000000..3d0d35152e --- /dev/null +++ b/Libraries/NativeComponent/PlatformBaseViewConfig.js @@ -0,0 +1,452 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @flow strict-local + */ + +import {Platform} from 'react-native'; +import type {PartialViewConfig} from '../Renderer/shims/ReactNativeTypes'; +import ReactNativeStyleAttributes from '../Components/View/ReactNativeStyleAttributes'; +import {DynamicallyInjectedByGestureHandler} from './ViewConfigIgnore'; + +type PartialViewConfigWithoutName = $Rest< + PartialViewConfig, + {uiViewClassName: string}, +>; + +const PlatformBaseViewConfig: PartialViewConfigWithoutName = + Platform.OS === 'android' + ? /** + * On Android, Props are derived from a ViewManager and its ShadowNode. + * + * Where did we find these base platform props from? + * - Nearly all component ViewManagers descend from BaseViewManager. + * - BaseViewManagers' ShadowNodes descend from LayoutShadowNode. + * + * So, these ViewConfigs are generated from LayoutShadowNode and BaseViewManager. + */ + { + directEventTypes: { + topAccessibilityAction: { + registrationName: 'onAccessibilityAction', + }, + topPointerEnter: { + registrationName: 'pointerenter', + }, + topPointerLeave: { + registrationName: 'pointerleave', + }, + topPointerMove: { + registrationName: 'pointermove', + }, + onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({ + registrationName: 'onGestureHandlerEvent', + }), + onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({ + registrationName: 'onGestureHandlerStateChange', + }), + + // Direct events from UIManagerModuleConstants.java + topContentSizeChange: { + registrationName: 'onContentSizeChange', + }, + topScrollBeginDrag: { + registrationName: 'onScrollBeginDrag', + }, + topMessage: { + registrationName: 'onMessage', + }, + topSelectionChange: { + registrationName: 'onSelectionChange', + }, + topLoadingFinish: { + registrationName: 'onLoadingFinish', + }, + topMomentumScrollEnd: { + registrationName: 'onMomentumScrollEnd', + }, + topClick: { + registrationName: 'onClick', + }, + topLoadingStart: { + registrationName: 'onLoadingStart', + }, + topLoadingError: { + registrationName: 'onLoadingError', + }, + topMomentumScrollBegin: { + registrationName: 'onMomentumScrollBegin', + }, + topScrollEndDrag: { + registrationName: 'onScrollEndDrag', + }, + topScroll: { + registrationName: 'onScroll', + }, + topLayout: { + registrationName: 'onLayout', + }, + }, + bubblingEventTypes: { + // Bubbling events from UIManagerModuleConstants.java + topChange: { + phasedRegistrationNames: { + captured: 'onChangeCapture', + bubbled: 'onChange', + }, + }, + topSelect: { + phasedRegistrationNames: { + captured: 'onSelectCapture', + bubbled: 'onSelect', + }, + }, + topTouchEnd: { + phasedRegistrationNames: { + captured: 'onTouchEndCapture', + bubbled: 'onTouchEnd', + }, + }, + topTouchCancel: { + phasedRegistrationNames: { + captured: 'onTouchCancelCapture', + bubbled: 'onTouchCancel', + }, + }, + topTouchStart: { + phasedRegistrationNames: { + captured: 'onTouchStartCapture', + bubbled: 'onTouchStart', + }, + }, + topTouchMove: { + phasedRegistrationNames: { + captured: 'onTouchMoveCapture', + bubbled: 'onTouchMove', + }, + }, + }, + validAttributes: { + // @ReactProps from BaseViewManager + backgroundColor: {process: require('../StyleSheet/processColor')}, + transform: true, + opacity: true, + elevation: true, + shadowColor: {process: require('../StyleSheet/processColor')}, + zIndex: true, + renderToHardwareTextureAndroid: true, + testID: true, + nativeID: true, + accessibilityLabelledBy: true, + accessibilityLabel: true, + accessibilityHint: true, + accessibilityRole: true, + accessibilityState: true, + accessibilityActions: true, + accessibilityValue: true, + importantForAccessibility: true, + rotation: true, + scaleX: true, + scaleY: true, + translateX: true, + translateY: true, + accessibilityLiveRegion: true, + + // @ReactProps from LayoutShadowNode + width: true, + minWidth: true, + collapsable: true, + maxWidth: true, + height: true, + minHeight: true, + maxHeight: true, + flex: true, + flexGrow: true, + flexShrink: true, + flexBasis: true, + aspectRatio: true, + flexDirection: true, + flexWrap: true, + alignSelf: true, + alignItems: true, + alignContent: true, + justifyContent: true, + overflow: true, + display: true, + + margin: true, + marginVertical: true, + marginHorizontal: true, + marginStart: true, + marginEnd: true, + marginTop: true, + marginBottom: true, + marginLeft: true, + marginRight: true, + + padding: true, + paddingVertical: true, + paddingHorizontal: true, + paddingStart: true, + paddingEnd: true, + paddingTop: true, + paddingBottom: true, + paddingLeft: true, + paddingRight: true, + + borderWidth: true, + borderStartWidth: true, + borderEndWidth: true, + borderTopWidth: true, + borderBottomWidth: true, + borderLeftWidth: true, + borderRightWidth: true, + + start: true, + end: true, + left: true, + right: true, + top: true, + bottom: true, + + position: true, + onLayout: true, + + pointerenter: true, + pointerleave: true, + pointermove: true, + + style: ReactNativeStyleAttributes, + }, + } + : /** + * On iOS, ViewManagers define all of a component's props. + * All ViewManagers extend RCTViewManager, and RCTViewManager declares + * these props. + */ + { + bubblingEventTypes: { + // Generic Events + topPress: { + phasedRegistrationNames: { + bubbled: 'onPress', + captured: 'onPressCapture', + }, + }, + topChange: { + phasedRegistrationNames: { + bubbled: 'onChange', + captured: 'onChangeCapture', + }, + }, + topFocus: { + phasedRegistrationNames: { + bubbled: 'onFocus', + captured: 'onFocusCapture', + }, + }, + topBlur: { + phasedRegistrationNames: { + bubbled: 'onBlur', + captured: 'onBlurCapture', + }, + }, + topSubmitEditing: { + phasedRegistrationNames: { + bubbled: 'onSubmitEditing', + captured: 'onSubmitEditingCapture', + }, + }, + topEndEditing: { + phasedRegistrationNames: { + bubbled: 'onEndEditing', + captured: 'onEndEditingCapture', + }, + }, + topKeyPress: { + phasedRegistrationNames: { + bubbled: 'onKeyPress', + captured: 'onKeyPressCapture', + }, + }, + + // Touch Events + topTouchStart: { + phasedRegistrationNames: { + bubbled: 'onTouchStart', + captured: 'onTouchStartCapture', + }, + }, + topTouchMove: { + phasedRegistrationNames: { + bubbled: 'onTouchMove', + captured: 'onTouchMoveCapture', + }, + }, + topTouchCancel: { + phasedRegistrationNames: { + bubbled: 'onTouchCancel', + captured: 'onTouchCancelCapture', + }, + }, + topTouchEnd: { + phasedRegistrationNames: { + bubbled: 'onTouchEnd', + captured: 'onTouchEndCapture', + }, + }, + }, + directEventTypes: { + topAccessibilityAction: { + registrationName: 'onAccessibilityAction', + }, + topAccessibilityTap: { + registrationName: 'onAccessibilityTap', + }, + topMagicTap: { + registrationName: 'onMagicTap', + }, + topAccessibilityEscape: { + registrationName: 'onAccessibilityEscape', + }, + topLayout: { + registrationName: 'onLayout', + }, + onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({ + registrationName: 'onGestureHandlerEvent', + }), + onGestureHandlerStateChange: DynamicallyInjectedByGestureHandler({ + registrationName: 'onGestureHandlerStateChange', + }), + }, + validAttributes: { + // View Props + accessible: true, + accessibilityActions: true, + accessibilityLabel: true, + accessibilityHint: true, + accessibilityValue: true, + accessibilityViewIsModal: true, + accessibilityElementsHidden: true, + accessibilityIgnoresInvertColors: true, + testID: true, + backgroundColor: {process: require('../StyleSheet/processColor')}, + backfaceVisibility: true, + opacity: true, + shadowColor: {process: require('../StyleSheet/processColor')}, + shadowOffset: {diff: require('../Utilities/differ/sizesDiffer')}, + shadowOpacity: true, + shadowRadius: true, + needsOffscreenAlphaCompositing: true, + overflow: true, + shouldRasterizeIOS: true, + transform: {diff: require('../Utilities/differ/matricesDiffer')}, + accessibilityRole: true, + accessibilityState: true, + nativeID: true, + pointerEvents: true, + removeClippedSubviews: true, + borderRadius: true, + borderColor: {process: require('../StyleSheet/processColor')}, + borderWidth: true, + borderStyle: true, + hitSlop: {diff: require('../Utilities/differ/insetsDiffer')}, + collapsable: true, + + borderTopWidth: true, + borderTopColor: {process: require('../StyleSheet/processColor')}, + borderRightWidth: true, + borderRightColor: {process: require('../StyleSheet/processColor')}, + borderBottomWidth: true, + borderBottomColor: {process: require('../StyleSheet/processColor')}, + borderLeftWidth: true, + borderLeftColor: {process: require('../StyleSheet/processColor')}, + borderStartWidth: true, + borderStartColor: {process: require('../StyleSheet/processColor')}, + borderEndWidth: true, + borderEndColor: {process: require('../StyleSheet/processColor')}, + + borderTopLeftRadius: true, + borderTopRightRadius: true, + borderTopStartRadius: true, + borderTopEndRadius: true, + borderBottomLeftRadius: true, + borderBottomRightRadius: true, + borderBottomStartRadius: true, + borderBottomEndRadius: true, + display: true, + zIndex: true, + + // ShadowView properties + top: true, + right: true, + start: true, + end: true, + bottom: true, + left: true, + + width: true, + height: true, + + minWidth: true, + maxWidth: true, + minHeight: true, + maxHeight: true, + + // Also declared as ViewProps + // borderTopWidth: true, + // borderRightWidth: true, + // borderBottomWidth: true, + // borderLeftWidth: true, + // borderStartWidth: true, + // borderEndWidth: true, + // borderWidth: true, + + marginTop: true, + marginRight: true, + marginBottom: true, + marginLeft: true, + marginStart: true, + marginEnd: true, + marginVertical: true, + marginHorizontal: true, + margin: true, + + paddingTop: true, + paddingRight: true, + paddingBottom: true, + paddingLeft: true, + paddingStart: true, + paddingEnd: true, + paddingVertical: true, + paddingHorizontal: true, + padding: true, + + flex: true, + flexGrow: true, + flexShrink: true, + flexBasis: true, + flexDirection: true, + flexWrap: true, + justifyContent: true, + alignItems: true, + alignSelf: true, + alignContent: true, + position: true, + aspectRatio: true, + + // Also declared as ViewProps + // overflow: true, + // display: true, + + direction: true, + + style: ReactNativeStyleAttributes, + }, + }; + +export default PlatformBaseViewConfig; diff --git a/Libraries/NativeComponent/StaticViewConfigValidator.js b/Libraries/NativeComponent/StaticViewConfigValidator.js index f69efcfb34..ce48473d47 100644 --- a/Libraries/NativeComponent/StaticViewConfigValidator.js +++ b/Libraries/NativeComponent/StaticViewConfigValidator.js @@ -13,6 +13,7 @@ import {type ViewConfig} from '../Renderer/shims/ReactNativeTypes'; import getNativeComponentAttributes from '../ReactNative/getNativeComponentAttributes'; // $FlowFixMe[nonstrict-import] import {createViewConfig} from './ViewConfig'; +import {isIgnored} from './ViewConfigIgnore'; type Difference = | { @@ -183,7 +184,10 @@ function accumulateDifferences( } for (const staticKey in staticObject) { - if (!nativeObject.hasOwnProperty(staticKey)) { + if ( + !nativeObject.hasOwnProperty(staticKey) && + !isIgnored(staticObject[staticKey]) + ) { differences.push({ path: [...path, staticKey], type: 'unexpected', diff --git a/Libraries/NativeComponent/ViewConfig.js b/Libraries/NativeComponent/ViewConfig.js index ffba9d9cde..53a003e60b 100644 --- a/Libraries/NativeComponent/ViewConfig.js +++ b/Libraries/NativeComponent/ViewConfig.js @@ -8,11 +8,11 @@ * @format */ -import ReactNativeViewViewConfig from '../Components/View/ReactNativeViewViewConfig'; import type { PartialViewConfig, ViewConfig, } from '../Renderer/shims/ReactNativeTypes'; +import PlatformBaseViewConfig from './PlatformBaseViewConfig'; /** * Creates a complete `ViewConfig` from a `PartialViewConfig`. @@ -24,16 +24,16 @@ export function createViewConfig( uiViewClassName: partialViewConfig.uiViewClassName, Commands: {}, bubblingEventTypes: composeIndexers( - ReactNativeViewViewConfig.bubblingEventTypes, + PlatformBaseViewConfig.bubblingEventTypes, partialViewConfig.bubblingEventTypes, ), directEventTypes: composeIndexers( - ReactNativeViewViewConfig.directEventTypes, + PlatformBaseViewConfig.directEventTypes, partialViewConfig.directEventTypes, ), validAttributes: composeIndexers( // $FlowFixMe[incompatible-call] `style` property confuses Flow. - ReactNativeViewViewConfig.validAttributes, + PlatformBaseViewConfig.validAttributes, // $FlowFixMe[incompatible-call] `style` property confuses Flow. partialViewConfig.validAttributes, ), diff --git a/Libraries/NativeComponent/ViewConfigIgnore.js b/Libraries/NativeComponent/ViewConfigIgnore.js new file mode 100644 index 0000000000..78ccbb4044 --- /dev/null +++ b/Libraries/NativeComponent/ViewConfigIgnore.js @@ -0,0 +1,27 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict + * @format + */ + +const ignoredViewConfigProps = new WeakSet<{...}>(); + +/** + * Decorates ViewConfig values that are dynamically injected by the library, + * react-native-gesture-handler. (T45765076) + */ +export function DynamicallyInjectedByGestureHandler(object: T): T { + ignoredViewConfigProps.add(object); + return object; +} + +export function isIgnored(value: mixed): boolean { + if (typeof value === 'object' && value != null) { + return ignoredViewConfigProps.has(value); + } + return false; +} diff --git a/Libraries/Utilities/verifyComponentAttributeEquivalence.js b/Libraries/Utilities/verifyComponentAttributeEquivalence.js index 437fa90926..684a888e6e 100644 --- a/Libraries/Utilities/verifyComponentAttributeEquivalence.js +++ b/Libraries/Utilities/verifyComponentAttributeEquivalence.js @@ -8,7 +8,7 @@ * @flow */ -import ReactNativeViewViewConfig from '../Components/View/ReactNativeViewViewConfig'; +import PlatformBaseViewConfig from '../NativeComponent/PlatformBaseViewConfig'; import {type ViewConfig} from '../Renderer/shims/ReactNativeTypes'; const IGNORED_KEYS = ['transform', 'hitSlop']; @@ -109,7 +109,7 @@ export function getConfigWithoutViewProps( } return Object.keys(viewConfig[propName]) - .filter(prop => !ReactNativeViewViewConfig[propName][prop]) + .filter(prop => !PlatformBaseViewConfig[propName][prop]) .reduce((obj, prop) => { obj[prop] = viewConfig[propName][prop]; return obj; From 10199b158138b8645550b5579df87e654213fe42 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Mon, 31 Jan 2022 22:29:16 -0800 Subject: [PATCH 015/109] RN: Remove `{Color,EdgeInsets,Point}PropType` and `ViewPropTypes` Summary: Removes `ColorPropType`, `EdgeInsetsPropType`, `PointPropType`, and `ViewPropTypes` from the React Native Public API. Accessing these will now cause an error to be thrown with a message to use the `deprecated-react-native-prop-types` package. These were deprecated in React Native v0.66. Changelog: [General][Removed] - Removed `ColorPropType`, `EdgeInsetsPropType`, `PointPropType`, and `ViewPropTypes`. Reviewed By: kacieb Differential Revision: D33746966 fbshipit-source-id: 61d264d133f42008c7ff252e6ebbb8b47747939c --- index.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index e594bbeb96..bf4b98478e 100644 --- a/index.js +++ b/index.js @@ -446,32 +446,32 @@ module.exports = { }, // Deprecated Prop Types get ColorPropType(): $FlowFixMe { - console.warn( - 'ColorPropType will be removed from React Native. Migrate to ' + + invariant( + false, + 'ColorPropType has been removed from React Native. Migrate to ' + "ColorPropType exported from 'deprecated-react-native-prop-types'.", ); - return require('deprecated-react-native-prop-types').ColorPropType; }, get EdgeInsetsPropType(): $FlowFixMe { - console.warn( - 'EdgeInsetsPropType will be removed from React Native. Migrate to ' + + invariant( + false, + 'EdgeInsetsPropType has been removed from React Native. Migrate to ' + "EdgeInsetsPropType exported from 'deprecated-react-native-prop-types'.", ); - return require('deprecated-react-native-prop-types').EdgeInsetsPropType; }, get PointPropType(): $FlowFixMe { - console.warn( - 'PointPropType will be removed from React Native. Migrate to ' + + invariant( + false, + 'PointPropType has been removed from React Native. Migrate to ' + "PointPropType exported from 'deprecated-react-native-prop-types'.", ); - return require('deprecated-react-native-prop-types').PointPropType; }, get ViewPropTypes(): $FlowFixMe { - console.warn( - 'ViewPropTypes will be removed from React Native. Migrate to ' + + invariant( + false, + 'ViewPropTypes has been removed from React Native. Migrate to ' + "ViewPropTypes exported from 'deprecated-react-native-prop-types'.", ); - return require('deprecated-react-native-prop-types').ViewPropTypes; }, }; From 79975d146efbf98056eeba0c1c3222aa2de651db Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Tue, 1 Feb 2022 10:56:48 -0800 Subject: [PATCH 016/109] Fix display metric used for scrollview snapping Summary: Similarly to D29864944 (https://github.com/facebook/react-native/commit/6d4fff2e5ccaffb6b0255a139f2ae8e009278948) we want to use `getWindowDisplayMetrics` instead of `getScreenDisplayMetrics`. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D33916223 fbshipit-source-id: cae07b1f0c1498745f28d0b9f860edcc55bde5ed --- .../views/scroll/ReactHorizontalScrollViewManager.java | 10 ++++------ .../react/views/scroll/ReactScrollViewManager.java | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java index ddd60f19ac..6d4bd242dd 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.java @@ -8,13 +8,11 @@ package com.facebook.react.views.scroll; import android.graphics.Color; -import android.util.DisplayMetrics; import androidx.annotation.Nullable; import androidx.core.view.ViewCompat; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.module.annotations.ReactModule; -import com.facebook.react.uimanager.DisplayMetricsHolder; import com.facebook.react.uimanager.PixelUtil; import com.facebook.react.uimanager.PointerEvents; import com.facebook.react.uimanager.ReactClippingViewGroupHelper; @@ -99,8 +97,8 @@ public class ReactHorizontalScrollViewManager extends ViewGroupManager offsets = new ArrayList(); for (int i = 0; i < snapToOffsets.size(); i++) { - offsets.add((int) (snapToOffsets.getDouble(i) * screenDisplayMetrics.density)); + offsets.add((int) (snapToOffsets.getDouble(i) * density)); } view.setSnapOffsets(offsets); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java index 4952468458..8a3623444b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java @@ -8,7 +8,6 @@ package com.facebook.react.views.scroll; import android.graphics.Color; -import android.util.DisplayMetrics; import android.view.View; import androidx.annotation.Nullable; import androidx.core.view.ViewCompat; @@ -17,7 +16,6 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.RetryableMountingLayerException; import com.facebook.react.common.MapBuilder; import com.facebook.react.module.annotations.ReactModule; -import com.facebook.react.uimanager.DisplayMetricsHolder; import com.facebook.react.uimanager.PixelUtil; import com.facebook.react.uimanager.PointerEvents; import com.facebook.react.uimanager.ReactClippingViewGroupHelper; @@ -98,8 +96,8 @@ public class ReactScrollViewManager extends ViewGroupManager @ReactProp(name = "snapToInterval") public void setSnapToInterval(ReactScrollView view, float snapToInterval) { // snapToInterval needs to be exposed as a float because of the Javascript interface. - DisplayMetrics screenDisplayMetrics = DisplayMetricsHolder.getScreenDisplayMetrics(); - view.setSnapInterval((int) (snapToInterval * screenDisplayMetrics.density)); + float density = PixelUtil.getDisplayMetricDensity(); + view.setSnapInterval((int) (snapToInterval * density)); } @ReactProp(name = "snapToOffsets") @@ -109,10 +107,10 @@ public class ReactScrollViewManager extends ViewGroupManager return; } - DisplayMetrics screenDisplayMetrics = DisplayMetricsHolder.getScreenDisplayMetrics(); + float density = PixelUtil.getDisplayMetricDensity(); List offsets = new ArrayList(); for (int i = 0; i < snapToOffsets.size(); i++) { - offsets.add((int) (snapToOffsets.getDouble(i) * screenDisplayMetrics.density)); + offsets.add((int) (snapToOffsets.getDouble(i) * density)); } view.setSnapOffsets(offsets); } From e8f7a1b5761a3052e03641aa5baefb6091b24871 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Tue, 1 Feb 2022 13:36:00 -0800 Subject: [PATCH 017/109] chore(deps): Bump shelljs from 0.8.4 to 0.8.5 (#33001) Summary: Running `yarn audit` shows a vulnerability in the `shelljs` version we're currently using ![image](https://user-images.githubusercontent.com/11707729/151735377-eb0ed224-59b6-443c-9127-1b72dd88ee80.png) This PR upgrades `shelljs` from 0.8.4 to 0.8.5 in order to mitigate this vulnerability More info on https://github.com/advisories/GHSA-4rq4-32rv-6wp6 ## Changelog [Internal] [Security] - Upgrade shelljs to v0.8.5 in order to fix Improper Privilege Management vulnerability Pull Request resolved: https://github.com/facebook/react-native/pull/33001 Test Plan: There are no API changes between versions 0.8.4 and 0.8.5, so just testing the scripts that use this lib should be enough. Reviewed By: cortinico Differential Revision: D33897436 Pulled By: lunaleaps fbshipit-source-id: f32b118ff47c6135845ac4de425feb8ebea220a8 --- repo-config/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repo-config/package.json b/repo-config/package.json index c2e5d56f78..2648991c51 100644 --- a/repo-config/package.json +++ b/repo-config/package.json @@ -44,7 +44,7 @@ "react": "17.0.2", "react-native-codegen": "^0.0.13", "react-test-renderer": "17.0.2", - "shelljs": "^0.8.4", + "shelljs": "^0.8.5", "signedsource": "^1.0.0", "ws": "^6.1.4", "yargs": "^15.3.1" diff --git a/yarn.lock b/yarn.lock index b3a41a38ca..fe37f3aac9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6331,10 +6331,10 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== -shelljs@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" - integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== +shelljs@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" From 3552ff056263cd2d77224b909cc6fc2f81ad66cf Mon Sep 17 00:00:00 2001 From: Felipe Perez Date: Tue, 1 Feb 2022 15:15:19 -0800 Subject: [PATCH 018/109] Back out "Delete RuntimeScheduler yielding mobile config" Summary: D33740360 (https://github.com/facebook/react-native/commit/16ed62a850dd81bd9cc7f77ab3e77f42ed64b177) broke Explore VR on React Native. The app would go into a loop on boot and not finish mounting. This is probably a product code issue, but it's not a trivial issue to solve. Unlanding to unblock the RN migration. Changelog: [internal] internal Reviewed By: mdvacca Differential Revision: D33918026 fbshipit-source-id: cc77c70ece9994d82c91f7ae8783e959629e9cfb --- React/Fabric/RCTSurfacePresenter.mm | 2 ++ .../com/facebook/react/fabric/jni/Binding.cpp | 2 ++ .../runtimescheduler/RuntimeScheduler.cpp | 24 +++++++++++++------ .../runtimescheduler/RuntimeScheduler.h | 10 ++++++++ .../tests/RuntimeSchedulerTest.cpp | 9 ++++++- 5 files changed, 39 insertions(+), 8 deletions(-) diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index cc16148690..17ca2900ad 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -271,6 +271,8 @@ static BackgroundExecutor RCTGetBackgroundExecutor() auto weakRuntimeScheduler = _contextContainer->find>("RuntimeScheduler"); auto runtimeScheduler = weakRuntimeScheduler.hasValue() ? weakRuntimeScheduler.value().lock() : nullptr; if (runtimeScheduler) { + runtimeScheduler->setEnableYielding( + reactNativeConfig->getBool("react_native_new_architecture:runtimescheduler_enable_yielding_ios")); runtimeExecutor = [runtimeScheduler](std::function &&callback) { runtimeScheduler->scheduleWork(std::move(callback)); }; diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index c8dde14b52..d22dfb384e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -369,6 +369,8 @@ void Binding::installFabricUIManager( if (runtimeSchedulerHolder) { auto runtimeScheduler = runtimeSchedulerHolder->cthis()->get().lock(); if (runtimeScheduler) { + runtimeScheduler->setEnableYielding(config->getBool( + "react_native_new_architecture:runtimescheduler_enable_yielding_android")); runtimeExecutor = [runtimeScheduler]( std::function &&callback) { diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp index 82a9f7c201..f1d114cc9d 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp @@ -22,13 +22,19 @@ RuntimeScheduler::RuntimeScheduler( void RuntimeScheduler::scheduleWork( std::function callback) const { - shouldYield_ = true; - runtimeExecutor_( - [this, callback = std::move(callback)](jsi::Runtime &runtime) { - shouldYield_ = false; - callback(runtime); - startWorkLoop(runtime); - }); + if (enableYielding_) { + shouldYield_ = true; + runtimeExecutor_( + [this, callback = std::move(callback)](jsi::Runtime &runtime) { + shouldYield_ = false; + callback(runtime); + startWorkLoop(runtime); + }); + } else { + runtimeExecutor_([callback = std::move(callback)](jsi::Runtime &runtime) { + callback(runtime); + }); + } } std::shared_ptr RuntimeScheduler::scheduleTask( @@ -64,6 +70,10 @@ RuntimeSchedulerTimePoint RuntimeScheduler::now() const noexcept { return now_(); } +void RuntimeScheduler::setEnableYielding(bool enableYielding) { + enableYielding_ = enableYielding; +} + void RuntimeScheduler::executeNowOnTheSameThread( std::function callback) { shouldYield_ = true; diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h index 63ed4ab031..d5d0172784 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h @@ -106,6 +106,7 @@ class RuntimeScheduler final { * Thread synchronization must be enforced externally. */ void callImmediates(jsi::Runtime &runtime); + void setEnableYielding(bool enableYielding); private: mutable std::priority_queue< @@ -139,6 +140,15 @@ class RuntimeScheduler final { */ mutable std::atomic_bool isWorkLoopScheduled_{false}; + /* + * Flag indicating if yielding is enabled. + * + * If set to true and Concurrent Mode is enabled on the surface, + * React Native will ask React to yield in case any work has been scheduled. + * Default value is false + */ + bool enableYielding_{false}; + /* * This flag is set while performing work, to prevent re-entrancy. */ diff --git a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp index ad7c33a1e9..7b88581360 100644 --- a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp @@ -323,7 +323,7 @@ TEST_F(RuntimeSchedulerTest, scheduleWork) { EXPECT_FALSE(wasCalled); - EXPECT_TRUE(runtimeScheduler_->getShouldYield()); + EXPECT_FALSE(runtimeScheduler_->getShouldYield()); EXPECT_EQ(stubQueue_->size(), 1); @@ -334,6 +334,7 @@ TEST_F(RuntimeSchedulerTest, scheduleWork) { } TEST_F(RuntimeSchedulerTest, scheduleWorkWithYielding) { + runtimeScheduler_->setEnableYielding(true); bool wasCalled = false; runtimeScheduler_->scheduleWork( [&](jsi::Runtime const &) { wasCalled = true; }); @@ -352,6 +353,8 @@ TEST_F(RuntimeSchedulerTest, scheduleWorkWithYielding) { } TEST_F(RuntimeSchedulerTest, normalTaskYieldsToPlatformEvent) { + runtimeScheduler_->setEnableYielding(true); + bool didRunJavaScriptTask = false; bool didRunPlatformWork = false; @@ -379,6 +382,8 @@ TEST_F(RuntimeSchedulerTest, normalTaskYieldsToPlatformEvent) { } TEST_F(RuntimeSchedulerTest, expiredTaskDoesntYieldToPlatformEvent) { + runtimeScheduler_->setEnableYielding(true); + bool didRunJavaScriptTask = false; bool didRunPlatformWork = false; @@ -407,6 +412,8 @@ TEST_F(RuntimeSchedulerTest, expiredTaskDoesntYieldToPlatformEvent) { } TEST_F(RuntimeSchedulerTest, immediateTaskDoesntYieldToPlatformEvent) { + runtimeScheduler_->setEnableYielding(true); + bool didRunJavaScriptTask = false; bool didRunPlatformWork = false; From cb42049e0ae262afe907ace1099414836ab0018d Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Tue, 1 Feb 2022 16:11:04 -0800 Subject: [PATCH 019/109] Support platform color with AnimatedColor on Android Summary: Adds support for platform colors in AnimatedColor. Passes the processed native color object to the native ColorAnimatedNode via the native config; ColorAnimatedNode then uses ColorPropConverter.getColor to resolve the resource path. Note: setting a platform color via setValue on an existing AnimatedColor is not supported yet Changelog: [Android][Added] - Support platform color with AnimatedColor Reviewed By: yungsters Differential Revision: D33922266 fbshipit-source-id: 04d39a5ce0872b31d06ffbd4639d2f2213cf3314 --- Libraries/Animated/nodes/AnimatedColor.js | 75 +++++++++++++------ .../react/animated/ColorAnimatedNode.java | 49 +++++++++--- .../animated/NativeAnimatedNodesManager.java | 2 +- 3 files changed, 92 insertions(+), 34 deletions(-) diff --git a/Libraries/Animated/nodes/AnimatedColor.js b/Libraries/Animated/nodes/AnimatedColor.js index 4a5cdc5d74..356982ef28 100644 --- a/Libraries/Animated/nodes/AnimatedColor.js +++ b/Libraries/Animated/nodes/AnimatedColor.js @@ -91,6 +91,7 @@ export default class AnimatedColor extends AnimatedWithChildren { g: AnimatedValue; b: AnimatedValue; a: AnimatedValue; + nativeColor: Object; _listeners: { [key: string]: { r: string, @@ -105,8 +106,16 @@ export default class AnimatedColor extends AnimatedWithChildren { constructor(valueIn?: ?(RgbaValue | RgbaAnimatedValue | ColorValue)) { super(); let value: RgbaValue | RgbaAnimatedValue | ColorValue = - valueIn || defaultColor; + valueIn ?? defaultColor; + this.setValue(value); + this._listeners = {}; + } + /** + * Directly set the value. This will stop any animations running on the value + * and update all the bound properties. + */ + setValue(value: RgbaValue | RgbaAnimatedValue | ColorValue): void { if (isRgbaAnimatedValue(value)) { // $FlowIgnore[incompatible-cast] - Type is verified above const rgbaAnimatedValue: RgbaAnimatedValue = (value: RgbaAnimatedValue); @@ -118,29 +127,50 @@ export default class AnimatedColor extends AnimatedWithChildren { // Handle potential parsable string color or platform color object if (!isRgbaValue(value)) { // $FlowIgnore[incompatible-cast] - Type is verified via conditionals - value = processColor((value: ColorValue)) || {r: 0, g: 0, b: 0, a: 1.0}; - // TODO: support platform color + value = processColor((value: ColorValue)) ?? defaultColor; } - // $FlowIgnore[incompatible-cast] - Type is verified via conditionals - const rgbaValue: RgbaValue = (value: RgbaValue); - this.r = new AnimatedValue(rgbaValue.r); - this.g = new AnimatedValue(rgbaValue.g); - this.b = new AnimatedValue(rgbaValue.b); - this.a = new AnimatedValue(rgbaValue.a); - } - this._listeners = {}; - } + if (!isRgbaValue(value)) { + // We are using a platform color + this.nativeColor = value; + value = defaultColor; + } - /** - * Directly set the value. This will stop any animations running on the value - * and update all the bound properties. - */ - setValue(value: {r: number, g: number, b: number, a: number, ...}): void { - this.r.setValue(value.r); - this.g.setValue(value.g); - this.b.setValue(value.b); - this.a.setValue(value.a); + if (isRgbaValue(value)) { + // $FlowIgnore[incompatible-cast] - Type is verified via conditionals + const rgbaValue: RgbaValue = (value: RgbaValue); + + if (this.r) { + this.r.setValue(rgbaValue.r); + } else { + this.r = new AnimatedValue(rgbaValue.r); + } + + if (this.g) { + this.g.setValue(rgbaValue.g); + } else { + this.g = new AnimatedValue(rgbaValue.g); + } + + if (this.b) { + this.b.setValue(rgbaValue.b); + } else { + this.b = new AnimatedValue(rgbaValue.b); + } + + if (this.a) { + this.a.setValue(rgbaValue.a); + } else { + this.a = new AnimatedValue(rgbaValue.a); + } + } + + if (this.nativeColor) { + this.__makeNative(); + // TODO (T111170195): In order to support setValue() with a platform color, update the + // native AnimatedNode (if it exists) with a new config. + } + } } /** @@ -148,7 +178,7 @@ export default class AnimatedColor extends AnimatedWithChildren { * via `setValue`, an animation, or `Animated.event`. Useful for compensating * things like the start of a pan gesture. */ - setOffset(offset: {r: number, g: number, b: number, a: number, ...}): void { + setOffset(offset: RgbaValue): void { this.r.setOffset(offset.r); this.g.setOffset(offset.g); this.b.setOffset(offset.b); @@ -280,6 +310,7 @@ export default class AnimatedColor extends AnimatedWithChildren { g: this.g.__getNativeTag(), b: this.b.__getNativeTag(), a: this.a.__getNativeTag(), + nativeColor: this.nativeColor, }; } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java index 0624a866ab..68949f82f7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java @@ -7,6 +7,9 @@ package com.facebook.react.animated; +import android.graphics.Color; +import com.facebook.react.bridge.ColorPropConverter; +import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.views.view.ColorUtil; @@ -14,6 +17,7 @@ import com.facebook.react.views.view.ColorUtil; /*package*/ class ColorAnimatedNode extends AnimatedNode { private final NativeAnimatedNodesManager mNativeAnimatedNodesManager; + private final ReactApplicationContext mReactApplicationContext; private final int mRNodeId; private final int mGNodeId; private final int mBNodeId; @@ -21,14 +25,16 @@ import com.facebook.react.views.view.ColorUtil; private int mColor; public ColorAnimatedNode( - ReadableMap config, NativeAnimatedNodesManager nativeAnimatedNodesManager) { + ReadableMap config, + NativeAnimatedNodesManager nativeAnimatedNodesManager, + ReactApplicationContext reactApplicationContext) { mNativeAnimatedNodesManager = nativeAnimatedNodesManager; + mReactApplicationContext = reactApplicationContext; mRNodeId = config.getInt("r"); mGNodeId = config.getInt("g"); mBNodeId = config.getInt("b"); mANodeId = config.getInt("a"); - - // TODO (T110930421): Support platform color + setNativeColor(config.getMap("nativeColor")); } public int getColor() { @@ -37,15 +43,15 @@ import com.facebook.react.views.view.ColorUtil; @Override public void update() { - AnimatedNode rNode = mNativeAnimatedNodesManager.getNodeById(mRNodeId); - AnimatedNode gNode = mNativeAnimatedNodesManager.getNodeById(mGNodeId); - AnimatedNode bNode = mNativeAnimatedNodesManager.getNodeById(mBNodeId); - AnimatedNode aNode = mNativeAnimatedNodesManager.getNodeById(mANodeId); + ValueAnimatedNode rNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mRNodeId); + ValueAnimatedNode gNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mGNodeId); + ValueAnimatedNode bNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mBNodeId); + ValueAnimatedNode aNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mANodeId); - double r = ((ValueAnimatedNode) rNode).getValue(); - double g = ((ValueAnimatedNode) gNode).getValue(); - double b = ((ValueAnimatedNode) bNode).getValue(); - double a = ((ValueAnimatedNode) aNode).getValue(); + double r = rNode.getValue(); + double g = gNode.getValue(); + double b = bNode.getValue(); + double a = aNode.getValue(); mColor = ColorUtil.normalize(r, g, b, a); } @@ -63,4 +69,25 @@ import com.facebook.react.views.view.ColorUtil; + " a: " + mANodeId; } + + private void setNativeColor(ReadableMap nativeColor) { + if (nativeColor == null) { + return; + } + + int color = + ColorPropConverter.getColor(nativeColor, mReactApplicationContext.getCurrentActivity()); + + ValueAnimatedNode rNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mRNodeId); + ValueAnimatedNode gNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mGNodeId); + ValueAnimatedNode bNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mBNodeId); + ValueAnimatedNode aNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mANodeId); + + rNode.mValue = Color.red(color); + gNode.mValue = Color.green(color); + bNode.mValue = Color.blue(color); + aNode.mValue = Color.alpha(color) / 255.0; + + update(); + } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java index 10252abfa1..208272eadc 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java @@ -130,7 +130,7 @@ import java.util.Queue; } else if ("value".equals(type)) { node = new ValueAnimatedNode(config); } else if ("color".equals(type)) { - node = new ColorAnimatedNode(config, this); + node = new ColorAnimatedNode(config, this, mReactApplicationContext); } else if ("props".equals(type)) { node = new PropsAnimatedNode(config, this); } else if ("interpolation".equals(type)) { From 3e229f27bc9c7556876ff776abf70147289d544b Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Tue, 1 Feb 2022 16:17:34 -0800 Subject: [PATCH 020/109] RN: Remove `propTypes` from Image, Text, and TextInput Summary: Removes the `propTypes` member from the `Image`, `Text`, and `TextInput` components. They have been deprecated since React Native v0.66. Changelog: [General][Removed] - Removed `Image.propTypes`, `Text.propTypes`, and `TextInput.propTypes`. Reviewed By: kacieb Differential Revision: D33750298 fbshipit-source-id: 085f83ad838196bdd531b097b8ce5957270c3ad1 --- BUCK | 1 - Libraries/Components/TextInput/TextInput.js | 7 ------- Libraries/Image/Image.android.js | 6 ------ Libraries/Image/Image.ios.js | 6 ------ Libraries/Text/Text.js | 6 ------ 5 files changed, 26 deletions(-) diff --git a/BUCK b/BUCK index b9d639adff..c07b0f5d1c 100644 --- a/BUCK +++ b/BUCK @@ -723,7 +723,6 @@ rn_library( "//xplat/js:node_modules__abort_19controller", "//xplat/js:node_modules__anser", "//xplat/js:node_modules__base64_19js", - "//xplat/js:node_modules__deprecated_19react_19native_19prop_19types", "//xplat/js:node_modules__event_19target_19shim", "//xplat/js:node_modules__invariant", "//xplat/js:node_modules__nullthrows", diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index d5d167d61e..53f8c5b977 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -1341,13 +1341,6 @@ const ExportedForwardRef: React.AbstractComponent< ); }); -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -ExportedForwardRef.propTypes = - require('deprecated-react-native-prop-types').TextInputPropTypes; - // $FlowFixMe[prop-missing] ExportedForwardRef.State = { currentlyFocusedInput: TextInputState.currentlyFocusedInput, diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index 2dd43e4dfb..bce7152717 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -306,12 +306,6 @@ Image.queryCache = queryCache; * comment and run Flow. */ Image.resolveAssetSource = resolveAssetSource; -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -Image.propTypes = require('deprecated-react-native-prop-types').ImagePropTypes; - const styles = StyleSheet.create({ base: { overflow: 'hidden', diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 652017ec49..deb54281ef 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -232,12 +232,6 @@ Image.queryCache = queryCache; * delete this comment and run Flow. */ Image.resolveAssetSource = resolveAssetSource; -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -Image.propTypes = require('deprecated-react-native-prop-types').ImagePropTypes; - const styles = StyleSheet.create({ base: { overflow: 'hidden', diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 35db91d2bd..7e0d573492 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -189,12 +189,6 @@ const Text: React.AbstractComponent< Text.displayName = 'Text'; -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -Text.propTypes = require('deprecated-react-native-prop-types').TextPropTypes; - /** * Returns false until the first time `newValue` is true, after which this will * always return true. This is necessary to lazily initialize `Pressability` so From cdfddb4dad7c69904850d7e5f089a32a1d3445d1 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Tue, 1 Feb 2022 16:17:34 -0800 Subject: [PATCH 021/109] RN: Remove `deprecated-react-native-props` Dependency Summary: Removes the `deprecated-react-native-props` dependency from `react-native`. This is now possible because all of the deprecated call sites have been removed: - `Image.propTypes` - `Text.propTypes` - `TextInput.propTypes` - `ColorPropType` - `EdgeInsetsPropType` - `PointPropType` - `ViewPropTypes` Changelog: [General][Removed] - Removed `deprecated-react-native-props` as a package dependency. Reviewed By: kacieb Differential Revision: D33750413 fbshipit-source-id: 003fb275d1ce766cbce2b44708dd254243abb33b --- package.json | 1 - yarn.lock | 13 ++----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 4d6a9206be..b1a5cc3b9a 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,6 @@ "abort-controller": "^3.0.0", "anser": "^1.4.9", "base64-js": "^1.1.2", - "deprecated-react-native-prop-types": "^2.3.0", "event-target-shim": "^5.0.1", "hermes-engine": "~0.11.0", "invariant": "^2.2.4", diff --git a/yarn.lock b/yarn.lock index fe37f3aac9..167ed739d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2454,15 +2454,6 @@ depd@~1.1.2: resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= -deprecated-react-native-prop-types@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz#c10c6ee75ff2b6de94bb127f142b814e6e08d9ab" - integrity sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA== - dependencies: - "@react-native/normalize-color" "*" - invariant "*" - prop-types "*" - destroy@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" @@ -3596,7 +3587,7 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= -invariant@*, invariant@^2.2.4: +invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -5753,7 +5744,7 @@ prompts@^2.0.1, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*, prop-types@^15.7.2: +prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== From eb08af57a95e99d45d72e7c097c41b181c3130cd Mon Sep 17 00:00:00 2001 From: John Porto Date: Tue, 1 Feb 2022 16:48:54 -0800 Subject: [PATCH 022/109] Implement Runtime.callFunctionOn Summary: [Hermes][Inspector] Implement the CDP API for calling a function on an object. Changelog: [Internal] Reviewed By: avp Differential Revision: D33722301 fbshipit-source-id: da26e865cf29920be77c5c602dde1b443b4c64da --- .../hermes/inspector/chrome/Connection.cpp | 320 +++++++++++++++++- .../hermes/inspector/chrome/MessageTypes.cpp | 80 ++++- .../hermes/inspector/chrome/MessageTypes.h | 44 ++- .../chrome/tests/ConnectionTests.cpp | 258 +++++++++++++- .../hermes/inspector/tools/message_types.txt | 1 + 5 files changed, 693 insertions(+), 10 deletions(-) diff --git a/ReactCommon/hermes/inspector/chrome/Connection.cpp b/ReactCommon/hermes/inspector/chrome/Connection.cpp index 7101eb2247..2fa87b5386 100644 --- a/ReactCommon/hermes/inspector/chrome/Connection.cpp +++ b/ReactCommon/hermes/inspector/chrome/Connection.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -100,11 +101,15 @@ class Connection::Impl : public inspector::InspectorObserver, void handle( const m::heapProfiler::GetObjectByHeapObjectIdRequest &req) override; void handle(const m::heapProfiler::GetHeapObjectIdRequest &req) override; + void handle(const m::runtime::CallFunctionOnRequest &req) override; void handle(const m::runtime::EvaluateRequest &req) override; void handle(const m::runtime::GetPropertiesRequest &req) override; void handle(const m::runtime::RunIfWaitingForDebuggerRequest &req) override; private: + // The execution context id reported back by the ExecutionContextCreated + // notification. We only ever expect this execution context id. + static constexpr int32_t kHermesExecutionContextId = 1; std::vector makePropsFromScope( std::pair frameAndScopeIndex, const std::string &objectGroup, @@ -291,7 +296,7 @@ void Connection::Impl::onContextCreated(Inspector &inspector) { // Right now, Hermes only has the notion of one JS context per VM instance, // so we just always name the single JS context with id=1 and name=hermes. m::runtime::ExecutionContextCreatedNotification note; - note.context.id = 1; + note.context.id = kHermesExecutionContextId; note.context.name = "hermes"; sendNotificationToClientViaExecutor(note); @@ -370,6 +375,8 @@ void Connection::Impl::onScriptParsed( m::debugger::ScriptParsedNotification note; note.scriptId = folly::to(info.fileId); note.url = info.fileName; + // TODO(jpporto): fix test cases sending invalid context id. + // note.executionContextId = kHermesExecutionContextId; if (!info.sourceMappingUrl.empty()) { note.sourceMapURL = info.sourceMappingUrl; @@ -397,6 +404,8 @@ void Connection::Impl::onMessageAdded( const ConsoleMessageInfo &info) { m::runtime::ConsoleAPICalledNotification apiCalledNote; apiCalledNote.type = info.level; + // TODO(jpporto): fix test cases sending invalid context id. + // apiCalledNote.executionContextId = kHermesExecutionContextId; size_t argsSize = info.args.size(getRuntime()); for (size_t index = 0; index < argsSize; ++index) { @@ -711,6 +720,315 @@ void Connection::Impl::handle( .thenError(sendErrorToClient(req.id)); } +namespace { +/// Runtime.CallArguments can have their values specified "inline", or they can +/// have remote references. The inline values are eval'd together with the +/// Runtime.CallFunctionOn.functionDeclaration (see CallFunctionOnBuilder +/// below), while remote object Ids need to be resolved outside of the VM. +class CallFunctionOnArgument { + public: + explicit CallFunctionOnArgument( + folly::Optional maybeObjectId) + : maybeObjectId_(std::move(maybeObjectId)) {} + + /// Computes the real value for this argument, which can be an object + /// referenced by maybeObjectId_, or the given evaldValue. Throws if + /// maybeObjectId_ is not empty but references an unknown object. + jsi::Value value( + jsi::Runtime &rt, + RemoteObjectsTable &objTable, + jsi::Value evaldValue) const { + if (maybeObjectId_) { + assert(evaldValue.isUndefined() && "expected undefined placeholder"); + return getValueFromId(rt, objTable, *maybeObjectId_); + } + + return evaldValue; + } + + private: + /// Returns the jsi::Object for the given objId. Throws if such object can't + /// be found. + static jsi::Value getValueFromId( + jsi::Runtime &rt, + RemoteObjectsTable &objTable, + m::runtime::RemoteObjectId objId) { + if (const jsi::Value *ptr = objTable.getValue(objId)) { + return jsi::Value(rt, *ptr); + } + + throw std::runtime_error("unknown object id " + objId); + } + + folly::Optional maybeObjectId_; +}; + +/// Functor that should be used to run the result of eval-ing a CallFunctionOn +/// request. +class CallFunctionOnRunner { + public: + static constexpr size_t kJsThisIndex = 0; + static constexpr size_t kFirstArgIndex = 1; + + // N.B.: constexpr char[] broke react-native-oss-android. + static const char *kJsThisArgPlaceholder; + + CallFunctionOnRunner() = default; + CallFunctionOnRunner(CallFunctionOnRunner &&) = default; + CallFunctionOnRunner &operator=(CallFunctionOnRunner &&) = default; + + /// Performs the actual Runtime.CallFunctionOn request. It assumes. + /// \p evalResult is the result of invoking the Inspector's evaluate() method + /// on the expression built by the CallFunctionOnBuilder below. + jsi::Value operator()( + jsi::Runtime &rt, + RemoteObjectsTable &objTable, + const facebook::hermes::debugger::EvalResult &evalResult) { + // The eval result is an array [a0, a1, ..., an, func] (see + // CallFunctionOnBuilder below). + auto argsAndFunc = evalResult.value.getObject(rt).getArray(rt); + assert( + argsAndFunc.length(rt) == thisAndArguments_.size() + 1 && + "Unexpected result size"); + + // now resolve the arguments to the call, including "this". + std::vector arguments(thisAndArguments_.size() - 1); + + jsi::Object jsThis = + getJsThis(rt, objTable, argsAndFunc.getValueAtIndex(rt, kJsThisIndex)); + + int i = kFirstArgIndex; + for (/*i points to the first param*/; i < thisAndArguments_.size(); ++i) { + arguments[i - kFirstArgIndex] = thisAndArguments_[i].value( + rt, objTable, argsAndFunc.getValueAtIndex(rt, i)); + } + + // i is now func's index. + jsi::Function func = + argsAndFunc.getValueAtIndex(rt, i).getObject(rt).getFunction(rt); + + return func.callWithThis( + rt, + std::move(jsThis), + static_cast(arguments.data()), + arguments.size()); + } + + private: + friend class CallFunctionOnBuilder; + + CallFunctionOnRunner(const CallFunctionOnRunner &) = delete; + CallFunctionOnRunner &operator=(const CallFunctionOnRunner &) = delete; + + CallFunctionOnRunner( + std::vector thisAndArguments, + folly::Optional executionContextId) + : thisAndArguments_(std::move(thisAndArguments)), + executionContextId_(std::move(executionContextId)) {} + + /// Resolves the js "this" for the request, which lives in + /// thisAndArguments_[kJsThisIndex]. \p evaldThis should either be undefined, + /// or the placeholder indicating that globalThis should be used. + jsi::Object getJsThis( + jsi::Runtime &rt, + RemoteObjectsTable &objTable, + jsi::Value evaldThis) const { + // In the future we may support multiple execution context ids; for now, + // there's only one. + (void)executionContextId_; + + // Either evaldThis is undefined (because the request had an object id + // specifying "this"), or it should be a string (i.e., the placeholder + // kJsThisArgPlaceholder). + assert( + (evaldThis.isUndefined() || + (evaldThis.isString() && + evaldThis.getString(rt).utf8(rt) == kJsThisArgPlaceholder)) && + "unexpected value for jsThis argument placeholder"); + + // Need to save this information because of the std::move() below. + const bool useGlobalThis = evaldThis.isString(); + jsi::Value value = thisAndArguments_[kJsThisIndex].value( + rt, objTable, std::move(evaldThis)); + + return useGlobalThis ? rt.global() : value.getObject(rt); + } + + std::vector thisAndArguments_; + folly::Optional executionContextId_; +}; + +/*static*/ const char *CallFunctionOnRunner::kJsThisArgPlaceholder = + "jsThis is Execution Context"; + +/// Returns true if \p str is a number-like string value (e.g., Infinity), +/// and false otherwise. +bool unserializableValueLooksLikeNumber(const std::string &str) { + return str == "Infinity" || str == "-Infinity" || str == "NaN"; +} + +/// Helper class that processes a Runtime.CallFunctionOn request, and +/// builds an expression string that, once eval()d, yields an Array with the +/// CallArguments as well as the function to run. The generated array is +/// +/// [JsThis, P0, P1, P2, P3, Pn, F] +/// +/// where: +/// * F is the functionDeclaration in the request +/// * JsThis is either: +/// * undefined (if the request has an object ID); or +/// * the placeholder kJsThisArgPlaceholder +/// * Pi is either: +/// * the string in CallArgument[i].unserializableValue; or +/// * the string in CallArgument[i].value; or +/// * arguments[j] (i.e., the j-th argument passed to the newly built +/// function), j being the j-th CallArgument with an ObjectId. This is +/// needed because there's no easy way to express the objects referred +/// to by object ids by name. +class CallFunctionOnBuilder { + public: + explicit CallFunctionOnBuilder(const m::runtime::CallFunctionOnRequest &req) + : executionContextId_(req.executionContextId) { + out_ << "["; + thisAndArguments_.emplace_back(CallFunctionOnArgument(req.objectId)); + if (req.objectId) { + out_ << "undefined, "; + } else { + out_ << '\'' << CallFunctionOnRunner::kJsThisArgPlaceholder << "', "; + } + + addParams(req.arguments); + out_ << req.functionDeclaration; + out_ << "]"; + }; + + /// Extracts the functions that handles the CallFunctionOn requests, as well + /// as the list of object ids that must be passed when calling it. + std::pair expressionAndRunner() && { + return std::make_pair( + std::move(out_).str(), + CallFunctionOnRunner( + std::move(thisAndArguments_), std::move(executionContextId_))); + } + + private: + void addParams(const folly::Optional> + &maybeArguments) { + if (maybeArguments) { + for (const auto &ca : *maybeArguments) { + addParam(ca); + thisAndArguments_.emplace_back(CallFunctionOnArgument(ca.objectId)); + out_ << ", "; + } + } + } + + void addParam(const m::runtime::CallArgument &ca) { + if (ca.objectId) { + out_ << "undefined"; + } else if (ca.value) { + // TODO: this may throw if ca.value is a CBOR (see RFC 8949), but the + // chrome debugger doesn't seem to send those. + out_ << "(" << folly::toJson(*ca.value) << ")"; + } else if (ca.unserializableValue) { + if (unserializableValueLooksLikeNumber(*ca.unserializableValue)) { + out_ << "+(" << *ca.unserializableValue << ")"; + } else { + out_ << *ca.unserializableValue; + } + } else { + throw std::runtime_error("unknown payload for CallParam"); + } + } + + std::ostringstream out_; + + std::vector thisAndArguments_; + folly::Optional executionContextId_; +}; + +} // namespace + +void Connection::Impl::handle(const m::runtime::CallFunctionOnRequest &req) { + std::string expression; + CallFunctionOnRunner runner; + + auto validateAndParseRequest = + [&expression, &runner](const m::runtime::CallFunctionOnRequest &req) + -> folly::Optional { + if (req.objectId.hasValue() == req.executionContextId.hasValue()) { + return std::string( + "The request must specify either object id or execution context id."); + } + + if (!req.objectId) { + assert( + req.executionContextId && + "should not be here if both object id and execution context id are missing"); + if (*req.executionContextId != kHermesExecutionContextId) { + return "unknown execution context id " + + std::to_string(*req.executionContextId); + } + } + + try { + std::tie(expression, runner) = + CallFunctionOnBuilder(req).expressionAndRunner(); + } catch (const std::exception &e) { + return std::string(e.what()); + } + + return {}; + }; + + if (auto errMsg = validateAndParseRequest(req)) { + sendErrorToClientViaExecutor(req.id, *errMsg); + return; + } + + auto remoteObjPtr = std::make_shared(); + inspector_ + ->evaluate( + 0, // Top of the stackframe + expression, + [this, + remoteObjPtr, + objectGroup = req.objectGroup, + jsThisId = req.objectId, + executionContextId = req.executionContextId, + byValue = req.returnByValue.value_or(false), + runner = + std::move(runner)](const facebook::hermes::debugger::EvalResult + &evalResult) mutable { + if (evalResult.isException) { + return; + } + + *remoteObjPtr = m::runtime::makeRemoteObject( + getRuntime(), + runner(getRuntime(), objTable_, evalResult), + objTable_, + objectGroup.value_or("ConsoleObjectGroup"), + byValue); + }) + .via(executor_.get()) + .thenValue( + [this, id = req.id, remoteObjPtr](debugger::EvalResult result) { + m::debugger::EvaluateOnCallFrameResponse resp; + resp.id = id; + + if (result.isException) { + resp.exceptionDetails = + m::runtime::makeExceptionDetails(result.exceptionDetails); + } else { + resp.result = *remoteObjPtr; + } + + sendResponseToClient(resp); + }) + .thenError(sendErrorToClient(req.id)); +} + void Connection::Impl::handle(const m::runtime::EvaluateRequest &req) { auto remoteObjPtr = std::make_shared(); diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp index 484719e130..170f90593b 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp @@ -1,5 +1,5 @@ // Copyright 2004-present Facebook. All Rights Reserved. -// @generated SignedSource<<522f29c54f207a4f7b5c33af07cf64d0>> +// @generated <> #include "MessageTypes.h" @@ -60,6 +60,7 @@ std::unique_ptr Request::fromJsonThrowOnError(const std::string &str) { makeUnique}, {"HeapProfiler.takeHeapSnapshot", makeUnique}, + {"Runtime.callFunctionOn", makeUnique}, {"Runtime.evaluate", makeUnique}, {"Runtime.getProperties", makeUnique}, {"Runtime.runIfWaitingForDebugger", @@ -274,6 +275,21 @@ dynamic heapProfiler::SamplingHeapProfile::toDynamic() const { return obj; } +runtime::CallArgument::CallArgument(const dynamic &obj) { + assign(value, obj, "value"); + assign(unserializableValue, obj, "unserializableValue"); + assign(objectId, obj, "objectId"); +} + +dynamic runtime::CallArgument::toDynamic() const { + dynamic obj = dynamic::object; + + put(obj, "value", value); + put(obj, "unserializableValue", unserializableValue); + put(obj, "objectId", objectId); + return obj; +} + runtime::ExecutionContextDescription::ExecutionContextDescription( const dynamic &obj) { assign(id, obj, "id"); @@ -931,6 +947,49 @@ void heapProfiler::TakeHeapSnapshotRequest::accept( handler.handle(*this); } +runtime::CallFunctionOnRequest::CallFunctionOnRequest() + : Request("Runtime.callFunctionOn") {} + +runtime::CallFunctionOnRequest::CallFunctionOnRequest(const dynamic &obj) + : Request("Runtime.callFunctionOn") { + assign(id, obj, "id"); + assign(method, obj, "method"); + + dynamic params = obj.at("params"); + assign(functionDeclaration, params, "functionDeclaration"); + assign(objectId, params, "objectId"); + assign(arguments, params, "arguments"); + assign(silent, params, "silent"); + assign(returnByValue, params, "returnByValue"); + assign(userGesture, params, "userGesture"); + assign(awaitPromise, params, "awaitPromise"); + assign(executionContextId, params, "executionContextId"); + assign(objectGroup, params, "objectGroup"); +} + +dynamic runtime::CallFunctionOnRequest::toDynamic() const { + dynamic params = dynamic::object; + put(params, "functionDeclaration", functionDeclaration); + put(params, "objectId", objectId); + put(params, "arguments", arguments); + put(params, "silent", silent); + put(params, "returnByValue", returnByValue); + put(params, "userGesture", userGesture); + put(params, "awaitPromise", awaitPromise); + put(params, "executionContextId", executionContextId); + put(params, "objectGroup", objectGroup); + + dynamic obj = dynamic::object; + put(obj, "id", id); + put(obj, "method", method); + put(obj, "params", std::move(params)); + return obj; +} + +void runtime::CallFunctionOnRequest::accept(RequestHandler &handler) const { + handler.handle(*this); +} + runtime::EvaluateRequest::EvaluateRequest() : Request("Runtime.evaluate") {} runtime::EvaluateRequest::EvaluateRequest(const dynamic &obj) @@ -1187,6 +1246,25 @@ dynamic heapProfiler::StopSamplingResponse::toDynamic() const { return obj; } +runtime::CallFunctionOnResponse::CallFunctionOnResponse(const dynamic &obj) { + assign(id, obj, "id"); + + dynamic res = obj.at("result"); + assign(result, res, "result"); + assign(exceptionDetails, res, "exceptionDetails"); +} + +dynamic runtime::CallFunctionOnResponse::toDynamic() const { + dynamic res = dynamic::object; + put(res, "result", result); + put(res, "exceptionDetails", exceptionDetails); + + dynamic obj = dynamic::object; + put(obj, "id", id); + put(obj, "result", std::move(res)); + return obj; +} + runtime::EvaluateResponse::EvaluateResponse(const dynamic &obj) { assign(id, obj, "id"); diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.h b/ReactCommon/hermes/inspector/chrome/MessageTypes.h index 2184a22358..78468d6fb1 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.h +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.h @@ -1,5 +1,5 @@ // Copyright 2004-present Facebook. All Rights Reserved. -// @generated SignedSource<> +// @generated <> #pragma once @@ -48,7 +48,10 @@ struct StepOverRequest; } // namespace debugger namespace runtime { +struct CallArgument; struct CallFrame; +struct CallFunctionOnRequest; +struct CallFunctionOnResponse; struct ConsoleAPICalledNotification; struct EvaluateRequest; struct EvaluateResponse; @@ -122,6 +125,7 @@ struct RequestHandler { virtual void handle( const heapProfiler::StopTrackingHeapObjectsRequest &req) = 0; virtual void handle(const heapProfiler::TakeHeapSnapshotRequest &req) = 0; + virtual void handle(const runtime::CallFunctionOnRequest &req) = 0; virtual void handle(const runtime::EvaluateRequest &req) = 0; virtual void handle(const runtime::GetPropertiesRequest &req) = 0; virtual void handle(const runtime::RunIfWaitingForDebuggerRequest &req) = 0; @@ -156,6 +160,7 @@ struct NoopRequestHandler : public RequestHandler { void handle( const heapProfiler::StopTrackingHeapObjectsRequest &req) override {} void handle(const heapProfiler::TakeHeapSnapshotRequest &req) override {} + void handle(const runtime::CallFunctionOnRequest &req) override {} void handle(const runtime::EvaluateRequest &req) override {} void handle(const runtime::GetPropertiesRequest &req) override {} void handle(const runtime::RunIfWaitingForDebuggerRequest &req) override {} @@ -281,6 +286,16 @@ struct heapProfiler::SamplingHeapProfile : public Serializable { std::vector samples; }; +struct runtime::CallArgument : public Serializable { + CallArgument() = default; + explicit CallArgument(const folly::dynamic &obj); + folly::dynamic toDynamic() const override; + + folly::Optional value; + folly::Optional unserializableValue; + folly::Optional objectId; +}; + struct runtime::ExecutionContextDescription : public Serializable { ExecutionContextDescription() = default; explicit ExecutionContextDescription(const folly::dynamic &obj); @@ -546,6 +561,24 @@ struct heapProfiler::TakeHeapSnapshotRequest : public Request { folly::Optional treatGlobalObjectsAsRoots; }; +struct runtime::CallFunctionOnRequest : public Request { + CallFunctionOnRequest(); + explicit CallFunctionOnRequest(const folly::dynamic &obj); + + folly::dynamic toDynamic() const override; + void accept(RequestHandler &handler) const override; + + std::string functionDeclaration; + folly::Optional objectId; + folly::Optional> arguments; + folly::Optional silent; + folly::Optional returnByValue; + folly::Optional userGesture; + folly::Optional awaitPromise; + folly::Optional executionContextId; + folly::Optional objectGroup; +}; + struct runtime::EvaluateRequest : public Request { EvaluateRequest(); explicit EvaluateRequest(const folly::dynamic &obj); @@ -658,6 +691,15 @@ struct heapProfiler::StopSamplingResponse : public Response { heapProfiler::SamplingHeapProfile profile{}; }; +struct runtime::CallFunctionOnResponse : public Response { + CallFunctionOnResponse() = default; + explicit CallFunctionOnResponse(const folly::dynamic &obj); + folly::dynamic toDynamic() const override; + + runtime::RemoteObject result{}; + folly::Optional exceptionDetails; +}; + struct runtime::EvaluateResponse : public Response { EvaluateResponse() = default; explicit EvaluateResponse(const folly::dynamic &obj); diff --git a/ReactCommon/hermes/inspector/chrome/tests/ConnectionTests.cpp b/ReactCommon/hermes/inspector/chrome/tests/ConnectionTests.cpp index 1338337779..502b1f10f9 100644 --- a/ReactCommon/hermes/inspector/chrome/tests/ConnectionTests.cpp +++ b/ReactCommon/hermes/inspector/chrome/tests/ConnectionTests.cpp @@ -407,7 +407,7 @@ std::unordered_map expectProps( m::runtime::PropertyDescriptor &desc = resp.result[i]; auto infoIt = infos.find(desc.name); - EXPECT_FALSE(infoIt == infos.end()); + EXPECT_FALSE(infoIt == infos.end()) << desc.name; if (infoIt != infos.end()) { const PropInfo &info = infoIt->second; @@ -460,6 +460,25 @@ void expectEvalResponse( expectProps(conn, id + 1, resp.result.objectId.value(), infos); } +m::runtime::CallArgument makeValueCallArgument(folly::dynamic val) { + m::runtime::CallArgument ret; + ret.value = val; + return ret; +} + +m::runtime::CallArgument makeUnserializableCallArgument(std::string val) { + m::runtime::CallArgument ret; + ret.unserializableValue = std::move(val); + return ret; +} + +m::runtime::CallArgument makeObjectIdCallArgument( + m::runtime::RemoteObjectId objectId) { + m::runtime::CallArgument ret; + ret.objectId = std::move(objectId); + return ret; +} + } // namespace TEST(ConnectionTests, testRespondsOkToUnknownRequests) { @@ -1981,6 +2000,231 @@ TEST(ConnectionTests, testScopeVariables) { expectNotification(conn); } +TEST(ConnectionTests, testRuntimeCallFunctionOnObject) { + TestContext context; + AsyncHermesRuntime &asyncRuntime = context.runtime(); + SyncConnection &conn = context.conn(); + int msgId = 1; + + asyncRuntime.executeScriptAsync(R"( + debugger; + )"); + + send(conn, msgId++); + expectExecutionContextCreated(conn); + expectNotification(conn); + + // create a new Object() that will be used as "this" below. + m::runtime::RemoteObjectId thisId; + { + sendRuntimeEvalRequest(conn, msgId, "new Object()"); + auto resp = expectResponse(conn, msgId++); + ASSERT_TRUE(resp.result.objectId) << resp.toDynamic(); + thisId = *resp.result.objectId; + } + + // expectedPropInfos are properties that are expected to exist in thisId. It + // is modified by addMember (below). + std::unordered_map expectedPropInfos; + + // Add __proto__ as it always exists. + expectedPropInfos.emplace("__proto__", PropInfo("object")); + + /// addMember sends Runtime.callFunctionOn() requests with a function + /// declaration that simply adds a new property called \p propName with type + /// \p type to the remote object \p id. \p ca is the property's value. + /// The new property must not exist in \p id unless \p allowRedefinition is + /// true. + auto addMember = [&](const m::runtime::RemoteObjectId id, + const char *type, + const char *propName, + const m::runtime::CallArgument &ca, + bool allowRedefinition = false) { + m::runtime::CallFunctionOnRequest req; + req.id = msgId++; + req.functionDeclaration = + std::string("function(e){const r=\"") + propName + "\"; this[r]=e,r}"; + req.arguments = std::vector{ca}; + req.objectId = thisId; + conn.send(req.toJson()); + expectResponse(conn, req.id); + + auto it = expectedPropInfos.emplace(propName, PropInfo(type)); + + EXPECT_TRUE(allowRedefinition || it.second) + << "property \"" << propName << "\" redefined."; + + if (ca.value) { + it.first->second.setValue(*ca.value); + } + + if (ca.unserializableValue) { + it.first->second.setUnserializableValue(*ca.unserializableValue); + } + }; + + addMember(thisId, "boolean", "b", makeValueCallArgument(true)); + addMember(thisId, "number", "num", makeValueCallArgument(12)); + addMember(thisId, "string", "str", makeValueCallArgument("string value")); + addMember(thisId, "object", "self_ref", makeObjectIdCallArgument(thisId)); + addMember( + thisId, "number", "inf", makeUnserializableCallArgument("Infinity")); + addMember( + thisId, "number", "ni", makeUnserializableCallArgument("-Infinity")); + addMember(thisId, "number", "nan", makeUnserializableCallArgument("NaN")); + + /// ensures that \p objId has all of the expected properties; Returns the + /// runtime::RemoteObjectId for the "self_ref" property (which must exist). + auto verifyObjShape = [&](const m::runtime::RemoteObjectId &objId) + -> folly::Optional { + auto objProps = expectProps(conn, msgId++, objId, expectedPropInfos); + EXPECT_TRUE(objProps.count("__proto__")); + auto objPropIt = objProps.find("self_ref"); + if (objPropIt == objProps.end()) { + EXPECT_TRUE(false) << "missing \"self_ref\" property."; + return {}; + } + return objPropIt->second; + }; + + // Verify that thisId has the correct shape. + auto selfRefId = verifyObjShape(thisId); + ASSERT_TRUE(selfRefId); + // Then verify that the self reference has the correct shape. If thisId does + // not have the "self_ref" property the call to verifyObjShape will return an + // empty Optional, as well as report an error. + selfRefId = verifyObjShape(*selfRefId); + ASSERT_TRUE(selfRefId); + + // Now we modify the self reference, which should cause thisId to change + // as well. + const bool kAllowRedefinition = true; + + addMember( + *selfRefId, + "number", + "num", + makeValueCallArgument(42), + kAllowRedefinition); + + addMember( + *selfRefId, "number", "neg_zero", makeUnserializableCallArgument("-0")); + + verifyObjShape(thisId); + + send(conn, msgId++); + expectNotification(conn); +} + +TEST(ConnectionTests, testRuntimeCallFunctionOnExecutionContext) { + TestContext context; + AsyncHermesRuntime &asyncRuntime = context.runtime(); + SyncConnection &conn = context.conn(); + int msgId = 1; + + asyncRuntime.executeScriptAsync(R"( + debugger; + )"); + + /// helper that returns a map with all of \p objId 's members. + auto getProps = [&msgId, &conn](const m::runtime::RemoteObjectId &objId) { + m::runtime::GetPropertiesRequest req; + req.id = msgId++; + req.objectId = objId; + conn.send(req.toJson()); + auto resp = expectResponse(conn, req.id); + std::unordered_map> + properties; + for (auto propertyDescriptor : resp.result) { + properties[propertyDescriptor.name] = propertyDescriptor.value; + } + return properties; + }; + + send(conn, msgId++); + expectExecutionContextCreated(conn); + expectNotification(conn); + + // globalThisId is the inspector's object Id for globalThis. + m::runtime::RemoteObjectId globalThisId; + { + sendRuntimeEvalRequest(conn, msgId, "globalThis"); + auto resp = expectResponse(conn, msgId++); + ASSERT_TRUE(resp.result.objectId) << resp.toDynamic(); + globalThisId = *resp.result.objectId; + } + + // This test table has all of the new fields we want to add to globalThis, + // plus the Runtime.CallArgument to be sent to the inspector. + struct { + const char *propName; + const m::runtime::CallArgument callArg; + } tests[] = { + {"callFunctionOnTestMember1", makeValueCallArgument(10)}, + {"callFunctionOnTestMember2", makeValueCallArgument("string")}, + {"callFunctionOnTestMember3", makeUnserializableCallArgument("NaN")}, + {"callFunctionOnTestMember4", makeUnserializableCallArgument("-0")}, + }; + + // sanity-check that our test fields don't exist in global this. + { + auto currProps = getProps(globalThisId); + for (const auto &test : tests) { + EXPECT_EQ(currProps.count(test.propName), 0) << test.propName; + } + } + + auto addMember = [&msgId, &conn]( + const char *propName, + const m::runtime::CallArgument &ca) { + m::runtime::CallFunctionOnRequest req; + req.id = msgId++; + req.functionDeclaration = + std::string("function(e){const r=\"") + propName + "\"; this[r]=e,r}"; + req.arguments = std::vector{ca}; + req.executionContextId = 1; + conn.send(req.toJson()); + expectResponse(conn, req.id); + }; + + for (const auto &test : tests) { + addMember(test.propName, test.callArg); + } + + { + auto currProps = getProps(globalThisId); + for (const auto &test : tests) { + auto it = currProps.find(test.propName); + + // there should be a property named test.propName in globalThis. + ASSERT_TRUE(it != currProps.end()) << test.propName; + + // and it should have a value. + ASSERT_TRUE(it->second) << test.propName; + + if (it->second->value.hasValue()) { + // the property has a value, so make sure that's what's being expected. + auto actual = it->second->value; + auto expected = test.callArg.value; + ASSERT_TRUE(expected.hasValue()) << test.propName; + EXPECT_EQ(*actual, *expected) << test.propName; + } else if (it->second->unserializableValue.hasValue()) { + // the property has an unserializable value, so make sure that's what's + // being expected. + auto actual = it->second->unserializableValue; + auto expected = test.callArg.unserializableValue; + ASSERT_TRUE(expected.hasValue()) << test.propName; + EXPECT_EQ(*actual, *expected) << test.propName; + } else { + FAIL() << "No value or unserializable value in " << test.propName; + } + } + } + + send(conn, msgId++); + expectNotification(conn); +} + TEST(ConnectionTests, testConsoleLog) { TestContext context; AsyncHermesRuntime &asyncRuntime = context.runtime(); @@ -2489,9 +2733,9 @@ TEST(ConnectionTests, heapProfilerSampling) { req.id = msgId++; // Sample every 256 bytes to ensure there are some samples. The default is // 32768, which is too high for a small example. Note that sampling is a - // random process, so there's no guarantee there will be any samples in any - // finite number of allocations. In practice the likelihood is so high that - // there shouldn't be any issues. + // random process, so there's no guarantee there will be any samples in + // any finite number of allocations. In practice the likelihood is so high + // that there shouldn't be any issues. req.samplingInterval = 256; send(conn, req); } @@ -2582,9 +2826,9 @@ TEST(ConnectionTests, heapSnapshotRemoteObject) { testObject(storedObjID, "object", "Array", "Array(3)", "array"); // Force a collection to move the heap. runtime->instrumentation().collectGarbage("test"); - // A collection should not disturb the unique ID lookup, and it should be the - // same object as before. Note that it won't have the same remote ID, because - // Hermes doesn't do uniquing. + // A collection should not disturb the unique ID lookup, and it should be + // the same object as before. Note that it won't have the same remote ID, + // because Hermes doesn't do uniquing. testObject(globalObjID, "object", "Object", "Object", nullptr); testObject(storedObjID, "object", "Array", "Array(3)", "array"); diff --git a/ReactCommon/hermes/inspector/tools/message_types.txt b/ReactCommon/hermes/inspector/tools/message_types.txt index 6267e82ee0..8921a82925 100644 --- a/ReactCommon/hermes/inspector/tools/message_types.txt +++ b/ReactCommon/hermes/inspector/tools/message_types.txt @@ -28,6 +28,7 @@ HeapProfiler.heapStatsUpdate HeapProfiler.lastSeenObjectId HeapProfiler.getObjectByHeapObjectId HeapProfiler.getHeapObjectId +Runtime.callFunctionOn Runtime.consoleAPICalled Runtime.evaluate Runtime.executionContextCreated From f185d42619cd14d0b195670c0a422bd14bec20bb Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Wed, 2 Feb 2022 07:16:21 -0800 Subject: [PATCH 023/109] chore(LinkingExample): Update external URLs description (#33023) Summary: Update LinkingExample "Open external URLs" description to mitigate confusion about opening custom schemes in the simulator when testing, as suggested by Luna here https://github.com/facebook/react-native/issues/32962#issuecomment-1026018822 ## Changelog [Internal] [Changed] - Update LinkingExample "Open external URLs" description Pull Request resolved: https://github.com/facebook/react-native/pull/33023 Test Plan: 1. Build RNTester iOS app 2. Head to the APIs example, Linking -> "Open external URLs" https://user-images.githubusercontent.com/11707729/152087644-7e95692c-5180-465b-9fc8-2a637a091deb.mov Reviewed By: cortinico Differential Revision: D33941963 Pulled By: dmitryrykun fbshipit-source-id: 5f58d7f71aee61518b0b8fd92d7b78ac8bff4d4b --- .../rn-tester/js/examples/Linking/LinkingExample.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/rn-tester/js/examples/Linking/LinkingExample.js b/packages/rn-tester/js/examples/Linking/LinkingExample.js index a33a5b20be..2f84d7c5e0 100644 --- a/packages/rn-tester/js/examples/Linking/LinkingExample.js +++ b/packages/rn-tester/js/examples/Linking/LinkingExample.js @@ -33,7 +33,13 @@ class OpenURLButton extends React.Component { if (supported) { Linking.openURL(this.props.url); } else { - console.log("Don't know how to open URI: " + this.props.url); + console.log( + `Don't know how to open URI: ${ + this.props.url + }, ensure you have an app installed that handles the "${ + this.props.url.split(':')?.[0] + }" scheme`, + ); } }); }; @@ -134,6 +140,8 @@ exports.description = 'Shows how to use Linking to open URLs.'; exports.examples = [ { title: 'Open external URLs', + description: + 'Custom schemes may require specific apps to be installed on the device. Note: Phone app is not supported in the simulator.', render: function (): React.Element { return ; }, From fbb9d33ceeb28ca106a0410704307a650eb53362 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Wed, 2 Feb 2022 08:22:05 -0800 Subject: [PATCH 024/109] Update Danger JS to v11 (#33027) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Danger 7 -> 11 ## Changelog [Internal] [Changed] - Updates Danger used in PR checking from v7 to v11 Pull Request resolved: https://github.com/facebook/react-native/pull/33027 Test Plan: Works when testing locally ``` > DANGER_GITHUB_API_TOKEN=XXYYZZ yarn danger pr https://github.com/facebook/react-native/pull/32955 yarn run v1.22.15 $ node ./node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/32955 Starting Danger PR on facebook/react-native#32955 --- Accurate Error due to not being able to write to labels --- ## Failures `node` failed. ## Messages :clipboard: Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change. - :clipboard: Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested. - :clipboard: Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: `[CATEGORY] [TYPE] - Message`.
CATEGORY may be: - General - iOS - Android - JavaScript - Internal (for changes that do not need to be called out in the release notes) TYPE may be: - Added, for new features. - Changed, for changes in existing functionality. - Deprecated, for soon-to-be removed features. - Removed, for now removed features. - Fixed, for any bug fixes. - Security, in case of vulnerabilities. MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.
## Markdowns Danger: â…¹ Failing the build, there is 1 fail. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` Reviewed By: GijsWeterings Differential Revision: D33941271 Pulled By: cortinico fbshipit-source-id: 359c0076a160a8eeac897a2e1556d3e4d3db5e04 --- bots/package.json | 2 +- bots/yarn.lock | 1608 +++++++++++---------------------------------- 2 files changed, 388 insertions(+), 1222 deletions(-) diff --git a/bots/package.json b/bots/package.json index 8be650b4bd..407c65d9dc 100644 --- a/bots/package.json +++ b/bots/package.json @@ -4,7 +4,7 @@ "danger": "node ./node_modules/.bin/danger" }, "devDependencies": { - "danger": "^7.1.4", + "danger": "^11.0.2", "lodash.includes": "^4.3.0", "minimatch": "^3.0.4" }, diff --git a/bots/yarn.lock b/bots/yarn.lock index cfde2dcbc8..b22b145ad8 100644 --- a/bots/yarn.lock +++ b/bots/yarn.lock @@ -3,12 +3,12 @@ "@babel/polyfill@^7.2.5": - version "7.2.5" - resolved "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.2.5.tgz" - integrity sha512-8Y/t3MWThtMLYr0YNC/Q76tqN1w30+b0uQMeFUYauG2UGTR19zyUtFrAzT23zNtBxPp+LbE5E/nwV/q/r3y6ug== + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" + integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g== dependencies: - core-js "^2.5.7" - regenerator-runtime "^0.12.0" + core-js "^2.6.5" + regenerator-runtime "^0.13.4" "@firebase/analytics-compat@0.1.1": version "0.1.1" @@ -386,7 +386,7 @@ protobufjs "^6.10.0" yargs "^16.1.1" -"@octokit/auth-token@^2.4.0", "@octokit/auth-token@^2.4.4": +"@octokit/auth-token@^2.4.4": version "2.5.0" resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz" integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== @@ -408,7 +408,7 @@ "@octokit/endpoint@^6.0.1": version "6.0.12" - resolved "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== dependencies: "@octokit/types" "^6.0.3" @@ -426,16 +426,9 @@ "@octokit/openapi-types@^11.2.0": version "11.2.0" - resolved "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.2.0.tgz" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== -"@octokit/plugin-paginate-rest@^1.1.1": - version "1.1.2" - resolved "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz" - integrity sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q== - dependencies: - "@octokit/types" "^2.0.1" - "@octokit/plugin-paginate-rest@^2.16.8": version "2.17.0" resolved "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz" @@ -443,19 +436,11 @@ dependencies: "@octokit/types" "^6.34.0" -"@octokit/plugin-request-log@^1.0.0", "@octokit/plugin-request-log@^1.0.4": +"@octokit/plugin-request-log@^1.0.4": version "1.0.4" resolved "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz" integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== -"@octokit/plugin-rest-endpoint-methods@2.4.0": - version "2.4.0" - resolved "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz" - integrity sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ== - dependencies: - "@octokit/types" "^2.0.1" - deprecation "^2.3.1" - "@octokit/plugin-rest-endpoint-methods@^5.12.0": version "5.13.0" resolved "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz" @@ -464,15 +449,6 @@ "@octokit/types" "^6.34.0" deprecation "^2.3.1" -"@octokit/request-error@^1.0.2": - version "1.2.1" - resolved "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz" - integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA== - dependencies: - "@octokit/types" "^2.0.0" - deprecation "^2.0.0" - once "^1.4.0" - "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": version "2.1.0" resolved "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz" @@ -482,7 +458,7 @@ deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.2.0", "@octokit/request@^5.6.0": +"@octokit/request@^5.6.0": version "5.6.2" resolved "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz" integrity sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA== @@ -494,29 +470,7 @@ node-fetch "^2.6.1" universal-user-agent "^6.0.0" -"@octokit/rest@^16.14.1": - version "16.43.2" - resolved "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.2.tgz" - integrity sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ== - dependencies: - "@octokit/auth-token" "^2.4.0" - "@octokit/plugin-paginate-rest" "^1.1.1" - "@octokit/plugin-request-log" "^1.0.0" - "@octokit/plugin-rest-endpoint-methods" "2.4.0" - "@octokit/request" "^5.2.0" - "@octokit/request-error" "^1.0.2" - atob-lite "^2.0.0" - before-after-hook "^2.0.0" - btoa-lite "^1.0.0" - deprecation "^2.0.0" - lodash.get "^4.4.2" - lodash.set "^4.3.2" - lodash.uniq "^4.5.0" - octokit-pagination-methods "^1.1.0" - once "^1.4.0" - universal-user-agent "^4.0.0" - -"@octokit/rest@^18.12.0": +"@octokit/rest@^16.43.0 || ^17.11.0 || ^18.12.0", "@octokit/rest@^18.12.0": version "18.12.0" resolved "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz" integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== @@ -526,13 +480,6 @@ "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^5.12.0" -"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.16.2" - resolved "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz" - integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== - dependencies: - "@types/node" ">= 8" - "@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.34.0": version "6.34.0" resolved "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz" @@ -598,28 +545,25 @@ resolved "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz" integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== -"@types/node@>= 8", "@types/node@>=12.12.47", "@types/node@>=13.7.0": +"@types/node@>=12.12.47", "@types/node@>=13.7.0": version "16.9.1" resolved "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz" integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== -agent-base@4, agent-base@^4.1.0: - version "4.2.1" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +agent-base@4, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== dependencies: es6-promisify "^5.0.0" -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - ansi-regex@^5.0.0: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" @@ -627,7 +571,7 @@ ansi-regex@^5.0.0: ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" @@ -639,60 +583,24 @@ ansi-styles@^4.0.0: dependencies: color-convert "^2.0.1" -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= +async-retry@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.2.3.tgz#a6521f338358d322b1a0012b79030c6f411d1ce0" + integrity sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q== + dependencies: + retry "0.12.0" -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -atob-lite@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz" - integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY= - -atob@^2.1.1: - version "2.1.2" - resolved "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base@^0.11.1: - version "0.11.2" - resolved "https://registry.npmjs.org/base/-/base-0.11.2.tgz" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -before-after-hook@^2.0.0, before-after-hook@^2.2.0: +before-after-hook@^2.2.0: version "2.2.2" resolved "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz" integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== @@ -705,80 +613,27 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -btoa-lite@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz" - integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= + fill-range "^7.0.1" buffer-equal-constant-time@1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - chalk@^2.3.0: version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - cliui@^7.0.2: version "7.0.4" resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" @@ -788,22 +643,9 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - color-convert@^1.9.0: version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" @@ -817,7 +659,7 @@ color-convert@^2.0.1: color-name@1.1.3: version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= color-name@~1.1.4: @@ -825,78 +667,62 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -commander@^2.18.0: - version "2.19.0" - resolved "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== +combined-stream@^1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.18.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - core-js@3.6.5: version "3.6.5" resolved "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz" integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== -core-js@^2.5.7: - version "2.6.4" - resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.4.tgz" - integrity sha512-05qQ5hXShcqGkPZpXEFLIpxayZscVD2kuMBZewxiIPPEagukO4mqgPA9CWhUvFBJfy3ODdK2p9xyHh7FTU9/7A== +core-js@^2.6.5: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -danger@^7.1.4: - version "7.1.4" - resolved "https://registry.npmjs.org/danger/-/danger-7.1.4.tgz" - integrity sha512-Q6Qi7GZ58k2kyGbZkToGquM8ELtY9GR2CsfHeKGzIa77cRzaTMvn/x1W4FH3Vd0WPIASDV1yFp0xjvbK9sPcpg== +danger@^11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/danger/-/danger-11.0.2.tgz#245b65aaf26c9b5eb3d0c65fcd403b5c31782138" + integrity sha512-TKE5E1Zrb0uV7Ft3mhbTA3bwVf4hZs7DVx6Mo8weVdIcaXJIIle3+aCjn259GX9/pF4ewoYuof7eLRPJligOgA== dependencies: "@babel/polyfill" "^7.2.5" - "@octokit/rest" "^16.14.1" + "@octokit/rest" "^18.12.0" + async-retry "1.2.3" chalk "^2.3.0" commander "^2.18.0" debug "^4.1.1" + fast-json-patch "^3.0.0-1" get-stdin "^6.0.0" + gitlab "^10.0.1" http-proxy-agent "^2.1.0" https-proxy-agent "^2.2.1" hyperlinker "^1.0.0" - jsome "^2.3.25" json5 "^2.1.0" - jsonpointer "^4.0.1" + jsonpointer "^5.0.0" jsonwebtoken "^8.4.0" lodash.find "^4.6.0" lodash.includes "^4.3.0" @@ -904,91 +730,62 @@ danger@^7.1.4: lodash.keys "^4.0.8" lodash.mapvalues "^4.6.0" lodash.memoize "^4.1.2" - memfs-or-file-map-to-github-branch "^1.1.0" - micromatch "^3.1.10" + memfs-or-file-map-to-github-branch "^1.2.1" + micromatch "^4.0.4" node-cleanup "^2.1.2" - node-fetch "^2.3.0" + node-fetch "^2.6.7" override-require "^1.1.1" p-limit "^2.1.0" - parse-diff "^0.5.1" + parse-diff "^0.7.0" parse-git-config "^2.0.3" parse-github-url "^1.0.2" - parse-link-header "^1.0.1" + parse-link-header "^2.0.0" pinpoint "^1.1.0" + prettyjson "^1.2.1" readline-sync "^1.4.9" require-from-string "^2.0.2" - rfc6902 "^3.0.1" supports-hyperlinks "^1.0.1" debug@3.1.0: version "3.1.0" - resolved "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" -debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@^3.1.0: - version "3.2.6" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" debug@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: - ms "^2.1.1" - -decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + ms "2.1.2" decode-uri-component@^0.2.0: version "0.2.0" - resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: +delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== -ecdsa-sig-formatter@1.0.10: - version "1.0.10" - resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz" - integrity sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM= +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== dependencies: safe-buffer "^5.0.1" @@ -997,21 +794,14 @@ emoji-regex@^8.0.0: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - es6-promise@^4.0.3: - version "4.2.5" - resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz" - integrity sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg== + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== es6-promisify@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= dependencies: es6-promise "^4.0.3" @@ -1023,83 +813,32 @@ escalade@^3.1.1: escape-string-regexp@^1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== expand-tilde@^2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= dependencies: homedir-polyfill "^1.0.1" extend-shallow@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" +fast-json-patch@^3.0.0-1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.0.tgz#ec8cd9b9c4c564250ec8b9140ef7a55f70acaee6" + integrity sha512-IhpytlsVTRndz0hU5t0/MGzS/etxLlfrpG5V5M9mVbuj9TrJLWaMfsox9REM5rkuGX0T+5qjpe8XA1o0gZ42nA== faye-websocket@0.11.3: version "0.11.3" @@ -1108,22 +847,17 @@ faye-websocket@0.11.3: dependencies: websocket-driver ">=0.5.1" -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" + to-regex-range "^5.0.1" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= firebase@^9.0.2: version "9.0.2" @@ -1157,21 +891,18 @@ firebase@^9.0.2: "@firebase/storage-compat" "0.1.2" "@firebase/util" "1.3.0" -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= +form-data@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== dependencies: - map-cache "^0.2.2" + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" fs-exists-sync@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" integrity sha1-mC1ok6+RjnLQjeyehnP/K1qNat0= fs.realpath@^1.0.0: @@ -1179,11 +910,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" @@ -1191,35 +917,31 @@ get-caller-file@^2.0.5: get-stdin@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - git-config-path@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/git-config-path/-/git-config-path-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/git-config-path/-/git-config-path-1.0.1.tgz#6d33f7ed63db0d0e118131503bab3aca47d54664" integrity sha1-bTP37WPbDQ4RgTFQO6s6ykfVRmQ= dependencies: extend-shallow "^2.0.1" fs-exists-sync "^0.1.0" homedir-polyfill "^1.0.0" +gitlab@^10.0.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/gitlab/-/gitlab-10.2.1.tgz#1f5fb2c2bad08f95b7c7d91dd41805ab5eea3960" + integrity sha512-z+DxRF1C9uayVbocs9aJkJz+kGy14TSm1noB/rAIEBbXOkOYbjKxyuqJzt+0zeFpXFdgA0yq6DVVbvM7HIfGwg== + dependencies: + form-data "^2.5.0" + humps "^2.0.1" + ky "^0.12.0" + ky-universal "^0.3.0" + li "^1.3.0" + query-string "^6.8.2" + universal-url "^2.0.0" + glob@^7.1.3: version "7.1.6" resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" @@ -1234,49 +956,23 @@ glob@^7.1.3: has-flag@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= has-flag@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: +hasurl@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" + resolved "https://registry.yarnpkg.com/hasurl/-/hasurl-1.0.0.tgz#e4c619097ae1e8fc906bee904ce47e94f5e1ea37" + integrity sha512-43ypUd3DbwyCT01UYpA99AEZxZ4aKtRxWGBHEIbjcOsUghd9YUON0C+JF6isNjaiwC/UF5neaUudy6JS9jZPZQ== homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz" - integrity sha1-TCu8inWJmP7r9e1oWA921GdotLw= + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== dependencies: parse-passwd "^1.0.0" @@ -1287,23 +983,28 @@ homedir-polyfill@^1.0.0, homedir-polyfill@^1.0.1: http-proxy-agent@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== dependencies: agent-base "4" debug "3.1.0" https-proxy-agent@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz" - integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== + version "2.2.4" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" + integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== dependencies: - agent-base "^4.1.0" + agent-base "^4.3.0" debug "^3.1.0" +humps@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/humps/-/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa" + integrity sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao= + hyperlinker@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" integrity sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ== idb@3.0.2: @@ -1330,178 +1031,53 @@ inherits@2, inherits@~2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@^1.3.5: - version "1.3.5" - resolved "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-extendable@^0.1.0, is-extendable@^0.1.1: +is-extendable@^0.1.0: version "0.1.1" - resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-plain-object@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@1.0.0, isarray@~1.0.0: +isarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -jsome@^2.3.25: - version "2.5.0" - resolved "https://registry.npmjs.org/jsome/-/jsome-2.5.0.tgz" - integrity sha1-XkF+70NB/+uD7ov6kmWzbVb+Se0= - dependencies: - chalk "^2.3.0" - json-stringify-safe "^5.0.1" - yargs "^11.0.0" - -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - json5@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz" - integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: - minimist "^1.2.0" + minimist "^1.2.5" -jsonpointer@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz" - integrity sha1-T9kss04OnbPInIYi7PUfm5eMbLk= +jsonpointer@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.0.tgz#f802669a524ec4805fa7389eadbc9921d5dc8072" + integrity sha512-PNYZIdMjVIvVgDSYKTT63Y+KZ6IZvGRNNWcxwD+GNnUz1MKPfv30J8ueCjdwcN0nDx2SlshgyB7Oy0epAzVRRg== jsonwebtoken@^8.4.0: - version "8.4.0" - resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.4.0.tgz" - integrity sha512-coyXjRTCy0pw5WYBpMvWOMN+Kjaik2MwTUIq9cna/W7NpO9E+iYbumZONAz3hcr+tXFJECoQVrtmIoC3Oz0gvg== + version "8.5.1" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" + integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== dependencies: - jws "^3.1.5" + jws "^3.2.2" lodash.includes "^4.3.0" lodash.isboolean "^3.0.3" lodash.isinteger "^4.0.4" @@ -1510,6 +1086,7 @@ jsonwebtoken@^8.4.0: lodash.isstring "^4.0.1" lodash.once "^4.0.0" ms "^2.1.1" + semver "^5.6.0" jszip@^3.5.0, jszip@^3.6.0: version "3.7.1" @@ -1521,53 +1098,40 @@ jszip@^3.5.0, jszip@^3.6.0: readable-stream "~2.3.6" set-immediate-shim "~1.0.1" -jwa@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/jwa/-/jwa-1.2.0.tgz" - integrity sha512-Grku9ZST5NNQ3hqNUodSkDfEBqAmGA1R8yiyPHOnLzEKI0GaCQC/XhFmsheXYuXzFQJdILbh+lYBiliqG5R/Vg== +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== dependencies: buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.10" + ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@^3.1.5: - version "3.2.1" - resolved "https://registry.npmjs.org/jws/-/jws-3.2.1.tgz" - integrity sha512-bGA2omSrFUkd72dhh05bIAN832znP4wOU3lfuXtRBuGTbsmNmDXMQg28f0Vsxaxgk4myF5YkKQpz6qeRpMgX9g== - dependencies: - jwa "^1.2.0" - safe-buffer "^5.0.1" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: +jws@^3.2.2: version "3.2.2" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== dependencies: - is-buffer "^1.1.5" + jwa "^1.4.1" + safe-buffer "^5.0.1" -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= +ky-universal@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.3.0.tgz#3fcbb0dd03da39b5f05100d9362a630d5e1d402e" + integrity sha512-CM4Bgb2zZZpsprcjI6DNYTaH3oGHXL2u7BU4DK+lfCuC4snkt9/WRpMYeKbBbXscvKkeqBwzzjFX2WwmKY5K/A== dependencies: - is-buffer "^1.1.5" + abort-controller "^3.0.0" + node-fetch "^2.6.0" -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== +ky@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/ky/-/ky-0.12.0.tgz#c05be95e6745ba422a6d2cc8ae964164962279f9" + integrity sha512-t9b7v3V2fGwAcQnnDDQwKQGF55eWrf4pwi1RN08Fy8b/9GEwV7Ea0xQiaSW6ZbeghBHIwl8kgnla4vVo9seepQ== -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" +li@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/li/-/li-1.3.0.tgz#22c59bcaefaa9a8ef359cf759784e4bf106aea1b" + integrity sha1-IsWbyu+qmo7zWc91l4TkvxBq6hs= lie@~3.3.0: version "3.3.0" @@ -1576,14 +1140,6 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz" @@ -1591,14 +1147,9 @@ lodash.camelcase@^4.3.0: lodash.find@^4.6.0: version "4.6.0" - resolved "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" integrity sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E= -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - lodash.includes@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz" @@ -1606,129 +1157,90 @@ lodash.includes@^4.3.0: lodash.isboolean@^3.0.3: version "3.0.3" - resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= lodash.isinteger@^4.0.4: version "4.0.4" - resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= lodash.isnumber@^3.0.3: version "3.0.3" - resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= lodash.isobject@^3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0= lodash.isplainobject@^4.0.6: version "4.0.6" - resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= lodash.isstring@^4.0.1: version "4.0.1" - resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= lodash.keys@^4.0.8: version "4.2.0" - resolved "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205" integrity sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU= lodash.mapvalues@^4.6.0: version "4.6.0" - resolved "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" integrity sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw= lodash.memoize@^4.1.2: version "4.1.2" - resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= lodash.once@^4.0.0: version "4.1.1" - resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash.set@^4.3.2: - version "4.3.2" - resolved "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz" - integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" - integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= long@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/long/-/long-4.0.0.tgz" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== +memfs-or-file-map-to-github-branch@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/memfs-or-file-map-to-github-branch/-/memfs-or-file-map-to-github-branch-1.2.1.tgz#fdb9a85408262316a9bd5567409bf89be7d72f96" + integrity sha512-I/hQzJ2a/pCGR8fkSQ9l5Yx+FQ4e7X6blNHyWBm2ojeFLT3GVzGkTj7xnyWpdclrr7Nq4dmx3xrvu70m3ypzAQ== dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" + "@octokit/rest" "^16.43.0 || ^17.11.0 || ^18.12.0" -macos-release@^2.2.0: - version "2.5.0" - resolved "https://registry.npmjs.org/macos-release/-/macos-release-2.5.0.tgz" - integrity sha512-EIgv+QZ9r+814gjJj0Bt5vSLJLzswGmSUbUpbi9AIr/fsN2IWFBl2NucV9PAiek+U1STK468tEkxmVYUtuAN3g== - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= +micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== dependencies: - object-visit "^1.0.0" + braces "^3.0.1" + picomatch "^2.2.3" -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= +mime-db@1.51.0: + version "1.51.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" + integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== + +mime-types@^2.1.12: + version "2.1.34" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" + integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== dependencies: - mimic-fn "^1.0.0" - -memfs-or-file-map-to-github-branch@^1.1.0: - version "1.1.2" - resolved "https://registry.npmjs.org/memfs-or-file-map-to-github-branch/-/memfs-or-file-map-to-github-branch-1.1.2.tgz" - integrity sha512-D2JKK2DTuVYQqquBWco3K6UfSVyVwmd58dgNqh+TgxHOZdTmR8I130gjMbVCkemDl/EzqDA62417cJxKL3/FFA== - -micromatch@^3.1.10: - version "3.1.10" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + mime-db "1.51.0" minimatch@^3.0.4: version "3.0.4" @@ -1737,184 +1249,80 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== ms@2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + ms@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== node-cleanup@^2.1.2: version "2.1.2" - resolved "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz" + resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" integrity sha1-esGavSl+Caf3KnFUXZUbUX5N3iw= -node-fetch@2.6.1, node-fetch@^2.6.1: +node-fetch@2.6.1: version "2.6.1" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -node-fetch@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz" - integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= +node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: - path-key "^2.0.0" + whatwg-url "^5.0.0" -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -octokit-pagination-methods@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz" - integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== - -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-name@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz" - integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== - dependencies: - macos-release "^2.2.0" - windows-release "^3.1.0" - override-require@^1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/override-require/-/override-require-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/override-require/-/override-require-1.1.1.tgz#6ae22fadeb1f850ffb0cf4c20ff7b87e5eb650df" integrity sha1-auIvresfhQ/7DPTCD/e4fl62UN8= -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz" - integrity sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g== + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz" - integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== pako@~1.0.2: version "1.0.11" resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== -parse-diff@^0.5.1: - version "0.5.1" - resolved "https://registry.npmjs.org/parse-diff/-/parse-diff-0.5.1.tgz" - integrity sha512-/qXjo9x/pFa5bVk/ZXaJD0yr3Tf3Yp6MWWMr4vnUmumDrE0yoE6YDH2A8vmcCD/Ko3tW2o0X+zGYh2zMLXshsg== +parse-diff@^0.7.0: + version "0.7.1" + resolved "https://registry.yarnpkg.com/parse-diff/-/parse-diff-0.7.1.tgz#9b7a2451c3725baf2c87c831ba192d40ee2237d4" + integrity sha512-1j3l8IKcy4yRK2W4o9EYvJLSzpAVwz4DXqCewYyx2vEwk2gcf3DBPqc8Fj4XV3K33OYJ08A8fWwyu/ykD/HUSg== parse-git-config@^2.0.3: version "2.0.3" - resolved "https://registry.npmjs.org/parse-git-config/-/parse-git-config-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/parse-git-config/-/parse-git-config-2.0.3.tgz#6fb840d4a956e28b971c97b33a5deb73a6d5b6bb" integrity sha512-Js7ueMZOVSZ3tP8C7E3KZiHv6QQl7lnJ+OkbxoaFazzSa2KyEHqApfGbU3XboUgUnq4ZuUmskUpYKTNx01fm5A== dependencies: expand-tilde "^2.0.2" @@ -1923,50 +1331,43 @@ parse-git-config@^2.0.3: parse-github-url@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== -parse-link-header@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz" - integrity sha1-vt/g0hGK64S+deewJUGeyKYRQKc= +parse-link-header@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parse-link-header/-/parse-link-header-2.0.0.tgz#949353e284f8aa01f2ac857a98f692b57733f6b7" + integrity sha512-xjU87V0VyHZybn2RrCX5TIFGxTVZE6zqqZWMPlIKiSKuWh/X5WZdt+w1Ki1nXB+8L/KtL+nZ4iq+sfI6MrhhMw== dependencies: xtend "~4.0.1" parse-passwd@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +picomatch@^2.2.3: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pinpoint@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/pinpoint/-/pinpoint-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/pinpoint/-/pinpoint-1.1.0.tgz#0cf7757a6977f1bf7f6a32207b709e377388e874" integrity sha1-DPd1eml38b9/ajIge3CeN3OI6HQ= -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +prettyjson@^1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.5.tgz#ef3cfffcc70505c032abc59785884b4027031835" + integrity sha512-rksPWtoZb2ZpT5OVgtmy0KHVM+Dca3iVwWY9ifwhcexfjebtgjg3wmrUt9PvJ59XIYBcknQeYHD8IAnVlh9lAw== + dependencies: + colors "1.4.0" + minimist "^1.2.0" process-nextick-args@~2.0.0: version "2.0.1" @@ -1997,18 +1398,20 @@ protobufjs@^6.10.0: "@types/node" ">=13.7.0" long "^4.0.0" -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== +query-string@^6.8.2: + version "6.14.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" + integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" readable-stream@~2.3.6: version "2.3.7" @@ -2024,62 +1427,29 @@ readable-stream@~2.3.6: util-deprecate "~1.0.1" readline-sync@^1.4.9: - version "1.4.9" - resolved "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.9.tgz" - integrity sha1-PtqOZfI80qF+YTAbHwADOWr17No= + version "1.4.10" + resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.10.tgz#41df7fbb4b6312d673011594145705bf56d8873b" + integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw== -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz" - integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= require-from-string@^2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -rfc6902@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/rfc6902/-/rfc6902-3.0.1.tgz" - integrity sha512-a4t5OlaOgAejBg48/lkyQMcV6EWpljjSjmXAtSXLhw83x1OhlcVGLMLf//GoUSpHsWt8x/7oxaf5FEGM9QH/iQ== +retry@0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= rimraf@^2.7.1: version "2.7.1" @@ -2100,18 +1470,16 @@ safe-buffer@>=5.1.0: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== -safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.0.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - selenium-webdriver@4.0.0-beta.1: version "4.0.0-beta.1" resolved "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.0.0-beta.1.tgz" @@ -2132,140 +1500,25 @@ selenium-webdriver@^4.0.0-beta.2: tmp "^0.2.1" ws ">=7.4.6" -semver@^5.5.0: +semver@^5.6.0: version "5.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - set-immediate-shim@~1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== -set-value@^2.0.0: +strict-uri-encode@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= string-width@^4.1.0, string-width@^4.2.0: version "4.2.2" @@ -2283,20 +1536,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz" @@ -2304,21 +1543,16 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - supports-color@^5.0.0, supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-hyperlinks@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz#71daedf36cc1060ac5100c351bb3da48c29c0ef7" integrity sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw== dependencies: has-flag "^2.0.0" @@ -2331,81 +1565,58 @@ tmp@^0.2.1: dependencies: rimraf "^3.0.0" -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: - kind-of "^3.0.2" + is-number "^7.0.0" -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" + punycode "^2.1.0" -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= tslib@^2.1.0: version "2.3.1" resolved "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= +universal-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universal-url/-/universal-url-2.0.0.tgz#35e7fc2c3374804905cee67ea289ed3a47669809" + integrity sha512-3DLtXdm/G1LQMCnPj+Aw7uDoleQttNHp2g5FnNQKR6cP6taNWS1b/Ehjjx4PVyvejKi3TJyu8iBraKM4q3JQPg== dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -universal-user-agent@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz" - integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== - dependencies: - os-name "^3.1.0" + hasurl "^1.0.0" + whatwg-url "^7.0.0" universal-user-agent@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/use/-/use-3.1.1.tgz" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz" @@ -2425,32 +1636,22 @@ whatwg-fetch@2.0.4: resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz" integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= dependencies: - isexe "^2.0.0" + tr46 "~0.0.3" + webidl-conversions "^3.0.0" -windows-release@^3.1.0: - version "3.3.3" - resolved "https://registry.npmjs.org/windows-release/-/windows-release-3.3.3.tgz" - integrity sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg== +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== dependencies: - execa "^1.0.0" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" wrap-ansi@^7.0.0: version "7.0.0" @@ -2463,7 +1664,7 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= ws@>=7.4.6: @@ -2477,55 +1678,20 @@ ws@^7.3.1: integrity sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w== xtend@~4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^5.0.5: version "5.0.8" resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - dependencies: - camelcase "^4.1.0" - -yargs@^11.0.0: - version "11.1.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" - yargs@^16.1.1: version "16.2.0" resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" From 65df2f30a5f20d2b1dbdc9b8cb7797c41b7f491e Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Wed, 2 Feb 2022 09:16:25 -0800 Subject: [PATCH 025/109] Support view allocation counters with Venice Summary: Venice uses `SurfaceHandler` abstraction which start/stops surfaces independently from `Binding.cpp`, so previous `onSurfaceStart/Stop` callback would not be triggered. On Android, each surface is used exactly once at the time of writing, so we can use `register/unregister` callbacks to create/clear remembered views for the surface. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D33845685 fbshipit-source-id: 8de4204c7498176fdbe8d44fbc5f2e4079212a1c --- .../com/facebook/react/fabric/jni/Binding.cpp | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index d22dfb384e..26eacc5cae 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -266,13 +266,37 @@ void Binding::stopSurface(jint surfaceId) { } void Binding::registerSurface(SurfaceHandlerBinding *surfaceHandlerBinding) { + auto const &surfaceHandler = surfaceHandlerBinding->getSurfaceHandler(); auto scheduler = getScheduler(); - scheduler->registerSurface(surfaceHandlerBinding->getSurfaceHandler()); + if (!scheduler) { + LOG(ERROR) << "Binding::registerSurface: scheduler disappeared"; + return; + } + scheduler->registerSurface(surfaceHandler); + + auto mountingManager = + verifyMountingManager("FabricUIManagerBinding::registerSurface"); + if (!mountingManager) { + return; + } + mountingManager->onSurfaceStart(surfaceHandler.getSurfaceId()); } void Binding::unregisterSurface(SurfaceHandlerBinding *surfaceHandlerBinding) { + auto const &surfaceHandler = surfaceHandlerBinding->getSurfaceHandler(); auto scheduler = getScheduler(); - scheduler->unregisterSurface(surfaceHandlerBinding->getSurfaceHandler()); + if (!scheduler) { + LOG(ERROR) << "Binding::unregisterSurface: scheduler disappeared"; + return; + } + scheduler->unregisterSurface(surfaceHandler); + + auto mountingManager = + verifyMountingManager("FabricUIManagerBinding::unregisterSurface"); + if (!mountingManager) { + return; + } + mountingManager->onSurfaceStop(surfaceHandler.getSurfaceId()); } void Binding::setConstraints( From 848ba6fb1db81bbb44efd373af9e81f31f227aef Mon Sep 17 00:00:00 2001 From: Lorenzo Sciandra Date: Wed, 2 Feb 2022 09:34:04 -0800 Subject: [PATCH 026/109] chore(deps): bump CLI version to 7 to get new version of Metro (67) (#33019) Summary: This PR bumps the CLI dependency to v7, which is a new version made so that we can obtain the new version of Metro via https://github.com/react-native-community/cli/commit/b53ba5b0d6091a11985e3f6821a085e5d36cf08f After merging this, we should cherry pick this commit in the 0.68 branch and do a new RC ## Changelog [General] [Changed] - Bump RN CLI to v7, and Metro to 67 Pull Request resolved: https://github.com/facebook/react-native/pull/33019 Test Plan: Tried some quick local testing with test-manual-e2e, seems to be working fine: Screenshot 2022-02-01 at 16 38 01 Reviewed By: cortinico Differential Revision: D33918810 Pulled By: ShikaSD fbshipit-source-id: 28ff52c4c89b5ca2390527aa6c66fb2ce236316e --- package.json | 6 +- yarn.lock | 805 +++++++++++++++++++++++++-------------------------- 2 files changed, 397 insertions(+), 414 deletions(-) diff --git a/package.json b/package.json index b1a5cc3b9a..644cc18c67 100644 --- a/package.json +++ b/package.json @@ -92,9 +92,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^27.0.1", - "@react-native-community/cli": "^6.0.0", - "@react-native-community/cli-platform-android": "^6.0.0", - "@react-native-community/cli-platform-ios": "^6.0.0", + "@react-native-community/cli": "^7.0.1", + "@react-native-community/cli-platform-android": "^7.0.1", + "@react-native-community/cli-platform-ios": "^7.0.1", "@react-native/assets": "1.0.0", "@react-native/normalize-color": "2.0.0", "@react-native/polyfills": "2.0.0", diff --git a/yarn.lock b/yarn.lock index 167ed739d4..5f26ac37a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1014,10 +1014,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^27.0.1": - version "27.0.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.1.tgz#631738c942e70045ebbf42a3f9b433036d3845e4" - integrity sha512-8A25RRV4twZutsx2D+7WphnDsp7If9Yu6ko0Gxwrwv8BiWESFzka34+Aa2kC8w9xewt7SDuCUSZ6IiAFVj3PRg== +"@jest/types@^27.0.1", "@jest/types@^27.4.2": + version "27.4.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.4.2.tgz#96536ebd34da6392c2b7c7737d693885b5dd44a5" + integrity sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1046,31 +1046,63 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@react-native-community/cli-debugger-ui@^6.0.0-rc.0": - version "6.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-6.0.0-rc.0.tgz#774378626e4b70f5e1e2e54910472dcbaffa1536" - integrity sha512-achYcPPoWa9D02C5tn6TBzjeY443wQTyx37urptc75JpZ7gR5YHsDyIEEWa3DDYp1va9zx/iGg+uZ/hWw07GAw== +"@react-native-community/cli-config@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-7.0.1.tgz#81bf88a5c0eb21c9b0fc1f825372699c375a45a0" + integrity sha512-HGBnytnZzcT+24qAshksGpmPAXFPsKL6g9FNU7TIM9s23Hl4SXqNVEf6wj6XHXKgg8pfjXK3Lwf9IBEnZzqA/g== + dependencies: + "@react-native-community/cli-tools" "^7.0.1" + cosmiconfig "^5.1.0" + deepmerge "^3.2.0" + glob "^7.1.3" + joi "^17.2.1" + +"@react-native-community/cli-debugger-ui@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-7.0.1.tgz#2834617ee57802559c20a0a75ad7eeeef73ff422" + integrity sha512-N4ASQY5VbRiiyhfAWhvURavANtFd7JPJFpXd59hsZxvaFEDB2L2HhVkwbw6BSbVUrYDuAWFQGx3S10L+MCHAjQ== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-hermes@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-6.0.0.tgz#a29c403fccd22ec99805887669096d60346962ff" - integrity sha512-YUX8MEmDsEYdFuo/juCZUUDPPRQ/su3K/SPcSVmv7AIAwO/7ItuQ7+58PRI914XNvnRmY1GNVHKfWhUoNXMxvA== +"@react-native-community/cli-doctor@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-7.0.1.tgz#36ba3da91a358b0c38fd199782db2d857fee16d0" + integrity sha512-y5RBAuBiOwiiFfj9N/iuj6PZ3c5j68LE8XTQdhZJE+qTuSxWXQrdpFwL9Nc9KIk3bBxC72uBfRFGxa/mLZGYMw== dependencies: - "@react-native-community/cli-platform-android" "^6.0.0" - "@react-native-community/cli-tools" "^6.0.0-rc.0" + "@react-native-community/cli-config" "^7.0.1" + "@react-native-community/cli-tools" "^7.0.1" chalk "^3.0.0" + command-exists "^1.2.8" + envinfo "^7.7.2" + execa "^1.0.0" + hermes-profile-transformer "^0.0.6" + ip "^1.1.5" + node-stream-zip "^1.9.1" + ora "^5.4.1" + prompts "^2.4.0" + semver "^6.3.0" + strip-ansi "^5.2.0" + sudo-prompt "^9.0.0" + wcwidth "^1.0.1" + +"@react-native-community/cli-hermes@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-7.0.1.tgz#d6229bfc6da9ee2fd71a5e4ef86e92a4690bde79" + integrity sha512-NzKxW8LzNr3ttD5E479HCpSLfcpdv0SwpsIBsDCWhuDmGW5NXo8Qdu5/plVWZJ1CVBWkVFeVHIlKs0pov7GlOw== + dependencies: + "@react-native-community/cli-platform-android" "^7.0.1" + "@react-native-community/cli-tools" "^7.0.1" + chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-6.0.0.tgz#004f98e9a5e8adf07aea552a140958e0bbd7e1b6" - integrity sha512-yXyrM2elKM8/thf1d8EMMm0l0KdeWmIMhWZzCoRpCIQoUuVtiCEMyrZF+aufvNvy74soKiCFeAmGNI8LPk2hzg== +"@react-native-community/cli-platform-android@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-7.0.1.tgz#d165897edf401f9bceff1f361ef446528133cb52" + integrity sha512-nOr0aMkxAymCnbtsQwXBlyoRN2Y+IzC7Qz5T+/zyWwEbTY8SKQI8uV+8+qttUvzSvuXa2PeXsTWluuliOS8KCw== dependencies: - "@react-native-community/cli-tools" "^6.0.0-rc.0" - chalk "^3.0.0" + "@react-native-community/cli-tools" "^7.0.1" + chalk "^4.1.2" execa "^1.0.0" fs-extra "^8.1.0" glob "^7.1.3" @@ -1080,95 +1112,96 @@ slash "^3.0.0" xmldoc "^1.1.2" -"@react-native-community/cli-platform-ios@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-6.0.0.tgz#885bd363d76bf422567d007f5e67aa9a67a1296a" - integrity sha512-+f6X4jDGuPpVcY2NsVAstnId4stnG7EvzLUhs7FUpMFjzss9c1ZJhsqQeKikOtzZbwLzFrpki/QrTK79ur7xSg== +"@react-native-community/cli-platform-ios@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-7.0.1.tgz#1c27af85229246b7a528e97f093e38859896cc93" + integrity sha512-PLRIbzrCzSedmpjuFtQqcqUD45G8q7sEciI1lf5zUbVMXqjIBwJWS7iz8235PyWwj8J4MNHohLC+oyRueFtbGg== dependencies: - "@react-native-community/cli-tools" "^6.0.0-rc.0" - chalk "^3.0.0" + "@react-native-community/cli-tools" "^7.0.1" + chalk "^4.1.2" + execa "^1.0.0" glob "^7.1.3" js-yaml "^3.13.1" lodash "^4.17.15" + ora "^5.4.1" plist "^3.0.2" - xcode "^2.0.0" + xcode "^3.0.0" -"@react-native-community/cli-server-api@^6.0.0-rc.0": - version "6.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-6.0.0-rc.0.tgz#c0b4e65daab020a2b45f2c4df402942b638955a2" - integrity sha512-shPG9RXXpDYeluoB3tzaYU9Ut0jTvZ3osatLLUJkWjbRjFreK9zUcnoFDDrsVT6fEoyeBftp5DSa+wCUnPmcJA== +"@react-native-community/cli-plugin-metro@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-7.0.1.tgz#c7a04651fe96dbb4d0534cd9efef1b044d899dfa" + integrity sha512-kM6vN5/38e9ldl30fUSVEB1sdB3a9W11N/HdU+7I3ujWsPdqu6DRiAaUV/L6y6az/QFBHKwAK0EZvROhY7G0vA== dependencies: - "@react-native-community/cli-debugger-ui" "^6.0.0-rc.0" - "@react-native-community/cli-tools" "^6.0.0-rc.0" + "@react-native-community/cli-server-api" "^7.0.1" + "@react-native-community/cli-tools" "^7.0.1" + chalk "^4.1.2" + metro "^0.67.0" + metro-config "^0.67.0" + metro-core "^0.67.0" + metro-react-native-babel-transformer "^0.67.0" + metro-resolver "^0.67.0" + metro-runtime "^0.67.0" + readline "^1.3.0" + +"@react-native-community/cli-server-api@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-7.0.1.tgz#8fde9d615cf2cb296d0bed2933cf38d36af6f539" + integrity sha512-kquJcQ2PcrwYmbHakOxFsNIylM1tZM/+n7Wgy65dXMafA0cpEPDsOEdRHx2wfsqIavoxNLMliCu3NX5HM9DP2Q== + dependencies: + "@react-native-community/cli-debugger-ui" "^7.0.1" + "@react-native-community/cli-tools" "^7.0.1" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.0" - nocache "^2.1.0" + nocache "^3.0.1" pretty-format "^26.6.2" serve-static "^1.13.1" ws "^1.1.0" -"@react-native-community/cli-tools@^6.0.0-rc.0": - version "6.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-6.0.0-rc.0.tgz#d81c4c792db583ab42458fe8cc27ebf0b55e1660" - integrity sha512-N31BhNacTe0UGYQxUx0WHWPKnF4pBe62hNRV9WNJdWqVl4TP45T1Fd/7ziiosfalIar+tOo9Sk0Pqq48x1+wNw== +"@react-native-community/cli-tools@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-7.0.1.tgz#73790d6ca2825e42a70a770c1b403a6777e690d6" + integrity sha512-0xra4hKNA5PR2zYVXsDMNiXMGaDNoNRYMY6eTP2aVIxQbqIcVMDWSyCA8wMWX5iOpMWg0cZGaQ6a77f3Rlb34g== dependencies: - chalk "^3.0.0" + appdirsjs "^1.2.4" + chalk "^4.1.2" lodash "^4.17.15" mime "^2.4.1" node-fetch "^2.6.0" open "^6.2.0" - shell-quote "1.6.1" + ora "^5.4.1" + semver "^6.3.0" + shell-quote "^1.7.3" -"@react-native-community/cli-types@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-6.0.0.tgz#90269fbdc7229d5e3b8f2f3e029a94083551040d" - integrity sha512-K493Fk2DMJC0ZM8s8gnfseKxGasIhuDaCUDeLZcoCSFlrjKEuEs1BKKEJiev0CARhKEXKOyyp/uqYM9nWhisNw== - dependencies: - ora "^3.4.0" +"@react-native-community/cli-types@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-7.0.1.tgz#c3de43d45866804c5c15251a014402da5853b7b1" + integrity sha512-8QedX5vagXoKFLzoyAEGeg2aOzNghjoXFP0Tm6LszdnFuNee03DLkGP7cKCEY+gtuhXLhdfd6XmK+ROgWqBEMQ== -"@react-native-community/cli@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-6.0.0.tgz#5a8d42f7fddd569eefa3233d1fd84b3ed4a66074" - integrity sha512-wTbdpai58WzUBrw8lNbF/cSzX3pOWz+y+d46ip3M3Abd5yHNRvhuejRMVQC1o9luOM+ESJa4imYSbVdh7y5g+w== +"@react-native-community/cli@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-7.0.1.tgz#6ece01540b855e0c5f1d24db43cb4c48854301c7" + integrity sha512-FjF+jszHNcmfzKvZ6Y9cp6jAuigc+JvyKmgtB5syj2nkjKNUMLY7gFkFV6ULAzLrg+IasMIImVSkN39+L1Pa9g== dependencies: - "@react-native-community/cli-debugger-ui" "^6.0.0-rc.0" - "@react-native-community/cli-hermes" "^6.0.0" - "@react-native-community/cli-server-api" "^6.0.0-rc.0" - "@react-native-community/cli-tools" "^6.0.0-rc.0" - "@react-native-community/cli-types" "^6.0.0" - appdirsjs "^1.2.4" - chalk "^3.0.0" - command-exists "^1.2.8" + "@react-native-community/cli-config" "^7.0.1" + "@react-native-community/cli-debugger-ui" "^7.0.1" + "@react-native-community/cli-doctor" "^7.0.1" + "@react-native-community/cli-hermes" "^7.0.1" + "@react-native-community/cli-plugin-metro" "^7.0.1" + "@react-native-community/cli-server-api" "^7.0.1" + "@react-native-community/cli-tools" "^7.0.1" + "@react-native-community/cli-types" "^7.0.1" + chalk "^4.1.2" commander "^2.19.0" - cosmiconfig "^5.1.0" - deepmerge "^3.2.0" - envinfo "^7.7.2" execa "^1.0.0" find-up "^4.1.0" fs-extra "^8.1.0" - glob "^7.1.3" graceful-fs "^4.1.3" - joi "^17.2.1" leven "^3.1.0" lodash "^4.17.15" - metro "^0.66.1" - metro-config "^0.66.1" - metro-core "^0.66.1" - metro-react-native-babel-transformer "^0.66.1" - metro-resolver "^0.66.1" - metro-runtime "^0.66.1" minimist "^1.2.0" - mkdirp "^0.5.1" - node-stream-zip "^1.9.1" - ora "^3.4.0" - pretty-format "^26.6.2" prompts "^2.4.0" semver "^6.3.0" - serve-static "^1.13.1" - strip-ansi "^5.2.0" - sudo-prompt "^9.0.0" - wcwidth "^1.0.1" "@reactions/component@^2.0.2": version "2.0.2" @@ -1544,11 +1577,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-filter@~0.0.0: - version "0.0.1" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" - integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= - array-includes@^3.1.1, array-includes@^3.1.3: version "3.1.4" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" @@ -1560,16 +1588,6 @@ array-includes@^3.1.1, array-includes@^3.1.3: get-intrinsic "^1.1.1" is-string "^1.0.7" -array-map@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" - integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= - -array-reduce@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" - integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -1837,7 +1855,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.1.2, base64-js@^1.5.1: +base64-js@^1.1.2, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -1862,24 +1880,33 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -big-integer@^1.6.7: - version "1.6.36" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" - integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== +big-integer@1.6.x: + version "1.6.51" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== -bplist-creator@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.7.tgz#37df1536092824b87c42f957b01344117372ae45" - integrity sha1-N98VNgkoJLh8QvlXsBNEEXNyrkU= +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== dependencies: - stream-buffers "~2.2.0" + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" -bplist-parser@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.1.1.tgz#d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6" - integrity sha1-1g1dzCDLptx+HymbNdPh+V2vuuY= +bplist-creator@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.1.0.tgz#018a2d1b587f769e379ef5519103730f8963ba1e" + integrity sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg== dependencies: - big-integer "^1.6.7" + stream-buffers "2.2.x" + +bplist-parser@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.3.0.tgz#ba50666370f61bbf94881636cd9f7d23c5286090" + integrity sha512-zgmaRvT6AN1JpPPV+S0a1/FAtoxSreYDccZGIqEMSvZl9DMe70mJ7MFzpxa1X+gHVdkToE2haRUHHMiW1OdejA== + dependencies: + big-integer "1.6.x" brace-expansion@^1.1.7: version "1.1.11" @@ -1940,6 +1967,14 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -2019,7 +2054,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2059,6 +2094,11 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +ci-info@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" + integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== + cjs-module-lexer@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" @@ -2083,13 +2123,6 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -2097,10 +2130,10 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7" - integrity sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA== +cli-spinners@^2.5.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== cli-width@^3.0.0: version "3.0.0" @@ -3211,10 +3244,10 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== +fsevents@^2.1.2, fsevents@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" @@ -3430,11 +3463,6 @@ hermes-estree@0.5.0: resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.5.0.tgz#36432a2b12f01b217244da098924efdfdfc12327" integrity sha512-1h8rvG23HhIR5K6Kt0e5C7BC72J1Ath/8MmSta49vxXp/j6wl7IMHvIRFYBQr35tWnQY97dSGR2uoAJ5pHUQkg== -hermes-parser@0.4.7: - version "0.4.7" - resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.4.7.tgz#410f5129d57183784d205a0538e6fbdcf614c9ea" - integrity sha512-jc+zCtXbtwTiXoMAoXOHepxAaGVFIp89wwE9qcdwnMd/uGVEtPoY8FaFSsx0ThPvyKirdR2EsIIDVrpbSXz1Ag== - hermes-parser@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.5.0.tgz#8b678dd8b29a08b57cbaf60adba4896494c59a53" @@ -3497,6 +3525,11 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -3549,7 +3582,12 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= @@ -3748,6 +3786,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-negative-zero@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" @@ -3826,6 +3869,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-weakref@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" @@ -4033,7 +4081,7 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.5.2, jest-haste-map@^26.6.2: +jest-haste-map@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== @@ -4054,6 +4102,26 @@ jest-haste-map@^26.5.2, jest-haste-map@^26.6.2: optionalDependencies: fsevents "^2.1.2" +jest-haste-map@^27.3.1: + version "27.4.6" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.4.6.tgz#c60b5233a34ca0520f325b7e2cc0a0140ad0862a" + integrity sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ== + dependencies: + "@jest/types" "^27.4.2" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^27.4.0" + jest-serializer "^27.4.0" + jest-util "^27.4.2" + jest-worker "^27.4.6" + micromatch "^4.0.4" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.3.2" + jest-jasmine2@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" @@ -4140,6 +4208,11 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== +jest-regex-util@^27.4.0: + version "27.4.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.4.0.tgz#e4c45b52653128843d07ad94aec34393ea14fbca" + integrity sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg== + jest-resolve-dependencies@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" @@ -4230,6 +4303,14 @@ jest-serializer@^26.6.2: "@types/node" "*" graceful-fs "^4.2.4" +jest-serializer@^27.4.0: + version "27.4.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.4.0.tgz#34866586e1cae2388b7d12ffa2c7819edef5958a" + integrity sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ== + dependencies: + "@types/node" "*" + graceful-fs "^4.2.4" + jest-snapshot@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" @@ -4264,6 +4345,18 @@ jest-util@^26.6.2: is-ci "^2.0.0" micromatch "^4.0.2" +jest-util@^27.4.2: + version "27.4.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.4.2.tgz#ed95b05b1adfd761e2cda47e0144c6a58e05a621" + integrity sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA== + dependencies: + "@jest/types" "^27.4.2" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.4" + picomatch "^2.2.3" + jest-validate@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab" @@ -4310,6 +4403,15 @@ jest-worker@^26.0.0, jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" +jest-worker@^27.4.6: + version "27.4.6" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.4.6.tgz#5d2d93db419566cb680752ca0792780e71b3273e" + integrity sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" @@ -4476,11 +4578,6 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -4628,12 +4725,13 @@ log-driver@^1.2.7: resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -log-symbols@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: - chalk "^2.0.1" + chalk "^4.1.0" + is-unicode-supported "^0.1.0" logkitty@^0.7.1: version "0.7.1" @@ -4702,20 +4800,6 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -metro-babel-register@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.66.2.tgz#c6bbe36c7a77590687ccd74b425dc020d17d05af" - integrity sha512-3F+vsVubUPJYKfVMeol8/7pd8CC287Rw92QYzJD8LEmI980xcgwMUEVBZ0UIAUwlLgiJG/f4Mwhuji2EeBXrPg== - dependencies: - "@babel/core" "^7.14.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.0.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/register" "^7.0.0" - escape-string-regexp "^1.0.5" - metro-babel-register@0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.67.0.tgz#03cb70cef59547cc43ab01ae187c046804175245" @@ -4732,16 +4816,6 @@ metro-babel-register@0.67.0: babel-plugin-replace-ts-export-assignment "^0.0.2" escape-string-regexp "^1.0.5" -metro-babel-transformer@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.66.2.tgz#fce0a3e314d28a5e7141c135665e1cc9b8e7ce86" - integrity sha512-aJ/7fc/Xkofw8Fqa51OTDhBzBz26mmpIWrXAZcPdQ8MSTt883EWncxeCEjasc79NJ89BRi7sOkkaWZo2sXlKvw== - dependencies: - "@babel/core" "^7.14.0" - hermes-parser "0.4.7" - metro-source-map "0.66.2" - nullthrows "^1.1.1" - metro-babel-transformer@0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.67.0.tgz#42fe82af9953e5c62d9a8d7d544eb7be9020dd18" @@ -4752,109 +4826,63 @@ metro-babel-transformer@0.67.0: metro-source-map "0.67.0" nullthrows "^1.1.1" -metro-cache-key@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.66.2.tgz#d6463d2a53e887a38419d523962cc24ea0e780b4" - integrity sha512-WtkNmRt41qOpHh1MkNA4nLiQ/m7iGL90ysSKD+fcLqlUnOBKJptPQm0ZUv8Kfqk18ddWX2KmsSbq+Sf3I6XohQ== +metro-cache-key@0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.67.0.tgz#4df6a73cced199e1bddd0f3454bb931a27141eeb" + integrity sha512-FNJe5Rcb2uzY6G6tsqCf0RV4t2rCeX6vSHBxmP7k+4aI4NqX4evtPI0K82r221nBzm5DqNWCURZ0RYUT6jZMGA== -metro-cache@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.66.2.tgz#e0af4e0a319898f7d42a980f7ee5da153fcfd019" - integrity sha512-5QCYJtJOHoBSbL3H4/Fpl36oA697C3oYHqsce+Hk/dh2qtODUGpS3gOBhvP1B8iB+H8jJMyR75lZq129LJEsIQ== +metro-cache@0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.67.0.tgz#928db5742542719677468c4d22ea29b71c7ec8fc" + integrity sha512-IY5dXiR76L75b2ue/mv+9vW8g5hdQJU6YEe81lj6gTSoUrhcONT0rzY+Gh5QOS2Kk6z9utZQMvd9PRKL9/635A== dependencies: - metro-core "0.66.2" + metro-core "0.67.0" mkdirp "^0.5.1" rimraf "^2.5.4" -metro-config@0.66.2, metro-config@^0.66.1: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.66.2.tgz#e365acdb66ad0cda0182b9c9910760a97ee4293b" - integrity sha512-0C+PrKKIBNNzLZUKN/8ZDJS2U5FLMOTXDWbvBHIdqb6YXz8WplXR2+xlSlaSCCi5b+GR7cWFWUNeKA4GQS1/AQ== +metro-config@0.67.0, metro-config@^0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.67.0.tgz#5507d3b295bd10c87bd13dbe5a3033a357418786" + integrity sha512-ThAwUmzZwTbKyyrIn2bKIcJDPDBS0LKAbqJZQioflvBGfcgA21h3fdL3IxRmvCEl6OnkEWI0Tn1Z9w2GLAjf2g== dependencies: cosmiconfig "^5.0.5" jest-validate "^26.5.2" - metro "0.66.2" - metro-cache "0.66.2" - metro-core "0.66.2" - metro-runtime "0.66.2" + metro "0.67.0" + metro-cache "0.67.0" + metro-core "0.67.0" + metro-runtime "0.67.0" -metro-core@0.66.2, metro-core@^0.66.1: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.66.2.tgz#ead776a17b3e5a307e6dc22259db30bf5c7e8490" - integrity sha512-JieLZkef/516yxXYvQxWnf3OWw5rcgWRy76K8JV/wr/i8LGVGulPAXlIi445/QZzXVydzRVASKAEVqyxM5F4mA== +metro-core@0.67.0, metro-core@^0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.67.0.tgz#75066e11b4df220992abf9cd6200279dd87876c8" + integrity sha512-TOa/ShE1bUq83fGNfV6rFwyfZ288M8ydmWN3g9C2OW8emOHLhJslYD/SIU4DhDkP/99yaJluIALdZ2g0+pCrvQ== dependencies: - jest-haste-map "^26.5.2" + jest-haste-map "^27.3.1" lodash.throttle "^4.1.1" - metro-resolver "0.66.2" + metro-resolver "0.67.0" -metro-hermes-compiler@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-hermes-compiler/-/metro-hermes-compiler-0.66.2.tgz#30290748f83805faa601aa487632444915795823" - integrity sha512-nCVL1g9uR6vrw5+X1wjwZruRyMkndnzGRMqjqoljf+nGEqBTD607CR7elXw4fMWn/EM+1y0Vdq5altUu9LdgCA== +metro-hermes-compiler@0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-hermes-compiler/-/metro-hermes-compiler-0.67.0.tgz#9c1340f1882fbf535145868d0d28211ca15b0477" + integrity sha512-X5Pr1jC8/kO6d1EBDJ6yhtuc5euHX89UDNv8qdPJHAET03xfFnlojRPwOw6il2udAH20WLBv+F5M9VY+58zspQ== -metro-inspector-proxy@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.66.2.tgz#a83c76bd2f2fd7b9240be92acf9a8b1d1404547a" - integrity sha512-gnLc9121eznwP0iiA9tCBW8qZjwIsCgwHWMF1g1Qaki9le9tzeJv3dK4/lFNGxyfSaLO7vahQEhsEYsiRnTROg== +metro-inspector-proxy@0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.67.0.tgz#22b360a837b07e9e2bc87a71af6154dd8fcc02a5" + integrity sha512-5Ubjk94qpNaU3OT2IZa4/dec09bauic1hzWms4czorBzDenkp4kYXG9/aWTmgQLtCk92H3Q8jKl1PQRxUSkrOQ== dependencies: connect "^3.6.5" debug "^2.2.0" - ws "^1.1.5" + ws "^7.5.1" yargs "^15.3.1" -metro-minify-uglify@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.66.2.tgz#6061dbee4f61e6d5bb3c100e4379ff6f2e16e42b" - integrity sha512-7TUK+L5CmB5x1PVnFbgmjzHW4CUadq9H5jgp0HfFoWT1skXAyEsx0DHkKDXwnot0khnNhBOEfl62ctQOnE110Q== +metro-minify-uglify@0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.67.0.tgz#28a77dbd78d9e558dba8c2f31c2b9c6f939df966" + integrity sha512-4CmM5b3MTAmQ/yFEfsHOhD2SuBObB2YF6PKzXZc4agUsQVVtkrrNElaiWa8w26vrTzA9emwcyurxMf4Nl3lYPQ== dependencies: uglify-es "^3.1.9" -metro-react-native-babel-preset@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.66.2.tgz#fddebcf413ad4ea617d4f47f7c1da401052de734" - integrity sha512-H/nLBAz0MgfDloSe1FjyH4EnbokHFdncyERvLPXDACY3ROVRCeUyFNo70ywRGXW2NMbrV4H7KUyU4zkfWhC2HQ== - dependencies: - "@babel/core" "^7.14.0" - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-export-default-from" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.0.0" - "@babel/plugin-syntax-dynamic-import" "^7.0.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.2.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-exponentiation-operator" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/plugin-transform-object-assign" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" - "@babel/plugin-transform-react-display-name" "^7.0.0" - "@babel/plugin-transform-react-jsx" "^7.0.0" - "@babel/plugin-transform-react-jsx-self" "^7.0.0" - "@babel/plugin-transform-react-jsx-source" "^7.0.0" - "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-runtime" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.5.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - "@babel/template" "^7.0.0" - react-refresh "^0.4.0" - metro-react-native-babel-preset@0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.67.0.tgz#53aec093f53a09b56236a9bb534d76658efcbec7" @@ -4901,7 +4929,7 @@ metro-react-native-babel-preset@0.67.0: "@babel/template" "^7.0.0" react-refresh "^0.4.0" -metro-react-native-babel-transformer@0.67.0: +metro-react-native-babel-transformer@0.67.0, metro-react-native-babel-transformer@^0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.67.0.tgz#756d32eb3c05cab3d72fcb1700f8fd09322bb07f" integrity sha512-P0JT09n7T01epUtgL9mH6BPat3xn4JjBakl4lWHdL61cvEGcrxuIom1eoFFKkgU/K5AVLU4aCAttHS7nSFCcEQ== @@ -4914,50 +4942,18 @@ metro-react-native-babel-transformer@0.67.0: metro-source-map "0.67.0" nullthrows "^1.1.1" -metro-react-native-babel-transformer@^0.66.1: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.66.2.tgz#768f341e7c3d3d1c38189799c9884b90d1c32eb7" - integrity sha512-z1ab7ihIT0pJrwgi9q2IH+LcW/xUWMQ0hH+Mrk7wbKQB0RnJdXFoxphrfoVHBHMUu+TBPetUcEkKawkK1e7Cng== - dependencies: - "@babel/core" "^7.14.0" - babel-preset-fbjs "^3.4.0" - hermes-parser "0.4.7" - metro-babel-transformer "0.66.2" - metro-react-native-babel-preset "0.66.2" - metro-source-map "0.66.2" - nullthrows "^1.1.1" - -metro-resolver@0.66.2, metro-resolver@^0.66.1: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.66.2.tgz#f743ddbe7a12dd137d1f7a555732cafcaea421f8" - integrity sha512-pXQAJR/xauRf4kWFj2/hN5a77B4jLl0Fom5I3PHp6Arw/KxSBp0cnguXpGLwNQ6zQC0nxKCoYGL9gQpzMnN7Hw== +metro-resolver@0.67.0, metro-resolver@^0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.67.0.tgz#8143c716f77e468d1d42eca805243706eb349959" + integrity sha512-d2KS/zAyOA/z/q4/ff41rAp+1txF4H6qItwpsls/RHStV2j6PqgRHUzq/3ga+VIeoUJntYJ8nGW3+3qSrhFlig== dependencies: absolute-path "^0.0.0" -metro-runtime@0.66.2, metro-runtime@^0.66.1: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.66.2.tgz#3409ee957b949b6c7b72ef6ed2b9af9a4f4a910e" - integrity sha512-vFhKBk2ot9FS4b+2v0OTa/guCF/QDAOJubY0CNg7PzCS5+w4y3IvZIcPX4SSS1t8pYEZBLvtdtTDarlDl81xmg== - -metro-runtime@0.67.0: +metro-runtime@0.67.0, metro-runtime@^0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.67.0.tgz#a8888dfd06bcebbac3c99dcac7cd622510dd8ee0" integrity sha512-IFtSL0JUt1xK3t9IoLflTDft82bjieSzdIJWLzrRzBMlesz8ox5bVmnpQbVQEwfYUpEOxbM3VOZauVbdCmXA7g== -metro-source-map@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.66.2.tgz#b5304a282a5d55fa67b599265e9cf3217175cdd7" - integrity sha512-038tFmB7vSh73VQcDWIbr5O1m+WXWyYafDaOy+1A/2K308YP0oj33gbEgDnZsLZDwcJ+xt1x6KUEBIzlX4YGeQ== - dependencies: - "@babel/traverse" "^7.14.0" - "@babel/types" "^7.0.0" - invariant "^2.2.4" - metro-symbolicate "0.66.2" - nullthrows "^1.1.1" - ob1 "0.66.2" - source-map "^0.5.6" - vlq "^1.0.0" - metro-source-map@0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.67.0.tgz#e28db7253b9ca688e60d5710ebdccba60b45b2df" @@ -4972,18 +4968,6 @@ metro-source-map@0.67.0: source-map "^0.5.6" vlq "^1.0.0" -metro-symbolicate@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.66.2.tgz#addd095ce5f77e73ca21ddb5dfb396ff5d4fa041" - integrity sha512-u+DeQHyAFXVD7mVP+GST/894WHJ3i/U8oEJFnT7U3P52ZuLgX8n4tMNxhqZU12RcLR6etF8143aP0Ktx1gFLEQ== - dependencies: - invariant "^2.2.4" - metro-source-map "0.66.2" - nullthrows "^1.1.1" - source-map "^0.5.6" - through2 "^2.0.1" - vlq "^1.0.0" - metro-symbolicate@0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.67.0.tgz#16729d05663d28176895244b3d932a898fca2b45" @@ -4996,10 +4980,10 @@ metro-symbolicate@0.67.0: through2 "^2.0.1" vlq "^1.0.0" -metro-transform-plugins@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.66.2.tgz#39dd044a23b1343e4f2d2ec34d08128cdf255ed4" - integrity sha512-KTvqplh0ut7oDKovvDG6yzXM02R6X+9b2oVG+qYq8Zd3aCGTi51ASx4ThCNkAHyEvCuJdYg9fxXTL+j+wvhB5w== +metro-transform-plugins@0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.67.0.tgz#6122aa4e5e5f9a767cebcc5af6fd1695666683ce" + integrity sha512-DQFoSDIJdTMPDTUlKaCNJjEXiHGwFNneAF9wDSJ3luO5gigM7t7MuSaPzF4hpjmfmcfPnRhP6AEn9jcza2Sh8Q== dependencies: "@babel/core" "^7.14.0" "@babel/generator" "^7.14.0" @@ -5007,29 +4991,29 @@ metro-transform-plugins@0.66.2: "@babel/traverse" "^7.14.0" nullthrows "^1.1.1" -metro-transform-worker@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.66.2.tgz#0a8455992132c479721accd52c9bd47deb77769e" - integrity sha512-dO4PtYOMGB7Vzte8aIzX39xytODhmbJrBYPu+zYzlDjyefJZT7BkZ0LkPIThtyJi96xWcGqi9JBSo0CeRupAHw== +metro-transform-worker@0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.67.0.tgz#5689553c25b0657aadefdf4ea2cd8dd06e18882a" + integrity sha512-29n+JdTb80ROiv/wDiBVlY/xRAF/nrjhp/Udv/XJl1DZb+x7JEiPxpbpthPhwwl+AYxVrostGB0W06WJ61hfiw== dependencies: "@babel/core" "^7.14.0" "@babel/generator" "^7.14.0" "@babel/parser" "^7.14.0" "@babel/types" "^7.0.0" babel-preset-fbjs "^3.4.0" - metro "0.66.2" - metro-babel-transformer "0.66.2" - metro-cache "0.66.2" - metro-cache-key "0.66.2" - metro-hermes-compiler "0.66.2" - metro-source-map "0.66.2" - metro-transform-plugins "0.66.2" + metro "0.67.0" + metro-babel-transformer "0.67.0" + metro-cache "0.67.0" + metro-cache-key "0.67.0" + metro-hermes-compiler "0.67.0" + metro-source-map "0.67.0" + metro-transform-plugins "0.67.0" nullthrows "^1.1.1" -metro@0.66.2, metro@^0.66.1: - version "0.66.2" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.66.2.tgz#f21759bf00995470e7577b5b88a5277963f24492" - integrity sha512-uNsISfcQ3iKKSHoN5Q+LAh0l3jeeg7ZcNZ/4BAHGsk02erA0OP+l2m+b5qYVoPptHz9Oc3KyG5oGJoTu41pWjg== +metro@0.67.0, metro@^0.67.0: + version "0.67.0" + resolved "https://registry.yarnpkg.com/metro/-/metro-0.67.0.tgz#8007a041d22de1cdb05184431c67eb7989eef6e0" + integrity sha512-DwuBGAFcAivoac/swz8Lp7Y5Bcge1tzT7T6K0nf1ubqJP8YzBUtyR4pkjEYVUzVu/NZf7O54kHSPVu1ibYzOBQ== dependencies: "@babel/code-frame" "^7.0.0" "@babel/core" "^7.14.0" @@ -5049,28 +5033,27 @@ metro@0.66.2, metro@^0.66.1: error-stack-parser "^2.0.6" fs-extra "^1.0.0" graceful-fs "^4.1.3" - hermes-parser "0.4.7" + hermes-parser "0.5.0" image-size "^0.6.0" invariant "^2.2.4" - jest-haste-map "^26.5.2" + jest-haste-map "^27.3.1" jest-worker "^26.0.0" lodash.throttle "^4.1.1" - metro-babel-register "0.66.2" - metro-babel-transformer "0.66.2" - metro-cache "0.66.2" - metro-cache-key "0.66.2" - metro-config "0.66.2" - metro-core "0.66.2" - metro-hermes-compiler "0.66.2" - metro-inspector-proxy "0.66.2" - metro-minify-uglify "0.66.2" - metro-react-native-babel-preset "0.66.2" - metro-resolver "0.66.2" - metro-runtime "0.66.2" - metro-source-map "0.66.2" - metro-symbolicate "0.66.2" - metro-transform-plugins "0.66.2" - metro-transform-worker "0.66.2" + metro-babel-transformer "0.67.0" + metro-cache "0.67.0" + metro-cache-key "0.67.0" + metro-config "0.67.0" + metro-core "0.67.0" + metro-hermes-compiler "0.67.0" + metro-inspector-proxy "0.67.0" + metro-minify-uglify "0.67.0" + metro-react-native-babel-preset "0.67.0" + metro-resolver "0.67.0" + metro-runtime "0.67.0" + metro-source-map "0.67.0" + metro-symbolicate "0.67.0" + metro-transform-plugins "0.67.0" + metro-transform-worker "0.67.0" mime-types "^2.1.27" mkdirp "^0.5.1" node-fetch "^2.2.0" @@ -5081,7 +5064,7 @@ metro@0.66.2, metro@^0.66.1: strip-ansi "^6.0.0" temp "0.8.3" throat "^5.0.0" - ws "^1.1.5" + ws "^7.5.1" yargs "^15.3.1" micromatch@^3.1.10, micromatch@^3.1.4: @@ -5133,11 +5116,6 @@ mime@^2.4.1: resolved "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -5227,10 +5205,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nocache@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/nocache/-/nocache-2.1.0.tgz#120c9ffec43b5729b1d5de88cd71aa75a0ba491f" - integrity sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q== +nocache@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/nocache/-/nocache-3.0.1.tgz#54d8b53a7e0a0aa1a288cfceab8a3cefbcde67d4" + integrity sha512-Gh39xwJwBKy0OvFmWfBs/vDO4Nl7JhnJtkqNP76OUinQz7BiMoszHYrIDHHAaqVl/QKVxCEy4ZxC/XZninu7nQ== node-dir@^0.1.17: version "0.1.17" @@ -5327,11 +5305,6 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -ob1@0.66.2: - version "0.66.2" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.66.2.tgz#8caf548202cf2688944bae47db405a08bca17a61" - integrity sha512-RFewnL/RjE0qQBOuM+2bbY96zmJPIge/aDtsiDbLSb+MOiK8CReAhBHDgL+zrA3F1hQk00lMWpUwYcep750plA== - ob1@0.67.0: version "0.67.0" resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.67.0.tgz#91f104c90641b1af8c364fc82a4b2c7d0801072d" @@ -5439,13 +5412,6 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - onetime@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" @@ -5489,16 +5455,19 @@ options@>=0.0.5: resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8= -ora@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" - integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== +ora@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== dependencies: - chalk "^2.4.2" - cli-cursor "^2.1.0" - cli-spinners "^2.0.0" - log-symbols "^2.2.0" - strip-ansi "^5.2.0" + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" wcwidth "^1.0.1" os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: @@ -5658,14 +5627,13 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -plist@^3.0.1, plist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.3.tgz#007df34c7be0e2c3dcfcf460d623e6485457857d" - integrity sha512-ghdOKN99hh1oEmAlwBmPYo4L+tSQ7O3jRpkhWqOrMz86CWotpVzMevvQ+czo7oPDpOZyA6K06Ci7QVHpoh9gaA== +plist@^3.0.2, plist@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.4.tgz#a62df837e3aed2bb3b735899d510c4f186019cbe" + integrity sha512-ksrr8y9+nXOxQB2osVNqrgvX/XQPOXaU4BQMKjYq8PvaY1U18mo+fKgBSwzK+luSyinOuPae956lSVcBwxlAMg== dependencies: base64-js "^1.5.1" xmlbuilder "^9.0.7" - xmldom "^0.6.0" posix-character-classes@^0.1.0: version "0.1.1" @@ -5854,6 +5822,15 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" +readable-stream@^3.4.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" @@ -5867,6 +5844,11 @@ readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" +readline@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/readline/-/readline-1.3.0.tgz#c580d77ef2cfc8752b132498060dc9793a7ac01c" + integrity sha1-xYDXfvLPyHUrEySYBg3JeTp6wBw= + recast@^0.20.4: version "0.20.5" resolved "https://registry.yarnpkg.com/recast/-/recast-0.20.5.tgz#8e2c6c96827a1b339c634dd232957d230553ceae" @@ -6069,14 +6051,6 @@ resolve@^2.0.0-next.3: is-core-module "^2.2.0" path-parse "^1.0.6" -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -6138,11 +6112,16 @@ rxjs@^6.6.0: dependencies: tslib "^1.9.0" -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -6307,17 +6286,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" - integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= - dependencies: - array-filter "~0.0.0" - array-map "~0.0.0" - array-reduce "~0.0.0" - jsonify "~0.0.0" - -shell-quote@^1.6.1: +shell-quote@^1.6.1, shell-quote@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== @@ -6355,14 +6324,14 @@ signedsource@^1.0.0: resolved "https://registry.yarnpkg.com/signedsource/-/signedsource-1.0.0.tgz#1ddace4981798f93bd833973803d80d52e93ad6a" integrity sha1-HdrOSYF5j5O9gzlzgD2A1S6TrWo= -simple-plist@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.0.0.tgz#bed3085633b22f371e111f45d159a1ccf94b81eb" - integrity sha512-043L2rO80LVF7zfZ+fqhsEkoJFvW8o59rt/l4ctx1TJWoTx7/jkiS1R5TatD15Z1oYnuLJytzE7gcnnBuIPL2g== +simple-plist@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.0.tgz#f451997663eafd8ea6bad353a01caf49ef186d43" + integrity sha512-uYWpeGFtZtVt2NhG4AHgpwx323zxD85x42heMJBan1qAiqqozIlaGrwrEt6kRjXWRWIXsuV1VLCvVmZan2B5dg== dependencies: - bplist-creator "0.0.7" - bplist-parser "0.1.1" - plist "^3.0.1" + bplist-creator "0.1.0" + bplist-parser "0.3.0" + plist "^3.0.4" sisteransi@^1.0.5: version "1.0.5" @@ -6566,7 +6535,7 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= -stream-buffers@~2.2.0: +stream-buffers@2.2.x: version "2.2.0" resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" integrity sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ= @@ -6623,6 +6592,13 @@ string.prototype.trimstart@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -6683,6 +6659,13 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-hyperlinks@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" @@ -7006,7 +6989,7 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -7021,6 +7004,11 @@ uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + uuid@^8.3.0: version "8.3.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" @@ -7199,7 +7187,7 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@^1.1.0, ws@^1.1.5: +ws@^1.1.0: version "1.1.5" resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" integrity sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w== @@ -7214,18 +7202,18 @@ ws@^6.1.4: dependencies: async-limiter "~1.0.0" -ws@^7, ws@^7.2.3: +ws@^7, ws@^7.2.3, ws@^7.5.1: version "7.5.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== -xcode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xcode/-/xcode-2.0.0.tgz#134f1f94c26fbfe8a9aaa9724bfb2772419da1a2" - integrity sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw== +xcode@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/xcode/-/xcode-3.0.1.tgz#3efb62aac641ab2c702458f9a0302696146aa53c" + integrity sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA== dependencies: - simple-plist "^1.0.0" - uuid "^3.3.2" + simple-plist "^1.1.0" + uuid "^7.0.3" xml-name-validator@^3.0.0: version "3.0.0" @@ -7254,11 +7242,6 @@ xmldoc@^1.1.2: dependencies: sax "^1.2.1" -xmldom@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.6.0.tgz#43a96ecb8beece991cef382c08397d82d4d0c46f" - integrity sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg== - xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" From a86cae7aacc9837536e7d679870a57dcd0f45475 Mon Sep 17 00:00:00 2001 From: Michel Kraemer Date: Wed, 2 Feb 2022 10:32:10 -0800 Subject: [PATCH 027/109] Update gradle-download-task to 5.0.1 (#32995) Summary: This enables concurrent task exection and parallel downloads See also https://github.com/michel-kraemer/gradle-download-task/issues/138 ## Changelog [General] [Changed] - Update gradle-download-task to 5.0.1 to support concurrent downloads Pull Request resolved: https://github.com/facebook/react-native/pull/32995 Test Plan: Build runs successfully. Reviewed By: ShikaSD Differential Revision: D33892817 Pulled By: cortinico fbshipit-source-id: 515443573e17a5c2b16a1cf3cea4bf3c5c2d96a7 --- build.gradle.kts | 2 +- template/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7c71d62883..5d38d5a7af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { dependencies { val kotlin_version: String by project classpath("com.android.tools.build:gradle:7.0.4") - classpath("de.undercouch:gradle-download-task:4.1.2") + classpath("de.undercouch:gradle-download-task:5.0.1") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/template/android/build.gradle b/template/android/build.gradle index 8a1d68f9c5..3300863fdc 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -15,7 +15,7 @@ buildscript { dependencies { classpath("com.android.tools.build:gradle:7.0.4") classpath("com.facebook.react:react-native-gradle-plugin") - classpath("de.undercouch:gradle-download-task:4.1.2") + classpath("de.undercouch:gradle-download-task:5.0.1") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } From 3568a7298738a651d76c70763362c297ab601ee8 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Wed, 2 Feb 2022 10:34:36 -0800 Subject: [PATCH 028/109] Implement Runtime.getHeapUsage for hermes chrome inspector (#32895) Summary: I was looking at the hermes chrome devtools integration and noticed requests to `Runtime.getHeapUsage` which was not implemented. When implemented it will show a summary of memory usage of the javascript instance in devtools. image ## Changelog [General] [Added] - Implement Runtime.getHeapUsage for hermes chrome inspector Pull Request resolved: https://github.com/facebook/react-native/pull/32895 Test Plan: Before image After image Reviewed By: christophpurrer Differential Revision: D33616658 Pulled By: ShikaSD fbshipit-source-id: 49d863e6a58d4a92d4c86f9a288ac33ed8d2cb0d --- .../hermes/inspector/chrome/Connection.cpp | 18 +++++++ .../hermes/inspector/chrome/MessageTypes.cpp | 51 +++++++++++++++++++ .../hermes/inspector/chrome/MessageTypes.h | 25 +++++++++ .../hermes/inspector/tools/message_types.txt | 1 + .../inspector/tools/msggen/package.json | 2 +- .../inspector/tools/msggen/src/index.js | 19 ++++++- .../hermes/inspector/tools/msggen/yarn.lock | 8 +-- ReactCommon/hermes/inspector/tools/run_msggen | 11 ++-- 8 files changed, 123 insertions(+), 12 deletions(-) diff --git a/ReactCommon/hermes/inspector/chrome/Connection.cpp b/ReactCommon/hermes/inspector/chrome/Connection.cpp index 2fa87b5386..e554f654dc 100644 --- a/ReactCommon/hermes/inspector/chrome/Connection.cpp +++ b/ReactCommon/hermes/inspector/chrome/Connection.cpp @@ -103,6 +103,7 @@ class Connection::Impl : public inspector::InspectorObserver, void handle(const m::heapProfiler::GetHeapObjectIdRequest &req) override; void handle(const m::runtime::CallFunctionOnRequest &req) override; void handle(const m::runtime::EvaluateRequest &req) override; + void handle(const m::runtime::GetHeapUsageRequest &req) override; void handle(const m::runtime::GetPropertiesRequest &req) override; void handle(const m::runtime::RunIfWaitingForDebuggerRequest &req) override; @@ -1348,6 +1349,23 @@ Connection::Impl::makePropsFromValue( return result; } +void Connection::Impl::handle(const m::runtime::GetHeapUsageRequest &req) { + auto resp = std::make_shared(); + resp->id = req.id; + + inspector_ + ->executeIfEnabled( + "Runtime.getHeapUsage", + [this, req, resp](const debugger::ProgramState &state) { + auto heapInfo = getRuntime().instrumentation().getHeapInfo(false); + resp->usedSize = heapInfo["hermes_allocatedBytes"]; + resp->totalSize = heapInfo["hermes_heapSize"]; + }) + .via(executor_.get()) + .thenValue([this, resp](auto &&) { sendResponseToClient(*resp); }) + .thenError(sendErrorToClient(req.id)); +} + void Connection::Impl::handle(const m::runtime::GetPropertiesRequest &req) { auto resp = std::make_shared(); resp->id = req.id; diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp index 170f90593b..d617c14c30 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp @@ -62,6 +62,7 @@ std::unique_ptr Request::fromJsonThrowOnError(const std::string &str) { makeUnique}, {"Runtime.callFunctionOn", makeUnique}, {"Runtime.evaluate", makeUnique}, + {"Runtime.getHeapUsage", makeUnique}, {"Runtime.getProperties", makeUnique}, {"Runtime.runIfWaitingForDebugger", makeUnique}, @@ -503,12 +504,19 @@ debugger::ResumeRequest::ResumeRequest(const dynamic &obj) : Request("Debugger.resume") { assign(id, obj, "id"); assign(method, obj, "method"); + + dynamic params = obj.at("params"); + assign(terminateOnResume, params, "terminateOnResume"); } dynamic debugger::ResumeRequest::toDynamic() const { + dynamic params = dynamic::object; + put(params, "terminateOnResume", terminateOnResume); + dynamic obj = dynamic::object; put(obj, "id", id); put(obj, "method", method); + put(obj, "params", std::move(params)); return obj; } @@ -897,12 +905,14 @@ heapProfiler::StopTrackingHeapObjectsRequest::StopTrackingHeapObjectsRequest( dynamic params = obj.at("params"); assign(reportProgress, params, "reportProgress"); assign(treatGlobalObjectsAsRoots, params, "treatGlobalObjectsAsRoots"); + assign(captureNumericValue, params, "captureNumericValue"); } dynamic heapProfiler::StopTrackingHeapObjectsRequest::toDynamic() const { dynamic params = dynamic::object; put(params, "reportProgress", reportProgress); put(params, "treatGlobalObjectsAsRoots", treatGlobalObjectsAsRoots); + put(params, "captureNumericValue", captureNumericValue); dynamic obj = dynamic::object; put(obj, "id", id); @@ -928,12 +938,14 @@ heapProfiler::TakeHeapSnapshotRequest::TakeHeapSnapshotRequest( dynamic params = obj.at("params"); assign(reportProgress, params, "reportProgress"); assign(treatGlobalObjectsAsRoots, params, "treatGlobalObjectsAsRoots"); + assign(captureNumericValue, params, "captureNumericValue"); } dynamic heapProfiler::TakeHeapSnapshotRequest::toDynamic() const { dynamic params = dynamic::object; put(params, "reportProgress", reportProgress); put(params, "treatGlobalObjectsAsRoots", treatGlobalObjectsAsRoots); + put(params, "captureNumericValue", captureNumericValue); dynamic obj = dynamic::object; put(obj, "id", id); @@ -1030,6 +1042,26 @@ void runtime::EvaluateRequest::accept(RequestHandler &handler) const { handler.handle(*this); } +runtime::GetHeapUsageRequest::GetHeapUsageRequest() + : Request("Runtime.getHeapUsage") {} + +runtime::GetHeapUsageRequest::GetHeapUsageRequest(const dynamic &obj) + : Request("Runtime.getHeapUsage") { + assign(id, obj, "id"); + assign(method, obj, "method"); +} + +dynamic runtime::GetHeapUsageRequest::toDynamic() const { + dynamic obj = dynamic::object; + put(obj, "id", id); + put(obj, "method", method); + return obj; +} + +void runtime::GetHeapUsageRequest::accept(RequestHandler &handler) const { + handler.handle(*this); +} + runtime::GetPropertiesRequest::GetPropertiesRequest() : Request("Runtime.getProperties") {} @@ -1284,6 +1316,25 @@ dynamic runtime::EvaluateResponse::toDynamic() const { return obj; } +runtime::GetHeapUsageResponse::GetHeapUsageResponse(const dynamic &obj) { + assign(id, obj, "id"); + + dynamic res = obj.at("result"); + assign(usedSize, res, "usedSize"); + assign(totalSize, res, "totalSize"); +} + +dynamic runtime::GetHeapUsageResponse::toDynamic() const { + dynamic res = dynamic::object; + put(res, "usedSize", usedSize); + put(res, "totalSize", totalSize); + + dynamic obj = dynamic::object; + put(obj, "id", id); + put(obj, "result", std::move(res)); + return obj; +} + runtime::GetPropertiesResponse::GetPropertiesResponse(const dynamic &obj) { assign(id, obj, "id"); diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.h b/ReactCommon/hermes/inspector/chrome/MessageTypes.h index 78468d6fb1..10ff9e4ca3 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.h +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.h @@ -59,6 +59,8 @@ struct ExceptionDetails; struct ExecutionContextCreatedNotification; struct ExecutionContextDescription; using ExecutionContextId = int; +struct GetHeapUsageRequest; +struct GetHeapUsageResponse; struct GetPropertiesRequest; struct GetPropertiesResponse; struct InternalPropertyDescriptor; @@ -127,6 +129,7 @@ struct RequestHandler { virtual void handle(const heapProfiler::TakeHeapSnapshotRequest &req) = 0; virtual void handle(const runtime::CallFunctionOnRequest &req) = 0; virtual void handle(const runtime::EvaluateRequest &req) = 0; + virtual void handle(const runtime::GetHeapUsageRequest &req) = 0; virtual void handle(const runtime::GetPropertiesRequest &req) = 0; virtual void handle(const runtime::RunIfWaitingForDebuggerRequest &req) = 0; }; @@ -162,6 +165,7 @@ struct NoopRequestHandler : public RequestHandler { void handle(const heapProfiler::TakeHeapSnapshotRequest &req) override {} void handle(const runtime::CallFunctionOnRequest &req) override {} void handle(const runtime::EvaluateRequest &req) override {} + void handle(const runtime::GetHeapUsageRequest &req) override {} void handle(const runtime::GetPropertiesRequest &req) override {} void handle(const runtime::RunIfWaitingForDebuggerRequest &req) override {} }; @@ -400,6 +404,8 @@ struct debugger::ResumeRequest : public Request { folly::dynamic toDynamic() const override; void accept(RequestHandler &handler) const override; + + folly::Optional terminateOnResume; }; struct debugger::SetBreakpointRequest : public Request { @@ -548,6 +554,7 @@ struct heapProfiler::StopTrackingHeapObjectsRequest : public Request { folly::Optional reportProgress; folly::Optional treatGlobalObjectsAsRoots; + folly::Optional captureNumericValue; }; struct heapProfiler::TakeHeapSnapshotRequest : public Request { @@ -559,6 +566,7 @@ struct heapProfiler::TakeHeapSnapshotRequest : public Request { folly::Optional reportProgress; folly::Optional treatGlobalObjectsAsRoots; + folly::Optional captureNumericValue; }; struct runtime::CallFunctionOnRequest : public Request { @@ -596,6 +604,14 @@ struct runtime::EvaluateRequest : public Request { folly::Optional awaitPromise; }; +struct runtime::GetHeapUsageRequest : public Request { + GetHeapUsageRequest(); + explicit GetHeapUsageRequest(const folly::dynamic &obj); + + folly::dynamic toDynamic() const override; + void accept(RequestHandler &handler) const override; +}; + struct runtime::GetPropertiesRequest : public Request { GetPropertiesRequest(); explicit GetPropertiesRequest(const folly::dynamic &obj); @@ -709,6 +725,15 @@ struct runtime::EvaluateResponse : public Response { folly::Optional exceptionDetails; }; +struct runtime::GetHeapUsageResponse : public Response { + GetHeapUsageResponse() = default; + explicit GetHeapUsageResponse(const folly::dynamic &obj); + folly::dynamic toDynamic() const override; + + double usedSize{}; + double totalSize{}; +}; + struct runtime::GetPropertiesResponse : public Response { GetPropertiesResponse() = default; explicit GetPropertiesResponse(const folly::dynamic &obj); diff --git a/ReactCommon/hermes/inspector/tools/message_types.txt b/ReactCommon/hermes/inspector/tools/message_types.txt index 8921a82925..d2868e6ab3 100644 --- a/ReactCommon/hermes/inspector/tools/message_types.txt +++ b/ReactCommon/hermes/inspector/tools/message_types.txt @@ -32,5 +32,6 @@ Runtime.callFunctionOn Runtime.consoleAPICalled Runtime.evaluate Runtime.executionContextCreated +Runtime.getHeapUsage Runtime.getProperties Runtime.runIfWaitingForDebugger diff --git a/ReactCommon/hermes/inspector/tools/msggen/package.json b/ReactCommon/hermes/inspector/tools/msggen/package.json index 6e42007bf6..b3dcba4544 100644 --- a/ReactCommon/hermes/inspector/tools/msggen/package.json +++ b/ReactCommon/hermes/inspector/tools/msggen/package.json @@ -12,7 +12,7 @@ "test": "jest" }, "dependencies": { - "devtools-protocol": "0.0.730699", + "devtools-protocol": "0.0.959523", "yargs": "^14.2.0" }, "devDependencies": { diff --git a/ReactCommon/hermes/inspector/tools/msggen/src/index.js b/ReactCommon/hermes/inspector/tools/msggen/src/index.js index cf6f3d881e..eb9a4f3ba9 100644 --- a/ReactCommon/hermes/inspector/tools/msggen/src/index.js +++ b/ReactCommon/hermes/inspector/tools/msggen/src/index.js @@ -41,6 +41,7 @@ const proto = mergeDomains(standard, custom); function parseDomains( domainObjs: Array, ignoreExperimental: boolean, + includeExperimental: Set, ): Descriptor { const desc = { types: [], @@ -59,7 +60,12 @@ function parseDomains( } for (const commandObj of obj.commands || []) { - const command = Command.create(domain, commandObj, ignoreExperimental); + const command = Command.create( + domain, + commandObj, + !includeExperimental.has(`${domain}.${commandObj.name}`) && + ignoreExperimental, + ); if (command) { desc.commands.push(command); } @@ -199,18 +205,27 @@ function main() { .boolean('e') .alias('e', 'ignore-experimental') .describe('e', 'ignore experimental commands, props, and types') + .alias('i', 'include-experimental') + .describe('i', 'experimental commands to include') .alias('r', 'roots') .describe('r', 'path to a file listing root types, events, and commands') .nargs('r', 1) .demandCommand(2, 2).argv; const ignoreExperimental = !!args.e; + const includeExperimental = new Set( + typeof args.i === 'string' ? args.i.split(',') : [], + ); const [headerPath, implPath] = args._; const headerStream = fs.createWriteStream(headerPath); const implStream = fs.createWriteStream(implPath); - const desc = parseDomains(proto.domains, ignoreExperimental); + const desc = parseDomains( + proto.domains, + ignoreExperimental, + includeExperimental, + ); const graph = buildGraph(desc); const roots = parseRoots(desc, String(args.roots)); diff --git a/ReactCommon/hermes/inspector/tools/msggen/yarn.lock b/ReactCommon/hermes/inspector/tools/msggen/yarn.lock index b6b1be6b96..40a0274628 100644 --- a/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +++ b/ReactCommon/hermes/inspector/tools/msggen/yarn.lock @@ -2434,10 +2434,10 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -devtools-protocol@0.0.730699: - version "0.0.730699" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.730699.tgz#4d18f6a9b7fb7cf3f1ffe73bfe14aad66cf3b2ef" - integrity sha512-dprBpuPzVIIXXL6GevzhvWe2wg836h3d5hY+n6IzzHbKLsUh6QlVmcIy15za0J3MhDFbmEH60s6uYsrw/tgBbw== +devtools-protocol@0.0.959523: + version "0.0.959523" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.959523.tgz#a7ce62c6b88876081fe5bec866f70e467bc021ba" + integrity sha512-taOcAND/oJA5FhJD2I3RA+I8RPdrpPJWwvMBPzTq7Sugev1xTOG3lgtlSfkh5xkjTYw0Ti2CRQq016goFHMoPQ== diff-sequences@^26.6.2: version "26.6.2" diff --git a/ReactCommon/hermes/inspector/tools/run_msggen b/ReactCommon/hermes/inspector/tools/run_msggen index 053cb36737..c349b70be6 100755 --- a/ReactCommon/hermes/inspector/tools/run_msggen +++ b/ReactCommon/hermes/inspector/tools/run_msggen @@ -2,24 +2,25 @@ set -e -DIR=$(dirname "${BASH_SOURCE[0]}") +DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) cd "${DIR}/msggen" yarn install yarn build -FBSOURCE=$(hg root) -MSGTYPES_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/tools/message_types.txt" -HEADER_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/chrome/MessageTypes.h" -CPP_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp" +MSGTYPES_PATH="${DIR}/message_types.txt" +HEADER_PATH="${DIR}/../chrome/MessageTypes.h" +CPP_PATH="${DIR}/../chrome/MessageTypes.cpp" node bin/index.js \ --ignore-experimental \ + --include-experimental=Runtime.getHeapUsage \ --roots "$MSGTYPES_PATH" \ "$HEADER_PATH" "$CPP_PATH" clang-format -i --style=file "$HEADER_PATH" clang-format -i --style=file "$CPP_PATH" +FBSOURCE=$(hg root) "${FBSOURCE}/tools/signedsource" sign "$HEADER_PATH" "${FBSOURCE}/tools/signedsource" sign "$CPP_PATH" From 1bf84a63d83179d2676ef50eedf6bdd81e031b43 Mon Sep 17 00:00:00 2001 From: John Porto Date: Wed, 2 Feb 2022 10:51:17 -0800 Subject: [PATCH 029/109] Make automatic SampleProfiling registration optional. Summary: This change makes automatic sample profiling registration opt in. This is in preparation for an upcoming change where hermes will enforce that the sampling profiler must be destroyed on the same thread it was created. Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D33826992 fbshipit-source-id: 89843b5fc5b936f674a8d0a470e92af0cd8f6125 --- .../src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp index 55c151958a..304603fd12 100644 --- a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp +++ b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp @@ -47,6 +47,7 @@ static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) { return vm::RuntimeConfig::Builder() .withGCConfig(gcConfigBuilder.build()) + .withEnableSampleProfiling(true) .build(); } From 48318b1542910b939ab977c0bc82e98f098abe50 Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Wed, 2 Feb 2022 12:52:54 -0800 Subject: [PATCH 030/109] Cleanup OSS proguard rules and add @DoNotStripAny Summary: title Changelog: [Changed][Android] - Added DoNotStripAny proguard rules Reviewed By: cortinico Differential Revision: D33921797 fbshipit-source-id: 93628d6222c74976b40efc2507a482d8a6a4fe1b --- ReactAndroid/proguard-rules.pro | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ReactAndroid/proguard-rules.pro b/ReactAndroid/proguard-rules.pro index 2c7c818cee..2161cd7e7d 100644 --- a/ReactAndroid/proguard-rules.pro +++ b/ReactAndroid/proguard-rules.pro @@ -24,17 +24,15 @@ # See http://sourceforge.net/p/proguard/bugs/466/ -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters --keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip --keep,allowobfuscation @interface com.facebook.jni.annotations.DoNotStrip # Do not strip any method/class that is annotated with @DoNotStrip -keep @com.facebook.proguard.annotations.DoNotStrip class * --keep @com.facebook.common.internal.DoNotStrip class * --keep @com.facebook.jni.annotations.DoNotStrip class * -keepclassmembers class * { @com.facebook.proguard.annotations.DoNotStrip *; - @com.facebook.common.internal.DoNotStrip *; - @com.facebook.jni.annotations.DoNotStrip *; +} + +-keep @com.facebook.proguard.annotations.DoNotStripAny class * { + *; } -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { From 09e418ef8e98fd026cf828696ff2475993b76ac2 Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Wed, 2 Feb 2022 12:55:20 -0800 Subject: [PATCH 031/109] Increase max heap size for template gradle build Summary: Updates maximum heap size for the gradle build to account for building RN from source when new architecture is enabled. Changelog: [Changed][Android] - Use 2g as a default heap size for gradle builds Reviewed By: cortinico Differential Revision: D33947090 fbshipit-source-id: 2f551e688f2d92c3092e053086f6933779cd6f63 --- gradle.properties | 2 +- template/android/gradle.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 900a6e110b..d8559b0b86 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # This is causing issue with dependencies task: https://github.com/gradle/gradle/issues/9645#issuecomment-530746758 # org.gradle.configureondemand=true org.gradle.daemon=true -org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 org.gradle.parallel=true android.useAndroidX=true diff --git a/template/android/gradle.properties b/template/android/gradle.properties index 6e1a46f01b..fa4feae5f1 100644 --- a/template/android/gradle.properties +++ b/template/android/gradle.properties @@ -9,8 +9,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx1024m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m +org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit From 08faa130dd9f362c8fff036b059a6b947b081c57 Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Wed, 2 Feb 2022 15:54:48 -0800 Subject: [PATCH 032/109] Delete ReactFeatureFlags.enableRoundedCornerPostprocessing Summary: Rounded corner postprocessing has been disabled for 2 months now, and [metrics neutral](https://www.internalfb.com/intern/qe2/react_fabric_marketplace_home_android_universe/react_fabric_disable_rounded_corner_postprocess_android/setup/config). Removing the flag and associated codepaths. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D33953645 fbshipit-source-id: b0e5a6068114d74292f17450a22816f19cae6f15 --- .../react/config/ReactFeatureFlags.java | 3 - .../java/com/facebook/react/views/image/BUCK | 1 - .../react/views/image/ReactImageView.java | 90 ------------------- 3 files changed, 94 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java index b4ab457195..bc93addfdd 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +++ b/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java @@ -101,7 +101,4 @@ public class ReactFeatureFlags { /** TODO: T103427072 Delete ReactFeatureFlags.enableNestedTextOnPressEventFix */ public static boolean enableNestedTextOnPressEventFix = true; - - /** TODO: T107492383 Delete this flag. Enables postprocessor for rounded corners for Image */ - public static boolean enableRoundedCornerPostprocessing = false; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK index a13531e192..40f0d2f559 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK @@ -55,7 +55,6 @@ rn_android_library( react_native_dep("third-party/java/jsr-305:jsr-305"), react_native_target("java/com/facebook/react/bridge:bridge"), react_native_target("java/com/facebook/react/common:common"), - react_native_target("java/com/facebook/react/config:config"), react_native_target("java/com/facebook/react/module/annotations:annotations"), react_native_target("java/com/facebook/react/uimanager:uimanager"), react_native_target("java/com/facebook/react/modules/fresco:fresco"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java index b841ddbec1..b5781263df 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java @@ -14,9 +14,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; -import android.graphics.Path; import android.graphics.Rect; -import android.graphics.RectF; import android.graphics.Shader; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; @@ -48,7 +46,6 @@ import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.common.build.ReactBuildConfig; -import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.modules.fresco.ReactNetworkImageRequest; import com.facebook.react.uimanager.FloatUtil; import com.facebook.react.uimanager.PixelUtil; @@ -70,25 +67,11 @@ import java.util.List; public class ReactImageView extends GenericDraweeView { public static final int REMOTE_IMAGE_FADE_DURATION_MS = 300; - public static final String REMOTE_TRANSPARENT_BITMAP_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="; private static float[] sComputedCornerRadii = new float[4]; - /* - * Implementation note re rounded corners: - * - * Fresco's built-in rounded corners only work for 'cover' resize mode - - * this is a limitation in Android itself. Fresco has a workaround for this, but - * it requires knowing the background color. - * - * So for the other modes, we use a postprocessor. - * Because the postprocessor uses a modified bitmap, that would just get cropped in - * 'cover' mode, so we fall back to Fresco's normal implementation. - */ - private static final Matrix sMatrix = new Matrix(); - private static final Matrix sInverse = new Matrix(); private ImageResizeMethod mResizeMethod = ImageResizeMethod.AUTO; public void updateCallerContext(@Nullable Object callerContext) { @@ -98,61 +81,6 @@ public class ReactImageView extends GenericDraweeView { } } - private class RoundedCornerPostprocessor extends BasePostprocessor { - - void getRadii(Bitmap source, float[] computedCornerRadii, float[] mappedRadii) { - mScaleType.getTransform( - sMatrix, - new Rect(0, 0, source.getWidth(), source.getHeight()), - source.getWidth(), - source.getHeight(), - 0.0f, - 0.0f); - sMatrix.invert(sInverse); - - mappedRadii[0] = sInverse.mapRadius(computedCornerRadii[0]); - mappedRadii[1] = mappedRadii[0]; - - mappedRadii[2] = sInverse.mapRadius(computedCornerRadii[1]); - mappedRadii[3] = mappedRadii[2]; - - mappedRadii[4] = sInverse.mapRadius(computedCornerRadii[2]); - mappedRadii[5] = mappedRadii[4]; - - mappedRadii[6] = sInverse.mapRadius(computedCornerRadii[3]); - mappedRadii[7] = mappedRadii[6]; - } - - @Override - public void process(Bitmap output, Bitmap source) { - getCornerRadii(sComputedCornerRadii); - - output.setHasAlpha(true); - if (FloatUtil.floatsEqual(sComputedCornerRadii[0], 0f) - && FloatUtil.floatsEqual(sComputedCornerRadii[1], 0f) - && FloatUtil.floatsEqual(sComputedCornerRadii[2], 0f) - && FloatUtil.floatsEqual(sComputedCornerRadii[3], 0f)) { - super.process(output, source); - return; - } - Paint paint = new Paint(); - paint.setAntiAlias(true); - paint.setShader(new BitmapShader(source, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP)); - Canvas canvas = new Canvas(output); - - float[] radii = new float[8]; - - getRadii(source, sComputedCornerRadii, radii); - - Path pathForBorderRadius = new Path(); - - pathForBorderRadius.addRoundRect( - new RectF(0, 0, source.getWidth(), source.getHeight()), radii, Path.Direction.CW); - - canvas.drawPath(pathForBorderRadius, paint); - } - } - // Fresco lacks support for repeating images, see https://github.com/facebook/fresco/issues/1575 // We implement it here as a postprocessing step. private static final Matrix sTileMatrix = new Matrix(); @@ -198,7 +126,6 @@ public class ReactImageView extends GenericDraweeView { private Shader.TileMode mTileMode = ImageResizeMode.defaultTileMode(); private boolean mIsDirty; private final AbstractDraweeControllerBuilder mDraweeControllerBuilder; - private @Nullable RoundedCornerPostprocessor mRoundedCornerPostprocessor; private @Nullable TilePostprocessor mTilePostprocessor; private @Nullable IterativeBoxBlurPostProcessor mIterativeBoxBlurPostProcessor; private @Nullable ReactImageDownloadListener mDownloadListener; @@ -353,11 +280,6 @@ public class ReactImageView extends GenericDraweeView { public void setScaleType(ScalingUtils.ScaleType scaleType) { if (mScaleType != scaleType) { mScaleType = scaleType; - if (shouldUseRoundedCornerPostprocessing()) { - mRoundedCornerPostprocessor = new RoundedCornerPostprocessor(); - } else { - mRoundedCornerPostprocessor = null; - } mIsDirty = true; } } @@ -530,9 +452,6 @@ public class ReactImageView extends GenericDraweeView { mBackgroundImageDrawable.setRadii(roundingParams.getCornersRadii()); hierarchy.setBackgroundImage(mBackgroundImageDrawable); } - if (shouldUseRoundedCornerPostprocessing()) { - roundingParams.setCornersRadius(0); - } roundingParams.setBorder(mBorderColor, mBorderWidth); if (mOverlayColor != Color.TRANSPARENT) { roundingParams.setOverlayColor(mOverlayColor); @@ -547,9 +466,6 @@ public class ReactImageView extends GenericDraweeView { : mImageSource.isResource() ? 0 : REMOTE_IMAGE_FADE_DURATION_MS); List postprocessors = new LinkedList<>(); - if (mRoundedCornerPostprocessor != null) { - postprocessors.add(mRoundedCornerPostprocessor); - } if (mIterativeBoxBlurPostProcessor != null) { postprocessors.add(mIterativeBoxBlurPostProcessor); } @@ -647,12 +563,6 @@ public class ReactImageView extends GenericDraweeView { return mTileMode != Shader.TileMode.CLAMP; } - private boolean shouldUseRoundedCornerPostprocessing() { - return mScaleType != ScalingUtils.ScaleType.CENTER_CROP - && mScaleType != ScalingUtils.ScaleType.FOCUS_CROP - && ReactFeatureFlags.enableRoundedCornerPostprocessing; - } - private void setSourceImage() { mImageSource = null; if (mSources.isEmpty()) { From 1f778014a7e95c5c473898c38d5b1e0725cd373c Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Wed, 2 Feb 2022 19:55:21 -0800 Subject: [PATCH 033/109] Fix JS animated node value updating when listener is attached Summary: The JS-side animated node values were not being updated on AnimatedValue (and thus AnimatedValueXY); however, the native event "onAnimatedValueUpdate" is being handled properly in AnimatedNode. It turns out that single underscore prefixed methods are obfuscated at FB. And thus AnimatedValue._onAnimatedValueUpdateReceived was not getting called. Changing the method name to double underscore as a way to denote "protected" fixes the issue. Changelog: [General][Fixed] - JS animated node value updates properly when listener is attached Reviewed By: yungsters Differential Revision: D33962038 fbshipit-source-id: c4f60e1f1ccc0cef3e65b89034bdb91376a26416 --- Libraries/Animated/nodes/AnimatedNode.js | 4 ++-- Libraries/Animated/nodes/AnimatedValue.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/Animated/nodes/AnimatedNode.js b/Libraries/Animated/nodes/AnimatedNode.js index 30e802cc91..b4a649ff30 100644 --- a/Libraries/Animated/nodes/AnimatedNode.js +++ b/Libraries/Animated/nodes/AnimatedNode.js @@ -130,12 +130,12 @@ class AnimatedNode { if (data.tag !== this.__getNativeTag()) { return; } - this._onAnimatedValueUpdateReceived(data.value); + this.__onAnimatedValueUpdateReceived(data.value); }, ); } - _onAnimatedValueUpdateReceived(value: number) { + __onAnimatedValueUpdateReceived(value: number) { this.__callListeners(value); } diff --git a/Libraries/Animated/nodes/AnimatedValue.js b/Libraries/Animated/nodes/AnimatedValue.js index c0e8f7341c..c829d3e595 100644 --- a/Libraries/Animated/nodes/AnimatedValue.js +++ b/Libraries/Animated/nodes/AnimatedValue.js @@ -211,7 +211,7 @@ class AnimatedValue extends AnimatedWithChildren { } } - _onAnimatedValueUpdateReceived(value: number): void { + __onAnimatedValueUpdateReceived(value: number): void { this._updateValue(value, false /*flush*/); } From 6584304c100ce4d51a5c4d606170a6ad0dc00875 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 3 Feb 2022 03:43:37 -0800 Subject: [PATCH 034/109] Make Animated.Interpolation config read-only Summary: Changelog: [General] [Changed] Type the argument of Animated.interpolate as read-only Reviewed By: javache Differential Revision: D33950698 fbshipit-source-id: b959d34eb9752358f4a8ba1d290b56c099f535e0 --- Libraries/Animated/nodes/AnimatedInterpolation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Animated/nodes/AnimatedInterpolation.js b/Libraries/Animated/nodes/AnimatedInterpolation.js index 5ebea80ba1..d6f5deed04 100644 --- a/Libraries/Animated/nodes/AnimatedInterpolation.js +++ b/Libraries/Animated/nodes/AnimatedInterpolation.js @@ -23,14 +23,14 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig'; type ExtrapolateType = 'extend' | 'identity' | 'clamp'; -export type InterpolationConfigType = { +export type InterpolationConfigType = $ReadOnly<{ inputRange: $ReadOnlyArray, outputRange: $ReadOnlyArray | $ReadOnlyArray, easing?: (input: number) => number, extrapolate?: ExtrapolateType, extrapolateLeft?: ExtrapolateType, extrapolateRight?: ExtrapolateType, -}; +}>; const linear = (t: number) => t; From 491c4231db23ba79da5face7e337fec2a4a90653 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 3 Feb 2022 04:27:53 -0800 Subject: [PATCH 035/109] Pass raw ShadowNode instead of shared_ptr Summary: changelog: [internal] pass raw ShadowNode instead of shared_ptr. Ownership is not transferred, shared_ptr is misleading. Reviewed By: javache Differential Revision: D33917010 fbshipit-source-id: 4d9fdd4b4e0376149f1719ad160b957de4afdce3 --- .../react/renderer/uimanager/UIManager.cpp | 17 ++++++++--------- .../react/renderer/uimanager/UIManager.h | 6 +++--- .../renderer/uimanager/UIManagerBinding.cpp | 9 +++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ReactCommon/react/renderer/uimanager/UIManager.cpp b/ReactCommon/react/renderer/uimanager/UIManager.cpp index 8455efb45e..0d2857b494 100644 --- a/ReactCommon/react/renderer/uimanager/UIManager.cpp +++ b/ReactCommon/react/renderer/uimanager/UIManager.cpp @@ -94,28 +94,27 @@ SharedShadowNode UIManager::createNode( } SharedShadowNode UIManager::cloneNode( - const ShadowNode::Shared &shadowNode, - const SharedShadowNodeSharedList &children, - const RawProps *rawProps) const { + ShadowNode const &shadowNode, + SharedShadowNodeSharedList const &children, + RawProps const *rawProps) const { SystraceSection s("UIManager::cloneNode"); PropsParserContext propsParserContext{ - shadowNode->getFamily().getSurfaceId(), *contextContainer_.get()}; + shadowNode.getFamily().getSurfaceId(), *contextContainer_.get()}; - auto &componentDescriptor = shadowNode->getComponentDescriptor(); + auto &componentDescriptor = shadowNode.getComponentDescriptor(); auto clonedShadowNode = componentDescriptor.cloneShadowNode( - *shadowNode, + shadowNode, { /* .props = */ rawProps ? componentDescriptor.cloneProps( - propsParserContext, shadowNode->getProps(), *rawProps) + propsParserContext, shadowNode.getProps(), *rawProps) : ShadowNodeFragment::propsPlaceholder(), /* .children = */ children, }); if (delegate_) { - delegate_->uiManagerDidCloneShadowNode( - *shadowNode.get(), *clonedShadowNode); + delegate_->uiManagerDidCloneShadowNode(shadowNode, *clonedShadowNode); } return clonedShadowNode; diff --git a/ReactCommon/react/renderer/uimanager/UIManager.h b/ReactCommon/react/renderer/uimanager/UIManager.h index 16553adea4..93cd8994c2 100644 --- a/ReactCommon/react/renderer/uimanager/UIManager.h +++ b/ReactCommon/react/renderer/uimanager/UIManager.h @@ -127,9 +127,9 @@ class UIManager final : public ShadowTreeDelegate { SharedEventTarget eventTarget) const; ShadowNode::Shared cloneNode( - const ShadowNode::Shared &shadowNode, - const SharedShadowNodeSharedList &children = nullptr, - const RawProps *rawProps = nullptr) const; + ShadowNode const &shadowNode, + SharedShadowNodeSharedList const &children = nullptr, + RawProps const *rawProps = nullptr) const; void appendChild( const ShadowNode::Shared &parentShadowNode, diff --git a/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp b/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp index da6eeb68ff..c201c7fe00 100644 --- a/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +++ b/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp @@ -220,7 +220,8 @@ jsi::Value UIManagerBinding::get( size_t count) noexcept -> jsi::Value { return valueFromShadowNode( runtime, - uiManager->cloneNode(shadowNodeFromValue(runtime, arguments[0]))); + uiManager->cloneNode( + *shadowNodeFromValue(runtime, arguments[0]))); }); } @@ -287,7 +288,7 @@ jsi::Value UIManagerBinding::get( return valueFromShadowNode( runtime, uiManager->cloneNode( - shadowNodeFromValue(runtime, arguments[0]), + *shadowNodeFromValue(runtime, arguments[0]), ShadowNode::emptySharedShadowNodeSharedList())); }); } @@ -307,7 +308,7 @@ jsi::Value UIManagerBinding::get( return valueFromShadowNode( runtime, uiManager->cloneNode( - shadowNodeFromValue(runtime, arguments[0]), + *shadowNodeFromValue(runtime, arguments[0]), nullptr, &rawProps)); }); @@ -328,7 +329,7 @@ jsi::Value UIManagerBinding::get( return valueFromShadowNode( runtime, uiManager->cloneNode( - shadowNodeFromValue(runtime, arguments[0]), + *shadowNodeFromValue(runtime, arguments[0]), ShadowNode::emptySharedShadowNodeSharedList(), &rawProps)); }); From 4cbcb7a13abc2f4824ee7b0022ce1d2530ab533d Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 3 Feb 2022 04:48:48 -0800 Subject: [PATCH 036/109] Abandon mc react_fabric.enable_event_emitter_wrapper_raw_pointer Summary: changelog: [internal] Remove gating. Reviewed By: philIip Differential Revision: D33944220 fbshipit-source-id: bba076a2166f8d676119d5c069a3894e3d547285 --- .../com/facebook/react/fabric/jni/Binding.cpp | 8 ++------ .../com/facebook/react/fabric/jni/Binding.h | 1 - .../react/fabric/jni/EventEmitterWrapper.cpp | 13 ------------ .../react/fabric/jni/EventEmitterWrapper.h | 1 - .../fabric/jni/FabricMountingManager.cpp | 20 +++---------------- .../react/fabric/jni/FabricMountingManager.h | 1 - 6 files changed, 5 insertions(+), 39 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index 26eacc5cae..bceda78715 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -60,9 +60,8 @@ Binding::getInspectorDataForInstance( } EventEmitterWrapper *cEventEmitter = cthis(eventEmitterWrapper); - InspectorData data = scheduler->getInspectorDataForInstance( - enableEventEmitterRawPointer_ ? *cEventEmitter->eventEmitterPointer - : *cEventEmitter->eventEmitter); + InspectorData data = + scheduler->getInspectorDataForInstance(*cEventEmitter->eventEmitter); folly::dynamic result = folly::dynamic::object; result["fileName"] = data.fileName; @@ -369,9 +368,6 @@ void Binding::installFabricUIManager( disableRevisionCheckForPreallocation_ = config->getBool("react_fabric:disable_revision_check_for_preallocation"); - enableEventEmitterRawPointer_ = - config->getBool("react_fabric:enable_event_emitter_wrapper_raw_pointer"); - if (enableFabricLogs_) { LOG(WARNING) << "Binding::installFabricUIManager() was called (address: " << this << ")."; diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h index db537efddb..90099106bb 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.h @@ -155,7 +155,6 @@ class Binding : public jni::HybridClass, bool disablePreallocateViews_{false}; bool enableFabricLogs_{false}; bool disableRevisionCheckForPreallocation_{false}; - bool enableEventEmitterRawPointer_{false}; bool dispatchPreallocationInBackground_{false}; }; diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.cpp index 262ac0d23d..19a003793d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.cpp @@ -22,15 +22,6 @@ void EventEmitterWrapper::invokeEvent( std::string const &eventName, NativeMap *payload, int category) { - if (eventEmitterPointer) { - eventEmitterPointer->dispatchEvent( - eventName, - payload->consume(), - EventPriority::AsynchronousBatched, - static_cast(category)); - return; - } - // It is marginal, but possible for this to be constructed without a valid // EventEmitter. In those cases, make sure we noop/blackhole events instead of // crashing. @@ -47,10 +38,6 @@ void EventEmitterWrapper::invokeUniqueEvent( std::string const &eventName, NativeMap *payload, int customCoalesceKey) { - if (eventEmitterPointer) { - eventEmitterPointer->dispatchUniqueEvent(eventName, payload->consume()); - return; - } // TODO: customCoalesceKey currently unused // It is marginal, but possible for this to be constructed without a valid // EventEmitter. In those cases, make sure we noop/blackhole events instead of diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.h index f7a6d6e11f..4f4d68fb5c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/EventEmitterWrapper.h @@ -24,7 +24,6 @@ class EventEmitterWrapper : public jni::HybridClass { static void registerNatives(); SharedEventEmitter eventEmitter; - EventEmitter const *eventEmitterPointer; void invokeEvent(std::string const &eventName, NativeMap *params, int category); diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp index e88af4c229..5121593409 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.cpp @@ -545,11 +545,7 @@ void FabricMountingManager::executeMount( mountItem.newChildShadowView.eventEmitter; auto javaEventEmitter = EventEmitterWrapper::newObjectJavaArgs(); EventEmitterWrapper *cEventEmitter = cthis(javaEventEmitter); - if (enableEventEmitterRawPointer_) { - cEventEmitter->eventEmitterPointer = eventEmitter.get(); - } else { - cEventEmitter->eventEmitter = eventEmitter; - } + cEventEmitter->eventEmitter = eventEmitter; temp[0] = mountItem.newChildShadowView.tag; temp[1] = isLayoutable; env->SetIntArrayRegion(intBufferArray, intBufferPosition, 2, temp); @@ -729,11 +725,7 @@ void FabricMountingManager::executeMount( // Do not hold a reference to javaEventEmitter from the C++ side. auto javaEventEmitter = EventEmitterWrapper::newObjectJavaArgs(); EventEmitterWrapper *cEventEmitter = cthis(javaEventEmitter); - if (enableEventEmitterRawPointer_) { - cEventEmitter->eventEmitterPointer = eventEmitter.get(); - } else { - cEventEmitter->eventEmitter = eventEmitter; - } + cEventEmitter->eventEmitter = eventEmitter; (*objBufferArray)[objBufferPosition++] = javaEventEmitter.get(); } @@ -830,11 +822,7 @@ void FabricMountingManager::preallocateShadowView( if (eventEmitter != nullptr) { javaEventEmitter = EventEmitterWrapper::newObjectJavaArgs(); EventEmitterWrapper *cEventEmitter = cthis(javaEventEmitter); - if (enableEventEmitterRawPointer_) { - cEventEmitter->eventEmitterPointer = eventEmitter.get(); - } else { - cEventEmitter->eventEmitter = eventEmitter; - } + cEventEmitter->eventEmitter = eventEmitter; } } @@ -947,8 +935,6 @@ FabricMountingManager::FabricMountingManager( : javaUIManager_(javaUIManager) { enableEarlyEventEmitterUpdate_ = config->getBool("react_fabric:enable_early_event_emitter_update"); - enableEventEmitterRawPointer_ = - config->getBool("react_fabric:enable_event_emitter_wrapper_raw_pointer"); disablePreallocateViews_ = config->getBool("react_fabric:disabled_view_preallocation_android"); disableRevisionCheckForPreallocation_ = diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h index 0ac9ac2e4a..618d24154b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/FabricMountingManager.h @@ -71,7 +71,6 @@ class FabricMountingManager { butter::map> allocatedViewRegistry_{}; std::recursive_mutex allocatedViewsMutex_; - bool enableEventEmitterRawPointer_{false}; bool enableEarlyEventEmitterUpdate_{false}; bool disablePreallocateViews_{false}; bool disableRevisionCheckForPreallocation_{false}; From fa854171798e67b8a10820f77d7198315e1784ed Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 3 Feb 2022 08:29:24 -0800 Subject: [PATCH 037/109] Do not bundle libhermes.so or libjsc.so inside the React Native Android AAR (#33038) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/33038 While rolling out RN 0.68.x we noticed that `libhermes.so` and `libjsc.so` were included inside the final .aar we publish to NPM. This forced users (on both old or new arch) to specify a `pickFirst` directive inside their packaging option (which is unpractical and risky as the two .so might not be compatible each other if they're coming from different Hermes/JSC versions). Changelog: [Android] [Fixed] - Do not bundle libhermes.so or libjsc.so inside the React Native Android AAR Reviewed By: ShikaSD Differential Revision: D33979107 fbshipit-source-id: 0b71d59f210b8bc9903cd0f30ed6e2120aab99e0 --- ReactAndroid/build.gradle | 6 ++++++ template/android/app/build.gradle | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 84821820cd..3e0f804219 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -351,6 +351,12 @@ android { packagingOptions { exclude("META-INF/NOTICE") exclude("META-INF/LICENSE") + // We intentionally don't want to bundle any JS Runtime inside the Android AAR + // we produce. The reason behind this is that we want to allow users to pick the + // JS engine by specifying a dependency on either `hermes-engine` or `android-jsc` + // that will include the necessary .so files to load. + exclude("**/libhermes.so") + exclude("**/libjsc.so") } configurations { diff --git a/template/android/app/build.gradle b/template/android/app/build.gradle index 850578b51d..506dca1211 100644 --- a/template/android/app/build.gradle +++ b/template/android/app/build.gradle @@ -233,11 +233,6 @@ android { } } - - packagingOptions { - pickFirst '**/libhermes.so' - pickFirst '**/libjsc.so' - } } dependencies { From 0a798881d7511432d7852aa5c212446c7918643a Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Thu, 3 Feb 2022 09:08:43 -0800 Subject: [PATCH 038/109] fix: Access to relative paths when invoking test-manual-e2e (#33000) Summary: Running `test-manual-e2e.sh` from any folder other than the repo root results in errors regarding files not existing, that's because we're not taking into consideration the path from where the script is invoked. This PR updates it so that we get the absolute path of the script and then use it to get the parent directory and `cd` to the repo root folder. Closes https://github.com/facebook/react-native/issues/32999 ## Changelog [Internal] [Fixed] - fix access to relative paths when invoking `test-manual-e2e.sh` from folders other than the repo root Pull Request resolved: https://github.com/facebook/react-native/pull/33000 Test Plan: 1. Clone this repo 2. Navigate to the rn-tester folder `cd packages/rn-tester/` 3. Run `../../scripts/test-manual-e2e.sh` 4. Select RNTester, Android and Hermes https://user-images.githubusercontent.com/11707729/151730441-18bc37de-0224-4f5e-a2fe-408e3ace5c1f.mov Reviewed By: ShikaSD Differential Revision: D33915561 Pulled By: cortinico fbshipit-source-id: 66f2d1ebee50bba3fe884d6346ea08ffced47a96 --- scripts/test-manual-e2e.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/test-manual-e2e.sh b/scripts/test-manual-e2e.sh index 80b66b4ecd..302628bd43 100755 --- a/scripts/test-manual-e2e.sh +++ b/scripts/test-manual-e2e.sh @@ -11,6 +11,7 @@ ENDCOLOR="\033[0m" error() { echo -e "$RED""$*""$ENDCOLOR" + popd >/dev/null || exit exit 1 } @@ -22,6 +23,10 @@ info() { echo -e "$BLUE""$*""$ENDCOLOR" } +# Ensures commands are executed from the repo root folder +dir_absolute_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P ) +pushd "$dir_absolute_path/../" >/dev/null || exit + repo_root=$(pwd) selected_platform="" selected_vm="" @@ -126,7 +131,7 @@ init_template_app(){ project_name="RNTestProject" - cd /tmp/ || exit + pushd /tmp/ >/dev/null || exit rm -rf "$project_name" node "$repo_root/cli.js" init "$project_name" --template "$repo_root" @@ -135,6 +140,7 @@ init_template_app(){ grep -E "com.facebook.react:react-native:\\+" "${project_name}/android/app/build.gradle" || error "Dependency in /tmp/${project_name}/android/app/build.gradle must be com.facebook.react:react-native:+" success "New sample project generated at /tmp/${project_name}" + popd >/dev/null || exit } test_template_app(){ @@ -142,6 +148,7 @@ test_template_app(){ init_template_app fi + pushd "/tmp/${project_name}" >/dev/null || exit if [ "$selected_platform" == "1" ]; then info "Test the following on Android:" info " - Disable Fast Refresh. It might be enabled from last time (the setting is stored on the device)" @@ -150,7 +157,7 @@ test_template_app(){ info "Press any key to run the sample in Android emulator/device" info "" read -r -n 1 - cd "/tmp/${project_name}" && npx react-native run-android + npx react-native run-android elif [ "$selected_platform" == "2" ]; then info "Test the following on iOS:" info " - Disable Fast Refresh. It might be enabled from last time (the setting is stored on the device)" @@ -163,9 +170,9 @@ test_template_app(){ info "Press any key to open the project in Xcode" info "" read -r -n 1 - open "/tmp/${project_name}/ios/${project_name}.xcworkspace" + open "ios/${project_name}.xcworkspace" fi - cd "$repo_root" || exit + popd >/dev/null || exit } @@ -209,6 +216,7 @@ handle_menu_input(){ if [ "$confirm" == "${confirm#[Yy]}" ]; then info "Next steps:" info "https://github.com/facebook/react-native/wiki/Release-Process" + popd >/dev/null || exit exit 1 else show_menu From 5e933fdd2a3c52f76d964e79595230861e497c79 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 3 Feb 2022 10:18:48 -0800 Subject: [PATCH 039/109] Yield for each access to the runtime Summary: changelog: [internal] With multiple requests to the runtime, we need to make sure they are all granted before React continues with rendering. A boolean is not enough to track this. The first lambda that has VM will set it to false and subsequent requests will have to wait for React to finish rendering. To prevent this, we can count how many lambdas are pending access to the runtime. Reviewed By: ShikaSD Differential Revision: D33792734 fbshipit-source-id: f785fae3575470179dd69acc6a466211b79b633b --- .../runtimescheduler/RuntimeScheduler.cpp | 10 ++-- .../runtimescheduler/RuntimeScheduler.h | 7 ++- .../tests/RuntimeSchedulerTest.cpp | 47 ++++++++++++++++--- .../runtimescheduler/tests/StubQueue.h | 9 ++++ 4 files changed, 60 insertions(+), 13 deletions(-) diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp index f1d114cc9d..f03c1836b8 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp @@ -23,10 +23,10 @@ RuntimeScheduler::RuntimeScheduler( void RuntimeScheduler::scheduleWork( std::function callback) const { if (enableYielding_) { - shouldYield_ = true; + runtimeAccessRequests_ += 1; runtimeExecutor_( [this, callback = std::move(callback)](jsi::Runtime &runtime) { - shouldYield_ = false; + runtimeAccessRequests_ -= 1; callback(runtime); startWorkLoop(runtime); }); @@ -51,7 +51,7 @@ std::shared_ptr RuntimeScheduler::scheduleTask( } bool RuntimeScheduler::getShouldYield() const noexcept { - return shouldYield_; + return runtimeAccessRequests_ > 0; } bool RuntimeScheduler::getIsSynchronous() const noexcept { @@ -76,11 +76,11 @@ void RuntimeScheduler::setEnableYielding(bool enableYielding) { void RuntimeScheduler::executeNowOnTheSameThread( std::function callback) { - shouldYield_ = true; + runtimeAccessRequests_ += 1; executeSynchronouslyOnSameThread_CAN_DEADLOCK( runtimeExecutor_, [this, callback = std::move(callback)](jsi::Runtime &runtime) { - shouldYield_ = false; + runtimeAccessRequests_ -= 1; isSynchronous_ = true; callback(runtime); isSynchronous_ = false; diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h index d5d0172784..647685e529 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h @@ -117,7 +117,12 @@ class RuntimeScheduler final { RuntimeExecutor const runtimeExecutor_; mutable SchedulerPriority currentPriority_{SchedulerPriority::NormalPriority}; - mutable std::atomic_bool shouldYield_{false}; + + /* + * Counter indicating how many access to the runtime have been requested. + */ + mutable std::atomic runtimeAccessRequests_{0}; + mutable std::atomic_bool isSynchronous_{false}; void startWorkLoop(jsi::Runtime &runtime) const; diff --git a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp index 7b88581360..0602122ca8 100644 --- a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp @@ -43,6 +43,7 @@ class RuntimeSchedulerTest : public testing::Test { runtimeScheduler_ = std::make_unique(runtimeExecutor, stubNow); + runtimeScheduler_->setEnableYielding(true); } jsi::Function createHostFunctionFromLambda( @@ -317,6 +318,7 @@ TEST_F(RuntimeSchedulerTest, getCurrentPriorityLevel) { } TEST_F(RuntimeSchedulerTest, scheduleWork) { + runtimeScheduler_->setEnableYielding(false); bool wasCalled = false; runtimeScheduler_->scheduleWork( [&](jsi::Runtime const &) { wasCalled = true; }); @@ -334,7 +336,6 @@ TEST_F(RuntimeSchedulerTest, scheduleWork) { } TEST_F(RuntimeSchedulerTest, scheduleWorkWithYielding) { - runtimeScheduler_->setEnableYielding(true); bool wasCalled = false; runtimeScheduler_->scheduleWork( [&](jsi::Runtime const &) { wasCalled = true; }); @@ -353,8 +354,6 @@ TEST_F(RuntimeSchedulerTest, scheduleWorkWithYielding) { } TEST_F(RuntimeSchedulerTest, normalTaskYieldsToPlatformEvent) { - runtimeScheduler_->setEnableYielding(true); - bool didRunJavaScriptTask = false; bool didRunPlatformWork = false; @@ -382,8 +381,6 @@ TEST_F(RuntimeSchedulerTest, normalTaskYieldsToPlatformEvent) { } TEST_F(RuntimeSchedulerTest, expiredTaskDoesntYieldToPlatformEvent) { - runtimeScheduler_->setEnableYielding(true); - bool didRunJavaScriptTask = false; bool didRunPlatformWork = false; @@ -412,8 +409,6 @@ TEST_F(RuntimeSchedulerTest, expiredTaskDoesntYieldToPlatformEvent) { } TEST_F(RuntimeSchedulerTest, immediateTaskDoesntYieldToPlatformEvent) { - runtimeScheduler_->setEnableYielding(true); - bool didRunJavaScriptTask = false; bool didRunPlatformWork = false; @@ -603,4 +598,42 @@ TEST_F(RuntimeSchedulerTest, sameThreadTaskCreatesLowPriorityTask) { EXPECT_EQ(stubQueue_->size(), 0); } +TEST_F(RuntimeSchedulerTest, twoThreadsRequestAccessToTheRuntime) { + bool didRunSynchronousTask = false; + bool didRunWork = false; + + runtimeScheduler_->scheduleWork( + [&didRunWork](jsi::Runtime &) { didRunWork = true; }); + + std::thread t1([this, &didRunSynchronousTask]() { + runtimeScheduler_->executeNowOnTheSameThread( + [&didRunSynchronousTask](jsi::Runtime &runtime) { + didRunSynchronousTask = true; + }); + }); + + auto hasTask = stubQueue_->waitForTasks(2, 1ms); + + EXPECT_TRUE(hasTask); + EXPECT_FALSE(didRunWork); + EXPECT_FALSE(didRunSynchronousTask); + EXPECT_TRUE(runtimeScheduler_->getShouldYield()); + EXPECT_EQ(stubQueue_->size(), 2); + + stubQueue_->tick(); + + EXPECT_TRUE(didRunWork); + EXPECT_FALSE(didRunSynchronousTask); + EXPECT_TRUE(runtimeScheduler_->getShouldYield()); + EXPECT_EQ(stubQueue_->size(), 1); + + stubQueue_->tick(); + + t1.join(); + + EXPECT_TRUE(didRunWork); + EXPECT_TRUE(didRunSynchronousTask); + EXPECT_FALSE(runtimeScheduler_->getShouldYield()); +} + } // namespace facebook::react diff --git a/ReactCommon/react/renderer/runtimescheduler/tests/StubQueue.h b/ReactCommon/react/renderer/runtimescheduler/tests/StubQueue.h index e81fb065c9..c7a7c634ce 100644 --- a/ReactCommon/react/renderer/runtimescheduler/tests/StubQueue.h +++ b/ReactCommon/react/renderer/runtimescheduler/tests/StubQueue.h @@ -53,6 +53,15 @@ class StubQueue { lock, timeout, [this]() { return !callbackQueue_.empty(); }); } + bool waitForTasks( + std::size_t numberOfTasks, + std::chrono::duration timeout) const { + std::unique_lock lock(mutex_); + return signal_.wait_for(lock, timeout, [this, numberOfTasks]() { + return numberOfTasks == callbackQueue_.size(); + }); + } + private: mutable std::condition_variable signal_; mutable std::mutex mutex_; From 70062c1322089f376540cfcf312c8d7675cb23dc Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Thu, 3 Feb 2022 11:08:56 -0800 Subject: [PATCH 040/109] ci: Add build tests for RNTester (#33033) Summary: Add 4 new jobs to CI in order to test RNTester builds on both Android and iOS using Hermes and JSC Closes https://github.com/facebook/react-native/issues/32676 ## Changelog [General] [Added] - Add build tests for RNTester to CircleCI Pull Request resolved: https://github.com/facebook/react-native/pull/33033 Test Plan: Make sure builds are working as expected and CI is green Reviewed By: lunaleaps Differential Revision: D33982864 Pulled By: philIip fbshipit-source-id: 00b2116be1b6484324e8162cc691b1d0863d282d --- .circleci/config.yml | 87 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a7929266e8..013cd142ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -588,6 +588,37 @@ jobs: name: Build the template application command: cd template/android/ && ./gradlew assembleDebug + # ------------------------- + # JOBS: Test Android RNTester + # ------------------------- + test_android_rntester: + executor: reactnativeandroid + parameters: + use_hermes: + type: boolean + default: false + steps: + - checkout + - run_yarn + + - run: + name: Generate artifacts for Maven + command: ./gradlew :ReactAndroid:installArchives + + - when: + condition: << parameters.use_hermes >> + steps: + - run: + name: Build RNTester with Hermes + command: ./gradlew :packages:rn-tester:android:app:assembleHermesDebug + - when: + condition: + not: << parameters.use_hermes >> + steps: + - run: + name: Build RNTester with JSC + command: ./gradlew :packages:rn-tester:android:app:assembleJscDebug + # ------------------------- # JOBS: Test iOS Template # ------------------------- @@ -621,6 +652,40 @@ jobs: -scheme $PROJECT_NAME \ -sdk iphonesimulator + # ------------------------- + # JOBS: Test iOS RNTester + # ------------------------- + test_ios_rntester: + executor: reactnativeios + parameters: + use_hermes: + type: boolean + default: false + steps: + - checkout + - run_yarn + + - when: + condition: << parameters.use_hermes >> + steps: + - run: + name: Set USE_HERMES=1 + command: echo "export USE_HERMES=1" >> $BASH_ENV + + - run: + name: Install CocoaPods dependencies + command: | + rm -rf packages/rn-tester/Pods + cd packages/rn-tester && bundle exec pod install + + - run: + name: Build RNTester + command: | + xcodebuild build \ + -workspace packages/rn-tester/RNTesterPods.xcworkspace \ + -scheme RNTester \ + -sdk iphonesimulator + # ------------------------- # JOBS: Windows # ------------------------- @@ -885,12 +950,34 @@ workflows: filters: branches: ignore: gh-pages + - test_android_rntester: + name: test_android_rntester_hermes + use_hermes: true + filters: + branches: + ignore: gh-pages + - test_android_rntester: + name: test_android_rntester_jsc + filters: + branches: + ignore: gh-pages - test_ios_template: requires: - build_npm_package filters: branches: ignore: gh-pages + - test_ios_rntester: + name: test_ios_rntester_hermes + use_hermes: true + filters: + branches: + ignore: gh-pages + - test_ios_rntester: + name: test_ios_rntester_jsc + filters: + branches: + ignore: gh-pages - test_ios: name: test_ios_unit_jsc run_unit_tests: true From 9cd43340a7e2443564c2ff5e8e85d37f6e1e47ef Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 3 Feb 2022 11:28:00 -0800 Subject: [PATCH 041/109] Attempt to fix crash during app termination Summary: changelog: Attempt to fix a crash during app termination on iOS in the new renderer We need to stop all surfaces before it is terminated to prevent app from crashing. The crash happens on background thread. The app crashes because it is probably accessing static variable that has been deallocated by the main thread. How can main thread deallocate things when background thread is still running? Because main thread is attached to our app's process, background thread is provided by the system and continues to live. Reviewed By: ShikaSD Differential Revision: D33977161 fbshipit-source-id: 87546d7b70d1aa465e63f0d37b70bae1fffa2304 --- React/Fabric/RCTSurfacePresenter.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 17ca2900ad..bab5da758a 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -99,6 +99,14 @@ static BackgroundExecutor RCTGetBackgroundExecutor() _observers = [NSMutableArray array]; _scheduler = [self _createScheduler]; + + auto reactNativeConfig = _contextContainer->at>("ReactNativeConfig"); + if (reactNativeConfig->getBool("react_native_new_architecture:suspend_before_app_termination")) { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_applicationWillTerminate) + name:UIApplicationWillTerminateNotification + object:nil]; + } } return self; @@ -327,6 +335,11 @@ static BackgroundExecutor RCTGetBackgroundExecutor() }]; } +- (void)_applicationWillTerminate +{ + [self suspend]; +} + #pragma mark - RCTSchedulerDelegate - (void)schedulerDidFinishTransaction:(MountingCoordinator::Shared const &)mountingCoordinator From b2f871a6fa9c92dd0712055384b9eca6d828e37d Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 3 Feb 2022 17:33:16 -0800 Subject: [PATCH 042/109] Fix crash with SectionList.scrollToLocation and private property munging Summary: Changelog: [General][Fixed] - Remove illegal private property access in VirtualizedSectionList.scrollToLocation `VirtualizedSectionList.scrollToLocation` internally uses `VirtualizedList`'s `_getFrameMetricsApprox` method. This method is private by convention (since it's `_`-prefixed), but under certain build setups this is also enforced at runtime, so using `scrollToLocation` can throw an error. Here, we rename this internal method to `__getFrameMetricsApprox` (adding another leading underscore) which opts it out of being treated as private, while still communicating that it's not part of the public API. We also delete the Flow error suppression that masked this issue. For reference: This convention for private methods (including the double-underscore opt out) has its roots in Facebook's pre-Babel [JSTransform](https://github.com/facebookarchive/jstransform/blob/master/visitors/es6-class-visitors.js) compiler and is implemented in Flow as [`munge_underscores=true`](https://flow.org/en/docs/config/options/#toc-munge-underscores-boolean). Reviewed By: yungsters Differential Revision: D33982339 fbshipit-source-id: 498563c59d42549c94fe90d363677d6d3ea35d2d --- Libraries/Lists/VirtualizedList.js | 36 +++++++++++------------ Libraries/Lists/VirtualizedSectionList.js | 3 +- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 6de43b77c4..2d491d4a6c 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -384,7 +384,7 @@ class VirtualizedList extends React.PureComponent { scrollToEnd(params?: ?{animated?: ?boolean, ...}) { const animated = params ? params.animated : true; const veryLast = this.props.getItemCount(this.props.data) - 1; - const frame = this._getFrameMetricsApprox(veryLast); + const frame = this.__getFrameMetricsApprox(veryLast); const offset = Math.max( 0, frame.offset + @@ -458,7 +458,7 @@ class VirtualizedList extends React.PureComponent { }); return; } - const frame = this._getFrameMetricsApprox(index); + const frame = this.__getFrameMetricsApprox(index); const offset = Math.max( 0, @@ -950,8 +950,8 @@ class VirtualizedList extends React.PureComponent { // See if there are any sticky headers in the virtualized space that we need to render. for (let ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) { if (stickyIndicesFromProps.has(ii + stickyOffset)) { - const initBlock = this._getFrameMetricsApprox(lastInitialIndex); - const stickyBlock = this._getFrameMetricsApprox(ii); + const initBlock = this.__getFrameMetricsApprox(lastInitialIndex); + const stickyBlock = this.__getFrameMetricsApprox(ii); const leadSpace = stickyBlock.offset - initBlock.offset - @@ -968,7 +968,7 @@ class VirtualizedList extends React.PureComponent { inversionStyle, ); const trailSpace = - this._getFrameMetricsApprox(first).offset - + this.__getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length); cells.push( , @@ -979,9 +979,9 @@ class VirtualizedList extends React.PureComponent { } } if (!insertedStickySpacer) { - const initBlock = this._getFrameMetricsApprox(lastInitialIndex); + const initBlock = this.__getFrameMetricsApprox(lastInitialIndex); const firstSpace = - this._getFrameMetricsApprox(first).offset - + this.__getFrameMetricsApprox(first).offset - (initBlock.offset + initBlock.length); cells.push( , @@ -1005,14 +1005,14 @@ class VirtualizedList extends React.PureComponent { this._hasWarned.keys = true; } if (!isVirtualizationDisabled && last < itemCount - 1) { - const lastFrame = this._getFrameMetricsApprox(last); + const lastFrame = this.__getFrameMetricsApprox(last); // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to // prevent the user for hyperscrolling into un-measured area because otherwise content will // likely jump around as it renders in above the viewport. const end = this.props.getItemLayout ? itemCount - 1 : Math.min(itemCount - 1, this._highestMeasuredFrameIndex); - const endFrame = this._getFrameMetricsApprox(end); + const endFrame = this.__getFrameMetricsApprox(end); const tailSpacerLength = endFrame.offset + endFrame.length - @@ -1419,7 +1419,7 @@ class VirtualizedList extends React.PureComponent { const framesInLayout = []; const itemCount = this.props.getItemCount(this.props.data); for (let ii = 0; ii < itemCount; ii++) { - const frame = this._getFrameMetricsApprox(ii); + const frame = this.__getFrameMetricsApprox(ii); /* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment * suppresses an error found when Flow v0.68 was deployed. To see the * error delete this comment and run Flow. */ @@ -1427,8 +1427,8 @@ class VirtualizedList extends React.PureComponent { framesInLayout.push(frame); } } - const windowTop = this._getFrameMetricsApprox(this.state.first).offset; - const frameLast = this._getFrameMetricsApprox(this.state.last); + const windowTop = this.__getFrameMetricsApprox(this.state.first).offset; + const frameLast = this.__getFrameMetricsApprox(this.state.last); const windowLen = frameLast.offset + frameLast.length - windowTop; const visTop = this._scrollMetrics.offset; const visLen = this._scrollMetrics.visibleLength; @@ -1642,7 +1642,7 @@ class VirtualizedList extends React.PureComponent { // Mark as high priority if we're close to the start of the first item // But only if there are items before the first rendered item if (first > 0) { - const distTop = offset - this._getFrameMetricsApprox(first).offset; + const distTop = offset - this.__getFrameMetricsApprox(first).offset; hiPri = hiPri || distTop < 0 || (velocity < -2 && distTop < scrollingThreshold); } @@ -1650,7 +1650,7 @@ class VirtualizedList extends React.PureComponent { // But only if there are items after the last rendered item if (last < itemCount - 1) { const distBottom = - this._getFrameMetricsApprox(last).offset - (offset + visibleLength); + this.__getFrameMetricsApprox(last).offset - (offset + visibleLength); hiPri = hiPri || distBottom < 0 || @@ -1752,7 +1752,7 @@ class VirtualizedList extends React.PureComponent { maxToRenderPerBatchOrDefault(this.props.maxToRenderPerBatch), windowSizeOrDefault(this.props.windowSize), state, - this._getFrameMetricsApprox, + this.__getFrameMetricsApprox, this._scrollMetrics, ); } @@ -1815,13 +1815,11 @@ class VirtualizedList extends React.PureComponent { return {index, item, key: this._keyExtractor(item, index), isViewable}; }; - _getFrameMetricsApprox = ( - index: number, - ): { + __getFrameMetricsApprox: (index: number) => { length: number, offset: number, ... - } => { + } = index => { const frame = this._getFrameMetrics(index); if (frame && frame.index === index) { // check for invalid frames due to row re-ordering diff --git a/Libraries/Lists/VirtualizedSectionList.js b/Libraries/Lists/VirtualizedSectionList.js index be818e4ae7..8c031d5497 100644 --- a/Libraries/Lists/VirtualizedSectionList.js +++ b/Libraries/Lists/VirtualizedSectionList.js @@ -137,8 +137,7 @@ class VirtualizedSectionList< return; } if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) { - // $FlowFixMe[prop-missing] Cannot access private property - const frame = this._listRef._getFrameMetricsApprox( + const frame = this._listRef.__getFrameMetricsApprox( index - params.itemIndex, ); viewOffset += frame.length; From 7ef14af81f3a1532ca1a703da666ea2e5a70a265 Mon Sep 17 00:00:00 2001 From: Pieter Vanderwerff Date: Thu, 3 Feb 2022 19:08:22 -0800 Subject: [PATCH 043/109] Deploy 0.171.0 to xplat Summary: Changelog: [Internal] Reviewed By: gkz Differential Revision: D33992472 fbshipit-source-id: 529c7d5545bbda8eb9660a461a091eeda13288df --- .flowconfig | 2 +- .flowconfig.android | 2 +- package.json | 2 +- repo-config/package.json | 2 +- template/_flowconfig | 2 +- yarn.lock | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.flowconfig b/.flowconfig index 966412cf11..ce4aacfb64 100644 --- a/.flowconfig +++ b/.flowconfig @@ -70,4 +70,4 @@ untyped-import untyped-type-import [version] -^0.170.0 +^0.171.0 diff --git a/.flowconfig.android b/.flowconfig.android index b3ff842705..3405fd77cf 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -70,4 +70,4 @@ untyped-import untyped-type-import [version] -^0.170.0 +^0.171.0 diff --git a/package.json b/package.json index 644cc18c67..c0c5376b08 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "ws": "^6.1.4" }, "devDependencies": { - "flow-bin": "^0.170.0", + "flow-bin": "^0.171.0", "react": "17.0.2" }, "codegenConfig": { diff --git a/repo-config/package.json b/repo-config/package.json index 2648991c51..388f8bf6e6 100644 --- a/repo-config/package.json +++ b/repo-config/package.json @@ -33,7 +33,7 @@ "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-native": "^3.11.0", "eslint-plugin-relay": "^1.8.2", - "flow-bin": "^0.170.0", + "flow-bin": "^0.171.0", "inquirer": "^7.1.0", "jest": "^26.6.3", "jest-junit": "^10.0.0", diff --git a/template/_flowconfig b/template/_flowconfig index 08c564b420..a9fe14877c 100644 --- a/template/_flowconfig +++ b/template/_flowconfig @@ -62,4 +62,4 @@ untyped-import untyped-type-import [version] -^0.170.0 +^0.171.0 diff --git a/yarn.lock b/yarn.lock index 5f26ac37a0..300c733fd7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3175,10 +3175,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== -flow-bin@^0.170.0: - version "0.170.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.170.0.tgz#1da264de9868cc20a338f801bedc370e3e06f5cc" - integrity sha512-h4qy4f5loKdeLhj7TRM6XQWhmPpnfjDcOg6GPDuJnLAQuB60LJIHZ8QL3hxMf0oA++NkiYx62Vr8oHu+UZ2bGQ== +flow-bin@^0.171.0: + version "0.171.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.171.0.tgz#43902cf3ab10704a9c8a96bd16f789d92490ba1c" + integrity sha512-2HEiXAyE60ztGs+loFk6XSskL69THL6tSjzopUcbwgfrdbuZ5Jhv23qh1jUKP5AZJh0NNwxaFZ6To2p6xR+GEA== flow-parser@0.*: version "0.163.0" From 8c5cacf30e52eb8fd19ec3dab24142d7ffe308f3 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Fri, 4 Feb 2022 05:26:04 -0800 Subject: [PATCH 044/109] Fix type import style in EventEmitter and Linking Summary: Changelog: [Internal] Fixes some files to use the preferred `import type {Foo}` syntax instead of `import {type Foo}`. Reviewed By: rh389 Differential Revision: D34001108 fbshipit-source-id: 64675fefa71b6832118eabc60c825c65b87514d9 --- Libraries/EventEmitter/NativeEventEmitter.js | 6 +++--- Libraries/EventEmitter/RCTDeviceEventEmitter.js | 3 ++- Libraries/EventEmitter/__mocks__/NativeEventEmitter.js | 6 +++--- Libraries/Linking/Linking.js | 2 +- Libraries/vendor/emitter/_EmitterSubscription.js | 2 +- Libraries/vendor/emitter/_EventEmitter.js | 2 +- Libraries/vendor/emitter/_EventSubscription.js | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Libraries/EventEmitter/NativeEventEmitter.js b/Libraries/EventEmitter/NativeEventEmitter.js index 1a615a0ee7..1c1d5366da 100644 --- a/Libraries/EventEmitter/NativeEventEmitter.js +++ b/Libraries/EventEmitter/NativeEventEmitter.js @@ -10,9 +10,9 @@ 'use strict'; -import { - type EventSubscription, - type IEventEmitter, +import type { + EventSubscription, + IEventEmitter, } from '../vendor/emitter/EventEmitter'; import Platform from '../Utilities/Platform'; import RCTDeviceEventEmitter from './RCTDeviceEventEmitter'; diff --git a/Libraries/EventEmitter/RCTDeviceEventEmitter.js b/Libraries/EventEmitter/RCTDeviceEventEmitter.js index 4b41b2fa7c..c9f182f765 100644 --- a/Libraries/EventEmitter/RCTDeviceEventEmitter.js +++ b/Libraries/EventEmitter/RCTDeviceEventEmitter.js @@ -8,7 +8,8 @@ * @format */ -import EventEmitter, {type IEventEmitter} from '../vendor/emitter/EventEmitter'; +import EventEmitter from '../vendor/emitter/EventEmitter'; +import type {IEventEmitter} from '../vendor/emitter/EventEmitter'; // FIXME: use typed events type RCTDeviceEventDefinitions = $FlowFixMe; diff --git a/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js b/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js index 136be278ee..fe388c81ff 100644 --- a/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +++ b/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js @@ -8,9 +8,9 @@ * @flow strict-local */ -import { - type EventSubscription, - type IEventEmitter, +import type { + EventSubscription, + IEventEmitter, } from '../../vendor/emitter/EventEmitter'; import RCTDeviceEventEmitter from '../RCTDeviceEventEmitter'; diff --git a/Libraries/Linking/Linking.js b/Libraries/Linking/Linking.js index 662e1e58bc..66124e637e 100644 --- a/Libraries/Linking/Linking.js +++ b/Libraries/Linking/Linking.js @@ -8,7 +8,7 @@ * @flow strict-local */ -import {type EventSubscription} from '../vendor/emitter/EventEmitter'; +import type {EventSubscription} from '../vendor/emitter/EventEmitter'; import NativeEventEmitter from '../EventEmitter/NativeEventEmitter'; import InteractionManager from '../Interaction/InteractionManager'; import Platform from '../Utilities/Platform'; diff --git a/Libraries/vendor/emitter/_EmitterSubscription.js b/Libraries/vendor/emitter/_EmitterSubscription.js index 6e701ec253..99c402a46f 100644 --- a/Libraries/vendor/emitter/_EmitterSubscription.js +++ b/Libraries/vendor/emitter/_EmitterSubscription.js @@ -13,7 +13,7 @@ import type EventEmitter from './EventEmitter'; import _EventSubscription from './_EventSubscription'; import type EventSubscriptionVendor from './_EventSubscriptionVendor'; -import {type EventSubscription} from './EventSubscription'; +import type {EventSubscription} from './EventSubscription'; /** * EmitterSubscription represents a subscription with listener and context data. diff --git a/Libraries/vendor/emitter/_EventEmitter.js b/Libraries/vendor/emitter/_EventEmitter.js index 39c076c538..b5e5a05b75 100644 --- a/Libraries/vendor/emitter/_EventEmitter.js +++ b/Libraries/vendor/emitter/_EventEmitter.js @@ -12,7 +12,7 @@ const invariant = require('invariant'); import EmitterSubscription from './_EmitterSubscription'; -import {type EventSubscription} from './EventSubscription'; +import type {EventSubscription} from './EventSubscription'; import EventSubscriptionVendor from './_EventSubscriptionVendor'; const sparseFilterPredicate = () => true; diff --git a/Libraries/vendor/emitter/_EventSubscription.js b/Libraries/vendor/emitter/_EventSubscription.js index 73331152d5..9dc35c738a 100644 --- a/Libraries/vendor/emitter/_EventSubscription.js +++ b/Libraries/vendor/emitter/_EventSubscription.js @@ -10,7 +10,7 @@ 'use strict'; -import {type EventSubscription} from './EventSubscription'; +import type {EventSubscription} from './EventSubscription'; import type EventSubscriptionVendor from './_EventSubscriptionVendor'; /** From 1b44e5c040e0f691e494689c1f81056eb9026243 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Fri, 4 Feb 2022 06:05:09 -0800 Subject: [PATCH 045/109] ci: Optimize Android RNTester build job (#33042) Summary: Optimize Android RNTester build workflow to run in a single job instead of running two separate Gradle invocations as Nicola suggested here https://github.com/facebook/react-native/pull/33033#discussion_r799066446 ## Changelog [General] [Changed] - Optimize CicleCI Android RNTester build job to run a single gradle invocation Pull Request resolved: https://github.com/facebook/react-native/pull/33042 Test Plan: Make sure builds are working as expected and CI is green Reviewed By: ShikaSD Differential Revision: D34001440 Pulled By: cortinico fbshipit-source-id: 90845482b69e5c2839d570db359223ee614ebf1b --- .circleci/config.yml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 013cd142ed..3f2ccd1572 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -593,10 +593,6 @@ jobs: # ------------------------- test_android_rntester: executor: reactnativeandroid - parameters: - use_hermes: - type: boolean - default: false steps: - checkout - run_yarn @@ -605,19 +601,9 @@ jobs: name: Generate artifacts for Maven command: ./gradlew :ReactAndroid:installArchives - - when: - condition: << parameters.use_hermes >> - steps: - - run: - name: Build RNTester with Hermes - command: ./gradlew :packages:rn-tester:android:app:assembleHermesDebug - - when: - condition: - not: << parameters.use_hermes >> - steps: - - run: - name: Build RNTester with JSC - command: ./gradlew :packages:rn-tester:android:app:assembleJscDebug + - run: + name: Assemble RNTester + command: ./gradlew :packages:rn-tester:android:app:assembleDebug # ------------------------- # JOBS: Test iOS Template @@ -951,13 +937,6 @@ workflows: branches: ignore: gh-pages - test_android_rntester: - name: test_android_rntester_hermes - use_hermes: true - filters: - branches: - ignore: gh-pages - - test_android_rntester: - name: test_android_rntester_jsc filters: branches: ignore: gh-pages From 2bc883e6b7ef116da67b7bc0c1db818d879cc52d Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Fri, 4 Feb 2022 07:17:52 -0800 Subject: [PATCH 046/109] Back out "Implement Runtime.getHeapUsage for hermes chrome inspector" Summary: The new messages are breaking SparkAR VSCode debugger Original commit changeset: 49d863e6a58d Original Phabricator Diff: D33616658 (https://github.com/facebook/react-native/commit/3568a7298738a651d76c70763362c297ab601ee8) Changelog: [Internal] Reviewed By: the-over-ape Differential Revision: D34003669 fbshipit-source-id: 5327820cda60d5f58521da56e2e1f5d824bf861d --- .../hermes/inspector/chrome/Connection.cpp | 18 ------- .../hermes/inspector/chrome/MessageTypes.cpp | 51 ------------------- .../hermes/inspector/chrome/MessageTypes.h | 25 --------- .../hermes/inspector/tools/message_types.txt | 1 - .../inspector/tools/msggen/package.json | 2 +- .../inspector/tools/msggen/src/index.js | 19 +------ .../hermes/inspector/tools/msggen/yarn.lock | 8 +-- ReactCommon/hermes/inspector/tools/run_msggen | 11 ++-- 8 files changed, 12 insertions(+), 123 deletions(-) diff --git a/ReactCommon/hermes/inspector/chrome/Connection.cpp b/ReactCommon/hermes/inspector/chrome/Connection.cpp index e554f654dc..2fa87b5386 100644 --- a/ReactCommon/hermes/inspector/chrome/Connection.cpp +++ b/ReactCommon/hermes/inspector/chrome/Connection.cpp @@ -103,7 +103,6 @@ class Connection::Impl : public inspector::InspectorObserver, void handle(const m::heapProfiler::GetHeapObjectIdRequest &req) override; void handle(const m::runtime::CallFunctionOnRequest &req) override; void handle(const m::runtime::EvaluateRequest &req) override; - void handle(const m::runtime::GetHeapUsageRequest &req) override; void handle(const m::runtime::GetPropertiesRequest &req) override; void handle(const m::runtime::RunIfWaitingForDebuggerRequest &req) override; @@ -1349,23 +1348,6 @@ Connection::Impl::makePropsFromValue( return result; } -void Connection::Impl::handle(const m::runtime::GetHeapUsageRequest &req) { - auto resp = std::make_shared(); - resp->id = req.id; - - inspector_ - ->executeIfEnabled( - "Runtime.getHeapUsage", - [this, req, resp](const debugger::ProgramState &state) { - auto heapInfo = getRuntime().instrumentation().getHeapInfo(false); - resp->usedSize = heapInfo["hermes_allocatedBytes"]; - resp->totalSize = heapInfo["hermes_heapSize"]; - }) - .via(executor_.get()) - .thenValue([this, resp](auto &&) { sendResponseToClient(*resp); }) - .thenError(sendErrorToClient(req.id)); -} - void Connection::Impl::handle(const m::runtime::GetPropertiesRequest &req) { auto resp = std::make_shared(); resp->id = req.id; diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp index d617c14c30..170f90593b 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp @@ -62,7 +62,6 @@ std::unique_ptr Request::fromJsonThrowOnError(const std::string &str) { makeUnique}, {"Runtime.callFunctionOn", makeUnique}, {"Runtime.evaluate", makeUnique}, - {"Runtime.getHeapUsage", makeUnique}, {"Runtime.getProperties", makeUnique}, {"Runtime.runIfWaitingForDebugger", makeUnique}, @@ -504,19 +503,12 @@ debugger::ResumeRequest::ResumeRequest(const dynamic &obj) : Request("Debugger.resume") { assign(id, obj, "id"); assign(method, obj, "method"); - - dynamic params = obj.at("params"); - assign(terminateOnResume, params, "terminateOnResume"); } dynamic debugger::ResumeRequest::toDynamic() const { - dynamic params = dynamic::object; - put(params, "terminateOnResume", terminateOnResume); - dynamic obj = dynamic::object; put(obj, "id", id); put(obj, "method", method); - put(obj, "params", std::move(params)); return obj; } @@ -905,14 +897,12 @@ heapProfiler::StopTrackingHeapObjectsRequest::StopTrackingHeapObjectsRequest( dynamic params = obj.at("params"); assign(reportProgress, params, "reportProgress"); assign(treatGlobalObjectsAsRoots, params, "treatGlobalObjectsAsRoots"); - assign(captureNumericValue, params, "captureNumericValue"); } dynamic heapProfiler::StopTrackingHeapObjectsRequest::toDynamic() const { dynamic params = dynamic::object; put(params, "reportProgress", reportProgress); put(params, "treatGlobalObjectsAsRoots", treatGlobalObjectsAsRoots); - put(params, "captureNumericValue", captureNumericValue); dynamic obj = dynamic::object; put(obj, "id", id); @@ -938,14 +928,12 @@ heapProfiler::TakeHeapSnapshotRequest::TakeHeapSnapshotRequest( dynamic params = obj.at("params"); assign(reportProgress, params, "reportProgress"); assign(treatGlobalObjectsAsRoots, params, "treatGlobalObjectsAsRoots"); - assign(captureNumericValue, params, "captureNumericValue"); } dynamic heapProfiler::TakeHeapSnapshotRequest::toDynamic() const { dynamic params = dynamic::object; put(params, "reportProgress", reportProgress); put(params, "treatGlobalObjectsAsRoots", treatGlobalObjectsAsRoots); - put(params, "captureNumericValue", captureNumericValue); dynamic obj = dynamic::object; put(obj, "id", id); @@ -1042,26 +1030,6 @@ void runtime::EvaluateRequest::accept(RequestHandler &handler) const { handler.handle(*this); } -runtime::GetHeapUsageRequest::GetHeapUsageRequest() - : Request("Runtime.getHeapUsage") {} - -runtime::GetHeapUsageRequest::GetHeapUsageRequest(const dynamic &obj) - : Request("Runtime.getHeapUsage") { - assign(id, obj, "id"); - assign(method, obj, "method"); -} - -dynamic runtime::GetHeapUsageRequest::toDynamic() const { - dynamic obj = dynamic::object; - put(obj, "id", id); - put(obj, "method", method); - return obj; -} - -void runtime::GetHeapUsageRequest::accept(RequestHandler &handler) const { - handler.handle(*this); -} - runtime::GetPropertiesRequest::GetPropertiesRequest() : Request("Runtime.getProperties") {} @@ -1316,25 +1284,6 @@ dynamic runtime::EvaluateResponse::toDynamic() const { return obj; } -runtime::GetHeapUsageResponse::GetHeapUsageResponse(const dynamic &obj) { - assign(id, obj, "id"); - - dynamic res = obj.at("result"); - assign(usedSize, res, "usedSize"); - assign(totalSize, res, "totalSize"); -} - -dynamic runtime::GetHeapUsageResponse::toDynamic() const { - dynamic res = dynamic::object; - put(res, "usedSize", usedSize); - put(res, "totalSize", totalSize); - - dynamic obj = dynamic::object; - put(obj, "id", id); - put(obj, "result", std::move(res)); - return obj; -} - runtime::GetPropertiesResponse::GetPropertiesResponse(const dynamic &obj) { assign(id, obj, "id"); diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.h b/ReactCommon/hermes/inspector/chrome/MessageTypes.h index 10ff9e4ca3..78468d6fb1 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.h +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.h @@ -59,8 +59,6 @@ struct ExceptionDetails; struct ExecutionContextCreatedNotification; struct ExecutionContextDescription; using ExecutionContextId = int; -struct GetHeapUsageRequest; -struct GetHeapUsageResponse; struct GetPropertiesRequest; struct GetPropertiesResponse; struct InternalPropertyDescriptor; @@ -129,7 +127,6 @@ struct RequestHandler { virtual void handle(const heapProfiler::TakeHeapSnapshotRequest &req) = 0; virtual void handle(const runtime::CallFunctionOnRequest &req) = 0; virtual void handle(const runtime::EvaluateRequest &req) = 0; - virtual void handle(const runtime::GetHeapUsageRequest &req) = 0; virtual void handle(const runtime::GetPropertiesRequest &req) = 0; virtual void handle(const runtime::RunIfWaitingForDebuggerRequest &req) = 0; }; @@ -165,7 +162,6 @@ struct NoopRequestHandler : public RequestHandler { void handle(const heapProfiler::TakeHeapSnapshotRequest &req) override {} void handle(const runtime::CallFunctionOnRequest &req) override {} void handle(const runtime::EvaluateRequest &req) override {} - void handle(const runtime::GetHeapUsageRequest &req) override {} void handle(const runtime::GetPropertiesRequest &req) override {} void handle(const runtime::RunIfWaitingForDebuggerRequest &req) override {} }; @@ -404,8 +400,6 @@ struct debugger::ResumeRequest : public Request { folly::dynamic toDynamic() const override; void accept(RequestHandler &handler) const override; - - folly::Optional terminateOnResume; }; struct debugger::SetBreakpointRequest : public Request { @@ -554,7 +548,6 @@ struct heapProfiler::StopTrackingHeapObjectsRequest : public Request { folly::Optional reportProgress; folly::Optional treatGlobalObjectsAsRoots; - folly::Optional captureNumericValue; }; struct heapProfiler::TakeHeapSnapshotRequest : public Request { @@ -566,7 +559,6 @@ struct heapProfiler::TakeHeapSnapshotRequest : public Request { folly::Optional reportProgress; folly::Optional treatGlobalObjectsAsRoots; - folly::Optional captureNumericValue; }; struct runtime::CallFunctionOnRequest : public Request { @@ -604,14 +596,6 @@ struct runtime::EvaluateRequest : public Request { folly::Optional awaitPromise; }; -struct runtime::GetHeapUsageRequest : public Request { - GetHeapUsageRequest(); - explicit GetHeapUsageRequest(const folly::dynamic &obj); - - folly::dynamic toDynamic() const override; - void accept(RequestHandler &handler) const override; -}; - struct runtime::GetPropertiesRequest : public Request { GetPropertiesRequest(); explicit GetPropertiesRequest(const folly::dynamic &obj); @@ -725,15 +709,6 @@ struct runtime::EvaluateResponse : public Response { folly::Optional exceptionDetails; }; -struct runtime::GetHeapUsageResponse : public Response { - GetHeapUsageResponse() = default; - explicit GetHeapUsageResponse(const folly::dynamic &obj); - folly::dynamic toDynamic() const override; - - double usedSize{}; - double totalSize{}; -}; - struct runtime::GetPropertiesResponse : public Response { GetPropertiesResponse() = default; explicit GetPropertiesResponse(const folly::dynamic &obj); diff --git a/ReactCommon/hermes/inspector/tools/message_types.txt b/ReactCommon/hermes/inspector/tools/message_types.txt index d2868e6ab3..8921a82925 100644 --- a/ReactCommon/hermes/inspector/tools/message_types.txt +++ b/ReactCommon/hermes/inspector/tools/message_types.txt @@ -32,6 +32,5 @@ Runtime.callFunctionOn Runtime.consoleAPICalled Runtime.evaluate Runtime.executionContextCreated -Runtime.getHeapUsage Runtime.getProperties Runtime.runIfWaitingForDebugger diff --git a/ReactCommon/hermes/inspector/tools/msggen/package.json b/ReactCommon/hermes/inspector/tools/msggen/package.json index b3dcba4544..6e42007bf6 100644 --- a/ReactCommon/hermes/inspector/tools/msggen/package.json +++ b/ReactCommon/hermes/inspector/tools/msggen/package.json @@ -12,7 +12,7 @@ "test": "jest" }, "dependencies": { - "devtools-protocol": "0.0.959523", + "devtools-protocol": "0.0.730699", "yargs": "^14.2.0" }, "devDependencies": { diff --git a/ReactCommon/hermes/inspector/tools/msggen/src/index.js b/ReactCommon/hermes/inspector/tools/msggen/src/index.js index eb9a4f3ba9..cf6f3d881e 100644 --- a/ReactCommon/hermes/inspector/tools/msggen/src/index.js +++ b/ReactCommon/hermes/inspector/tools/msggen/src/index.js @@ -41,7 +41,6 @@ const proto = mergeDomains(standard, custom); function parseDomains( domainObjs: Array, ignoreExperimental: boolean, - includeExperimental: Set, ): Descriptor { const desc = { types: [], @@ -60,12 +59,7 @@ function parseDomains( } for (const commandObj of obj.commands || []) { - const command = Command.create( - domain, - commandObj, - !includeExperimental.has(`${domain}.${commandObj.name}`) && - ignoreExperimental, - ); + const command = Command.create(domain, commandObj, ignoreExperimental); if (command) { desc.commands.push(command); } @@ -205,27 +199,18 @@ function main() { .boolean('e') .alias('e', 'ignore-experimental') .describe('e', 'ignore experimental commands, props, and types') - .alias('i', 'include-experimental') - .describe('i', 'experimental commands to include') .alias('r', 'roots') .describe('r', 'path to a file listing root types, events, and commands') .nargs('r', 1) .demandCommand(2, 2).argv; const ignoreExperimental = !!args.e; - const includeExperimental = new Set( - typeof args.i === 'string' ? args.i.split(',') : [], - ); const [headerPath, implPath] = args._; const headerStream = fs.createWriteStream(headerPath); const implStream = fs.createWriteStream(implPath); - const desc = parseDomains( - proto.domains, - ignoreExperimental, - includeExperimental, - ); + const desc = parseDomains(proto.domains, ignoreExperimental); const graph = buildGraph(desc); const roots = parseRoots(desc, String(args.roots)); diff --git a/ReactCommon/hermes/inspector/tools/msggen/yarn.lock b/ReactCommon/hermes/inspector/tools/msggen/yarn.lock index 40a0274628..b6b1be6b96 100644 --- a/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +++ b/ReactCommon/hermes/inspector/tools/msggen/yarn.lock @@ -2434,10 +2434,10 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -devtools-protocol@0.0.959523: - version "0.0.959523" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.959523.tgz#a7ce62c6b88876081fe5bec866f70e467bc021ba" - integrity sha512-taOcAND/oJA5FhJD2I3RA+I8RPdrpPJWwvMBPzTq7Sugev1xTOG3lgtlSfkh5xkjTYw0Ti2CRQq016goFHMoPQ== +devtools-protocol@0.0.730699: + version "0.0.730699" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.730699.tgz#4d18f6a9b7fb7cf3f1ffe73bfe14aad66cf3b2ef" + integrity sha512-dprBpuPzVIIXXL6GevzhvWe2wg836h3d5hY+n6IzzHbKLsUh6QlVmcIy15za0J3MhDFbmEH60s6uYsrw/tgBbw== diff-sequences@^26.6.2: version "26.6.2" diff --git a/ReactCommon/hermes/inspector/tools/run_msggen b/ReactCommon/hermes/inspector/tools/run_msggen index c349b70be6..053cb36737 100755 --- a/ReactCommon/hermes/inspector/tools/run_msggen +++ b/ReactCommon/hermes/inspector/tools/run_msggen @@ -2,25 +2,24 @@ set -e -DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd) +DIR=$(dirname "${BASH_SOURCE[0]}") cd "${DIR}/msggen" yarn install yarn build -MSGTYPES_PATH="${DIR}/message_types.txt" -HEADER_PATH="${DIR}/../chrome/MessageTypes.h" -CPP_PATH="${DIR}/../chrome/MessageTypes.cpp" +FBSOURCE=$(hg root) +MSGTYPES_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/tools/message_types.txt" +HEADER_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/chrome/MessageTypes.h" +CPP_PATH="${FBSOURCE}/xplat/js/react-native-github/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp" node bin/index.js \ --ignore-experimental \ - --include-experimental=Runtime.getHeapUsage \ --roots "$MSGTYPES_PATH" \ "$HEADER_PATH" "$CPP_PATH" clang-format -i --style=file "$HEADER_PATH" clang-format -i --style=file "$CPP_PATH" -FBSOURCE=$(hg root) "${FBSOURCE}/tools/signedsource" sign "$HEADER_PATH" "${FBSOURCE}/tools/signedsource" sign "$CPP_PATH" From 7cc7e6656424970ec98f7ce76017cb09efcfc4c4 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 4 Feb 2022 10:32:46 -0800 Subject: [PATCH 047/109] Update javadoc of ReactRoot.getState() Summary: Update javadoc of ReactRoot.getState() since the task was fixed and the API remained the same changelog: [internal] internal Reviewed By: javache Differential Revision: D33981298 fbshipit-source-id: 0136a640b884a787b0a20162781735630c1fa1c7 --- .../main/java/com/facebook/react/uimanager/ReactRoot.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java index ebfb0d002f..ddbb793243 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRoot.java @@ -65,11 +65,6 @@ public interface ReactRoot { @Nullable String getSurfaceID(); - /** - * This API is likely to change once the fix of T78832286 is confirmed TODO: T78832286 revisit - * this API - * - * @return an {@link AtomicInteger} that represents the state of the ReactRoot object. WARNING: - */ + /** @return an {@link AtomicInteger} that represents the state of the ReactRoot object. */ AtomicInteger getState(); } From b8a2f34deec97cc0c85842af1f35468627c5514c Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Fri, 4 Feb 2022 16:19:25 -0800 Subject: [PATCH 048/109] Make lefthandObjectDiff private to verifyComponentAttributeEquivalence Summary: ## Rationale verifyComponentAttributeEquivalence is the legacy check for making sure that Static ViewConfigs match Native ViewConfigs. Eventually, we should just delete this module/check from the codebase. ## Changes This diff migrates the RNHostComponentViewConfig differences screen to display the ViewConfig differences using the new StaticViewConfigValidator validation result vs the legacy validator's lefthandObjectDiff method. ## Benefits: - Now, **all the diffing logic** on this route uses the new StaticViewConfigValidator. - This takes us one step closer towards deleting verifyComponentAttributeEquivalence - StaticViewConfigValidator [supports ignoring ViewConfig properties](https://fburl.com/code/2it5r7py). Now, the RNHostComponentViewConfig respects these ignores. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D34017602 fbshipit-source-id: 3ad909adcbb95b932a269dd55dd5445834a9cfd4 --- .../StaticViewConfigValidator.js | 18 +++++++----------- .../verifyComponentAttributeEquivalence.js | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Libraries/NativeComponent/StaticViewConfigValidator.js b/Libraries/NativeComponent/StaticViewConfigValidator.js index ce48473d47..af9c18b734 100644 --- a/Libraries/NativeComponent/StaticViewConfigValidator.js +++ b/Libraries/NativeComponent/StaticViewConfigValidator.js @@ -15,7 +15,7 @@ import getNativeComponentAttributes from '../ReactNative/getNativeComponentAttri import {createViewConfig} from './ViewConfig'; import {isIgnored} from './ViewConfigIgnore'; -type Difference = +export type Difference = | { type: 'missing', path: Array, @@ -33,7 +33,7 @@ type Difference = staticValue: mixed, }; -type ValidationResult = ValidResult | InvalidResult; +export type ValidationResult = ValidResult | InvalidResult; type ValidResult = { type: 'valid', }; @@ -42,19 +42,15 @@ type InvalidResult = { differences: Array, }; -type ViewConfigValidationResult = { +// e.g. require('MyNativeComponent') where MyNativeComponent.js exports a HostComponent +type JSModule = $FlowFixMe; + +export function validateStaticViewConfigs(nativeComponent: JSModule): { componentName: string, nativeViewConfig?: ?ViewConfig, staticViewConfig?: ?ViewConfig, validationResult?: ?ValidationResult, -}; - -// e.g. require('MyNativeComponent') where MyNativeComponent.js exports a HostComponent -type JSModule = $FlowFixMe; - -export function validateStaticViewConfigs( - nativeComponent: JSModule, -): ViewConfigValidationResult { +} { const nativeViewConfig = getNativeComponentAttributes( nativeComponent.default || nativeComponent, ); diff --git a/Libraries/Utilities/verifyComponentAttributeEquivalence.js b/Libraries/Utilities/verifyComponentAttributeEquivalence.js index 684a888e6e..225707fcca 100644 --- a/Libraries/Utilities/verifyComponentAttributeEquivalence.js +++ b/Libraries/Utilities/verifyComponentAttributeEquivalence.js @@ -62,7 +62,7 @@ export default function verifyComponentAttributeEquivalence( // Return the different key-value pairs of the right object, by iterating through the keys in the left object // Note it won't return a difference where a key is missing in the left but exists the right. -export function lefthandObjectDiff(leftObj: Object, rightObj: Object): Object { +function lefthandObjectDiff(leftObj: Object, rightObj: Object): Object { const differentKeys = {}; function compare(leftItem: any, rightItem: any, key: string) { From be260b9f479a3b55ee43d2959d2c49fd3c1eb4ac Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Fri, 4 Feb 2022 16:20:33 -0800 Subject: [PATCH 049/109] Fix ScrollView contentOffset Summary: When setting ScrollView's contentOffset, if the ScrollView hasn't been laid out yet when ReactScrollViewManager.setContentOffset is called, then scroll position is never set properly. This is because the actual scroll offset (0, 0) was being passed into setPendingContentOffsets, instead of the desired scroll offset. Thus, when ReactScrollView.onLayout gets called, ReactScrollView.scrollTo gets called with (0, 0). Also updates out of date comments, Changelog: [Android][Fixed] - Fix ScrollView contentOffset Reviewed By: ryancat Differential Revision: D34015853 fbshipit-source-id: 84141a663fdb0ace2be7cef61f14944cb08125d1 --- .../react/views/scroll/ReactScrollView.java | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java index e9b99417a4..8624f648dd 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java @@ -254,8 +254,8 @@ public class ReactScrollView extends ScrollView @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { // Call with the present values in order to re-layout if necessary - // If a "pending" value has been set, we restore that value. - // That value gets cleared by reactScrollTo. + // If a "pending" content offset value has been set, we restore that value. + // Upon call to scrollTo, the "pending" values will be re-set. int scrollToX = pendingContentOffsetX != UNSET_CONTENT_OFFSET ? pendingContentOffsetX : getScrollX(); int scrollToY = @@ -954,23 +954,21 @@ public class ReactScrollView extends ScrollView } /** - * Calls `reactScrollTo` and updates state. + * Calls `updateFabricScrollState` and updates state. * - *

`reactScrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync between - * scroll view and state. Calling raw `reactScrollTo` doesn't update state. - * - *

Note that while we can override scrollTo, we *cannot* override `smoothScrollTo` because it - * is final. See `reactSmoothScrollTo`. + *

`scrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync between + * scroll view and state. Calling ScrollView's `scrollTo` doesn't update state. */ @Override public void scrollTo(int x, int y) { super.scrollTo(x, y); - // The final scroll position might be different from (x, y). For example, we may need to scroll - // to the last item in the list, but that item cannot be move to the start position of the view. - final int actualX = getScrollX(); - final int actualY = getScrollY(); - ReactScrollViewHelper.updateFabricScrollState(this, actualX, actualY); - setPendingContentOffsets(actualX, actualY); + ReactScrollViewHelper.updateFabricScrollState(this); + setPendingContentOffsets(x, y); + } + + private boolean isContentReady() { + View child = getChildAt(0); + return child != null && child.getWidth() != 0 && child.getHeight() != 0; } /** @@ -981,8 +979,7 @@ public class ReactScrollView extends ScrollView * @param y */ private void setPendingContentOffsets(int x, int y) { - View child = getChildAt(0); - if (child != null && child.getWidth() != 0 && child.getHeight() != 0) { + if (isContentReady()) { pendingContentOffsetX = UNSET_CONTENT_OFFSET; pendingContentOffsetY = UNSET_CONTENT_OFFSET; } else { From 3633a05299d99b12acc5c3c056b977463df1924e Mon Sep 17 00:00:00 2001 From: Moses DeJong Date: Fri, 4 Feb 2022 18:14:31 -0800 Subject: [PATCH 050/109] Invoke registerForRemoteNotifications on main UI thread to avoid error messages in Xcode Summary: Invoke registerForRemoteNotifications on main UI thread to avoid error messages in Xcode. Changelog: [iOS][Fixed] - Invoke registerForRemoteNotifications on main UI thread. Reviewed By: philIip Differential Revision: D33780141 fbshipit-source-id: 64b825dfc15e7ac262e210b90bb334a7e415e402 --- .../PushNotificationIOS/RCTPushNotificationManager.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm b/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm index a56a88edf7..21d613b5b3 100644 --- a/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +++ b/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm @@ -313,10 +313,12 @@ RCT_EXPORT_METHOD(requestPermissions:(JS::NativePushNotificationManagerIOS::Spec if (error != NULL) { reject(@"-1", @"Error - Push authorization request failed.", error); } else { - [RCTSharedApplication() registerForRemoteNotifications]; - [UNUserNotificationCenter.currentNotificationCenter getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) { - resolve(RCTPromiseResolveValueForUNNotificationSettings(settings)); - }]; + dispatch_async(dispatch_get_main_queue(), ^{ + [RCTSharedApplication() registerForRemoteNotifications]; + [UNUserNotificationCenter.currentNotificationCenter getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) { + resolve(RCTPromiseResolveValueForUNNotificationSettings(settings)); + }]; + }); } }]; } From eb1949948406195c4c02c6041d07cba074ae820c Mon Sep 17 00:00:00 2001 From: Moses DeJong Date: Fri, 4 Feb 2022 18:14:31 -0800 Subject: [PATCH 051/109] Enable custom sound for local notification in PushNotificationIOS Summary: Add soundName property in NativePushNotificationManagerIOS JS module and deliver to native local notification API. Changelog: [iOS][Fixed] - Enable custom sound for local push notifications. Reviewed By: RSNara Differential Revision: D33898630 fbshipit-source-id: c6362032601f0f6d20479465ce1f0a84c450ea72 --- .../PushNotificationIOS/NativePushNotificationManagerIOS.js | 1 + Libraries/PushNotificationIOS/RCTPushNotificationManager.mm | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js b/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js index e4252de820..93f79effa9 100644 --- a/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +++ b/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js @@ -29,6 +29,7 @@ type Notification = {| +repeatInterval?: ?string, +applicationIconBadgeNumber?: ?number, +isSilent?: ?boolean, + +soundName?: ?string, |}; export interface Spec extends TurboModule { diff --git a/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm b/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm index 21d613b5b3..d767641cd2 100644 --- a/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +++ b/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm @@ -367,6 +367,9 @@ RCT_EXPORT_METHOD(presentLocalNotification:(JS::NativePushNotificationManagerIOS } if (notification.isSilent()) { notificationDict[@"isSilent"] = @(*notification.isSilent()); + if ([notificationDict[@"isSilent"] isEqualToNumber:@(NO)]) { + notificationDict[@"soundName"] = notification.soundName(); + } } [RCTSharedApplication() presentLocalNotificationNow:[RCTConvert UILocalNotification:notificationDict]]; } @@ -388,6 +391,9 @@ RCT_EXPORT_METHOD(scheduleLocalNotification:(JS::NativePushNotificationManagerIO } if (notification.isSilent()) { notificationDict[@"isSilent"] = @(*notification.isSilent()); + if ([notificationDict[@"isSilent"] isEqualToNumber:@(NO)]) { + notificationDict[@"soundName"] = notification.soundName(); + } } [RCTSharedApplication() scheduleLocalNotification:[RCTConvert UILocalNotification:notificationDict]]; } From 113f8257ce1cb28929e92da2d3c81c413e0d4396 Mon Sep 17 00:00:00 2001 From: Phillip Pan Date: Fri, 4 Feb 2022 21:49:10 -0800 Subject: [PATCH 052/109] lift out prerendering logic into its own module Summary: this is to break any unique dependencies this module is bringing in from the original module it was in. Reviewed By: sammy-SC Differential Revision: D33935581 fbshipit-source-id: 2ccf5b4a9d1dca1e6059cafb888091e450f6f980 --- BUCK | 1 + 1 file changed, 1 insertion(+) diff --git a/BUCK b/BUCK index c07b0f5d1c..cdbf57b399 100644 --- a/BUCK +++ b/BUCK @@ -434,6 +434,7 @@ rn_xplat_cxx_library2( "//fbobjc/Libraries/FBQPLMetadataProviders/...", "//fbobjc/Libraries/FBReactKit/...", "//fbobjc/Libraries/FBiOSSecurityUtils/...", + "//fbobjc/Libraries/RCTPrerendering/...", "//fbobjc/VendorLib/react-native-maps:react-native-maps", "//xplat/js:", "//xplat/js/react-native-github/React/...", From 3eddc9abb70eb54209c68aab7dbd69e363cc7b29 Mon Sep 17 00:00:00 2001 From: Hetan Thakkar Date: Mon, 7 Feb 2022 04:20:47 -0800 Subject: [PATCH 053/109] Opacity in TouchableOpacity properly react to state change (#32956) Summary: This PR fixes the opacity bug where it fails to properly react to state change. This PR resolves the issue detailed in https://github.com/facebook/react-native/issues/32476 ## Changelog [General] [Fixed] - Fixed opacity value in TouchableOpacity Pull Request resolved: https://github.com/facebook/react-native/pull/32956 Test Plan: The code I added in componentDidUpdate does solve the issue and passes all the test cases Reviewed By: ryancat Differential Revision: D33766718 Pulled By: cortinico fbshipit-source-id: 951bedf22619fc12e66156d0a6074cd8adf1d3eb --- Libraries/Components/Touchable/TouchableOpacity.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/Components/Touchable/TouchableOpacity.js b/Libraries/Components/Touchable/TouchableOpacity.js index 089c50c008..6d78af53a9 100644 --- a/Libraries/Components/Touchable/TouchableOpacity.js +++ b/Libraries/Components/Touchable/TouchableOpacity.js @@ -260,7 +260,12 @@ class TouchableOpacity extends React.Component { componentDidUpdate(prevProps: Props, prevState: State) { this.state.pressability.configure(this._createPressabilityConfig()); - if (this.props.disabled !== prevProps.disabled) { + if ( + this.props.disabled !== prevProps.disabled || + (flattenStyle(prevProps.style)?.opacity !== + flattenStyle(this.props.style)?.opacity) !== + undefined + ) { this._opacityInactive(250); } } From ee454e4f0bf4719737dcbdf60b81fe1448a65c27 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Mon, 7 Feb 2022 06:51:32 -0800 Subject: [PATCH 054/109] Add description to ConcreteComponentDescriptor::adopt Summary: changelog: [internal] Reviewed By: javache Differential Revision: D34041312 fbshipit-source-id: 3b6d650034481813273f67444426e2fa5cb7d59f --- .../renderer/core/ConcreteComponentDescriptor.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h b/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h index 0632dfd39c..e2d515543d 100644 --- a/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +++ b/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h @@ -179,6 +179,18 @@ class ConcreteComponentDescriptor : public ComponentDescriptor { } protected: + /* + * Called immediatelly after `ShadowNode` is created or cloned. + * + * Override this method to pass information from custom `ComponentDescriptor` + * to new instance of `ShadowNode`. + * + * Example usages: + * - Inject image manager to `ImageShadowNode` in + * `ImageComponentDescriptor`. + * - Set `ShadowNode`'s size from state in + * `ModalHostViewComponentDescriptor`. + */ virtual void adopt(ShadowNode::Unshared const &shadowNode) const { // Default implementation does nothing. react_native_assert( From 31a92b008dbdab75bca358632d7f6b888fbe7a24 Mon Sep 17 00:00:00 2001 From: Raphael Herouart Date: Mon, 7 Feb 2022 07:53:31 -0800 Subject: [PATCH 055/109] Add some tests for compliance to the Chrome DevTools Protocol Summary: Some test to make sure hermes engine follows the Chrome DevTools Protocol for all implemented Debugger Messages Changelog: [Internal] Reviewed By: ShikaSD Differential Revision: D34042008 fbshipit-source-id: 3a074e9840706ca977ff86d050e67b0dcea5c7ef --- .../inspector/chrome/tests/MessageTests.cpp | 649 +++++++++++++++++- 1 file changed, 648 insertions(+), 1 deletion(-) diff --git a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp index 1bd85d669e..51a64f533e 100644 --- a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp +++ b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp @@ -52,6 +52,7 @@ TEST(MessageTests, testDeserializeSomeFieldsInRequest) { )"); debugger::SetBreakpointByUrlRequest req(message); + EXPECT_EQ(req.toDynamic(), message); EXPECT_EQ(req.id, 10); EXPECT_EQ(req.method, "Debugger.setBreakpointByUrl"); EXPECT_EQ(req.lineNumber, 42); @@ -151,7 +152,7 @@ TEST(MessageTests, testDeserializeResponse) { } })"); debugger::SetBreakpointByUrlResponse resp(message); - + EXPECT_EQ(resp.toDynamic(), message); EXPECT_EQ(resp.id, 1); EXPECT_EQ(resp.breakpointId, "myBreakpointId"); EXPECT_EQ(resp.locations.size(), 1); @@ -455,6 +456,652 @@ TEST(MessageTests, TestRequestHandler) { EXPECT_EQ(handler.removeReq.breakpointId, "foobar"); } +TEST(MessageTests, testEnableRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.enable" + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::EnableRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::EnableRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.enable"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); +} + +TEST(MessageTests, testDisableRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.disable" + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::DisableRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::DisableRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.disable"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); +} + +TEST(MessageTests, testEvaluateOnCallFrameRequestMinimal) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.evaluateOnCallFrame", + "params":{ + "callFrameId" : "42", + "expression": "Foo Bar" + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::EvaluateOnCallFrameRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::EvaluateOnCallFrameRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.evaluateOnCallFrame"); + EXPECT_EQ(resolvedReq->callFrameId, "42"); + EXPECT_EQ(resolvedReq->expression, "Foo Bar"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->callFrameId, deserializedReq.callFrameId); + EXPECT_EQ(resolvedReq->expression, deserializedReq.expression); + + EXPECT_FALSE(resolvedReq->objectGroup.hasValue()); + EXPECT_FALSE(resolvedReq->includeCommandLineAPI.hasValue()); + EXPECT_FALSE(resolvedReq->silent.hasValue()); + EXPECT_FALSE(resolvedReq->returnByValue.hasValue()); + EXPECT_FALSE(resolvedReq->throwOnSideEffect.hasValue()); +} + +TEST(MessageTests, testEvaluateOnCallFrameRequestFull) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.evaluateOnCallFrame", + "params":{ + "callFrameId" : "42", + "expression": "Foo Bar", + "objectGroup" : "FooBarGroup", + "includeCommandLineAPI" : false, + "silent" : true, + "returnByValue" : false, + "throwOnSideEffect" : true + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::EvaluateOnCallFrameRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::EvaluateOnCallFrameRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics, resolvedReq is correct + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.evaluateOnCallFrame"); + EXPECT_EQ(resolvedReq->callFrameId, "42"); + EXPECT_EQ(resolvedReq->expression, "Foo Bar"); + + EXPECT_TRUE(resolvedReq->objectGroup.hasValue()); + EXPECT_TRUE(resolvedReq->includeCommandLineAPI.hasValue()); + EXPECT_TRUE(resolvedReq->silent.hasValue()); + EXPECT_TRUE(resolvedReq->returnByValue.hasValue()); + EXPECT_TRUE(resolvedReq->throwOnSideEffect.hasValue()); + + EXPECT_TRUE(resolvedReq->objectGroup.value() == "FooBarGroup"); + EXPECT_TRUE(resolvedReq->includeCommandLineAPI.value() == false); + EXPECT_TRUE(resolvedReq->silent.value() == true); + EXPECT_TRUE(resolvedReq->returnByValue.value() == false); + EXPECT_TRUE(resolvedReq->throwOnSideEffect.value() == true); + + // Specifics, resolvedReq and deserialized match + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->callFrameId, deserializedReq.callFrameId); + EXPECT_EQ(resolvedReq->expression, deserializedReq.expression); + EXPECT_EQ( + resolvedReq->objectGroup.value(), deserializedReq.objectGroup.value()); + EXPECT_EQ( + resolvedReq->includeCommandLineAPI.value(), + deserializedReq.includeCommandLineAPI.value()); + EXPECT_EQ(resolvedReq->silent.value(), deserializedReq.silent.value()); + EXPECT_EQ( + resolvedReq->returnByValue.value(), + deserializedReq.returnByValue.value()); + EXPECT_EQ( + resolvedReq->throwOnSideEffect.value(), + deserializedReq.throwOnSideEffect.value()); +} + +TEST(MessageTests, testPauseRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.pause" + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::PauseRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::PauseRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.pause"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); +} + +TEST(MessageTests, testRemoveBreakpointRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.removeBreakpoint", + "params":{ + "breakpointId" : "42" + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::RemoveBreakpointRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::RemoveBreakpointRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.removeBreakpoint"); + EXPECT_TRUE(resolvedReq->breakpointId == "42"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->breakpointId, deserializedReq.breakpointId); +} + +TEST(MessageTests, testResumeRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.resume" + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::ResumeRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::ResumeRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.resume"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); +} + +TEST(MessageTests, testSetBreakpointRequestMinimal) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.setBreakpoint", + "params":{ + "location" : + { + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + } + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::SetBreakpointRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetBreakpointRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + debugger::Location location; + location.scriptId = "myScriptId"; + location.lineNumber = 2; + location.columnNumber = 3; + + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.setBreakpoint"); + EXPECT_EQ(resolvedReq->location.scriptId, "myScriptId"); + EXPECT_EQ(resolvedReq->location.lineNumber, 2); + EXPECT_EQ(resolvedReq->location.columnNumber, 3); + + EXPECT_FALSE(resolvedReq->condition.hasValue()); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->location.scriptId, deserializedReq.location.scriptId); + EXPECT_EQ( + resolvedReq->location.lineNumber, deserializedReq.location.lineNumber); + EXPECT_EQ( + resolvedReq->location.columnNumber, + deserializedReq.location.columnNumber); +} + +TEST(MessageTests, testSetBreakpointRequestFull) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.setBreakpoint", + "params":{ + "location" : + { + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + }, + "condition": "FooBarCondition" + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::SetBreakpointRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetBreakpointRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.setBreakpoint"); + EXPECT_EQ(resolvedReq->location.scriptId, "myScriptId"); + EXPECT_EQ(resolvedReq->location.lineNumber, 2); + EXPECT_EQ(resolvedReq->location.columnNumber, 3); + + EXPECT_TRUE(resolvedReq->condition.hasValue()); + EXPECT_EQ(resolvedReq->condition.value(), "FooBarCondition"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->location.scriptId, deserializedReq.location.scriptId); + EXPECT_EQ( + resolvedReq->location.lineNumber, deserializedReq.location.lineNumber); + EXPECT_EQ( + resolvedReq->location.columnNumber, + deserializedReq.location.columnNumber); + EXPECT_EQ(resolvedReq->condition.value(), deserializedReq.condition.value()); +} + +TEST(MessageTests, testSetBreakpointByUrlRequestMinimal) { + std::string message = R"( + { + "id": 1, + "method": "Debugger.setBreakpointByUrl", + "params": { + "lineNumber": 2 + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::SetBreakpointByUrlRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetBreakpointByUrlRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 1); + EXPECT_EQ(resolvedReq->method, "Debugger.setBreakpointByUrl"); + EXPECT_EQ(resolvedReq->lineNumber, 2); + + EXPECT_FALSE(resolvedReq->condition.hasValue()); + EXPECT_FALSE(resolvedReq->columnNumber.hasValue()); + EXPECT_FALSE(resolvedReq->url.hasValue()); + EXPECT_FALSE(resolvedReq->urlRegex.hasValue()); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->lineNumber, deserializedReq.lineNumber); +} + +TEST(MessageTests, testSetBreakpointByUrlRequestFull) { + std::string message = R"( + { + "id": 1, + "method": "Debugger.setBreakpointByUrl", + "params": { + "lineNumber": 2, + "columnNumber": 3, + "condition": "foo == 42", + "url": "http://example.com/example.js", + "urlRegex": "http://example.com/.*" + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::SetBreakpointByUrlRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetBreakpointByUrlRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 1); + EXPECT_EQ(resolvedReq->method, "Debugger.setBreakpointByUrl"); + EXPECT_EQ(resolvedReq->lineNumber, 2); + + EXPECT_TRUE(resolvedReq->condition.hasValue()); + EXPECT_EQ(resolvedReq->condition.value(), "foo == 42"); + EXPECT_TRUE(resolvedReq->columnNumber.hasValue()); + EXPECT_EQ(resolvedReq->columnNumber.value(), 3); + EXPECT_TRUE(resolvedReq->url.hasValue()); + EXPECT_EQ(resolvedReq->url.value(), "http://example.com/example.js"); + EXPECT_TRUE(resolvedReq->urlRegex.hasValue()); + EXPECT_EQ(resolvedReq->urlRegex.value(), "http://example.com/.*"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->lineNumber, deserializedReq.lineNumber); + EXPECT_EQ(resolvedReq->condition.value(), deserializedReq.condition.value()); + EXPECT_EQ( + resolvedReq->columnNumber.value(), deserializedReq.columnNumber.value()); + EXPECT_EQ(resolvedReq->url.value(), deserializedReq.url.value()); + EXPECT_EQ(resolvedReq->urlRegex.value(), deserializedReq.urlRegex.value()); +} + +TEST(MessageTests, testSetBreakpointsActiveRequest) { + std::string message = R"( + { + "id": 1, + "method": "Debugger.setBreakpointsActive", + "params": { + "active": true + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::SetBreakpointsActiveRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetBreakpointsActiveRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 1); + EXPECT_EQ(resolvedReq->method, "Debugger.setBreakpointsActive"); + EXPECT_EQ(resolvedReq->active, true); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->active, deserializedReq.active); +} + +TEST(MessageTests, testSetInstrumentationBreakpointRequest) { + std::string message = R"( + { + "id": 1, + "method": "Debugger.setInstrumentationBreakpoint", + "params": { + "instrumentation": "TODO: THIS SHOUD NOT BE ACCEPTED BY ENUM" + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::SetInstrumentationBreakpointRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetInstrumentationBreakpointRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 1); + EXPECT_EQ(resolvedReq->method, "Debugger.setInstrumentationBreakpoint"); + EXPECT_EQ( + resolvedReq->instrumentation, "TODO: THIS SHOUD NOT BE ACCEPTED BY ENUM"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->instrumentation, deserializedReq.instrumentation); +} + +TEST(MessageTests, testSetPauseOnExceptionsRequest) { + std::string message = R"( + { + "id": 1, + "method": "Debugger.setPauseOnExceptions", + "params": { + "state": "TODO: THIS SHOUD NOT BE ACCEPTED BY ENUM" + } + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::SetPauseOnExceptionsRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetPauseOnExceptionsRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 1); + EXPECT_EQ(resolvedReq->method, "Debugger.setPauseOnExceptions"); + EXPECT_EQ(resolvedReq->state, "TODO: THIS SHOUD NOT BE ACCEPTED BY ENUM"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); + EXPECT_EQ(resolvedReq->state, deserializedReq.state); +} + +TEST(MessageTests, testStepIntoRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.stepInto" + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::StepIntoRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::StepIntoRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.stepInto"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); +} + +TEST(MessageTests, testStepOutRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.stepOut" + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::StepOutRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::StepOutRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.stepOut"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); +} + +TEST(MessageTests, testStepOverRequest) { + std::string message = R"( + { + "id": 10, + "method": "Debugger.stepOver" + } + )"; + + // Builder does not throw + auto req = Request::fromJsonThrowOnError(message); + debugger::StepOverRequest *resolvedReq = + dynamic_cast(req.get()); + + // Builder returns correct type + EXPECT_FALSE(resolvedReq == nullptr); + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::StepOverRequest deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(resolvedReq->id, 10); + EXPECT_EQ(resolvedReq->method, "Debugger.stepOver"); + + EXPECT_EQ(resolvedReq->id, deserializedReq.id); + EXPECT_EQ(resolvedReq->method, deserializedReq.method); +} + } // namespace message } // namespace chrome } // namespace inspector From b0bae2124959c5aa8a047769556ef3ebd7615da5 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Mon, 7 Feb 2022 08:17:39 -0800 Subject: [PATCH 056/109] Improve error when using mutable object as prop Summary: I was trying to add an object property to my ViewManager and got a really opaque error (and I almost thought Objects weren't supported by the codegen) until I realized it expected the object to wrapped in a $ReadOnly type. Changelog: [Internal] Improved error in codegen Reviewed By: mdvacca Differential Revision: D34006557 fbshipit-source-id: b3ab15a40cb66fdcd377f4e68df92060498e8e7f --- .../react-native-codegen/src/parsers/flow/components/props.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-native-codegen/src/parsers/flow/components/props.js b/packages/react-native-codegen/src/parsers/flow/components/props.js index 24e08b4493..1c7982da78 100644 --- a/packages/react-native-codegen/src/parsers/flow/components/props.js +++ b/packages/react-native-codegen/src/parsers/flow/components/props.js @@ -319,6 +319,10 @@ function getTypeAnnotation( `Unsupported union type for "${name}", received "${unionType}"`, ); } + case 'ObjectTypeAnnotation': + throw new Error( + `Cannot use "${type}" type annotation for "${name}": object types must be declared using $ReadOnly<>`, + ); case 'NumberTypeAnnotation': throw new Error( `Cannot use "${type}" type annotation for "${name}": must use a specific numeric type like Int32, Double, or Float`, From d79f6580169c01d2926aff23bdf0b431a411646d Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Mon, 7 Feb 2022 09:56:15 -0800 Subject: [PATCH 057/109] Rename RuntimeScheduler::callImmediates to RuntimeScheduelr::callExpiredTasks Summary: changelog: [internal] Rename method so it does not collide with immediates that already exist in React Native. Reviewed By: javache Differential Revision: D34041418 fbshipit-source-id: 0ae75b683983c3be50320b195a7068d7178b0ed8 --- .../renderer/runtimescheduler/RuntimeScheduler.cpp | 2 +- .../renderer/runtimescheduler/RuntimeScheduler.h | 11 +++++------ .../runtimescheduler/tests/RuntimeSchedulerTest.cpp | 4 ++-- ReactCommon/react/renderer/scheduler/Scheduler.cpp | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp index f03c1836b8..b12c4e390d 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp @@ -92,7 +92,7 @@ void RuntimeScheduler::executeNowOnTheSameThread( scheduleWorkLoopIfNecessary(); } -void RuntimeScheduler::callImmediates(jsi::Runtime &runtime) { +void RuntimeScheduler::callExpiredTasks(jsi::Runtime &runtime) { auto previousPriority = currentPriority_; try { while (!taskQueue_.empty()) { diff --git a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h index 647685e529..f55d505221 100644 --- a/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +++ b/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h @@ -97,15 +97,14 @@ class RuntimeScheduler final { RuntimeSchedulerTimePoint now() const noexcept; /* - * Immediate is a task that is expired and should have been already executed - * or has priority set to Immediate. Designed to be called in the event - * pipeline after an event is dispatched to React. React may schedule events - * with immediate priority which need to be handled before the next event is - * sent to React. + * Expired task is a task that should have been already executed. Designed to + * be called in the event pipeline after an event is dispatched to React. + * React may schedule events with immediate priority which need to be handled + * before the next event is sent to React. * * Thread synchronization must be enforced externally. */ - void callImmediates(jsi::Runtime &runtime); + void callExpiredTasks(jsi::Runtime &runtime); void setEnableYielding(bool enableYielding); private: diff --git a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp index 0602122ca8..cc1603c06f 100644 --- a/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +++ b/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp @@ -532,7 +532,7 @@ TEST_F(RuntimeSchedulerTest, sameThreadTaskCreatesImmediatePriorityTask) { runtimeScheduler_->scheduleTask( SchedulerPriority::ImmediatePriority, std::move(callback)); - runtimeScheduler_->callImmediates(runtime); + runtimeScheduler_->callExpiredTasks(runtime); }); }); @@ -569,7 +569,7 @@ TEST_F(RuntimeSchedulerTest, sameThreadTaskCreatesLowPriorityTask) { runtimeScheduler_->scheduleTask( SchedulerPriority::LowPriority, std::move(callback)); - runtimeScheduler_->callImmediates(runtime); + runtimeScheduler_->callExpiredTasks(runtime); EXPECT_FALSE(didRunSubsequentTask); }); diff --git a/ReactCommon/react/renderer/scheduler/Scheduler.cpp b/ReactCommon/react/renderer/scheduler/Scheduler.cpp index 87dae5277a..e4fb4f48bb 100644 --- a/ReactCommon/react/renderer/scheduler/Scheduler.cpp +++ b/ReactCommon/react/renderer/scheduler/Scheduler.cpp @@ -79,7 +79,7 @@ Scheduler::Scheduler( }, runtime); if (runtimeScheduler) { - runtimeScheduler->callImmediates(runtime); + runtimeScheduler->callExpiredTasks(runtime); } }; From 731429ebcf7f22fdc59ef8595e697578b5dfc7df Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Mon, 7 Feb 2022 09:56:15 -0800 Subject: [PATCH 058/109] Enable RuntimeScheduler::callExpiredTasks on Android Summary: changelog: [internal] In order to call `RuntimeScheduler::callExpiredTasks`, we need to pass it to `Scheduler` through context container. Reviewed By: javache Differential Revision: D34042293 fbshipit-source-id: 62d18507fb107c5be2ac9d003f63735aab6a09ac --- .../src/main/java/com/facebook/react/fabric/jni/Binding.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index bceda78715..56d2f63ca2 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -396,6 +396,9 @@ void Binding::installFabricUIManager( std::function &&callback) { runtimeScheduler->scheduleWork(std::move(callback)); }; + contextContainer->insert( + "RuntimeScheduler", + std::weak_ptr(runtimeScheduler)); } } From 9a3581879764f3f1b2743905e3e54611e96bb618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20B=C3=BCrger?= Date: Mon, 7 Feb 2022 10:22:41 -0800 Subject: [PATCH 059/109] Use trait collection to resolve border colors (#32492) Summary: https://github.com/facebook/react-native/commit/c974cbff04a8d90ac0f856dbada3fc5a75c75b49 changed the border colors to be of UIColor instead of CGColor. This allowed working with dark mode to switch the border colors automatically. However, in certain situation the system can't resolve the current trait collection (see https://stackoverflow.com/a/57177411/2525941). This commit resolves the colors with the current trait collection to ensure the right colors are selected. This matches with the behavior of how the background color is resolved (also in displayLayer:). ## Changelog [iOS] [Fixed] - Resolve border platform color based on current trait collection Pull Request resolved: https://github.com/facebook/react-native/pull/32492 Test Plan: Same test plan as https://github.com/facebook/react-native/pull/29728 Reviewed By: sammy-SC Differential Revision: D33819225 Pulled By: cortinico fbshipit-source-id: 2f8024be7ee7b32d1852373b47fa1437cc569391 --- React/Views/RCTView.m | 46 +++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/React/Views/RCTView.m b/React/Views/RCTView.m index 8ed93cdf51..a18da5c923 100644 --- a/React/Views/RCTView.m +++ b/React/Views/RCTView.m @@ -706,33 +706,45 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x) }; } -- (RCTBorderColors)borderColors +- (RCTBorderColors)borderColorsWithTraitCollection:(UITraitCollection *)traitCollection { const BOOL isRTL = _reactLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft; + UIColor *directionAwareBorderLeftColor = nil; + UIColor *directionAwareBorderRightColor = nil; + if ([[RCTI18nUtil sharedInstance] doLeftAndRightSwapInRTL]) { UIColor *borderStartColor = _borderStartColor ?: _borderLeftColor; UIColor *borderEndColor = _borderEndColor ?: _borderRightColor; - UIColor *directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor; - UIColor *directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor; - - return (RCTBorderColors){ - (_borderTopColor ?: _borderColor).CGColor, - (directionAwareBorderLeftColor ?: _borderColor).CGColor, - (_borderBottomColor ?: _borderColor).CGColor, - (directionAwareBorderRightColor ?: _borderColor).CGColor, - }; + directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor; + directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor; + } else { + directionAwareBorderLeftColor = (isRTL ? _borderEndColor : _borderStartColor) ?: _borderLeftColor; + directionAwareBorderRightColor = (isRTL ? _borderStartColor : _borderEndColor) ?: _borderRightColor; } - UIColor *directionAwareBorderLeftColor = isRTL ? _borderEndColor : _borderStartColor; - UIColor *directionAwareBorderRightColor = isRTL ? _borderStartColor : _borderEndColor; + UIColor *borderColor = _borderColor; + UIColor *borderTopColor = _borderTopColor; + UIColor *borderBottomColor = _borderBottomColor; + +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 13.0, *)) { + borderColor = [borderColor resolvedColorWithTraitCollection:self.traitCollection]; + borderTopColor = [borderTopColor resolvedColorWithTraitCollection:self.traitCollection]; + directionAwareBorderLeftColor = + [directionAwareBorderLeftColor resolvedColorWithTraitCollection:self.traitCollection]; + borderBottomColor = [borderBottomColor resolvedColorWithTraitCollection:self.traitCollection]; + directionAwareBorderRightColor = + [directionAwareBorderRightColor resolvedColorWithTraitCollection:self.traitCollection]; + } +#endif return (RCTBorderColors){ - (_borderTopColor ?: _borderColor).CGColor, - (directionAwareBorderLeftColor ?: _borderLeftColor ?: _borderColor).CGColor, - (_borderBottomColor ?: _borderColor).CGColor, - (directionAwareBorderRightColor ?: _borderRightColor ?: _borderColor).CGColor, + (borderTopColor ?: borderColor).CGColor, + (directionAwareBorderLeftColor ?: borderColor).CGColor, + (borderBottomColor ?: borderColor).CGColor, + (directionAwareBorderRightColor ?: borderColor).CGColor, }; } @@ -758,7 +770,7 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x) const RCTCornerRadii cornerRadii = [self cornerRadii]; const UIEdgeInsets borderInsets = [self bordersAsInsets]; - const RCTBorderColors borderColors = [self borderColors]; + const RCTBorderColors borderColors = [self borderColorsWithTraitCollection:self.traitCollection]; BOOL useIOSBorderRendering = RCTCornerRadiiAreEqual(cornerRadii) && RCTBorderInsetsAreEqual(borderInsets) && RCTBorderColorsAreEqual(borderColors) && _borderStyle == RCTBorderStyleSolid && From d1c2458930bf86c7ceff054c1d9ce5ccfa84d689 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 7 Feb 2022 11:43:35 -0800 Subject: [PATCH 060/109] fix: Fix Typo in Java Docs (#33050) Summary: Probably my smallest PR yet, this just fixes a comment in the template's Java files. ## Changelog [CATEGORY] [TYPE] - Message Pull Request resolved: https://github.com/facebook/react-native/pull/33050 Reviewed By: christophpurrer Differential Revision: D34045805 Pulled By: cortinico fbshipit-source-id: a7355b4dbae84b79ee9d68e2524393d03cda67fc --- .../android/app/src/main/java/com/helloworld/MainActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/android/app/src/main/java/com/helloworld/MainActivity.java b/template/android/app/src/main/java/com/helloworld/MainActivity.java index 24f412851f..eae5dada6e 100644 --- a/template/android/app/src/main/java/com/helloworld/MainActivity.java +++ b/template/android/app/src/main/java/com/helloworld/MainActivity.java @@ -17,7 +17,8 @@ public class MainActivity extends ReactActivity { /** * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and - * you can specify the rendered you wish to use (Fabric or the older renderer). + * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer + * (Paper). */ @Override protected ReactActivityDelegate createReactActivityDelegate() { From 99890bfacf7f3c17a6247fcd18b0bba266151155 Mon Sep 17 00:00:00 2001 From: Xin Chen Date: Mon, 7 Feb 2022 13:42:27 -0800 Subject: [PATCH 061/109] Move RedBoxHandler interface to the proper interfaces directory Summary: We put the `:interfaces` target on the dependencies list for `:devsupport` target in the [BUCK file](https://fburl.com/code/lrr1c0pn). In the following diffs I will need to put the interface [`/devsupport/RedBoxHandler`](https://fburl.com/code/v53euvps) on to [`/devsupport/interfaces/DevSupportManager`](https://fburl.com/code/k8gwxa0f). This violates the dependency rule. Since `RedBoxHandler` is an interface, I moved it to the interfaces list in this diff to unblock. Changelog: [Android][Internal] Reviewed By: yungsters Differential Revision: D33987834 fbshipit-source-id: 77a1ee14bd10c6bbaac2ee465ae7050e99ed0399 --- .../main/java/com/facebook/react/ReactInstanceManager.java | 2 +- .../java/com/facebook/react/ReactInstanceManagerBuilder.java | 2 +- .../src/main/java/com/facebook/react/ReactNativeHost.java | 2 +- .../facebook/react/devsupport/BridgeDevSupportManager.java | 1 + .../react/devsupport/DefaultDevSupportManagerFactory.java | 1 + .../com/facebook/react/devsupport/DevSupportManagerBase.java | 1 + .../facebook/react/devsupport/DevSupportManagerFactory.java | 1 + .../main/java/com/facebook/react/devsupport/RedBoxDialog.java | 3 ++- .../react/devsupport/{ => interfaces}/RedBoxHandler.java | 4 +--- 9 files changed, 10 insertions(+), 7 deletions(-) rename ReactAndroid/src/main/java/com/facebook/react/devsupport/{ => interfaces}/RedBoxHandler.java (88%) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index 918f8b612e..e5743ca5a9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -81,10 +81,10 @@ import com.facebook.react.common.annotations.VisibleForTesting; import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.devsupport.DevSupportManagerFactory; import com.facebook.react.devsupport.ReactInstanceDevHelper; -import com.facebook.react.devsupport.RedBoxHandler; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.DevSupportManager; import com.facebook.react.devsupport.interfaces.PackagerStatusCallback; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.modules.appearance.AppearanceModule; import com.facebook.react.modules.appregistry.AppRegistry; import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java index 199e4033cf..d7450a14ce 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java @@ -26,9 +26,9 @@ import com.facebook.react.common.LifecycleState; import com.facebook.react.common.SurfaceDelegateFactory; import com.facebook.react.devsupport.DefaultDevSupportManagerFactory; import com.facebook.react.devsupport.DevSupportManagerFactory; -import com.facebook.react.devsupport.RedBoxHandler; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.DevSupportManager; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.jscexecutor.JSCExecutor; import com.facebook.react.jscexecutor.JSCExecutorFactory; import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java b/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java index 305af49539..6f965a8d30 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java @@ -18,7 +18,7 @@ import com.facebook.react.common.LifecycleState; import com.facebook.react.common.SurfaceDelegate; import com.facebook.react.common.SurfaceDelegateFactory; import com.facebook.react.devsupport.DevSupportManagerFactory; -import com.facebook.react.devsupport.RedBoxHandler; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.uimanager.UIImplementationProvider; import java.util.List; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java index 159bf31989..205de052d7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java @@ -27,6 +27,7 @@ import com.facebook.react.common.futures.SimpleSettableFuture; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.DevOptionHandler; import com.facebook.react.devsupport.interfaces.DevSplitBundleCallback; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.packagerconnection.RequestHandler; import java.io.File; import java.io.IOException; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java index 6459c219ad..97862539f4 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java @@ -12,6 +12,7 @@ import androidx.annotation.Nullable; import com.facebook.react.common.SurfaceDelegateFactory; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.DevSupportManager; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.packagerconnection.RequestHandler; import java.lang.reflect.Constructor; import java.util.Map; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index f4d0e82ddd..78b90baddd 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -51,6 +51,7 @@ import com.facebook.react.devsupport.interfaces.DevSupportManager; import com.facebook.react.devsupport.interfaces.ErrorCustomizer; import com.facebook.react.devsupport.interfaces.ErrorType; import com.facebook.react.devsupport.interfaces.PackagerStatusCallback; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.devsupport.interfaces.StackFrame; import com.facebook.react.modules.core.RCTNativeAppEventEmitter; import com.facebook.react.packagerconnection.RequestHandler; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.java index 131f4462fb..3b1c71dc75 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.java @@ -12,6 +12,7 @@ import androidx.annotation.Nullable; import com.facebook.react.common.SurfaceDelegateFactory; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.DevSupportManager; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.packagerconnection.RequestHandler; import java.util.Map; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java index ca214e4cac..ad549755b0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java @@ -31,8 +31,9 @@ import com.facebook.infer.annotation.Assertions; import com.facebook.react.R; import com.facebook.react.common.MapBuilder; import com.facebook.react.common.ReactConstants; -import com.facebook.react.devsupport.RedBoxHandler.ReportCompletedListener; import com.facebook.react.devsupport.interfaces.DevSupportManager; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; +import com.facebook.react.devsupport.interfaces.RedBoxHandler.ReportCompletedListener; import com.facebook.react.devsupport.interfaces.StackFrame; import okhttp3.MediaType; import okhttp3.OkHttpClient; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxHandler.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/RedBoxHandler.java similarity index 88% rename from ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxHandler.java rename to ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/RedBoxHandler.java index 597caf2f86..a8f15b5c8b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxHandler.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/RedBoxHandler.java @@ -5,13 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -package com.facebook.react.devsupport; +package com.facebook.react.devsupport.interfaces; import android.content.Context; import android.text.SpannedString; import androidx.annotation.Nullable; -import com.facebook.react.devsupport.interfaces.ErrorType; -import com.facebook.react.devsupport.interfaces.StackFrame; /** * Interface used by {@link BridgeDevSupportManager} to allow interception on any redboxes during From 97ce240a271bb156a0cb84f4b6b5ea3bf84da1dc Mon Sep 17 00:00:00 2001 From: Xin Chen Date: Mon, 7 Feb 2022 15:25:21 -0800 Subject: [PATCH 062/109] Update RedBoxDialog to separate content view and dialog Summary: This diff separates the content view creation logic from existing `RedBoxDialog` logic. After the change, `RedBoxDialog` is no longer a subclass of `Dialog`, but behaves like a dialog with forwarding pattern to delegate dialog API to internal member. This will keep the APIs consistent with dependent components. The motivation of the change is to make the content view reusable. This is important in VR surface where we don't have activities and necessary implementations for Dialog to show. Changelog: [Android][Internal] Reviewed By: javache Differential Revision: D34016503 fbshipit-source-id: 261594bda9f6fb2d83764a1e5ec2e9e60d8d39a3 --- .../react/devsupport/RedBoxDialog.java | 56 +++++++++++++------ 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java index ad549755b0..b4827f6bb2 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java @@ -42,12 +42,15 @@ import okhttp3.RequestBody; import org.json.JSONObject; /** Dialog for displaying JS errors in an eye-catching form (red box). */ -/* package */ class RedBoxDialog extends Dialog implements AdapterView.OnItemClickListener { +/* package */ class RedBoxDialog implements AdapterView.OnItemClickListener { private final DevSupportManager mDevSupportManager; private final DoubleTapReloadRecognizer mDoubleTapReloadRecognizer; private final @Nullable RedBoxHandler mRedBoxHandler; + private final View mContentView; + private final Context mContext; + private @Nullable Dialog mDialog; private ListView mStackView; private Button mReloadJsButton; private Button mDismissButton; @@ -238,20 +241,17 @@ import org.json.JSONObject; protected RedBoxDialog( Context context, DevSupportManager devSupportManager, @Nullable RedBoxHandler redBoxHandler) { - super(context, R.style.Theme_Catalyst_RedBox); - - requestWindowFeature(Window.FEATURE_NO_TITLE); - - setContentView(R.layout.redbox_view); + mContext = context; + mContentView = (View) LayoutInflater.from(context).inflate(R.layout.redbox_view, null); mDevSupportManager = devSupportManager; mDoubleTapReloadRecognizer = new DoubleTapReloadRecognizer(); mRedBoxHandler = redBoxHandler; - mStackView = (ListView) findViewById(R.id.rn_redbox_stack); + mStackView = (ListView) mContentView.findViewById(R.id.rn_redbox_stack); mStackView.setOnItemClickListener(this); - mReloadJsButton = (Button) findViewById(R.id.rn_redbox_reload_button); + mReloadJsButton = (Button) mContentView.findViewById(R.id.rn_redbox_reload_button); mReloadJsButton.setOnClickListener( new View.OnClickListener() { @Override @@ -259,7 +259,7 @@ import org.json.JSONObject; mDevSupportManager.handleReloadJS(); } }); - mDismissButton = (Button) findViewById(R.id.rn_redbox_dismiss_button); + mDismissButton = (Button) mContentView.findViewById(R.id.rn_redbox_dismiss_button); mDismissButton.setOnClickListener( new View.OnClickListener() { @Override @@ -269,12 +269,12 @@ import org.json.JSONObject; }); if (mRedBoxHandler != null && mRedBoxHandler.isReportEnabled()) { - mLoadingIndicator = (ProgressBar) findViewById(R.id.rn_redbox_loading_indicator); - mLineSeparator = (View) findViewById(R.id.rn_redbox_line_separator); - mReportTextView = (TextView) findViewById(R.id.rn_redbox_report_label); + mLoadingIndicator = (ProgressBar) mContentView.findViewById(R.id.rn_redbox_loading_indicator); + mLineSeparator = (View) mContentView.findViewById(R.id.rn_redbox_line_separator); + mReportTextView = (TextView) mContentView.findViewById(R.id.rn_redbox_report_label); mReportTextView.setMovementMethod(LinkMovementMethod.getInstance()); mReportTextView.setHighlightColor(Color.TRANSPARENT); - mReportButton = (Button) findViewById(R.id.rn_redbox_report_button); + mReportButton = (Button) mContentView.findViewById(R.id.rn_redbox_report_button); mReportButton.setOnClickListener(mReportButtonOnClickListener); } } @@ -303,15 +303,39 @@ import org.json.JSONObject; AsyncTask.THREAD_POOL_EXECUTOR, (StackFrame) mStackView.getAdapter().getItem(position)); } - @Override public boolean onKeyUp(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_MENU) { mDevSupportManager.showDevOptionsDialog(); return true; } - if (mDoubleTapReloadRecognizer.didDoubleTapR(keyCode, getCurrentFocus())) { + if (mDoubleTapReloadRecognizer.didDoubleTapR(keyCode, mDialog.getCurrentFocus())) { mDevSupportManager.handleReloadJS(); } - return super.onKeyUp(keyCode, event); + return mDialog.onKeyUp(keyCode, event); + } + + public Context getContext() { + return mContext; + } + + public View getContentView() { + return mContentView; + } + + public boolean isShowing() { + return mDialog.isShowing(); + } + + public void show() { + if (mDialog == null) { + mDialog = new Dialog(mContext, R.style.Theme_Catalyst_RedBox); + mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + } + mDialog.setContentView(mContentView); + mDialog.show(); + } + + public void dismiss() { + mDialog.dismiss(); } } From 1f15a6402869b001cae049facc17126924b97197 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Mon, 7 Feb 2022 15:42:49 -0800 Subject: [PATCH 063/109] Add RawEventTelemetryEventEmitter interface to ReactNativePrivateInterface Summary: This will be used from the React JS renderer in a followup PR. Changelog: [Added][JS] New event telemetry mechanism exposed from JS to supercede the Pressability-specific telemetry mechanism Reviewed By: ryancat Differential Revision: D33986916 fbshipit-source-id: 912d0b351869348f0ca6e5f6a882fc0501c2c7f0 --- .../Core/RawEventTelemetryEventEmitter.js | 29 +++++++++++++++++++ .../ReactNativePrivateInterface.js | 4 +++ 2 files changed, 33 insertions(+) create mode 100644 Libraries/Core/RawEventTelemetryEventEmitter.js diff --git a/Libraries/Core/RawEventTelemetryEventEmitter.js b/Libraries/Core/RawEventTelemetryEventEmitter.js new file mode 100644 index 0000000000..be1f134eb6 --- /dev/null +++ b/Libraries/Core/RawEventTelemetryEventEmitter.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow strict-local + * @format + */ + +import EventEmitter from '../vendor/emitter/EventEmitter'; +import type {IEventEmitter} from '../vendor/emitter/EventEmitter'; + +export type RawEventTelemetryEvent = $ReadOnly<{| + eventName: string, + // We expect, but do not/cannot require, that nativeEvent is an object + // with the properties: key, elementType (string), type (string), tag (numeric), + // and a stateNode of the native element/Fiber the event was emitted to. + nativeEvent: {[string]: mixed}, +|}>; + +type RawEventDefinitions = { + [eventChannel: string]: [RawEventTelemetryEvent], +}; + +const RawEventTelemetryEventEmitter: IEventEmitter = + new EventEmitter(); + +export default RawEventTelemetryEventEmitter; diff --git a/Libraries/ReactPrivate/ReactNativePrivateInterface.js b/Libraries/ReactPrivate/ReactNativePrivateInterface.js index e7c9d2a983..b4c8237fa6 100644 --- a/Libraries/ReactPrivate/ReactNativePrivateInterface.js +++ b/Libraries/ReactPrivate/ReactNativePrivateInterface.js @@ -21,6 +21,7 @@ import typeof flattenStyle from '../StyleSheet/flattenStyle'; import {type DangerouslyImpreciseStyleProp} from '../StyleSheet/StyleSheet'; import typeof ReactFiberErrorDialog from '../Core/ReactFiberErrorDialog'; import typeof legacySendAccessibilityEvent from '../Components/AccessibilityInfo/legacySendAccessibilityEvent'; +import typeof RawEventTelemetryEventEmitter from '../Core/RawEventTelemetryEventEmitter'; // flowlint unsafe-getters-setters:off module.exports = { @@ -62,4 +63,7 @@ module.exports = { get legacySendAccessibilityEvent(): legacySendAccessibilityEvent { return require('../Components/AccessibilityInfo/legacySendAccessibilityEvent'); }, + get RawEventTelemetryEventEmitter(): RawEventTelemetryEventEmitter { + return require('../Core/RawEventTelemetryEventEmitter').default; + }, }; From 271b9132bc7e5f3310fcce6dfe5f59cd388b449a Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Mon, 7 Feb 2022 18:18:28 -0800 Subject: [PATCH 064/109] Rename RawEventTelemetryEventEmitter to RawEventEmitter Summary: This event listener does nothing by default and will do nothing if (developer) users don't explicitly create some telemetry system for their own app. This EventEmitter makes that easier but isn't necessarily tied to telemetry, especially since it does nothing at all by default. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D34060116 fbshipit-source-id: 9345a52f502e0225358fdaa1431c052a70fa54ce --- ...emetryEventEmitter.js => RawEventEmitter.js} | 17 +++++++++++++---- .../ReactPrivate/ReactNativePrivateInterface.js | 6 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) rename Libraries/Core/{RawEventTelemetryEventEmitter.js => RawEventEmitter.js} (50%) diff --git a/Libraries/Core/RawEventTelemetryEventEmitter.js b/Libraries/Core/RawEventEmitter.js similarity index 50% rename from Libraries/Core/RawEventTelemetryEventEmitter.js rename to Libraries/Core/RawEventEmitter.js index be1f134eb6..cd330469cd 100644 --- a/Libraries/Core/RawEventTelemetryEventEmitter.js +++ b/Libraries/Core/RawEventEmitter.js @@ -11,7 +11,7 @@ import EventEmitter from '../vendor/emitter/EventEmitter'; import type {IEventEmitter} from '../vendor/emitter/EventEmitter'; -export type RawEventTelemetryEvent = $ReadOnly<{| +export type RawEventEmitterEvent = $ReadOnly<{| eventName: string, // We expect, but do not/cannot require, that nativeEvent is an object // with the properties: key, elementType (string), type (string), tag (numeric), @@ -20,10 +20,19 @@ export type RawEventTelemetryEvent = $ReadOnly<{| |}>; type RawEventDefinitions = { - [eventChannel: string]: [RawEventTelemetryEvent], + [eventChannel: string]: [RawEventEmitterEvent], }; -const RawEventTelemetryEventEmitter: IEventEmitter = +const RawEventEmitter: IEventEmitter = new EventEmitter(); -export default RawEventTelemetryEventEmitter; +// See the React renderer / react repo for how this is used. +// Raw events are emitted here when they are received in JS +// and before any event Plugins process them or before components +// have a chance to respond to them. This allows you to implement +// app-specific perf monitoring, which is unimplemented by default, +// making this entire RawEventEmitter do nothing by default until +// *you* add listeners for your own app. +// Besides perf monitoring and maybe debugging, this RawEventEmitter +// should not be used. +export default RawEventEmitter; diff --git a/Libraries/ReactPrivate/ReactNativePrivateInterface.js b/Libraries/ReactPrivate/ReactNativePrivateInterface.js index b4c8237fa6..d671212dca 100644 --- a/Libraries/ReactPrivate/ReactNativePrivateInterface.js +++ b/Libraries/ReactPrivate/ReactNativePrivateInterface.js @@ -21,7 +21,7 @@ import typeof flattenStyle from '../StyleSheet/flattenStyle'; import {type DangerouslyImpreciseStyleProp} from '../StyleSheet/StyleSheet'; import typeof ReactFiberErrorDialog from '../Core/ReactFiberErrorDialog'; import typeof legacySendAccessibilityEvent from '../Components/AccessibilityInfo/legacySendAccessibilityEvent'; -import typeof RawEventTelemetryEventEmitter from '../Core/RawEventTelemetryEventEmitter'; +import typeof RawEventEmitter from '../Core/RawEventEmitter'; // flowlint unsafe-getters-setters:off module.exports = { @@ -63,7 +63,7 @@ module.exports = { get legacySendAccessibilityEvent(): legacySendAccessibilityEvent { return require('../Components/AccessibilityInfo/legacySendAccessibilityEvent'); }, - get RawEventTelemetryEventEmitter(): RawEventTelemetryEventEmitter { - return require('../Core/RawEventTelemetryEventEmitter').default; + get RawEventEmitter(): RawEventEmitter { + return require('../Core/RawEventEmitter').default; }, }; From 921ed737eb3a9cb38a9e4a870189d8fcb2db5e43 Mon Sep 17 00:00:00 2001 From: Raphael Herouart Date: Tue, 8 Feb 2022 06:44:05 -0800 Subject: [PATCH 065/109] Test Chrome DevTools Protocol Responses Format Summary: Some test to make sure hermes engine follows the Chrome DevTools Protocol for all implemented Debugger Responses Changelog: [Internal] Reviewed By: ShikaSD Differential Revision: D34052619 fbshipit-source-id: d213ed41335b64bf3168a43ce043f2c57f05fc52 --- .../inspector/chrome/tests/MessageTests.cpp | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) diff --git a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp index 51a64f533e..d82810a64a 100644 --- a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp +++ b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp @@ -1102,6 +1102,153 @@ TEST(MessageTests, testStepOverRequest) { EXPECT_EQ(resolvedReq->method, deserializedReq.method); } +TEST(MessageTests, testEvaluateOnCallFrameResponseMinimal) { + std::string message = R"( + { + "result": + { + "result":{ + "type": "string" + } + }, + "id":2 + } + )"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::EvaluateOnCallFrameResponse deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + EXPECT_FALSE(deserializedReq.result.subtype.hasValue()); + EXPECT_FALSE(deserializedReq.result.value.hasValue()); + EXPECT_FALSE(deserializedReq.result.unserializableValue.hasValue()); + EXPECT_FALSE(deserializedReq.result.description.hasValue()); + EXPECT_FALSE(deserializedReq.result.objectId.hasValue()); + + // Specifics + EXPECT_EQ(deserializedReq.id, 2); + EXPECT_EQ(deserializedReq.result.type, "string"); +} + +TEST(MessageTests, testEvaluateOnCallFrameResponseFull) { + std::string message = R"( + { + "result": + { + "result":{ + "type": "string", + "subtype": "SuperString", + "value": {"foobarkey": "foobarval"}, + "unserializableValue": "unserializableValueVal", + "description": "A Wonderful desc", + "objectId": "AnObjectID" + } + }, + "id":2 + } + )"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::EvaluateOnCallFrameResponse deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + EXPECT_TRUE(deserializedReq.result.subtype.hasValue()); + EXPECT_TRUE(deserializedReq.result.value.hasValue()); + EXPECT_TRUE(deserializedReq.result.unserializableValue.hasValue()); + EXPECT_TRUE(deserializedReq.result.description.hasValue()); + EXPECT_TRUE(deserializedReq.result.objectId.hasValue()); + + EXPECT_EQ(deserializedReq.result.subtype.value(), "SuperString"); + EXPECT_EQ( + deserializedReq.result.value.value(), + folly::parseJson(R"({"foobarkey": "foobarval"})")); + EXPECT_EQ( + deserializedReq.result.unserializableValue.value(), + "unserializableValueVal"); + EXPECT_EQ(deserializedReq.result.description.value(), "A Wonderful desc"); + EXPECT_EQ(deserializedReq.result.objectId.value(), "AnObjectID"); + + // Specifics + EXPECT_EQ(deserializedReq.id, 2); + EXPECT_EQ(deserializedReq.result.type, "string"); +} + +TEST(MessageTests, testSetBreakpointByUrlResponse) { + std::string message = R"({ + "id": 1, + "result":{ + "breakpointId": "myBreakpointId", + "locations": [ + { + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + } + ] + } + })"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetBreakpointByUrlResponse deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(deserializedReq.id, 1); + EXPECT_EQ(deserializedReq.breakpointId, "myBreakpointId"); + EXPECT_EQ(deserializedReq.locations.size(), 1); + EXPECT_EQ(deserializedReq.locations[0].lineNumber, 2); + EXPECT_EQ(deserializedReq.locations[0].columnNumber, 3); + EXPECT_EQ(deserializedReq.locations[0].scriptId, "myScriptId"); +} + +TEST(MessageTests, testSetBreakpointResponse) { + std::string message = R"({ + "id": 1, + "result":{ + "breakpointId": "myBreakpointId", + "actualLocation": + { + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + } + } + })"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetBreakpointResponse deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(deserializedReq.breakpointId, "myBreakpointId"); + EXPECT_EQ(deserializedReq.actualLocation.lineNumber, 2); + EXPECT_EQ(deserializedReq.actualLocation.columnNumber, 3); + EXPECT_EQ(deserializedReq.actualLocation.scriptId, "myScriptId"); + EXPECT_EQ(deserializedReq.id, 1); +} + +TEST(MessageTests, testSetInstrumentationBreakpointResponse) { + std::string message = R"({ + "id": 1, + "result":{ + "breakpointId": "myBreakpointId" + } + })"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::SetInstrumentationBreakpointResponse deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(deserializedReq.breakpointId, "myBreakpointId"); + EXPECT_EQ(deserializedReq.id, 1); +} + } // namespace message } // namespace chrome } // namespace inspector From 669cd0257cfa6a8a1d5c8d6c741786b1abd62b41 Mon Sep 17 00:00:00 2001 From: Raphael Herouart Date: Tue, 8 Feb 2022 06:44:05 -0800 Subject: [PATCH 066/109] Test Chrome DevTools Notifications Summary: Some test to make sure hermes engine follows the Chrome DevTools Protocol for all implemented Debugger Notifications Changelog: [Internal] Reviewed By: ShikaSD Differential Revision: D34055503 fbshipit-source-id: 8c2dd1066ba2b68e395226f15954d303894d0365 --- .../inspector/chrome/tests/MessageTests.cpp | 274 ++++++++++++++++++ 1 file changed, 274 insertions(+) diff --git a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp index d82810a64a..e7f9ba8d05 100644 --- a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp +++ b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp @@ -1249,6 +1249,280 @@ TEST(MessageTests, testSetInstrumentationBreakpointResponse) { EXPECT_EQ(deserializedReq.id, 1); } +TEST(MessageTests, testBreakpointResolvedNotification) { + std::string message = R"( + { + "method": "Debugger.breakpointResolved", + "params":{ + "breakpointId" : "42", + "location": + { + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + } + } + } + )"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::BreakpointResolvedNotification deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(deserializedReq.method, "Debugger.breakpointResolved"); + EXPECT_EQ(deserializedReq.breakpointId, "42"); + EXPECT_EQ(deserializedReq.location.lineNumber, 2); + EXPECT_EQ(deserializedReq.location.columnNumber, 3); + EXPECT_EQ(deserializedReq.location.scriptId, "myScriptId"); +} + +TEST(MessageTests, testPauseNotificationMinimal) { + std::string message = R"( + { + "method": "Debugger.paused", + "params":{ + "reason": "Some Valid Reason", + "callFrames":[ + { + "callFrameId": "aCallFrameId", + "functionName": "aFunctionName", + "location":{ + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + }, + "url": "aURL", + "scopeChain": [ + { + "type": "aType", + "object": { + "type": "aRemoteObjectType" + } + } + ], + "this": { + "type": "aType" + } + } + ] + } + } + )"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::PausedNotification deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + EXPECT_FALSE(deserializedReq.callFrames[0].functionLocation.hasValue()); + EXPECT_FALSE(deserializedReq.callFrames[0].returnValue.hasValue()); + EXPECT_FALSE(deserializedReq.asyncStackTrace.hasValue()); + EXPECT_FALSE(deserializedReq.hitBreakpoints.hasValue()); + EXPECT_FALSE(deserializedReq.data.hasValue()); + + // Specifics + EXPECT_EQ(deserializedReq.method, "Debugger.paused"); + EXPECT_EQ(deserializedReq.reason, "Some Valid Reason"); + EXPECT_EQ(deserializedReq.callFrames[0].functionName, "aFunctionName"); + EXPECT_EQ(deserializedReq.callFrames[0].callFrameId, "aCallFrameId"); + EXPECT_EQ(deserializedReq.callFrames[0].url, "aURL"); + EXPECT_EQ(deserializedReq.callFrames[0].location.lineNumber, 2); + EXPECT_EQ(deserializedReq.callFrames[0].location.columnNumber, 3); + EXPECT_EQ(deserializedReq.callFrames[0].location.scriptId, "myScriptId"); + EXPECT_EQ(deserializedReq.callFrames[0].scopeChain[0].type, "aType"); + EXPECT_EQ( + deserializedReq.callFrames[0].scopeChain[0].object.type, + "aRemoteObjectType"); + EXPECT_EQ(deserializedReq.callFrames[0].thisObj.type, "aType"); +} + +TEST(MessageTests, testPauseNotificationFull) { + std::string message = R"( + { + "method": "Debugger.paused", + "params":{ + "reason": "Some Valid Reason", + "callFrames":[ + { + "functionLocation": { + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + }, + "returnValue" : { + "type": "aRemoteObjectType", + "subtype": "subtype", + "className":"className", + "value": "value", + "unserializableValue": "unserializableValue", + "description": "description", + "objectId": "objectId" + }, + "callFrameId": "aCallFrameId", + "functionName": "aFunctionName", + "location":{ + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId" + }, + "url": "aURL", + "scopeChain": [ + { + "type": "aType", + "object": { + "type": "aRemoteObjectType" + } + } + ], + "this": { + "type": "aType" + } + } + ], + "data": {"dataKey": "dataVal"}, + "hitBreakpoints": [ + "foo","bar" + ], + "asyncStackTrace":{ + "description": "an asyncStackTrace Desc", + "callFrames":[ + { + "functionName": "aFunctionName", + "lineNumber": 2, + "columnNumber": 3, + "scriptId": "myScriptId", + "url": "aURL" + } + ] + } + } + } + )"; + + folly::Optional functionLocation; + folly::Optional returnValue; + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::PausedNotification deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Check optionnals + // ---------------- + EXPECT_TRUE(deserializedReq.callFrames[0].functionLocation.hasValue()); + EXPECT_TRUE(deserializedReq.callFrames[0].returnValue.hasValue()); + EXPECT_TRUE(deserializedReq.asyncStackTrace.hasValue()); + EXPECT_TRUE(deserializedReq.hitBreakpoints.hasValue()); + EXPECT_TRUE(deserializedReq.data.hasValue()); + + EXPECT_TRUE( + deserializedReq.callFrames[0].returnValue.value().subtype.hasValue()); + EXPECT_TRUE( + deserializedReq.callFrames[0].returnValue.value().className.hasValue()); + EXPECT_TRUE(deserializedReq.callFrames[0] + .returnValue.value() + .unserializableValue.hasValue()); + EXPECT_TRUE( + deserializedReq.callFrames[0].returnValue.value().value.hasValue()); + EXPECT_TRUE( + deserializedReq.callFrames[0].returnValue.value().description.hasValue()); + EXPECT_TRUE( + deserializedReq.callFrames[0].returnValue.value().objectId.hasValue()); + + // Check optionnals Values + // ----------------------- + EXPECT_EQ( + deserializedReq.callFrames[0].functionLocation.value().lineNumber, 2); + EXPECT_EQ( + deserializedReq.callFrames[0].functionLocation.value().columnNumber, 3); + EXPECT_EQ( + deserializedReq.callFrames[0].functionLocation.value().scriptId, + "myScriptId"); + + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().type, + "aRemoteObjectType"); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().subtype.hasValue(), + true); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().subtype.value(), + "subtype"); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().className.hasValue(), + true); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().className.value(), + "className"); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().value.hasValue(), true); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().value.value(), "value"); + EXPECT_EQ( + deserializedReq.callFrames[0] + .returnValue.value() + .unserializableValue.hasValue(), + true); + EXPECT_EQ( + deserializedReq.callFrames[0] + .returnValue.value() + .unserializableValue.value(), + "unserializableValue"); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().description.hasValue(), + true); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().description.value(), + "description"); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().objectId.hasValue(), + true); + EXPECT_EQ( + deserializedReq.callFrames[0].returnValue.value().objectId.value(), + "objectId"); + + EXPECT_EQ(deserializedReq.hitBreakpoints.value()[0], "foo"); + EXPECT_EQ(deserializedReq.hitBreakpoints.value()[1], "bar"); + + EXPECT_EQ( + deserializedReq.data.value(), + folly::parseJson(R"({"dataKey": "dataVal"})")); + + // Check Compulsory + // ---------------- + EXPECT_EQ(deserializedReq.method, "Debugger.paused"); + EXPECT_EQ(deserializedReq.reason, "Some Valid Reason"); + EXPECT_EQ(deserializedReq.callFrames[0].functionName, "aFunctionName"); + EXPECT_EQ(deserializedReq.callFrames[0].callFrameId, "aCallFrameId"); + EXPECT_EQ(deserializedReq.callFrames[0].url, "aURL"); + EXPECT_EQ(deserializedReq.callFrames[0].location.lineNumber, 2); + EXPECT_EQ(deserializedReq.callFrames[0].location.columnNumber, 3); + EXPECT_EQ(deserializedReq.callFrames[0].location.scriptId, "myScriptId"); + EXPECT_EQ(deserializedReq.callFrames[0].scopeChain[0].type, "aType"); + EXPECT_EQ( + deserializedReq.callFrames[0].scopeChain[0].object.type, + "aRemoteObjectType"); + EXPECT_EQ(deserializedReq.callFrames[0].thisObj.type, "aType"); +} + + +TEST(MessageTests, testResumedNotification) { + std::string message = R"( + { + "method": "Debugger.resumed" + } + )"; + + // Serialize and Deserialize are inverse functions + dynamic messageJSON = folly::parseJson(message); + debugger::ResumedNotification deserializedReq(messageJSON); + EXPECT_EQ(deserializedReq.toDynamic(), messageJSON); + + // Specifics + EXPECT_EQ(deserializedReq.method, "Debugger.resumed"); +} + } // namespace message } // namespace chrome } // namespace inspector From ebc856b2de095b5e03515e0d4079cd99a3d47d94 Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Tue, 8 Feb 2022 08:29:02 -0800 Subject: [PATCH 067/109] Check if view exists before skipping CREATE command Summary: Updates early return in the CREATE command codepath that checks if the view already exists before allocating it. Normally the view state is expected to be created only if the view is preallocated, but empty view state is also created for the flattened nodes when they create an event emitter. By checking the view existence, we can ensure that view was indeed preallocated before, and skip for optimization purposes. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D34050884 fbshipit-source-id: 489fc1052fec9f71712ea729121ac8ef3e3f3d4e --- .../facebook/react/fabric/mounting/SurfaceMountingManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java index 7422f18de0..3c7311af3f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java @@ -548,7 +548,8 @@ public class SurfaceMountingManager { // generated. // This represents a perf issue only, not a correctness issue. In the future we need to // refactor View preallocation to correct the currently incorrect assumptions. - if (getNullableViewState(reactTag) != null) { + ViewState viewState = getNullableViewState(reactTag); + if (viewState != null && viewState.mView != null) { return; } From 3346efb7d422bd8eb7f48650b454071f9981fa0b Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 8 Feb 2022 08:44:37 -0800 Subject: [PATCH 068/109] Make react-native depend on react-native-gradle-plugin Summary: Similarly to what we did for react-native-codegen, I'm introducing a dependency between RN and the Gradle plugin, to be processed upon OSS bumps. Changelog: [General] [Added] - Make react-native depend on react-native-gradle-plugin Reviewed By: motiz88 Differential Revision: D31334773 fbshipit-source-id: 978da4946b7864d891553e6a7dcb67783399e76f --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index c0c5376b08..2b75177e25 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,7 @@ "pretty-format": "^26.5.2", "promise": "^8.0.3", "react-devtools-core": "^4.23.0", + "react-native-gradle-plugin": "^0.0.4", "react-refresh": "^0.4.0", "react-shallow-renderer": "16.14.1", "regenerator-runtime": "^0.13.2", From cd79317672e5c99636346f2abb641a688a4ceb82 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 8 Feb 2022 08:44:37 -0800 Subject: [PATCH 069/109] Remove `react-native-gradle-plugin` as a dependency from template's package.json Summary: We should now be able to remove the explicit `react-native-gradle-plugin` dependency from the `template/package.json` file. Changelog: [Android] [Changed] - Remove `react-native-gradle-plugin` as a dependency from template's package.json Reviewed By: motiz88 Differential Revision: D34050589 fbshipit-source-id: c8d4e4fba481af6b56723906b71411132d60aded --- template/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/template/package.json b/template/package.json index f6f8479471..dba4f45ef5 100644 --- a/template/package.json +++ b/template/package.json @@ -21,7 +21,6 @@ "eslint": "^7.32.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.67.0", - "react-native-gradle-plugin": "^0.0.4", "react-test-renderer": "17.0.2" }, "jest": { From 1a044123fc5d01bfd0ea311b19260bfbc0759a89 Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Tue, 8 Feb 2022 11:41:17 -0800 Subject: [PATCH 070/109] Use context from view when resolving platform color if activity doesn't exist Summary: There are cases where the activity may not exist (such as for VRShell panel apps). In this case we will search for a view associated with a PropsAnimatedNode to get the context. Changelog: [Internal][Fixed] - Use context from view when resolving platform color if activity doesn't exist Reviewed By: javache Differential Revision: D34022882 fbshipit-source-id: c316935af1034ea770f3ef9334f77d6dc783fb27 --- .../react/animated/ColorAnimatedNode.java | 56 +++++++++++++++---- .../react/animated/PropsAnimatedNode.java | 12 ++++ 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java index 68949f82f7..2046458470 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java @@ -7,7 +7,9 @@ package com.facebook.react.animated; +import android.content.Context; import android.graphics.Color; +import android.view.View; import com.facebook.react.bridge.ColorPropConverter; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; @@ -22,7 +24,8 @@ import com.facebook.react.views.view.ColorUtil; private final int mGNodeId; private final int mBNodeId; private final int mANodeId; - private int mColor; + private final ReadableMap mNativeColor; + private boolean mNativeColorApplied; public ColorAnimatedNode( ReadableMap config, @@ -34,15 +37,13 @@ import com.facebook.react.views.view.ColorUtil; mGNodeId = config.getInt("g"); mBNodeId = config.getInt("b"); mANodeId = config.getInt("a"); - setNativeColor(config.getMap("nativeColor")); + mNativeColor = config.getMap("nativeColor"); + tryApplyNativeColor(); } public int getColor() { - return mColor; - } + tryApplyNativeColor(); - @Override - public void update() { ValueAnimatedNode rNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mRNodeId); ValueAnimatedNode gNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mGNodeId); ValueAnimatedNode bNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mBNodeId); @@ -53,7 +54,7 @@ import com.facebook.react.views.view.ColorUtil; double b = bNode.getValue(); double a = aNode.getValue(); - mColor = ColorUtil.normalize(r, g, b, a); + return ColorUtil.normalize(r, g, b, a); } @Override @@ -70,13 +71,17 @@ import com.facebook.react.views.view.ColorUtil; + mANodeId; } - private void setNativeColor(ReadableMap nativeColor) { - if (nativeColor == null) { + private void tryApplyNativeColor() { + if (mNativeColor == null || mNativeColorApplied) { return; } - int color = - ColorPropConverter.getColor(nativeColor, mReactApplicationContext.getCurrentActivity()); + Context context = getContext(); + if (context == null) { + return; + } + + int color = ColorPropConverter.getColor(mNativeColor, context); ValueAnimatedNode rNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mRNodeId); ValueAnimatedNode gNode = (ValueAnimatedNode) mNativeAnimatedNodesManager.getNodeById(mGNodeId); @@ -88,6 +93,33 @@ import com.facebook.react.views.view.ColorUtil; bNode.mValue = Color.blue(color); aNode.mValue = Color.alpha(color) / 255.0; - update(); + mNativeColorApplied = true; + } + + private Context getContext() { + Context context = mReactApplicationContext.getCurrentActivity(); + if (context != null) { + return context; + } + + // There are cases where the activity may not exist (such as for VRShell panel apps). In this + // case we will search for a view associated with a PropsAnimatedNode to get the context. + return getContextHelper(this); + } + + private static Context getContextHelper(AnimatedNode node) { + // Search children depth-first until we get to a PropsAnimatedNode, from which we can + // get the view and its context + if (node.mChildren != null) { + for (AnimatedNode child : node.mChildren) { + if (child instanceof PropsAnimatedNode) { + View view = ((PropsAnimatedNode) child).getConnectedView(); + return view != null ? view.getContext() : null; + } else { + return getContextHelper(child); + } + } + } + return null; } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java b/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java index 759675e661..aacf6bf1c3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java @@ -7,12 +7,14 @@ package com.facebook.react.animated; +import android.view.View; import androidx.annotation.Nullable; import com.facebook.react.bridge.JSApplicationIllegalArgumentException; import com.facebook.react.bridge.JavaOnlyMap; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; import com.facebook.react.bridge.UIManager; +import com.facebook.react.uimanager.IllegalViewOperationException; import com.facebook.react.uimanager.common.UIManagerType; import com.facebook.react.uimanager.common.ViewUtil; import java.util.HashMap; @@ -116,6 +118,16 @@ import java.util.Map; mUIManager.synchronouslyUpdateViewOnUIThread(mConnectedViewTag, mPropMap); } + public View getConnectedView() { + try { + return mUIManager.resolveView(mConnectedViewTag); + } catch (IllegalViewOperationException ex) { + // resolveView throws an {@link IllegalViewOperationException} when the view doesn't exist + // (this can happen if the surface is being deallocated). + return null; + } + } + public String prettyPrint() { return "PropsAnimatedNode[" + mTag From 5b66bb90c6e0f4c026519aa61e873863b47c9bf5 Mon Sep 17 00:00:00 2001 From: Neil Dhar Date: Tue, 8 Feb 2022 15:16:34 -0800 Subject: [PATCH 071/109] Add missing symbol handling in kindToString Summary: Changelog: [Internal] Reviewed By: kodafb Differential Revision: D34062869 fbshipit-source-id: 08fed59d62b0d0a46e0868874a89b125731a44e5 --- ReactCommon/jsi/jsi/jsi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReactCommon/jsi/jsi/jsi.cpp b/ReactCommon/jsi/jsi/jsi.cpp index 4127a7bc70..a40fe8664d 100644 --- a/ReactCommon/jsi/jsi/jsi.cpp +++ b/ReactCommon/jsi/jsi/jsi.cpp @@ -30,6 +30,8 @@ std::string kindToString(const Value& v, Runtime* rt = nullptr) { return "a number"; } else if (v.isString()) { return "a string"; + } else if (v.isSymbol()) { + return "a symbol"; } else { assert(v.isObject() && "Expecting object."); return rt != nullptr && v.getObject(*rt).isFunction(*rt) ? "a function" From bb435a2b1176a335b2eb924102e60990fa278b8f Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Tue, 8 Feb 2022 16:27:49 -0800 Subject: [PATCH 072/109] Support AnimatedColor.setValue for platform colors Summary: In order to support AnimatedColor.setValue for platform colors, we need to pass the platform color object to the native animated node which will then resolve and apply the color. Thus, the approach is: - Add a new API updateAnimatedNodeConfig to NativeAnimatedModule - [JS] On AnimatedColor.setValue, if the value is a platform color, then we call updateAnimatedNodeConfig - [Android] We introduce AnimatedNodeWithUpdateableConfig interface with a method updateConfig. On ColorAnimatedNode.java, we use updateConfig to resolve and apply the color Changelog: [Internal][Fixed] - Use context from view when resolving platform color Reviewed By: javache, mdvacca Differential Revision: D34025193 fbshipit-source-id: 8b368f6b7cb2cf7cebe8b66461cd4185cbadd44c --- Libraries/Animated/NativeAnimatedHelper.js | 12 ++++++++ Libraries/Animated/NativeAnimatedModule.js | 1 + .../Animated/NativeAnimatedTurboModule.js | 1 + Libraries/Animated/nodes/AnimatedColor.js | 17 +++++++++-- .../RCTNativeAnimatedModule.mm | 8 +++++ .../RCTNativeAnimatedNodesManager.h | 3 ++ .../RCTNativeAnimatedNodesManager.m | 6 ++++ .../RCTNativeAnimatedTurboModule.mm | 8 +++++ .../AnimatedNodeWithUpdateableConfig.java | 15 ++++++++++ .../react/animated/ColorAnimatedNode.java | 30 +++++++++++-------- .../react/animated/NativeAnimatedModule.java | 26 ++++++++++++++++ .../animated/NativeAnimatedNodesManager.java | 15 ++++++++++ 12 files changed, 127 insertions(+), 15 deletions(-) create mode 100644 ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNodeWithUpdateableConfig.java diff --git a/Libraries/Animated/NativeAnimatedHelper.js b/Libraries/Animated/NativeAnimatedHelper.js index 38853a32e9..76aa061208 100644 --- a/Libraries/Animated/NativeAnimatedHelper.js +++ b/Libraries/Animated/NativeAnimatedHelper.js @@ -90,6 +90,18 @@ const API = { NativeAnimatedModule.createAnimatedNode(tag, config), ); }, + updateAnimatedNodeConfig: function ( + tag: number, + config: AnimatedNodeConfig, + ): void { + invariant(NativeAnimatedModule, 'Native animated module is not available'); + if (typeof NativeAnimatedModule.updateAnimatedNodeConfig === 'function') { + API.queueOperation(() => + // $FlowIgnore[not-a-function] - checked above + NativeAnimatedModule.updateAnimatedNodeConfig(tag, config), + ); + } + }, startListeningToAnimatedNodeValue: function (tag: number) { invariant(NativeAnimatedModule, 'Native animated module is not available'); API.queueOperation(() => diff --git a/Libraries/Animated/NativeAnimatedModule.js b/Libraries/Animated/NativeAnimatedModule.js index 167ca596d8..39ffb002f8 100644 --- a/Libraries/Animated/NativeAnimatedModule.js +++ b/Libraries/Animated/NativeAnimatedModule.js @@ -29,6 +29,7 @@ export interface Spec extends TurboModule { +startOperationBatch: () => void; +finishOperationBatch: () => void; +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; + +updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void; +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; +startListeningToAnimatedNodeValue: (tag: number) => void; +stopListeningToAnimatedNodeValue: (tag: number) => void; diff --git a/Libraries/Animated/NativeAnimatedTurboModule.js b/Libraries/Animated/NativeAnimatedTurboModule.js index b67fe15013..7c0fbe8f8e 100644 --- a/Libraries/Animated/NativeAnimatedTurboModule.js +++ b/Libraries/Animated/NativeAnimatedTurboModule.js @@ -29,6 +29,7 @@ export interface Spec extends TurboModule { +startOperationBatch: () => void; +finishOperationBatch: () => void; +createAnimatedNode: (tag: number, config: AnimatedNodeConfig) => void; + +updateAnimatedNodeConfig?: (tag: number, config: AnimatedNodeConfig) => void; +getValue: (tag: number, saveValueCallback: SaveValueCallback) => void; +startListeningToAnimatedNodeValue: (tag: number) => void; +stopListeningToAnimatedNodeValue: (tag: number) => void; diff --git a/Libraries/Animated/nodes/AnimatedColor.js b/Libraries/Animated/nodes/AnimatedColor.js index 356982ef28..603b329fa7 100644 --- a/Libraries/Animated/nodes/AnimatedColor.js +++ b/Libraries/Animated/nodes/AnimatedColor.js @@ -14,6 +14,7 @@ import AnimatedValue from './AnimatedValue'; import AnimatedWithChildren from './AnimatedWithChildren'; import normalizeColor from '../../StyleSheet/normalizeColor'; import {processColorObject} from '../../StyleSheet/PlatformColorValueTypes'; +import NativeAnimatedHelper from '../NativeAnimatedHelper'; import type {PlatformConfig} from '../AnimatedPlatformConfig'; import type {ColorValue} from '../../StyleSheet/StyleSheet'; @@ -166,9 +167,19 @@ export default class AnimatedColor extends AnimatedWithChildren { } if (this.nativeColor) { - this.__makeNative(); - // TODO (T111170195): In order to support setValue() with a platform color, update the - // native AnimatedNode (if it exists) with a new config. + if (!this.__isNative) { + this.__makeNative(); + } + + const nativeTag = this.__getNativeTag(); + NativeAnimatedHelper.API.setWaitingForIdentifier(nativeTag.toString()); + NativeAnimatedHelper.API.updateAnimatedNodeConfig( + nativeTag, + this.__getNativeConfig(), + ); + NativeAnimatedHelper.API.unsetWaitingForIdentifier( + nativeTag.toString(), + ); } } } diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm b/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm index 534587b876..ddf060b2ad 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +++ b/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm @@ -96,6 +96,14 @@ RCT_EXPORT_METHOD(createAnimatedNode:(double)tag }]; } +RCT_EXPORT_METHOD(updateAnimatedNodeConfig:(double)tag + config:(NSDictionary *)config) +{ + [self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) { + [nodesManager updateAnimatedNodeConfig:[NSNumber numberWithDouble:tag] config:config]; + }]; +} + RCT_EXPORT_METHOD(connectAnimatedNodes:(double)parentTag childTag:(double)childTag) { diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h b/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h index fe88f55c8f..3dd32b8828 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h +++ b/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h @@ -63,6 +63,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)extractAnimatedNodeOffset:(NSNumber *)nodeTag; +- (void)updateAnimatedNodeConfig:(NSNumber *)tag + config:(NSDictionary *)config; + // drivers - (void)startAnimatingNode:(NSNumber *)animationId diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m b/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m index 8cbf79f148..50356c6547 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +++ b/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m @@ -259,6 +259,12 @@ static NSString *RCTNormalizeAnimatedEventName(NSString *eventName) saveCallback(@[@(valueNode.value)]); } +- (void)updateAnimatedNodeConfig:(NSNumber *)tag + config:(NSDictionary *)config +{ + // TODO (T111179606): Support platform colors for color animations +} + #pragma mark -- Drivers - (void)startAnimatingNode:(NSNumber *)animationId diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm b/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm index e627475bb6..0e3be34504 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +++ b/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm @@ -102,6 +102,14 @@ RCT_EXPORT_METHOD(createAnimatedNode:(double)tag }]; } +RCT_EXPORT_METHOD(updateAnimatedNodeConfig:(double)tag + config:(NSDictionary *)config) +{ + [self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) { + [nodesManager updateAnimatedNodeConfig:[NSNumber numberWithDouble:tag] config:config]; + }]; +} + RCT_EXPORT_METHOD(connectAnimatedNodes:(double)parentTag childTag:(double)childTag) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNodeWithUpdateableConfig.java b/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNodeWithUpdateableConfig.java new file mode 100644 index 0000000000..59fb7d801c --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNodeWithUpdateableConfig.java @@ -0,0 +1,15 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.animated; + +import com.facebook.react.bridge.ReadableMap; + +/** Indicates that AnimatedNode is able to receive native config updates. */ +public interface AnimatedNodeWithUpdateableConfig { + void onUpdateConfig(ReadableMap config); +} diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java index 2046458470..7c55feb8f3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/ColorAnimatedNode.java @@ -16,15 +16,16 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.views.view.ColorUtil; /** Animated node that represents a color. */ -/*package*/ class ColorAnimatedNode extends AnimatedNode { +/*package*/ class ColorAnimatedNode extends AnimatedNode + implements AnimatedNodeWithUpdateableConfig { private final NativeAnimatedNodesManager mNativeAnimatedNodesManager; private final ReactApplicationContext mReactApplicationContext; - private final int mRNodeId; - private final int mGNodeId; - private final int mBNodeId; - private final int mANodeId; - private final ReadableMap mNativeColor; + private int mRNodeId; + private int mGNodeId; + private int mBNodeId; + private int mANodeId; + private ReadableMap mNativeColor; private boolean mNativeColorApplied; public ColorAnimatedNode( @@ -33,12 +34,7 @@ import com.facebook.react.views.view.ColorUtil; ReactApplicationContext reactApplicationContext) { mNativeAnimatedNodesManager = nativeAnimatedNodesManager; mReactApplicationContext = reactApplicationContext; - mRNodeId = config.getInt("r"); - mGNodeId = config.getInt("g"); - mBNodeId = config.getInt("b"); - mANodeId = config.getInt("a"); - mNativeColor = config.getMap("nativeColor"); - tryApplyNativeColor(); + onUpdateConfig(config); } public int getColor() { @@ -57,6 +53,16 @@ import com.facebook.react.views.view.ColorUtil; return ColorUtil.normalize(r, g, b, a); } + public void onUpdateConfig(ReadableMap config) { + mRNodeId = config.getInt("r"); + mGNodeId = config.getInt("g"); + mBNodeId = config.getInt("b"); + mANodeId = config.getInt("a"); + mNativeColor = config.getMap("nativeColor"); + mNativeColorApplied = false; + tryApplyNativeColor(); + } + @Override public String prettyPrint() { return "ColorAnimatedNode[" diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java index 9c370f68a9..887440dea9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java @@ -460,6 +460,32 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec }); } + @Override + public void updateAnimatedNodeConfig(final double tagDouble, final ReadableMap config) { + final int tag = (int) tagDouble; + if (ANIMATED_MODULE_DEBUG) { + FLog.d( + NAME, + "queue updateAnimatedNodeConfig: " + tag + " config: " + config.toHashMap().toString()); + } + + addOperation( + new UIThreadOperation() { + @Override + public void execute(NativeAnimatedNodesManager animatedNodesManager) { + if (ANIMATED_MODULE_DEBUG) { + FLog.d( + NAME, + "execute updateAnimatedNodeConfig: " + + tag + + " config: " + + config.toHashMap().toString()); + } + animatedNodesManager.updateAnimatedNodeConfig(tag, config); + } + }); + } + @Override public void startListeningToAnimatedNodeValue(final double tagDouble) { final int tag = (int) tagDouble; diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java index 208272eadc..28d611f0b1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java @@ -159,6 +159,21 @@ import java.util.Queue; mUpdatedNodes.put(tag, node); } + @UiThread + public void updateAnimatedNodeConfig(int tag, ReadableMap config) { + AnimatedNode node = mAnimatedNodes.get(tag); + if (node == null) { + throw new JSApplicationIllegalArgumentException( + "updateAnimatedNode: Animated node [" + tag + "] does not exist"); + } + + if (node instanceof AnimatedNodeWithUpdateableConfig) { + stopAnimationsForNode(node); + ((AnimatedNodeWithUpdateableConfig) node).onUpdateConfig(config); + mUpdatedNodes.put(tag, node); + } + } + @UiThread public void dropAnimatedNode(int tag) { mAnimatedNodes.remove(tag); From 95f950de2a5abdf2dfc9c56c7b893de686ff185b Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Tue, 8 Feb 2022 17:39:33 -0800 Subject: [PATCH 073/109] Move validateStaticViewConfigs to RNHostComponentList route Summary: This function is only used by the RNHostComponentList route. Let's move it into the route, so that we could keep the StaticViewConfigValidator slim. This will also allow us to more heavily customize this function for the route. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D34026073 fbshipit-source-id: c3b3a93aed6007fadda2993afa52c28c028f6327 --- .../StaticViewConfigValidator.js | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/Libraries/NativeComponent/StaticViewConfigValidator.js b/Libraries/NativeComponent/StaticViewConfigValidator.js index af9c18b734..f1217d849e 100644 --- a/Libraries/NativeComponent/StaticViewConfigValidator.js +++ b/Libraries/NativeComponent/StaticViewConfigValidator.js @@ -9,10 +9,6 @@ */ import {type ViewConfig} from '../Renderer/shims/ReactNativeTypes'; -// $FlowFixMe[nonstrict-import] -import getNativeComponentAttributes from '../ReactNative/getNativeComponentAttributes'; -// $FlowFixMe[nonstrict-import] -import {createViewConfig} from './ViewConfig'; import {isIgnored} from './ViewConfigIgnore'; export type Difference = @@ -42,37 +38,6 @@ type InvalidResult = { differences: Array, }; -// e.g. require('MyNativeComponent') where MyNativeComponent.js exports a HostComponent -type JSModule = $FlowFixMe; - -export function validateStaticViewConfigs(nativeComponent: JSModule): { - componentName: string, - nativeViewConfig?: ?ViewConfig, - staticViewConfig?: ?ViewConfig, - validationResult?: ?ValidationResult, -} { - const nativeViewConfig = getNativeComponentAttributes( - nativeComponent.default || nativeComponent, - ); - - const generatedPartialViewConfig = nativeComponent.__INTERNAL_VIEW_CONFIG; - const staticViewConfig: ?ViewConfig = - generatedPartialViewConfig && createViewConfig(generatedPartialViewConfig); - - const componentName: string = nativeComponent.default || nativeComponent; - const validationResult: ?ValidationResult = - nativeViewConfig && - staticViewConfig && - validate(componentName, nativeViewConfig, staticViewConfig); - - return { - componentName, - nativeViewConfig, - staticViewConfig, - validationResult, - }; -} - /** * During the migration from native view configs to static view configs, this is * used to validate that the two are equivalent. From f89ed90a1e2f5805e4bf987cc45f0b105a37bab9 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Tue, 8 Feb 2022 19:09:19 -0800 Subject: [PATCH 074/109] Remove the onChange event for Slider Summary: The onChange event for slider isn't necessary. Instead, it uses onValueChanged. ## What motivated this change? After D33933403, the SliderNativeComponent starts generating an onChange: true entry in its static ViewConfig's validAttributes map. **The Problem:** Slider inherits the onChange event from RCTViewManager. And in RCTViewManager, onChange is defined as an event that doesn't generate a ViewConfig validAttribute: 1. onChange is exported from [RCTViewManager customBubblingEventTypes](https://www.internalfb.com/code/fbsource/[210a214c9da7a847dd8840cae9f8341ed39a2ff6]/xplat/js/react-native-github/React/Views/RCTViewManager.m?lines=99%2C105%2C118) 2. Events exported from customBubblingEventTypes [don't insert into validAttributes](https://www.internalfb.com/code/fbsource/[8237815744b8cf7e38d9cf107a55c015f7b1545b]/xplat/js/react-native-github/React/Views/RCTComponentData.m?lines=393-398). To summarize: - onChange isn't used by slider - onChange generates an onChange: true entry in SVCs - onChange **doesn't** generate an onChange: true entry in NVC Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D34052662 fbshipit-source-id: 76bfd75c1ecbaa40d33e2b097b1f4458bf200ac2 --- Libraries/Components/Slider/Slider.js | 2 -- Libraries/Components/Slider/SliderNativeComponent.js | 1 - .../Components/__tests__/__snapshots__/Slider-test.js.snap | 5 ----- 3 files changed, 8 deletions(-) diff --git a/Libraries/Components/Slider/Slider.js b/Libraries/Components/Slider/Slider.js index 15e3387dc1..c3aee2d2d3 100644 --- a/Libraries/Components/Slider/Slider.js +++ b/Libraries/Components/Slider/Slider.js @@ -228,7 +228,6 @@ const Slider = ( } : null; - const onChangeEvent = onValueChangeEvent; const onSlidingCompleteEvent = onSlidingComplete ? (event: Event) => { onSlidingComplete(event.nativeEvent.value); @@ -250,7 +249,6 @@ const Slider = ( disabled={disabled} maximumValue={maximumValue} minimumValue={minimumValue} - onChange={onChangeEvent} onResponderTerminationRequest={() => false} onSlidingComplete={onSlidingCompleteEvent} onStartShouldSetResponder={() => true} diff --git a/Libraries/Components/Slider/SliderNativeComponent.js b/Libraries/Components/Slider/SliderNativeComponent.js index 739bce7b2a..9846c1a9de 100644 --- a/Libraries/Components/Slider/SliderNativeComponent.js +++ b/Libraries/Components/Slider/SliderNativeComponent.js @@ -47,7 +47,6 @@ type NativeProps = $ReadOnly<{| value?: WithDefault, // Events - onChange?: ?BubblingEventHandler, onValueChange?: ?BubblingEventHandler, onSlidingComplete?: ?DirectEventHandler, |}>; diff --git a/Libraries/Components/__tests__/__snapshots__/Slider-test.js.snap b/Libraries/Components/__tests__/__snapshots__/Slider-test.js.snap index 63c3e3507a..244045f005 100644 --- a/Libraries/Components/__tests__/__snapshots__/Slider-test.js.snap +++ b/Libraries/Components/__tests__/__snapshots__/Slider-test.js.snap @@ -6,7 +6,6 @@ exports[` should render as expected 1`] = ` enabled={true} maximumValue={1} minimumValue={0} - onChange={null} onResponderTerminationRequest={[Function]} onSlidingComplete={null} onStartShouldSetResponder={[Function]} @@ -27,7 +26,6 @@ exports[` should set disabled as false 1`] = ` enabled={true} maximumValue={1} minimumValue={0} - onChange={null} onResponderTerminationRequest={[Function]} onSlidingComplete={null} onStartShouldSetResponder={[Function]} @@ -53,7 +51,6 @@ exports[` should set disabled as false 2`] = ` enabled={true} maximumValue={1} minimumValue={0} - onChange={null} onResponderTerminationRequest={[Function]} onSlidingComplete={null} onStartShouldSetResponder={[Function]} @@ -79,7 +76,6 @@ exports[` should set disabled as true 1`] = ` enabled={false} maximumValue={1} minimumValue={0} - onChange={null} onResponderTerminationRequest={[Function]} onSlidingComplete={null} onStartShouldSetResponder={[Function]} @@ -105,7 +101,6 @@ exports[` should set disabled as true 2`] = ` enabled={false} maximumValue={1} minimumValue={0} - onChange={null} onResponderTerminationRequest={[Function]} onSlidingComplete={null} onStartShouldSetResponder={[Function]} From 971ba5c26b335310944e0940c24ed9a01be7a365 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Tue, 8 Feb 2022 19:09:19 -0800 Subject: [PATCH 075/109] Re-introduce {eventName}: true ViewConfig ValidAttributes in Static ViewConfigs Summary: # Problem I removed the {eventName}: true entries from ViewConfigs validAttributes in D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a). These entries were iOS-only. I removed them to achieve platform-consistency in native ViewConfigs. This change broke the onLayout event for all React Native components. So, I reverted D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a) for native ViewConfigs server-side. But I never got around to reverting D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a) for static ViewConfigs. # Changes This diff reverts D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a) for Static ViewConfigs, with server-side gating. Now, these {eventName}: true ViewConfig validAttribute will be inserted into all view configs (static and native) **by default**. Calling RCTDisableViewConfigEventValidAttributes(YES) on iOS will remove {eventName}: true ViewConfig ValidAttributes entries from Static ViewConfigs. (Previously, this method only removed the entries from native ViewConfigs). https://www.internalfb.com/code/fbsource/[6615b0675bdf]/fbobjc/Apps/Wilde/FBReactModule2/FBReactModuleAPI/FBReactModuleAPI/Exported/FBReactModule.mm?lines=344 Changelog: [Internal] Reviewed By: yungsters Differential Revision: D33933403 fbshipit-source-id: 17823ed99f97d7851f04e5cdab9c95667df13253 --- .../ScrollView/ScrollViewNativeComponent.js | 9 ++++++ .../TextInput/RCTTextInputViewConfig.js | 10 +++++++ Libraries/Image/ImageViewNativeComponent.js | 9 ++++++ .../NativeComponent/PlatformBaseViewConfig.js | 13 ++++++++- Libraries/NativeComponent/ViewConfigIgnore.js | 28 +++++++++++++++++++ .../__snapshots__/index-test.js.snap | 20 +++++++++++-- .../GenerateViewConfigJs-test.js.snap | 20 +++++++++++++ .../components/GenerateViewConfigJs.js | 24 ++++++++++++++++ .../GenerateViewConfigJs-test.js.snap | 26 ++++++++++++++++- 9 files changed, 155 insertions(+), 4 deletions(-) diff --git a/Libraries/Components/ScrollView/ScrollViewNativeComponent.js b/Libraries/Components/ScrollView/ScrollViewNativeComponent.js index 49fa3bfc3c..ec2166b7f2 100644 --- a/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +++ b/Libraries/Components/ScrollView/ScrollViewNativeComponent.js @@ -11,6 +11,7 @@ import type {ScrollViewNativeProps as Props} from './ScrollViewNativeComponentType'; import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry'; +import {ConditionallyIgnoredEventHandlers} from '../../NativeComponent/ViewConfigIgnore'; import Platform from '../../Utilities/Platform'; const RCTScrollViewViewConfig = @@ -138,6 +139,14 @@ const RCTScrollViewViewConfig = snapToOffsets: true, snapToStart: true, zoomScale: true, + ...ConditionallyIgnoredEventHandlers({ + onScrollBeginDrag: true, + onMomentumScrollEnd: true, + onScrollEndDrag: true, + onMomentumScrollBegin: true, + onScrollToTop: true, + onScroll: true, + }), }, }; diff --git a/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/Libraries/Components/TextInput/RCTTextInputViewConfig.js index ee479389c8..52134db441 100644 --- a/Libraries/Components/TextInput/RCTTextInputViewConfig.js +++ b/Libraries/Components/TextInput/RCTTextInputViewConfig.js @@ -9,6 +9,7 @@ */ import type {PartialViewConfig} from '../../Renderer/shims/ReactNativeTypes'; +import {ConditionallyIgnoredEventHandlers} from '../../NativeComponent/ViewConfigIgnore'; type PartialViewConfigWithoutName = $Rest< PartialViewConfig, @@ -147,6 +148,15 @@ const RCTTextInputViewConfig = { clearTextOnFocus: true, showSoftInputOnFocus: true, autoFocus: true, + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + onSelectionChange: true, + onContentSizeChange: true, + onScroll: true, + onChangeSync: true, + onKeyPressSync: true, + onTextInput: true, + }), }, }; diff --git a/Libraries/Image/ImageViewNativeComponent.js b/Libraries/Image/ImageViewNativeComponent.js index d0e0206827..69b21ea226 100644 --- a/Libraries/Image/ImageViewNativeComponent.js +++ b/Libraries/Image/ImageViewNativeComponent.js @@ -12,6 +12,7 @@ import type {ResolvedAssetSource} from './AssetSourceResolver'; import type {ImageProps} from './ImageProps'; import type {ViewProps} from '../Components/View/ViewPropTypes'; import * as NativeComponentRegistry from '../NativeComponent/NativeComponentRegistry'; +import {ConditionallyIgnoredEventHandlers} from '../NativeComponent/ViewConfigIgnore'; import type {HostComponent} from '../Renderer/shims/ReactNativeTypes'; import type { ColorValue, @@ -125,6 +126,14 @@ const ImageViewViewConfig = tintColor: { process: require('../StyleSheet/processColor'), }, + ...ConditionallyIgnoredEventHandlers({ + onLoadStart: true, + onLoad: true, + onLoadEnd: true, + onProgress: true, + onError: true, + onPartialLoad: true, + }), }, }; diff --git a/Libraries/NativeComponent/PlatformBaseViewConfig.js b/Libraries/NativeComponent/PlatformBaseViewConfig.js index 3d0d35152e..1487637b03 100644 --- a/Libraries/NativeComponent/PlatformBaseViewConfig.js +++ b/Libraries/NativeComponent/PlatformBaseViewConfig.js @@ -11,7 +11,10 @@ import {Platform} from 'react-native'; import type {PartialViewConfig} from '../Renderer/shims/ReactNativeTypes'; import ReactNativeStyleAttributes from '../Components/View/ReactNativeStyleAttributes'; -import {DynamicallyInjectedByGestureHandler} from './ViewConfigIgnore'; +import { + DynamicallyInjectedByGestureHandler, + ConditionallyIgnoredEventHandlers, +} from './ViewConfigIgnore'; type PartialViewConfigWithoutName = $Rest< PartialViewConfig, @@ -446,6 +449,14 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = direction: true, style: ReactNativeStyleAttributes, + + ...ConditionallyIgnoredEventHandlers({ + onLayout: true, + onMagicTap: true, + onAccessibilityAction: true, + onAccessibilityEscape: true, + onAccessibilityTap: true, + }), }, }; diff --git a/Libraries/NativeComponent/ViewConfigIgnore.js b/Libraries/NativeComponent/ViewConfigIgnore.js index 78ccbb4044..73442ad705 100644 --- a/Libraries/NativeComponent/ViewConfigIgnore.js +++ b/Libraries/NativeComponent/ViewConfigIgnore.js @@ -8,6 +8,8 @@ * @format */ +import Platform from '../Utilities/Platform'; + const ignoredViewConfigProps = new WeakSet<{...}>(); /** @@ -19,6 +21,32 @@ export function DynamicallyInjectedByGestureHandler(object: T): T { return object; } +/** + * On iOS, ViewManager events declarations generate {eventName}: true entries + * in ViewConfig valueAttributes. In our Static ViewConfig infra, we generate + * these {eventName}: true entries during runtime by inspecting a ViewConfig's + * bubblingEventTypes, and directEventTypes. + * + * However, not all event declarations generate these {eventName}: true entries. + * So, the ViewConfig infra generates extra {eventName}: true entries for some + * events. These extra entries are harmless. So, the logic below makes the ViewConfig + * Validator ignore all extra {eventName}: true entries in static ViewConfig + * validAttributes. + * + * TODO(T110872225): Remove this logic + */ +export function ConditionallyIgnoredEventHandlers( + value: T, +): T | void { + if ( + Platform.OS === 'ios' && + !(global.RN$ViewConfigEventValidAttributesDisabled === true) + ) { + return value; + } + return undefined; +} + export function isIgnored(value: mixed): boolean { if (typeof value === 'object' && value != null) { return ignoredViewConfigProps.has(value); diff --git a/packages/babel-plugin-codegen/__tests__/__snapshots__/index-test.js.snap b/packages/babel-plugin-codegen/__tests__/__snapshots__/index-test.js.snap index cc95c05740..474b387833 100644 --- a/packages/babel-plugin-codegen/__tests__/__snapshots__/index-test.js.snap +++ b/packages/babel-plugin-codegen/__tests__/__snapshots__/index-test.js.snap @@ -24,6 +24,10 @@ interface NativeCommands { const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const { + ConditionallyIgnoredEventHandlers +} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); + const { dispatchCommand } = require(\\"react-native/Libraries/Renderer/shims/ReactNative\\"); @@ -45,7 +49,11 @@ export const __INTERNAL_VIEW_CONFIG = { } }, validAttributes: { - boolean_default_true_optional_both: true + boolean_default_true_optional_both: true, + ...ConditionallyIgnoredEventHandlers({ + onDirectEventDefinedInlineNull: true, + onBubblingEventDefinedInlineNull: true + }) } }; export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG); @@ -85,6 +93,10 @@ interface NativeCommands { const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const { + ConditionallyIgnoredEventHandlers +} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); + const { dispatchCommand } = require(\\"react-native/Libraries/Renderer/shims/ReactNative\\"); @@ -106,7 +118,11 @@ export const __INTERNAL_VIEW_CONFIG = { } }, validAttributes: { - boolean_default_true_optional_both: true + boolean_default_true_optional_both: true, + ...ConditionallyIgnoredEventHandlers({ + onDirectEventDefinedInlineNull: true, + onBubblingEventDefinedInlineNull: true + }) } }; export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG); diff --git a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap index 9f50be6680..12fa79b3d4 100644 --- a/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap +++ b/packages/react-native-codegen/e2e/__tests__/components/__snapshots__/GenerateViewConfigJs-test.js.snap @@ -200,6 +200,7 @@ Map { 'use strict'; const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); let nativeComponentName = 'EventNestedObjectPropsNativeComponentView'; @@ -218,6 +219,10 @@ export const __INTERNAL_VIEW_CONFIG = { validAttributes: { disabled: true, + + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + }), }, }; @@ -243,6 +248,7 @@ Map { 'use strict'; const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); let nativeComponentName = 'EventPropsNativeComponentView'; @@ -289,6 +295,15 @@ export const __INTERNAL_VIEW_CONFIG = { validAttributes: { disabled: true, + + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + onEventDirect: true, + onEventDirectWithPaperName: true, + onOrientationChange: true, + onEnd: true, + onEventBubblingWithPaperName: true, + }), }, }; @@ -426,6 +441,7 @@ Map { 'use strict'; const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); let nativeComponentName = 'RCTInterfaceOnlyComponent'; @@ -444,6 +460,10 @@ export const __INTERNAL_VIEW_CONFIG = { validAttributes: { title: true, + + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + }), }, }; diff --git a/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js b/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js index b1872a9176..3a4bda260c 100644 --- a/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js +++ b/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js @@ -171,6 +171,23 @@ function normalizeInputEventName(name) { return name; } +// Replicates the behavior of viewConfig in RCTComponentData.m +function getValidAttributesForEvents(events, imports) { + imports.add( + "const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');", + ); + + const validAttributes = j.objectExpression( + events.map(eventType => { + return j.property('init', j.identifier(eventType.name), j.literal(true)); + }), + ); + + return j.callExpression(j.identifier('ConditionallyIgnoredEventHandlers'), [ + validAttributes, + ]); +} + function generateBubblingEventInfo(event, nameOveride) { return j.property( 'init', @@ -243,6 +260,13 @@ function buildViewConfig( getReactDiffProcessValue(schemaProp.typeAnnotation), ); }), + ...(componentEvents.length > 0 + ? [ + j.spreadProperty( + getValidAttributesForEvents(componentEvents, imports), + ), + ] + : []), ]); const bubblingEventNames = component.events diff --git a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap index 757ee7a65f..49f9a83c09 100644 --- a/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap +++ b/packages/react-native-codegen/src/generators/components/__tests__/__snapshots__/GenerateViewConfigJs-test.js.snap @@ -295,6 +295,7 @@ Map { 'use strict'; const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); let nativeComponentName = 'EventsNestedObjectNativeComponent'; @@ -313,6 +314,10 @@ export const __INTERNAL_VIEW_CONFIG = { validAttributes: { disabled: true, + + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + }), }, }; @@ -338,6 +343,7 @@ Map { 'use strict'; const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); let nativeComponentName = 'EventsNativeComponent'; @@ -373,6 +379,13 @@ export const __INTERNAL_VIEW_CONFIG = { validAttributes: { disabled: true, + + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + onEventDirect: true, + onOrientationChange: true, + onEnd: true, + }), }, }; @@ -398,6 +411,7 @@ Map { 'use strict'; const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); let nativeComponentName = 'RCTInterfaceOnlyComponent'; @@ -420,7 +434,12 @@ export const __INTERNAL_VIEW_CONFIG = { }, }, - validAttributes: {}, + validAttributes: { + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + onDire tChange: true, + }), + }, }; export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG); @@ -688,6 +707,7 @@ Map { 'use strict'; const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry'); +const {ConditionallyIgnoredEventHandlers} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore'); let nativeComponentName = 'RCTInterfaceOnlyComponent'; @@ -706,6 +726,10 @@ export const __INTERNAL_VIEW_CONFIG = { validAttributes: { accessibilityHint: true, + + ...ConditionallyIgnoredEventHandlers({ + onChange: true, + }), }, }; From e737270d118c3d5c992ec247a8695fb3acc4cacd Mon Sep 17 00:00:00 2001 From: CodemodService FBSourceClangFormatLinterBot <> Date: Tue, 8 Feb 2022 19:09:55 -0800 Subject: [PATCH 076/109] Daily `arc lint --take CLANGFORMAT` Reviewed By: zertosh Differential Revision: D34099214 fbshipit-source-id: 7a1fc8550968d8b87f016e4bf706252bf03e4483 --- ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp index e7f9ba8d05..2b433f33ae 100644 --- a/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp +++ b/ReactCommon/hermes/inspector/chrome/tests/MessageTests.cpp @@ -1506,7 +1506,6 @@ TEST(MessageTests, testPauseNotificationFull) { EXPECT_EQ(deserializedReq.callFrames[0].thisObj.type, "aType"); } - TEST(MessageTests, testResumedNotification) { std::string message = R"( { From 97064ae1fbf84a8a6b653c02c5872191b7d2d622 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Tue, 8 Feb 2022 20:45:35 -0800 Subject: [PATCH 077/109] Fix DarkMode for DatePickerDialogFragment Summary: Fix DarkMode for DatePickerDialogFragment changelog: [Android][Fixed] Fix DarkMode on Calendar DateTimePicker Reviewed By: JoshuaGross Differential Revision: D34092084 fbshipit-source-id: 4fbe3484bc7101c4b7d244671d7d46cae1c23bec --- ReactAndroid/src/main/res/shell/values/styles.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/res/shell/values/styles.xml b/ReactAndroid/src/main/res/shell/values/styles.xml index b0418ce852..1db9ac70f7 100644 --- a/ReactAndroid/src/main/res/shell/values/styles.xml +++ b/ReactAndroid/src/main/res/shell/values/styles.xml @@ -19,11 +19,12 @@ spinner - - From a75bbe7552e25f85983461b3e7b12fdf87c07f01 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Wed, 9 Feb 2022 03:01:20 -0800 Subject: [PATCH 078/109] Fix docs in ModalHostView headers Summary: Copy-paste error Changelog: [Internal] Reviewed By: genkikondo Differential Revision: D34077530 fbshipit-source-id: 04ab17ba9308762361d993b7ed1b372af400b8d1 --- .../components/modal/ModalHostViewComponentDescriptor.h | 2 +- .../react/renderer/components/modal/ModalHostViewShadowNode.h | 2 +- .../react/renderer/components/modal/ModalHostViewState.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h b/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h index e3e504160a..0ff4d14d9a 100644 --- a/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h +++ b/ReactCommon/react/renderer/components/modal/ModalHostViewComponentDescriptor.h @@ -15,7 +15,7 @@ namespace facebook { namespace react { /* - * Descriptor for component. + * Descriptor for component. */ class ModalHostViewComponentDescriptor final diff --git a/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h b/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h index 054074229b..5558e0ef12 100644 --- a/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h +++ b/ReactCommon/react/renderer/components/modal/ModalHostViewShadowNode.h @@ -18,7 +18,7 @@ namespace react { extern const char ModalHostViewComponentName[]; /* - * `ShadowNode` for component. + * `ShadowNode` for component. */ class ModalHostViewShadowNode final : public ConcreteViewShadowNode< ModalHostViewComponentName, diff --git a/ReactCommon/react/renderer/components/modal/ModalHostViewState.h b/ReactCommon/react/renderer/components/modal/ModalHostViewState.h index de9b9537fe..2afe22358d 100644 --- a/ReactCommon/react/renderer/components/modal/ModalHostViewState.h +++ b/ReactCommon/react/renderer/components/modal/ModalHostViewState.h @@ -21,7 +21,7 @@ namespace facebook { namespace react { /* - * State for component. + * State for component. */ class ModalHostViewState final { public: From 8ee1f832b6c3490e5393bd3a1672e300f54890aa Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 9 Feb 2022 08:23:43 -0800 Subject: [PATCH 079/109] Update `test_android_template` to use `build_npm_package` (#33068) Summary: I'm updating the `test_android_template` CI step to use the result of `build_npm_package` instead of sed-ing the RN version to `file:..`. This should be more robust and will allow to install transitive deps automatically, without having to deal with separate installation steps. This also fixes the broken CI for Android Changelog: [Internal] [Changed] - Update `test_android_template` to use `build_npm_package` Pull Request resolved: https://github.com/facebook/react-native/pull/33068 Reviewed By: ShikaSD Differential Revision: D34083047 Pulled By: cortinico fbshipit-source-id: de34472d5737db445cfc0d4b1c6feaf1e746bb61 --- .circleci/config.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f2ccd1572..b6e34fe025 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -569,20 +569,18 @@ jobs: steps: - checkout - run_yarn + - attach_workspace: + at: . - run: - name: Setup the Android Template + name: Create Android template project command: | + REPO_ROOT=$(pwd) + PACKAGE=$(cat build/react-native-package-version) + PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE" cd template - # We replace the "react-native" dependency version with file:.. so we use it from source. - sed -i 's/\"react-native\"\:.*/\"react-native\"\: \"file\:\.\.\"/g' package.json + npm add $PATH_TO_PACKAGE npm install - # react-native-community/cli is needed as the Android template is referencing a .gradle file inside it. - npm i @react-native-community/cli - - - run: - name: Bundle the latest version of ReactAndroid - command: ./gradlew :ReactAndroid:publishReleasePublicationToNpmRepository - run: name: Build the template application @@ -917,11 +915,6 @@ workflows: - build_npm_package: # Build a release package on every untagged commit, but do not publish to npm. publish_npm_args: --dry-run - filters: - branches: - only: - - main - - /^pull\/.*$/ - test_js: run_disabled_tests: false filters: @@ -933,6 +926,8 @@ workflows: branches: ignore: gh-pages - test_android_template: + requires: + - build_npm_package filters: branches: ignore: gh-pages From eafa5bcb3899f9a6047901dc5f05d8468016241f Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 9 Feb 2022 10:01:42 -0800 Subject: [PATCH 080/109] Log timestamp in ReactMarker.logFabricMarker method Summary: Ensure we always log a timestamp in ReactMarker.logFabricMarker changelog: [internal] internal Reviewed By: ShikaSD Differential Revision: D34006699 fbshipit-source-id: 79ff1005ba1f0ed44bf319e50a80dbdebd1ec24f --- .../src/main/java/com/facebook/react/bridge/ReactMarker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java index b6c4357176..ac07aca94c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java @@ -7,6 +7,7 @@ package com.facebook.react.bridge; +import android.os.SystemClock; import androidx.annotation.Nullable; import com.facebook.proguard.annotations.DoNotStrip; import java.util.List; @@ -91,7 +92,7 @@ public class ReactMarker { @DoNotStrip public static void logFabricMarker( ReactMarkerConstants name, @Nullable String tag, int instanceKey) { - logFabricMarker(name, tag, instanceKey, -1); + logFabricMarker(name, tag, instanceKey, SystemClock.uptimeMillis()); } @DoNotStrip From 4e947ecb2dabfa0226af7f859c828847b4d891c0 Mon Sep 17 00:00:00 2001 From: Muhammad Numan Date: Wed, 9 Feb 2022 10:22:23 -0800 Subject: [PATCH 081/109] fix: jvm 11 error message from ReactPlugin.kt and react.gradle (#33048) Summary: you can see discussion here: https://github.com/reactwg/react-native-releases/discussions/13#discussioncomment-2069527 we were getting this error message when we build Gradle with other than 11 JVM ``` > Task :react-native-gradle-plugin:compileJava FAILED 2 actionable tasks: 2 executed FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-gradle-plugin:compileJava'. > invalid source release: 11 ``` this solution is suggested by mikehardy after this PR, now the error is like this ``` ************************************************************************************************************** ERROR: requires JDK11 or higher. Incompatible major version detected: '8' ************************************************************************************************************** ``` ## Changelog [Android] [Fixed] - jvm 11 error message Pull Request resolved: https://github.com/facebook/react-native/pull/33048 Test Plan: install other than 11 java version and just run `./scripts/test-manual-e2e.sh` this command at the root of RN repo than this error will appair `invalid source release: 11` Reviewed By: ShikaSD Differential Revision: D34110990 Pulled By: cortinico fbshipit-source-id: c142a363c7cec0db65d5ab9da858fd25866c7c49 --- .../kotlin/com/facebook/react/ReactPlugin.kt | 20 +++++++++++++++++++ react.gradle | 14 +++++++++++++ 2 files changed, 34 insertions(+) diff --git a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt index 061a56bdc3..9f8759f0db 100644 --- a/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt +++ b/packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt @@ -15,17 +15,37 @@ import com.facebook.react.tasks.BuildCodegenCLITask import com.facebook.react.tasks.GenerateCodegenArtifactsTask import com.facebook.react.tasks.GenerateCodegenSchemaTask import java.io.File +import kotlin.system.exitProcess import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.Task +import org.gradle.internal.jvm.Jvm class ReactPlugin : Plugin { override fun apply(project: Project) { + checkJvmVersion() val extension = project.extensions.create("react", ReactExtension::class.java, project) applyAppPlugin(project, extension) applyCodegenPlugin(project, extension) } + private fun checkJvmVersion() { + val jvmVersion = Jvm.current()?.javaVersion?.majorVersion + if ((jvmVersion?.toIntOrNull() ?: 0) <= 8) { + println("\n\n\n") + println( + "**************************************************************************************************************") + println("\n\n") + println("ERROR: requires JDK11 or higher.") + println("Incompatible major version detected: '" + jvmVersion + "'") + println("\n\n") + println( + "**************************************************************************************************************") + println("\n\n\n") + exitProcess(1) + } + } + private fun applyAppPlugin(project: Project, config: ReactExtension) { project.afterEvaluate { if (config.applyAppPlugin.getOrElse(false)) { diff --git a/react.gradle b/react.gradle index 0ace9be826..4c6a515134 100644 --- a/react.gradle +++ b/react.gradle @@ -6,6 +6,7 @@ */ import org.apache.tools.ant.taskdefs.condition.Os +import org.gradle.internal.jvm.Jvm def config = project.hasProperty("react") ? project.react : [:]; @@ -129,6 +130,19 @@ android { } } +def jvmVersion = Jvm.current().javaVersion.majorVersion +if (jvmVersion.toInteger() <= 8) { + println "\n\n\n" + println "**************************************************************************************************************" + println "\n\n" + println "ERROR: requires JDK11 or higher." + println "Incompatible major version detected: '" + jvmVersion + "'" + println "\n\n" + println "**************************************************************************************************************" + println "\n\n\n" + System.exit(1) +} + afterEvaluate { def isAndroidLibrary = plugins.hasPlugin("com.android.library") def variants = isAndroidLibrary ? android.libraryVariants : android.applicationVariants From 3112238b1447002c97e3830dcf96710481e1394b Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Wed, 9 Feb 2022 10:23:47 -0800 Subject: [PATCH 082/109] De-duplicate conversion of SharedColor to Android int value Summary: Removes duplicated code in SharedColor conversions. The original copy was done for the MapBuffer experiment, as the method was returning `folly::dynamic` instead of integer. Nothing prevents us from returning integer here directly, so we can keep one implementation. Changelog: [Internal] - Removed duplicated SharedColor conversion for Android Reviewed By: javache Differential Revision: D33797490 fbshipit-source-id: 196657f0616e6cb7e987225b76328fe77fd6c28a --- .../renderer/attributedstring/conversions.h | 18 ++++++++++-------- .../components/progressbar/conversions.h | 2 +- .../androidtextinput/AndroidTextInputProps.cpp | 12 ++++++------ .../react/renderer/graphics/conversions.h | 12 +----------- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/ReactCommon/react/renderer/attributedstring/conversions.h b/ReactCommon/react/renderer/attributedstring/conversions.h index 24efffb2a6..77472d413e 100644 --- a/ReactCommon/react/renderer/attributedstring/conversions.h +++ b/ReactCommon/react/renderer/attributedstring/conversions.h @@ -827,11 +827,11 @@ inline folly::dynamic toDynamic(const TextAttributes &textAttributes) { auto _textAttributes = folly::dynamic::object(); if (textAttributes.foregroundColor) { _textAttributes( - "foregroundColor", toDynamic(textAttributes.foregroundColor)); + "foregroundColor", toAndroidRepr(textAttributes.foregroundColor)); } if (textAttributes.backgroundColor) { _textAttributes( - "backgroundColor", toDynamic(textAttributes.backgroundColor)); + "backgroundColor", toAndroidRepr(textAttributes.backgroundColor)); } if (!std::isnan(textAttributes.opacity)) { _textAttributes("opacity", textAttributes.opacity); @@ -876,7 +876,8 @@ inline folly::dynamic toDynamic(const TextAttributes &textAttributes) { // Decoration if (textAttributes.textDecorationColor) { _textAttributes( - "textDecorationColor", toDynamic(textAttributes.textDecorationColor)); + "textDecorationColor", + toAndroidRepr(textAttributes.textDecorationColor)); } if (textAttributes.textDecorationLineType.has_value()) { _textAttributes( @@ -894,7 +895,7 @@ inline folly::dynamic toDynamic(const TextAttributes &textAttributes) { } if (textAttributes.textShadowColor) { _textAttributes( - "textShadowColor", toDynamic(textAttributes.textShadowColor)); + "textShadowColor", toAndroidRepr(textAttributes.textShadowColor)); } // Special if (textAttributes.isHighlighted.has_value()) { @@ -1036,11 +1037,11 @@ inline MapBuffer toMapBuffer(const TextAttributes &textAttributes) { auto builder = MapBufferBuilder(); if (textAttributes.foregroundColor) { builder.putInt( - TA_KEY_FOREGROUND_COLOR, toMapBuffer(textAttributes.foregroundColor)); + TA_KEY_FOREGROUND_COLOR, toAndroidRepr(textAttributes.foregroundColor)); } if (textAttributes.backgroundColor) { builder.putInt( - TA_KEY_BACKGROUND_COLOR, toMapBuffer(textAttributes.backgroundColor)); + TA_KEY_BACKGROUND_COLOR, toAndroidRepr(textAttributes.backgroundColor)); } if (!std::isnan(textAttributes.opacity)) { builder.putDouble(TA_KEY_OPACITY, textAttributes.opacity); @@ -1087,7 +1088,7 @@ inline MapBuffer toMapBuffer(const TextAttributes &textAttributes) { if (textAttributes.textDecorationColor) { builder.putInt( TA_KEY_TEXT_DECORATION_COLOR, - toMapBuffer(textAttributes.textDecorationColor)); + toAndroidRepr(textAttributes.textDecorationColor)); } if (textAttributes.textDecorationLineType.has_value()) { builder.putString( @@ -1107,7 +1108,8 @@ inline MapBuffer toMapBuffer(const TextAttributes &textAttributes) { } if (textAttributes.textShadowColor) { builder.putInt( - TA_KEY_TEXT_SHADOW_COLOR, toMapBuffer(textAttributes.textShadowColor)); + TA_KEY_TEXT_SHADOW_COLOR, + toAndroidRepr(textAttributes.textShadowColor)); } // Special if (textAttributes.isHighlighted.has_value()) { diff --git a/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h b/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h index 7f7ee33e54..dc3c147477 100644 --- a/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h +++ b/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/conversions.h @@ -20,7 +20,7 @@ inline folly::dynamic toDynamic(AndroidProgressBarProps const &props) { serializedProps["indeterminate"] = props.indeterminate; serializedProps["progress"] = props.progress; serializedProps["animating"] = props.animating; - serializedProps["color"] = toDynamic(props.color); + serializedProps["color"] = toAndroidRepr(props.color); serializedProps["testID"] = props.testID; return serializedProps; } diff --git a/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp b/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp index 100186165e..1075179f1a 100644 --- a/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp +++ b/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp @@ -266,7 +266,7 @@ folly::dynamic AndroidTextInputProps::getDynamic() const { props["numberOfLines"] = numberOfLines; props["disableFullscreenUI"] = disableFullscreenUI; props["textBreakStrategy"] = textBreakStrategy; - props["underlineColorAndroid"] = toDynamic(underlineColorAndroid); + props["underlineColorAndroid"] = toAndroidRepr(underlineColorAndroid); props["inlineImageLeft"] = inlineImageLeft; props["inlineImagePadding"] = inlineImagePadding; props["importantForAutofill"] = importantForAutofill; @@ -282,9 +282,9 @@ folly::dynamic AndroidTextInputProps::getDynamic() const { props["maxLength"] = maxLength; props["multiline"] = multiline; props["placeholder"] = placeholder; - props["placeholderTextColor"] = toDynamic(placeholderTextColor); + props["placeholderTextColor"] = toAndroidRepr(placeholderTextColor); props["secureTextEntry"] = secureTextEntry; - props["selectionColor"] = toDynamic(selectionColor); + props["selectionColor"] = toAndroidRepr(selectionColor); props["selection"] = toDynamic(selection); props["value"] = value; props["defaultValue"] = defaultValue; @@ -292,14 +292,14 @@ folly::dynamic AndroidTextInputProps::getDynamic() const { props["blurOnSubmit"] = blurOnSubmit; props["caretHidden"] = caretHidden; props["contextMenuHidden"] = contextMenuHidden; - props["textShadowColor"] = toDynamic(textShadowColor); + props["textShadowColor"] = toAndroidRepr(textShadowColor); props["textShadowRadius"] = textShadowRadius; props["textDecorationLine"] = textDecorationLine; props["fontStyle"] = fontStyle; props["textShadowOffset"] = toDynamic(textShadowOffset); props["lineHeight"] = lineHeight; props["textTransform"] = textTransform; - props["color"] = toDynamic(color); + props["color"] = toAndroidRepr(color); props["letterSpacing"] = letterSpacing; props["fontSize"] = fontSize; props["textAlign"] = textAlign; @@ -307,7 +307,7 @@ folly::dynamic AndroidTextInputProps::getDynamic() const { props["fontWeight"] = fontWeight; props["fontFamily"] = fontFamily; props["textAlignVertical"] = textAlignVertical; - props["cursorColor"] = toDynamic(cursorColor); + props["cursorColor"] = toAndroidRepr(cursorColor); props["mostRecentEventCount"] = mostRecentEventCount; props["text"] = text; diff --git a/ReactCommon/react/renderer/graphics/conversions.h b/ReactCommon/react/renderer/graphics/conversions.h index fba02b74d2..8e28bdcb4d 100644 --- a/ReactCommon/react/renderer/graphics/conversions.h +++ b/ReactCommon/react/renderer/graphics/conversions.h @@ -51,17 +51,7 @@ inline void fromRawValue( #ifdef ANDROID -inline folly::dynamic toDynamic(const SharedColor &color) { - ColorComponents components = colorComponentsFromColor(color); - auto ratio = 255.f; - return ( - ((int)round(components.alpha * ratio) & 0xff) << 24 | - ((int)round(components.red * ratio) & 0xff) << 16 | - ((int)round(components.green * ratio) & 0xff) << 8 | - ((int)round(components.blue * ratio) & 0xff)); -} - -inline int toMapBuffer(const SharedColor &color) { +inline int toAndroidRepr(const SharedColor &color) { ColorComponents components = colorComponentsFromColor(color); auto ratio = 255.f; return ( From a6c792db0bc9d6ce1000f6aa3223db2c06668b0a Mon Sep 17 00:00:00 2001 From: Kacie Bawiec Date: Wed, 9 Feb 2022 11:23:21 -0800 Subject: [PATCH 083/109] React Native sync for revisions 51947a1...a3bde79 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: This sync includes the following changes: - **[a3bde7974](https://github.com/facebook/react/commit/a3bde7974 )**: Exclude react-dom/unstable_testing entry point from stable releases ([#23258](https://github.com/facebook/react/pull/23258)) //// - **[569093276](https://github.com/facebook/react/commit/569093276 )**: Add onErrorShell Callback ([#23247](https://github.com/facebook/react/pull/23247)) //// - **[0dedfcc68](https://github.com/facebook/react/commit/0dedfcc68 )**: Update the exports field ([#23257](https://github.com/facebook/react/pull/23257)) //// - **[9d4e8e84f](https://github.com/facebook/react/commit/9d4e8e84f )**: React Native raw event EventEmitter - intended for app-specific perf listeners and debugging ([#23232](https://github.com/facebook/react/pull/23232)) //// - **[1dece5235](https://github.com/facebook/react/commit/1dece5235 )**: Add back warning with component stack on Hydration mismatch ([#23241](https://github.com/facebook/react/pull/23241)) //// - **[cd4eb116c](https://github.com/facebook/react/commit/cd4eb116c )**: Revert "update node.js version for CI ([#23236](https://github.com/facebook/react/pull/23236))" ([#23239](https://github.com/facebook/react/pull/23239)) //// - **[1d7728bf9](https://github.com/facebook/react/commit/1d7728bf9 )**: update node.js version for CI ([#23236](https://github.com/facebook/react/pull/23236)) //// - **[848e802d2](https://github.com/facebook/react/commit/848e802d2 )**: Add onRecoverableError option to hydrateRoot, createRoot ([#23207](https://github.com/facebook/react/pull/23207)) //// - **[5318971f5](https://github.com/facebook/react/commit/5318971f5 )**: Remove logic for multiple error recovery attempts ([#23227](https://github.com/facebook/react/pull/23227)) //// - **[3a4462129](https://github.com/facebook/react/commit/3a4462129 )**: Disable avoidThisFallback support in Fizz ([#23224](https://github.com/facebook/react/pull/23224)) //// - **[0318ac2c4](https://github.com/facebook/react/commit/0318ac2c4 )**: Revert 4f5449 //// - **[4f5449eb4](https://github.com/facebook/react/commit/4f5449eb4 )**: Remove main from scheduler `index.js` //// - **[3f5ff16c1](https://github.com/facebook/react/commit/3f5ff16c1 )**: [Hydration] Fallback to client render if server rendered extra nodes ([#23176](https://github.com/facebook/react/pull/23176)) //// - **[529dc3ce8](https://github.com/facebook/react/commit/529dc3ce8 )**: Fix context providers in SSR when handling multiple requests ([#23171](https://github.com/facebook/react/pull/23171)) //// - **[505c15c9e](https://github.com/facebook/react/commit/505c15c9e )**: Don't inject timeline hooks unless React supports profiling ([#23151](https://github.com/facebook/react/pull/23151)) //// - **[e12a9dfc9](https://github.com/facebook/react/commit/e12a9dfc9 )**: Fix production-only updateSyncExternalStore() crash when doing setState in render ([#23150](https://github.com/facebook/react/pull/23150)) //// - **[e48940255](https://github.com/facebook/react/commit/e48940255 )**: Warn when a callback ref returns a function ([#23145](https://github.com/facebook/react/pull/23145)) //// - **[d8cfeaf22](https://github.com/facebook/react/commit/d8cfeaf22 )**: Fix context propagation for offscreen/fallback trees ([#23095](https://github.com/facebook/react/pull/23095)) //// - **[d50482478](https://github.com/facebook/react/commit/d50482478 )**: Enable scheduling profiler flag in react-dom/testing builds ([#23142](https://github.com/facebook/react/pull/23142)) //// - **[790b5246f](https://github.com/facebook/react/commit/790b5246f )**: Fix setState ignored in Safari when iframe is added to DOM in the same commit ([#23111](https://github.com/facebook/react/pull/23111)) //// Changelog: [General][Changed] - React Native sync for revisions 51947a1...a3bde79 jest_e2e[run_all_tests] Reviewed By: ShikaSD Differential Revision: D34108924 fbshipit-source-id: 96acb66c1a7da79d6ef9403490cd0e29ad23d9fb --- Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 245 +++++++--- .../implementations/ReactFabric-prod.fb.js | 427 +++++++++--------- .../ReactFabric-profiling.fb.js | 305 +++++++------ .../ReactNativeRenderer-dev.fb.js | 216 ++++++--- .../ReactNativeRenderer-prod.fb.js | 402 +++++++++-------- .../ReactNativeRenderer-profiling.fb.js | 280 ++++++------ 7 files changed, 1063 insertions(+), 814 deletions(-) diff --git a/Libraries/Renderer/REVISION b/Libraries/Renderer/REVISION index b3c49ffc21..17b725fb85 100644 --- a/Libraries/Renderer/REVISION +++ b/Libraries/Renderer/REVISION @@ -1 +1 @@ -51947a14bb24bd151f76f6fc0acdbbc404de13f7 \ No newline at end of file +a3bde7974c48cfa749b18531700f895c86cbad91 \ No newline at end of file diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index f37be3e0ef..d8d4d08bef 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<10efd73d5435b5750183622476c68681>> + * @generated SignedSource<<5cd13a68c6b2a6d7a0ea84aff011af30>> */ 'use strict'; @@ -3888,7 +3888,34 @@ function dispatchEvent(target, topLevelType, nativeEvent) { } batchedUpdates(function() { - // Heritage plugin event system + // Emit event to the RawEventEmitter. This is an unused-by-default EventEmitter + // that can be used to instrument event performance monitoring (primarily - could be useful + // for other things too). + // + // NOTE: this merely emits events into the EventEmitter below. + // If *you* do not add listeners to the `RawEventEmitter`, + // then all of these emitted events will just blackhole and are no-ops. + // It is available (although not officially supported... yet) if you want to collect + // perf data on event latency in your application, and could also be useful for debugging + // low-level events issues. + // + // If you do not have any event perf monitoring and are extremely concerned about event perf, + // it is safe to disable these "emit" statements; it will prevent checking the size of + // an empty array twice and prevent two no-ops. Practically the overhead is so low that + // we don't think it's worth thinking about in prod; your perf issues probably lie elsewhere. + // + // We emit two events here: one for listeners to this specific event, + // and one for the catchall listener '*', for any listeners that want + // to be notified for all events. + // Note that extracted events are *not* emitted, + // only events that have a 1:1 mapping with a native event, at least for now. + var event = { + eventName: topLevelType, + nativeEvent: nativeEvent + }; + ReactNativePrivateInterface.RawEventEmitter.emit(topLevelType, event); + ReactNativePrivateInterface.RawEventEmitter.emit("*", event); // Heritage plugin event system + runExtractedPluginEventsInBatch( topLevelType, targetFiber, @@ -4040,12 +4067,17 @@ function injectInternals(internals) { } try { - rendererID = hook.inject( - Object.assign({}, internals, { + if (enableSchedulingProfiler) { + // Conditionally inject these hooks only if Timeline profiler is supported by this build. + // This gives DevTools a way to feature detect that isn't tied to version number + // (since profiling and timeline are controlled by different feature flags). + internals = Object.assign({}, internals, { getLaneLabelMap: getLaneLabelMap, injectProfilingHooks: injectProfilingHooks - }) - ); // We have successfully injected, so now it is safe to set up hooks. + }); + } + + rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. injectedHook = hook; } catch (err) { @@ -4179,16 +4211,18 @@ function injectProfilingHooks(profilingHooks) { } function getLaneLabelMap() { - var map = new Map(); - var lane = 1; + { + var map = new Map(); + var lane = 1; - for (var index = 0; index < TotalLanes; index++) { - var label = getLabelForLane(lane); - map.set(lane, label); - lane *= 2; + for (var index = 0; index < TotalLanes; index++) { + var label = getLabelForLane(lane); + map.set(lane, label); + lane *= 2; + } + + return map; } - - return map; } function markCommitStarted(lanes) { @@ -6941,7 +6975,7 @@ function popProvider(context, providerFiber) { context._currentValue2 = currentValue; } } -function scheduleWorkOnParentPath(parent, renderLanes) { +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { // Update the child lanes of all the ancestors, including the alternates. var node = parent; @@ -6959,14 +6993,23 @@ function scheduleWorkOnParentPath(parent, renderLanes) { !isSubsetOfLanes(alternate.childLanes, renderLanes) ) { alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes); - } else { - // Neither alternate was updated, which means the rest of the - // ancestor path already has sufficient priority. + } + + if (node === propagationRoot) { break; } node = node.return; } + + { + if (node !== propagationRoot) { + error( + "Expected to find the propagation root when scheduling context work. " + + "This error is likely caused by a bug in React. Please file an issue." + ); + } + } } function propagateContextChange(workInProgress, context, renderLanes) { { @@ -7031,7 +7074,11 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { alternate.lanes = mergeLanes(alternate.lanes, renderLanes); } - scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too. + scheduleContextWorkOnParentPath( + fiber.return, + renderLanes, + workInProgress + ); // Mark the updated lanes on the list, too. list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the // dependency list. @@ -8906,7 +8953,7 @@ function popTreeContext(workInProgress) { } } -var isHydrating = false; +var isHydrating = false; // Hydration errors that were thrown inside this boundary function enterHydrationState(fiber) { { @@ -13866,7 +13913,7 @@ function throwException( // over and traverse parent path again, this time treating the exception // as an error. - renderDidError(); + renderDidError(value); value = createCapturedValue(value, sourceFiber); var workInProgress = returnFiber; @@ -16912,7 +16959,7 @@ function updateSuspenseFallbackChildren( return fallbackChildFragment; } -function scheduleWorkOnFiber(fiber, renderLanes) { +function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes = mergeLanes(fiber.lanes, renderLanes); var alternate = fiber.alternate; @@ -16920,7 +16967,7 @@ function scheduleWorkOnFiber(fiber, renderLanes) { alternate.lanes = mergeLanes(alternate.lanes, renderLanes); } - scheduleWorkOnParentPath(fiber.return, renderLanes); + scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot); } function propagateSuspenseContextChange( @@ -16938,7 +16985,7 @@ function propagateSuspenseContextChange( var state = node.memoizedState; if (state !== null) { - scheduleWorkOnFiber(node, renderLanes); + scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress); } } else if (node.tag === SuspenseListComponent) { // If the tail is hidden there might not be an Suspense boundaries @@ -16946,7 +16993,7 @@ function propagateSuspenseContextChange( // list itself. // We don't have to traverse to the children of the list since // the list will propagate the change when it rerenders. - scheduleWorkOnFiber(node, renderLanes); + scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress); } else if (node.child !== null) { node.child.return = node; node = node.child; @@ -18238,6 +18285,16 @@ function safelyDetachRef(current, nearestMountedAncestor) { reportUncaughtErrorInDEV(error); captureCommitPhaseError(current, nearestMountedAncestor, error); } + + { + if (typeof retVal === "function") { + error( + "Unexpected return value from a callback ref in %s. " + + "A callback ref should not return a function.", + getComponentNameFromFiber(current) + ); + } + } } else { ref.current = null; } @@ -18946,6 +19003,16 @@ function commitAttachRef(finishedWork) { } else { retVal = ref(instanceToUse); } + + { + if (typeof retVal === "function") { + error( + "Unexpected return value from a callback ref in %s. " + + "A callback ref should not return a function.", + getComponentNameFromFiber(finishedWork) + ); + } + } } else { { if (!ref.hasOwnProperty("current")) { @@ -20070,9 +20137,12 @@ var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an var workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event). -var workInProgressRootRenderPhaseUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render. +var workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase. -var workInProgressRootPingedLanes = NoLanes; // The most recent time we committed a fallback. This lets us ensure a train +var workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI. +// We will log them once the tree commits. + +var workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train // model where we don't commit new loading states in too quick succession. var globalMostRecentFallbackTime = 0; @@ -20220,11 +20290,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { // function), but there are some internal React features that use this as // an implementation detail, like selective hydration. warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase - - workInProgressRootRenderPhaseUpdatedLanes = mergeLanes( - workInProgressRootRenderPhaseUpdatedLanes, - lane - ); } else { // This is a normal update, scheduled from outside the render phase. For // example, during an input event. @@ -20601,30 +20666,34 @@ function recoverFromConcurrentError(root, errorRetryLanes) { } } - var exitStatus; - var MAX_ERROR_RETRY_ATTEMPTS = 50; + var errorsFromFirstAttempt = workInProgressRootConcurrentErrors; + var exitStatus = renderRootSync(root, errorRetryLanes); - for (var i = 0; i < MAX_ERROR_RETRY_ATTEMPTS; i++) { - exitStatus = renderRootSync(root, errorRetryLanes); - - if ( - exitStatus === RootErrored && - workInProgressRootRenderPhaseUpdatedLanes !== NoLanes - ) { - // There was a render phase update during this render. Some internal React - // implementation details may use this as a trick to schedule another - // render pass. To protect against an inifinite loop, eventually - // we'll give up. - continue; + if (exitStatus !== RootErrored) { + // Successfully finished rendering on retry + if (errorsFromFirstAttempt !== null) { + // The errors from the failed first attempt have been recovered. Add + // them to the collection of recoverable errors. We'll log them in the + // commit phase. + queueRecoverableErrors(errorsFromFirstAttempt); } - - break; } executionContext = prevExecutionContext; return exitStatus; } +function queueRecoverableErrors(errors) { + if (workInProgressRootConcurrentErrors === null) { + workInProgressRootRecoverableErrors = errors; + } else { + workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( + null, + errors + ); + } +} + function finishConcurrentRender(root, exitStatus, lanes) { switch (exitStatus) { case RootIncomplete: @@ -20638,7 +20707,7 @@ function finishConcurrentRender(root, exitStatus, lanes) { case RootErrored: { // We should have already attempted to retry this tree. If we reached // this point, it errored again. Commit it. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } @@ -20678,14 +20747,14 @@ function finishConcurrentRender(root, exitStatus, lanes) { // immediately, wait for more data to arrive. root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), msUntilTimeout ); break; } } // The work expired. Commit immediately. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } @@ -20716,20 +20785,20 @@ function finishConcurrentRender(root, exitStatus, lanes) { // Instead of committing the fallback immediately, wait for more data // to arrive. root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), _msUntilTimeout ); break; } } // Commit the placeholder. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } case RootCompleted: { // The work completed. Ready to commit. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } @@ -20860,7 +20929,7 @@ function performSyncWorkOnRoot(root) { var finishedWork = root.current.alternate; root.finishedWork = finishedWork; root.finishedLanes = lanes; - commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next + commitRoot(root, workInProgressRootRecoverableErrors); // Before exiting, make sure there's a callback scheduled for the next // pending level. ensureRootIsScheduled(root, now()); @@ -20967,8 +21036,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootFatalError = null; workInProgressRootSkippedLanes = NoLanes; workInProgressRootInterleavedUpdatedLanes = NoLanes; - workInProgressRootRenderPhaseUpdatedLanes = NoLanes; workInProgressRootPingedLanes = NoLanes; + workInProgressRootConcurrentErrors = null; + workInProgressRootRecoverableErrors = null; enqueueInterleavedUpdates(); { @@ -21121,10 +21191,16 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes); } } -function renderDidError() { +function renderDidError(error) { if (workInProgressRootExitStatus !== RootSuspendedWithDelay) { workInProgressRootExitStatus = RootErrored; } + + if (workInProgressRootConcurrentErrors === null) { + workInProgressRootConcurrentErrors = [error]; + } else { + workInProgressRootConcurrentErrors.push(error); + } } // Called during render to determine if anything has suspended. // Returns false if we're not sure. @@ -21393,7 +21469,7 @@ function completeUnitOfWork(unitOfWork) { } } -function commitRoot(root) { +function commitRoot(root, recoverableErrors) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. var previousUpdateLanePriority = getCurrentUpdatePriority(); @@ -21402,7 +21478,7 @@ function commitRoot(root) { try { ReactCurrentBatchConfig$2.transition = 0; setCurrentUpdatePriority(DiscreteEventPriority); - commitRootImpl(root, previousUpdateLanePriority); + commitRootImpl(root, recoverableErrors, previousUpdateLanePriority); } finally { ReactCurrentBatchConfig$2.transition = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); @@ -21411,7 +21487,7 @@ function commitRoot(root) { return null; } -function commitRootImpl(root, renderPriorityLevel) { +function commitRootImpl(root, recoverableErrors, renderPriorityLevel) { do { // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which // means `flushPassiveEffects` will sometimes result in additional @@ -21616,6 +21692,19 @@ function commitRootImpl(root, renderPriorityLevel) { ensureRootIsScheduled(root, now()); + if (recoverableErrors !== null) { + // There were errors during this render, but recovered from them without + // needing to surface it to the UI. We log them here. + for (var i = 0; i < recoverableErrors.length; i++) { + var recoverableError = recoverableErrors[i]; + var onRecoverableError = root.onRecoverableError; + + if (onRecoverableError !== null) { + onRecoverableError(recoverableError); + } + } + } + if (hasUncaughtError) { hasUncaughtError = false; var error$1 = firstUncaughtError; @@ -23443,7 +23532,13 @@ function assignFiberPropertiesInDEV(target, source) { return target; } -function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { +function FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError +) { this.tag = tag; this.containerInfo = containerInfo; this.pendingChildren = null; @@ -23467,6 +23562,7 @@ function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { this.entangledLanes = NoLanes; this.entanglements = createLaneMap(NoLanes); this.identifierPrefix = identifierPrefix; + this.onRecoverableError = onRecoverableError; { this.effectDuration = 0; @@ -23501,10 +23597,20 @@ function createFiberRoot( hydrate, hydrationCallbacks, isStrictMode, - concurrentUpdatesByDefaultOverride, - identifierPrefix + concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the + // host config, but because they are passed in at runtime, we have to thread + // them through the root constructor. Perhaps we should put them all into a + // single type, like a DynamicHostConfig that is defined by the renderer. + identifierPrefix, + onRecoverableError ) { - var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix); + var root = new FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError + ); // stateNode is any. var uninitializedFiber = createHostRootFiber( @@ -23526,7 +23632,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.0.0-rc.0-51947a14b-20220113"; +var ReactVersion = "18.0.0-rc.0-a3bde7974-20220208"; function createPortal( children, @@ -23654,7 +23760,8 @@ function createContainer( hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, - identifierPrefix + identifierPrefix, + onRecoverableError ) { return createFiberRoot( containerInfo, @@ -23663,7 +23770,8 @@ function createContainer( hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, - identifierPrefix + identifierPrefix, + onRecoverableError ); } function updateContainer(element, container, parentComponent, callback) { @@ -24458,7 +24566,8 @@ function render(element, containerTag, callback, concurrentRoot) { null, false, null, - "" + "", + null ); roots.set(containerTag, root); } diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index bd8208a27d..5014f1e088 100644 --- a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<97d9d60e7b93063137af17ba2abdf915>> */ "use strict"; @@ -927,7 +927,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_220 = { +var injectedNamesToPlugins$jscomp$inline_219 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -962,33 +962,33 @@ var injectedNamesToPlugins$jscomp$inline_220 = { } } }, - isOrderingDirty$jscomp$inline_221 = !1, - pluginName$jscomp$inline_222; -for (pluginName$jscomp$inline_222 in injectedNamesToPlugins$jscomp$inline_220) + isOrderingDirty$jscomp$inline_220 = !1, + pluginName$jscomp$inline_221; +for (pluginName$jscomp$inline_221 in injectedNamesToPlugins$jscomp$inline_219) if ( - injectedNamesToPlugins$jscomp$inline_220.hasOwnProperty( - pluginName$jscomp$inline_222 + injectedNamesToPlugins$jscomp$inline_219.hasOwnProperty( + pluginName$jscomp$inline_221 ) ) { - var pluginModule$jscomp$inline_223 = - injectedNamesToPlugins$jscomp$inline_220[pluginName$jscomp$inline_222]; + var pluginModule$jscomp$inline_222 = + injectedNamesToPlugins$jscomp$inline_219[pluginName$jscomp$inline_221]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_222) || - namesToPlugins[pluginName$jscomp$inline_222] !== - pluginModule$jscomp$inline_223 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_221) || + namesToPlugins[pluginName$jscomp$inline_221] !== + pluginModule$jscomp$inline_222 ) { - if (namesToPlugins[pluginName$jscomp$inline_222]) + if (namesToPlugins[pluginName$jscomp$inline_221]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_222 + "`.") + (pluginName$jscomp$inline_221 + "`.") ); namesToPlugins[ - pluginName$jscomp$inline_222 - ] = pluginModule$jscomp$inline_223; - isOrderingDirty$jscomp$inline_221 = !0; + pluginName$jscomp$inline_221 + ] = pluginModule$jscomp$inline_222; + isOrderingDirty$jscomp$inline_220 = !0; } } -isOrderingDirty$jscomp$inline_221 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_220 && recomputePluginOrdering(); function getInstanceFromInstance(instanceHandle) { return instanceHandle; } @@ -1559,7 +1559,10 @@ function dispatchEvent(target, topLevelType, nativeEvent) { null != stateNode && (eventTarget = stateNode.canonical); } batchedUpdates(function() { - var JSCompiler_inline_result = eventTarget; + var event = { eventName: topLevelType, nativeEvent: nativeEvent }; + ReactNativePrivateInterface.RawEventEmitter.emit(topLevelType, event); + ReactNativePrivateInterface.RawEventEmitter.emit("*", event); + event = eventTarget; for ( var events = null, legacyPlugins = plugins, i = 0; i < legacyPlugins.length; @@ -1571,29 +1574,25 @@ function dispatchEvent(target, topLevelType, nativeEvent) { topLevelType, target, nativeEvent, - JSCompiler_inline_result + event )) && (events = accumulateInto(events, possiblePlugin)); } - JSCompiler_inline_result = events; - null !== JSCompiler_inline_result && - (eventQueue = accumulateInto(eventQueue, JSCompiler_inline_result)); - JSCompiler_inline_result = eventQueue; + event = events; + null !== event && (eventQueue = accumulateInto(eventQueue, event)); + event = eventQueue; eventQueue = null; - if (JSCompiler_inline_result) { - forEachAccumulated( - JSCompiler_inline_result, - executeDispatchesAndReleaseTopLevel - ); + if (event) { + forEachAccumulated(event, executeDispatchesAndReleaseTopLevel); if (eventQueue) throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." ); if (hasRethrowError) - throw ((JSCompiler_inline_result = rethrowError), + throw ((event = rethrowError), (hasRethrowError = !1), (rethrowError = null), - JSCompiler_inline_result); + event); } }); } @@ -1619,12 +1618,6 @@ function onCommitRoot(root) { ); } catch (err) {} } -function injectProfilingHooks() {} -function getLaneLabelMap() { - for (var map = new Map(), lane = 1, index$3 = 0; 31 > index$3; index$3++) - map.set(lane, void 0), (lane *= 2); - return map; -} var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2; @@ -1797,21 +1790,21 @@ function markRootFinished(root, remainingLanes) { remainingLanes = root.entanglements; var eventTimes = root.eventTimes; for (root = root.expirationTimes; 0 < noLongerPendingLanes; ) { - var index$8 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$8; - remainingLanes[index$8] = 0; - eventTimes[index$8] = -1; - root[index$8] = -1; + var index$7 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$7; + remainingLanes[index$7] = 0; + eventTimes[index$7] = -1; + root[index$7] = -1; noLongerPendingLanes &= ~lane; } } function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$9 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$9; - (lane & entangledLanes) | (root[index$9] & entangledLanes) && - (root[index$9] |= entangledLanes); + var index$8 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$8; + (lane & entangledLanes) | (root[index$8] & entangledLanes) && + (root[index$8] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -2185,19 +2178,16 @@ function popProvider(context) { pop(valueCursor); context._currentValue2 = currentValue; } -function scheduleWorkOnParentPath(parent, renderLanes) { +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { for (; null !== parent; ) { var alternate = parent.alternate; - if ((parent.childLanes & renderLanes) === renderLanes) - if ( - null === alternate || - (alternate.childLanes & renderLanes) === renderLanes - ) - break; - else alternate.childLanes |= renderLanes; - else - (parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes); + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; parent = parent.return; } } @@ -3666,28 +3656,37 @@ function updateMutableSource(source, getSnapshot, subscribe) { var hook = updateWorkInProgressHook(); return useMutableSource(hook, source, getSnapshot, subscribe); } -function mountSyncExternalStore(subscribe, getSnapshot) { +function updateSyncExternalStore(subscribe, getSnapshot) { var fiber = currentlyRenderingFiber$1, - hook = mountWorkInProgressHook(); - var nextSnapshot = getSnapshot(); - var root = workInProgressRoot; - if (null === root) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." + hook = updateWorkInProgressHook(), + nextSnapshot = getSnapshot(), + snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); + snapshotChanged && + ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); + hook = hook.queue; + updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ + subscribe + ]); + if ( + hook.getSnapshot !== getSnapshot || + snapshotChanged || + (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1) + ) { + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, hook, nextSnapshot, getSnapshot), + void 0, + null ); - includesBlockingLane(root, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - hook.memoizedState = nextSnapshot; - root = { value: nextSnapshot, getSnapshot: getSnapshot }; - hook.queue = root; - mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [subscribe]); - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), - void 0, - null - ); + subscribe = workInProgressRoot; + if (null === subscribe) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(subscribe, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + } return nextSnapshot; } function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { @@ -4075,7 +4074,32 @@ var ContextOnlyDispatcher = { }; return useMutableSource(hook, source, getSnapshot, subscribe); }, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: function(subscribe, getSnapshot) { + var fiber = currentlyRenderingFiber$1, + hook = mountWorkInProgressHook(); + var nextSnapshot = getSnapshot(); + var root = workInProgressRoot; + if (null === root) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(root, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + hook.memoizedState = nextSnapshot; + root = { value: nextSnapshot, getSnapshot: getSnapshot }; + hook.queue = root; + mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [ + subscribe + ]); + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), + void 0, + null + ); + return nextSnapshot; + }, useId: function() { var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix, @@ -4124,46 +4148,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: function(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, - hook = updateWorkInProgressHook(), - nextSnapshot = getSnapshot(), - snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); - snapshotChanged && - ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); - hook = hook.queue; - updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ - subscribe - ]); - if ( - hook.getSnapshot !== getSnapshot || - snapshotChanged || - (null !== workInProgressHook && - workInProgressHook.memoizedState.tag & 1) - ) { - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind( - null, - fiber, - hook, - nextSnapshot, - getSnapshot - ), - void 0, - null - ); - subscribe = workInProgressRoot; - if (null === subscribe) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - includesBlockingLane(subscribe, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - } - return nextSnapshot; - }, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }, @@ -4206,7 +4191,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }; @@ -4454,14 +4439,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$36 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$36 = lastTailNode), + for (var lastTailNode$35 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$35 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$36 + null === lastTailNode$35 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$36.sibling = null); + : (lastTailNode$35.sibling = null); } } function bubbleProperties(completedWork) { @@ -4471,19 +4456,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$37 = completedWork.child; null !== child$37; ) - (newChildLanes |= child$37.lanes | child$37.childLanes), - (subtreeFlags |= child$37.subtreeFlags & 14680064), - (subtreeFlags |= child$37.flags & 14680064), - (child$37.return = completedWork), - (child$37 = child$37.sibling); + for (var child$36 = completedWork.child; null !== child$36; ) + (newChildLanes |= child$36.lanes | child$36.childLanes), + (subtreeFlags |= child$36.subtreeFlags & 14680064), + (subtreeFlags |= child$36.flags & 14680064), + (child$36.return = completedWork), + (child$36 = child$36.sibling); else - for (child$37 = completedWork.child; null !== child$37; ) - (newChildLanes |= child$37.lanes | child$37.childLanes), - (subtreeFlags |= child$37.subtreeFlags), - (subtreeFlags |= child$37.flags), - (child$37.return = completedWork), - (child$37 = child$37.sibling); + for (child$36 = completedWork.child; null !== child$36; ) + (newChildLanes |= child$36.lanes | child$36.childLanes), + (subtreeFlags |= child$36.subtreeFlags), + (subtreeFlags |= child$36.flags), + (child$36.return = completedWork), + (child$36 = child$36.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5548,11 +5533,11 @@ function updateSuspenseFallbackChildren( workInProgress.child = current; return fallbackChildren; } -function scheduleWorkOnFiber(fiber, renderLanes) { +function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; null !== alternate && (alternate.lanes |= renderLanes); - scheduleWorkOnParentPath(fiber.return, renderLanes); + scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot); } function initSuspenseListRenderState( workInProgress, @@ -5591,8 +5576,9 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { a: for (current = workInProgress.child; null !== current; ) { if (13 === current.tag) null !== current.memoizedState && - scheduleWorkOnFiber(current, renderLanes); - else if (19 === current.tag) scheduleWorkOnFiber(current, renderLanes); + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); + else if (19 === current.tag) + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); else if (null !== current.child) { current.child.return = current; current = current.child; @@ -5906,8 +5892,8 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$81 = effect.create; - effect.destroy = create$81(); + var create$80 = effect.create; + effect.destroy = create$80(); } effect = effect.next; } while (effect !== finishedWork); @@ -6084,8 +6070,8 @@ function commitMutationEffects(root, firstChild) { switch (root.tag) { case 13: if (null !== root.memoizedState) { - var current$85 = root.alternate; - if (null === current$85 || null === current$85.memoizedState) + var current$84 = root.alternate; + if (null === current$84 || null === current$84.memoizedState) globalMostRecentFallbackTime = now(); } } @@ -6162,8 +6148,8 @@ function commitLayoutEffects(finishedWork) { commitUpdateQueue(firstChild, updateQueue, instance); break; case 3: - var updateQueue$82 = firstChild.updateQueue; - if (null !== updateQueue$82) { + var updateQueue$81 = firstChild.updateQueue; + if (null !== updateQueue$81) { current = null; if (null !== firstChild.child) switch (firstChild.child.tag) { @@ -6173,7 +6159,7 @@ function commitLayoutEffects(finishedWork) { case 1: current = firstChild.child.stateNode; } - commitUpdateQueue(firstChild, updateQueue$82, current); + commitUpdateQueue(firstChild, updateQueue$81, current); } break; case 5: @@ -6250,8 +6236,9 @@ var ceil = Math.ceil, workInProgressRootFatalError = null, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, - workInProgressRootRenderPhaseUpdatedLanes = 0, workInProgressRootPingedLanes = 0, + workInProgressRootConcurrentErrors = null, + workInProgressRootRecoverableErrors = null, globalMostRecentFallbackTime = 0, workInProgressRootRenderTargetTime = Infinity, hasUncaughtError = !1, @@ -6310,19 +6297,18 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { var root = markUpdateLaneFromFiberToRoot(fiber, lane); if (null === root) return null; markRootUpdated(root, lane, eventTime); - 0 !== (executionContext & 2) && root === workInProgressRoot - ? (workInProgressRootRenderPhaseUpdatedLanes |= lane) - : (root === workInProgressRoot && - (0 === (executionContext & 2) && - (workInProgressRootInterleavedUpdatedLanes |= lane), - 4 === workInProgressRootExitStatus && - markRootSuspended$1(root, workInProgressRootRenderLanes)), + if (0 === (executionContext & 2) || root !== workInProgressRoot) + root === workInProgressRoot && + (0 === (executionContext & 2) && + (workInProgressRootInterleavedUpdatedLanes |= lane), + 4 === workInProgressRootExitStatus && + markRootSuspended$1(root, workInProgressRootRenderLanes)), ensureRootIsScheduled(root, eventTime), 1 === lane && 0 === executionContext && 0 === (fiber.mode & 1) && ((workInProgressRootRenderTargetTime = now() + 500), - includesLegacySyncCallbacks && flushSyncCallbacks())); + includesLegacySyncCallbacks && flushSyncCallbacks()); return root; } function markUpdateLaneFromFiberToRoot(sourceFiber, lane) { @@ -6348,12 +6334,12 @@ function ensureRootIsScheduled(root, currentTime) { 0 < lanes; ) { - var index$6 = 31 - clz32(lanes), - lane = 1 << index$6, - expirationTime = expirationTimes[index$6]; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5, + expirationTime = expirationTimes[index$5]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$6] = computeExpirationTime(lane, currentTime); + expirationTimes[index$5] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -6493,7 +6479,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { case 1: throw Error("Root did not complete. This is a bug in React."); case 2: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 3: markRootSuspended$1(root, lanes); @@ -6510,22 +6496,22 @@ function performConcurrentWorkOnRoot(root, didTimeout) { break; } root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), didTimeout ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 4: markRootSuspended$1(root, lanes); if ((lanes & 4194240) === lanes) break; didTimeout = root.eventTimes; for (prevExecutionContext = -1; 0 < lanes; ) { - var index$5 = 31 - clz32(lanes); - prevDispatcher = 1 << index$5; - index$5 = didTimeout[index$5]; - index$5 > prevExecutionContext && (prevExecutionContext = index$5); + var index$4 = 31 - clz32(lanes); + prevDispatcher = 1 << index$4; + index$4 = didTimeout[index$4]; + index$4 > prevExecutionContext && (prevExecutionContext = index$4); lanes &= ~prevDispatcher; } lanes = prevExecutionContext; @@ -6546,15 +6532,15 @@ function performConcurrentWorkOnRoot(root, didTimeout) { : 1960 * ceil(lanes / 1960)) - lanes; if (10 < lanes) { root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), lanes ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 5: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; default: throw Error("Unknown root exit status."); @@ -6569,15 +6555,18 @@ function recoverFromConcurrentError(root, errorRetryLanes) { var prevExecutionContext = executionContext; executionContext |= 8; root.isDehydrated && (root.isDehydrated = !1); - for ( - var exitStatus, i = 0; - 50 > i && - ((exitStatus = renderRootSync(root, errorRetryLanes)), - 2 === exitStatus && 0 !== workInProgressRootRenderPhaseUpdatedLanes); - i++ - ); + var errorsFromFirstAttempt = workInProgressRootConcurrentErrors; + root = renderRootSync(root, errorRetryLanes); + 2 !== root && + null !== errorsFromFirstAttempt && + (null === workInProgressRootConcurrentErrors + ? (workInProgressRootRecoverableErrors = errorsFromFirstAttempt) + : (workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( + null, + errorsFromFirstAttempt + ))); executionContext = prevExecutionContext; - return exitStatus; + return root; } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -6619,9 +6608,9 @@ function markRootSuspended$1(root, suspendedLanes) { root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; for (root = root.expirationTimes; 0 < suspendedLanes; ) { - var index$7 = 31 - clz32(suspendedLanes), - lane = 1 << index$7; - root[index$7] = -1; + var index$6 = 31 - clz32(suspendedLanes), + lane = 1 << index$6; + root[index$6] = -1; suspendedLanes &= ~lane; } } @@ -6646,7 +6635,7 @@ function performSyncWorkOnRoot(root) { exitStatus); root.finishedWork = root.current.alternate; root.finishedLanes = lanes; - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); ensureRootIsScheduled(root, now()); return null; } @@ -6703,7 +6692,8 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = subtreeRenderLanes = lanes; workInProgressRootExitStatus = 0; workInProgressRootFatalError = null; - workInProgressRootPingedLanes = workInProgressRootRenderPhaseUpdatedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null; if (null !== interleavedQueues) { for (root = 0; root < interleavedQueues.length; root++) if ( @@ -6871,8 +6861,12 @@ function handleError(root$jscomp$0, thrownValue) { " suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display." ); } + root = value; 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [root]) + : workInProgressRootConcurrentErrors.push(root); value = createCapturedValue(value, sourceFiber); root = returnFiber; do { @@ -6904,12 +6898,12 @@ function handleError(root$jscomp$0, thrownValue) { root.flags |= 65536; thrownValue &= -thrownValue; root.lanes |= thrownValue; - var update$32 = createClassErrorUpdate( + var update$31 = createClassErrorUpdate( root, wakeable, thrownValue ); - enqueueCapturedUpdate(root, update$32); + enqueueCapturedUpdate(root, update$31); break a; } } @@ -7004,20 +6998,20 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } -function commitRoot(root) { +function commitRoot(root, recoverableErrors) { var previousUpdateLanePriority = currentUpdatePriority, prevTransition = ReactCurrentBatchConfig$2.transition; try { (ReactCurrentBatchConfig$2.transition = 0), (currentUpdatePriority = 1), - commitRootImpl(root, previousUpdateLanePriority); + commitRootImpl(root, recoverableErrors, previousUpdateLanePriority); } finally { (ReactCurrentBatchConfig$2.transition = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; } -function commitRootImpl(root, renderPriorityLevel) { +function commitRootImpl(root, recoverableErrors, renderPriorityLevel) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) @@ -7072,6 +7066,15 @@ function commitRootImpl(root, renderPriorityLevel) { 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); ensureRootIsScheduled(root, now()); + if (null !== recoverableErrors) + for ( + renderPriorityLevel = 0; + renderPriorityLevel < recoverableErrors.length; + renderPriorityLevel++ + ) + (finishedWork = recoverableErrors[renderPriorityLevel]), + (lanes = root.onRecoverableError), + null !== lanes && lanes(finishedWork); if (hasUncaughtError) throw ((hasUncaughtError = !1), (root = firstUncaughtError), @@ -7644,7 +7647,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) { newValue.lanes |= renderLanes; dependency = newValue.alternate; null !== dependency && (dependency.lanes |= renderLanes); - scheduleWorkOnParentPath(newValue.return, renderLanes); + scheduleContextWorkOnParentPath( + newValue.return, + renderLanes, + workInProgress + ); list.lanes |= renderLanes; break; } @@ -7949,7 +7956,13 @@ function createFiberFromPortal(portal, mode, lanes) { }; return mode; } -function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { +function FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError +) { this.tag = tag; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = this.current = this.pendingChildren = null; @@ -7963,6 +7976,7 @@ function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0; this.entanglements = createLaneMap(0); this.identifierPrefix = identifierPrefix; + this.onRecoverableError = onRecoverableError; } function createPortal(children, containerInfo, implementation) { var key = @@ -8166,10 +8180,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_926 = { + devToolsConfig$jscomp$inline_927 = { findFiberByHostInstance: getInstanceFromInstance, bundleType: 0, - version: "18.0.0-rc.0-51947a14b-20220113", + version: "18.0.0-rc.0-a3bde7974-20220208", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -8184,11 +8198,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1179 = { - bundleType: devToolsConfig$jscomp$inline_926.bundleType, - version: devToolsConfig$jscomp$inline_926.version, - rendererPackageName: devToolsConfig$jscomp$inline_926.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_926.rendererConfig, +var internals$jscomp$inline_1181 = { + bundleType: devToolsConfig$jscomp$inline_927.bundleType, + version: devToolsConfig$jscomp$inline_927.version, + rendererPackageName: devToolsConfig$jscomp$inline_927.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_927.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8204,29 +8218,26 @@ var internals$jscomp$inline_1179 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_926.findFiberByHostInstance || + devToolsConfig$jscomp$inline_927.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.0.0-rc.0-51947a14b-20220113" + reconcilerVersion: "18.0.0-rc.0-a3bde7974-20220208" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1180 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1182 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1180.isDisabled && - hook$jscomp$inline_1180.supportsFiber + !hook$jscomp$inline_1182.isDisabled && + hook$jscomp$inline_1182.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1180.inject( - Object.assign({}, internals$jscomp$inline_1179, { - getLaneLabelMap: getLaneLabelMap, - injectProfilingHooks: injectProfilingHooks - }) + (rendererID = hook$jscomp$inline_1182.inject( + internals$jscomp$inline_1181 )), - (injectedHook = hook$jscomp$inline_1180); + (injectedHook = hook$jscomp$inline_1182); } catch (err) {} } exports.createPortal = function(children, containerTag) { @@ -8266,7 +8277,7 @@ exports.render = function(element, containerTag, callback, concurrentRoot) { var root = roots.get(containerTag); root || ((root = concurrentRoot ? 1 : 0), - (concurrentRoot = new FiberRootNode(containerTag, root, !1, "")), + (concurrentRoot = new FiberRootNode(containerTag, root, !1, "", null)), (root = createFiber(3, null, null, 1 === root ? 1 : 0)), (concurrentRoot.current = root), (root.stateNode = concurrentRoot), diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 88a4d7e8f7..6df38b40d9 100644 --- a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<5c079c38f5734a3f694bc72a4da400d4>> */ @@ -1570,7 +1570,10 @@ function dispatchEvent(target, topLevelType, nativeEvent) { null != stateNode && (eventTarget = stateNode.canonical); } batchedUpdates(function() { - var JSCompiler_inline_result = eventTarget; + var event = { eventName: topLevelType, nativeEvent: nativeEvent }; + ReactNativePrivateInterface.RawEventEmitter.emit(topLevelType, event); + ReactNativePrivateInterface.RawEventEmitter.emit("*", event); + event = eventTarget; for ( var events = null, legacyPlugins = plugins, i = 0; i < legacyPlugins.length; @@ -1582,29 +1585,25 @@ function dispatchEvent(target, topLevelType, nativeEvent) { topLevelType, target, nativeEvent, - JSCompiler_inline_result + event )) && (events = accumulateInto(events, possiblePlugin)); } - JSCompiler_inline_result = events; - null !== JSCompiler_inline_result && - (eventQueue = accumulateInto(eventQueue, JSCompiler_inline_result)); - JSCompiler_inline_result = eventQueue; + event = events; + null !== event && (eventQueue = accumulateInto(eventQueue, event)); + event = eventQueue; eventQueue = null; - if (JSCompiler_inline_result) { - forEachAccumulated( - JSCompiler_inline_result, - executeDispatchesAndReleaseTopLevel - ); + if (event) { + forEachAccumulated(event, executeDispatchesAndReleaseTopLevel); if (eventQueue) throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." ); if (hasRethrowError) - throw ((JSCompiler_inline_result = rethrowError), + throw ((event = rethrowError), (hasRethrowError = !1), (rethrowError = null), - JSCompiler_inline_result); + event); } }); } @@ -2306,19 +2305,16 @@ function popProvider(context) { pop(valueCursor); context._currentValue2 = currentValue; } -function scheduleWorkOnParentPath(parent, renderLanes) { +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { for (; null !== parent; ) { var alternate = parent.alternate; - if ((parent.childLanes & renderLanes) === renderLanes) - if ( - null === alternate || - (alternate.childLanes & renderLanes) === renderLanes - ) - break; - else alternate.childLanes |= renderLanes; - else - (parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes); + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; parent = parent.return; } } @@ -3792,28 +3788,37 @@ function updateMutableSource(source, getSnapshot, subscribe) { var hook = updateWorkInProgressHook(); return useMutableSource(hook, source, getSnapshot, subscribe); } -function mountSyncExternalStore(subscribe, getSnapshot) { +function updateSyncExternalStore(subscribe, getSnapshot) { var fiber = currentlyRenderingFiber$1, - hook = mountWorkInProgressHook(); - var nextSnapshot = getSnapshot(); - var root = workInProgressRoot; - if (null === root) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." + hook = updateWorkInProgressHook(), + nextSnapshot = getSnapshot(), + snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); + snapshotChanged && + ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); + hook = hook.queue; + updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ + subscribe + ]); + if ( + hook.getSnapshot !== getSnapshot || + snapshotChanged || + (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1) + ) { + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, hook, nextSnapshot, getSnapshot), + void 0, + null ); - includesBlockingLane(root, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - hook.memoizedState = nextSnapshot; - root = { value: nextSnapshot, getSnapshot: getSnapshot }; - hook.queue = root; - mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [subscribe]); - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), - void 0, - null - ); + subscribe = workInProgressRoot; + if (null === subscribe) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(subscribe, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + } return nextSnapshot; } function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { @@ -4203,7 +4208,32 @@ var ContextOnlyDispatcher = { }; return useMutableSource(hook, source, getSnapshot, subscribe); }, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: function(subscribe, getSnapshot) { + var fiber = currentlyRenderingFiber$1, + hook = mountWorkInProgressHook(); + var nextSnapshot = getSnapshot(); + var root = workInProgressRoot; + if (null === root) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(root, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + hook.memoizedState = nextSnapshot; + root = { value: nextSnapshot, getSnapshot: getSnapshot }; + hook.queue = root; + mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [ + subscribe + ]); + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), + void 0, + null + ); + return nextSnapshot; + }, useId: function() { var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix, @@ -4252,46 +4282,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: function(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, - hook = updateWorkInProgressHook(), - nextSnapshot = getSnapshot(), - snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); - snapshotChanged && - ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); - hook = hook.queue; - updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ - subscribe - ]); - if ( - hook.getSnapshot !== getSnapshot || - snapshotChanged || - (null !== workInProgressHook && - workInProgressHook.memoizedState.tag & 1) - ) { - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind( - null, - fiber, - hook, - nextSnapshot, - getSnapshot - ), - void 0, - null - ); - subscribe = workInProgressRoot; - if (null === subscribe) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - includesBlockingLane(subscribe, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - } - return nextSnapshot; - }, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }, @@ -4334,7 +4325,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }, @@ -5806,11 +5797,11 @@ function updateSuspenseFallbackChildren( workInProgress.child = current; return fallbackChildren; } -function scheduleWorkOnFiber(fiber, renderLanes) { +function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; null !== alternate && (alternate.lanes |= renderLanes); - scheduleWorkOnParentPath(fiber.return, renderLanes); + scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot); } function initSuspenseListRenderState( workInProgress, @@ -5849,8 +5840,9 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { a: for (current = workInProgress.child; null !== current; ) { if (13 === current.tag) null !== current.memoizedState && - scheduleWorkOnFiber(current, renderLanes); - else if (19 === current.tag) scheduleWorkOnFiber(current, renderLanes); + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); + else if (19 === current.tag) + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); else if (null !== current.child) { current.child.return = current; current = current.child; @@ -6698,8 +6690,9 @@ var ceil = Math.ceil, workInProgressRootFatalError = null, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, - workInProgressRootRenderPhaseUpdatedLanes = 0, workInProgressRootPingedLanes = 0, + workInProgressRootConcurrentErrors = null, + workInProgressRootRecoverableErrors = null, globalMostRecentFallbackTime = 0, workInProgressRootRenderTargetTime = Infinity, hasUncaughtError = !1, @@ -6759,9 +6752,8 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { var root = markUpdateLaneFromFiberToRoot(fiber, lane); if (null === root) return null; markRootUpdated(root, lane, eventTime); - 0 !== (executionContext & 2) && root === workInProgressRoot - ? (workInProgressRootRenderPhaseUpdatedLanes |= lane) - : (isDevToolsPresent && addFiberToLanesMap(root, fiber, lane), + if (0 === (executionContext & 2) || root !== workInProgressRoot) + isDevToolsPresent && addFiberToLanesMap(root, fiber, lane), root === workInProgressRoot && (0 === (executionContext & 2) && (workInProgressRootInterleavedUpdatedLanes |= lane), @@ -6772,7 +6764,7 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { 0 === executionContext && 0 === (fiber.mode & 1) && ((workInProgressRootRenderTargetTime = now() + 500), - includesLegacySyncCallbacks && flushSyncCallbacks())); + includesLegacySyncCallbacks && flushSyncCallbacks()); return root; } function markUpdateLaneFromFiberToRoot(sourceFiber, lane) { @@ -6957,7 +6949,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { case 1: throw Error("Root did not complete. This is a bug in React."); case 2: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 3: markRootSuspended$1(root, lanes); @@ -6974,12 +6966,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { break; } root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), didTimeout ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 4: markRootSuspended$1(root, lanes); @@ -7010,15 +7002,15 @@ function performConcurrentWorkOnRoot(root, didTimeout) { : 1960 * ceil(lanes / 1960)) - lanes; if (10 < lanes) { root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), lanes ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 5: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; default: throw Error("Unknown root exit status."); @@ -7033,15 +7025,18 @@ function recoverFromConcurrentError(root, errorRetryLanes) { var prevExecutionContext = executionContext; executionContext |= 8; root.isDehydrated && (root.isDehydrated = !1); - for ( - var exitStatus, i = 0; - 50 > i && - ((exitStatus = renderRootSync(root, errorRetryLanes)), - 2 === exitStatus && 0 !== workInProgressRootRenderPhaseUpdatedLanes); - i++ - ); + var errorsFromFirstAttempt = workInProgressRootConcurrentErrors; + root = renderRootSync(root, errorRetryLanes); + 2 !== root && + null !== errorsFromFirstAttempt && + (null === workInProgressRootConcurrentErrors + ? (workInProgressRootRecoverableErrors = errorsFromFirstAttempt) + : (workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( + null, + errorsFromFirstAttempt + ))); executionContext = prevExecutionContext; - return exitStatus; + return root; } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -7112,7 +7107,7 @@ function performSyncWorkOnRoot(root) { exitStatus); root.finishedWork = root.current.alternate; root.finishedLanes = lanes; - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); ensureRootIsScheduled(root, now()); return null; } @@ -7169,7 +7164,8 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = subtreeRenderLanes = lanes; workInProgressRootExitStatus = 0; workInProgressRootFatalError = null; - workInProgressRootPingedLanes = workInProgressRootRenderPhaseUpdatedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null; if (null !== interleavedQueues) { for (root = 0; root < interleavedQueues.length; root++) if ( @@ -7364,8 +7360,12 @@ function handleError(root, thrownValue) { " suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display." ); } + wakeable = value; 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [wakeable]) + : workInProgressRootConcurrentErrors.push(wakeable); value = createCapturedValue(value, sourceFiber); wakeable = returnFiber; do { @@ -7528,20 +7528,20 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } -function commitRoot(root) { +function commitRoot(root, recoverableErrors) { var previousUpdateLanePriority = currentUpdatePriority, prevTransition = ReactCurrentBatchConfig$2.transition; try { (ReactCurrentBatchConfig$2.transition = 0), (currentUpdatePriority = 1), - commitRootImpl(root, previousUpdateLanePriority); + commitRootImpl(root, recoverableErrors, previousUpdateLanePriority); } finally { (ReactCurrentBatchConfig$2.transition = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; } -function commitRootImpl(root, renderPriorityLevel) { +function commitRootImpl(root, recoverableErrors, renderPriorityLevel) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) @@ -7607,6 +7607,15 @@ function commitRootImpl(root, renderPriorityLevel) { onCommitRoot(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); ensureRootIsScheduled(root, now()); + if (null !== recoverableErrors) + for ( + renderPriorityLevel = 0; + renderPriorityLevel < recoverableErrors.length; + renderPriorityLevel++ + ) + (finishedWork = recoverableErrors[renderPriorityLevel]), + (lanes = root.onRecoverableError), + null !== lanes && lanes(finishedWork); if (hasUncaughtError) throw ((hasUncaughtError = !1), (root = firstUncaughtError), @@ -8261,7 +8270,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) { newValue.lanes |= renderLanes; dependency = newValue.alternate; null !== dependency && (dependency.lanes |= renderLanes); - scheduleWorkOnParentPath(newValue.return, renderLanes); + scheduleContextWorkOnParentPath( + newValue.return, + renderLanes, + workInProgress + ); list.lanes |= renderLanes; break; } @@ -8582,7 +8595,13 @@ function createFiberFromPortal(portal, mode, lanes) { }; return mode; } -function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { +function FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError +) { this.tag = tag; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = this.current = this.pendingChildren = null; @@ -8596,6 +8615,7 @@ function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0; this.entanglements = createLaneMap(0); this.identifierPrefix = identifierPrefix; + this.onRecoverableError = onRecoverableError; this.passiveEffectDuration = this.effectDuration = 0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; @@ -8806,10 +8826,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1002 = { + devToolsConfig$jscomp$inline_1004 = { findFiberByHostInstance: getInstanceFromInstance, bundleType: 0, - version: "18.0.0-rc.0-51947a14b-20220113", + version: "18.0.0-rc.0-a3bde7974-20220208", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -8824,11 +8844,24 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1279 = { - bundleType: devToolsConfig$jscomp$inline_1002.bundleType, - version: devToolsConfig$jscomp$inline_1002.version, - rendererPackageName: devToolsConfig$jscomp$inline_1002.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1002.rendererConfig, +(function(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled || !hook.supportsFiber) return !0; + try { + (internals = Object.assign({}, internals, { + getLaneLabelMap: getLaneLabelMap, + injectProfilingHooks: injectProfilingHooks + })), + (rendererID = hook.inject(internals)), + (injectedHook = hook); + } catch (err) {} + return hook.checkDCE ? !0 : !1; +})({ + bundleType: devToolsConfig$jscomp$inline_1004.bundleType, + version: devToolsConfig$jscomp$inline_1004.version, + rendererPackageName: devToolsConfig$jscomp$inline_1004.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1004.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8844,31 +8877,15 @@ var internals$jscomp$inline_1279 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1002.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1004.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.0.0-rc.0-51947a14b-20220113" -}; -if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1280 = __REACT_DEVTOOLS_GLOBAL_HOOK__; - if ( - !hook$jscomp$inline_1280.isDisabled && - hook$jscomp$inline_1280.supportsFiber - ) - try { - (rendererID = hook$jscomp$inline_1280.inject( - Object.assign({}, internals$jscomp$inline_1279, { - getLaneLabelMap: getLaneLabelMap, - injectProfilingHooks: injectProfilingHooks - }) - )), - (injectedHook = hook$jscomp$inline_1280); - } catch (err) {} -} + reconcilerVersion: "18.0.0-rc.0-a3bde7974-20220208" +}); exports.createPortal = function(children, containerTag) { return createPortal( children, @@ -8906,7 +8923,7 @@ exports.render = function(element, containerTag, callback, concurrentRoot) { var root = roots.get(containerTag); root || ((root = concurrentRoot ? 1 : 0), - (concurrentRoot = new FiberRootNode(containerTag, root, !1, "")), + (concurrentRoot = new FiberRootNode(containerTag, root, !1, "", null)), (root = 1 === root ? 1 : 0), isDevToolsPresent && (root |= 2), (root = createFiber(3, null, null, root)), diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index fa3df1e36c..c913b5af61 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<3ab224d749aabfd2af41824a03d0c6ce>> + * @generated SignedSource<> */ 'use strict'; @@ -4283,12 +4283,17 @@ function injectInternals(internals) { } try { - rendererID = hook.inject( - Object.assign({}, internals, { + if (enableSchedulingProfiler) { + // Conditionally inject these hooks only if Timeline profiler is supported by this build. + // This gives DevTools a way to feature detect that isn't tied to version number + // (since profiling and timeline are controlled by different feature flags). + internals = Object.assign({}, internals, { getLaneLabelMap: getLaneLabelMap, injectProfilingHooks: injectProfilingHooks - }) - ); // We have successfully injected, so now it is safe to set up hooks. + }); + } + + rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. injectedHook = hook; } catch (err) { @@ -4422,16 +4427,18 @@ function injectProfilingHooks(profilingHooks) { } function getLaneLabelMap() { - var map = new Map(); - var lane = 1; + { + var map = new Map(); + var lane = 1; - for (var index = 0; index < TotalLanes; index++) { - var label = getLabelForLane(lane); - map.set(lane, label); - lane *= 2; + for (var index = 0; index < TotalLanes; index++) { + var label = getLabelForLane(lane); + map.set(lane, label); + lane *= 2; + } + + return map; } - - return map; } function markCommitStarted(lanes) { @@ -7175,7 +7182,7 @@ function popProvider(context, providerFiber) { context._currentValue = currentValue; } } -function scheduleWorkOnParentPath(parent, renderLanes) { +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { // Update the child lanes of all the ancestors, including the alternates. var node = parent; @@ -7193,14 +7200,23 @@ function scheduleWorkOnParentPath(parent, renderLanes) { !isSubsetOfLanes(alternate.childLanes, renderLanes) ) { alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes); - } else { - // Neither alternate was updated, which means the rest of the - // ancestor path already has sufficient priority. + } + + if (node === propagationRoot) { break; } node = node.return; } + + { + if (node !== propagationRoot) { + error( + "Expected to find the propagation root when scheduling context work. " + + "This error is likely caused by a bug in React. Please file an issue." + ); + } + } } function propagateContextChange(workInProgress, context, renderLanes) { { @@ -7265,7 +7281,11 @@ function propagateContextChange_eager(workInProgress, context, renderLanes) { alternate.lanes = mergeLanes(alternate.lanes, renderLanes); } - scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too. + scheduleContextWorkOnParentPath( + fiber.return, + renderLanes, + workInProgress + ); // Mark the updated lanes on the list, too. list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the // dependency list. @@ -9140,7 +9160,7 @@ function popTreeContext(workInProgress) { } } -var isHydrating = false; +var isHydrating = false; // Hydration errors that were thrown inside this boundary function enterHydrationState(fiber) { { @@ -14081,7 +14101,7 @@ function throwException( // over and traverse parent path again, this time treating the exception // as an error. - renderDidError(); + renderDidError(value); value = createCapturedValue(value, sourceFiber); var workInProgress = returnFiber; @@ -16944,7 +16964,7 @@ function updateSuspenseFallbackChildren( return fallbackChildFragment; } -function scheduleWorkOnFiber(fiber, renderLanes) { +function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes = mergeLanes(fiber.lanes, renderLanes); var alternate = fiber.alternate; @@ -16952,7 +16972,7 @@ function scheduleWorkOnFiber(fiber, renderLanes) { alternate.lanes = mergeLanes(alternate.lanes, renderLanes); } - scheduleWorkOnParentPath(fiber.return, renderLanes); + scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot); } function propagateSuspenseContextChange( @@ -16970,7 +16990,7 @@ function propagateSuspenseContextChange( var state = node.memoizedState; if (state !== null) { - scheduleWorkOnFiber(node, renderLanes); + scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress); } } else if (node.tag === SuspenseListComponent) { // If the tail is hidden there might not be an Suspense boundaries @@ -16978,7 +16998,7 @@ function propagateSuspenseContextChange( // list itself. // We don't have to traverse to the children of the list since // the list will propagate the change when it rerenders. - scheduleWorkOnFiber(node, renderLanes); + scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress); } else if (node.child !== null) { node.child.return = node; node = node.child; @@ -18270,6 +18290,16 @@ function safelyDetachRef(current, nearestMountedAncestor) { reportUncaughtErrorInDEV(error); captureCommitPhaseError(current, nearestMountedAncestor, error); } + + { + if (typeof retVal === "function") { + error( + "Unexpected return value from a callback ref in %s. " + + "A callback ref should not return a function.", + getComponentNameFromFiber(current) + ); + } + } } else { ref.current = null; } @@ -19051,6 +19081,16 @@ function commitAttachRef(finishedWork) { } else { retVal = ref(instanceToUse); } + + { + if (typeof retVal === "function") { + error( + "Unexpected return value from a callback ref in %s. " + + "A callback ref should not return a function.", + getComponentNameFromFiber(finishedWork) + ); + } + } } else { { if (!ref.hasOwnProperty("current")) { @@ -20486,9 +20526,12 @@ var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an var workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event). -var workInProgressRootRenderPhaseUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render. +var workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase. -var workInProgressRootPingedLanes = NoLanes; // The most recent time we committed a fallback. This lets us ensure a train +var workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI. +// We will log them once the tree commits. + +var workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train // model where we don't commit new loading states in too quick succession. var globalMostRecentFallbackTime = 0; @@ -20636,11 +20679,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { // function), but there are some internal React features that use this as // an implementation detail, like selective hydration. warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase - - workInProgressRootRenderPhaseUpdatedLanes = mergeLanes( - workInProgressRootRenderPhaseUpdatedLanes, - lane - ); } else { // This is a normal update, scheduled from outside the render phase. For // example, during an input event. @@ -21017,30 +21055,34 @@ function recoverFromConcurrentError(root, errorRetryLanes) { } } - var exitStatus; - var MAX_ERROR_RETRY_ATTEMPTS = 50; + var errorsFromFirstAttempt = workInProgressRootConcurrentErrors; + var exitStatus = renderRootSync(root, errorRetryLanes); - for (var i = 0; i < MAX_ERROR_RETRY_ATTEMPTS; i++) { - exitStatus = renderRootSync(root, errorRetryLanes); - - if ( - exitStatus === RootErrored && - workInProgressRootRenderPhaseUpdatedLanes !== NoLanes - ) { - // There was a render phase update during this render. Some internal React - // implementation details may use this as a trick to schedule another - // render pass. To protect against an inifinite loop, eventually - // we'll give up. - continue; + if (exitStatus !== RootErrored) { + // Successfully finished rendering on retry + if (errorsFromFirstAttempt !== null) { + // The errors from the failed first attempt have been recovered. Add + // them to the collection of recoverable errors. We'll log them in the + // commit phase. + queueRecoverableErrors(errorsFromFirstAttempt); } - - break; } executionContext = prevExecutionContext; return exitStatus; } +function queueRecoverableErrors(errors) { + if (workInProgressRootConcurrentErrors === null) { + workInProgressRootRecoverableErrors = errors; + } else { + workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( + null, + errors + ); + } +} + function finishConcurrentRender(root, exitStatus, lanes) { switch (exitStatus) { case RootIncomplete: @@ -21054,7 +21096,7 @@ function finishConcurrentRender(root, exitStatus, lanes) { case RootErrored: { // We should have already attempted to retry this tree. If we reached // this point, it errored again. Commit it. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } @@ -21094,14 +21136,14 @@ function finishConcurrentRender(root, exitStatus, lanes) { // immediately, wait for more data to arrive. root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), msUntilTimeout ); break; } } // The work expired. Commit immediately. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } @@ -21132,20 +21174,20 @@ function finishConcurrentRender(root, exitStatus, lanes) { // Instead of committing the fallback immediately, wait for more data // to arrive. root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), _msUntilTimeout ); break; } } // Commit the placeholder. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } case RootCompleted: { // The work completed. Ready to commit. - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; } @@ -21276,7 +21318,7 @@ function performSyncWorkOnRoot(root) { var finishedWork = root.current.alternate; root.finishedWork = finishedWork; root.finishedLanes = lanes; - commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next + commitRoot(root, workInProgressRootRecoverableErrors); // Before exiting, make sure there's a callback scheduled for the next // pending level. ensureRootIsScheduled(root, now()); @@ -21383,8 +21425,9 @@ function prepareFreshStack(root, lanes) { workInProgressRootFatalError = null; workInProgressRootSkippedLanes = NoLanes; workInProgressRootInterleavedUpdatedLanes = NoLanes; - workInProgressRootRenderPhaseUpdatedLanes = NoLanes; workInProgressRootPingedLanes = NoLanes; + workInProgressRootConcurrentErrors = null; + workInProgressRootRecoverableErrors = null; enqueueInterleavedUpdates(); { @@ -21537,10 +21580,16 @@ function renderDidSuspendDelayIfPossible() { markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes); } } -function renderDidError() { +function renderDidError(error) { if (workInProgressRootExitStatus !== RootSuspendedWithDelay) { workInProgressRootExitStatus = RootErrored; } + + if (workInProgressRootConcurrentErrors === null) { + workInProgressRootConcurrentErrors = [error]; + } else { + workInProgressRootConcurrentErrors.push(error); + } } // Called during render to determine if anything has suspended. // Returns false if we're not sure. @@ -21809,7 +21858,7 @@ function completeUnitOfWork(unitOfWork) { } } -function commitRoot(root) { +function commitRoot(root, recoverableErrors) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. var previousUpdateLanePriority = getCurrentUpdatePriority(); @@ -21818,7 +21867,7 @@ function commitRoot(root) { try { ReactCurrentBatchConfig$2.transition = 0; setCurrentUpdatePriority(DiscreteEventPriority); - commitRootImpl(root, previousUpdateLanePriority); + commitRootImpl(root, recoverableErrors, previousUpdateLanePriority); } finally { ReactCurrentBatchConfig$2.transition = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); @@ -21827,7 +21876,7 @@ function commitRoot(root) { return null; } -function commitRootImpl(root, renderPriorityLevel) { +function commitRootImpl(root, recoverableErrors, renderPriorityLevel) { do { // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which // means `flushPassiveEffects` will sometimes result in additional @@ -22032,6 +22081,19 @@ function commitRootImpl(root, renderPriorityLevel) { ensureRootIsScheduled(root, now()); + if (recoverableErrors !== null) { + // There were errors during this render, but recovered from them without + // needing to surface it to the UI. We log them here. + for (var i = 0; i < recoverableErrors.length; i++) { + var recoverableError = recoverableErrors[i]; + var onRecoverableError = root.onRecoverableError; + + if (onRecoverableError !== null) { + onRecoverableError(recoverableError); + } + } + } + if (hasUncaughtError) { hasUncaughtError = false; var error$1 = firstUncaughtError; @@ -23855,7 +23917,13 @@ function assignFiberPropertiesInDEV(target, source) { return target; } -function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { +function FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError +) { this.tag = tag; this.containerInfo = containerInfo; this.pendingChildren = null; @@ -23879,6 +23947,7 @@ function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { this.entangledLanes = NoLanes; this.entanglements = createLaneMap(NoLanes); this.identifierPrefix = identifierPrefix; + this.onRecoverableError = onRecoverableError; { this.effectDuration = 0; @@ -23913,10 +23982,20 @@ function createFiberRoot( hydrate, hydrationCallbacks, isStrictMode, - concurrentUpdatesByDefaultOverride, - identifierPrefix + concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the + // host config, but because they are passed in at runtime, we have to thread + // them through the root constructor. Perhaps we should put them all into a + // single type, like a DynamicHostConfig that is defined by the renderer. + identifierPrefix, + onRecoverableError ) { - var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix); + var root = new FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError + ); // stateNode is any. var uninitializedFiber = createHostRootFiber( @@ -23938,7 +24017,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.0.0-rc.0-51947a14b-20220113"; +var ReactVersion = "18.0.0-rc.0-a3bde7974-20220208"; function createPortal( children, @@ -24066,7 +24145,8 @@ function createContainer( hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, - identifierPrefix + identifierPrefix, + onRecoverableError ) { return createFiberRoot( containerInfo, @@ -24075,7 +24155,8 @@ function createContainer( hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, - identifierPrefix + identifierPrefix, + onRecoverableError ); } function updateContainer(element, container, parentComponent, callback) { @@ -24861,7 +24942,8 @@ function render(element, containerTag, callback) { null, false, null, - "" + "", + null ); roots.set(containerTag, root); } diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 34c20b44f2..2087079f42 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<74ace7caaea78f5e62bae1f9669d8351>> */ "use strict"; @@ -926,7 +926,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_223 = { +var injectedNamesToPlugins$jscomp$inline_222 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -961,33 +961,33 @@ var injectedNamesToPlugins$jscomp$inline_223 = { } } }, - isOrderingDirty$jscomp$inline_224 = !1, - pluginName$jscomp$inline_225; -for (pluginName$jscomp$inline_225 in injectedNamesToPlugins$jscomp$inline_223) + isOrderingDirty$jscomp$inline_223 = !1, + pluginName$jscomp$inline_224; +for (pluginName$jscomp$inline_224 in injectedNamesToPlugins$jscomp$inline_222) if ( - injectedNamesToPlugins$jscomp$inline_223.hasOwnProperty( - pluginName$jscomp$inline_225 + injectedNamesToPlugins$jscomp$inline_222.hasOwnProperty( + pluginName$jscomp$inline_224 ) ) { - var pluginModule$jscomp$inline_226 = - injectedNamesToPlugins$jscomp$inline_223[pluginName$jscomp$inline_225]; + var pluginModule$jscomp$inline_225 = + injectedNamesToPlugins$jscomp$inline_222[pluginName$jscomp$inline_224]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_225) || - namesToPlugins[pluginName$jscomp$inline_225] !== - pluginModule$jscomp$inline_226 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_224) || + namesToPlugins[pluginName$jscomp$inline_224] !== + pluginModule$jscomp$inline_225 ) { - if (namesToPlugins[pluginName$jscomp$inline_225]) + if (namesToPlugins[pluginName$jscomp$inline_224]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_225 + "`.") + (pluginName$jscomp$inline_224 + "`.") ); namesToPlugins[ - pluginName$jscomp$inline_225 - ] = pluginModule$jscomp$inline_226; - isOrderingDirty$jscomp$inline_224 = !0; + pluginName$jscomp$inline_224 + ] = pluginModule$jscomp$inline_225; + isOrderingDirty$jscomp$inline_223 = !0; } } -isOrderingDirty$jscomp$inline_224 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_223 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -1697,12 +1697,6 @@ function onCommitRoot(root) { ); } catch (err) {} } -function injectProfilingHooks() {} -function getLaneLabelMap() { - for (var map = new Map(), lane = 1, index$4 = 0; 31 > index$4; index$4++) - map.set(lane, void 0), (lane *= 2); - return map; -} var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2; @@ -1875,21 +1869,21 @@ function markRootFinished(root, remainingLanes) { remainingLanes = root.entanglements; var eventTimes = root.eventTimes; for (root = root.expirationTimes; 0 < noLongerPendingLanes; ) { - var index$9 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$9; - remainingLanes[index$9] = 0; - eventTimes[index$9] = -1; - root[index$9] = -1; + var index$8 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$8; + remainingLanes[index$8] = 0; + eventTimes[index$8] = -1; + root[index$8] = -1; noLongerPendingLanes &= ~lane; } } function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$10 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$10; - (lane & entangledLanes) | (root[index$10] & entangledLanes) && - (root[index$10] |= entangledLanes); + var index$9 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$9; + (lane & entangledLanes) | (root[index$9] & entangledLanes) && + (root[index$9] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -2161,19 +2155,16 @@ function popProvider(context) { pop(valueCursor); context._currentValue = currentValue; } -function scheduleWorkOnParentPath(parent, renderLanes) { +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { for (; null !== parent; ) { var alternate = parent.alternate; - if ((parent.childLanes & renderLanes) === renderLanes) - if ( - null === alternate || - (alternate.childLanes & renderLanes) === renderLanes - ) - break; - else alternate.childLanes |= renderLanes; - else - (parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes); + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; parent = parent.return; } } @@ -3642,28 +3633,37 @@ function updateMutableSource(source, getSnapshot, subscribe) { var hook = updateWorkInProgressHook(); return useMutableSource(hook, source, getSnapshot, subscribe); } -function mountSyncExternalStore(subscribe, getSnapshot) { +function updateSyncExternalStore(subscribe, getSnapshot) { var fiber = currentlyRenderingFiber$1, - hook = mountWorkInProgressHook(); - var nextSnapshot = getSnapshot(); - var root = workInProgressRoot; - if (null === root) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." + hook = updateWorkInProgressHook(), + nextSnapshot = getSnapshot(), + snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); + snapshotChanged && + ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); + hook = hook.queue; + updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ + subscribe + ]); + if ( + hook.getSnapshot !== getSnapshot || + snapshotChanged || + (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1) + ) { + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, hook, nextSnapshot, getSnapshot), + void 0, + null ); - includesBlockingLane(root, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - hook.memoizedState = nextSnapshot; - root = { value: nextSnapshot, getSnapshot: getSnapshot }; - hook.queue = root; - mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [subscribe]); - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), - void 0, - null - ); + subscribe = workInProgressRoot; + if (null === subscribe) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(subscribe, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + } return nextSnapshot; } function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { @@ -4051,7 +4051,32 @@ var ContextOnlyDispatcher = { }; return useMutableSource(hook, source, getSnapshot, subscribe); }, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: function(subscribe, getSnapshot) { + var fiber = currentlyRenderingFiber$1, + hook = mountWorkInProgressHook(); + var nextSnapshot = getSnapshot(); + var root = workInProgressRoot; + if (null === root) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(root, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + hook.memoizedState = nextSnapshot; + root = { value: nextSnapshot, getSnapshot: getSnapshot }; + hook.queue = root; + mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [ + subscribe + ]); + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), + void 0, + null + ); + return nextSnapshot; + }, useId: function() { var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix, @@ -4100,46 +4125,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: function(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, - hook = updateWorkInProgressHook(), - nextSnapshot = getSnapshot(), - snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); - snapshotChanged && - ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); - hook = hook.queue; - updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ - subscribe - ]); - if ( - hook.getSnapshot !== getSnapshot || - snapshotChanged || - (null !== workInProgressHook && - workInProgressHook.memoizedState.tag & 1) - ) { - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind( - null, - fiber, - hook, - nextSnapshot, - getSnapshot - ), - void 0, - null - ); - subscribe = workInProgressRoot; - if (null === subscribe) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - includesBlockingLane(subscribe, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - } - return nextSnapshot; - }, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }, @@ -4182,7 +4168,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }; @@ -4298,14 +4284,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$36 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$36 = lastTailNode), + for (var lastTailNode$35 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$35 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$36 + null === lastTailNode$35 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$36.sibling = null); + : (lastTailNode$35.sibling = null); } } function bubbleProperties(completedWork) { @@ -4315,19 +4301,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$37 = completedWork.child; null !== child$37; ) - (newChildLanes |= child$37.lanes | child$37.childLanes), - (subtreeFlags |= child$37.subtreeFlags & 14680064), - (subtreeFlags |= child$37.flags & 14680064), - (child$37.return = completedWork), - (child$37 = child$37.sibling); + for (var child$36 = completedWork.child; null !== child$36; ) + (newChildLanes |= child$36.lanes | child$36.childLanes), + (subtreeFlags |= child$36.subtreeFlags & 14680064), + (subtreeFlags |= child$36.flags & 14680064), + (child$36.return = completedWork), + (child$36 = child$36.sibling); else - for (child$37 = completedWork.child; null !== child$37; ) - (newChildLanes |= child$37.lanes | child$37.childLanes), - (subtreeFlags |= child$37.subtreeFlags), - (subtreeFlags |= child$37.flags), - (child$37.return = completedWork), - (child$37 = child$37.sibling); + for (child$36 = completedWork.child; null !== child$36; ) + (newChildLanes |= child$36.lanes | child$36.childLanes), + (subtreeFlags |= child$36.subtreeFlags), + (subtreeFlags |= child$36.flags), + (child$36.return = completedWork), + (child$36 = child$36.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5321,11 +5307,11 @@ function updateSuspenseFallbackChildren( workInProgress.child = primaryChildren; return fallbackChildren; } -function scheduleWorkOnFiber(fiber, renderLanes) { +function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; null !== alternate && (alternate.lanes |= renderLanes); - scheduleWorkOnParentPath(fiber.return, renderLanes); + scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot); } function initSuspenseListRenderState( workInProgress, @@ -5364,8 +5350,9 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { a: for (current = workInProgress.child; null !== current; ) { if (13 === current.tag) null !== current.memoizedState && - scheduleWorkOnFiber(current, renderLanes); - else if (19 === current.tag) scheduleWorkOnFiber(current, renderLanes); + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); + else if (19 === current.tag) + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); else if (null !== current.child) { current.child.return = current; current = current.child; @@ -5679,8 +5666,8 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$81 = effect.create; - effect.destroy = create$81(); + var create$80 = effect.create; + effect.destroy = create$80(); } effect = effect.next; } while (effect !== finishedWork); @@ -6130,8 +6117,8 @@ function commitMutationEffects(root, firstChild) { switch (firstChild.tag) { case 13: if (null !== firstChild.memoizedState) { - var current$86 = firstChild.alternate; - if (null === current$86 || null === current$86.memoizedState) + var current$85 = firstChild.alternate; + if (null === current$85 || null === current$85.memoizedState) globalMostRecentFallbackTime = now(); } break; @@ -6282,8 +6269,8 @@ function commitLayoutEffects(finishedWork) { commitUpdateQueue(firstChild, updateQueue, instance); break; case 3: - var updateQueue$82 = firstChild.updateQueue; - if (null !== updateQueue$82) { + var updateQueue$81 = firstChild.updateQueue; + if (null !== updateQueue$81) { current = null; if (null !== firstChild.child) switch (firstChild.child.tag) { @@ -6293,7 +6280,7 @@ function commitLayoutEffects(finishedWork) { case 1: current = firstChild.child.stateNode; } - commitUpdateQueue(firstChild, updateQueue$82, current); + commitUpdateQueue(firstChild, updateQueue$81, current); } break; case 5: @@ -6366,8 +6353,9 @@ var ceil = Math.ceil, workInProgressRootFatalError = null, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, - workInProgressRootRenderPhaseUpdatedLanes = 0, workInProgressRootPingedLanes = 0, + workInProgressRootConcurrentErrors = null, + workInProgressRootRecoverableErrors = null, globalMostRecentFallbackTime = 0, workInProgressRootRenderTargetTime = Infinity, hasUncaughtError = !1, @@ -6413,19 +6401,18 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { var root = markUpdateLaneFromFiberToRoot(fiber, lane); if (null === root) return null; markRootUpdated(root, lane, eventTime); - 0 !== (executionContext & 2) && root === workInProgressRoot - ? (workInProgressRootRenderPhaseUpdatedLanes |= lane) - : (root === workInProgressRoot && - (0 === (executionContext & 2) && - (workInProgressRootInterleavedUpdatedLanes |= lane), - 4 === workInProgressRootExitStatus && - markRootSuspended$1(root, workInProgressRootRenderLanes)), + if (0 === (executionContext & 2) || root !== workInProgressRoot) + root === workInProgressRoot && + (0 === (executionContext & 2) && + (workInProgressRootInterleavedUpdatedLanes |= lane), + 4 === workInProgressRootExitStatus && + markRootSuspended$1(root, workInProgressRootRenderLanes)), ensureRootIsScheduled(root, eventTime), 1 === lane && 0 === executionContext && 0 === (fiber.mode & 1) && ((workInProgressRootRenderTargetTime = now() + 500), - includesLegacySyncCallbacks && flushSyncCallbacks())); + includesLegacySyncCallbacks && flushSyncCallbacks()); return root; } function markUpdateLaneFromFiberToRoot(sourceFiber, lane) { @@ -6451,12 +6438,12 @@ function ensureRootIsScheduled(root, currentTime) { 0 < lanes; ) { - var index$7 = 31 - clz32(lanes), - lane = 1 << index$7, - expirationTime = expirationTimes[index$7]; + var index$6 = 31 - clz32(lanes), + lane = 1 << index$6, + expirationTime = expirationTimes[index$6]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$7] = computeExpirationTime(lane, currentTime); + expirationTimes[index$6] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } @@ -6596,7 +6583,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { case 1: throw Error("Root did not complete. This is a bug in React."); case 2: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 3: markRootSuspended$1(root, lanes); @@ -6613,22 +6600,22 @@ function performConcurrentWorkOnRoot(root, didTimeout) { break; } root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), didTimeout ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 4: markRootSuspended$1(root, lanes); if ((lanes & 4194240) === lanes) break; didTimeout = root.eventTimes; for (prevExecutionContext = -1; 0 < lanes; ) { - var index$6 = 31 - clz32(lanes); - prevDispatcher = 1 << index$6; - index$6 = didTimeout[index$6]; - index$6 > prevExecutionContext && (prevExecutionContext = index$6); + var index$5 = 31 - clz32(lanes); + prevDispatcher = 1 << index$5; + index$5 = didTimeout[index$5]; + index$5 > prevExecutionContext && (prevExecutionContext = index$5); lanes &= ~prevDispatcher; } lanes = prevExecutionContext; @@ -6649,15 +6636,15 @@ function performConcurrentWorkOnRoot(root, didTimeout) { : 1960 * ceil(lanes / 1960)) - lanes; if (10 < lanes) { root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), lanes ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 5: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; default: throw Error("Unknown root exit status."); @@ -6672,15 +6659,18 @@ function recoverFromConcurrentError(root, errorRetryLanes) { var prevExecutionContext = executionContext; executionContext |= 8; root.isDehydrated && (root.isDehydrated = !1); - for ( - var exitStatus, i = 0; - 50 > i && - ((exitStatus = renderRootSync(root, errorRetryLanes)), - 2 === exitStatus && 0 !== workInProgressRootRenderPhaseUpdatedLanes); - i++ - ); + var errorsFromFirstAttempt = workInProgressRootConcurrentErrors; + root = renderRootSync(root, errorRetryLanes); + 2 !== root && + null !== errorsFromFirstAttempt && + (null === workInProgressRootConcurrentErrors + ? (workInProgressRootRecoverableErrors = errorsFromFirstAttempt) + : (workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( + null, + errorsFromFirstAttempt + ))); executionContext = prevExecutionContext; - return exitStatus; + return root; } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -6722,9 +6712,9 @@ function markRootSuspended$1(root, suspendedLanes) { root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; for (root = root.expirationTimes; 0 < suspendedLanes; ) { - var index$8 = 31 - clz32(suspendedLanes), - lane = 1 << index$8; - root[index$8] = -1; + var index$7 = 31 - clz32(suspendedLanes), + lane = 1 << index$7; + root[index$7] = -1; suspendedLanes &= ~lane; } } @@ -6749,7 +6739,7 @@ function performSyncWorkOnRoot(root) { exitStatus); root.finishedWork = root.current.alternate; root.finishedLanes = lanes; - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); ensureRootIsScheduled(root, now()); return null; } @@ -6806,7 +6796,8 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = subtreeRenderLanes = lanes; workInProgressRootExitStatus = 0; workInProgressRootFatalError = null; - workInProgressRootPingedLanes = workInProgressRootRenderPhaseUpdatedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null; if (null !== interleavedQueues) { for (root = 0; root < interleavedQueues.length; root++) if ( @@ -6960,8 +6951,12 @@ function handleError(root$jscomp$0, thrownValue) { " suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display." ); } + root = value; 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [root]) + : workInProgressRootConcurrentErrors.push(root); value = createCapturedValue(value, sourceFiber); root = returnFiber; do { @@ -6993,12 +6988,12 @@ function handleError(root$jscomp$0, thrownValue) { root.flags |= 65536; thrownValue &= -thrownValue; root.lanes |= thrownValue; - var update$34 = createClassErrorUpdate( + var update$33 = createClassErrorUpdate( root, wakeable, thrownValue ); - enqueueCapturedUpdate(root, update$34); + enqueueCapturedUpdate(root, update$33); break a; } } @@ -7093,20 +7088,20 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } -function commitRoot(root) { +function commitRoot(root, recoverableErrors) { var previousUpdateLanePriority = currentUpdatePriority, prevTransition = ReactCurrentBatchConfig$2.transition; try { (ReactCurrentBatchConfig$2.transition = 0), (currentUpdatePriority = 1), - commitRootImpl(root, previousUpdateLanePriority); + commitRootImpl(root, recoverableErrors, previousUpdateLanePriority); } finally { (ReactCurrentBatchConfig$2.transition = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; } -function commitRootImpl(root, renderPriorityLevel) { +function commitRootImpl(root, recoverableErrors, renderPriorityLevel) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) @@ -7161,6 +7156,15 @@ function commitRootImpl(root, renderPriorityLevel) { 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); ensureRootIsScheduled(root, now()); + if (null !== recoverableErrors) + for ( + renderPriorityLevel = 0; + renderPriorityLevel < recoverableErrors.length; + renderPriorityLevel++ + ) + (finishedWork = recoverableErrors[renderPriorityLevel]), + (lanes = root.onRecoverableError), + null !== lanes && lanes(finishedWork); if (hasUncaughtError) throw ((hasUncaughtError = !1), (root = firstUncaughtError), @@ -7733,7 +7737,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) { newValue.lanes |= renderLanes; dependency = newValue.alternate; null !== dependency && (dependency.lanes |= renderLanes); - scheduleWorkOnParentPath(newValue.return, renderLanes); + scheduleContextWorkOnParentPath( + newValue.return, + renderLanes, + workInProgress + ); list.lanes |= renderLanes; break; } @@ -8031,7 +8039,13 @@ function createFiberFromPortal(portal, mode, lanes) { }; return mode; } -function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { +function FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError +) { this.tag = tag; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = this.current = this.pendingChildren = null; @@ -8045,6 +8059,7 @@ function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0; this.entanglements = createLaneMap(0); this.identifierPrefix = identifierPrefix; + this.onRecoverableError = onRecoverableError; } function createPortal(children, containerInfo, implementation) { var key = @@ -8255,10 +8270,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_967 = { + devToolsConfig$jscomp$inline_968 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.0.0-rc.0-51947a14b-20220113", + version: "18.0.0-rc.0-a3bde7974-20220208", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -8273,11 +8288,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1230 = { - bundleType: devToolsConfig$jscomp$inline_967.bundleType, - version: devToolsConfig$jscomp$inline_967.version, - rendererPackageName: devToolsConfig$jscomp$inline_967.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_967.rendererConfig, +var internals$jscomp$inline_1232 = { + bundleType: devToolsConfig$jscomp$inline_968.bundleType, + version: devToolsConfig$jscomp$inline_968.version, + rendererPackageName: devToolsConfig$jscomp$inline_968.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_968.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8293,29 +8308,26 @@ var internals$jscomp$inline_1230 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_967.findFiberByHostInstance || + devToolsConfig$jscomp$inline_968.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.0.0-rc.0-51947a14b-20220113" + reconcilerVersion: "18.0.0-rc.0-a3bde7974-20220208" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1231 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1233 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1231.isDisabled && - hook$jscomp$inline_1231.supportsFiber + !hook$jscomp$inline_1233.isDisabled && + hook$jscomp$inline_1233.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1231.inject( - Object.assign({}, internals$jscomp$inline_1230, { - getLaneLabelMap: getLaneLabelMap, - injectProfilingHooks: injectProfilingHooks - }) + (rendererID = hook$jscomp$inline_1233.inject( + internals$jscomp$inline_1232 )), - (injectedHook = hook$jscomp$inline_1231); + (injectedHook = hook$jscomp$inline_1233); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { @@ -8361,7 +8373,7 @@ exports.findNodeHandle = findNodeHandle; exports.render = function(element, containerTag, callback) { var root = roots.get(containerTag); if (!root) { - root = new FiberRootNode(containerTag, 0, !1, ""); + root = new FiberRootNode(containerTag, 0, !1, "", null); var JSCompiler_inline_result = createFiber(3, null, null, 0); root.current = JSCompiler_inline_result; JSCompiler_inline_result.stateNode = root; diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index f9734c0a95..ec6c578705 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<6fb23e3f27b69a5703944d58969d32f4>> */ @@ -2282,19 +2282,16 @@ function popProvider(context) { pop(valueCursor); context._currentValue = currentValue; } -function scheduleWorkOnParentPath(parent, renderLanes) { +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { for (; null !== parent; ) { var alternate = parent.alternate; - if ((parent.childLanes & renderLanes) === renderLanes) - if ( - null === alternate || - (alternate.childLanes & renderLanes) === renderLanes - ) - break; - else alternate.childLanes |= renderLanes; - else - (parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes); + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; parent = parent.return; } } @@ -3768,28 +3765,37 @@ function updateMutableSource(source, getSnapshot, subscribe) { var hook = updateWorkInProgressHook(); return useMutableSource(hook, source, getSnapshot, subscribe); } -function mountSyncExternalStore(subscribe, getSnapshot) { +function updateSyncExternalStore(subscribe, getSnapshot) { var fiber = currentlyRenderingFiber$1, - hook = mountWorkInProgressHook(); - var nextSnapshot = getSnapshot(); - var root = workInProgressRoot; - if (null === root) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." + hook = updateWorkInProgressHook(), + nextSnapshot = getSnapshot(), + snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); + snapshotChanged && + ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); + hook = hook.queue; + updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ + subscribe + ]); + if ( + hook.getSnapshot !== getSnapshot || + snapshotChanged || + (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1) + ) { + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, hook, nextSnapshot, getSnapshot), + void 0, + null ); - includesBlockingLane(root, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - hook.memoizedState = nextSnapshot; - root = { value: nextSnapshot, getSnapshot: getSnapshot }; - hook.queue = root; - mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [subscribe]); - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), - void 0, - null - ); + subscribe = workInProgressRoot; + if (null === subscribe) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(subscribe, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + } return nextSnapshot; } function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { @@ -4179,7 +4185,32 @@ var ContextOnlyDispatcher = { }; return useMutableSource(hook, source, getSnapshot, subscribe); }, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: function(subscribe, getSnapshot) { + var fiber = currentlyRenderingFiber$1, + hook = mountWorkInProgressHook(); + var nextSnapshot = getSnapshot(); + var root = workInProgressRoot; + if (null === root) + throw Error( + "Expected a work-in-progress root. This is a bug in React. Please file an issue." + ); + includesBlockingLane(root, renderLanes) || + pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); + hook.memoizedState = nextSnapshot; + root = { value: nextSnapshot, getSnapshot: getSnapshot }; + hook.queue = root; + mountEffect(subscribeToStore.bind(null, fiber, root, subscribe), [ + subscribe + ]); + fiber.flags |= 2048; + pushEffect( + 9, + updateStoreInstance.bind(null, fiber, root, nextSnapshot, getSnapshot), + void 0, + null + ); + return nextSnapshot; + }, useId: function() { var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix, @@ -4228,46 +4259,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: function(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, - hook = updateWorkInProgressHook(), - nextSnapshot = getSnapshot(), - snapshotChanged = !objectIs(hook.memoizedState, nextSnapshot); - snapshotChanged && - ((hook.memoizedState = nextSnapshot), (didReceiveUpdate = !0)); - hook = hook.queue; - updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [ - subscribe - ]); - if ( - hook.getSnapshot !== getSnapshot || - snapshotChanged || - (null !== workInProgressHook && - workInProgressHook.memoizedState.tag & 1) - ) { - fiber.flags |= 2048; - pushEffect( - 9, - updateStoreInstance.bind( - null, - fiber, - hook, - nextSnapshot, - getSnapshot - ), - void 0, - null - ); - subscribe = workInProgressRoot; - if (null === subscribe) - throw Error( - "Expected a work-in-progress root. This is a bug in React. Please file an issue." - ); - includesBlockingLane(subscribe, renderLanes) || - pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot); - } - return nextSnapshot; - }, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }, @@ -4310,7 +4302,7 @@ var ContextOnlyDispatcher = { return [isPending, start]; }, useMutableSource: updateMutableSource, - useSyncExternalStore: mountSyncExternalStore, + useSyncExternalStore: updateSyncExternalStore, useId: updateId, unstable_isNewReconciler: !1 }, @@ -5577,11 +5569,11 @@ function updateSuspenseFallbackChildren( workInProgress.child = primaryChildren; return fallbackChildren; } -function scheduleWorkOnFiber(fiber, renderLanes) { +function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) { fiber.lanes |= renderLanes; var alternate = fiber.alternate; null !== alternate && (alternate.lanes |= renderLanes); - scheduleWorkOnParentPath(fiber.return, renderLanes); + scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot); } function initSuspenseListRenderState( workInProgress, @@ -5620,8 +5612,9 @@ function updateSuspenseListComponent(current, workInProgress, renderLanes) { a: for (current = workInProgress.child; null !== current; ) { if (13 === current.tag) null !== current.memoizedState && - scheduleWorkOnFiber(current, renderLanes); - else if (19 === current.tag) scheduleWorkOnFiber(current, renderLanes); + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); + else if (19 === current.tag) + scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress); else if (null !== current.child) { current.child.return = current; current = current.child; @@ -6806,8 +6799,9 @@ var ceil = Math.ceil, workInProgressRootFatalError = null, workInProgressRootSkippedLanes = 0, workInProgressRootInterleavedUpdatedLanes = 0, - workInProgressRootRenderPhaseUpdatedLanes = 0, workInProgressRootPingedLanes = 0, + workInProgressRootConcurrentErrors = null, + workInProgressRootRecoverableErrors = null, globalMostRecentFallbackTime = 0, workInProgressRootRenderTargetTime = Infinity, hasUncaughtError = !1, @@ -6854,9 +6848,8 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { var root = markUpdateLaneFromFiberToRoot(fiber, lane); if (null === root) return null; markRootUpdated(root, lane, eventTime); - 0 !== (executionContext & 2) && root === workInProgressRoot - ? (workInProgressRootRenderPhaseUpdatedLanes |= lane) - : (isDevToolsPresent && addFiberToLanesMap(root, fiber, lane), + if (0 === (executionContext & 2) || root !== workInProgressRoot) + isDevToolsPresent && addFiberToLanesMap(root, fiber, lane), root === workInProgressRoot && (0 === (executionContext & 2) && (workInProgressRootInterleavedUpdatedLanes |= lane), @@ -6867,7 +6860,7 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) { 0 === executionContext && 0 === (fiber.mode & 1) && ((workInProgressRootRenderTargetTime = now() + 500), - includesLegacySyncCallbacks && flushSyncCallbacks())); + includesLegacySyncCallbacks && flushSyncCallbacks()); return root; } function markUpdateLaneFromFiberToRoot(sourceFiber, lane) { @@ -7052,7 +7045,7 @@ function performConcurrentWorkOnRoot(root, didTimeout) { case 1: throw Error("Root did not complete. This is a bug in React."); case 2: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 3: markRootSuspended$1(root, lanes); @@ -7069,12 +7062,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { break; } root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), didTimeout ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 4: markRootSuspended$1(root, lanes); @@ -7105,15 +7098,15 @@ function performConcurrentWorkOnRoot(root, didTimeout) { : 1960 * ceil(lanes / 1960)) - lanes; if (10 < lanes) { root.timeoutHandle = scheduleTimeout( - commitRoot.bind(null, root), + commitRoot.bind(null, root, workInProgressRootRecoverableErrors), lanes ); break; } - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; case 5: - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); break; default: throw Error("Unknown root exit status."); @@ -7128,15 +7121,18 @@ function recoverFromConcurrentError(root, errorRetryLanes) { var prevExecutionContext = executionContext; executionContext |= 8; root.isDehydrated && (root.isDehydrated = !1); - for ( - var exitStatus, i = 0; - 50 > i && - ((exitStatus = renderRootSync(root, errorRetryLanes)), - 2 === exitStatus && 0 !== workInProgressRootRenderPhaseUpdatedLanes); - i++ - ); + var errorsFromFirstAttempt = workInProgressRootConcurrentErrors; + root = renderRootSync(root, errorRetryLanes); + 2 !== root && + null !== errorsFromFirstAttempt && + (null === workInProgressRootConcurrentErrors + ? (workInProgressRootRecoverableErrors = errorsFromFirstAttempt) + : (workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( + null, + errorsFromFirstAttempt + ))); executionContext = prevExecutionContext; - return exitStatus; + return root; } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -7207,7 +7203,7 @@ function performSyncWorkOnRoot(root) { exitStatus); root.finishedWork = root.current.alternate; root.finishedLanes = lanes; - commitRoot(root); + commitRoot(root, workInProgressRootRecoverableErrors); ensureRootIsScheduled(root, now()); return null; } @@ -7264,7 +7260,8 @@ function prepareFreshStack(root, lanes) { workInProgressRootRenderLanes = subtreeRenderLanes = lanes; workInProgressRootExitStatus = 0; workInProgressRootFatalError = null; - workInProgressRootPingedLanes = workInProgressRootRenderPhaseUpdatedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0; + workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null; if (null !== interleavedQueues) { for (root = 0; root < interleavedQueues.length; root++) if ( @@ -7445,8 +7442,12 @@ function handleError(root, thrownValue) { " suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display." ); } + wakeable = value; 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2); + null === workInProgressRootConcurrentErrors + ? (workInProgressRootConcurrentErrors = [wakeable]) + : workInProgressRootConcurrentErrors.push(wakeable); value = createCapturedValue(value, sourceFiber); wakeable = returnFiber; do { @@ -7609,20 +7610,20 @@ function completeUnitOfWork(unitOfWork) { } while (null !== completedWork); 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5); } -function commitRoot(root) { +function commitRoot(root, recoverableErrors) { var previousUpdateLanePriority = currentUpdatePriority, prevTransition = ReactCurrentBatchConfig$2.transition; try { (ReactCurrentBatchConfig$2.transition = 0), (currentUpdatePriority = 1), - commitRootImpl(root, previousUpdateLanePriority); + commitRootImpl(root, recoverableErrors, previousUpdateLanePriority); } finally { (ReactCurrentBatchConfig$2.transition = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; } -function commitRootImpl(root, renderPriorityLevel) { +function commitRootImpl(root, recoverableErrors, renderPriorityLevel) { do flushPassiveEffects(); while (null !== rootWithPendingPassiveEffects); if (0 !== (executionContext & 6)) @@ -7688,6 +7689,15 @@ function commitRootImpl(root, renderPriorityLevel) { onCommitRoot(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); ensureRootIsScheduled(root, now()); + if (null !== recoverableErrors) + for ( + renderPriorityLevel = 0; + renderPriorityLevel < recoverableErrors.length; + renderPriorityLevel++ + ) + (finishedWork = recoverableErrors[renderPriorityLevel]), + (lanes = root.onRecoverableError), + null !== lanes && lanes(finishedWork); if (hasUncaughtError) throw ((hasUncaughtError = !1), (root = firstUncaughtError), @@ -8342,7 +8352,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) { newValue.lanes |= renderLanes; dependency = newValue.alternate; null !== dependency && (dependency.lanes |= renderLanes); - scheduleWorkOnParentPath(newValue.return, renderLanes); + scheduleContextWorkOnParentPath( + newValue.return, + renderLanes, + workInProgress + ); list.lanes |= renderLanes; break; } @@ -8656,7 +8670,13 @@ function createFiberFromPortal(portal, mode, lanes) { }; return mode; } -function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { +function FiberRootNode( + containerInfo, + tag, + hydrate, + identifierPrefix, + onRecoverableError +) { this.tag = tag; this.containerInfo = containerInfo; this.finishedWork = this.pingCache = this.current = this.pendingChildren = null; @@ -8670,6 +8690,7 @@ function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix) { this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0; this.entanglements = createLaneMap(0); this.identifierPrefix = identifierPrefix; + this.onRecoverableError = onRecoverableError; this.passiveEffectDuration = this.effectDuration = 0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; @@ -8887,10 +8908,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1043 = { + devToolsConfig$jscomp$inline_1045 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.0.0-rc.0-51947a14b-20220113", + version: "18.0.0-rc.0-a3bde7974-20220208", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -8905,11 +8926,24 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1330 = { - bundleType: devToolsConfig$jscomp$inline_1043.bundleType, - version: devToolsConfig$jscomp$inline_1043.version, - rendererPackageName: devToolsConfig$jscomp$inline_1043.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1043.rendererConfig, +(function(internals) { + if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; + var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; + if (hook.isDisabled || !hook.supportsFiber) return !0; + try { + (internals = Object.assign({}, internals, { + getLaneLabelMap: getLaneLabelMap, + injectProfilingHooks: injectProfilingHooks + })), + (rendererID = hook.inject(internals)), + (injectedHook = hook); + } catch (err) {} + return hook.checkDCE ? !0 : !1; +})({ + bundleType: devToolsConfig$jscomp$inline_1045.bundleType, + version: devToolsConfig$jscomp$inline_1045.version, + rendererPackageName: devToolsConfig$jscomp$inline_1045.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1045.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8925,31 +8959,15 @@ var internals$jscomp$inline_1330 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1043.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1045.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.0.0-rc.0-51947a14b-20220113" -}; -if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1331 = __REACT_DEVTOOLS_GLOBAL_HOOK__; - if ( - !hook$jscomp$inline_1331.isDisabled && - hook$jscomp$inline_1331.supportsFiber - ) - try { - (rendererID = hook$jscomp$inline_1331.inject( - Object.assign({}, internals$jscomp$inline_1330, { - getLaneLabelMap: getLaneLabelMap, - injectProfilingHooks: injectProfilingHooks - }) - )), - (injectedHook = hook$jscomp$inline_1331); - } catch (err) {} -} + reconcilerVersion: "18.0.0-rc.0-a3bde7974-20220208" +}); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function(reactTag) { return (reactTag = getInstanceFromTag(reactTag)) @@ -8993,7 +9011,7 @@ exports.findNodeHandle = findNodeHandle; exports.render = function(element, containerTag, callback) { var root = roots.get(containerTag); if (!root) { - root = new FiberRootNode(containerTag, 0, !1, ""); + root = new FiberRootNode(containerTag, 0, !1, "", null); var JSCompiler_inline_result = 0; isDevToolsPresent && (JSCompiler_inline_result |= 2); JSCompiler_inline_result = createFiber( From 3d8a7fe14a2fd38124bffef8e4b8d2b1b56beba2 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 9 Feb 2022 12:04:59 -0800 Subject: [PATCH 084/109] Set Java source/target compatibility for react-native-gradle-plugin to 8 Summary: This is necessary otherwise when building from source on JVM < 11, the `compileJava` task of the Gradle Plugin will fail with `invalid source: 11`. Essentially the Gradle build will not even start because of this. Instead we delegate to a better formatted warning from either AGP or from our plugin. Changelog: [Internal] [Changed] - Set Java source/target compatibility for react-native-gradle-plugin to 8 Reviewed By: ShikaSD Differential Revision: D34111799 fbshipit-source-id: 57ab11fe6c4532576776b586f75e8fcb5c71adcd --- packages/react-native-gradle-plugin/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-gradle-plugin/build.gradle.kts b/packages/react-native-gradle-plugin/build.gradle.kts index 3b824bc655..c457a5791e 100644 --- a/packages/react-native-gradle-plugin/build.gradle.kts +++ b/packages/react-native-gradle-plugin/build.gradle.kts @@ -46,8 +46,8 @@ dependencies { } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } tasks.withType { From 216ac27aa361b22c847878feb38ad84f6d9f5692 Mon Sep 17 00:00:00 2001 From: Aniket Mathur Date: Wed, 9 Feb 2022 12:41:38 -0800 Subject: [PATCH 085/109] Fix analysis errors with the FBCODE platform (#33073) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/33073 Differential Revision: D34084935 fbshipit-source-id: 8199b0b16b6b390a09138cf30b4056c578d2354f --- .../soloader/java/com/facebook/soloader/BUCK | 11 +++++++++++ .../src/main/third-party/android/androidx/BUCK | 11 ++++++++++- .../main/third-party/java/buck-android-support/BUCK | 6 ++++++ ReactAndroid/src/main/third-party/java/jsr-305/BUCK | 6 ++++++ ReactAndroid/src/main/third-party/java/jsr-330/BUCK | 6 ++++++ ReactAndroid/src/test/resources/BUCK | 10 +++++++++- 6 files changed, 48 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK index d12db6807a..5886e907a2 100644 --- a/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK +++ b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK @@ -1,3 +1,8 @@ +load( + "@fbsource//tools/build_defs:default_platform_defs.bzl", + "ANDROID", + "get_default_target_platform", +) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.android_library( @@ -8,16 +13,19 @@ fb_native.android_library( ":soloader-binary", ], visibility = ["PUBLIC"], + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.prebuilt_jar( name = "annotation-binary", binary_jar = ":annotation-binary.jar", + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.prebuilt_jar( name = "nativeloader-binary", binary_jar = ":nativeloader-binary.jar", + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( @@ -29,16 +37,19 @@ fb_native.remote_file( name = "annotation-binary.jar", sha1 = "dc58463712cb3e5f03d8ee5ac9743b9ced9afa77", url = "mvn:com.facebook.soloader:annotation:jar:0.10.3", + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( name = "nativeloader-binary.jar", sha1 = "171783d0f3f525fb9e18eb3af758c0b3aaeaed69", url = "mvn:com.facebook.soloader:nativeloader:jar:0.10.3", + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( name = "soloader-binary-aar", sha1 = "7f5d7fb7dd272fd016e32c278e6950258ebb8e22", url = "mvn:com.facebook.soloader:soloader:aar:0.10.3", + default_target_platform = get_default_target_platform(ANDROID), ) diff --git a/ReactAndroid/src/main/third-party/android/androidx/BUCK b/ReactAndroid/src/main/third-party/android/androidx/BUCK index d8398497d3..9f474f4198 100644 --- a/ReactAndroid/src/main/third-party/android/androidx/BUCK +++ b/ReactAndroid/src/main/third-party/android/androidx/BUCK @@ -1,9 +1,15 @@ -load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") +load( + "@fbsource//tools/build_defs:default_platform_defs.bzl", + "ANDROID", + "get_default_target_platform", +) +load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.prebuilt_jar( name = "annotation", binary_jar = ":annotation.jar", visibility = ["PUBLIC"], + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_library( @@ -378,6 +384,7 @@ fb_native.android_prebuilt_aar( fb_native.prebuilt_jar( name = "collection-binary", binary_jar = ":collection-binary.jar", + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( @@ -393,6 +400,7 @@ fb_native.android_prebuilt_aar( fb_native.prebuilt_jar( name = "core-common-binary", binary_jar = ":core-common-binary.jar", + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( @@ -443,6 +451,7 @@ fb_native.android_prebuilt_aar( fb_native.prebuilt_jar( name = "lifecycle-common-binary", binary_jar = ":lifecycle-common-binary.jar", + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( diff --git a/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK b/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK index 8fea3737cd..84fcc672fd 100644 --- a/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK +++ b/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK @@ -1,3 +1,8 @@ +load( + "@fbsource//tools/build_defs:default_platform_defs.bzl", + "ANDROID", + "get_default_target_platform", +) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") load("//tools/build_defs/oss:rn_defs.bzl", "react_native_integration_tests_target") @@ -8,4 +13,5 @@ fb_native.prebuilt_jar( visibility = [ react_native_integration_tests_target("..."), ], + default_target_platform = get_default_target_platform(ANDROID), ) diff --git a/ReactAndroid/src/main/third-party/java/jsr-305/BUCK b/ReactAndroid/src/main/third-party/java/jsr-305/BUCK index 8833e61c52..9a0942ecc7 100644 --- a/ReactAndroid/src/main/third-party/java/jsr-305/BUCK +++ b/ReactAndroid/src/main/third-party/java/jsr-305/BUCK @@ -1,9 +1,15 @@ +load( + "@fbsource//tools/build_defs:default_platform_defs.bzl", + "ANDROID", + "get_default_target_platform", +) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.prebuilt_jar( name = "jsr-305", binary_jar = ":jsr305-binary.jar", visibility = ["PUBLIC"], + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( diff --git a/ReactAndroid/src/main/third-party/java/jsr-330/BUCK b/ReactAndroid/src/main/third-party/java/jsr-330/BUCK index 24ab990280..122e275b60 100644 --- a/ReactAndroid/src/main/third-party/java/jsr-330/BUCK +++ b/ReactAndroid/src/main/third-party/java/jsr-330/BUCK @@ -1,9 +1,15 @@ +load( + "@fbsource//tools/build_defs:default_platform_defs.bzl", + "ANDROID", + "get_default_target_platform", +) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.prebuilt_jar( name = "jsr-330", binary_jar = ":jsr330-binary.jar", visibility = ["PUBLIC"], + default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( diff --git a/ReactAndroid/src/test/resources/BUCK b/ReactAndroid/src/test/resources/BUCK index 4d2bf53b20..706b85f25c 100644 --- a/ReactAndroid/src/test/resources/BUCK +++ b/ReactAndroid/src/test/resources/BUCK @@ -1,9 +1,16 @@ +load( + "@fbsource//tools/build_defs:default_platform_defs.bzl", + "ANDROID", + "get_default_target_platform", +) + # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") -java_library( +fb_native.java_library( name = "robolectric", srcs = [], labels = [ @@ -14,4 +21,5 @@ java_library( ], resources_root = ".", visibility = ["PUBLIC"], + default_target_platform = get_default_target_platform(ANDROID), ) From 42b391775f663df335f6f2553104fc2fa35b1bee Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Wed, 9 Feb 2022 13:01:31 -0800 Subject: [PATCH 086/109] Fix ReactCommon Break for Windows (#33047) Summary: Changes to MapBuffer code in https://github.com/facebook/react-native/compare/aaff15c...d287598 broke build for Windows. Errors included incompatible type conversions, the use of `__attribute__(__packed__)` which is only supported by GCC and Clang, and the usage of designated initializers which are only supported on C++20. Changes here restore build on Windows. ## Changelog [General] [Fixed] - Fix build break on Windows with ReactCommon Pull Request resolved: https://github.com/facebook/react-native/pull/33047 Test Plan: React Native project built on Windows and passes react-native-windows repository pipeline. These edits are currently merged into the main branch of react-native-windows. Reviewed By: ShikaSD Differential Revision: D34101367 Pulled By: philIip fbshipit-source-id: 1596365c2e92f377c6375805b33de5e1c7b78e66 --- ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp | 10 +++++----- ReactCommon/react/renderer/mapbuffer/MapBuffer.h | 8 +++++--- .../react/renderer/mapbuffer/MapBufferBuilder.cpp | 12 +++++++----- .../react/renderer/mapbuffer/MapBufferBuilder.h | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp b/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp index 3f3a6de852..94d8c87bd3 100644 --- a/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +++ b/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp @@ -33,11 +33,11 @@ MapBuffer::MapBuffer(std::vector data) : bytes_(std::move(data)) { } } -uint32_t MapBuffer::getKeyBucket(Key key) const { - uint32_t lo = 0; - uint32_t hi = count_ - 1; +int32_t MapBuffer::getKeyBucket(Key key) const { + int32_t lo = 0; + int32_t hi = count_ - 1; while (lo <= hi) { - uint32_t mid = (lo + hi) >> 1; + int32_t mid = (lo + hi) >> 1; Key midVal = *reinterpret_cast(bytes_.data() + bucketOffset(mid)); @@ -112,7 +112,7 @@ MapBuffer MapBuffer::getMapBuffer(Key key) const { return MapBuffer(std::move(value)); } -uint32_t MapBuffer::size() const { +size_t MapBuffer::size() const { return bytes_.size(); } diff --git a/ReactCommon/react/renderer/mapbuffer/MapBuffer.h b/ReactCommon/react/renderer/mapbuffer/MapBuffer.h index 037e3e8ae3..fe68305851 100644 --- a/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +++ b/ReactCommon/react/renderer/mapbuffer/MapBuffer.h @@ -80,7 +80,8 @@ class MapBuffer { uint32_t bufferSize; // Amount of bytes used to store the map in memory }; - struct __attribute__((__packed__)) Bucket { +#pragma pack(push, 1) + struct Bucket { Key key; uint16_t type; uint64_t data; @@ -88,6 +89,7 @@ class MapBuffer { Bucket(Key key, uint16_t type, uint64_t data) : key(key), type(type), data(data) {} }; +#pragma pack(pop) static_assert(sizeof(Header) == 8, "MapBuffer header size is incorrect."); static_assert(sizeof(Bucket) == 12, "MapBuffer bucket size is incorrect."); @@ -124,7 +126,7 @@ class MapBuffer { // TODO T83483191: review this declaration MapBuffer getMapBuffer(MapBuffer::Key key) const; - uint32_t size() const; + size_t size() const; uint8_t const *data() const; @@ -140,7 +142,7 @@ class MapBuffer { // returns the relative offset of the first byte of dynamic data int32_t getDynamicDataOffset() const; - uint32_t getKeyBucket(MapBuffer::Key key) const; + int32_t getKeyBucket(MapBuffer::Key key) const; friend ReadableMapBuffer; }; diff --git a/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp b/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp index 3d06fba880..9388343701 100644 --- a/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +++ b/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp @@ -14,7 +14,7 @@ namespace facebook { namespace react { constexpr uint32_t INT_SIZE = sizeof(uint32_t); -constexpr double DOUBLE_SIZE = sizeof(double); +constexpr uint32_t DOUBLE_SIZE = sizeof(double); constexpr uint32_t MAX_BUCKET_VALUE_SIZE = sizeof(uint64_t); MapBuffer MapBufferBuilder::EMPTY() { @@ -23,6 +23,8 @@ MapBuffer MapBufferBuilder::EMPTY() { MapBufferBuilder::MapBufferBuilder(uint32_t initialSize) { buckets_.reserve(initialSize); + header_.count = 0; + header_.bufferSize = 0; } void MapBufferBuilder::storeKeyValue( @@ -76,7 +78,7 @@ void MapBufferBuilder::putInt(MapBuffer::Key key, int32_t value) { } void MapBufferBuilder::putString(MapBuffer::Key key, std::string const &value) { - int32_t strSize = value.size(); + auto strSize = value.size(); const char *strData = value.data(); // format [length of string (int)] + [Array of Characters in the string] @@ -94,7 +96,7 @@ void MapBufferBuilder::putString(MapBuffer::Key key, std::string const &value) { } void MapBufferBuilder::putMapBuffer(MapBuffer::Key key, MapBuffer const &map) { - int32_t mapBufferSize = map.size(); + auto mapBufferSize = map.size(); auto offset = dynamicData_.size(); @@ -122,9 +124,9 @@ MapBuffer MapBufferBuilder::build() { // Create buffer: [header] + [key, values] + [dynamic data] auto bucketSize = buckets_.size() * sizeof(MapBuffer::Bucket); auto headerSize = sizeof(MapBuffer::Header); - uint32_t bufferSize = headerSize + bucketSize + dynamicData_.size(); + auto bufferSize = headerSize + bucketSize + dynamicData_.size(); - header_.bufferSize = bufferSize; + header_.bufferSize = static_cast(bufferSize); if (needsSort_) { std::sort(buckets_.begin(), buckets_.end(), compareBuckets); diff --git a/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h b/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h index 154c5daa63..aa8ae87940 100644 --- a/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +++ b/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h @@ -38,7 +38,7 @@ class MapBufferBuilder { MapBuffer build(); private: - MapBuffer::Header header_ = {.count = 0, .bufferSize = 0}; + MapBuffer::Header header_; std::vector buckets_{}; From 4f42f4d18f545bccb00dbc3c32181517b1299a2f Mon Sep 17 00:00:00 2001 From: Aniket Mathur Date: Wed, 9 Feb 2022 13:14:41 -0800 Subject: [PATCH 087/109] Revert D34084935: Fix analysis errors with the FBCODE platform Differential Revision: D34084935 (https://github.com/facebook/react-native/commit/216ac27aa361b22c847878feb38ad84f6d9f5692) Original commit changeset: 8199b0b16b6b Original Phabricator Diff: D34084935 (https://github.com/facebook/react-native/commit/216ac27aa361b22c847878feb38ad84f6d9f5692) fbshipit-source-id: b5d725854c92282b2e5eddeff48d6b57b2318c1f --- .../soloader/java/com/facebook/soloader/BUCK | 11 ----------- .../src/main/third-party/android/androidx/BUCK | 11 +---------- .../main/third-party/java/buck-android-support/BUCK | 6 ------ ReactAndroid/src/main/third-party/java/jsr-305/BUCK | 6 ------ ReactAndroid/src/main/third-party/java/jsr-330/BUCK | 6 ------ ReactAndroid/src/test/resources/BUCK | 10 +--------- 6 files changed, 2 insertions(+), 48 deletions(-) diff --git a/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK index 5886e907a2..d12db6807a 100644 --- a/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK +++ b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK @@ -1,8 +1,3 @@ -load( - "@fbsource//tools/build_defs:default_platform_defs.bzl", - "ANDROID", - "get_default_target_platform", -) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.android_library( @@ -13,19 +8,16 @@ fb_native.android_library( ":soloader-binary", ], visibility = ["PUBLIC"], - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.prebuilt_jar( name = "annotation-binary", binary_jar = ":annotation-binary.jar", - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.prebuilt_jar( name = "nativeloader-binary", binary_jar = ":nativeloader-binary.jar", - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( @@ -37,19 +29,16 @@ fb_native.remote_file( name = "annotation-binary.jar", sha1 = "dc58463712cb3e5f03d8ee5ac9743b9ced9afa77", url = "mvn:com.facebook.soloader:annotation:jar:0.10.3", - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( name = "nativeloader-binary.jar", sha1 = "171783d0f3f525fb9e18eb3af758c0b3aaeaed69", url = "mvn:com.facebook.soloader:nativeloader:jar:0.10.3", - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( name = "soloader-binary-aar", sha1 = "7f5d7fb7dd272fd016e32c278e6950258ebb8e22", url = "mvn:com.facebook.soloader:soloader:aar:0.10.3", - default_target_platform = get_default_target_platform(ANDROID), ) diff --git a/ReactAndroid/src/main/third-party/android/androidx/BUCK b/ReactAndroid/src/main/third-party/android/androidx/BUCK index 9f474f4198..d8398497d3 100644 --- a/ReactAndroid/src/main/third-party/android/androidx/BUCK +++ b/ReactAndroid/src/main/third-party/android/androidx/BUCK @@ -1,15 +1,9 @@ -load( - "@fbsource//tools/build_defs:default_platform_defs.bzl", - "ANDROID", - "get_default_target_platform", -) -load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") +load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.prebuilt_jar( name = "annotation", binary_jar = ":annotation.jar", visibility = ["PUBLIC"], - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_library( @@ -384,7 +378,6 @@ fb_native.android_prebuilt_aar( fb_native.prebuilt_jar( name = "collection-binary", binary_jar = ":collection-binary.jar", - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( @@ -400,7 +393,6 @@ fb_native.android_prebuilt_aar( fb_native.prebuilt_jar( name = "core-common-binary", binary_jar = ":core-common-binary.jar", - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( @@ -451,7 +443,6 @@ fb_native.android_prebuilt_aar( fb_native.prebuilt_jar( name = "lifecycle-common-binary", binary_jar = ":lifecycle-common-binary.jar", - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.android_prebuilt_aar( diff --git a/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK b/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK index 84fcc672fd..8fea3737cd 100644 --- a/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK +++ b/ReactAndroid/src/main/third-party/java/buck-android-support/BUCK @@ -1,8 +1,3 @@ -load( - "@fbsource//tools/build_defs:default_platform_defs.bzl", - "ANDROID", - "get_default_target_platform", -) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") load("//tools/build_defs/oss:rn_defs.bzl", "react_native_integration_tests_target") @@ -13,5 +8,4 @@ fb_native.prebuilt_jar( visibility = [ react_native_integration_tests_target("..."), ], - default_target_platform = get_default_target_platform(ANDROID), ) diff --git a/ReactAndroid/src/main/third-party/java/jsr-305/BUCK b/ReactAndroid/src/main/third-party/java/jsr-305/BUCK index 9a0942ecc7..8833e61c52 100644 --- a/ReactAndroid/src/main/third-party/java/jsr-305/BUCK +++ b/ReactAndroid/src/main/third-party/java/jsr-305/BUCK @@ -1,15 +1,9 @@ -load( - "@fbsource//tools/build_defs:default_platform_defs.bzl", - "ANDROID", - "get_default_target_platform", -) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.prebuilt_jar( name = "jsr-305", binary_jar = ":jsr305-binary.jar", visibility = ["PUBLIC"], - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( diff --git a/ReactAndroid/src/main/third-party/java/jsr-330/BUCK b/ReactAndroid/src/main/third-party/java/jsr-330/BUCK index 122e275b60..24ab990280 100644 --- a/ReactAndroid/src/main/third-party/java/jsr-330/BUCK +++ b/ReactAndroid/src/main/third-party/java/jsr-330/BUCK @@ -1,15 +1,9 @@ -load( - "@fbsource//tools/build_defs:default_platform_defs.bzl", - "ANDROID", - "get_default_target_platform", -) load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native") fb_native.prebuilt_jar( name = "jsr-330", binary_jar = ":jsr330-binary.jar", visibility = ["PUBLIC"], - default_target_platform = get_default_target_platform(ANDROID), ) fb_native.remote_file( diff --git a/ReactAndroid/src/test/resources/BUCK b/ReactAndroid/src/test/resources/BUCK index 706b85f25c..4d2bf53b20 100644 --- a/ReactAndroid/src/test/resources/BUCK +++ b/ReactAndroid/src/test/resources/BUCK @@ -1,16 +1,9 @@ -load( - "@fbsource//tools/build_defs:default_platform_defs.bzl", - "ANDROID", - "get_default_target_platform", -) - # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") -fb_native.java_library( +java_library( name = "robolectric", srcs = [], labels = [ @@ -21,5 +14,4 @@ fb_native.java_library( ], resources_root = ".", visibility = ["PUBLIC"], - default_target_platform = get_default_target_platform(ANDROID), ) From 5341ad896245c40a00b6faead1b90d01aac58f8c Mon Sep 17 00:00:00 2001 From: Hamid Date: Wed, 9 Feb 2022 14:05:02 -0800 Subject: [PATCH 088/109] use root locale when converting string case (#33028) Summary: Not setting locale for language/country neutral operation may cause bug depending on the default locale. See https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#ROOT Note: I am just searching for toLowerCase() and toUppercase() in my project's dependencies and send the same PR, in order to just be considered. Although I've seen the lack of explicit locale has caused issues for us, I am not sure if react-native is actually affected. I haven't checked for `String.format()` yet. Example related issue: joltup/rn-fetch-blob#573 ## Changelog [Android] [Fixed] - Use root locale when converting string case. Pull Request resolved: https://github.com/facebook/react-native/pull/33028 Reviewed By: ShikaSD Differential Revision: D33943446 Pulled By: cortinico fbshipit-source-id: d5be9392ea7c21a33436acac5b5e8c50b7c7e31e --- .../com/facebook/react/devsupport/DevSupportManagerBase.java | 2 +- .../com/facebook/react/modules/network/NetworkingModule.java | 5 ++++- .../react/views/imagehelper/ResourceDrawableIdHelper.java | 3 ++- .../react/views/textinput/ReactTextInputManager.java | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index 78b90baddd..ab96ecfdfd 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -198,7 +198,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager { final String bundleFile = subclassTag + "ReactNativeDevBundle.js"; mJSBundleDownloadedFile = new File(applicationContext.getFilesDir(), bundleFile); - final String splitBundlesDir = subclassTag.toLowerCase() + "_dev_js_split_bundles"; + final String splitBundlesDir = subclassTag.toLowerCase(Locale.ROOT) + "_dev_js_split_bundles"; mJSSplitBundlesDir = mApplicationContext.getDir(splitBundlesDir, Context.MODE_PRIVATE); mDefaultNativeModuleCallExceptionHandler = new DefaultNativeModuleCallExceptionHandler(); diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java index 55cfb20215..f80b1c6561 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java @@ -30,6 +30,7 @@ import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashSet; import java.util.List; +import java.util.Locale; import java.util.Set; import java.util.concurrent.TimeUnit; import okhttp3.Call; @@ -376,7 +377,9 @@ public final class NetworkingModule extends NativeNetworkingAndroidSpec { } RequestBody requestBody; - if (data == null || method.toLowerCase().equals("get") || method.toLowerCase().equals("head")) { + if (data == null + || method.toLowerCase(Locale.ROOT).equals("get") + || method.toLowerCase(Locale.ROOT).equals("head")) { requestBody = RequestBodyUtil.getEmptyBody(method); } else if (handler != null) { requestBody = handler.toRequestBody(data, contentType); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.java b/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.java index 804e9d7b02..8053ece767 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.java @@ -12,6 +12,7 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import androidx.annotation.Nullable; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import javax.annotation.concurrent.ThreadSafe; @@ -47,7 +48,7 @@ public class ResourceDrawableIdHelper { if (name == null || name.isEmpty()) { return 0; } - name = name.toLowerCase().replace("-", "_"); + name = name.toLowerCase(Locale.ROOT).replace("-", "_"); // name could be a resource id. try { diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index df6cc09407..99ae31e7d5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -75,6 +75,7 @@ import com.facebook.yoga.YogaConstants; import java.lang.reflect.Field; import java.util.HashMap; import java.util.LinkedList; +import java.util.Locale; import java.util.Map; /** Manages instances of TextInput. */ @@ -569,7 +570,7 @@ public class ReactTextInputManager extends BaseViewManager Date: Wed, 9 Feb 2022 15:13:42 -0800 Subject: [PATCH 089/109] Add RedBoxSurfaceDelegate to DevSupportManagerBase to abstract surface logic to show RedBox Summary: This diff adds `RedBoxSurfaceDelegate` to replace existing logic in `DevSupportManagerBase` to abstract how we show/hide the RedBox surface. The delegate will wrap a RedBoxDialog instance, which is used to show/hide the dialog for default behavior (when there is no surface delegate for redbox got provided). I also updated the interface for delegate to accomodate new use cases: - Add `isShowing` for the `SurfaceDelegate` - Add a list of getters for `DevSupportManager` for data access in the delegate - (Update 2/7) Separate Dialog from `RedBoxDialog`, and re-named it to `RedBoxContentView`. This is to make it clear that the delegate is responsible to provide actual surface implementation (Dialog). The content view is meant to be shared. Changelog: [Android][Internal] Reviewed By: javache Differential Revision: D33987835 fbshipit-source-id: 57c20648e7f2ec8238963feca27ccd5518e7931d --- .../react/common/SurfaceDelegate.java | 3 + .../devsupport/DevSupportManagerBase.java | 87 ++++++------- .../devsupport/DisabledDevSupportManager.java | 17 +++ .../devsupport/DoubleTapReloadRecognizer.java | 2 +- .../LogBoxDialogSurfaceDelegate.java | 9 +- ...dBoxDialog.java => RedBoxContentView.java} | 104 +++++++--------- .../RedBoxDialogSurfaceDelegate.java | 117 ++++++++++++++++++ .../interfaces/DevSupportManager.java | 7 ++ 8 files changed, 232 insertions(+), 114 deletions(-) rename ReactAndroid/src/main/java/com/facebook/react/devsupport/{RedBoxDialog.java => RedBoxContentView.java} (80%) create mode 100644 ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java diff --git a/ReactAndroid/src/main/java/com/facebook/react/common/SurfaceDelegate.java b/ReactAndroid/src/main/java/com/facebook/react/common/SurfaceDelegate.java index 821de3f3a3..a6ba792926 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/common/SurfaceDelegate.java +++ b/ReactAndroid/src/main/java/com/facebook/react/common/SurfaceDelegate.java @@ -37,4 +37,7 @@ public interface SurfaceDelegate { /** Hide the surface containing the React content view */ void hide(); + + /** Check if the surface is currently showing */ + boolean isShowing(); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index ab96ecfdfd..7b1ba63c52 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -97,7 +97,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager { private final DefaultNativeModuleCallExceptionHandler mDefaultNativeModuleCallExceptionHandler; private final DevLoadingViewController mDevLoadingViewController; - private @Nullable RedBoxDialog mRedBoxDialog; + private @Nullable SurfaceDelegate mRedBoxSurfaceDelegate; private @Nullable AlertDialog mDevOptionsDialog; private @Nullable DebugOverlayController mDebugOverlayController; private boolean mDevLoadingViewVisible = false; @@ -273,7 +273,8 @@ public abstract class DevSupportManagerBase implements DevSupportManager { mErrorCustomizers.add(errorCustomizer); } - private Pair processErrorCustomizers(Pair errorInfo) { + @Override + public Pair processErrorCustomizers(Pair errorInfo) { if (mErrorCustomizers == null) { return errorInfo; } else { @@ -297,33 +298,25 @@ public abstract class DevSupportManagerBase implements DevSupportManager { // Since we only show the first JS error in a succession of JS errors, make sure we only // update the error message for that error message. This assumes that updateJSError // belongs to the most recent showNewJSError - if (mRedBoxDialog == null - || !mRedBoxDialog.isShowing() - || errorCookie != mLastErrorCookie) { + if (!mRedBoxSurfaceDelegate.isShowing() || errorCookie != mLastErrorCookie) { return; } - StackFrame[] stack = StackTraceHelper.convertJsStackTrace(details); - Pair errorInfo = - processErrorCustomizers(Pair.create(message, stack)); - mRedBoxDialog.setExceptionDetails(errorInfo.first, errorInfo.second); - updateLastErrorInfo(message, stack, errorCookie, ErrorType.JS); - // JS errors are reported here after source mapping. - if (mRedBoxHandler != null) { - mRedBoxHandler.handleRedbox(message, stack, ErrorType.JS); - mRedBoxDialog.resetReporting(); - } - mRedBoxDialog.show(); + + // The RedBox surface delegate will always show the latest error + updateLastErrorInfo( + message, StackTraceHelper.convertJsStackTrace(details), errorCookie, ErrorType.JS); + mRedBoxSurfaceDelegate.show(); } }); } @Override public void hideRedboxDialog() { - // dismiss redbox if exists - if (mRedBoxDialog != null) { - mRedBoxDialog.dismiss(); - mRedBoxDialog = null; + if (mRedBoxSurfaceDelegate == null) { + return; } + + mRedBoxSurfaceDelegate.hide(); } public @Nullable View createRootView(String appKey) { @@ -350,41 +343,27 @@ public abstract class DevSupportManagerBase implements DevSupportManager { new Runnable() { @Override public void run() { - Activity context = mReactInstanceDevHelper.getCurrentActivity(); - if (context != null && !context.isFinishing() && currentActivity != context) { - currentActivity = context; - // Create a new RedBox when currentActivity get updated - mRedBoxDialog = - new RedBoxDialog(currentActivity, DevSupportManagerBase.this, mRedBoxHandler); + if (mRedBoxSurfaceDelegate == null) { + @Nullable SurfaceDelegate redBoxSurfaceDelegate = createSurfaceDelegate("RedBox"); + if (redBoxSurfaceDelegate != null) { + mRedBoxSurfaceDelegate = redBoxSurfaceDelegate; + } else { + mRedBoxSurfaceDelegate = + new RedBoxDialogSurfaceDelegate(DevSupportManagerBase.this); + } + + mRedBoxSurfaceDelegate.createContentView("RedBox"); } - if (currentActivity == null || currentActivity.isFinishing()) { - FLog.e( - ReactConstants.TAG, - "Unable to launch redbox because react activity " - + "is not available, here is the error that redbox would've displayed: " - + message); - return; - } - if (mRedBoxDialog == null) { - mRedBoxDialog = - new RedBoxDialog(currentActivity, DevSupportManagerBase.this, mRedBoxHandler); - } - if (mRedBoxDialog.isShowing()) { + + if (mRedBoxSurfaceDelegate.isShowing()) { // Sometimes errors cause multiple errors to be thrown in JS in quick succession. Only // show the first and most actionable one. return; } - Pair errorInfo = - processErrorCustomizers(Pair.create(message, stack)); - mRedBoxDialog.setExceptionDetails(errorInfo.first, errorInfo.second); + + // The RedBox surface delegate will always show the latest error updateLastErrorInfo(message, stack, errorCookie, errorType); - // Only report native errors here. JS errors are reported - // inside {@link #updateJSError} after source mapping. - if (mRedBoxHandler != null && errorType == ErrorType.NATIVE) { - mRedBoxHandler.handleRedbox(message, stack, ErrorType.NATIVE); - } - mRedBoxDialog.resetReporting(); - mRedBoxDialog.show(); + mRedBoxSurfaceDelegate.show(); } }); } @@ -623,6 +602,11 @@ public abstract class DevSupportManagerBase implements DevSupportManager { return mDevSettings; } + @Override + public RedBoxHandler getRedBoxHandler() { + return mRedBoxHandler; + } + @Override public void onNewReactContextCreated(ReactContext reactContext) { resetCurrentContext(reactContext); @@ -888,6 +872,11 @@ public abstract class DevSupportManagerBase implements DevSupportManager { return mLastErrorStack; } + @Override + public int getLastErrorCookie() { + return mLastErrorCookie; + } + @Override public @Nullable ErrorType getLastErrorType() { return mLastErrorType; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java index c198ac1610..f44cdeb332 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DisabledDevSupportManager.java @@ -8,6 +8,7 @@ package com.facebook.react.devsupport; import android.app.Activity; +import android.util.Pair; import android.view.View; import androidx.annotation.Nullable; import com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler; @@ -21,6 +22,7 @@ import com.facebook.react.devsupport.interfaces.DevSupportManager; import com.facebook.react.devsupport.interfaces.ErrorCustomizer; import com.facebook.react.devsupport.interfaces.ErrorType; import com.facebook.react.devsupport.interfaces.PackagerStatusCallback; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.devsupport.interfaces.StackFrame; import com.facebook.react.modules.debug.interfaces.DeveloperSettings; import java.io.File; @@ -94,6 +96,11 @@ public class DisabledDevSupportManager implements DevSupportManager { return null; } + @Override + public RedBoxHandler getRedBoxHandler() { + return null; + } + @Override public void onNewReactContextCreated(ReactContext reactContext) {} @@ -166,9 +173,19 @@ public class DisabledDevSupportManager implements DevSupportManager { return null; } + @Override + public int getLastErrorCookie() { + return 0; + } + @Override public void registerErrorCustomizer(ErrorCustomizer errorCustomizer) {} + @Override + public Pair processErrorCustomizers(Pair errorInfo) { + return errorInfo; + } + @Override public void setPackagerLocationCustomizer( DevSupportManager.PackagerLocationCustomizer packagerLocationCustomizer) {} diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.java index b178267dd0..c54335e972 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DoubleTapReloadRecognizer.java @@ -14,7 +14,7 @@ import android.widget.EditText; /** * A class allows recognizing double key tap of "R", used to reload JS in {@link - * AbstractReactActivity}, {@link RedBoxDialog} and {@link ReactActivity}. + * AbstractReactActivity}, {@link RedBoxDialogSurfaceDelegate} and {@link ReactActivity}. */ public class DoubleTapReloadRecognizer { private boolean mDoRefresh = false; diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.java index c9668d29f8..ed465a1838 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.java @@ -55,7 +55,7 @@ public class LogBoxDialogSurfaceDelegate implements SurfaceDelegate { @Override public void show() { - if (isSurfaceVisible() || !isContentViewReady()) { + if (isShowing() || !isContentViewReady()) { return; } @@ -74,7 +74,7 @@ public class LogBoxDialogSurfaceDelegate implements SurfaceDelegate { @Override public void hide() { - if (!isSurfaceVisible()) { + if (!isShowing()) { return; } @@ -86,7 +86,8 @@ public class LogBoxDialogSurfaceDelegate implements SurfaceDelegate { mDialog = null; } - private boolean isSurfaceVisible() { - return mDialog != null; + @Override + public boolean isShowing() { + return mDialog != null && mDialog.isShowing(); } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java similarity index 80% rename from ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java rename to ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java index b4827f6bb2..2232a2bd0b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialog.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxContentView.java @@ -7,21 +7,20 @@ package com.facebook.react.devsupport; -import android.app.Dialog; import android.content.Context; import android.graphics.Color; import android.net.Uri; import android.os.AsyncTask; import android.text.SpannedString; import android.text.method.LinkMovementMethod; -import android.view.KeyEvent; +import android.util.Pair; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.view.Window; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.Button; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; @@ -32,6 +31,7 @@ import com.facebook.react.R; import com.facebook.react.common.MapBuilder; import com.facebook.react.common.ReactConstants; import com.facebook.react.devsupport.interfaces.DevSupportManager; +import com.facebook.react.devsupport.interfaces.ErrorType; import com.facebook.react.devsupport.interfaces.RedBoxHandler; import com.facebook.react.devsupport.interfaces.RedBoxHandler.ReportCompletedListener; import com.facebook.react.devsupport.interfaces.StackFrame; @@ -42,15 +42,10 @@ import okhttp3.RequestBody; import org.json.JSONObject; /** Dialog for displaying JS errors in an eye-catching form (red box). */ -/* package */ class RedBoxDialog implements AdapterView.OnItemClickListener { +public class RedBoxContentView extends LinearLayout implements AdapterView.OnItemClickListener { - private final DevSupportManager mDevSupportManager; - private final DoubleTapReloadRecognizer mDoubleTapReloadRecognizer; - private final @Nullable RedBoxHandler mRedBoxHandler; - private final View mContentView; - private final Context mContext; - - private @Nullable Dialog mDialog; + private @Nullable RedBoxHandler mRedBoxHandler; + private DevSupportManager mDevSupportManager; private ListView mStackView; private Button mReloadJsButton; private Button mDismissButton; @@ -239,42 +234,50 @@ import org.json.JSONObject; } } - protected RedBoxDialog( - Context context, DevSupportManager devSupportManager, @Nullable RedBoxHandler redBoxHandler) { - mContext = context; - mContentView = (View) LayoutInflater.from(context).inflate(R.layout.redbox_view, null); + public RedBoxContentView(Context context) { + super(context); + } + public RedBoxContentView setDevSupportManager(DevSupportManager devSupportManager) { mDevSupportManager = devSupportManager; - mDoubleTapReloadRecognizer = new DoubleTapReloadRecognizer(); - mRedBoxHandler = redBoxHandler; + return this; + } - mStackView = (ListView) mContentView.findViewById(R.id.rn_redbox_stack); + public RedBoxContentView setRedBoxHandler(@Nullable RedBoxHandler redBoxHandler) { + mRedBoxHandler = redBoxHandler; + return this; + } + + public void init() { + LayoutInflater.from(getContext()).inflate(R.layout.redbox_view, this); + + mStackView = (ListView) findViewById(R.id.rn_redbox_stack); mStackView.setOnItemClickListener(this); - mReloadJsButton = (Button) mContentView.findViewById(R.id.rn_redbox_reload_button); + mReloadJsButton = (Button) findViewById(R.id.rn_redbox_reload_button); mReloadJsButton.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { - mDevSupportManager.handleReloadJS(); + Assertions.assertNotNull(mDevSupportManager).handleReloadJS(); } }); - mDismissButton = (Button) mContentView.findViewById(R.id.rn_redbox_dismiss_button); + mDismissButton = (Button) findViewById(R.id.rn_redbox_dismiss_button); mDismissButton.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { - dismiss(); + Assertions.assertNotNull(mDevSupportManager).hideRedboxDialog(); } }); if (mRedBoxHandler != null && mRedBoxHandler.isReportEnabled()) { - mLoadingIndicator = (ProgressBar) mContentView.findViewById(R.id.rn_redbox_loading_indicator); - mLineSeparator = (View) mContentView.findViewById(R.id.rn_redbox_line_separator); - mReportTextView = (TextView) mContentView.findViewById(R.id.rn_redbox_report_label); + mLoadingIndicator = (ProgressBar) findViewById(R.id.rn_redbox_loading_indicator); + mLineSeparator = (View) findViewById(R.id.rn_redbox_line_separator); + mReportTextView = (TextView) findViewById(R.id.rn_redbox_report_label); mReportTextView.setMovementMethod(LinkMovementMethod.getInstance()); mReportTextView.setHighlightColor(Color.TRANSPARENT); - mReportButton = (Button) mContentView.findViewById(R.id.rn_redbox_report_button); + mReportButton = (Button) findViewById(R.id.rn_redbox_report_button); mReportButton.setOnClickListener(mReportButtonOnClickListener); } } @@ -298,44 +301,25 @@ import org.json.JSONObject; @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - new OpenStackFrameTask(mDevSupportManager) + new OpenStackFrameTask(Assertions.assertNotNull(mDevSupportManager)) .executeOnExecutor( AsyncTask.THREAD_POOL_EXECUTOR, (StackFrame) mStackView.getAdapter().getItem(position)); } - public boolean onKeyUp(int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_MENU) { - mDevSupportManager.showDevOptionsDialog(); - return true; + /** Refresh the content view with latest errors from dev support manager */ + public void refreshContentView() { + @Nullable String message = mDevSupportManager.getLastErrorTitle(); + @Nullable StackFrame[] stack = mDevSupportManager.getLastErrorStack(); + @Nullable ErrorType errorType = mDevSupportManager.getLastErrorType(); + Pair errorInfo = + mDevSupportManager.processErrorCustomizers(Pair.create(message, stack)); + setExceptionDetails(errorInfo.first, errorInfo.second); + + // JS errors are reported here after source mapping. + RedBoxHandler redBoxHandler = mDevSupportManager.getRedBoxHandler(); + if (redBoxHandler != null) { + redBoxHandler.handleRedbox(message, stack, errorType); + resetReporting(); } - if (mDoubleTapReloadRecognizer.didDoubleTapR(keyCode, mDialog.getCurrentFocus())) { - mDevSupportManager.handleReloadJS(); - } - return mDialog.onKeyUp(keyCode, event); - } - - public Context getContext() { - return mContext; - } - - public View getContentView() { - return mContentView; - } - - public boolean isShowing() { - return mDialog.isShowing(); - } - - public void show() { - if (mDialog == null) { - mDialog = new Dialog(mContext, R.style.Theme_Catalyst_RedBox); - mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); - } - mDialog.setContentView(mContentView); - mDialog.show(); - } - - public void dismiss() { - mDialog.dismiss(); } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java new file mode 100644 index 0000000000..97ef306afa --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.devsupport; + +import android.app.Activity; +import android.app.Dialog; +import android.view.KeyEvent; +import android.view.Window; +import androidx.annotation.Nullable; +import com.facebook.common.logging.FLog; +import com.facebook.react.R; +import com.facebook.react.common.ReactConstants; +import com.facebook.react.common.SurfaceDelegate; +import com.facebook.react.devsupport.interfaces.DevSupportManager; +import com.facebook.react.devsupport.interfaces.RedBoxHandler; + +/** + * The implementation of SurfaceDelegate with {@link Activity}. This is the default SurfaceDelegate + * for Mobile. + */ +public class RedBoxDialogSurfaceDelegate implements SurfaceDelegate { + + private final DoubleTapReloadRecognizer mDoubleTapReloadRecognizer; + private final DevSupportManager mDevSupportManager; + + private @Nullable Dialog mDialog; + private @Nullable RedBoxContentView mRedBoxContentView; + + public RedBoxDialogSurfaceDelegate(DevSupportManager devSupportManager) { + mDevSupportManager = devSupportManager; + mDoubleTapReloadRecognizer = new DoubleTapReloadRecognizer(); + } + + @Override + public void createContentView(String appKey) { + // The content view is created in android instead of using react app. Hence the appKey is not + // used here. + RedBoxHandler redBoxHandler = mDevSupportManager.getRedBoxHandler(); + Activity context = mDevSupportManager.getCurrentActivity(); + // Create a new RedBox when currentActivity get updated + mRedBoxContentView = new RedBoxContentView(context); + mRedBoxContentView + .setDevSupportManager(mDevSupportManager) + .setRedBoxHandler(redBoxHandler) + .init(); + } + + @Override + public boolean isContentViewReady() { + return mRedBoxContentView != null; + } + + @Override + public void destroyContentView() { + mRedBoxContentView = null; + } + + @Override + public void show() { + @Nullable String message = mDevSupportManager.getLastErrorTitle(); + Activity context = mDevSupportManager.getCurrentActivity(); + if (context == null || context.isFinishing()) { + FLog.e( + ReactConstants.TAG, + "Unable to launch redbox because react activity " + + "is not available, here is the error that redbox would've displayed: " + + (message != null ? message : "N/A")); + return; + } + + if (mRedBoxContentView == null || mRedBoxContentView.getContext() != context) { + // Create a new RedBox when currentActivity get updated + createContentView("RedBox"); + } + + mRedBoxContentView.refreshContentView(); + if (mDialog == null) { + mDialog = + new Dialog(context, R.style.Theme_Catalyst_RedBox) { + @Override + public boolean onKeyUp(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_MENU) { + mDevSupportManager.showDevOptionsDialog(); + return true; + } + if (mDoubleTapReloadRecognizer.didDoubleTapR(keyCode, getCurrentFocus())) { + mDevSupportManager.handleReloadJS(); + } + return super.onKeyUp(keyCode, event); + } + }; + mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + mDialog.setContentView(mRedBoxContentView); + } + mDialog.show(); + } + + @Override + public void hide() { + // dismiss redbox if exists + if (mDialog != null) { + mDialog.dismiss(); + destroyContentView(); + mDialog = null; + } + } + + @Override + public boolean isShowing() { + return mDialog != null && mDialog.isShowing(); + } +} diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java index f830561f67..40079b1e55 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/DevSupportManager.java @@ -8,6 +8,7 @@ package com.facebook.react.devsupport.interfaces; import android.app.Activity; +import android.util.Pair; import android.view.View; import androidx.annotation.Nullable; import com.facebook.react.bridge.NativeModuleCallExceptionHandler; @@ -51,6 +52,8 @@ public interface DevSupportManager extends NativeModuleCallExceptionHandler { DeveloperSettings getDevSettings(); + RedBoxHandler getRedBoxHandler(); + void onNewReactContextCreated(ReactContext reactContext); void onReactInstanceDestroyed(ReactContext reactContext); @@ -97,8 +100,12 @@ public interface DevSupportManager extends NativeModuleCallExceptionHandler { @Nullable ErrorType getLastErrorType(); + int getLastErrorCookie(); + void registerErrorCustomizer(ErrorCustomizer errorCustomizer); + Pair processErrorCustomizers(Pair errorInfo); + /** * The PackagerLocationCustomizer allows you to have a dynamic packager location that is * determined right before loading the packager. Your customizer must call |callback|, as loading From f7e7e89335979cd3a1813bcf3b81c3fb8d127780 Mon Sep 17 00:00:00 2001 From: Ian Childs Date: Wed, 9 Feb 2022 16:20:19 -0800 Subject: [PATCH 090/109] provided_dep does not need to be a dep too Differential Revision: D34108108 fbshipit-source-id: b31d2e87c8dcbe5a9b2ad9d74c54958cf1571026 --- ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK | 1 - 1 file changed, 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK index 9979f6dfdd..4e8f3143ce 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK @@ -76,7 +76,6 @@ rn_android_library( deps = [ react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), - react_native_dep("third-party/android/androidx:annotation"), react_native_dep("third-party/java/jsr-305:jsr-305"), react_native_target("java/com/facebook/react/bridge:bridge"), react_native_target("java/com/facebook/react/common:common"), From 1a83dc36ce0af33ac7a3c311354fce4bfa5ba1a3 Mon Sep 17 00:00:00 2001 From: Minsik Kim Date: Wed, 9 Feb 2022 22:05:22 -0800 Subject: [PATCH 091/109] Fix a broken input for the Korean alphabet in TextInput (#32523) Summary: Fix https://github.com/facebook/react-native/issues/32503 Updating the attributed text in TextView/TextField while inputting Korean language will break input mechanism of the Korean alphabet. This results unexpected text input. This PR supersedes the previous fixes: https://github.com/facebook/react-native/issues/19809, https://github.com/facebook/react-native/issues/22546 ## Changelog [iOS] [Fixed] - Fix a broken input for the Korean alphabet in TextInput Pull Request resolved: https://github.com/facebook/react-native/pull/32523 Test Plan: https://user-images.githubusercontent.com/20317121/140013434-1674c391-54d6-4410-b4c1-c633697e639d.mov Reviewed By: lunaleaps, sammy-SC Differential Revision: D32470543 Pulled By: philIip fbshipit-source-id: e7e34bd362fa2ab2ca579103db01ad8d1a891c35 --- .../Text/TextInput/Multiline/RCTUITextView.m | 30 +------------------ .../Text/TextInput/RCTBaseTextInputView.m | 2 ++ .../TextInput/RCTTextInputComponentView.mm | 6 ++-- 3 files changed, 7 insertions(+), 31 deletions(-) diff --git a/Libraries/Text/TextInput/Multiline/RCTUITextView.m b/Libraries/Text/TextInput/Multiline/RCTUITextView.m index f4025965a7..92371bc8bf 100644 --- a/Libraries/Text/TextInput/Multiline/RCTUITextView.m +++ b/Libraries/Text/TextInput/Multiline/RCTUITextView.m @@ -147,21 +147,7 @@ static UIColor *defaultPlaceholderColor() - (void)setAttributedText:(NSAttributedString *)attributedText { - // Using `setAttributedString:` while user is typing breaks some internal mechanics - // when entering complex input languages such as Chinese, Korean or Japanese. - // see: https://github.com/facebook/react-native/issues/19339 - - // We try to avoid calling this method as much as we can. - // If the text has changed, there is nothing we can do. - if (![super.attributedText.string isEqualToString:attributedText.string]) { - [super setAttributedText:attributedText]; - } else { - // But if the text is preserved, we just copying the attributes from the source string. - if (![super.attributedText isEqualToAttributedString:attributedText]) { - [self copyTextAttributesFrom:attributedText]; - } - } - + [super setAttributedText:attributedText]; [self textDidChange]; } @@ -311,18 +297,4 @@ static UIColor *defaultPlaceholderColor() #pragma mark - Utility Methods -- (void)copyTextAttributesFrom:(NSAttributedString *)sourceString -{ - [self.textStorage beginEditing]; - - NSTextStorage *textStorage = self.textStorage; - [sourceString enumerateAttributesInRange:NSMakeRange(0, sourceString.length) - options:NSAttributedStringEnumerationReverse - usingBlock:^(NSDictionary * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) { - [textStorage setAttributes:attrs range:range]; - }]; - - [self.textStorage endEditing]; -} - @end diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index c553fbd19b..a4924923f1 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -104,6 +104,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) // Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the // text that we should disregard. See https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc // for more info. + // Also, updating the attributed text while inputting Korean language will break input mechanism. // If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in NSOriginalFont. // Lastly, when entering a password, etc., there will be additional styling on the field as the native text view // handles showing the last character for a split second. @@ -116,6 +117,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) BOOL shouldFallbackToBareTextComparison = [self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] || + [self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] || self.backedTextInputView.markedTextRange || self.backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem; diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index faa9432822..1c3b916163 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -617,8 +617,9 @@ using namespace facebook::react; // the settings on a dictation. // Similarly, when the user is in the middle of inputting some text in Japanese/Chinese, there will be styling on the // text that we should disregard. See - // https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info. If - // the user added an emoji, the system adds a font attribute for the emoji and stores the original font in + // https://developer.apple.com/documentation/uikit/uitextinput/1614489-markedtextrange?language=objc for more info. + // Also, updating the attributed text while inputting Korean language will break input mechanism. + // If the user added an emoji, the system adds a font attribute for the emoji and stores the original font in // NSOriginalFont. Lastly, when entering a password, etc., there will be additional styling on the field as the native // text view handles showing the last character for a split second. __block BOOL fontHasBeenUpdatedBySystem = false; @@ -633,6 +634,7 @@ using namespace facebook::react; BOOL shouldFallbackToBareTextComparison = [_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] || + [_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] || _backedTextInputView.markedTextRange || _backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem; if (shouldFallbackToBareTextComparison) { From 159eb0bdf4aec6f0fd3d66e372b9c13312aff6ef Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 10 Feb 2022 04:55:48 -0800 Subject: [PATCH 092/109] Normalize platform colors early Summary: Changelog: [Internal] Fixes `normalizeColor` to always return the normalized color. Previously, when normalization was delegated to `normalizeColorObject`, we would return the *original* color object, which is a bug. Reviewed By: javache Differential Revision: D34048595 fbshipit-source-id: 083cbe36be2311ea9cffe8ef61e6a986840aec71 --- .../StyleSheet/__tests__/normalizeColor-test.js | 15 ++++++++++----- Libraries/StyleSheet/normalizeColor.js | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Libraries/StyleSheet/__tests__/normalizeColor-test.js b/Libraries/StyleSheet/__tests__/normalizeColor-test.js index f102511f87..244fff9c38 100644 --- a/Libraries/StyleSheet/__tests__/normalizeColor-test.js +++ b/Libraries/StyleSheet/__tests__/normalizeColor-test.js @@ -37,7 +37,12 @@ describe('iOS', () => { it('should normalize iOS Dynamic colors with named colors', () => { const color = DynamicColorIOS({light: 'black', dark: 'white'}); const normalizedColor = normalizeColor(color); - const expectedColor = {dynamic: {light: 'black', dark: 'white'}}; + const expectedColor = { + dynamic: { + light: normalizeColor('black'), + dark: normalizeColor('white'), + }, + }; expect(normalizedColor).toEqual(expectedColor); }); @@ -51,10 +56,10 @@ describe('iOS', () => { const normalizedColor = normalizeColor(color); const expectedColor = { dynamic: { - light: 'black', - dark: 'white', - highContrastLight: 'red', - highContrastDark: 'blue', + light: normalizeColor('black'), + dark: normalizeColor('white'), + highContrastLight: normalizeColor('red'), + highContrastDark: normalizeColor('blue'), }, }; expect(normalizedColor).toEqual(expectedColor); diff --git a/Libraries/StyleSheet/normalizeColor.js b/Libraries/StyleSheet/normalizeColor.js index 386e41c434..46df7d988c 100755 --- a/Libraries/StyleSheet/normalizeColor.js +++ b/Libraries/StyleSheet/normalizeColor.js @@ -22,7 +22,7 @@ function normalizeColor( const {normalizeColorObject} = require('./PlatformColorValueTypes'); const normalizedColor = normalizeColorObject(color); if (normalizedColor != null) { - return color; + return normalizedColor; } } From b467094f18d9659619bd65774f22fddc17b6dd03 Mon Sep 17 00:00:00 2001 From: John Porto Date: Thu, 10 Feb 2022 04:57:09 -0800 Subject: [PATCH 093/109] Add StringPrimitive::create for UTF8 strings Summary: This is pre-work for adding the v8 stack trace API support. Changelog: [Internal] Reviewed By: kodafb Differential Revision: D34048366 fbshipit-source-id: 9d2b469767f7669cb428c61b215f193894892c03 --- ReactCommon/jsi/jsi/jsi.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ReactCommon/jsi/jsi/jsi.h b/ReactCommon/jsi/jsi/jsi.h index 852577ab89..55b9e48c43 100644 --- a/ReactCommon/jsi/jsi/jsi.h +++ b/ReactCommon/jsi/jsi/jsi.h @@ -406,6 +406,7 @@ class JSI_EXPORT PropNameID : public Pointer { } /// Create a PropNameID from utf8 values. The data is copied. + /// Results are undefined if \p utf8 contains invalid code points. static PropNameID forUtf8(Runtime& runtime, const uint8_t* utf8, size_t length) { return runtime.createPropNameIDFromUtf8(utf8, length); @@ -413,6 +414,7 @@ class JSI_EXPORT PropNameID : public Pointer { /// Create a PropNameID from utf8-encoded octets stored in a /// std::string. The string data is transformed and copied. + /// Results are undefined if \p utf8 contains invalid code points. static PropNameID forUtf8(Runtime& runtime, const std::string& utf8) { return runtime.createPropNameIDFromUtf8( reinterpret_cast(utf8.data()), utf8.size()); @@ -502,14 +504,16 @@ class JSI_EXPORT String : public Pointer { } /// Create a JS string from utf8-encoded octets. The string data is - /// transformed and copied. + /// transformed and copied. Results are undefined if \p utf8 contains invalid + /// code points. static String createFromUtf8(Runtime& runtime, const uint8_t* utf8, size_t length) { return runtime.createStringFromUtf8(utf8, length); } /// Create a JS string from utf8-encoded octets stored in a - /// std::string. The string data is transformed and copied. + /// std::string. The string data is transformed and copied. Results are + /// undefined if \p utf8 contains invalid code points. static String createFromUtf8(Runtime& runtime, const std::string& utf8) { return runtime.createStringFromUtf8( reinterpret_cast(utf8.data()), utf8.length()); From 9ed2df628ddd410cc3383e68b0386471432445c0 Mon Sep 17 00:00:00 2001 From: Kuba Holuj Date: Thu, 10 Feb 2022 05:26:41 -0800 Subject: [PATCH 094/109] Fix StatusBar on Android API 30 (#33058) Summary: In https://github.com/facebook/react-native/issues/32975 I implemented the new `insetsController#setSystemBarsAppearance` interface, but I found that on Android 11 (API 30) it doesn't appear to work which I missed in earlier testing. It works correctly on Android 12 and the deprecated `systemUiVisibility` interface still works fine on Android 11, so I'm having Android 11 use the deprecated mechanism. ## Changelog [Android] [Fixed] - Fix StatusBar on Android API 30 Pull Request resolved: https://github.com/facebook/react-native/pull/33058 Test Plan: Tested in `rn-tester` on simulators using Android 9, 10, 11, 12, and on an Android 9 device. Reviewed By: lunaleaps Differential Revision: D34050025 Pulled By: ShikaSD fbshipit-source-id: ad80fae1446aca368b09df810785a1cc38383450 --- .../com/facebook/react/modules/statusbar/StatusBarModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java index a3beef47e7..8765a23ca4 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.java @@ -190,7 +190,7 @@ public class StatusBarModule extends NativeStatusBarManagerAndroidSpec { @TargetApi(Build.VERSION_CODES.R) @Override public void run() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) { WindowInsetsController insetsController = activity.getWindow().getInsetsController(); if ("dark-content".equals(style)) { // dark-content means dark icons on a light status bar From 980c52de41258f6cf2d2360144ea7ca16a19c9f8 Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Thu, 10 Feb 2022 06:05:21 -0800 Subject: [PATCH 095/109] Disable view flattening when the view has event handlers on Android Summary: The views with touch event props are currently flattened by Fabric core, as we don't take event listeners into account when calculating whether the view should be flattened. This results in a confusing situation when components with touch event listeners (e.g. ` {}} /> `) or ones using `PanResponder` are either ignored (iOS) or cause a crash (Android). This change passes touch event props to C++ layer and uses them to calculate whether the view node should be flattened or not. It also refactors events to be kept as a singular bitset with 32 bit (~`uint32_t`). Changelog: [Changed][General] Avoid flattening nodes with event props Reviewed By: sammy-SC Differential Revision: D34005536 fbshipit-source-id: 96255b389a7bfff4aa208a96fd0c173d9edf1512 --- .../NativeComponent/PlatformBaseViewConfig.js | 55 ++++++- React/Views/RCTViewManager.m | 25 ++++ .../react/uimanager/BaseViewManager.java | 97 ++++++++++++- .../react/uimanager/LayoutShadowNode.java | 6 +- .../uimanager/UIManagerModuleConstants.java | 6 +- .../renderer/components/view/ViewProps.cpp | 19 +-- .../renderer/components/view/ViewProps.h | 6 +- .../components/view/ViewShadowNode.cpp | 4 +- .../renderer/components/view/primitives.h | 41 ++++++ .../components/view/propsConversions.h | 136 ++++++++++++++++++ 10 files changed, 352 insertions(+), 43 deletions(-) diff --git a/Libraries/NativeComponent/PlatformBaseViewConfig.js b/Libraries/NativeComponent/PlatformBaseViewConfig.js index 1487637b03..c3454a3eec 100644 --- a/Libraries/NativeComponent/PlatformBaseViewConfig.js +++ b/Libraries/NativeComponent/PlatformBaseViewConfig.js @@ -38,13 +38,13 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = registrationName: 'onAccessibilityAction', }, topPointerEnter: { - registrationName: 'pointerenter', + registrationName: 'onPointerEnter', }, topPointerLeave: { - registrationName: 'pointerleave', + registrationName: 'onPointerLeave', }, topPointerMove: { - registrationName: 'pointermove', + registrationName: 'onPointerMove', }, onGestureHandlerEvent: DynamicallyInjectedByGestureHandler({ registrationName: 'onGestureHandlerEvent', @@ -219,9 +219,31 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = position: true, onLayout: true, - pointerenter: true, - pointerleave: true, - pointermove: true, + // Pointer events + onPointerEnter: true, + onPointerLeave: true, + onPointerMove: true, + + // PanResponder handlers + onMoveShouldSetResponder: true, + onMoveShouldSetResponderCapture: true, + onStartShouldSetResponder: true, + onStartShouldSetResponderCapture: true, + onResponderGrant: true, + onResponderReject: true, + onResponderStart: true, + onResponderEnd: true, + onResponderRelease: true, + onResponderMove: true, + onResponderTerminate: true, + onResponderTerminationRequest: true, + onShouldBlockNativeResponder: true, + + // Touch events + onTouchStart: true, + onTouchMove: true, + onTouchEnd: true, + onTouchCancel: true, style: ReactNativeStyleAttributes, }, @@ -456,6 +478,27 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = onAccessibilityAction: true, onAccessibilityEscape: true, onAccessibilityTap: true, + + // PanResponder handlers + onMoveShouldSetResponder: true, + onMoveShouldSetResponderCapture: true, + onStartShouldSetResponder: true, + onStartShouldSetResponderCapture: true, + onResponderGrant: true, + onResponderReject: true, + onResponderStart: true, + onResponderEnd: true, + onResponderRelease: true, + onResponderMove: true, + onResponderTerminate: true, + onResponderTerminationRequest: true, + onShouldBlockNativeResponder: true, + + // Touch events + onTouchStart: true, + onTouchMove: true, + onTouchEnd: true, + onTouchCancel: true, }), }, }; diff --git a/React/Views/RCTViewManager.m b/React/Views/RCTViewManager.m index a46158dcee..a18174ea4f 100644 --- a/React/Views/RCTViewManager.m +++ b/React/Views/RCTViewManager.m @@ -418,4 +418,29 @@ RCT_EXPORT_SHADOW_PROPERTY(onLayout, RCTDirectEventBlock) RCT_EXPORT_SHADOW_PROPERTY(direction, YGDirection) +// The events below define the properties that are not used by native directly, but required in the view config for new +// renderer to function. +// They can be deleted after Static View Configs are rolled out. + +// PanResponder handlers +RCT_CUSTOM_VIEW_PROPERTY(onMoveShouldSetResponder, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onMoveShouldSetResponderCapture, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onStartShouldSetResponder, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onStartShouldSetResponderCapture, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderGrant, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderReject, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderStart, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderEnd, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderRelease, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderMove, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderTerminate, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onResponderTerminationRequest, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onShouldBlockNativeResponder, BOOL, RCTView) {} + +// Touch events +RCT_CUSTOM_VIEW_PROPERTY(onTouchStart, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onTouchMove, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onTouchEnd, BOOL, RCTView) {} +RCT_CUSTOM_VIEW_PROPERTY(onTouchCancel, BOOL, RCTView) {} + @end diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java index 3c9c1eae3b..b48b272d9c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java @@ -486,18 +486,103 @@ public abstract class BaseViewManager #include #include +#include #include namespace facebook { @@ -18,6 +19,46 @@ namespace react { enum class PointerEventsMode { Auto, None, BoxNone, BoxOnly }; +struct ViewEvents { + std::bitset<32> bits{}; + + enum class Offset : std::size_t { + // Pointer events + PointerEnter = 0, + PointerMove = 1, + PointerLeave = 2, + + // PanResponder callbacks + MoveShouldSetResponder = 3, + MoveShouldSetResponderCapture = 4, + StartShouldSetResponder = 5, + StartShouldSetResponderCapture = 6, + ResponderGrant = 7, + ResponderReject = 8, + ResponderStart = 9, + ResponderEnd = 10, + ResponderRelease = 11, + ResponderMove = 12, + ResponderTerminate = 13, + ResponderTerminationRequest = 14, + ShouldBlockNativeResponder = 15, + + // Touch events + TouchStart = 16, + TouchMove = 17, + TouchEnd = 18, + TouchCancel = 19, + }; + + constexpr bool operator[](const Offset offset) const { + return bits[static_cast(offset)]; + } + + std::bitset<32>::reference operator[](const Offset offset) { + return bits[static_cast(offset)]; + } +}; + enum class BackfaceVisibility { Auto, Visible, Hidden }; enum class BorderStyle { Solid, Dotted, Dashed }; diff --git a/ReactCommon/react/renderer/components/view/propsConversions.h b/ReactCommon/react/renderer/components/view/propsConversions.h index 6d7233f50c..502b14704b 100644 --- a/ReactCommon/react/renderer/components/view/propsConversions.h +++ b/ReactCommon/react/renderer/components/view/propsConversions.h @@ -463,5 +463,141 @@ static inline CascadedRectangleEdges convertRawProp( return result; } +static inline ViewEvents convertRawProp( + const PropsParserContext &context, + RawProps const &rawProps, + ViewEvents const &sourceValue, + ViewEvents const &defaultValue) { + ViewEvents result{}; + using Offset = ViewEvents::Offset; + + result[Offset::PointerEnter] = convertRawProp( + context, + rawProps, + "onPointerEnter", + sourceValue[Offset::PointerEnter], + defaultValue[Offset::PointerEnter]); + result[Offset::PointerMove] = convertRawProp( + context, + rawProps, + "onPointerMove", + sourceValue[Offset::PointerMove], + defaultValue[Offset::PointerMove]); + result[Offset::PointerLeave] = convertRawProp( + context, + rawProps, + "onPointerLeave", + sourceValue[Offset::PointerLeave], + defaultValue[Offset::PointerLeave]); + + // PanResponder callbacks + result[Offset::MoveShouldSetResponder] = convertRawProp( + context, + rawProps, + "onMoveShouldSetResponder", + sourceValue[Offset::MoveShouldSetResponder], + defaultValue[Offset::MoveShouldSetResponder]); + result[Offset::MoveShouldSetResponderCapture] = convertRawProp( + context, + rawProps, + "onMoveShouldSetResponderCapture", + sourceValue[Offset::MoveShouldSetResponderCapture], + defaultValue[Offset::MoveShouldSetResponderCapture]); + result[Offset::StartShouldSetResponder] = convertRawProp( + context, + rawProps, + "onStartShouldSetResponder", + sourceValue[Offset::StartShouldSetResponder], + defaultValue[Offset::StartShouldSetResponder]); + result[Offset::StartShouldSetResponderCapture] = convertRawProp( + context, + rawProps, + "onStartShouldSetResponderCapture", + sourceValue[Offset::StartShouldSetResponderCapture], + defaultValue[Offset::StartShouldSetResponderCapture]); + result[Offset::ResponderGrant] = convertRawProp( + context, + rawProps, + "onResponderGrant", + sourceValue[Offset::ResponderGrant], + defaultValue[Offset::ResponderGrant]); + result[Offset::ResponderReject] = convertRawProp( + context, + rawProps, + "onResponderReject", + sourceValue[Offset::ResponderReject], + defaultValue[Offset::ResponderReject]); + result[Offset::ResponderStart] = convertRawProp( + context, + rawProps, + "onResponderStart", + sourceValue[Offset::ResponderStart], + defaultValue[Offset::ResponderStart]); + result[Offset::ResponderEnd] = convertRawProp( + context, + rawProps, + "onResponderEnd", + sourceValue[Offset::ResponderEnd], + defaultValue[Offset::ResponderEnd]); + result[Offset::ResponderRelease] = convertRawProp( + context, + rawProps, + "onResponderRelease", + sourceValue[Offset::ResponderRelease], + defaultValue[Offset::ResponderRelease]); + result[Offset::ResponderMove] = convertRawProp( + context, + rawProps, + "onResponderMove", + sourceValue[Offset::ResponderMove], + defaultValue[Offset::ResponderMove]); + result[Offset::ResponderTerminate] = convertRawProp( + context, + rawProps, + "onResponderTerminate", + sourceValue[Offset::ResponderTerminate], + defaultValue[Offset::ResponderTerminate]); + result[Offset::ResponderTerminationRequest] = convertRawProp( + context, + rawProps, + "onResponderTerminationRequest", + sourceValue[Offset::ResponderTerminationRequest], + defaultValue[Offset::ResponderTerminationRequest]); + result[Offset::ShouldBlockNativeResponder] = convertRawProp( + context, + rawProps, + "onShouldBlockNativeResponder", + sourceValue[Offset::ShouldBlockNativeResponder], + defaultValue[Offset::ShouldBlockNativeResponder]); + + // Touch events + result[Offset::TouchStart] = convertRawProp( + context, + rawProps, + "onTouchStart", + sourceValue[Offset::TouchStart], + defaultValue[Offset::TouchStart]); + result[Offset::TouchMove] = convertRawProp( + context, + rawProps, + "onTouchMove", + sourceValue[Offset::TouchMove], + defaultValue[Offset::TouchMove]); + result[Offset::TouchEnd] = convertRawProp( + context, + rawProps, + "onTouchEnd", + sourceValue[Offset::TouchEnd], + defaultValue[Offset::TouchEnd]); + result[Offset::TouchCancel] = convertRawProp( + context, + rawProps, + "onTouchCancel", + sourceValue[Offset::TouchCancel], + defaultValue[Offset::TouchCancel]); + + return result; +} + } // namespace react } // namespace facebook From e47e869a00d318cc381504da6015a66d4531f1fd Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 10 Feb 2022 06:46:12 -0800 Subject: [PATCH 096/109] Remove gating for react_fabric.enableV2AsynchronousEventBeat Summary: changelog: [internal] enableV2AsynchronousEventBeat is shipped, let's remove gating Reviewed By: javache Differential Revision: D34108109 fbshipit-source-id: 0264c85cf01f011ab368d56e12f79cc978f9e106 --- ...syncEventBeatV2.cpp => AsyncEventBeat.cpp} | 12 ++--- .../react/fabric/jni/AsyncEventBeat.h | 48 ++++--------------- .../react/fabric/jni/AsyncEventBeatV2.h | 40 ---------------- .../com/facebook/react/fabric/jni/Binding.cpp | 34 ++++--------- 4 files changed, 22 insertions(+), 112 deletions(-) rename ReactAndroid/src/main/java/com/facebook/react/fabric/jni/{AsyncEventBeatV2.cpp => AsyncEventBeat.cpp} (87%) delete mode 100644 ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.h diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.cpp similarity index 87% rename from ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.cpp rename to ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.cpp index 3bf94580a2..d6e0e63062 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.cpp @@ -9,11 +9,11 @@ #include #include -#include "AsyncEventBeatV2.h" +#include "AsyncEventBeat.h" namespace facebook::react { -AsyncEventBeatV2::AsyncEventBeatV2( +AsyncEventBeat::AsyncEventBeat( EventBeat::SharedOwnerBox const &ownerBox, EventBeatManager *eventBeatManager, RuntimeExecutor runtimeExecutor, @@ -25,11 +25,11 @@ AsyncEventBeatV2::AsyncEventBeatV2( eventBeatManager->addObserver(*this); } -AsyncEventBeatV2::~AsyncEventBeatV2() { +AsyncEventBeat::~AsyncEventBeat() { eventBeatManager_->removeObserver(*this); } -void AsyncEventBeatV2::tick() const { +void AsyncEventBeat::tick() const { if (!isRequested_ || isBeatCallbackScheduled_) { return; } @@ -50,11 +50,11 @@ void AsyncEventBeatV2::tick() const { }); } -void AsyncEventBeatV2::induce() const { +void AsyncEventBeat::induce() const { tick(); } -void AsyncEventBeatV2::request() const { +void AsyncEventBeat::request() const { bool alreadyRequested = isRequested_; EventBeat::request(); if (!alreadyRequested) { diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.h index 072de4e255..f0316d5577 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.h +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeat.h @@ -7,14 +7,11 @@ #pragma once -#include #include -#include #include "EventBeatManager.h" -namespace facebook { -namespace react { +namespace facebook::react { class AsyncEventBeat final : public EventBeat, public EventBeatManagerObserver { public: @@ -22,50 +19,21 @@ class AsyncEventBeat final : public EventBeat, public EventBeatManagerObserver { EventBeat::SharedOwnerBox const &ownerBox, EventBeatManager *eventBeatManager, RuntimeExecutor runtimeExecutor, - jni::global_ref javaUIManager) - : EventBeat(ownerBox), - eventBeatManager_(eventBeatManager), - runtimeExecutor_(std::move(runtimeExecutor)), - javaUIManager_(std::move(javaUIManager)) { - eventBeatManager->addObserver(*this); - } + jni::global_ref javaUIManager); - ~AsyncEventBeat() { - eventBeatManager_->removeObserver(*this); - } + ~AsyncEventBeat() override; - void tick() const override { - runtimeExecutor_([this, ownerBox = ownerBox_](jsi::Runtime &runtime) { - auto owner = ownerBox->owner.lock(); - if (!owner) { - return; - } + void tick() const override; - this->beat(runtime); - }); - } + void induce() const override; - void induce() const override { - tick(); - } - - void request() const override { - bool alreadyRequested = isRequested_; - EventBeat::request(); - if (!alreadyRequested) { - // Notifies java side that an event will be dispatched (e.g. LayoutEvent) - static auto onRequestEventBeat = - jni::findClassStatic("com/facebook/react/fabric/FabricUIManager") - ->getMethod("onRequestEventBeat"); - onRequestEventBeat(javaUIManager_); - } - } + void request() const override; private: EventBeatManager *eventBeatManager_; RuntimeExecutor runtimeExecutor_; jni::global_ref javaUIManager_; + mutable std::atomic isBeatCallbackScheduled_{false}; }; -} // namespace react -} // namespace facebook +} // namespace facebook::react diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.h b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.h deleted file mode 100644 index 569af7c96c..0000000000 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/AsyncEventBeatV2.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#pragma once - -#include - -#include "EventBeatManager.h" - -namespace facebook::react { - -class AsyncEventBeatV2 final : public EventBeat, - public EventBeatManagerObserver { - public: - AsyncEventBeatV2( - EventBeat::SharedOwnerBox const &ownerBox, - EventBeatManager *eventBeatManager, - RuntimeExecutor runtimeExecutor, - jni::global_ref javaUIManager); - - ~AsyncEventBeatV2() override; - - void tick() const override; - - void induce() const override; - - void request() const override; - - private: - EventBeatManager *eventBeatManager_; - RuntimeExecutor runtimeExecutor_; - jni::global_ref javaUIManager_; - mutable std::atomic isBeatCallbackScheduled_{false}; -}; - -} // namespace facebook::react diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index 56d2f63ca2..bf6495340e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -7,7 +7,6 @@ #include "Binding.h" #include "AsyncEventBeat.h" -#include "AsyncEventBeatV2.h" #include "EventEmitterWrapper.h" #include "ReactNativeConfigHolder.h" #include "StateWrapperImpl.h" @@ -402,38 +401,21 @@ void Binding::installFabricUIManager( } } - auto enableV2AsynchronousEventBeat = - config->getBool("react_fabric:enable_asynchronous_event_beat_v2_android"); - // TODO: T31905686 Create synchronous Event Beat EventBeat::Factory synchronousBeatFactory = - [eventBeatManager, - runtimeExecutor, - globalJavaUiManager, - enableV2AsynchronousEventBeat](EventBeat::SharedOwnerBox const &ownerBox) + [eventBeatManager, runtimeExecutor, globalJavaUiManager]( + EventBeat::SharedOwnerBox const &ownerBox) -> std::unique_ptr { - if (enableV2AsynchronousEventBeat) { - return std::make_unique( - ownerBox, eventBeatManager, runtimeExecutor, globalJavaUiManager); - } else { - return std::make_unique( - ownerBox, eventBeatManager, runtimeExecutor, globalJavaUiManager); - } + return std::make_unique( + ownerBox, eventBeatManager, runtimeExecutor, globalJavaUiManager); }; EventBeat::Factory asynchronousBeatFactory = - [eventBeatManager, - runtimeExecutor, - globalJavaUiManager, - enableV2AsynchronousEventBeat](EventBeat::SharedOwnerBox const &ownerBox) + [eventBeatManager, runtimeExecutor, globalJavaUiManager]( + EventBeat::SharedOwnerBox const &ownerBox) -> std::unique_ptr { - if (enableV2AsynchronousEventBeat) { - return std::make_unique( - ownerBox, eventBeatManager, runtimeExecutor, globalJavaUiManager); - } else { - return std::make_unique( - ownerBox, eventBeatManager, runtimeExecutor, globalJavaUiManager); - } + return std::make_unique( + ownerBox, eventBeatManager, runtimeExecutor, globalJavaUiManager); }; contextContainer->insert("ReactNativeConfig", config); From 172f990dcf793e71a61456b7daa46c184c8727db Mon Sep 17 00:00:00 2001 From: Ian Childs Date: Thu, 10 Feb 2022 07:44:32 -0800 Subject: [PATCH 097/109] exported and provided dep should be exported_provided_dep Reviewed By: astreet Differential Revision: D34108185 fbshipit-source-id: 72a6c9fb3654d674df405faac49dfbe67fe193b7 --- ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK index 4e8f3143ce..1d3b290ca3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK @@ -14,10 +14,12 @@ rn_android_library( ], ), autoglob = False, + exported_provided_deps = [ + react_native_dep("third-party/android/androidx:annotation"), + ], is_androidx = True, labels = ["supermodule:xplat/default/public.react_native.infra"], provided_deps = [ - react_native_dep("third-party/android/androidx:annotation"), react_native_dep("third-party/android/androidx:core"), react_native_dep("third-party/android/androidx:fragment"), react_native_dep("third-party/android/androidx:legacy-support-core-ui"), @@ -51,7 +53,6 @@ rn_android_library( ], exported_deps = [ ":DisplayMetrics", - react_native_dep("third-party/android/androidx:annotation"), react_native_dep("third-party/java/jsr-305:jsr-305"), react_native_target("java/com/facebook/react/uimanager/common:common"), react_native_target("java/com/facebook/react/uimanager/interfaces:interfaces"), From e254073b1748e99f1a8aa7dfb4535b9b8d8efd3c Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Thu, 10 Feb 2022 08:38:59 -0800 Subject: [PATCH 098/109] Update ViewConfigIgnore comment Summary: This comment was out of date. Changelog: [Internal] Reviewed By: sshic Differential Revision: D34113966 fbshipit-source-id: 0768baa9238736aea26e354792096fea6bb7fcdb --- Libraries/NativeComponent/ViewConfigIgnore.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Libraries/NativeComponent/ViewConfigIgnore.js b/Libraries/NativeComponent/ViewConfigIgnore.js index 73442ad705..a681e960b0 100644 --- a/Libraries/NativeComponent/ViewConfigIgnore.js +++ b/Libraries/NativeComponent/ViewConfigIgnore.js @@ -22,18 +22,16 @@ export function DynamicallyInjectedByGestureHandler(object: T): T { } /** - * On iOS, ViewManager events declarations generate {eventName}: true entries - * in ViewConfig valueAttributes. In our Static ViewConfig infra, we generate - * these {eventName}: true entries during runtime by inspecting a ViewConfig's - * bubblingEventTypes, and directEventTypes. + * On iOS, ViewManager event declarations generate {eventName}: true entries + * in ViewConfig valueAttributes. These entries aren't generated for Android. + * This annotation allows Static ViewConfigs to insert these entries into + * iOS but not Android. * - * However, not all event declarations generate these {eventName}: true entries. - * So, the ViewConfig infra generates extra {eventName}: true entries for some - * events. These extra entries are harmless. So, the logic below makes the ViewConfig - * Validator ignore all extra {eventName}: true entries in static ViewConfig - * validAttributes. + * In the future, we want to remove this platform-inconsistency. + * This annotation also allows us to safely test this removal by setting + * global.RN$ViewConfigEventValidAttributesDisabled = true server-side. * - * TODO(T110872225): Remove this logic + * TODO(T110872225): Remove this logic, after achieving platform-consistency */ export function ConditionallyIgnoredEventHandlers( value: T, From 327c4d7a083a07ff6f5a1a4a1f4eeedcffff5680 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 10 Feb 2022 09:39:43 -0800 Subject: [PATCH 099/109] Place Android.mk dependencies on separate lines for codegen. Summary: That's a really nit change, but when we moved the Makefile deps to be on separate lines, we havent' done the same for the codegen. Here I'm doing it. Changelog: [Internal] [Changed] - Place Android.mk dependencies on separate lines for codegen Reviewed By: ShikaSD Differential Revision: D34144715 fbshipit-source-id: be9d5fb75b6b93c0b2bb479145053ae6f201e1fc --- .../src/generators/modules/GenerateModuleJniH.js | 14 +++++++++++++- .../__snapshots__/GenerateModuleJniH-test.js.snap | 14 +++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js b/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js index 5b35d8c414..0c90cee8e4 100644 --- a/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js +++ b/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js @@ -80,7 +80,19 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/${libraryName} -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni \ + libfolly_json \ + libglog \ + libjsi \ + libreact_codegen_rncore \ + libreact_debug \ + libreact_nativemodule_core \ + libreact_render_core \ + libreact_render_debug \ + libreact_render_graphics \ + librrc_view \ + libturbomodulejsijni \ + libyoga LOCAL_CFLAGS := \\ -DLOG_TAG=\\"ReactNative\\" diff --git a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap index 81e5237b29..c9ddf301a4 100644 --- a/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap +++ b/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleJniH-test.js.snap @@ -52,7 +52,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/SampleWithUppercaseName -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_json libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga LOCAL_CFLAGS := \\\\ -DLOG_TAG=\\\\\\"ReactNative\\\\\\" @@ -116,7 +116,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/complex_objects -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_json libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga LOCAL_CFLAGS := \\\\ -DLOG_TAG=\\\\\\"ReactNative\\\\\\" @@ -180,7 +180,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/empty_native_modules -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_json libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga LOCAL_CFLAGS := \\\\ -DLOG_TAG=\\\\\\"ReactNative\\\\\\" @@ -244,7 +244,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/native_modules_with_type_aliases -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_json libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga LOCAL_CFLAGS := \\\\ -DLOG_TAG=\\\\\\"ReactNative\\\\\\" @@ -316,7 +316,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/real_module_example -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_json libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga LOCAL_CFLAGS := \\\\ -DLOG_TAG=\\\\\\"ReactNative\\\\\\" @@ -380,7 +380,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/simple_native_modules -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_json libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga LOCAL_CFLAGS := \\\\ -DLOG_TAG=\\\\\\"ReactNative\\\\\\" @@ -452,7 +452,7 @@ LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/reac LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/react/renderer/components/two_modules_different_files -LOCAL_SHARED_LIBRARIES := libjsi libglog libfolly_json libyoga libreact_nativemodule_core librrc_view libreact_render_core libreact_render_graphics libfbjni libturbomodulejsijni libreact_codegen_rncore libreact_debug libreact_render_debug +LOCAL_SHARED_LIBRARIES := libfbjni libfolly_json libglog libjsi libreact_codegen_rncore libreact_debug libreact_nativemodule_core libreact_render_core libreact_render_debug libreact_render_graphics librrc_view libturbomodulejsijni libyoga LOCAL_CFLAGS := \\\\ -DLOG_TAG=\\\\\\"ReactNative\\\\\\" From 6b61995647c789a567845521fed7b0cc1e0cddb7 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Dall'Agnol Date: Thu, 10 Feb 2022 09:50:40 -0800 Subject: [PATCH 100/109] build(deps): Bump android Appcompat to 1.4.1 (#33072) Summary: Currently we are using Appcompat in version 1.0.2 which is almost 4 years old now, this PR updates it to version 1.4.1. Using Appcompat 1.0.2 was also causing a crash on RNTester due to an error where FontFamily's method was not found (Related to https://github.com/facebook/react-native/issues/33065) Closes https://github.com/facebook/react-native/issues/31620 ## Changelog [Android] [Changed] - Bump android Appcompat to 1.4.1 Pull Request resolved: https://github.com/facebook/react-native/pull/33072 Test Plan: Use `./scripts/test-manual-e2e.sh` to test both RNTester and a new app Reviewed By: cortinico Differential Revision: D34107105 Pulled By: ShikaSD fbshipit-source-id: 966e4687b09ae50a88ee518622f073d72e8c6550 --- ReactAndroid/build.gradle | 3 ++- ReactAndroid/gradle.properties | 1 + .../main/third-party/android/androidx/BUCK | 20 +++++++++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 3e0f804219..d391da8576 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -370,7 +370,8 @@ dependencies { api("com.facebook.infer.annotation:infer-annotation:0.18.0") api("com.facebook.yoga:proguard-annotations:1.19.0") api("javax.inject:javax.inject:1") - api("androidx.appcompat:appcompat:1.0.2") + api("androidx.appcompat:appcompat:${APPCOMPAT_VERSION}") + api("androidx.appcompat:appcompat-resources:${APPCOMPAT_VERSION}") api("androidx.autofill:autofill:1.1.0") api("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") api("com.facebook.fresco:fresco:${FRESCO_VERSION}") diff --git a/ReactAndroid/gradle.properties b/ReactAndroid/gradle.properties index 66206964b1..a93702dfcb 100644 --- a/ReactAndroid/gradle.properties +++ b/ReactAndroid/gradle.properties @@ -11,6 +11,7 @@ ROBOLECTRIC_VERSION=4.4 JUNIT_VERSION=4.12 ANDROIDX_TEST_VERSION=1.1.0 +APPCOMPAT_VERSION=1.4.1 FRESCO_VERSION=2.5.0 OKHTTP_VERSION=4.9.2 SO_LOADER_VERSION=0.10.3 diff --git a/ReactAndroid/src/main/third-party/android/androidx/BUCK b/ReactAndroid/src/main/third-party/android/androidx/BUCK index d8398497d3..8bea0a99bf 100644 --- a/ReactAndroid/src/main/third-party/android/androidx/BUCK +++ b/ReactAndroid/src/main/third-party/android/androidx/BUCK @@ -12,6 +12,7 @@ fb_native.android_library( exported_deps = [ ":annotation", ":appcompat-binary", + ":appcompat-resources-binary", ":collection", ":core", ":cursoradapter", @@ -365,6 +366,11 @@ fb_native.android_prebuilt_aar( aar = ":appcompat-binary-aar", ) +fb_native.android_prebuilt_aar( + name = "appcompat-resources-binary", + aar = ":appcompat-resources-binary-aar", +) + fb_native.android_prebuilt_aar( name = "asynclayoutinflater-binary", aar = ":asynclayoutinflater-binary-aar", @@ -534,8 +540,14 @@ fb_native.remote_file( fb_native.remote_file( name = "appcompat-binary-aar", - sha1 = "002533a36c928bb27a3cc6843a25f83754b3c3ae", - url = "mvn:androidx.appcompat:appcompat:aar:1.0.2", + sha1 = "d384d125d196ed4997b418d7ba6fc18a4680ed22", + url = "mvn:androidx.appcompat:appcompat:aar:1.4.1", +) + +fb_native.remote_file( + name = "appcompat-resources-binary-aar", + sha1 = "527d93d44bb18bc7dcf5213df8d4d069f0ceff61", + url = "mvn:androidx.appcompat:appcompat-resources:aar:1.4.1", ) fb_native.remote_file( @@ -558,8 +570,8 @@ fb_native.remote_file( fb_native.remote_file( name = "core-binary-aar", - sha1 = "263deba7f9c24bd0cefb93c0aaaf402cc50828ee", - url = "mvn:androidx.core:core:aar:1.0.1", + sha1 = "b26edc58f29ca0671e60828a68582760f880acdd", + url = "mvn:androidx.core:core:aar:1.7.0", ) fb_native.remote_file( From 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Thu, 10 Feb 2022 11:16:49 -0800 Subject: [PATCH 101/109] Support color animation with native driver for iOS Summary: Adds support for Animated.Color with native driver for iOS. Reads the native config for the rbga channel AnimatedNodes, and on update(), converts the values into a SharedColor. Followup changes will include support for platform colors. Ran update_pods: https://www.internalfb.com/intern/wiki/React_Native/Preparing_to_Ship/Open_Source_Pods/ Changelog: [iOS][Added] - Support running animations with AnimatedColor with native driver Reviewed By: sammy-SC Differential Revision: D33860583 fbshipit-source-id: 990ad0f754a21e3939f2cb233bcfa793ef12eb14 --- .../Nodes/RCTColorAnimatedNode.h | 14 +++++++++ .../Nodes/RCTColorAnimatedNode.m | 30 +++++++++++++++++++ .../Nodes/RCTPropsAnimatedNode.m | 17 +++++++---- .../Nodes/RCTStyleAnimatedNode.m | 12 +++++--- .../RCTNativeAnimatedNodesManager.m | 2 ++ .../React-RCTAnimation.podspec | 2 +- React/Fabric/Mounting/RCTMountingManager.mm | 6 ++++ .../renderer/graphics/platform/ios/Color.h | 1 - packages/rn-tester/Podfile.lock | 8 ++--- 9 files changed, 76 insertions(+), 16 deletions(-) create mode 100644 Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h create mode 100644 Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m diff --git a/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h b/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h new file mode 100644 index 0000000000..ae1d132573 --- /dev/null +++ b/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h @@ -0,0 +1,14 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import + +@interface RCTColorAnimatedNode : RCTAnimatedNode + +@property (nonatomic, assign) int32_t color; + +@end diff --git a/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m b/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m new file mode 100644 index 0000000000..6c8d2a8811 --- /dev/null +++ b/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m @@ -0,0 +1,30 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import +#import + +@implementation RCTColorAnimatedNode + +- (void)performUpdate +{ + [super performUpdate]; + + RCTValueAnimatedNode *rNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"r"]]; + RCTValueAnimatedNode *gNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"g"]]; + RCTValueAnimatedNode *bNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"b"]]; + RCTValueAnimatedNode *aNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"a"]]; + + _color = ((int)round(aNode.value * 255) & 0xff) << 24 | + ((int)round(rNode.value) & 0xff) << 16 | + ((int)round(gNode.value) & 0xff) << 8 | + ((int)round(bNode.value) & 0xff); + + // TODO (T111179606): Support platform colors for color animations +} + +@end diff --git a/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m b/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m index aac71b01ef..43e96a2eb2 100644 --- a/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +++ b/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m @@ -12,6 +12,7 @@ #import #import #import +#import @implementation RCTPropsAnimatedNode { @@ -118,17 +119,21 @@ for (NSNumber *parentTag in self.parentNodes.keyEnumerator) { RCTAnimatedNode *parentNode = [self.parentNodes objectForKey:parentTag]; if ([parentNode isKindOfClass:[RCTStyleAnimatedNode class]]) { - [self->_propsDictionary addEntriesFromDictionary:[(RCTStyleAnimatedNode *)parentNode propsDictionary]]; - + RCTStyleAnimatedNode *styleAnimatedNode = (RCTStyleAnimatedNode *)parentNode; + [_propsDictionary addEntriesFromDictionary:styleAnimatedNode.propsDictionary]; } else if ([parentNode isKindOfClass:[RCTValueAnimatedNode class]]) { + RCTValueAnimatedNode *valueAnimatedNode = (RCTValueAnimatedNode *)parentNode; NSString *property = [self propertyNameForParentTag:parentTag]; - id animatedObject = [(RCTValueAnimatedNode *)parentNode animatedObject]; + id animatedObject = valueAnimatedNode.animatedObject; if (animatedObject) { - self->_propsDictionary[property] = animatedObject; + _propsDictionary[property] = animatedObject; } else { - CGFloat value = [(RCTValueAnimatedNode *)parentNode value]; - self->_propsDictionary[property] = @(value); + _propsDictionary[property] = @(valueAnimatedNode.value); } + } else if ([parentNode isKindOfClass:[RCTColorAnimatedNode class]]) { + RCTColorAnimatedNode *colorAnimatedNode = (RCTColorAnimatedNode *)parentNode; + NSString *property = [self propertyNameForParentTag:parentTag]; + _propsDictionary[property] = @(colorAnimatedNode.color); } } diff --git a/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m b/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m index c6710d0582..8dc81c9efb 100644 --- a/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +++ b/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m @@ -9,6 +9,7 @@ #import #import #import +#import @implementation RCTStyleAnimatedNode { @@ -38,11 +39,14 @@ RCTAnimatedNode *node = [self.parentNodes objectForKey:nodeTag]; if (node) { if ([node isKindOfClass:[RCTValueAnimatedNode class]]) { - RCTValueAnimatedNode *parentNode = (RCTValueAnimatedNode *)node; - [self->_propsDictionary setObject:@(parentNode.value) forKey:property]; + RCTValueAnimatedNode *valueAnimatedNode = (RCTValueAnimatedNode *)node; + _propsDictionary[property] = @(valueAnimatedNode.value); } else if ([node isKindOfClass:[RCTTransformAnimatedNode class]]) { - RCTTransformAnimatedNode *parentNode = (RCTTransformAnimatedNode *)node; - [self->_propsDictionary addEntriesFromDictionary:parentNode.propsDictionary]; + RCTTransformAnimatedNode *transformAnimatedNode = (RCTTransformAnimatedNode *)node; + [_propsDictionary addEntriesFromDictionary:transformAnimatedNode.propsDictionary]; + } else if ([node isKindOfClass:[RCTColorAnimatedNode class]]) { + RCTColorAnimatedNode *colorAnimatedNode = (RCTColorAnimatedNode *)node; + _propsDictionary[property] = @(colorAnimatedNode.color); } } }]; diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m b/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m index 50356c6547..a07d19ba63 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +++ b/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m @@ -12,6 +12,7 @@ #import #import #import +#import #import #import #import @@ -86,6 +87,7 @@ static NSString *RCTNormalizeAnimatedEventName(NSString *eventName) dispatch_once(&mapToken, ^{ map = @{@"style" : [RCTStyleAnimatedNode class], @"value" : [RCTValueAnimatedNode class], + @"color" : [RCTColorAnimatedNode class], @"props" : [RCTPropsAnimatedNode class], @"interpolation" : [RCTInterpolationAnimatedNode class], @"addition" : [RCTAdditionAnimatedNode class], diff --git a/Libraries/NativeAnimation/React-RCTAnimation.podspec b/Libraries/NativeAnimation/React-RCTAnimation.podspec index 94af813946..06e317f98a 100644 --- a/Libraries/NativeAnimation/React-RCTAnimation.podspec +++ b/Libraries/NativeAnimation/React-RCTAnimation.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.platforms = { :ios => "11.0" } s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness' s.source = source - s.source_files = "{Drivers/*,Nodes/*,*}.{m,mm}" + s.source_files = "**/*.{h,m,mm}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" s.header_dir = "RCTAnimation" s.pod_target_xcconfig = { diff --git a/React/Fabric/Mounting/RCTMountingManager.mm b/React/Fabric/Mounting/RCTMountingManager.mm index 4f396bc72a..fb18cf4e96 100644 --- a/React/Fabric/Mounting/RCTMountingManager.mm +++ b/React/Fabric/Mounting/RCTMountingManager.mm @@ -14,6 +14,7 @@ #import #import #import +#import #import #import #import @@ -316,6 +317,11 @@ static void RCTPerformMountInstructions( if (props[@"opacity"] && componentView.layer.opacity != (float)newViewProps.opacity) { componentView.layer.opacity = newViewProps.opacity; } + + auto reactNativeConfig = _contextContainer->at>("ReactNativeConfig"); + if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:finalize_updates_on_synchronous_update_view_ios")) { + [componentView finalizeUpdates:RNComponentViewUpdateMaskProps]; + } } - (void)synchronouslyDispatchCommandOnUIThread:(ReactTag)reactTag diff --git a/ReactCommon/react/renderer/graphics/platform/ios/Color.h b/ReactCommon/react/renderer/graphics/platform/ios/Color.h index 4308636475..2e62adb8fc 100644 --- a/ReactCommon/react/renderer/graphics/platform/ios/Color.h +++ b/ReactCommon/react/renderer/graphics/platform/ios/Color.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index ed15bf4101..7e31588013 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -884,7 +884,7 @@ SPEC CHECKSUMS: CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: b81a2b70c72d8b0aefb652cea22c11e9ffd02949 - FBReactNativeSpec: 8e730e8017b1ba644ba3c14f0c33a4cc96cce9f4 + FBReactNativeSpec: 277e2460e8a1a20883306c886d5d57a361e32a71 Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c @@ -915,7 +915,7 @@ SPEC CHECKSUMS: React-logger: 2009c0280c286a76200d6b7c5fe242fad51ddd7a React-perflogger: fe66bd6d8b17ebcfdf0159bf41fe28d8035ac20c React-RCTActionSheet: 3131a0b9280aa0e51bdf54b3d79aecd8503db62c - React-RCTAnimation: 70f2b9daaa1b45dea608be865cc5f2e1789dbc39 + React-RCTAnimation: 0c0a35cd27c5005cfddcda59b612994f4ebdaa43 React-RCTBlob: 48cae62d905ef96ab10c84ab16163643a3c872a7 React-RCTFabric: c126a269f6279896e19e133d6b1e019fa2f0f028 React-RCTImage: 2ce3f1f72de91798eb31c9001b30cab8d1c71c4e @@ -926,10 +926,10 @@ SPEC CHECKSUMS: React-RCTTest: 12bbd7fc2e72bd9920dc7286c5b8ef96639582b6 React-RCTText: e9146b2c0550a83d1335bfe2553760070a2d75c7 React-RCTVibration: 50be9c390f2da76045ef0dfdefa18b9cf9f35cfa - React-rncore: 7db29a115e312e9f0f280294d78fe8501f740d8d + React-rncore: 252dd9c510174ba718e358d332a43ad7056e9cb0 React-runtimeexecutor: 4b0c6eb341c7d3ceb5e2385cb0fdb9bf701024f3 ReactCommon: 7a2714d1128f965392b6f99a8b390e3aa38c9569 - ScreenshotManager: 1a419252584923755f7e7fd96ededcac2cf95521 + ScreenshotManager: 79ae4255728f14773097f05accaa53949bdd526c SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 Yoga: c0d06f5380d34e939f55420669a60fe08b79bd75 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a From 77e1f83c2835fb1787dbcd83cbc31a6a3044514a Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 10 Jan 2023 12:05:54 -0800 Subject: [PATCH 102/109] Resolve ViewConfig conflicts --- .../NativeComponent/PlatformBaseViewConfig.js | 32 ++++++++++--------- Libraries/NativeComponent/ViewConfigIgnore.js | 5 +-- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Libraries/NativeComponent/PlatformBaseViewConfig.js b/Libraries/NativeComponent/PlatformBaseViewConfig.js index 1ab802b46d..ec696a949b 100644 --- a/Libraries/NativeComponent/PlatformBaseViewConfig.js +++ b/Libraries/NativeComponent/PlatformBaseViewConfig.js @@ -500,7 +500,6 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = style: ReactNativeStyleAttributes, -<<<<<<< HEAD // [macOS ...(Platform.OS === 'macos' && { acceptsFirstMouse: true, @@ -509,23 +508,11 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = draggedTypes: true, enableFocusRing: true, nextKeyViewTag: true, - onBlur: true, - onClick: true, - onDoubleClick: true, - onDragEnter: true, - onDragLeave: true, - onDrop: true, - onFocus: true, - onKeyDown: true, - onKeyUp: true, - onMouseEnter: true, - onMouseLeave: true, tooltip: true, validKeysDown: true, validKeysUp: true, }), // macOS] -======= ...ConditionallyIgnoredEventHandlers({ onLayout: true, onMagicTap: true, @@ -553,9 +540,24 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = onTouchMove: true, onTouchEnd: true, onTouchCancel: true, + + // [macOS + ...(Platform.OS === 'macos' && { + onBlur: true, + onClick: true, + onDoubleClick: true, + onDragEnter: true, + onDragLeave: true, + onDrop: true, + onFocus: true, + onKeyDown: true, + onKeyUp: true, + onMouseEnter: true, + onMouseLeave: true, + }), + // macOS] }), ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 }, }; -export default PlatformBaseViewConfig; +export default PlatformBaseViewConfig; \ No newline at end of file diff --git a/Libraries/NativeComponent/ViewConfigIgnore.js b/Libraries/NativeComponent/ViewConfigIgnore.js index bf65ee741d..8c7056ec6c 100644 --- a/Libraries/NativeComponent/ViewConfigIgnore.js +++ b/Libraries/NativeComponent/ViewConfigIgnore.js @@ -21,8 +21,6 @@ export function DynamicallyInjectedByGestureHandler(object: T): T { return object; } -<<<<<<< HEAD -======= /** * On iOS, ViewManager event declarations generate {eventName}: true entries * in ViewConfig valueAttributes. These entries aren't generated for Android. @@ -39,7 +37,7 @@ export function ConditionallyIgnoredEventHandlers( value: T, ): T | void { if ( - Platform.OS === 'ios' && + (Platform.OS === 'ios' || Platform.OS === 'macos') && !(global.RN$ViewConfigEventValidAttributesDisabled === true) ) { return value; @@ -47,7 +45,6 @@ export function ConditionallyIgnoredEventHandlers( return undefined; } ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 export function isIgnored(value: mixed): boolean { if (typeof value === 'object' && value != null) { return ignoredViewConfigProps.has(value); From cc7f31ad171882837ea2fc66ba30b142e0e57b5b Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 10 Jan 2023 12:06:24 -0800 Subject: [PATCH 103/109] Resolve package.json and lock file conflicts --- bots/yarn.lock | 481 +++++---------------------------------- package.json | 59 +---- yarn.lock | 603 ++++--------------------------------------------- 3 files changed, 107 insertions(+), 1036 deletions(-) diff --git a/bots/yarn.lock b/bots/yarn.lock index 0e38a9dd6e..14335e1cfa 100644 --- a/bots/yarn.lock +++ b/bots/yarn.lock @@ -2,14 +2,6 @@ # yarn lockfile v1 -<<<<<<< HEAD -"@firebase/analytics-compat@0.1.11": - version "0.1.11" - resolved "https://registry.yarnpkg.com/@firebase/analytics-compat/-/analytics-compat-0.1.11.tgz#0dd12c628e063bba2851b4da57fe67024c52ae2d" - integrity sha512-Jx5iXM3nlMa6utqGWNDtmdIztFhLCqMx2Iw809BbynhTSa3esF4e5RevCRk+5oDDfW11uLHckLpe6MhmINKIkA== - dependencies: - "@firebase/analytics" "0.7.10" -======= "@babel/polyfill@^7.2.5": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" @@ -18,13 +10,12 @@ core-js "^2.6.5" regenerator-runtime "^0.13.4" -"@firebase/analytics-compat@0.1.1": - version "0.1.1" - resolved "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.1.tgz" - integrity sha512-pMTrA8cxMXFRv7bwZEXXz0NCepnyH2Jay/32RZ7xAufij2VJhF5S1BtfCO0wuri3FB94rlM8SmSEbwxxHcAtVg== +"@firebase/analytics-compat@0.1.11": + version "0.1.11" + resolved "https://registry.yarnpkg.com/@firebase/analytics-compat/-/analytics-compat-0.1.11.tgz#0dd12c628e063bba2851b4da57fe67024c52ae2d" + integrity sha512-Jx5iXM3nlMa6utqGWNDtmdIztFhLCqMx2Iw809BbynhTSa3esF4e5RevCRk+5oDDfW11uLHckLpe6MhmINKIkA== dependencies: - "@firebase/analytics" "0.7.0" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + "@firebase/analytics" "0.7.10" "@firebase/analytics-types" "0.7.0" "@firebase/component" "0.5.15" "@firebase/util" "1.6.1" @@ -443,17 +434,15 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -<<<<<<< HEAD -"@octokit/openapi-types@^12.1.0": - version "12.1.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.1.0.tgz#a68b60e969f26dee0eb7d127c65a84967f2d3a6e" - integrity sha512-kQzJh3ZUv3lDpi6M+uekMRHULvf9DlWoI1XgKN6nPeGDzkSgtkhVq1MMz3bFKQ6H6GbdC3ZqG/a6VzKhIx0VeA== -======= "@octokit/openapi-types@^11.2.0": version "11.2.0" resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + +"@octokit/openapi-types@^12.1.0": + version "12.1.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.1.0.tgz#a68b60e969f26dee0eb7d127c65a84967f2d3a6e" + integrity sha512-kQzJh3ZUv3lDpi6M+uekMRHULvf9DlWoI1XgKN6nPeGDzkSgtkhVq1MMz3bFKQ6H6GbdC3ZqG/a6VzKhIx0VeA== "@octokit/plugin-paginate-rest@^2.16.8": version "2.18.0" @@ -484,17 +473,22 @@ deprecation "^2.0.0" once "^1.4.0" -<<<<<<< HEAD -"@octokit/request@^5.6.0", "@octokit/request@^5.6.3": - version "5.6.3" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0" - integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A== -======= "@octokit/request@^5.6.0": version "5.6.2" resolved "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz" integrity sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.16.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.1" + universal-user-agent "^6.0.0" + +"@octokit/request@^5.6.3": + version "5.6.3" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0" + integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.1.0" @@ -513,21 +507,19 @@ "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^5.12.0" -<<<<<<< HEAD -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.35.0": - version "6.35.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.35.0.tgz#11cd9a679c32b4a6c36459ae2ec3ac4de0104f71" - integrity sha512-DhLfdUuv3H37u6jBDfkwamypx3HflHg29b26nbA6iVFYkAlZ5cMEtu/9pQoihGnQE5M7jJFnNo25Rr1UwQNF8Q== - dependencies: - "@octokit/openapi-types" "^12.1.0" -======= -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.34.0": +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1": version "6.34.0" resolved "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz" integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== dependencies: "@octokit/openapi-types" "^11.2.0" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + +"@octokit/types@^6.35.0": + version "6.35.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.35.0.tgz#11cd9a679c32b4a6c36459ae2ec3ac4de0104f71" + integrity sha512-DhLfdUuv3H37u6jBDfkwamypx3HflHg29b26nbA6iVFYkAlZ5cMEtu/9pQoihGnQE5M7jJFnNo25Rr1UwQNF8Q== + dependencies: + "@octokit/openapi-types" "^12.1.0" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -588,15 +580,9 @@ integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== "@types/node@>=12.12.47", "@types/node@>=13.7.0": -<<<<<<< HEAD - version "18.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a" - integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== -======= version "16.9.1" resolved "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz" integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 abort-controller@^3.0.0: version "3.0.0" @@ -612,11 +598,7 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" -<<<<<<< HEAD -ansi-regex@^5.0.1: -======= ansi-regex@^5.0.0: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -645,11 +627,7 @@ async-retry@1.2.3: asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -<<<<<<< HEAD - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -======= integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 balanced-match@^1.0.0: version "1.0.2" @@ -669,11 +647,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -<<<<<<< HEAD -braces@^3.0.2: -======= braces@^3.0.1: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -683,11 +657,7 @@ braces@^3.0.1: buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" -<<<<<<< HEAD - integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== -======= integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 chalk@^2.3.0: version "2.4.2" @@ -724,11 +694,7 @@ color-convert@^2.0.1: color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -<<<<<<< HEAD - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== -======= integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 color-name@~1.1.4: version "1.1.4" @@ -754,40 +720,23 @@ commander@^2.18.0: concat-map@0.0.1: version "0.0.1" -<<<<<<< HEAD - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -======= resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 core-js@3.6.5: version "3.6.5" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== -<<<<<<< HEAD -core-js@^3.8.2: - version "3.23.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.1.tgz#9f9a9255115f62c512db56d567f636da32ca0b78" - integrity sha512-wfMYHWi1WQjpgZNC9kAlN4ut04TM9fUTdi7CqIoTVM7yaiOUQTklOzfb+oWH3r9edQcT3F887swuVmxrV+CC8w== - -danger@^11.0.2: - version "11.0.7" - resolved "https://registry.yarnpkg.com/danger/-/danger-11.0.7.tgz#1d801f0b2e1ef89a74a9b1f2776cd8e5c1ce8e5e" - integrity sha512-4jdZ5xqQO03EDmoYf29EMvHluNFMXOi5u8msxKE/pAe4UlfvQ6yOpQC5jHF73f724OLP2x9paqVd+vumoC3lug== - dependencies: -======= core-js@^2.6.5: version "2.6.12" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +core-js@^3.8.2: + version "3.23.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.1.tgz#9f9a9255115f62c512db56d567f636da32ca0b78" + integrity sha512-wfMYHWi1WQjpgZNC9kAlN4ut04TM9fUTdi7CqIoTVM7yaiOUQTklOzfb+oWH3r9edQcT3F887swuVmxrV+CC8w== danger@^11.0.2: version "11.0.2" @@ -795,12 +744,10 @@ danger@^11.0.2: integrity sha512-TKE5E1Zrb0uV7Ft3mhbTA3bwVf4hZs7DVx6Mo8weVdIcaXJIIle3+aCjn259GX9/pF4ewoYuof7eLRPJligOgA== dependencies: "@babel/polyfill" "^7.2.5" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 "@octokit/rest" "^18.12.0" async-retry "1.2.3" chalk "^2.3.0" commander "^2.18.0" - core-js "^3.8.2" debug "^4.1.1" fast-json-patch "^3.0.0-1" get-stdin "^6.0.0" @@ -830,7 +777,6 @@ danger@^11.0.2: pinpoint "^1.1.0" prettyjson "^1.2.1" readline-sync "^1.4.9" - regenerator-runtime "^0.13.9" require-from-string "^2.0.2" supports-hyperlinks "^1.0.1" @@ -849,37 +795,21 @@ debug@^3.1.0: ms "^2.1.1" debug@^4.1.1: -<<<<<<< HEAD - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== -======= version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: ms "2.1.2" decode-uri-component@^0.2.0: -<<<<<<< HEAD - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== -======= version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" -<<<<<<< HEAD - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -======= integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" @@ -906,11 +836,7 @@ es6-promise@^4.0.3: es6-promisify@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" -<<<<<<< HEAD - integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== -======= integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: es6-promise "^4.0.3" @@ -922,11 +848,7 @@ escalade@^3.1.1: escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -<<<<<<< HEAD - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -======= integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 event-target-shim@^5.0.0: version "5.0.1" @@ -936,45 +858,26 @@ event-target-shim@^5.0.0: expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" -<<<<<<< HEAD - integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== -======= integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: homedir-polyfill "^1.0.1" extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" -<<<<<<< HEAD - integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== -======= integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: is-extendable "^0.1.0" fast-json-patch@^3.0.0-1: -<<<<<<< HEAD - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" - integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.0.tgz#ec8cd9b9c4c564250ec8b9140ef7a55f70acaee6" + integrity sha512-IhpytlsVTRndz0hU5t0/MGzS/etxLlfrpG5V5M9mVbuj9TrJLWaMfsox9REM5rkuGX0T+5qjpe8XA1o0gZ42nA== faye-websocket@0.11.4: version "0.11.4" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== -======= - version "3.1.0" - resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.0.tgz#ec8cd9b9c4c564250ec8b9140ef7a55f70acaee6" - integrity sha512-IhpytlsVTRndz0hU5t0/MGzS/etxLlfrpG5V5M9mVbuj9TrJLWaMfsox9REM5rkuGX0T+5qjpe8XA1o0gZ42nA== - -faye-websocket@0.11.3: - version "0.11.3" - resolved "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz" - integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: websocket-driver ">=0.5.1" @@ -988,11 +891,7 @@ fill-range@^7.0.1: filter-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" -<<<<<<< HEAD - integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== -======= integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 firebase@^9.6.5: version "9.8.3" @@ -1038,21 +937,12 @@ form-data@^2.5.0: fs-exists-sync@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" -<<<<<<< HEAD - integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -======= integrity sha1-mC1ok6+RjnLQjeyehnP/K1qNat0= fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 get-caller-file@^2.0.5: version "2.0.5" @@ -1067,11 +957,7 @@ get-stdin@^6.0.0: git-config-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/git-config-path/-/git-config-path-1.0.1.tgz#6d33f7ed63db0d0e118131503bab3aca47d54664" -<<<<<<< HEAD - integrity sha512-KcJ2dlrrP5DbBnYIZ2nlikALfRhKzNSX0stvv3ImJ+fvC4hXKoV+U+74SV0upg+jlQZbrtQzc0bu6/Zh+7aQbg== -======= integrity sha1-bTP37WPbDQ4RgTFQO6s6ykfVRmQ= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: extend-shallow "^2.0.1" fs-exists-sync "^0.1.0" @@ -1105,20 +991,12 @@ glob@^7.1.3: has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" -<<<<<<< HEAD - integrity sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng== -======= integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" -<<<<<<< HEAD - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== -======= integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 hasurl@^1.0.0: version "1.0.0" @@ -1156,11 +1034,7 @@ https-proxy-agent@^2.2.1: humps@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/humps/-/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa" -<<<<<<< HEAD - integrity sha512-E0eIbrFWUhwfXJmsbdjRQFQPrl5pTEoKlz163j1mTqqUnU9PgR4AgB8AIITzuB3vLBdxZXyZ9TDIrwB2OASz4g== -======= integrity sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 hyperlinker@^1.0.0: version "1.0.0" @@ -1198,11 +1072,7 @@ ini@^1.3.5: is-extendable@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" -<<<<<<< HEAD - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== -======= integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -1219,24 +1089,12 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -<<<<<<< HEAD -json5@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -======= -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - json5@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: minimist "^1.2.5" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 jsonpointer@^5.0.0: version "5.0.0" @@ -1302,11 +1160,7 @@ ky@^0.12.0: li@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/li/-/li-1.3.0.tgz#22c59bcaefaa9a8ef359cf759784e4bf106aea1b" -<<<<<<< HEAD - integrity sha512-z34TU6GlMram52Tss5mt1m//ifRIpKH5Dqm7yUVOdHI+BQCs9qGPHFaCUTIzsWX7edN30aa2WrPwR7IO10FHaw== -======= integrity sha1-IsWbyu+qmo7zWc91l4TkvxBq6hs= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lie@~3.3.0: version "3.3.0" @@ -1323,11 +1177,7 @@ lodash.camelcase@^4.3.0: lodash.find@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" -<<<<<<< HEAD - integrity sha512-yaRZoAV3Xq28F1iafWN1+a0rflOej93l1DQUejs3SZ41h2O9UJBoS9aueGjPDgAl4B6tPC0NuuchLKaDQQ3Isg== -======= integrity sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.includes@^4.3.0: version "4.3.0" @@ -1337,101 +1187,57 @@ lodash.includes@^4.3.0: lodash.isboolean@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" -<<<<<<< HEAD - integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== -======= integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.isinteger@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" -<<<<<<< HEAD - integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== -======= integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.isnumber@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" -<<<<<<< HEAD - integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== -======= integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.isobject@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" -<<<<<<< HEAD - integrity sha512-3/Qptq2vr7WeJbB4KHUSKlq8Pl7ASXi3UG6CMbBm8WRtXi8+GHm7mKaU3urfpSEzWe2wCIChs6/sdocUsTKJiA== -======= integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" -<<<<<<< HEAD - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== -======= integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" -<<<<<<< HEAD - integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== -======= integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.keys@^4.0.8: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205" -<<<<<<< HEAD - integrity sha512-J79MkJcp7Df5mizHiVNpjoHXLi4HLjh9VLS/M7lQSGoQ+0oQ+lWEigREkqKyizPB1IawvQLLKY8mzEcm1tkyxQ== -======= integrity sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.mapvalues@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" -<<<<<<< HEAD - integrity sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ== -======= integrity sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" -<<<<<<< HEAD - integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== -======= integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.once@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" -<<<<<<< HEAD - integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== -======= integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" -<<<<<<< HEAD - integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== -======= integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 long@^4.0.0: version "4.0.0" @@ -1446,38 +1252,6 @@ memfs-or-file-map-to-github-branch@^1.2.1: "@octokit/rest" "^16.43.0 || ^17.11.0 || ^18.12.0" micromatch@^4.0.4: -<<<<<<< HEAD - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== -======= version "4.0.4" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== @@ -1504,25 +1278,22 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -<<<<<<< HEAD - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -======= integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 ms@2.1.2: version "2.1.2" @@ -1537,20 +1308,9 @@ ms@^2.1.1: node-cleanup@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" -<<<<<<< HEAD - integrity sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw== - -node-fetch@2.6.7, node-fetch@^2.6.0, node-fetch@^2.6.7: -======= integrity sha1-esGavSl+Caf3KnFUXZUbUX5N3iw= -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 +node-fetch@2.6.7, node-fetch@^2.6.0, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -1560,22 +1320,14 @@ node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" -<<<<<<< HEAD - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== -======= integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: wrappy "1" override-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/override-require/-/override-require-1.1.1.tgz#6ae22fadeb1f850ffb0cf4c20ff7b87e5eb650df" -<<<<<<< HEAD - integrity sha512-eoJ9YWxFcXbrn2U8FKT6RV+/Kj7fiGAB1VvHzbYKt8xM5ZuKZgCGvnHzDxmreEjcBH28ejg5MiOH4iyY1mQnkg== -======= integrity sha1-auIvresfhQ/7DPTCD/e4fl62UN8= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 p-limit@^2.1.0: version "2.3.0" @@ -1623,22 +1375,14 @@ parse-link-header@^2.0.0: parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" -<<<<<<< HEAD - integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== -======= integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -<<<<<<< HEAD -picomatch@^2.3.1: -======= picomatch@^2.2.3: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -1646,11 +1390,7 @@ picomatch@^2.2.3: pinpoint@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pinpoint/-/pinpoint-1.1.0.tgz#0cf7757a6977f1bf7f6a32207b709e377388e874" -<<<<<<< HEAD - integrity sha512-+04FTD9x7Cls2rihLlo57QDCcHoLBGn5Dk51SwtFBWkUWLxZaBXyNVpCw1S+atvE7GmnFjeaRZ0WLq3UYuqAdg== -======= integrity sha1-DPd1eml38b9/ajIge3CeN3OI6HQ= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 prettyjson@^1.2.1: version "1.2.5" @@ -1659,14 +1399,6 @@ prettyjson@^1.2.1: dependencies: colors "1.4.0" minimist "^1.2.0" -<<<<<<< HEAD -======= - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 promise-polyfill@8.1.3: version "8.1.3" @@ -1719,11 +1451,7 @@ readline-sync@^1.4.9: resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.10.tgz#41df7fbb4b6312d673011594145705bf56d8873b" integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw== -<<<<<<< HEAD -regenerator-runtime@^0.13.9: -======= -regenerator-runtime@^0.13.4: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 +regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.9: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== @@ -1731,11 +1459,7 @@ regenerator-runtime@^0.13.4: require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" -<<<<<<< HEAD - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -======= integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 require-from-string@^2.0.2: version "2.0.2" @@ -1745,22 +1469,9 @@ require-from-string@^2.0.2: retry@0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" -<<<<<<< HEAD - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - -rimraf@^3.0.0: -======= integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= -rimraf@^2.7.1: - version "2.7.1" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.0, rimraf@^3.0.2: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 +rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -1772,37 +1483,15 @@ safe-buffer@>=5.1.0, safe-buffer@^5.0.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -<<<<<<< HEAD -selenium-webdriver@4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.1.2.tgz#d463b4335632d2ea41a9e988e435a55dc41f5314" - integrity sha512-e4Ap8vQvhipgBB8Ry9zBiKGkU6kHKyNnWiavGGLKkrdW81Zv7NVMtFOL/j3yX0G8QScM7XIXijKssNd4EUxSOw== -======= -safe-buffer@^5.0.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@~5.1.0: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -selenium-webdriver@4.0.0-beta.1: - version "4.0.0-beta.1" - resolved "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.0.0-beta.1.tgz" - integrity sha512-DJ10z6Yk+ZBaLrt1CLElytQ/FOayx29ANKDtmtyW1A6kCJx3+dsc5fFMOZxwzukDniyYsC3OObT5pUAsgkjpxQ== - dependencies: - jszip "^3.5.0" - rimraf "^2.7.1" - tmp "^0.2.1" - ws "^7.3.1" - -selenium-webdriver@^4.0.0-beta.2: - version "4.0.0-rc-1" - resolved "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.0.0-rc-1.tgz" - integrity sha512-bcrwFPRax8fifRP60p7xkWDGSJJoMkPAzufMlk5K2NyLPht/YZzR2WcIk1+3gR8VOCLlst1P2PI+MXACaFzpIw== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 +selenium-webdriver@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.1.2.tgz#d463b4335632d2ea41a9e988e435a55dc41f5314" + integrity sha512-e4Ap8vQvhipgBB8Ry9zBiKGkU6kHKyNnWiavGGLKkrdW81Zv7NVMtFOL/j3yX0G8QScM7XIXijKssNd4EUxSOw== dependencies: jszip "^3.6.0" tmp "^0.2.1" @@ -1813,17 +1502,10 @@ semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -<<<<<<< HEAD setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== -======= -set-immediate-shim@~1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 split-on-first@^1.0.0: version "1.1.0" @@ -1833,11 +1515,7 @@ split-on-first@^1.0.0: strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" -<<<<<<< HEAD - integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -======= integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" @@ -1848,23 +1526,19 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: -<<<<<<< HEAD - ansi-regex "^5.0.1" -======= - safe-buffer "~5.1.0" - strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz" integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== dependencies: ansi-regex "^5.0.0" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" supports-color@^5.0.0, supports-color@^5.3.0: version "5.5.0" @@ -1898,22 +1572,14 @@ to-regex-range@^5.0.1: tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" -<<<<<<< HEAD - integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== -======= integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: punycode "^2.1.0" tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" -<<<<<<< HEAD - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -======= integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 tslib@^2.1.0: version "2.4.0" @@ -1933,23 +1599,6 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -<<<<<<< HEAD -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -======= -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -1982,11 +1631,7 @@ whatwg-fetch@2.0.4: whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" -<<<<<<< HEAD - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== -======= integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" @@ -2012,11 +1657,7 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -<<<<<<< HEAD - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -======= integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 ws@>=7.4.6: version "8.8.0" @@ -2038,11 +1679,7 @@ yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -<<<<<<< HEAD yargs@^16.2.0: -======= -yargs@^16.1.1: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== diff --git a/package.json b/package.json index 2edd0b342f..eb5816e7bc 100644 --- a/package.json +++ b/package.json @@ -97,16 +97,10 @@ }, "dependencies": { "@jest/create-cache-key-function": "^27.0.1", -<<<<<<< HEAD - "@react-native-community/cli": "^7.0.3", - "@react-native-community/cli-platform-android": "^7.0.1", - "@react-native-community/cli-platform-ios": "^7.0.1", - "@react-native-community/cli-tools": "^7.0.1", -======= "@react-native-community/cli": "^7.0.1", "@react-native-community/cli-platform-android": "^7.0.1", "@react-native-community/cli-platform-ios": "^7.0.1", ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + "@react-native-community/cli-tools": "^7.0.1", "@react-native/assets": "1.0.0", "@react-native/normalize-color": "2.0.0", "@react-native/polyfills": "2.0.0", @@ -124,11 +118,7 @@ "pretty-format": "^26.5.2", "promise": "^8.0.3", "react-devtools-core": "^4.23.0", -<<<<<<< HEAD - "react-native-gradle-plugin": "^0.0.6", -======= "react-native-gradle-plugin": "^0.0.4", ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 "react-refresh": "^0.4.0", "react-shallow-renderer": "16.14.1", "regenerator-runtime": "^0.13.2", @@ -140,45 +130,8 @@ "react-native-codegen": "^0.0.17" }, "devDependencies": { -<<<<<<< HEAD - "flow-bin": "^0.170.0", - "react": "17.0.2", - "@babel/core": "^7.14.0", - "@babel/generator": "^7.14.0", - "@react-native-community/eslint-plugin": "*", - "@react-native/eslint-plugin-specs": ">0.0.2", - "@reactions/component": "^2.0.2", - "async": "^3.2.2", - "babel-eslint": "^10.1.0", - "clang-format": "^1.2.4", - "connect": "^3.6.5", - "coveralls": "^3.0.2", - "eslint": "^7.32.0", - "eslint-config-fb-strict": "^26.0.0", - "eslint-config-fbjs": "^3.1.1", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-babel": "^5.3.1", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-flowtype": "^7.0.0", - "eslint-plugin-jest": "^25.2.4", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-react": "^7.26.1", - "eslint-plugin-react-hooks": "^4.2.0", - "eslint-plugin-react-native": "^3.11.0", - "eslint-plugin-relay": "^1.8.2", - "inquirer": "^7.1.0", - "jest": "^26.6.3", - "jest-junit": "^10.0.0", - "jscodeshift": "^0.13.1", - "metro-babel-register": "0.67.0", - "mkdirp": "^0.5.1", - "prettier": "^2.4.1", - "react-test-renderer": "17.0.2", - "shelljs": "^0.8.4", - "signedsource": "^1.0.0", - "ws": "^6.1.4", - "yargs": "^15.3.1" + "flow-bin": "^0.171.0", + "react": "17.0.2" }, "beachball": { "shouldPublish": false @@ -196,10 +149,6 @@ "micromatch": "Version 3.x.x depends on decode-uri-component 0.2.0, which has a DoS vulnerability", "readable-stream": "Eliminates dependency on outdated string_decoder component", "shell-quote": "Versions prior to 1.7.3 have an RCE vulnerability. Should be removable once we upgrade CLI tools to ^8.0.0 with RN 0.69." -======= - "flow-bin": "^0.171.0", - "react": "17.0.2" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 }, "codegenConfig": { "libraries": [ @@ -219,4 +168,4 @@ } ] } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index f5e0e7e8c4..4a4f049f67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1021,17 +1021,21 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -<<<<<<< HEAD +"@jest/types@^27.4.2": + version "27.4.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.4.2.tgz#96536ebd34da6392c2b7c7737d693885b5dd44a5" + integrity sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@jest/types@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== -======= -"@jest/types@^27.0.1", "@jest/types@^27.4.2": - version "27.4.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.4.2.tgz#96536ebd34da6392c2b7c7737d693885b5dd44a5" - integrity sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1100,22 +1104,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -<<<<<<< HEAD -"@react-native-community/cli-debugger-ui@^7.0.3": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-7.0.3.tgz#3eeeacc5a43513cbcae56e5e965d77726361bcb4" - integrity sha512-G4SA6jFI0j22o+j+kYP8/7sxzbCDqSp2QiHA/X5E0lsGEd2o9qN2zbIjiFr8b8k+VVAYSUONhoC0+uKuINvmkA== - dependencies: - serve-static "^1.13.1" - -"@react-native-community/cli-hermes@^6.3.1": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-6.3.1.tgz#a4c3b4b07a1775f7012baf6d5a0b059da2ffac00" - integrity sha512-+tMJsEsVX0WyylnoFE7uPoMu1aTAChaA62Y32dwWgAa1Fx6YrpPkC9d6wvYSBe9md/4mTtRher+ooBcuov6JHw== - dependencies: - "@react-native-community/cli-platform-android" "^6.3.1" - "@react-native-community/cli-tools" "^6.2.1" -======= "@react-native-community/cli-config@^7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-7.0.1.tgz#81bf88a5c0eb21c9b0fc1f825372699c375a45a0" @@ -1162,26 +1150,16 @@ dependencies: "@react-native-community/cli-platform-android" "^7.0.1" "@react-native-community/cli-tools" "^7.0.1" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -<<<<<<< HEAD -"@react-native-community/cli-platform-android@^6.3.1": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-6.3.1.tgz#8d35c809ddaf3b6c5d4ef9ff9c814a25a55259aa" - integrity sha512-n5A64RI1ty4ScZCel/3JYY9Anl857dPsUZ86Dwc1GxrbflSB5/+hcCMg5DCNcnJRa4Hdv95SAR5pMmtAjOXApA== - dependencies: - "@react-native-community/cli-tools" "^6.2.1" -======= "@react-native-community/cli-platform-android@^7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-7.0.1.tgz#d165897edf401f9bceff1f361ef446528133cb52" integrity sha512-nOr0aMkxAymCnbtsQwXBlyoRN2Y+IzC7Qz5T+/zyWwEbTY8SKQI8uV+8+qttUvzSvuXa2PeXsTWluuliOS8KCw== dependencies: "@react-native-community/cli-tools" "^7.0.1" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 chalk "^4.1.2" execa "^1.0.0" fs-extra "^8.1.0" @@ -1192,30 +1170,6 @@ slash "^3.0.0" xmldoc "^1.1.2" -<<<<<<< HEAD -"@react-native-community/cli-platform-android@^7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-7.0.1.tgz#d165897edf401f9bceff1f361ef446528133cb52" - integrity sha512-nOr0aMkxAymCnbtsQwXBlyoRN2Y+IzC7Qz5T+/zyWwEbTY8SKQI8uV+8+qttUvzSvuXa2PeXsTWluuliOS8KCw== -======= -"@react-native-community/cli-platform-ios@^7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-7.0.1.tgz#1c27af85229246b7a528e97f093e38859896cc93" - integrity sha512-PLRIbzrCzSedmpjuFtQqcqUD45G8q7sEciI1lf5zUbVMXqjIBwJWS7iz8235PyWwj8J4MNHohLC+oyRueFtbGg== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 - dependencies: - "@react-native-community/cli-tools" "^7.0.1" - chalk "^4.1.2" - execa "^1.0.0" -<<<<<<< HEAD - fs-extra "^8.1.0" - glob "^7.1.3" - jetifier "^1.6.2" - lodash "^4.17.15" - logkitty "^0.7.1" - slash "^3.0.0" - xmldoc "^1.1.2" - "@react-native-community/cli-platform-ios@^7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-7.0.1.tgz#1c27af85229246b7a528e97f093e38859896cc93" @@ -1224,8 +1178,6 @@ "@react-native-community/cli-tools" "^7.0.1" chalk "^4.1.2" execa "^1.0.0" -======= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 glob "^7.1.3" js-yaml "^3.13.1" lodash "^4.17.15" @@ -1233,15 +1185,6 @@ plist "^3.0.2" xcode "^3.0.0" -<<<<<<< HEAD -"@react-native-community/cli-plugin-metro@^7.0.4": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-7.0.4.tgz#cd3010f6b9f955df2630ceea9fc8816a12843dde" - integrity sha512-DEV9WwJ6mB8zWFvNe/Z/eGmtmQmsZcu9VIqjxT7e9xZr2csB9ZlOZiweAMFO5cuVWZZgfL+NYIaQiFi0E0DFXw== - dependencies: - "@react-native-community/cli-server-api" "^7.0.4" - "@react-native-community/cli-tools" "^6.2.1" -======= "@react-native-community/cli-plugin-metro@^7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-7.0.1.tgz#c7a04651fe96dbb4d0534cd9efef1b044d899dfa" @@ -1249,7 +1192,6 @@ dependencies: "@react-native-community/cli-server-api" "^7.0.1" "@react-native-community/cli-tools" "^7.0.1" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 chalk "^4.1.2" metro "^0.67.0" metro-config "^0.67.0" @@ -1259,15 +1201,6 @@ metro-runtime "^0.67.0" readline "^1.3.0" -<<<<<<< HEAD -"@react-native-community/cli-server-api@^7.0.4": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-7.0.4.tgz#b71e3413d4188b1bb3110267674ff31ce434b163" - integrity sha512-NzwLKgshx1aFJad5b972rFowEx8ueHRFFXQFnBbvEuE3KsivDOTIwO0zn7cAO1zpxlFRxUFfcI1Pe4Aymi3xZw== - dependencies: - "@react-native-community/cli-debugger-ui" "^7.0.3" - "@react-native-community/cli-tools" "^6.2.1" -======= "@react-native-community/cli-server-api@^7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-7.0.1.tgz#8fde9d615cf2cb296d0bed2933cf38d36af6f539" @@ -1275,36 +1208,13 @@ dependencies: "@react-native-community/cli-debugger-ui" "^7.0.1" "@react-native-community/cli-tools" "^7.0.1" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.0" nocache "^3.0.1" pretty-format "^26.6.2" serve-static "^1.13.1" - ws "^7.5.1" - -<<<<<<< HEAD -"@react-native-community/cli-tools@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-6.2.1.tgz#6f7ada6559846b49fb9fcfed522399b232976ada" - integrity sha512-7RbOkZLT/3YG8CAYYM70ajRKIOgVxK/b4t9KNsPq+2uen99MGezfeglC8s1cs3vBNVVxCo0a2JbXg18bUd8eqA== -======= -"@react-native-community/cli-tools@^7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-7.0.1.tgz#73790d6ca2825e42a70a770c1b403a6777e690d6" - integrity sha512-0xra4hKNA5PR2zYVXsDMNiXMGaDNoNRYMY6eTP2aVIxQbqIcVMDWSyCA8wMWX5iOpMWg0cZGaQ6a77f3Rlb34g== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 - dependencies: - appdirsjs "^1.2.4" - chalk "^4.1.2" - lodash "^4.17.15" - mime "^2.4.1" - node-fetch "^2.6.0" - open "^6.2.0" -<<<<<<< HEAD - semver "^6.3.0" - shell-quote "^1.7.3" + ws "^1.1.0" "@react-native-community/cli-tools@^7.0.1": version "7.0.1" @@ -1317,8 +1227,6 @@ mime "^2.4.1" node-fetch "^2.6.0" open "^6.2.0" -======= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 ora "^5.4.1" semver "^6.3.0" shell-quote "^1.7.3" @@ -1328,22 +1236,6 @@ resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-7.0.1.tgz#c3de43d45866804c5c15251a014402da5853b7b1" integrity sha512-8QedX5vagXoKFLzoyAEGeg2aOzNghjoXFP0Tm6LszdnFuNee03DLkGP7cKCEY+gtuhXLhdfd6XmK+ROgWqBEMQ== -<<<<<<< HEAD -"@react-native-community/cli@^7.0.3": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-7.0.4.tgz#cb4898bf9e3340ea812fa2bf194abd2429832752" - integrity sha512-W9nACtHWaLJZIP48cQmhQOnl5/7maoWE1Aji67MrLeIoB+ScNTJxaHfV4fMcklD6B6XEhaKokPACRZWm36zAog== - dependencies: - "@react-native-community/cli-debugger-ui" "^7.0.3" - "@react-native-community/cli-hermes" "^6.3.1" - "@react-native-community/cli-plugin-metro" "^7.0.4" - "@react-native-community/cli-server-api" "^7.0.4" - "@react-native-community/cli-tools" "^6.2.1" - "@react-native-community/cli-types" "^6.0.0" - appdirsjs "^1.2.4" - chalk "^4.1.2" - command-exists "^1.2.8" -======= "@react-native-community/cli@^7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-7.0.1.tgz#6ece01540b855e0c5f1d24db43cb4c48854301c7" @@ -1358,7 +1250,6 @@ "@react-native-community/cli-tools" "^7.0.1" "@react-native-community/cli-types" "^7.0.1" chalk "^4.1.2" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 commander "^2.19.0" execa "^1.0.0" find-up "^4.1.0" @@ -1367,12 +1258,6 @@ leven "^3.1.0" lodash "^4.17.15" minimist "^1.2.0" -<<<<<<< HEAD - node-stream-zip "^1.9.1" - ora "^3.4.0" - pretty-format "^26.6.2" -======= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 prompts "^2.4.0" semver "^6.3.0" @@ -1918,7 +1803,6 @@ arr-map@^2.0.0, arr-map@^2.0.2: dependencies: make-iterator "^1.0.0" -<<<<<<< HEAD array-each@^1.0.0, array-each@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" @@ -1928,12 +1812,6 @@ array-includes@^3.1.4, array-includes@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== -======= -array-includes@^3.1.1, array-includes@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" - integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: call-bind "^1.0.2" define-properties "^1.1.4" @@ -1941,7 +1819,6 @@ array-includes@^3.1.1, array-includes@^3.1.3: get-intrinsic "^1.1.1" is-string "^1.0.7" -<<<<<<< HEAD array-initial@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" @@ -1962,8 +1839,6 @@ array-slice@^1.0.0: resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== -======= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -2244,7 +2119,6 @@ bach@^1.0.0, bach@^1.2.0: async-settle "^1.0.0" now-and-later "^2.0.0" -<<<<<<< HEAD back@1.0.x: version "1.0.2" resolved "https://registry.yarnpkg.com/back/-/back-1.0.2.tgz#a93f5e6ce69729984d5901a2bb16e3b01a4d6369" @@ -2257,8 +2131,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -======= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 base64-js@^1.1.2, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -2271,7 +2143,6 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -<<<<<<< HEAD beachball@^2.30.1: version "2.30.1" resolved "https://registry.yarnpkg.com/beachball/-/beachball-2.30.1.tgz#36057015f09f151abc24cf593d151303367b1f51" @@ -2316,37 +2187,10 @@ bplist-creator@0.1.0: dependencies: stream-buffers "2.2.x" -bplist-parser@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.3.1.tgz#e1c90b2ca2a9f9474cc72f6862bbf3fee8341fd1" - integrity sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA== -======= -big-integer@1.6.x: - version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" - integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== - -bl@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -bplist-creator@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.1.0.tgz#018a2d1b587f769e379ef5519103730f8963ba1e" - integrity sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg== - dependencies: - stream-buffers "2.2.x" - bplist-parser@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.3.0.tgz#ba50666370f61bbf94881636cd9f7d23c5286090" integrity sha512-zgmaRvT6AN1JpPPV+S0a1/FAtoxSreYDccZGIqEMSvZl9DMe70mJ7MFzpxa1X+gHVdkToE2haRUHHMiW1OdejA== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: big-integer "1.6.x" @@ -2401,14 +2245,6 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -2495,7 +2331,7 @@ chalk@^2.0.0, chalk@^2.0.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3: +chalk@^3, chalk@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== @@ -2547,15 +2383,9 @@ ci-info@^2.0.0: integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== ci-info@^3.2.0: -<<<<<<< HEAD - version "3.3.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128" - integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== -======= version "3.3.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 cjs-module-lexer@^0.6.0: version "0.6.0" @@ -2571,25 +2401,6 @@ clang-format@^1.2.4: glob "^7.0.0" resolve "^1.1.6" -<<<<<<< HEAD -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== - dependencies: - restore-cursor "^2.0.0" -======= -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 - cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -2597,17 +2408,11 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -<<<<<<< HEAD -cli-spinners@^2.0.0: +cli-spinners@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== -cli-spinners@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - cli-table3@^0.6.0: version "0.6.2" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.2.tgz#aaf5df9d8b5bf12634dc8b3040806a0c07120d2a" @@ -2616,12 +2421,6 @@ cli-table3@^0.6.0: string-width "^4.2.0" optionalDependencies: "@colors/colors" "1.5.0" -======= -cli-spinners@^2.5.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" - integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 cli-width@^3.0.0: version "3.0.0" @@ -3020,26 +2819,10 @@ depd@2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -<<<<<<< HEAD -deprecated-react-native-prop-types@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz#c10c6ee75ff2b6de94bb127f142b814e6e08d9ab" - integrity sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA== - dependencies: - "@react-native/normalize-color" "*" - invariant "*" - prop-types "*" - destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== -======= -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 detect-newline@^3.0.0: version "3.1.0" @@ -3913,11 +3696,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -<<<<<<< HEAD fsevents@^2.1.2, fsevents@^2.3.2, fsevents@~2.3.2: -======= -fsevents@^2.1.2, fsevents@^2.3.2: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -4095,7 +3874,7 @@ globby@^11.0.0, globby@^11.0.3, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -4321,22 +4100,10 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -<<<<<<< HEAD inherits@2, inherits@2.0.4, inherits@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -======= -inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 inquirer@^7.1.0: version "7.3.3" @@ -4478,17 +4245,10 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== -<<<<<<< HEAD is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== -======= -is-negative-zero@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" - integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 is-number-object@^1.0.4: version "1.0.7" @@ -4574,16 +4334,6 @@ is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -<<<<<<< HEAD -======= - -is-weakref@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" - integrity sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ== - dependencies: - call-bind "^1.0.0" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 is-weakref@^1.0.2: version "1.0.2" @@ -4808,36 +4558,20 @@ jest-haste-map@^26.6.2: fsevents "^2.1.2" jest-haste-map@^27.3.1: -<<<<<<< HEAD - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== - dependencies: - "@jest/types" "^27.5.1" -======= version "27.4.6" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.4.6.tgz#c60b5233a34ca0520f325b7e2cc0a0140ad0862a" integrity sha512-0tNpgxg7BKurZeFkIOvGCkbmOHbLFf4LUQOxrQSMjvrQaQe3l6E8x6jYC1NuWkGo5WDdbr8FEzUxV2+LWNawKQ== dependencies: "@jest/types" "^27.4.2" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" -<<<<<<< HEAD - graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" -======= graceful-fs "^4.2.4" jest-regex-util "^27.4.0" jest-serializer "^27.4.0" jest-util "^27.4.2" jest-worker "^27.4.6" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: @@ -4929,17 +4663,10 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -<<<<<<< HEAD -jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== -======= jest-regex-util@^27.4.0: version "27.4.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.4.0.tgz#e4c45b52653128843d07ad94aec34393ea14fbca" integrity sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 jest-resolve-dependencies@^26.6.3: version "26.6.3" @@ -5031,15 +4758,6 @@ jest-serializer@^26.6.2: "@types/node" "*" graceful-fs "^4.2.4" -<<<<<<< HEAD -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.5.1.tgz#81438410a30ea66fd57ff730835123dea1fb1f64" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" -======= jest-serializer@^27.4.0: version "27.4.0" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.4.0.tgz#34866586e1cae2388b7d12ffa2c7819edef5958a" @@ -5047,7 +4765,6 @@ jest-serializer@^27.4.0: dependencies: "@types/node" "*" graceful-fs "^4.2.4" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 jest-snapshot@^26.6.2: version "26.6.2" @@ -5083,18 +4800,6 @@ jest-util@^26.6.2: is-ci "^2.0.0" micromatch "^4.0.2" -<<<<<<< HEAD -jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" -======= jest-util@^27.4.2: version "27.4.2" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.4.2.tgz#ed95b05b1adfd761e2cda47e0144c6a58e05a621" @@ -5105,7 +4810,6 @@ jest-util@^27.4.2: chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.4" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 picomatch "^2.2.3" jest-validate@^24.9.0: @@ -5154,17 +4858,10 @@ jest-worker@^26.0.0, jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -<<<<<<< HEAD -jest-worker@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== -======= jest-worker@^27.4.6: version "27.4.6" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.4.6.tgz#5d2d93db419566cb680752ca0792780e71b3273e" integrity sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: "@types/node" "*" merge-stream "^2.0.0" @@ -5352,7 +5049,6 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -<<<<<<< HEAD jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -5362,8 +5058,6 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -======= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -5595,14 +5289,6 @@ log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -log-symbols@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - logkitty@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/logkitty/-/logkitty-0.7.1.tgz#8e8d62f4085a826e8d38987722570234e33c6aa7" @@ -6317,24 +6003,17 @@ once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: dependencies: wrappy "1" -<<<<<<< HEAD -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== - dependencies: - mimic-fn "^1.0.0" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== -======= onetime@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + dependencies: + mimic-fn "^2.1.0" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" @@ -6369,33 +6048,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -<<<<<<< HEAD -ora@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" - integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== -======= -options@>=0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" - integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8= - -ora@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" - integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 - dependencies: - bl "^4.1.0" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-spinners "^2.5.0" - is-interactive "^1.0.0" - is-unicode-supported "^0.1.0" - log-symbols "^4.1.0" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -6589,17 +6241,10 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -<<<<<<< HEAD -plist@^3.0.2, plist@^3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.5.tgz#2cbeb52d10e3cdccccf0c11a63a85d830970a987" - integrity sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA== -======= plist@^3.0.2, plist@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.4.tgz#a62df837e3aed2bb3b735899d510c4f186019cbe" integrity sha512-ksrr8y9+nXOxQB2osVNqrgvX/XQPOXaU4BQMKjYq8PvaY1U18mo+fKgBSwzK+luSyinOuPae956lSVcBwxlAMg== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: base64-js "^1.5.1" xmlbuilder "^9.0.7" @@ -6678,17 +6323,10 @@ prompts@^2.0.1, prompts@^2.1.0, prompts@^2.3.0, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -<<<<<<< HEAD -prop-types@*, prop-types@^15.8.1: +prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== -======= -prop-types@^15.7.2: - version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" - integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: loose-envify "^1.4.0" object-assign "^4.1.1" @@ -6765,11 +6403,6 @@ react-native-codegen@^0.0.17: jscodeshift "^0.13.1" nullthrows "^1.1.1" -react-native-gradle-plugin@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.6.tgz#b61a9234ad2f61430937911003cddd7e15c72b45" - integrity sha512-eIlgtsmDp1jLC24dRn43hB3kEcZVqx6DUQbR0N1ABXGnMEafm9I3V3dUUeD1vh+Dy5WqijSoEwLNUPLgu5zDMg== - react-refresh@^0.4.0: version "0.4.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.3.tgz#966f1750c191672e76e16c2efa569150cc73ab53" @@ -6828,26 +6461,10 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -<<<<<<< HEAD read-yaml-file@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/read-yaml-file/-/read-yaml-file-2.1.0.tgz#c5866712db9ef5343b4d02c2413bada53c41c4a9" integrity sha512-UkRNRIwnhG+y7hpqnycCL/xbTk7+ia9VuVTC0S+zVbwd65DI9eUpRMfsWIGrCWxTU/mi+JW8cHQCrv+zfCbEPQ== -======= -readable-stream@^3.4.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 dependencies: js-yaml "^4.0.0" strip-bom "^4.0.0" @@ -6866,11 +6483,6 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -readline@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/readline/-/readline-1.3.0.tgz#c580d77ef2cfc8752b132498060dc9793a7ac01c" - integrity sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg== - readline@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/readline/-/readline-1.3.0.tgz#c580d77ef2cfc8752b132498060dc9793a7ac01c" @@ -7047,7 +6659,6 @@ resolve@^2.0.0-next.3: is-core-module "^2.2.0" path-parse "^1.0.6" -<<<<<<< HEAD resolve@~1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" @@ -7055,16 +6666,6 @@ resolve@~1.17.0: dependencies: path-parse "^1.0.6" -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -======= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -7135,33 +6736,15 @@ rxjs@^6.6.0: dependencies: tslib "^1.9.0" -<<<<<<< HEAD safe-buffer@5.1.2, safe-buffer@~5.1.1: -======= -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -<<<<<<< HEAD safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -======= -safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" @@ -7310,11 +6893,7 @@ shell-quote@^1.6.1, shell-quote@^1.7.3: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== -<<<<<<< HEAD -shelljs@^0.8.4: -======= shelljs@^0.8.5: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== @@ -7348,15 +6927,6 @@ signedsource@^1.0.0: integrity sha512-6+eerH9fEnNmi/hyM1DXcRK3pWdoMQtlkQ+ns0ntzunjKqp5i3sKCc80ym8Fib3iaYhdJUOPdhlJWj1tvge2Ww== simple-plist@^1.1.0: -<<<<<<< HEAD - version "1.3.1" - resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.1.tgz#16e1d8f62c6c9b691b8383127663d834112fb017" - integrity sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw== - dependencies: - bplist-creator "0.1.0" - bplist-parser "0.3.1" - plist "^3.0.5" -======= version "1.3.0" resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.0.tgz#f451997663eafd8ea6bad353a01caf49ef186d43" integrity sha512-uYWpeGFtZtVt2NhG4AHgpwx323zxD85x42heMJBan1qAiqqozIlaGrwrEt6kRjXWRWIXsuV1VLCvVmZan2B5dg== @@ -7364,7 +6934,6 @@ simple-plist@^1.1.0: bplist-creator "0.1.0" bplist-parser "0.3.0" plist "^3.0.4" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 sisteransi@^1.0.5: version "1.0.5" @@ -7499,24 +7068,6 @@ statuses@~1.5.0: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== -<<<<<<< HEAD -======= -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 stream-buffers@2.2.x: version "2.2.0" resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4" @@ -7578,26 +7129,8 @@ string.prototype.trimstart@^1.0.5: integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== dependencies: call-bind "^1.0.2" -<<<<<<< HEAD define-properties "^1.1.4" es-abstract "^1.19.5" -======= - define-properties "^1.1.3" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 strip-ansi@^5.0.0, strip-ansi@^5.2.0: version "5.2.0" @@ -7652,28 +7185,25 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -<<<<<<< HEAD supports-color@^8.0.0, supports-color@^8.1.0: -======= -supports-color@^8.0.0: ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" -<<<<<<< HEAD -supports-hyperlinks@^2.0.0, supports-hyperlinks@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" - integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== -======= supports-hyperlinks@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + dependencies: + has-flag "^4.0.0" + supports-color "^7.0.0" + +supports-hyperlinks@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" + integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== dependencies: has-flag "^4.0.0" supports-color "^7.0.0" @@ -8023,34 +7553,12 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -<<<<<<< HEAD "use-subscription@>=1.0.0 <1.6.0": version "1.5.1" resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1" integrity sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA== dependencies: object-assign "^4.1.1" -======= -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -use-subscription@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.0.0.tgz#25ed2161f75e9f6bd8c5c4acfe6087bfebfbfef4" - integrity sha512-PkDL9KSMN01nJYfa5c8O7Qbs7lmpzirfRWhWfIQN053hbIj5s1o5L7hrTzCfCCO2FsN2bKrU7ciRxxRcinmxAA== - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 utils-merge@1.0.1: version "1.0.1" @@ -8067,17 +7575,15 @@ uuid@^7.0.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== -<<<<<<< HEAD -uuid@^8.3.0, uuid@^8.3.1: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -======= uuid@^8.3.0: version "8.3.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + +uuid@^8.3.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== v8-compile-cache@^2.0.3: version "2.3.0" @@ -8310,17 +7816,6 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -<<<<<<< HEAD -======= -ws@^1.1.0: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" - integrity sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w== - dependencies: - options ">=0.0.5" - ultron "1.0.x" - ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 ws@^6.1.4: version "6.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" @@ -8328,24 +7823,16 @@ ws@^6.1.4: dependencies: async-limiter "~1.0.0" -<<<<<<< HEAD -ws@^7, ws@^7.4.6: - version "7.5.8" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" - integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== - -ws@^7.5.1: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -======= -ws@^7, ws@^7.2.3, ws@^7.5.1: +ws@^7, ws@^7.5.1: version "7.5.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 +ws@^7.4.6: + version "7.5.8" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" + integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== + xcode@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/xcode/-/xcode-3.0.1.tgz#3efb62aac641ab2c702458f9a0302696146aa53c" @@ -8381,17 +7868,15 @@ xmldoc@^1.1.2: dependencies: sax "^1.2.1" -<<<<<<< HEAD -xtend@^4.0.0, xtend@~4.0.1: +xtend@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -======= + xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 y18n@^4.0.0: version "4.0.3" From fbd3290caacfa8c67f3f7983a92972c2636c9715 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 10 Jan 2023 12:08:43 -0800 Subject: [PATCH 104/109] Resolve CircleCI config conflicts --- .circleci/config.yml | 58 ++++++++++---------------------------------- 1 file changed, 13 insertions(+), 45 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ac5cc8fa38..97b47fa2cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -329,7 +329,7 @@ jobs: - run: name: "Run Tests: JavaScript Tests" command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2 - # [macOS] Github#949 Disable this failing test + # TODO(macOS GH#949): Disable this failing test # - run_e2e: # platform: js @@ -388,8 +388,6 @@ jobs: steps: - brew_install: package: watchman - - brew_install: - package: node@16 - run: name: "Brew: Tap wix/brew" command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null @@ -594,23 +592,6 @@ jobs: command: cd template/android/ && ./gradlew assembleDebug # ------------------------- -<<<<<<< HEAD - # JOBS: Test Docker - # ------------------------- - test_docker: - machine: true - steps: - - checkout - - run: - name: Build Docker container for Android RNTester App - command: | - source ~/.bashrc - nvm i node - npm i -g yarn - echo y | npx envinfo@latest - yarn run docker-setup-android - yarn run docker-build-android -======= # JOBS: Test Android RNTester # ------------------------- test_android_rntester: @@ -626,7 +607,6 @@ jobs: - run: name: Assemble RNTester command: ./gradlew :packages:rn-tester:android:app:assembleDebug ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 # ------------------------- # JOBS: Test iOS Template @@ -949,8 +929,7 @@ workflows: run_disabled_tests: false filters: branches: - # [macOS] disable this test which is redundant to Azure Devops test and it requires a CCI plan with resource-class:large. - ignore: /.*/ + ignore: gh-pages - test_android_template: requires: - build_npm_package @@ -960,8 +939,7 @@ workflows: - test_android_rntester: filters: branches: - # [macOS] disable this test which is redundant to Azure Devops test and it requires a CCI plan with resource-class:large. - ignore: /.*/ + ignore: gh-pages - test_ios_template: requires: - build_npm_package @@ -1003,25 +981,16 @@ workflows: # use_hermes: true # use_frameworks: true # run_unit_tests: true - # [macOS] Github#949 Disable this failing test - # - test_js: - # name: test_js_prev_lts - # executor: nodeprevlts - # filters: - # branches: - # ignore: gh-pages - - test_docker: + - test_js: + name: test_js_prev_lts + executor: nodeprevlts filters: branches: - # [macOS] disable this test which is redundant to Azure Devops test and in the fork it fails because of Microsoft's V8 upgrade to Android - ignore: /.*/ + ignore: gh-pages - test_windows: filters: branches: - # [macOS disable this test which requires a CCI plan. - # ignore: gh-pages - ignore: /.*/ - # macOS] + ignore: gh-pages run_disabled_tests: false # This workflow should only be triggered by release script @@ -1071,11 +1040,10 @@ workflows: # Gather coverage - js_coverage: - # [macOS disable this test, it fails in the fork due to not being set up for coveralls filters: branches: - ignore: /.*/ - # macOS] + ignore: gh-pages + nightly: unless: << pipeline.parameters.run_package_release_workflow_only >> triggers: @@ -1083,13 +1051,13 @@ workflows: cron: "0 20 * * *" filters: branches: - # [macOS disable this release. We never want to release anything from this fork via CCI. + # [TODO(macOS GH#774): disable this release. We never want to release anything from this fork via CCI. ignore: /.*/ # only: # - main - # macOS] + # ]TODO(macOS GH#774) jobs: - nightly_job - build_npm_package: - publish_npm_args: --nightly + publish_npm_args: --nightly \ No newline at end of file From ebcf64684f16887b42dec5a9d3b653c0d5bdd62d Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 10 Jan 2023 14:21:16 -0800 Subject: [PATCH 105/109] :Merge 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 --- Libraries/Animated/nodes/AnimatedColor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Libraries/Animated/nodes/AnimatedColor.js b/Libraries/Animated/nodes/AnimatedColor.js index c2d9dc378c..f7bed39cef 100644 --- a/Libraries/Animated/nodes/AnimatedColor.js +++ b/Libraries/Animated/nodes/AnimatedColor.js @@ -321,4 +321,7 @@ export default class AnimatedColor extends AnimatedWithChildren { g: this.g.__getNativeTag(), b: this.b.__getNativeTag(), a: this.a.__getNativeTag(), + nativeColor: this.nativeColor, + }; } +} \ No newline at end of file From 3ff4b32821c480cbd8a9c7c241c60190789af118 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Jan 2023 13:55:40 -0800 Subject: [PATCH 106/109] Don't use borderColorsWithTraitCollection on macOS --- React/Views/RCTView.m | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/React/Views/RCTView.m b/React/Views/RCTView.m index a0200bf8d3..7400cb1589 100644 --- a/React/Views/RCTView.m +++ b/React/Views/RCTView.m @@ -1112,32 +1112,21 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x) }; } +#if !TARGET_OS_OSX // [macOS] - (RCTBorderColors)borderColorsWithTraitCollection:(UITraitCollection *)traitCollection +#else // [macOS +- (RCTBorderColors)borderColors +#endif // macOS] { const BOOL isRTL = _reactLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft; - UIColor *directionAwareBorderLeftColor = nil; - UIColor *directionAwareBorderRightColor = nil; + RCTUIColor *directionAwareBorderLeftColor = nil; + RCTUIColor *directionAwareBorderRightColor = nil; if ([[RCTI18nUtil sharedInstance] doLeftAndRightSwapInRTL]) { RCTUIColor *borderStartColor = _borderStartColor ?: _borderLeftColor; // macOS RCTUIColor RCTUIColor *borderEndColor = _borderEndColor ?: _borderRightColor; // macOS RCTUIColor -<<<<<<< HEAD - RCTUIColor *directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor; // macOS RCTUIColor - RCTUIColor *directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor; // macOS RCTUIColor - - return (RCTBorderColors){ - (_borderTopColor ?: _borderColor).CGColor, - (directionAwareBorderLeftColor ?: _borderColor).CGColor, - (_borderBottomColor ?: _borderColor).CGColor, - (directionAwareBorderRightColor ?: _borderColor).CGColor, - }; - } - - RCTUIColor *directionAwareBorderLeftColor = isRTL ? _borderEndColor : _borderStartColor; // macOS RCTUIColor - RCTUIColor *directionAwareBorderRightColor = isRTL ? _borderStartColor : _borderEndColor; // macOS RCTUIColor -======= directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor; directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor; } else { @@ -1145,9 +1134,9 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x) directionAwareBorderRightColor = (isRTL ? _borderStartColor : _borderEndColor) ?: _borderRightColor; } - UIColor *borderColor = _borderColor; - UIColor *borderTopColor = _borderTopColor; - UIColor *borderBottomColor = _borderBottomColor; + RCTUIColor *borderColor = _borderColor; + RCTUIColor *borderTopColor = _borderTopColor; + RCTUIColor *borderBottomColor = _borderBottomColor; #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 if (@available(iOS 13.0, *)) { @@ -1160,7 +1149,6 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x) [directionAwareBorderRightColor resolvedColorWithTraitCollection:self.traitCollection]; } #endif ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 return (RCTBorderColors){ (borderTopColor ?: borderColor).CGColor, @@ -1197,8 +1185,11 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x) const RCTCornerRadii cornerRadii = [self cornerRadii]; const UIEdgeInsets borderInsets = [self bordersAsInsets]; +#if !TARGET_OS_OSX // [macOS] const RCTBorderColors borderColors = [self borderColorsWithTraitCollection:self.traitCollection]; - +#else // [macOS + const RCTBorderColors borderColors = [self borderColors]; +#endif // macOS] BOOL useIOSBorderRendering = RCTCornerRadiiAreEqual(cornerRadii) && RCTBorderInsetsAreEqual(borderInsets) && RCTBorderColorsAreEqual(borderColors) && _borderStyle == RCTBorderStyleSolid && From cc38d706d0370726adc0a23d70d9f785d34bac38 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Jan 2023 14:08:13 -0800 Subject: [PATCH 107/109] Resolve RCTUITextView conflict --- Libraries/Animated/nodes/AnimatedColor.js | 2 +- .../NativeComponent/PlatformBaseViewConfig.js | 2 +- .../Text/TextInput/Multiline/RCTUITextView.m | 41 +------ .../RCTBackedTextInputViewProtocol.h | 3 +- .../Text/TextInput/RCTBaseTextInputView.m | 13 +-- .../TextInput/Singleline/RCTUITextField.m | 6 + .../TextInput/RCTTextInputComponentView.mm | 13 ++- packages/rn-tester/Podfile.lock | 103 ++++++------------ 8 files changed, 59 insertions(+), 124 deletions(-) diff --git a/Libraries/Animated/nodes/AnimatedColor.js b/Libraries/Animated/nodes/AnimatedColor.js index f7bed39cef..603b329fa7 100644 --- a/Libraries/Animated/nodes/AnimatedColor.js +++ b/Libraries/Animated/nodes/AnimatedColor.js @@ -324,4 +324,4 @@ export default class AnimatedColor extends AnimatedWithChildren { nativeColor: this.nativeColor, }; } -} \ No newline at end of file +} diff --git a/Libraries/NativeComponent/PlatformBaseViewConfig.js b/Libraries/NativeComponent/PlatformBaseViewConfig.js index ec696a949b..777a114950 100644 --- a/Libraries/NativeComponent/PlatformBaseViewConfig.js +++ b/Libraries/NativeComponent/PlatformBaseViewConfig.js @@ -560,4 +560,4 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = }, }; -export default PlatformBaseViewConfig; \ No newline at end of file +export default PlatformBaseViewConfig; diff --git a/Libraries/Text/TextInput/Multiline/RCTUITextView.m b/Libraries/Text/TextInput/Multiline/RCTUITextView.m index 3256fb3788..5a36d95e05 100644 --- a/Libraries/Text/TextInput/Multiline/RCTUITextView.m +++ b/Libraries/Text/TextInput/Multiline/RCTUITextView.m @@ -270,43 +270,14 @@ static RCTUIColor *defaultPlaceholderColor() // [macOS] - (void)setAttributedText:(NSAttributedString *)attributedText { -<<<<<<< HEAD - // Using `setAttributedString:` while user is typing breaks some internal mechanics - // when entering complex input languages such as Chinese, Korean or Japanese. - // see: https://github.com/facebook/react-native/issues/19339 - - // We try to avoid calling this method as much as we can. - // If the text has changed, there is nothing we can do. #if !TARGET_OS_OSX // [macOS] - if (![super.attributedText.string isEqualToString:attributedText.string]) { - [super setAttributedText:attributedText]; - } else { - // But if the text is preserved, we just copying the attributes from the source string. - if (![super.attributedText isEqualToAttributedString:attributedText]) { - [self copyTextAttributesFrom:attributedText]; - } - } -#else // [macOS - if (![self.textStorage isEqualTo:attributedText.string]) { - // Break undo coalescing when the text is changed by JS (e.g. autocomplete). - [self breakUndoCoalescing]; - - if (attributedText != nil) { - [self.textStorage setAttributedString:attributedText]; - } else { - // Avoid Exception thrown while executing UI block: *** -[NSBigMutableString replaceCharactersInRange:withString:]: nil argument - [self.textStorage setAttributedString:[NSAttributedString new]]; - } - } else { - // But if the text is preserved, we just copy the attributes from the source string. - if (![self.textStorage isEqualToAttributedString:attributedText]) { - [self copyTextAttributesFrom:attributedText]; - } - } -#endif // macOS] -======= [super setAttributedText:attributedText]; ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 +#else // [macOS + // Break undo coalescing when the text is changed by JS (e.g. autocomplete). + [self breakUndoCoalescing]; + // Avoid Exception thrown while executing UI block: *** -[NSBigMutableString replaceCharactersInRange:withString:]: nil argument + [self.textStorage setAttributedString:attributedText ?: [NSAttributedString new]]; +#endif // macOS] [self textDidChange]; } diff --git a/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h b/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h index 6c29a8005d..e5ffa885a0 100644 --- a/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +++ b/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN #if !TARGET_OS_OSX // [macOS] @protocol RCTBackedTextInputViewProtocol #else // [macOS -@protocol RCTBackedTextInputViewProtocol +@protocol RCTBackedTextInputViewProtocol #endif // macOS] @property (nonatomic, copy, nullable) NSAttributedString *attributedText; @@ -76,7 +76,6 @@ NS_ASSUME_NONNULL_BEGIN #endif // macOS] #if TARGET_OS_OSX // [macOS -- (BOOL)hasMarkedText; // UITextInput method for OSX - (CGSize)sizeThatFits:(CGSize)size; #endif // macOS] diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index 24981440aa..6630f01f4d 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -129,10 +129,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)decoder) [self.backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] || self.backedTextInputView.markedTextRange || self.backedTextInputView.isSecureTextEntry || - fontHasBeenUpdatedBySystem; #else // [macOS - NO; + // There are multiple Korean input sources (2-Set, 3-Set, etc). Check substring instead instead + [[[self.backedTextInputView inputContext] selectedKeyboardInputSource] containsString:@"com.apple.inputmethod.Korean"] || + [self.backedTextInputView hasMarkedText] || + [self.backedTextInputView isKindOfClass:[NSSecureTextField class]] || #endif // macOS] + fontHasBeenUpdatedBySystem; if (shouldFallbackToBareTextComparison) { return ([newText.string isEqualToString:oldText.string]); @@ -156,12 +159,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)decoder) range:NSMakeRange(0, attributedTextCopy.length)]; textNeedsUpdate = ([self textOf:attributedTextCopy equals:backedTextInputViewTextCopy] == NO); -#if TARGET_OS_OSX // [macOS - // If we are in a language that uses conversion (e.g. Japanese), ignore updates if we have unconverted text. - if ([self.backedTextInputView hasMarkedText]) { - textNeedsUpdate = NO; - } -#endif // macOS] if (eventLag == 0 && textNeedsUpdate) { #if !TARGET_OS_OSX // [macOS] diff --git a/Libraries/Text/TextInput/Singleline/RCTUITextField.m b/Libraries/Text/TextInput/Singleline/RCTUITextField.m index 926108a862..e3dff048f7 100644 --- a/Libraries/Text/TextInput/Singleline/RCTUITextField.m +++ b/Libraries/Text/TextInput/Singleline/RCTUITextField.m @@ -132,6 +132,12 @@ { return ((NSTextView *)self.currentEditor).hasMarkedText; } + +- (NSArray *)validAttributesForMarkedText +{ + return ((NSTextView *)self.currentEditor).validAttributesForMarkedText; +} + #endif // macOS] #pragma mark - Accessibility diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index 242cdb195d..0fee049938 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -662,20 +662,23 @@ using namespace facebook::react; } }]; -#if !TARGET_OS_OSX // [macOS] BOOL shouldFallbackToBareTextComparison = [_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"dictation"] || +#if !TARGET_OS_OSX // [macOS] [_backedTextInputView.textInputMode.primaryLanguage isEqualToString:@"ko-KR"] || _backedTextInputView.markedTextRange || _backedTextInputView.isSecureTextEntry || fontHasBeenUpdatedBySystem; - +#else // [macOS + // There are multiple Korean input sources (2-Set, 3-Set, etc). Check substring instead instead + [[[self.backedTextInputView inputContext] selectedKeyboardInputSource] containsString:@"com.apple.inputmethod.Korean"] || + [self.backedTextInputView hasMarkedText] || + [self.backedTextInputView isKindOfClass:[NSSecureTextField class]] || + fontHasBeenUpdatedBySystem; +#endif // macOS] if (shouldFallbackToBareTextComparison) { return ([newText.string isEqualToString:oldText.string]); } else { -#endif // [macOS] return ([newText isEqualToAttributedString:oldText]); -#if !TARGET_OS_OSX // [macOS] } -#endif // [macOS] } @end diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index e9fc44a90b..419ae04c7f 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -562,15 +562,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 613e39eac4239cc72b15421247b5ab05361266a2 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 -<<<<<<< HEAD DoubleConversion: ed15e075aa758ac0e4c1f8b830bd4e4d40d669e8 - FBLazyVector: 4f7dec9b06e2161bdc7451b81285b955e44120f2 - FBReactNativeSpec: 884fc2c1ae9aac805b5b1683556539017f128e30 -======= - DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 - FBLazyVector: b81a2b70c72d8b0aefb652cea22c11e9ffd02949 - FBReactNativeSpec: 277e2460e8a1a20883306c886d5d57a361e32a71 ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + FBLazyVector: 384527e08219663bcf4929e2d266ae2a7ee355c9 + FBReactNativeSpec: 3ab1f6402e4c0cb609a2dd69ee5388553665a4ce Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c @@ -585,75 +579,40 @@ SPEC CHECKSUMS: libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c -<<<<<<< HEAD RCT-Folly: 24c6da766832002a4a2aac5f79ee0ca50fbe8507 - RCTRequired: 9b3b3dd4bec7ff068b05da2f77a4ce87b79056ce - RCTTypeSafety: 0a550fe20009fbdb80b750bd92d8476b4fbcfd4b - React: a7ba329278133e1d7b0d57eac0f455cb53c484ef - React-callinvoker: a7973d14f10e7bfa72fe0cf97264dba48d49cc5c + RCTRequired: c227d1cbf4257746e1984626e164dd070135ab51 + RCTTypeSafety: cda767ff31bb0dcdeac45b4a1a2d04689a7a8e5a + React: fdeb98299a820dbec6cbb1e4c004fa3799dd376f + React-callinvoker: 8f64ce3fa5d782daa2fbee4cd4821698aaf673f1 React-Codegen: 61a79489c164568e1575cc662fa7c9a167215dcc - React-Core: 83f76a9e553370910f7dd036c227ae3728514e4c - React-CoreModules: 956c5003b1f393ecdf01cac81b9abd61c53cb897 - React-cxxreact: 0d26fe3e743964ec28be7480781b33669d7edcb2 - React-jsi: 0fe864a1e1ab4089ae7361cb768bda8f20350ad8 - React-jsiexecutor: 80621468529516b8f1164685d8e62d72c78f7551 - React-jsinspector: f1d9ed916336a72ec377fb8c0a1d784a7a0085ae - React-logger: 7dfa0e98931f90b501143d2cf5fbbd3fbb03a5c1 - React-perflogger: 6470780013040448a52bdab0e668573ad6da047c - React-RCTActionSheet: 7a120b18673235b7bec8c6b7f45ffe6103a80c45 - React-RCTAnimation: e380831ab78e2e6e41fb21d99c2515b61ded67b2 - React-RCTBlob: ef1b52b27841714d8e77e65a3f46ae37ab5c0286 - React-RCTImage: 73f3c9efc611c90eb57fa8ffd8390f748cd12163 - React-RCTLinking: 862a74f8b690f080fbbb071d6c9ee9f918d85abf - React-RCTNetwork: 0ad181f3eccebc98acd5aae88668ec8b977ada4f - React-RCTPushNotification: 2f6d6c013536e7381517a89854b2e0dec3ccaea0 - React-RCTSettings: 69dc88fa59c154c0f020de20af286e1f18ecaf08 - React-RCTTest: c4409159d6602fac7ea0c77dd78edbfd87451003 - React-RCTText: e76719accaa721a86ef10fd26418c632364865cc - React-RCTVibration: b13450dceee3922928d5f2ba626f13a8c8a41592 - React-runtimeexecutor: efede3b2374f6eea50a485f042f7f8c13e3b4d80 + React-Core: d26ae99463cddeadc5639612ca30616561415789 + React-CoreModules: cfce02ad8ea53a2295e1dac937eba5a90622a2bb + React-cxxreact: 12fd22c456355c71e5c5081dcffea1f32cae5773 + React-jsi: ae9bc2bfc04c6ff51b2cb72f57d0ae3ceed45ade + React-jsiexecutor: d58c93c836f125efe1dd5a6a4e67e91e22e879d2 + React-jsinspector: d42e72bb4097e204fb58e0dfa6a73064d5110350 + React-logger: 582ddca30294da58d26d7722038868e016907212 + React-perflogger: 3a2074e543aec103be610bac726ce08d7bca0a73 + React-RCTActionSheet: 2bd2272f1da5984e560ee2ff21385b252faea787 + React-RCTAnimation: 91bb2eef31ddb8254b440e9e270a379b724d42e7 + React-RCTBlob: 80f2a58eb43ed52347c74862396d5f782a43f1a7 + React-RCTImage: 072355172731a4e98969d8edc3429b34c66145d3 + React-RCTLinking: a453010e6eed69a6040466df1d027568f2614682 + React-RCTNetwork: 359c5d7fcab48d6ce482e1d41d18b41aef1c88ed + React-RCTPushNotification: 10ce9158a757b7b421e1ec859075c2b62a660c8c + React-RCTSettings: 814b8cd77826d9f701f5a405615af447f2cdb2cf + React-RCTTest: acb0c4b891472b017d6ad5b467677e09cc04fbcc + React-RCTText: 738955a75c0377dfca55de5c5f5197fb7ea2de46 + React-RCTVibration: 8ddcc5d106204b03a2b6cb7312dfb266c411c6f0 + React-runtimeexecutor: 406c4f19aaad1b5c000cb035b32b6abea250775d React-TurboModuleCxx-RNW: 881411415eafe818f9cc3c4016167cc3d219402b - React-TurboModuleCxx-WinRTPort: 07e0f59bfaa337933c7b114d374d0e2a93b4b5e8 - ReactCommon: 3199785c30e1efcce92ca7da5038c7a248124aa3 - ScreenshotManager: b378292226c78474e70b139ba2e19f584836c520 -======= - RCT-Folly: 803a9cfd78114b2ec0f140cfa6fa2a6bafb2d685 - RCTRequired: af2d6080a4b9ba0885b28ca78879a92066c71cab - RCTTypeSafety: c7a7f67ae5b1b986b78d817baa408fc984ab7c0c - React: f64c9f6db5428717922a3292ba6a448615a2e143 - React-callinvoker: c5d61e29df57793f0dc10ec2bc01c846f863e51f - React-Codegen: 2256e335ccce7326eeca6d7a668e05c4de259289 - React-Core: 30784d0eacbd709a3a6a5ae7c02c928634a6247e - React-CoreModules: a8e2bdc1ebbf8d440478456197abd58d1691f61a - React-cxxreact: cfc1663dae1ea52b465bbf021ef7b1527c5dc80c - React-Fabric: 30b8fa96a0c56d1c11348f77607464eb87bb3f9f - React-graphics: 9a84942b49ea1375ce83844041fa2ba766cfe0b9 - React-jsi: c1c0108d86e1378aabf7c9146ed7d12d87c7df85 - React-jsiexecutor: d08ec14edc8f2e19af51550cd1505332eae35c7b - React-jsinspector: 7d223826b0e7a61b3540c21b9eca2603b1d4e823 - React-logger: 2009c0280c286a76200d6b7c5fe242fad51ddd7a - React-perflogger: fe66bd6d8b17ebcfdf0159bf41fe28d8035ac20c - React-RCTActionSheet: 3131a0b9280aa0e51bdf54b3d79aecd8503db62c - React-RCTAnimation: 0c0a35cd27c5005cfddcda59b612994f4ebdaa43 - React-RCTBlob: 48cae62d905ef96ab10c84ab16163643a3c872a7 - React-RCTFabric: c126a269f6279896e19e133d6b1e019fa2f0f028 - React-RCTImage: 2ce3f1f72de91798eb31c9001b30cab8d1c71c4e - React-RCTLinking: 77300bd3cda2a613845ae0056b62ad330c2d319d - React-RCTNetwork: 8ef793740f893987384918e04382d37fac36960d - React-RCTPushNotification: 1845de920c2583f4541e13b3e9bd20a2ba896ffa - React-RCTSettings: 2beadc19336aa83a49e9ee9f704157c64799e840 - React-RCTTest: 12bbd7fc2e72bd9920dc7286c5b8ef96639582b6 - React-RCTText: e9146b2c0550a83d1335bfe2553760070a2d75c7 - React-RCTVibration: 50be9c390f2da76045ef0dfdefa18b9cf9f35cfa - React-rncore: 252dd9c510174ba718e358d332a43ad7056e9cb0 - React-runtimeexecutor: 4b0c6eb341c7d3ceb5e2385cb0fdb9bf701024f3 - ReactCommon: 7a2714d1128f965392b6f99a8b390e3aa38c9569 - ScreenshotManager: 79ae4255728f14773097f05accaa53949bdd526c ->>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 + React-TurboModuleCxx-WinRTPort: 9183595ebeacb9692054a21fe62f675a0a255e8a + ReactCommon: fe52e3136583b019573d6d91521fc9c65bb8a64d + ScreenshotManager: f08c5d98fb598cd3cb2c2b28bca6862564fbed22 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: 9899fd558a01665e4acf7e28f02f2090942e829c + Yoga: 3b4464e1119acaf12514b1bfd1c9c874d216fe5f YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: cbf4f9be33910397d5f84dd4fcbe56d3d61d42fa +PODFILE CHECKSUM: b596acab1b1d65648cc41a960b7fac224c9d1905 COCOAPODS: 1.11.3 From 58360a8fa1fee609c8a5daf85cd022689f15d89f Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 13 Jan 2023 11:43:57 -0800 Subject: [PATCH 108/109] Fix lint / flow issues --- .flowconfig.macos | 15 +++++++-------- Libraries/Lists/VirtualizedList.js | 2 +- .../NativeComponent/PlatformBaseViewConfig.js | 4 ++++ yarn.lock | 18 ++++++++++++++++++ 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.flowconfig.macos b/.flowconfig.macos index bb1300f5fb..c0ed79dd08 100644 --- a/.flowconfig.macos +++ b/.flowconfig.macos @@ -1,6 +1,5 @@ [ignore] -; [macOS] -; We fork some components by platform +; We fork some components by platform [macOS] .*/*[.]ios.js .*/*[.]android.js @@ -13,7 +12,7 @@ ; Ignore "BUCK" generated dirs /\.buckd/ -; [macOS Ignore metro.config.js +; [macOS] Ignore metro.config.js /metro.config.js ; Flow doesn't support platforms @@ -39,8 +38,11 @@ emoji=true exact_by_default=true +format.bracket_spacing=false + module.file_ext=.js module.file_ext=.json +; [macOS] module.file_ext=.macos.js munge_underscores=true @@ -55,19 +57,16 @@ suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState suppress_type=$FlowFixMeEmpty -experimental.abstract_locations=true - [lints] sketchy-null-number=warn sketchy-null-mixed=warn sketchy-number=warn untyped-type-import=warn nonstrict-import=warn -deprecated-type=warn +deprecated-type=error unsafe-getters-setters=warn unnecessary-invariant=warn signature-verification-failure=warn -deprecated-utility=error [strict] deprecated-type @@ -79,4 +78,4 @@ untyped-import untyped-type-import [version] -^0.170.0 +^0.171.0 diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 60fe822078..c98630daee 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -595,7 +595,7 @@ class VirtualizedList extends React.PureComponent { // [macOS ensureItemAtIndexIsVisible(rowIndex: number) { - const frame = this._getFrameMetricsApprox(rowIndex); + const frame = this.__getFrameMetricsApprox(rowIndex); const visTop = this._scrollMetrics.offset; const visLen = this._scrollMetrics.visibleLength; const visEnd = visTop + visLen; diff --git a/Libraries/NativeComponent/PlatformBaseViewConfig.js b/Libraries/NativeComponent/PlatformBaseViewConfig.js index 777a114950..07c84a8679 100644 --- a/Libraries/NativeComponent/PlatformBaseViewConfig.js +++ b/Libraries/NativeComponent/PlatformBaseViewConfig.js @@ -376,6 +376,7 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = }), // macOS] }, + // $FlowFixMe: Flow doesn't like these nested spreads // [macOS] validAttributes: { // View Props accessible: true, @@ -501,6 +502,7 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = style: ReactNativeStyleAttributes, // [macOS + // $FlowFixMe: Flow doesn't like these nested spreads ...(Platform.OS === 'macos' && { acceptsFirstMouse: true, accessibilityTraits: true, @@ -513,6 +515,7 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = validKeysUp: true, }), // macOS] + // $FlowFixMe: Flow doesn't like these nested spreads // [macOS] ...ConditionallyIgnoredEventHandlers({ onLayout: true, onMagicTap: true, @@ -542,6 +545,7 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName = onTouchCancel: true, // [macOS + // $FlowFixMe: Flow doesn't like these nested spreads ...(Platform.OS === 'macos' && { onBlur: true, onClick: true, diff --git a/yarn.lock b/yarn.lock index 4a4f049f67..6c1a936a70 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6048,6 +6048,11 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + integrity sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg== + ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -7477,6 +7482,11 @@ uglify-es@^3.1.9: commander "~2.13.0" source-map "~0.6.1" +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + integrity sha512-QMpnpVtYaWEeY+MwKDN/UdKlE/LsFZXM5lO1u7GaZzNgmIbGixHEmVMIKT+vqYOALu3m5GYQy9kz4Xu4IVn7Ow== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -7816,6 +7826,14 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" +ws@^1.1.0: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" + integrity sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w== + dependencies: + options ">=0.0.5" + ultron "1.0.x" + ws@^6.1.4: version "6.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" From ee77d4879e5ef8e4bc9dc9ec45ab10ad8369b8c2 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 13 Jan 2023 11:54:04 -0800 Subject: [PATCH 109/109] ScrollView and TextInput ViewConfig refactor --- Libraries/Components/ScrollView/ScrollView.js | 16 +-- .../ScrollView/ScrollViewNativeComponent.js | 4 + .../TextInput/RCTTextInputViewConfig.js | 16 ++- Libraries/Components/TextInput/TextInput.js | 106 +++++++++--------- 4 files changed, 72 insertions(+), 70 deletions(-) diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index c3cb5e1d34..973bf0eb91 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -370,20 +370,6 @@ type IOSProps = $ReadOnly<{| | 'never' | 'always' ), - /** - * Experimental: specifies how much to adjust the content view by when using - * the keyboard to scroll. This value adjusts the content's horizontal offset. - * - * @platform macos - */ - horizontalLineScroll?: number, // [macOS] - /** - * Experimental: specifies how much to adjust the content view by when using - * the keyboard to scroll. This value adjusts the content's vertical offset. - * - * @platform macos - */ - verticalLineScroll?: number, // [macOS] |}>; type AndroidProps = $ReadOnly<{| @@ -500,7 +486,7 @@ export type Props = $ReadOnly<{| */ invertStickyHeaders?: ?boolean, /** - * Reverses the direction of scroll. Uses native inversion on macOS and scale transforms of -1 elsewhere + * Reverses the direction of scroll. Uses native inversion on macOS and scale transforms of -1 elsewhere // [macOS] */ inverted?: ?boolean, // [macOS] /** diff --git a/Libraries/Components/ScrollView/ScrollViewNativeComponent.js b/Libraries/Components/ScrollView/ScrollViewNativeComponent.js index ec2166b7f2..879d3aa17f 100644 --- a/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +++ b/Libraries/Components/ScrollView/ScrollViewNativeComponent.js @@ -146,6 +146,10 @@ const RCTScrollViewViewConfig = onMomentumScrollBegin: true, onScrollToTop: true, onScroll: true, + // [macOS + onInvertedDidChange: true, + onPreferredScrollerStyleDidChange: true, + // macOS] }), }, }; diff --git a/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/Libraries/Components/TextInput/RCTTextInputViewConfig.js index af06286783..4acd36ae8f 100644 --- a/Libraries/Components/TextInput/RCTTextInputViewConfig.js +++ b/Libraries/Components/TextInput/RCTTextInputViewConfig.js @@ -131,7 +131,6 @@ const RCTTextInputViewConfig = { blurOnSubmit: true, mostRecentEventCount: true, scrollEnabled: true, - hideVerticalScrollIndicator: true, selectionColor: {process: require('../../StyleSheet/processColor')}, contextMenuHidden: true, secureTextEntry: true, @@ -143,13 +142,20 @@ const RCTTextInputViewConfig = { autoCapitalize: true, keyboardAppearance: true, passwordRules: true, - grammarCheck: true, // [macOS] spellCheck: true, selectTextOnFocus: true, text: true, clearTextOnFocus: true, showSoftInputOnFocus: true, autoFocus: true, + // [macOS + clearTextOnSubmit: true, + grammarCheck: true, + hideVerticalScrollIndicator: true, + pastedTypes: true, + submitKeyEvents: true, + tooltip: true, + // macOS] ...ConditionallyIgnoredEventHandlers({ onChange: true, onSelectionChange: true, @@ -158,6 +164,12 @@ const RCTTextInputViewConfig = { onChangeSync: true, onKeyPressSync: true, onTextInput: true, + // [macOS + onPaste: true, + onAutoCorrectChange: true, + onSpellCheckChange: true, + onGrammarCheckChange: true, + // macOS] }), }, }; diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index 78d5da8970..11f00e9098 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -327,21 +327,6 @@ type IOSProps = $ReadOnly<{| */ scrollEnabled?: ?boolean, - // [macOS - /** - * If `true`, hide vertical scrollbar on the underlying multiline scrollview - * The default value is `false`. - * @platform macos - */ - hideVerticalScrollIndicator?: ?boolean, - - /** - * If `false`, disables grammar-check. - * @platform macos - */ - grammarCheck?: ?boolean, - // macOS] - /** * If `false`, disables spell-check style (i.e. red underlines). * The default value is inherited from `autoCorrect`. @@ -370,10 +355,26 @@ export type SubmitKeyEvent = $ReadOnly<{| type MacOSProps = $ReadOnly<{| /** * If `true`, clears the text field synchronously before `onSubmitEditing` is emitted. + * * @platform macos */ clearTextOnSubmit?: ?boolean, + /** + * If `false`, disables grammar-check. + * + * @platform macos + */ + grammarCheck?: ?boolean, + + /** + * If `true`, hide vertical scrollbar on the underlying multiline scrollview + * The default value is `false`. + * + * @platform macos + */ + hideVerticalScrollIndicator?: ?boolean, + /** * Fired when a supported element is pasted * @@ -381,6 +382,36 @@ type MacOSProps = $ReadOnly<{| */ onPaste?: (event: PasteEvent) => void, + /** + * Callback that is called when the text input's autoCorrect setting changes. + * This will be called with + * `{ nativeEvent: { enabled } }`. + * Does only work with 'multiline={true}'. + * + * @platform macos + */ + onAutoCorrectChange?: ?(e: SettingChangeEvent) => mixed, + + /** + * Callback that is called when the text input's spellCheck setting changes. + * This will be called with + * `{ nativeEvent: { enabled } }`. + * Does only work with 'multiline={true}'. + * + * @platform macos + */ + onSpellCheckChange?: ?(e: SettingChangeEvent) => mixed, + + /** + * Callback that is called when the text input's grammarCheck setting changes. + * This will be called with + * `{ nativeEvent: { enabled } }`. + * Does only work with 'multiline={true}'. + * + * @platform macos + */ + onGrammarCheckChange?: ?(e: SettingChangeEvent) => mixed, + /** * Enables Paste support for certain types of pasted types * @@ -399,6 +430,13 @@ type MacOSProps = $ReadOnly<{| * @platform macos */ submitKeyEvents?: ?$ReadOnlyArray, + + /** + * Specifies the tooltip. + * + * @platform macos + */ + tooltip?: ?string, |}>; // macOS] @@ -717,38 +755,6 @@ export type Props = $ReadOnly<{| */ onChangeText?: ?(text: string) => mixed, - // [macOS - /** - * Callback that is called when the text input's autoCorrect setting changes. - * This will be called with - * `{ nativeEvent: { enabled } }`. - * Does only work with 'multiline={true}'. - * - * @platform macos - */ - onAutoCorrectChange?: ?(e: SettingChangeEvent) => mixed, - - /** - * Callback that is called when the text input's spellCheck setting changes. - * This will be called with - * `{ nativeEvent: { enabled } }`. - * Does only work with 'multiline={true}'. - * - * @platform macos - */ - onSpellCheckChange?: ?(e: SettingChangeEvent) => mixed, - - /** - * Callback that is called when the text input's grammarCheck setting changes. - * This will be called with - * `{ nativeEvent: { enabled } }`. - * Does only work with 'multiline={true}'. - * - * @platform macos - */ - onGrammarCheckChange?: ?(e: SettingChangeEvent) => mixed, - // macOS] - /** * DANGER: this API is not stable and will change in the future. * @@ -921,12 +927,6 @@ export type Props = $ReadOnly<{| */ style?: ?TextStyleProp, - // [macOS - /* - * Specifies the tooltip. - */ - tooltip?: ?string, // macOS ] - /** * The value to show for the text input. `TextInput` is a controlled * component, which means the native value will be forced to match this