Skip to content

Commit

Permalink
deps: upgrade trace_engine to 0.0.19 (#15926)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Apr 8, 2024
1 parent f26cb8e commit e6ffdf3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
12 changes: 7 additions & 5 deletions cli/test/smokehouse/test-definitions/shift-attribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ const expectations = {
node: {selector: 'body > div#blue'},
subItems: {items: [{cause: /font/, extra: {value: /Regular\.ttf/}}]},
},
{
node: {selector: 'body > div#blue'},
// TODO: We can't get nodes from non-main frames yet. See runRootCauseAnalysis.
subItems: {items: [{cause: /iframe/, extra: undefined}]},
},
// iframe root causes are disabled due to performance issues
// https://github.com/GoogleChrome/lighthouse/issues/15869
// {
// node: {selector: 'body > div#blue'},
// // TODO: We can't get nodes from non-main frames yet. See runRootCauseAnalysis.
// subItems: {items: [{cause: /iframe/, extra: undefined}]},
// },
{
node: {selector: 'body > div#blue'},
subItems: {items: [{cause: /Media/, extra: {selector: 'body > img'}}]},
Expand Down
4 changes: 2 additions & 2 deletions core/computed/metrics/cumulative-layout-shift.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ class CumulativeLayoutShift {
await processor.parse(/** @type {import('@paulirish/trace_engine').Types.TraceEvents.TraceEventData[]} */ (
events
));
if (!processor.data) {
if (!processor.traceParsedData) {
throw new Error('null trace engine result');
}
return processor.data.LayoutShifts.sessionMaxScore;
return processor.traceParsedData.LayoutShifts.sessionMaxScore;
};
const cumulativeLayoutShift = await run(allFrameShiftEvents.map(e => e.event));
const cumulativeLayoutShiftMainFrame = await run(mainFrameShiftEvents.map(e => e.event));
Expand Down
2 changes: 1 addition & 1 deletion core/computed/trace-engine-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TraceEngineResult {
));
// TODO: use TraceEngine.TraceProcessor.createWithAllHandlers above.
return /** @type {import('@paulirish/trace_engine').Handlers.Types.TraceParseData} */(
engine.data);
engine.traceParsedData);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"webtreemap-cdt": "^3.2.1"
},
"dependencies": {
"@paulirish/trace_engine": "^0.0.12",
"@paulirish/trace_engine": "^0.0.19",
"@sentry/node": "^6.17.4",
"axe-core": "^4.9.0",
"chrome-launcher": "^1.1.1",
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.12":
version "0.0.12"
resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.12.tgz#6172c84f19d1e4254450d1927b1bb3eea5b5ba04"
integrity sha512-PglukOOYGvjqgMVKNSa3a4grWrWzL97L47bgDCzqAnDSTJ+vDOKxMPXR3rsnLECoZzpbb9LCzS3CEg/NwwhRHQ==
"@paulirish/trace_engine@^0.0.19":
version "0.0.19"
resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.19.tgz#794642d6b4947fc2a4b5724a57e3af61606029e2"
integrity sha512-3tjEzXBBtU83DkCJAdU2UwBBunspiwTCn+Y5jOxm592cfEuLr/T7Lcn+QhRerVqkSik2mnjN4X6NgHZjI9Biwg==

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

0 comments on commit e6ffdf3

Please sign in to comment.