Skip to content

Commit

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

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

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

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

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

/**
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.30",
"@paulirish/trace_engine": "0.0.28",
"@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;
insights: TraceEngine.Insights.Types.TraceInsightData<typeof TraceEngine.Handlers.ModelHandlers>;
}

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.30":
version "0.0.30"
resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.30.tgz#89b84129c6b66a5582873c1062f4414e2d81b930"
integrity sha512-26Kr4gA2EGV6zq5kaQawy7jah6ih3XN2bDQti5/HTdFhIetbbDVgwxVnH0hCMe0vD1yMk5SCCQyka3e0cR7GhA==
"@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==

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

0 comments on commit 569f4b9

Please sign in to comment.