From 46d718adc78fbf58f67f1d9ce9a74ebaf9a3d6a7 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Tue, 6 Aug 2024 17:05:01 -0700 Subject: [PATCH] deps: upgrade `trace_engine` to 0.0.32 (#16143) --- core/computed/metrics/lantern-first-contentful-paint.js | 4 ++-- core/computed/metrics/lantern-interactive.js | 4 ++-- core/computed/metrics/lantern-largest-contentful-paint.js | 4 ++-- core/computed/metrics/lantern-max-potential-fid.js | 4 ++-- core/computed/metrics/lantern-speed-index.js | 4 ++-- package.json | 2 +- types/artifacts.d.ts | 2 +- yarn.lock | 8 ++++---- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/computed/metrics/lantern-first-contentful-paint.js b/core/computed/metrics/lantern-first-contentful-paint.js index f3b441c2183e..cfa300981218 100644 --- a/core/computed/metrics/lantern-first-contentful-paint.js +++ b/core/computed/metrics/lantern-first-contentful-paint.js @@ -16,8 +16,8 @@ class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + const params = await getComputationDataParams(data, context); + return Promise.resolve(this.compute(params, extras)).catch(lanternErrorAdapter); } /** diff --git a/core/computed/metrics/lantern-interactive.js b/core/computed/metrics/lantern-interactive.js index 51abaa9edbc0..d0e4e346b8ff 100644 --- a/core/computed/metrics/lantern-interactive.js +++ b/core/computed/metrics/lantern-interactive.js @@ -17,8 +17,8 @@ class LanternInteractive extends Lantern.Metrics.Interactive { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + const params = await getComputationDataParams(data, context); + return Promise.resolve(this.compute(params, extras)).catch(lanternErrorAdapter); } /** diff --git a/core/computed/metrics/lantern-largest-contentful-paint.js b/core/computed/metrics/lantern-largest-contentful-paint.js index 77c26c2e3b35..b52162c14526 100644 --- a/core/computed/metrics/lantern-largest-contentful-paint.js +++ b/core/computed/metrics/lantern-largest-contentful-paint.js @@ -17,8 +17,8 @@ class LanternLargestContentfulPaint extends Lantern.Metrics.LargestContentfulPai * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + const params = await getComputationDataParams(data, context); + return Promise.resolve(this.compute(params, extras)).catch(lanternErrorAdapter); } /** diff --git a/core/computed/metrics/lantern-max-potential-fid.js b/core/computed/metrics/lantern-max-potential-fid.js index 3d9580420406..bcbf308ba523 100644 --- a/core/computed/metrics/lantern-max-potential-fid.js +++ b/core/computed/metrics/lantern-max-potential-fid.js @@ -17,8 +17,8 @@ class LanternMaxPotentialFID extends Lantern.Metrics.MaxPotentialFID { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + const params = await getComputationDataParams(data, context); + return Promise.resolve(this.compute(params, extras)).catch(lanternErrorAdapter); } /** diff --git a/core/computed/metrics/lantern-speed-index.js b/core/computed/metrics/lantern-speed-index.js index 9197fb93cd6c..53a621ad8ca8 100644 --- a/core/computed/metrics/lantern-speed-index.js +++ b/core/computed/metrics/lantern-speed-index.js @@ -18,8 +18,8 @@ class LanternSpeedIndex extends Lantern.Metrics.SpeedIndex { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + const params = await getComputationDataParams(data, context); + return Promise.resolve(this.compute(params, extras)).catch(lanternErrorAdapter); } /** diff --git a/package.json b/package.json index 7742e54e0326..eca0dcd389e4 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ "webtreemap-cdt": "^3.2.1" }, "dependencies": { - "@paulirish/trace_engine": "0.0.28", + "@paulirish/trace_engine": "0.0.32", "@sentry/node": "^6.17.4", "axe-core": "^4.9.1", "chrome-launcher": "^1.1.2", diff --git a/types/artifacts.d.ts b/types/artifacts.d.ts index 6748d35c0fd1..0abf2c060887 100644 --- a/types/artifacts.d.ts +++ b/types/artifacts.d.ts @@ -511,7 +511,7 @@ declare module Artifacts { interface TraceEngineResult { data: TraceEngine.Handlers.Types.TraceParseData; - insights: TraceEngine.Insights.Types.TraceInsightData; + insights: TraceEngine.Insights.Types.TraceInsightData; } interface TraceEngineRootCauses { diff --git a/yarn.lock b/yarn.lock index 69f343d10dc9..6a4609c3213b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1080,10 +1080,10 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@paulirish/trace_engine@0.0.28": - version "0.0.28" - resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.28.tgz#9c7163c68fc697a3c39638248aa8f143eb188927" - integrity sha512-hxeqhny/jggy3y3yEUE/91UQmNREjoebaYlggWNTtX1ZFdIXJ4ea8MSMlO+dc1oWcnKHGQzdU3+Mhl01ZEuU0w== +"@paulirish/trace_engine@0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.32.tgz#090fd603f9264aad6fce4461574693b1462f799f" + integrity sha512-KxWFdRNbv13U8bhYaQvH6gLG9CVEt2jKeosyOOYILVntWEVWhovbgDrbOiZ12pJO3vjZs0Zgbd3/Zgde98woEA== "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2"