-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Lazy load dependencies #82
Conversation
Really not a fan of lazy loading dependencies... cc @sindresorhus |
@nikhilkh Unfortunately this will need to be rebased. @SBoudrias I'm usually not a fan of lazy loading deps either, but, due to the nature of this module ("extra" functionality that is non-critical to a CLI, goal of being non-intrusive), I think it's not a bad idea. Hey, at least he chose Sindre's |
@@ -40,7 +40,8 @@ | |||
"is-npm": "^1.0.0", | |||
"latest-version": "^2.0.0", | |||
"semver-diff": "^2.0.0", | |||
"xdg-basedir": "^2.0.0" | |||
"xdg-basedir": "^2.0.0", | |||
"lazy-req" : "^1.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do eventually merge this, we should put this dependency in alphabetical order. Typically npm will do this for us via npm install --save lazy-req
.
I've updated the PR. I wouldn't necessarily lean on lazy loading either but for a module that runs on startup to provide extra features for a CLI - it's important to have minimal impact on startup perf. #80 describes the impact in the current state. Loading |
Not a big fan either @SBoudrias, but I've seen |
Changes looks good to me, but should be manually tested before doing a release to ensure it didn't break anything. |
@sindresorhus Worth adding a test that verifies an |
@nexdrew Yeah, I don't think that is of much help. What's needed here in general are more integration tests, testing that the notification actually shows up when there's a new release. Right now, I manually delete the update-notifier configstore entry for |
@sindresorhus Ok, gotcha. That's what I do when manually testing as well. |
Opened an issue: #88 |
@nikhilkh hey, any chance you can fix the merge conflict? Given the other maintainers are fine with going the lazy-req road, I think this would be mergeable as is. |
Fixed merge conflict. Thanks! It will be great to have this merged soon to avoid future re-basing. :) |
Thanks! |
No description provided.