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

Config option to disable update check notification #4158

Closed
1 task done
LeSuisse opened this issue Dec 24, 2021 · 1 comment · Fixed by #4285
Closed
1 task done

Config option to disable update check notification #4158

LeSuisse opened this issue Dec 24, 2021 · 1 comment · Fixed by #4285
Milestone

Comments

@LeSuisse
Copy link
Contributor

Describe the user story

I'm in a team where all our development tools are pinned via Nix so we have the same reproducible environment.
We update the environment on a regular basis but with the fast development of pnpm we are often a bit behind so we get the notification message. It is not really a big issue as we can just ignore it until the next time we upgrade our dev tools but it is still a small annoyance and can it can be confusing for newcomers because the suggested upgrade command will not work.

Describe the solution you'd like

Having an additional configuration flags check-for-updates defaulting to true would be great.

Describe the drawbacks of your solution

Users could set this option to just ignore the new versions and never update pnpm which is not a good thing. It is however probable that users doing that on purpose never update even today anyway.

Describe alternatives you've considered

When update-notifier was used it was possible to disable the notification with the env variable NO_UPDATE_NOTIFIER. It looks like this is no more possible since 90487a3 and unless I miss something there is no alternative.

@gluxon
Copy link
Member

gluxon commented Jan 4, 2022

+1 to this feature. I would also be happy to help implement this.

Did some quick searching and npm currently uses the update-notifier config key.

https://github.com/npm/cli/blob/4dbeb007d0d6350284c7b1edbf4d5b0030c67c66/lib/utils/update-notifier.js#L39-L43

  if (!npm.config.get('update-notifier') ||
      isGlobalNpmUpdate(npm) ||
      ciDetect()) {
    return null
  }

Which was implemented here: npm/npm#20750

zkochan added a commit that referenced this issue Jan 27, 2022
The configuration option `update-notifier` allows users to disable the
update verification. This is interesting when pnpm is installed from
another package manager because the given instructions will not be
accurate. The `update-notifier` option exists in NPM so it can also
ease the migration to pnpm.
(https://docs.npmjs.com/cli/v8/using-npm/config#update-notifier).

close #4158.

Co-authored-by: Zoltan Kochan <z@kochan.io>
@zkochan zkochan added this to the v6.29 milestone Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants