Skip to content

Commit

Permalink
upgrade trace-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Aug 5, 2024
1 parent 4e8ac7c commit 7fb1689
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 16 deletions.
7 changes: 5 additions & 2 deletions core/computed/metrics/lantern-first-contentful-paint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint {
* @return {Promise<LH.Artifacts.LanternMetric>}
*/
static async computeMetricWithGraphs(data, context, extras) {
return this.compute(await getComputationDataParams(data, context), extras)
.catch(lanternErrorAdapter);
try {
return this.compute(await getComputationDataParams(data, context), extras);
} catch (err) {
lanternErrorAdapter(err);
}
}

/**
Expand Down
7 changes: 5 additions & 2 deletions core/computed/metrics/lantern-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ class LanternInteractive extends Lantern.Metrics.Interactive {
* @return {Promise<LH.Artifacts.LanternMetric>}
*/
static async computeMetricWithGraphs(data, context, extras) {
return this.compute(await getComputationDataParams(data, context), extras)
.catch(lanternErrorAdapter);
try {
return this.compute(await getComputationDataParams(data, context), extras);
} catch (err) {
lanternErrorAdapter(err);
}
}

/**
Expand Down
7 changes: 5 additions & 2 deletions core/computed/metrics/lantern-largest-contentful-paint.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ class LanternLargestContentfulPaint extends Lantern.Metrics.LargestContentfulPai
* @return {Promise<LH.Artifacts.LanternMetric>}
*/
static async computeMetricWithGraphs(data, context, extras) {
return this.compute(await getComputationDataParams(data, context), extras)
.catch(lanternErrorAdapter);
try {
return this.compute(await getComputationDataParams(data, context), extras);
} catch (err) {
lanternErrorAdapter(err);
}
}

/**
Expand Down
7 changes: 5 additions & 2 deletions core/computed/metrics/lantern-max-potential-fid.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ class LanternMaxPotentialFID extends Lantern.Metrics.MaxPotentialFID {
* @return {Promise<LH.Artifacts.LanternMetric>}
*/
static async computeMetricWithGraphs(data, context, extras) {
return this.compute(await getComputationDataParams(data, context), extras)
.catch(lanternErrorAdapter);
try {
return this.compute(await getComputationDataParams(data, context), extras);
} catch (err) {
lanternErrorAdapter(err);
}
}

/**
Expand Down
7 changes: 5 additions & 2 deletions core/computed/metrics/lantern-speed-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ class LanternSpeedIndex extends Lantern.Metrics.SpeedIndex {
* @return {Promise<LH.Artifacts.LanternMetric>}
*/
static async computeMetricWithGraphs(data, context, extras) {
return this.compute(await getComputationDataParams(data, context), extras)
.catch(lanternErrorAdapter);
try {
return this.compute(await getComputationDataParams(data, context), extras);
} catch (err) {
lanternErrorAdapter(err);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"webtreemap-cdt": "^3.2.1"
},
"dependencies": {
"@paulirish/trace_engine": "0.0.28",
"@paulirish/trace_engine": "0.0.30",
"@sentry/node": "^6.17.4",
"axe-core": "^4.9.1",
"chrome-launcher": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion types/artifacts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ declare module Artifacts {

interface TraceEngineResult {
data: TraceEngine.Handlers.Types.TraceParseData;
insights: TraceEngine.Insights.Types.TraceInsightData<typeof TraceEngine.Handlers.ModelHandlers>;
insights: TraceEngine.Insights.Types.TraceInsightData;
}

interface TraceEngineRootCauses {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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.30":
version "0.0.30"
resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.30.tgz#89b84129c6b66a5582873c1062f4414e2d81b930"
integrity sha512-26Kr4gA2EGV6zq5kaQawy7jah6ih3XN2bDQti5/HTdFhIetbbDVgwxVnH0hCMe0vD1yMk5SCCQyka3e0cR7GhA==

"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
Expand Down

0 comments on commit 7fb1689

Please sign in to comment.