From c17267ec87f9afe78bb038c697d032641b37f8ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Wed, 13 Aug 2025 10:14:21 -0700 Subject: [PATCH] Upgrade tinybench to v4.1.0 (#53249) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53249 Changelog: [internal] This just upgrades tinybench (used in Fantom benchmarks) to v4.1.0, which contains a feature we need to customize test durations. Reviewed By: rshest Differential Revision: D80169516 fbshipit-source-id: 5813b3050843b52d604619a44a5e097e26f54432 --- .../npm/{tinybench_v3.1.x.js => tinybench_v4.1.x.js} | 9 ++++++++- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) rename flow-typed/npm/{tinybench_v3.1.x.js => tinybench_v4.1.x.js} (93%) diff --git a/flow-typed/npm/tinybench_v3.1.x.js b/flow-typed/npm/tinybench_v4.1.x.js similarity index 93% rename from flow-typed/npm/tinybench_v3.1.x.js rename to flow-typed/npm/tinybench_v4.1.x.js index 69526caf146..a40214d9673 100644 --- a/flow-typed/npm/tinybench_v3.1.x.js +++ b/flow-typed/npm/tinybench_v4.1.x.js @@ -91,7 +91,14 @@ declare module 'tinybench' { beforeEach?: (this: Task) => void | Promise, }; - export type Fn = () => Promise | mixed; + export interface FnReturnedObject { + overriddenDuration?: number; + } + + export type Fn = () => + | Promise + | void + | FnReturnedObject; declare export class Bench extends EventTarget { concurrency: null | 'task' | 'bench'; diff --git a/package.json b/package.json index 93deb6ff91f..9852f964acc 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "signedsource": "^1.0.0", "supports-color": "^7.1.0", "temp-dir": "^2.0.0", - "tinybench": "^3.1.0", + "tinybench": "^4.1.0", "typescript": "5.8.3", "ws": "^6.2.3" }, diff --git a/yarn.lock b/yarn.lock index f1c8275b4ab..f984254adeb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9174,10 +9174,10 @@ through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tinybench@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-3.1.0.tgz#ec68451ff05233cf3de12c46f39f06011897109a" - integrity sha512-Km+oMh2xqNCxuyoUsqbRmHgFSd8sATh7v7xreP+kHN6x67w28Pawr83WmBxcaORvxkc0Ex6zgqK951yBnTFaaQ== +tinybench@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-4.1.0.tgz#090118e51159eb105f3cc2ef5cf371f3f8adc7bf" + integrity sha512-8JZoQRJgWWEIIeAmpiNmMHIREmUY3oGX8GRmlmNapLr/qtgMe+K76vM2qabh85hNScnE2lqTVTajVETjuD9Ixg== tmp@^0.0.33: version "0.0.33"