Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Efficient alternative to the update notifier #2151

Closed
ariya opened this issue Jan 29, 2017 · 5 comments
Closed

Efficient alternative to the update notifier #2151

ariya opened this issue Jan 29, 2017 · 5 comments

Comments

@ariya
Copy link

ariya commented Jan 29, 2017

Currently, installing TSLint via npm also pulls the update-notifier module, which then pulls >65 other npm packages as its dependencies. This update-notifier module is only used in src/updateNotifier.ts for giving a reminder of an available update, arguably a non-essential feature. In the mean time, the most essential feature of TSLint requires only about a half dozen (dependent) packages.

It is far more efficient to grab https://registry.npmjs.org/tslint, JSON.parse it, and then check for the latest version.

@nchen63
Copy link
Contributor

nchen63 commented Jan 29, 2017

Agree, I don't think we realized how many dependencies that package used

@ajafff
Copy link
Contributor

ajafff commented Feb 6, 2017

Actually it is not as easy as you think.
You need to read the .npmrc file to find out if the user has a custom registry.
You should also use a http library that can work with user's proxy settings.
I don't know which of the above is covered by update-notifier, but that's the minimum requirement to make it work for users inside big corporate networks.

@ariya
Copy link
Author

ariya commented Feb 8, 2017

IMHO such a feature does not need to be bundled with TSLint. Nowadays, there are already various services out there to help tracking updates: Greenkeeper, David, libraries.io, etc.

@mprobst
Copy link
Contributor

mprobst commented Feb 9, 2017

For a data point, for our usage in Google we disabled this dependency and patched the source to avoid pulling these in.

@adidahiya
Copy link
Contributor

I agree with @ariya, I'm removing the dependency in #2262.

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

No branches or pull requests

5 participants