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

Remove update-notifier #13453

Closed
remcohaszing opened this issue Dec 2, 2021 · 4 comments · Fixed by #13588
Closed

Remove update-notifier #13453

remcohaszing opened this issue Dec 2, 2021 · 4 comments · Fixed by #13588
Assignees
Labels

Comments

@remcohaszing
Copy link

Summary

Currently lighthouse has 136 production dependencies including indirect dependencies. When update-notifier is removed, this is trimmed down to just 76. Of course these numbers don’t say anything about the types of packages it depends on.

I believe this is a lot of dependencies for an unimportant feature. (People should check for outdated packages regularly regardless of a CLI tool telling them to.)

@paulirish
Copy link
Member

We appreciate the issue. We are very conservative when it comes to dependencies and always happy to reduce the count of transitive deps involved.

At the same time, we appreciate the value that update-notifier brings. Do you know of an alternative that's a bit more lean?

We'll also discuss dropping the feature entirely.

@remcohaszing
Copy link
Author

As far as I can tell update-notifier is the go-to library to use for this feature.

I believe this is a useful feature to have for tools that are installed globally (i.e. npm / yarn), but most CLI tools, including lighthouse tend to be installed locally in a project. Typically such projects have deliberately locked their dependencies, and users manage outdated dependencies through a package manager. For such tools I personally don’t see the added value of update-notifier (imagine every other CLI tool in your node_modules would use that).

I don’t use lighthouse as a dependency directly. Instead it’s a dependency of @lhci/cli, which is also maintained by the Google Chrome team.

When comparing the dependencies in @lhci/cli/package.json and lighthouse/package.json, you can see they both use a different major version of update-notifier. Both pull in a significantly different set of dependencies. If both would use the same version it can be deduped.

It’s not just update-notifier by the way. They also use diffent major versions of chrome-launcher, lighthouse-logger, open, yargs,yargs-parser, and inquirer instead of enquirer.

@paulirish
Copy link
Member

paulirish commented Jan 13, 2022

True. This does suggest that us splitting out the lighthouse CLI package from the lighthouse node API would probably be useful.

We did end up doing the exact same thing with speedline for the same reasons. paulirish/speedline#39

@connorjclark
Copy link
Collaborator

Let's remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants