sindresorhus/update-notifier
Run in child process instead of lazy loading every dependency
開放
#210 建立於 2021年7月26日
enhancementhelp wanted
倉庫指標
- 星標
- (1,800 顆星)
- PR 合併指標
- (30 天內沒有已合併 PR)
描述
Not a big fan [of lazy loading], but I've seen
update-notifieras a require time offender when profiling various things. The idea of update-notifier is that it should have no impact on the consumer. It's just an added bonus, not critical. https://github.com/yeoman/update-notifier/pull/82#issuecomment-225636213
I may be wrong, it seems to me that this change was made simply to hide the package from the very initial load but in practice every dependency is still loaded right after.
update-notifier already uses a child process to do the checking, so I think it'd be best to do the whole thing there.
Related: