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
[Question] Is there a way to disable the upgrade notice? #1324
Comments
There is not a way to disable the update-notifier currently, though I could add an environment variable for that. As for your second question about the package manager, I'll have to look into that to see if it's possible. That message is coming from a library that handles the update logic and notification. |
I reviewed update-notifier and discovered that it does not run when executed within an npm script. Try creating a simple npm script When it comes to the npm install command it suggests, that appears to be a limitation of update-notifier itself. It only detects npm or yarn. It is currently using a simple is-yarn-global package to detect yarn, and maybe something similar can be done for pnpm. I suggest opening an issue on the update-notifier repo to request this functionality, or even better a PR. |
Tracked here. |
@raineorshine Would you mind vendoring |
What do you mean by vendoring? |
Inlining their source code and modify it to fit our needs in this repo. |
Got it, thanks. Even easier, we can replace this line: npm-check-updates/src/bin/cli.ts Line 61 in be4b557
with our own template literal: Run ${chalk.cyan(`${options.packageManager} ${options.packageManager ==='yarn' ? 'add' : 'install'}${options.global ? ' -g' : ''} npm-check-updates`)} to update That's basically what update-notifier is doing, but with the package manager specific phrasing added. |
How do you disable the following message? Also, I'm using pnpm, it always suggests doing
npm i -g npm-check-updates
, which is wrong.The text was updated successfully, but these errors were encountered: