Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: upgrade trace_engine and drop manually written types #15810

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

connorjclark
Copy link
Collaborator

We modified the trace_engine lib to publish many JS files instead of bundling, so we could easily package types. Can now delete types/trace-engine.d.ts.

Some churn, it comes from the trace event types being less ergonomic than our own. Also from more specific types than what I wrote manually.

@connorjclark connorjclark requested a review from a team as a code owner February 15, 2024 00:43
@connorjclark connorjclark requested review from adamraine and removed request for a team February 15, 2024 00:43
Copy link

vercel bot commented Feb 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lighthouse ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 9:01pm

));
// TODO: use TraceEngine.TraceProcessor.createWithAllHandlers above.
return /** @type {import('@paulirish/trace_engine').Handlers.Types.TraceParseData} */(
engine.data);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will follow up with this change. Didn't want a behavior change with this patch.

await engine.parse(/** @type {import('@paulirish/trace_engine').Types.TraceEvents.TraceEventData[]} */ (
traceEvents
));
// TODO: use TraceEngine.TraceProcessor.createWithAllHandlers above.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relevant chat thread:

image

shrugz.

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems alright.

rootcauses is getting kinda gnarly but.. i guess that just happens with DOM nodes.

}
},
/** @param {string} url */
// @ts-expect-error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can you add a comment explaining this @ts-expect-error

@devtools-bot devtools-bot merged commit 883fdb1 into main Feb 15, 2024
29 of 30 checks passed
@devtools-bot devtools-bot deleted the trace-engine-types branch February 15, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants