Skip to content

misc: rename LHError to LighthouseError #14173

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

Merged
merged 2 commits into from
Jun 30, 2022
Merged

misc: rename LHError to LighthouseError #14173

merged 2 commits into from
Jun 30, 2022

Conversation

connorjclark
Copy link
Collaborator

While converting core to ESM (ref #12689) I changed lh-error.js to export the LighthouseError class as a named property. It's odd to export a class under a different name (LHError), so I've updated all usages of LHError to LighthouseError. This PR is to make the upcoming core PR slightly less big.

Potentially breaking is the change of name. Could revert if someone feels strongly about it.

Of course, an alternative is to rename the class to LHError. No strong preference, just leaning towards spelling out our classes as a default.

@benschwarz
Copy link
Contributor

@connorjclark we require LHError in a few places, but this change shouldn't be a big deal to upgrade from.

For ESM in general, it might be helpful if you start tagging issues with an esm label to aid searchability when it comes time to upgrade to Lighthouse ESM? Just a thought, but probably fine either way imo!

Copy link
Member

@adamraine adamraine left a comment

Choose a reason for hiding this comment

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

nit: noticed a few comments and stuff still using LHError via vscode search

Otherwise LGTM

@connorjclark
Copy link
Collaborator Author

connorjclark commented Jun 30, 2022

@benschwarz you should just look through #12689, anything related to esm is linked there. 10.0 will be the first release to transition the node API to esm.

@connorjclark connorjclark merged commit ecf41d7 into master Jun 30, 2022
@connorjclark connorjclark deleted the lighthouse-error branch June 30, 2022 23:39
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.

4 participants