Compare commits

..
Author SHA1 Message Date
Vitali Zaidman 98ca19eec7 renamed release testing scripts 2025-07-10 17:49:08 +01:00
41 changed files with 337 additions and 696 deletions
@@ -48,14 +48,6 @@ runs:
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
uses: actions/download-artifact@v4
with:
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }};
shell: bash
run: |
@@ -81,7 +73,6 @@ runs:
TARBALL_FILENAME=$(node ../../packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
yarn bootstrap ios "${args[@]}" | cat
+1 -10
View File
@@ -94,14 +94,6 @@ runs:
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
uses: actions/download-artifact@v4
with:
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Setup xcode build cache
uses: ./.github/actions/setup-xcode-build-cache
with:
@@ -113,13 +105,12 @@ runs:
shell: bash
run: |
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
export USE_FRAMEWORKS=dynamic
fi
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
cd packages/rn-tester
bundle install
+26 -16
View File
@@ -128,7 +128,7 @@ jobs:
test_ios_rntester_ruby_3_2_0:
runs-on: macos-14
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -141,12 +141,31 @@ jobs:
ruby-version: "3.2.0"
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: Debug
test_ios_rntester_dynamic_frameworks:
runs-on: macos-14
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
continue-on-error: true
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
use-frameworks: DynamicFrameworks
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_rntester:
runs-on: macos-14-large
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -155,14 +174,14 @@ jobs:
fail-fast: false
matrix:
flavor: [Debug, Release]
frameworks: [StaticLibraries, DynamicFrameworks]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run it
uses: ./.github/actions/test-ios-rntester
with:
use-frameworks: ${{ matrix.frameworks }}
run-unit-tests: "false"
use-frameworks: StaticLibraries
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
@@ -245,14 +264,6 @@ jobs:
- name: Print third-party folder
shell: bash
run: ls -lR /tmp/third-party
- name: Download React Native Prebuilds
uses: actions/download-artifact@v4
with:
name: ReactCore${{ matrix.flavor }}.xcframework.tar.gz
path: /tmp/ReactCore
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Prepare artifacts
run: |
REACT_NATIVE_PKG=$(find /tmp/react-native-tmp -type f -name "*.tgz")
@@ -275,7 +286,6 @@ jobs:
NEW_ARCH_ENABLED=1
export RCT_USE_LOCAL_RN_DEP=/tmp/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ matrix.flavor }}.xcframework.tar.gz"
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
xcodebuild \
@@ -538,7 +548,7 @@ jobs:
test_ios_helloworld_with_ruby_3_2_0:
runs-on: macos-14
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
env:
PROJECT_NAME: iOSTemplateProject
HERMES_WS_DIR: /tmp/hermes
@@ -555,7 +565,7 @@ jobs:
test_ios_helloworld:
runs-on: macos-14
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
strategy:
matrix:
flavor: [Debug, Release]
+1 -1
View File
@@ -58,7 +58,7 @@
"@react-native/metro-config": "0.81.0-main",
"@tsconfig/node22": "22.0.2",
"@types/react": "^19.1.0",
"@typescript-eslint/parser": "^8.36.0",
"@typescript-eslint/parser": "^7.1.1",
"ansi-styles": "^4.2.1",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-syntax-hermes-parser": "0.29.1",
@@ -23,8 +23,8 @@
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@react-native/eslint-plugin": "0.81.0-main",
"@typescript-eslint/eslint-plugin": "^8.36.0",
"@typescript-eslint/parser": "^8.36.0",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-ft-flow": "^2.0.1",
@@ -537,160 +537,3 @@ test('animate layout props', () => {
<rn-view height="100.000000" />,
);
});
test('AnimatedValue.interpolate', () => {
let _valueX;
let _interpolatedValueX;
const viewRef = createRef<HostInstance>();
function MyApp({outputRangeX}: $ReadOnly<{outputRangeX: number}>) {
const valueX = useAnimatedValue(0.5, {useNativeDriver: true});
_valueX = valueX;
const offset = outputRangeX - 1;
const interpolatedValueX = valueX.interpolate({
inputRange: [0, 1],
outputRange: [offset, 100],
});
_interpolatedValueX = interpolatedValueX;
return (
<Animated.View
ref={viewRef}
style={[
{
width: 100,
height: 100,
},
{transform: [{translateX: valueX}, {translateY: interpolatedValueX}]},
]}
/>
);
}
const root = Fantom.createRoot();
Fantom.runTask(() => {
root.render(<MyApp outputRangeX={1} />);
});
const viewElement = ensureInstance(viewRef.current, ReactNativeElement);
expect(_valueX?.__getValue()).toBe(0.5);
expect(_interpolatedValueX?.__getValue()).toBe(50);
expect(
JSON.stringify(
Fantom.unstable_getDirectManipulationProps(viewElement).transform,
),
).toBe('[{"translateX":0.5},{"translateY":50}]');
expect(viewElement.getBoundingClientRect().x).toBe(0.5);
expect(viewElement.getBoundingClientRect().y).toBe(50);
Fantom.runTask(() => {
root.render(<MyApp outputRangeX={51} />);
});
expect(_valueX?.__getValue()).toBe(0.5);
expect(_interpolatedValueX?.__getValue()).toBe(75);
expect(
JSON.stringify(
Fantom.unstable_getDirectManipulationProps(viewElement).transform,
),
).toBe('[{"translateX":0.5},{"translateY":75}]');
expect(viewElement.getBoundingClientRect().x).toBe(0.5);
expect(viewElement.getBoundingClientRect().y).toBe(75);
});
test('Animated.sequence', () => {
let _translateY;
let _isSequenceFinished = false;
const elementRef = createRef<HostInstance>();
function MyApp() {
const translateY = useAnimatedValue(0, {useNativeDriver: true});
_translateY = translateY;
return (
<View>
<Animated.View
ref={elementRef}
style={[
{
position: 'absolute',
width: 100,
height: 100,
},
{
transform: [
{
translateY: translateY.interpolate({
inputRange: [0, 1],
outputRange: [0, -16],
}),
},
],
},
]}
/>
</View>
);
}
const root = Fantom.createRoot();
Fantom.runTask(() => {
root.render(<MyApp />);
});
const element = ensureInstance(elementRef.current, ReactNativeElement);
expect(element.getBoundingClientRect().y).toBe(0);
Fantom.runTask(() => {
Animated.sequence([
Animated.timing(_translateY, {
toValue: 1,
duration: 500,
useNativeDriver: true,
}),
Animated.timing(_translateY, {
toValue: 0,
duration: 0,
useNativeDriver: true,
}),
]).start(({finished}) => {
if (finished) {
_isSequenceFinished = true;
}
});
});
Fantom.unstable_produceFramesForDuration(500);
expect(
// $FlowFixMe[incompatible-use]
Fantom.unstable_getDirectManipulationProps(element).transform[0].translateY,
).toBeCloseTo(-16, 0.001);
if (!ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync()) {
Fantom.runWorkLoop(); // React update to sync end state of 1st timing animation in sequence
}
expect(_isSequenceFinished).toBe(false);
expect(element.getBoundingClientRect().y).toBe(-16);
Fantom.runWorkLoop(); // React render
expect(
// $FlowFixMe[incompatible-use]
Fantom.unstable_getDirectManipulationProps(element).transform[0].translateY,
).toBeCloseTo(0, 0.001);
if (!ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync()) {
Fantom.runWorkLoop(); // React update to sync end state of 2nd timing animation in sequence
}
expect(element.getBoundingClientRect().y).toBe(0);
if (ReactNativeFeatureFlags.cxxNativeAnimatedRemoveJsSync()) {
expect(_isSequenceFinished).toBe(false);
Fantom.runWorkLoop();
}
expect(_isSequenceFinished).toBe(true);
});
+5 -20
View File
@@ -34,9 +34,6 @@ const RCTNetworking = require('./RCTNetworking').default;
const base64 = require('base64-js');
const invariant = require('invariant');
const PERFORMANCE_TRACK_NAME = 'Network (JS-initiated only)';
const PERFORMANCE_TRACK_GROUP = 'Chrome DevTools Temp Compat';
declare var performance: Performance;
const DEBUG_NETWORK_SEND_DELAY: false = false; // Set to a number of milliseconds when debugging
@@ -388,9 +385,6 @@ class XMLHttpRequest extends EventTarget {
if (requestId !== this._requestId) {
return;
}
const start = XMLHttpRequest._profiling ? performance.now() : undefined;
if (!this._response) {
this._response = responseText;
} else {
@@ -398,13 +392,8 @@ class XMLHttpRequest extends EventTarget {
}
if (XMLHttpRequest._profiling) {
console.timeStamp(
'Incremental Data: ' + this._getMeasureURL(),
// $FlowFixMe[extra-arg] Add correct typing for `console.timeStamp`
start,
undefined,
PERFORMANCE_TRACK_NAME,
PERFORMANCE_TRACK_GROUP,
performance.mark(
'Track:XMLHttpRequest:Incremental Data: ' + this._getMeasureURL(),
);
}
XMLHttpRequest._interceptor &&
@@ -453,14 +442,10 @@ class XMLHttpRequest extends EventTarget {
this.setReadyState(this.DONE);
if (XMLHttpRequest._profiling && this._startTime != null) {
const start = this._startTime;
console.timeStamp(
this._getMeasureURL(),
// $FlowFixMe[extra-arg] Add correct typing for `console.timeStamp`
performance.measure('Track:XMLHttpRequest:' + this._getMeasureURL(), {
start,
undefined,
PERFORMANCE_TRACK_NAME,
PERFORMANCE_TRACK_GROUP,
);
end: performance.now(),
});
}
if (error) {
XMLHttpRequest._interceptor &&
@@ -18,7 +18,6 @@ end
header_search_paths = [
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
"\"${PODS_ROOT}/Headers/Public/React-RCTFBReactNativeSpec/FBReactNativeSpec\"",
]
Pod::Spec.new do |s|
@@ -46,9 +45,7 @@ Pod::Spec.new do |s|
s.dependency "React-Core/RCTPushNotificationHeaders"
s.dependency "React-jsi"
add_dependency(s, "React-RCTFBReactNativeSpec", :additional_framework_paths => ['FBReactNativeSpec'])
add_dependency(s, "React-RCTFBReactNativeSpec")
add_dependency(s, "ReactCommon", :subspec => "turbomodule/core", :additional_framework_paths => ["react/nativemodule/core"])
add_dependency(s, "React-NativeModulesApple")
add_rncore_dependency(s)
end
+1 -1
View File
@@ -166,7 +166,7 @@ let reactJsInspector = RNTarget(
name: .reactJsInspector,
path: "ReactCommon/jsinspector-modern",
excludedPaths: ["tracing", "network", "tests"],
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .jsi, .reactJsInspectorTracing, .reactJsInspectorNetwork, .reactRuntimeExecutor, .reactPerfLogger],
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .jsi, .reactJsInspectorTracing, .reactJsInspectorNetwork, .reactRuntimeExecutor],
defines: [
CXXSetting.define("REACT_NATIVE_DEBUGGER_ENABLED", to: "1", .when(configuration: BuildConfiguration.debug)),
CXXSetting.define("REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY", to: "1", .when(configuration: BuildConfiguration.debug)),
@@ -39,7 +39,7 @@ static NSString *const RCTPerfMonitorCellIdentifier = @"RCTPerfMonitorCellIdenti
static const CGFloat RCTPerfMonitorBarHeight = 50;
static const CGFloat RCTPerfMonitorExpandHeight = 250;
using RCTJSCSetOptionType = BOOL (*)(const char *);
typedef BOOL (*RCTJSCSetOptionType)(const char *);
NSArray<NSString *> *LabelsForRCTPerformanceLoggerTags();
@@ -117,7 +117,6 @@ public class ReactActivityDelegate {
* going away in the New Architecture. You should access {@link ReactHost} instead."
* @noinspection deprecation
*/
@Deprecated
public ReactInstanceManager getReactInstanceManager() {
return Objects.requireNonNull(mReactDelegate).getReactInstanceManager();
}
@@ -83,9 +83,6 @@ internal class ReactAndroidHWInputDeviceHelper(private val reactRootView: ReactR
KeyEvent.KEYCODE_DPAD_DOWN to "down",
KeyEvent.KEYCODE_DPAD_LEFT to "left",
KeyEvent.KEYCODE_INFO to "info",
KeyEvent.KEYCODE_MENU to "menu",
KeyEvent.KEYCODE_CHANNEL_UP to "channelUp",
KeyEvent.KEYCODE_CHANNEL_DOWN to "channelDown",
)
KeyEvent.KEYCODE_MENU to "menu")
}
}
@@ -10,16 +10,26 @@ package com.facebook.react.views.textinput
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.bridge.buildReadableMap
import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.uimanager.events.Event
/** Event emitted by EditText native view when content size changes. */
internal class ReactContentSizeChangedEvent
constructor(
internal class ReactContentSizeChangedEvent(
surfaceId: Int,
viewId: Int,
private val contentWidth: Float,
private val contentHeight: Float
) : Event<ReactTextChangedEvent>(surfaceId, viewId) {
@Deprecated(
"Use the constructor with surfaceId instead",
ReplaceWith(
"ReactContentSizeChangedEvent(surfaceId, viewId, contentSizeWidth, contentSizeHeight)"))
constructor(
viewId: Int,
contentSizeWidth: Float,
contentSizeHeight: Float
) : this(ViewUtil.NO_SURFACE_ID, viewId, contentSizeWidth, contentSizeHeight)
override fun getEventName(): String = EVENT_NAME
override fun getEventData(): WritableMap {
@@ -9,6 +9,7 @@ package com.facebook.react.views.textinput
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.uimanager.events.Event
/** Event emitted by EditText native view when text changes. */
@@ -18,6 +19,15 @@ internal class ReactTextChangedEvent(
private val text: String,
private val eventCount: Int
) : Event<ReactTextChangedEvent>(surfaceId, viewId) {
@Deprecated(
"Use the constructor with surfaceId instead",
ReplaceWith("ReactTextChangedEvent(surfaceId, viewId, text, eventCount)"))
constructor(
viewId: Int,
text: String,
eventCount: Int
) : this(ViewUtil.NO_SURFACE_ID, viewId, text, eventCount)
override fun getEventName(): String = EVENT_NAME
override fun getEventData(): WritableMap {
@@ -9,6 +9,7 @@ package com.facebook.react.views.textinput
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.uimanager.events.Event
/**
@@ -20,6 +21,11 @@ internal class ReactTextInputEndEditingEvent(
viewId: Int,
private val text: String
) : Event<ReactTextInputEndEditingEvent>(surfaceId, viewId) {
@Deprecated(
"Use the constructor with surfaceId instead",
ReplaceWith("ReactTextInputEndEditingEvent(surfaceId, viewId, text)"))
constructor(viewId: Int, text: String) : this(ViewUtil.NO_SURFACE_ID, viewId, text)
override fun getEventName(): String = EVENT_NAME
override fun canCoalesce(): Boolean = false
@@ -9,11 +9,17 @@ package com.facebook.react.views.textinput
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.uimanager.events.Event
/** Event emitted by EditText native view when key pressed. */
internal class ReactTextInputKeyPressEvent(surfaceId: Int, viewId: Int, private val key: String) :
Event<ReactTextInputKeyPressEvent>(surfaceId, viewId) {
@Deprecated(
"Use the constructor with surfaceId instead",
ReplaceWith("ReactTextInputKeyPressEvent(surfaceId, viewId, key)"))
constructor(viewId: Int, key: String) : this(ViewUtil.NO_SURFACE_ID, viewId, key)
override fun getEventName(): String = EVENT_NAME
override fun getEventData(): WritableMap {
@@ -10,6 +10,7 @@ package com.facebook.react.views.textinput
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.bridge.buildReadableMap
import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.uimanager.events.Event
/** Event emitted by EditText native view when the text selection changes. */
@@ -19,6 +20,15 @@ internal class ReactTextInputSelectionEvent(
private val selectionStart: Int,
private val selectionEnd: Int
) : Event<ReactTextInputSelectionEvent>(surfaceId, viewId) {
@Deprecated(
"Use the constructor with surfaceId instead",
ReplaceWith("ReactTextInputSelectionEvent(surfaceId, viewId, selectionStart, selectionEnd)"))
constructor(
viewId: Int,
selectionStart: Int,
selectionEnd: Int
) : this(ViewUtil.NO_SURFACE_ID, viewId, selectionStart, selectionEnd)
override fun getEventName(): String = EVENT_NAME
override fun getEventData(): WritableMap {
@@ -9,6 +9,7 @@ package com.facebook.react.views.textinput
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.uimanager.common.ViewUtil
import com.facebook.react.uimanager.events.Event
/** Event emitted by EditText native view when the user submits the text. */
@@ -17,6 +18,11 @@ internal class ReactTextInputSubmitEditingEvent(
viewId: Int,
private val text: String
) : Event<ReactTextInputSubmitEditingEvent>(surfaceId, viewId) {
@Deprecated(
"Use the constructor with surfaceId instead",
ReplaceWith("ReactTextInputSubmitEditingEvent(surfaceId, viewId, text)"))
constructor(viewId: Int, text: String) : this(ViewUtil.NO_SURFACE_ID, viewId, text)
override fun getEventName(): String = EVENT_NAME
override fun getEventData(): WritableMap {
@@ -25,7 +25,6 @@ target_link_libraries(jsinspector
jsinspector_tracing
react_featureflags
runtimeexecutor
reactperflogger
)
target_compile_reactnative_options(jsinspector PRIVATE)
target_compile_options(jsinspector PRIVATE
@@ -8,7 +8,6 @@
#include <jsinspector-modern/RuntimeTarget.h>
#include <jsinspector-modern/tracing/PerformanceTracer.h>
#include <reactperflogger/ReactPerfettoLogger.h>
#include <concepts>
#include <deque>
#include <string>
@@ -20,20 +19,6 @@ namespace facebook::react::jsinspector_modern {
namespace {
inline std::optional<HighResTimeStamp> getTimeStampForPerfetto(
const std::optional<tracing::ConsoleTimeStampEntry>& consoleTimeStampEntry,
const HighResTimeStamp now) {
if (consoleTimeStampEntry) {
if (std::holds_alternative<HighResTimeStamp>(*consoleTimeStampEntry)) {
return std::get<HighResTimeStamp>(*consoleTimeStampEntry);
} else {
return std::nullopt;
}
} else {
return now;
}
}
struct ConsoleState {
/**
* https://console.spec.whatwg.org/#counting
@@ -391,8 +376,7 @@ void consoleTimeStamp(
const jsi::Value* arguments,
size_t argumentsCount) {
auto& performanceTracer = tracing::PerformanceTracer::getInstance();
if ((!performanceTracer.isTracing() && !ReactPerfettoLogger::isTracing()) ||
argumentsCount == 0) {
if (!performanceTracer.isTracing() || argumentsCount == 0) {
// If not tracing, just early return to avoid the cost of parsing.
return;
}
@@ -460,22 +444,8 @@ void consoleTimeStamp(
}
}
if (performanceTracer.isTracing()) {
performanceTracer.reportTimeStamp(
label, start, end, trackName, trackGroup, color);
}
if (ReactPerfettoLogger::isTracing()) {
std::optional<HighResTimeStamp> perfettoStart =
getTimeStampForPerfetto(start, now);
std::optional<HighResTimeStamp> perfettoEnd =
getTimeStampForPerfetto(end, now);
if (perfettoStart && perfettoEnd) {
ReactPerfettoLogger::measure(
label, *perfettoStart, *perfettoEnd, trackName, trackGroup);
}
}
performanceTracer.reportTimeStamp(
label, start, end, trackName, trackGroup, color);
}
/*
@@ -491,6 +491,45 @@ inline static void updateAccessibilityStateProp(
result["accessibilityState"] = resultState;
}
static folly::dynamic toDynamic(const std::vector<BoxShadow>& boxShadow) {
folly::dynamic boxShadowResult = folly::dynamic::array();
for (const auto& boxShadowValue : boxShadow) {
folly::dynamic boxShadowValueResult = folly::dynamic::object();
boxShadowValueResult["offsetX"] = boxShadowValue.offsetX;
boxShadowValueResult["offsetY"] = boxShadowValue.offsetY;
boxShadowValueResult["blurRadius"] = boxShadowValue.blurRadius;
boxShadowValueResult["spreadDistance"] = boxShadowValue.spreadDistance;
boxShadowValueResult["color"] = *boxShadowValue.color;
boxShadowValueResult["inset"] = boxShadowValue.inset;
boxShadowResult.push_back(boxShadowValueResult);
}
return boxShadowResult;
}
static folly::dynamic toDynamic(const std::vector<FilterFunction>& filter) {
folly::dynamic filterResult = folly::dynamic::array();
for (const auto& filterFunction : filter) {
folly::dynamic filterFunctionResult = folly::dynamic::object();
std::string typeKey = toString(filterFunction.type);
if (std::holds_alternative<Float>(filterFunction.parameters)) {
filterFunctionResult[typeKey] =
std::get<Float>(filterFunction.parameters);
} else if (std::holds_alternative<DropShadowParams>(
filterFunction.parameters)) {
const auto& parameters =
std::get<DropShadowParams>(filterFunction.parameters);
folly::dynamic parametersResult = folly::dynamic::object();
parametersResult["offsetX"] = parameters.offsetX;
parametersResult["offsetY"] = parameters.offsetY;
parametersResult["standardDeviation"] = parameters.standardDeviation;
parametersResult["color"] = *parameters.color;
filterFunctionResult[typeKey] = parametersResult;
}
filterResult.push_back(filterFunctionResult);
}
return filterResult;
}
ComponentName HostPlatformViewProps::getDiffPropsImplementationTarget() const {
return "View";
}
@@ -36,7 +36,7 @@ std::optional<double> DynamicEventPayload::extractValue(
if (dynamic.type() == folly::dynamic::Type::DOUBLE) {
return dynamic.asDouble();
} else if (dynamic.type() == folly::dynamic::Type::INT64) {
return static_cast<double>(dynamic.asInt());
return dynamic.asInt();
}
return std::nullopt;
}
@@ -21,25 +21,5 @@ struct BoxShadow {
Float spreadDistance{};
SharedColor color{};
bool inset{};
#ifdef RN_SERIALIZABLE_STATE
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result["offsetX"] = offsetX;
result["offsetY"] = offsetY;
result["blurRadius"] = blurRadius;
result["spreadDistance"] = spreadDistance;
result["color"] = *color;
result["inset"] = inset;
return result;
}
#endif
};
#ifdef RN_SERIALIZABLE_STATE
inline folly::dynamic toDynamic(const BoxShadow& boxShadow) {
return boxShadow.toDynamic();
}
#endif
} // namespace facebook::react
@@ -8,6 +8,7 @@
#pragma once
#include <functional>
#include <limits>
#include <react/renderer/graphics/ColorComponents.h>
#include <react/renderer/graphics/HostPlatformColor.h>
@@ -29,6 +29,22 @@ enum class FilterType {
DropShadow
};
struct DropShadowParams {
bool operator==(const DropShadowParams& other) const = default;
Float offsetX{};
Float offsetY{};
Float standardDeviation{};
SharedColor color{};
};
struct FilterFunction {
bool operator==(const FilterFunction& other) const = default;
FilterType type{};
std::variant<Float, DropShadowParams> parameters{};
};
inline FilterType filterTypeFromString(std::string_view filterName) {
if (filterName == "blur") {
return FilterType::Blur;
@@ -80,51 +96,4 @@ inline std::string toString(const FilterType& filterType) {
}
}
struct DropShadowParams {
bool operator==(const DropShadowParams& other) const = default;
Float offsetX{};
Float offsetY{};
Float standardDeviation{};
SharedColor color{};
#ifdef RN_SERIALIZABLE_STATE
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result["offsetX"] = offsetX;
result["offsetY"] = offsetY;
result["standardDeviation"] = standardDeviation;
result["color"] = *color;
return result;
}
#endif
};
struct FilterFunction {
bool operator==(const FilterFunction& other) const = default;
FilterType type{};
std::variant<Float, DropShadowParams> parameters{};
#ifdef RN_SERIALIZABLE_STATE
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
std::string typeKey = toString(type);
if (std::holds_alternative<Float>(parameters)) {
result[typeKey] = std::get<Float>(parameters);
} else if (std::holds_alternative<DropShadowParams>(parameters)) {
const auto& dropShadowParams = std::get<DropShadowParams>(parameters);
result[typeKey] = dropShadowParams.toDynamic();
}
return result;
}
#endif
};
#ifdef RN_SERIALIZABLE_STATE
inline folly::dynamic toDynamic(const FilterFunction& filterFunction) {
return filterFunction.toDynamic();
}
#endif
} // namespace facebook::react
@@ -8,6 +8,7 @@
#pragma once
#include <array>
#include <string>
#include <vector>
#include <react/renderer/debug/flags.h>
@@ -36,7 +37,7 @@ inline bool isZero(Float n) {
* An "Arbitrary" operation means that the transform was seeded with some
* arbitrary initial result.
*/
enum class TransformOperationType : uint8_t {
enum class TransformOperationType {
Arbitrary,
Identity,
Perspective,
@@ -200,7 +200,7 @@ namespace {
// Copied from JSIExecutor.cpp
// basename_r isn't in all iOS SDKs, so use this simple version instead.
std::string simpleBasename(const std::string& path) {
size_t pos = path.rfind('/');
size_t pos = path.rfind("/");
return (pos != std::string::npos) ? path.substr(pos) : path;
}
@@ -22,26 +22,10 @@ const std::string PERFETTO_DEFAULT_TRACK_NAME = "# Web Performance";
const std::string PERFETTO_TRACK_NAME_PREFIX = "# Web Performance: ";
std::string toPerfettoTrackName(
const std::optional<std::string_view>& trackName,
const std::optional<std::string_view>& trackGroup) {
std::string perfettoTrackName = PERFETTO_DEFAULT_TRACK_NAME;
if (trackName || trackGroup) {
perfettoTrackName += ": ";
if (trackGroup) {
perfettoTrackName += *trackGroup;
if (trackName) {
perfettoTrackName += " | ";
}
}
if (trackName) {
perfettoTrackName += *trackName;
}
}
return perfettoTrackName;
const std::optional<std::string_view>& trackName) {
return trackName.has_value()
? PERFETTO_TRACK_NAME_PREFIX + std::string(trackName.value())
: PERFETTO_DEFAULT_TRACK_NAME;
}
#elif defined(WITH_FBSYSTRACE)
int64_t getDeltaNanos(HighResTimeStamp jsTime) {
@@ -66,12 +50,10 @@ int64_t getDeltaNanos(HighResTimeStamp jsTime) {
const std::string_view& eventName,
HighResTimeStamp startTime,
HighResTimeStamp endTime,
const std::optional<std::string_view>& trackName,
const std::optional<std::string_view>& trackGroup) {
const std::optional<std::string_view>& trackName) {
#if defined(WITH_PERFETTO)
if (TRACE_EVENT_CATEGORY_ENABLED("react-native")) {
auto track = getPerfettoWebPerfTrackAsync(
toPerfettoTrackName(trackName, trackGroup));
auto track = getPerfettoWebPerfTrackAsync(toPerfettoTrackName(trackName));
TRACE_EVENT_BEGIN(
"react-native",
perfetto::DynamicString(eventName.data(), eventName.size()),
@@ -93,14 +75,13 @@ int64_t getDeltaNanos(HighResTimeStamp jsTime) {
/* static */ void ReactPerfettoLogger::mark(
const std::string_view& eventName,
HighResTimeStamp startTime,
const std::optional<std::string_view>& trackName,
const std::optional<std::string_view>& trackGroup) {
const std::optional<std::string_view>& trackName) {
#if defined(WITH_PERFETTO)
if (TRACE_EVENT_CATEGORY_ENABLED("react-native")) {
TRACE_EVENT_INSTANT(
"react-native",
perfetto::DynamicString(eventName.data(), eventName.size()),
getPerfettoWebPerfTrackSync(toPerfettoTrackName(trackName, trackGroup)),
getPerfettoWebPerfTrackSync(toPerfettoTrackName(trackName)),
highResTimeStampToPerfettoTraceTime(startTime));
}
#elif defined(WITH_FBSYSTRACE)
@@ -11,7 +11,7 @@
#include <reactperflogger/ReactPerfettoCategories.h>
#include <optional>
#include <string_view>
#include <string>
namespace facebook::react {
@@ -26,15 +26,13 @@ class ReactPerfettoLogger {
static void mark(
const std::string_view& eventName,
HighResTimeStamp startTime,
const std::optional<std::string_view>& trackName = std::nullopt,
const std::optional<std::string_view>& trackGroup = std::nullopt);
const std::optional<std::string_view>& trackName);
static void measure(
const std::string_view& eventName,
HighResTimeStamp startTime,
HighResTimeStamp endTime,
const std::optional<std::string_view>& trackName = std::nullopt,
const std::optional<std::string_view>& trackGroup = std::nullopt);
const std::optional<std::string_view>& trackName);
};
} // namespace facebook::react
@@ -478,19 +478,16 @@ static void zeroOutLayoutRecursively(yoga::Node* const node) {
}
static void cleanupContentsNodesRecursively(yoga::Node* const node) {
if (node->hasContentsChildren()) [[unlikely]] {
node->cloneContentsChildrenIfNeeded();
for (auto child : node->getChildren()) {
if (child->style().display() == Display::Contents) {
child->getLayout() = {};
child->setLayoutDimension(0, Dimension::Width);
child->setLayoutDimension(0, Dimension::Height);
child->setHasNewLayout(true);
child->setDirty(false);
child->cloneChildrenIfNeeded();
for (auto child : node->getChildren()) {
if (child->style().display() == Display::Contents) {
child->getLayout() = {};
child->setLayoutDimension(0, Dimension::Width);
child->setLayoutDimension(0, Dimension::Height);
child->setHasNewLayout(true);
child->setDirty(false);
child->cloneChildrenIfNeeded();
cleanupContentsNodesRecursively(child);
}
cleanupContentsNodesRecursively(child);
}
}
}
@@ -181,17 +181,6 @@ void Node::setDirty(bool isDirty) {
}
}
void Node::setChildren(const std::vector<Node*>& children) {
children_ = children;
contentsChildrenCount_ = 0;
for (const auto& child : children) {
if (child->style().display() == Display::Contents) {
contentsChildrenCount_++;
}
}
}
bool Node::removeChild(Node* child) {
auto p = std::find(children_.begin(), children_.end(), child);
if (p != children_.end()) {
@@ -391,23 +380,6 @@ void Node::cloneChildrenIfNeeded() {
if (child->getOwner() != this) {
child = resolveRef(config_->cloneNode(child, this, i));
child->setOwner(this);
if (child->hasContentsChildren()) [[unlikely]] {
child->cloneContentsChildrenIfNeeded();
}
}
i += 1;
}
}
void Node::cloneContentsChildrenIfNeeded() {
size_t i = 0;
for (Node*& child : children_) {
if (child->style().display() == Display::Contents &&
child->getOwner() != this) {
child = resolveRef(config_->cloneNode(child, this, i));
child->setOwner(this);
child->cloneChildrenIfNeeded();
}
i += 1;
}
@@ -96,10 +96,6 @@ class YG_EXPORT Node : public ::YGNode {
return config_->hasErrata(errata);
}
bool hasContentsChildren() const {
return contentsChildrenCount_ != 0;
}
YGDirtiedFunc getDirtiedFunc() const {
return dirtiedFunc_;
}
@@ -248,12 +244,15 @@ class YG_EXPORT Node : public ::YGNode {
owner_ = owner;
}
void setChildren(const std::vector<Node*>& children) {
children_ = children;
}
// TODO: rvalue override for setChildren
void setConfig(Config* config);
void setDirty(bool isDirty);
void setChildren(const std::vector<Node*>& children);
void setLayoutLastOwnerDirection(Direction direction);
void setLayoutComputedFlexBasis(FloatOptional computedFlexBasis);
void setLayoutComputedFlexBasisGeneration(
@@ -287,7 +286,6 @@ class YG_EXPORT Node : public ::YGNode {
void removeChild(size_t index);
void cloneChildrenIfNeeded();
void cloneContentsChildrenIfNeeded();
void markDirtyAndPropagate();
float resolveFlexGrow() const;
float resolveFlexShrink() const;
@@ -134,8 +134,8 @@ class ReactNativeCoreUtils
## You can use the `ENTERPRISE_REPOSITORY` ariable to customise the base url from which artifacts will be downloaded.
## The mirror's structure must be the same of the Maven repo the react-native core team publishes on Maven Central.
maven_repo_url =
ENV['ENTERPRISE_REPOSITORY'] != nil && ENV['ENTERPRISE_REPOSITORY'] != "" ?
ENV['ENTERPRISE_REPOSITORY'] :
ENV[ENTERPRISE_REPOSITORY] != nil && ENV[ENTERPRISE_REPOSITORY] != "" ?
ENV[ENTERPRISE_REPOSITORY] :
"https://repo1.maven.org/maven2"
group = "com/facebook/react"
# Sample url from Maven:
@@ -169,8 +169,8 @@ class ReactNativeDependenciesUtils
## You can use the `ENTERPRISE_REPOSITORY` ariable to customise the base url from which artifacts will be downloaded.
## The mirror's structure must be the same of the Maven repo the react-native core team publishes on Maven Central.
maven_repo_url =
ENV['ENTERPRISE_REPOSITORY'] != nil && ENV['ENTERPRISE_REPOSITORY'] != "" ?
ENV['ENTERPRISE_REPOSITORY'] :
ENV[ENTERPRISE_REPOSITORY] != nil && ENV[ENTERPRISE_REPOSITORY] != "" ?
ENV[ENTERPRISE_REPOSITORY] :
"https://repo1.maven.org/maven2"
group = "com/facebook/react"
# Sample url from Maven:
@@ -207,8 +207,8 @@ def release_tarball_url(version, build_type)
## You can use the `ENTERPRISE_REPOSITORY` ariable to customise the base url from which artifacts will be downloaded.
## The mirror's structure must be the same of the Maven repo the react-native core team publishes on Maven Central.
maven_repo_url =
ENV['ENTERPRISE_REPOSITORY'] != nil && ENV['ENTERPRISE_REPOSITORY'] != "" ?
ENV['ENTERPRISE_REPOSITORY'] :
ENV[ENTERPRISE_REPOSITORY] != nil && ENV[ENTERPRISE_REPOSITORY] != "" ?
ENV[ENTERPRISE_REPOSITORY] :
"https://repo1.maven.org/maven2"
namespace = "com/facebook/react"
# Sample url from Maven:
@@ -15,11 +15,7 @@ import type {
PerformanceEntryList,
PerformanceEntryType,
} from './PerformanceEntry';
import type {
DetailType,
PerformanceMarkOptions,
PerformanceMeasureInit,
} from './UserTiming';
import type {DetailType, PerformanceMarkOptions} from './UserTiming';
import DOMException from '../errors/DOMException';
import structuredClone from '../structuredClone/structuredClone';
@@ -29,46 +25,35 @@ import {
performanceEntryTypeToRaw,
rawToPerformanceEntry,
} from './internals/RawPerformanceEntry';
import {
getCurrentTimeStamp,
warnNoNativePerformance,
} from './internals/Utilities';
import {warnNoNativePerformance} from './internals/Utilities';
import MemoryInfo from './MemoryInfo';
import ReactNativeStartupTiming from './ReactNativeStartupTiming';
import NativePerformance from './specs/NativePerformance';
import {PerformanceMark, PerformanceMeasure} from './UserTiming';
declare var global: {
// This value is defined directly via JSI, if available.
+nativePerformanceNow?: ?() => number,
};
const getCurrentTimeStamp: () => DOMHighResTimeStamp =
NativePerformance?.now ?? global.nativePerformanceNow ?? (() => Date.now());
export type PerformanceMeasureOptions =
| $ReadOnly<{
| {
detail?: DetailType,
start?: DOMHighResTimeStamp | string,
duration?: DOMHighResTimeStamp,
}>
| $ReadOnly<{
}
| {
detail?: DetailType,
start?: DOMHighResTimeStamp | string,
end?: DOMHighResTimeStamp | string,
}>;
};
const ENTRY_TYPES_AVAILABLE_FROM_TIMELINE: $ReadOnlyArray<PerformanceEntryType> =
['mark', 'measure'];
const cachedNativeMark = NativePerformance?.markWithResult;
const cachedNativeMeasure = NativePerformance?.measure;
const cachedNativeClearMarks = NativePerformance?.clearMarks;
const cachedNativeClearMeasures = NativePerformance?.clearMeasures;
const MARK_OPTIONS_REUSABLE_OBJECT: {...PerformanceMarkOptions} = {
startTime: 0,
detail: undefined,
};
const MEASURE_OPTIONS_REUSABLE_OBJECT: {...PerformanceMeasureInit} = {
startTime: 0,
duration: 0,
detail: undefined,
};
/**
* Partial implementation of the Performance interface for RN,
* corresponding to the standard in
@@ -132,68 +117,58 @@ export default class Performance {
markName: string,
markOptions?: PerformanceMarkOptions,
): PerformanceMark {
// IMPORTANT: this method has been micro-optimized.
// Please run the benchmarks in `Performance-benchmarks-itest` to ensure
// changes do not regress performance.
if (markName === undefined) {
if (markName == null) {
throw new TypeError(
`Failed to execute 'mark' on 'Performance': 1 argument required, but only 0 present.`,
);
}
const resolvedMarkName =
typeof markName === 'string' ? markName : String(markName);
let resolvedDetail;
const detail = markOptions?.detail;
if (detail !== undefined) {
resolvedDetail = structuredClone(detail);
if (markOptions?.detail != null) {
resolvedDetail = structuredClone(markOptions.detail);
}
let computedStartTime;
if (cachedNativeMark) {
if (NativePerformance?.markWithResult) {
let resolvedStartTime;
const startTime = markOptions?.startTime;
if (startTime !== undefined) {
resolvedStartTime =
typeof startTime === 'number' ? startTime : Number(startTime);
resolvedStartTime = Number(startTime);
if (resolvedStartTime < 0) {
throw new TypeError(
`Failed to execute 'mark' on 'Performance': '${resolvedMarkName}' cannot have a negative start time.`,
`Failed to execute 'mark' on 'Performance': '${markName}' cannot have a negative start time.`,
);
} else if (
// This is faster than calling Number.isFinite()
// eslint-disable-next-line no-self-compare
resolvedStartTime !== resolvedStartTime ||
resolvedStartTime === Infinity
) {
} else if (!Number.isFinite(resolvedStartTime)) {
throw new TypeError(
`Failed to execute 'mark' on 'Performance': Failed to read the 'startTime' property from 'PerformanceMarkOptions': The provided double value is non-finite.`,
);
}
}
computedStartTime = cachedNativeMark(resolvedMarkName, resolvedStartTime);
// $FlowExpectedError[not-a-function]
computedStartTime = NativePerformance.markWithResult(
markName,
resolvedStartTime,
);
} else {
warnNoNativePerformance();
computedStartTime = getCurrentTimeStamp();
computedStartTime = performance.now();
}
MARK_OPTIONS_REUSABLE_OBJECT.startTime = computedStartTime;
MARK_OPTIONS_REUSABLE_OBJECT.detail = resolvedDetail;
return new PerformanceMark(resolvedMarkName, MARK_OPTIONS_REUSABLE_OBJECT);
return new PerformanceMark(markName, {
startTime: computedStartTime,
detail: resolvedDetail,
});
}
clearMarks(markName?: string): void {
if (!cachedNativeClearMarks) {
if (!NativePerformance?.clearMarks) {
warnNoNativePerformance();
return;
}
cachedNativeClearMarks(markName);
NativePerformance.clearMarks(markName);
}
measure(
@@ -201,18 +176,6 @@ export default class Performance {
startMarkOrOptions?: string | PerformanceMeasureOptions,
endMark?: string,
): PerformanceMeasure {
// IMPORTANT: this method has been micro-optimized.
// Please run the benchmarks in `Performance-benchmarks-itest` to ensure
// changes do not regress performance.
if (measureName === undefined) {
throw new TypeError(
`Failed to execute 'measure' on 'Performance': 1 argument required, but only 0 present.`,
);
}
let resolvedMeasureName =
typeof measureName === 'string' ? measureName : String(measureName);
let resolvedStartTime: number | void;
let resolvedStartMark: string | void;
let resolvedEndTime: number | void;
@@ -223,7 +186,7 @@ export default class Performance {
if (startMarkOrOptions != null) {
switch (typeof startMarkOrOptions) {
case 'object': {
if (endMark !== undefined) {
if (endMark != null) {
throw new TypeError(
`Failed to execute 'measure' on 'Performance': If a non-empty PerformanceMeasureOptions object was passed, |end_mark| must not be passed.`,
);
@@ -284,8 +247,8 @@ export default class Performance {
}
if (
resolvedDuration !== undefined &&
(resolvedEndMark !== undefined || resolvedEndTime !== undefined)
resolvedDuration != null &&
(resolvedEndMark != null || resolvedEndTime != null)
) {
throw new TypeError(
`Failed to execute 'measure' on 'Performance': If a non-empty PerformanceMeasureOptions object was passed, it must not have all of its 'start', 'duration', and 'end' properties defined`,
@@ -293,7 +256,7 @@ export default class Performance {
}
const detail = startMarkOrOptions.detail;
if (detail !== undefined) {
if (detail != null) {
resolvedDetail = structuredClone(detail);
}
@@ -316,10 +279,10 @@ export default class Performance {
let computedStartTime = 0;
let computedDuration = 0;
if (cachedNativeMeasure) {
if (NativePerformance?.measure) {
try {
[computedStartTime, computedDuration] = cachedNativeMeasure(
resolvedMeasureName,
[computedStartTime, computedDuration] = NativePerformance.measure(
measureName,
resolvedStartTime,
resolvedEndTime,
resolvedDuration,
@@ -336,7 +299,7 @@ export default class Performance {
try {
[computedStartTime, computedDuration] =
NativePerformance.measureWithResult(
resolvedMeasureName,
measureName,
resolvedStartTime ?? 0,
resolvedEndTime ?? 0,
resolvedDuration,
@@ -353,23 +316,22 @@ export default class Performance {
warnNoNativePerformance();
}
MEASURE_OPTIONS_REUSABLE_OBJECT.startTime = computedStartTime;
MEASURE_OPTIONS_REUSABLE_OBJECT.duration = computedDuration ?? 0;
MEASURE_OPTIONS_REUSABLE_OBJECT.detail = resolvedDetail;
const measure = new PerformanceMeasure(measureName, {
startTime: computedStartTime,
duration: computedDuration ?? 0,
detail: resolvedDetail,
});
return new PerformanceMeasure(
resolvedMeasureName,
MEASURE_OPTIONS_REUSABLE_OBJECT,
);
return measure;
}
clearMeasures(measureName?: string): void {
if (!cachedNativeClearMeasures) {
if (!NativePerformance?.clearMeasures) {
warnNoNativePerformance();
return;
}
cachedNativeClearMeasures(measureName);
NativePerformance?.clearMeasures(measureName);
}
/**
@@ -12,43 +12,44 @@
import type {DOMHighResTimeStamp} from './PerformanceEntry';
import {getCurrentTimeStamp} from './internals/Utilities';
import {PerformanceEntry} from './PerformanceEntry';
export type DetailType = mixed;
export type PerformanceMarkOptions = $ReadOnly<{
export type PerformanceMarkOptions = {
detail?: DetailType,
startTime?: DOMHighResTimeStamp,
}>;
};
export type TimeStampOrName = DOMHighResTimeStamp | string;
export type PerformanceMeasureInit = $ReadOnly<{
export type PerformanceMeasureInit = {
detail?: DetailType,
startTime: DOMHighResTimeStamp,
duration: DOMHighResTimeStamp,
}>;
};
class PerformanceMarkTemplate extends PerformanceEntry {
// We don't use private fields because they're significantly slower to
// initialize on construction and to access.
__detail: DetailType;
_detail: DetailType;
// This constructor isn't really used. See `PerformanceMark` below.
constructor(markName: string, markOptions?: PerformanceMarkOptions) {
super({
name: markName,
entryType: 'mark',
startTime: markOptions?.startTime ?? getCurrentTimeStamp(),
startTime: markOptions?.startTime ?? performance.now(),
duration: 0,
});
this.__detail = markOptions?.detail ?? null;
if (markOptions) {
this._detail = markOptions.detail;
}
}
get detail(): DetailType {
return this.__detail;
return this._detail;
}
}
@@ -66,10 +67,12 @@ export const PerformanceMark: typeof PerformanceMarkTemplate =
) {
this.__name = markName;
this.__entryType = 'mark';
this.__startTime = markOptions?.startTime ?? getCurrentTimeStamp();
this.__startTime = markOptions?.startTime ?? performance.now();
this.__duration = 0;
this.__detail = markOptions?.detail ?? null;
if (markOptions) {
this._detail = markOptions.detail;
}
};
// $FlowExpectedError[prop-missing]
@@ -78,7 +81,7 @@ PerformanceMark.prototype = PerformanceMarkTemplate.prototype;
class PerformanceMeasureTemplate extends PerformanceEntry {
// We don't use private fields because they're significantly slower to
// initialize on construction and to access.
__detail: DetailType;
_detail: DetailType;
// This constructor isn't really used. See `PerformanceMeasure` below.
constructor(measureName: string, measureOptions: PerformanceMeasureInit) {
@@ -89,11 +92,13 @@ class PerformanceMeasureTemplate extends PerformanceEntry {
duration: measureOptions.duration,
});
this.__detail = measureOptions?.detail ?? null;
if (measureOptions) {
this._detail = measureOptions.detail;
}
}
get detail(): DetailType {
return this.__detail;
return this._detail;
}
}
@@ -110,7 +115,9 @@ export const PerformanceMeasure: typeof PerformanceMeasureTemplate =
this.__startTime = measureOptions.startTime;
this.__duration = measureOptions.duration;
this.__detail = measureOptions.detail ?? null;
if (measureOptions) {
this._detail = measureOptions.detail;
}
};
// $FlowExpectedError[prop-missing]
@@ -44,15 +44,6 @@ Fantom.unstable_benchmark
afterEach: clearMarksAndMeasures,
},
)
.test(
'measure (default)',
() => {
performance.measure('measure');
},
{
afterEach: clearMarksAndMeasures,
},
)
.test(
'measure (with start and end timestamps)',
() => {
@@ -53,7 +53,7 @@ describe('Performance', () => {
expect(mark.name).toBe('mark-now');
expect(mark.startTime).toBe(25);
expect(mark.duration).toBe(0);
expect(mark.detail).toBe(null);
expect(mark.detail).toBeUndefined();
});
it('works with custom timestamp', () => {
@@ -64,7 +64,7 @@ describe('Performance', () => {
expect(mark.name).toBe('mark-custom');
expect(mark.startTime).toBe(10);
expect(mark.duration).toBe(0);
expect(mark.detail).toBe(null);
expect(mark.detail).toBeUndefined();
});
it('provides detail', () => {
@@ -78,13 +78,6 @@ describe('Performance', () => {
expect(mark.detail).not.toBe(originalDetail);
});
it('provides a null detail if it is not provided or is undefined', () => {
expect(performance.mark('mark-without-detail').detail).toBe(null);
expect(
performance.mark('mark-without-detail', {detail: undefined}).detail,
).toBe(null);
});
it('throws if no name is provided', () => {
expect(() => {
// $FlowExpectedError[incompatible-call]
@@ -94,13 +87,6 @@ describe('Performance', () => {
);
});
it('casts mark name to a string', () => {
// $FlowExpectedError[incompatible-call]
const mark = performance.mark(10);
expect(mark.name).toBe('10');
});
it('casts startTime to a number', () => {
const mark = performance.mark('some-mark', {
// $FlowExpectedError[incompatible-call]
@@ -153,7 +139,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-defaults');
expect(measure.startTime).toBe(0);
expect(measure.duration).toBe(25);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with a start timestamp', () => {
@@ -168,7 +154,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-start-timestamp');
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(15);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with start mark', () => {
@@ -187,7 +173,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-start-mark');
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(15);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with end mark', () => {
@@ -206,7 +192,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-end-mark');
expect(measure.startTime).toBe(0);
expect(measure.duration).toBe(50);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with start mark and end mark', () => {
@@ -233,7 +219,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-start-mark-and-end-mark');
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(40);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with a start timestamp and an end timestamp', () => {
@@ -252,7 +238,7 @@ describe('Performance', () => {
);
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(15);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with a start timestamp and a duration', () => {
@@ -269,7 +255,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-start-timestamp-and-duration');
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(30);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with a start mark and a duration', () => {
@@ -290,7 +276,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-start-mark-and-duration');
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(30);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('throws if the specified mark does NOT exist', () => {
@@ -346,7 +332,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-defaults');
expect(measure.startTime).toBe(0);
expect(measure.duration).toBe(25);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with startMark', () => {
@@ -366,7 +352,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-start-mark');
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(15);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('works with startMark and endMark', () => {
@@ -390,7 +376,7 @@ describe('Performance', () => {
expect(measure.name).toBe('measure-with-start-mark-and-end-mark');
expect(measure.startTime).toBe(10);
expect(measure.duration).toBe(15);
expect(measure.detail).toBe(null);
expect(measure.detail).toBeUndefined();
});
it('throws if the specified marks do NOT exist', () => {
@@ -438,30 +424,6 @@ describe('Performance', () => {
expect(measure.detail).toEqual(originalDetail);
expect(measure.detail).not.toBe(originalDetail);
});
it('provides a null detail if it is not provided or is undefined', () => {
expect(performance.measure('measure-without-detail').detail).toBe(null);
expect(
performance.measure('measure-without-detail', {detail: undefined})
.detail,
).toBe(null);
});
it('casts measure name to a string', () => {
// $FlowExpectedError[incompatible-call]
const measure = performance.measure(10);
expect(measure.name).toBe('10');
});
it('throws if no name is provided', () => {
expect(() => {
// $FlowExpectedError[incompatible-call]
performance.measure();
}).toThrow(
`Failed to execute 'measure' on 'Performance': 1 argument required, but only 0 present.`,
);
});
});
describe('getting and clearing marks and measures', () => {
@@ -9,7 +9,6 @@
*/
import warnOnce from '../../../../../Libraries/Utilities/warnOnce';
import NativePerformance from '../specs/NativePerformance';
export function warnNoNativePerformance() {
warnOnce(
@@ -17,11 +16,3 @@ export function warnNoNativePerformance() {
'Missing native implementation of Performance',
);
}
declare var global: {
// This value is defined directly via JSI, if available.
+nativePerformanceNow?: ?() => number,
};
export const getCurrentTimeStamp: () => DOMHighResTimeStamp =
NativePerformance?.now ?? global.nativePerformanceNow ?? (() => Date.now());
+71 -109
View File
@@ -1359,20 +1359,13 @@
minimist "^1.2.8"
postject "^1.0.0-alpha.6"
"@eslint-community/eslint-utils@^4.2.0":
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"
"@eslint-community/eslint-utils@^4.7.0":
version "4.7.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz#607084630c6c033992a082de6e6fbc1a8b52175a"
integrity sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==
dependencies:
eslint-visitor-keys "^3.4.3"
"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae"
@@ -2502,20 +2495,20 @@
dependencies:
"@types/node" "*"
"@typescript-eslint/eslint-plugin@^8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.36.0.tgz#880ce277f8a30ccf539ec027acac157088f131ae"
integrity sha512-lZNihHUVB6ZZiPBNgOQGSxUASI7UJWhT8nHyUGCnaQ28XFCw98IfrMCG3rUl1uwUWoAvodJQby2KTs79UTcrAg==
"@typescript-eslint/eslint-plugin@^7.1.1":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz#b16d3cf3ee76bf572fdf511e79c248bdec619ea3"
integrity sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==
dependencies:
"@eslint-community/regexpp" "^4.10.0"
"@typescript-eslint/scope-manager" "8.36.0"
"@typescript-eslint/type-utils" "8.36.0"
"@typescript-eslint/utils" "8.36.0"
"@typescript-eslint/visitor-keys" "8.36.0"
"@typescript-eslint/scope-manager" "7.18.0"
"@typescript-eslint/type-utils" "7.18.0"
"@typescript-eslint/utils" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
graphemer "^1.4.0"
ignore "^7.0.0"
ignore "^5.3.1"
natural-compare "^1.4.0"
ts-api-utils "^2.1.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/parser@7.2.0":
version "7.2.0"
@@ -2528,24 +2521,15 @@
"@typescript-eslint/visitor-keys" "7.2.0"
debug "^4.3.4"
"@typescript-eslint/parser@^8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.36.0.tgz#003007fe2030013936b6634b9cf52c457d36ed42"
integrity sha512-FuYgkHwZLuPbZjQHzJXrtXreJdFMKl16BFYyRrLxDhWr6Qr7Kbcu2s1Yhu8tsiMXw1S0W1pjfFfYEt+R604s+Q==
"@typescript-eslint/parser@^7.1.1":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.18.0.tgz#83928d0f1b7f4afa974098c64b5ce6f9051f96a0"
integrity sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==
dependencies:
"@typescript-eslint/scope-manager" "8.36.0"
"@typescript-eslint/types" "8.36.0"
"@typescript-eslint/typescript-estree" "8.36.0"
"@typescript-eslint/visitor-keys" "8.36.0"
debug "^4.3.4"
"@typescript-eslint/project-service@8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.36.0.tgz#0c4acdcbe56476a43cdabaac1f08819424a379fd"
integrity sha512-JAhQFIABkWccQYeLMrHadu/fhpzmSQ1F1KXkpzqiVxA/iYI6UnRt2trqXHt1sYEcw1mxLnB9rKMsOxXPxowN/g==
dependencies:
"@typescript-eslint/tsconfig-utils" "^8.36.0"
"@typescript-eslint/types" "^8.36.0"
"@typescript-eslint/scope-manager" "7.18.0"
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/typescript-estree" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
debug "^4.3.4"
"@typescript-eslint/scope-manager@5.62.0":
@@ -2556,6 +2540,14 @@
"@typescript-eslint/types" "5.62.0"
"@typescript-eslint/visitor-keys" "5.62.0"
"@typescript-eslint/scope-manager@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83"
integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==
dependencies:
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
"@typescript-eslint/scope-manager@7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz#cfb437b09a84f95a0930a76b066e89e35d94e3da"
@@ -2564,44 +2556,31 @@
"@typescript-eslint/types" "7.2.0"
"@typescript-eslint/visitor-keys" "7.2.0"
"@typescript-eslint/scope-manager@8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.36.0.tgz#23e4196ed07d7ea3737a584fbebc9a79c3835168"
integrity sha512-wCnapIKnDkN62fYtTGv2+RY8FlnBYA3tNm0fm91kc2BjPhV2vIjwwozJ7LToaLAyb1ca8BxrS7vT+Pvvf7RvqA==
"@typescript-eslint/type-utils@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz#2165ffaee00b1fbbdd2d40aa85232dab6998f53b"
integrity sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==
dependencies:
"@typescript-eslint/types" "8.36.0"
"@typescript-eslint/visitor-keys" "8.36.0"
"@typescript-eslint/tsconfig-utils@8.36.0", "@typescript-eslint/tsconfig-utils@^8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.36.0.tgz#63ef8a20ae9b5754c6ceacbe87b2fe1aab12ba13"
integrity sha512-Nhh3TIEgN18mNbdXpd5Q8mSCBnrZQeY9V7Ca3dqYvNDStNIGRmJA6dmrIPMJ0kow3C7gcQbpsG2rPzy1Ks/AnA==
"@typescript-eslint/type-utils@8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.36.0.tgz#16b092c2cbbb5549f6a4df1382a481586850502f"
integrity sha512-5aaGYG8cVDd6cxfk/ynpYzxBRZJk7w/ymto6uiyUFtdCozQIsQWh7M28/6r57Fwkbweng8qAzoMCPwSJfWlmsg==
dependencies:
"@typescript-eslint/typescript-estree" "8.36.0"
"@typescript-eslint/utils" "8.36.0"
"@typescript-eslint/typescript-estree" "7.18.0"
"@typescript-eslint/utils" "7.18.0"
debug "^4.3.4"
ts-api-utils "^2.1.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/types@5.62.0":
version "5.62.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f"
integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==
"@typescript-eslint/types@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9"
integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==
"@typescript-eslint/types@7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.2.0.tgz#0feb685f16de320e8520f13cca30779c8b7c403f"
integrity sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==
"@typescript-eslint/types@8.36.0", "@typescript-eslint/types@^8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.36.0.tgz#d3d184adc2899e2912c13b17c1590486ef37c7ac"
integrity sha512-xGms6l5cTJKQPZOKM75Dl9yBfNdGeLRsIyufewnxT4vZTrjC0ImQT4fj8QmtJK84F58uSh5HVBSANwcfiXxABQ==
"@typescript-eslint/typescript-estree@5.62.0":
version "5.62.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b"
@@ -2615,6 +2594,20 @@
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/typescript-estree@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931"
integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==
dependencies:
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/visitor-keys" "7.18.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
minimatch "^9.0.4"
semver "^7.6.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/typescript-estree@7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz#5beda2876c4137f8440c5a84b4f0370828682556"
@@ -2629,31 +2622,15 @@
semver "^7.5.4"
ts-api-utils "^1.0.1"
"@typescript-eslint/typescript-estree@8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.36.0.tgz#344857fa79f71715369554a3cbb6b4ff8695a7bc"
integrity sha512-JaS8bDVrfVJX4av0jLpe4ye0BpAaUW7+tnS4Y4ETa3q7NoZgzYbN9zDQTJ8kPb5fQ4n0hliAt9tA4Pfs2zA2Hg==
"@typescript-eslint/utils@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f"
integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==
dependencies:
"@typescript-eslint/project-service" "8.36.0"
"@typescript-eslint/tsconfig-utils" "8.36.0"
"@typescript-eslint/types" "8.36.0"
"@typescript-eslint/visitor-keys" "8.36.0"
debug "^4.3.4"
fast-glob "^3.3.2"
is-glob "^4.0.3"
minimatch "^9.0.4"
semver "^7.6.0"
ts-api-utils "^2.1.0"
"@typescript-eslint/utils@8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.36.0.tgz#2c9af5292f14e0aa4b0e9c7ac0406afafb299acf"
integrity sha512-VOqmHu42aEMT+P2qYjylw6zP/3E/HvptRwdn/PZxyV27KhZg2IOszXod4NcXisWzPAGSS4trE/g4moNj6XmH2g==
dependencies:
"@eslint-community/eslint-utils" "^4.7.0"
"@typescript-eslint/scope-manager" "8.36.0"
"@typescript-eslint/types" "8.36.0"
"@typescript-eslint/typescript-estree" "8.36.0"
"@eslint-community/eslint-utils" "^4.4.0"
"@typescript-eslint/scope-manager" "7.18.0"
"@typescript-eslint/types" "7.18.0"
"@typescript-eslint/typescript-estree" "7.18.0"
"@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^5.47.1":
version "5.62.0"
@@ -2677,6 +2654,14 @@
"@typescript-eslint/types" "5.62.0"
eslint-visitor-keys "^3.3.0"
"@typescript-eslint/visitor-keys@7.18.0":
version "7.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7"
integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==
dependencies:
"@typescript-eslint/types" "7.18.0"
eslint-visitor-keys "^3.4.3"
"@typescript-eslint/visitor-keys@7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz#5035f177752538a5750cca1af6044b633610bf9e"
@@ -2685,14 +2670,6 @@
"@typescript-eslint/types" "7.2.0"
eslint-visitor-keys "^3.4.1"
"@typescript-eslint/visitor-keys@8.36.0":
version "8.36.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.36.0.tgz#7dc6ba4dd037979eb3a3bdd2093aa3604bb73674"
integrity sha512-vZrhV2lRPWDuGoxcmrzRZyxAggPL+qp3WzUrlZD+slFueDiYHxeBa34dUXPuC0RmGKzl4lS5kFJYvKCq9cnNDA==
dependencies:
"@typescript-eslint/types" "8.36.0"
eslint-visitor-keys "^4.2.1"
"@ungap/structured-clone@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
@@ -4524,11 +4501,6 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint-visitor-keys@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1"
integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==
eslint@^8.19.0, eslint@^8.57.0:
version "8.57.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668"
@@ -5387,16 +5359,11 @@ ieee754@^1.1.13:
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
ignore@^5.0.5, ignore@^5.2.0, ignore@^5.2.4:
ignore@^5.0.5, ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.1:
version "5.3.2"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
ignore@^7.0.0:
version "7.0.5"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9"
integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==
image-size@^1.0.2:
version "1.1.1"
resolved "https://registry.yarnpkg.com/image-size/-/image-size-1.1.1.tgz#ddd67d4dc340e52ac29ce5f546a09f4e29e840ac"
@@ -9176,16 +9143,11 @@ trim-repeated@^1.0.0:
dependencies:
escape-string-regexp "^1.0.2"
ts-api-utils@^1.0.1:
ts-api-utils@^1.0.1, ts-api-utils@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1"
integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==
ts-api-utils@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91"
integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==
tslib@^1.8.1, tslib@^1.9.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"