vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.08k stars 1.8k forks source link

Allow disabling checking for a new version of Turborepo #8564

Open ari-becker opened 3 months ago

ari-becker commented 3 months ago

Verify canary release

Describe the Bug

╭──────────────────────────────────────────────────────────────────────╮
│                                                                      │
│                   Update available v2.0.3 ≫ v2.0.4                   │
│    Changelog: https://github.com/vercel/turbo/releases/tag/v2.0.4    │
│           Run "npx @turbo/codemod@latest update" to update           │
│                                                                      │
│        Follow @turborepo for updates: https://x.com/turborepo        │
╰──────────────────────────────────────────────────────────────────────╯

Expected Behavior

Feature Request

I want to be able to configure turbo.json as follows:

{
  "meta": {
    "disableUpdateChecks": true
  }
}

If I opt-in to this setting, then Turbo will not check to see if there is a new version.

Why?

Every tool and every library seems to have its own update checks these days. The DX is, log in for the day, start working, see which tool I need to update today. Either I stop what I'm doing to install the update, which is exhausting over a long period of time, or I mentally check out and ignore the version update notice, which defeats the purpose.

To keep my dependencies (including Turbo) up-to-date, I use Renovate Mend (there are alternatives like GitHub's Dependabot), which allows me to not just isolate dependency updates to their own PRs but also to keep these dependency updates restricted to a schedule. Instead of being pressured to update something every day, I can say OK I'll do dependency updates once a week, once every two weeks, once a month, and have the mental space to work on feature development most days.

As a user with automated dependency updating set up, I would like to disable Turbo's built-in update version checking.

anthonyshew commented 3 months ago

Hey, this can be done with the TURBO_NO_UPDATE_NOTIFIER environment variable: https://turbo.build/repo/docs/reference/system-environment-variables

Are you specifically wanting a configuration to set in turbo.json or is that sufficient?

ari-becker commented 3 months ago

Hey, this can be done with the TURBO_NO_UPDATE_NOTIFIER environment variable: https://turbo.build/repo/docs/reference/system-environment-variables

Are you specifically wanting a configuration to set in turbo.json or is that sufficient?

Oh nice, I wasn't familiar with that option, and didn't find it in the documentation because I wasn't looking to find it under environment variables. For my needs as a solo developer, that will suffice, I can just set it in my .zshenv.

If I was using Turbo in a team though, because the automatic dependency updating is set up on the Git repository itself, so it would be relevant for the entire project. And maybe some people on the team are working on different projects, one where automatic dependency updating is set up and one where it isn't set up, so they should naively get update notifications on the project where it isn't set up. So IMO being able to set this in configuration in turbo.json is more correct.

Because the environment variable is sufficient for my purposes, I'm OK with closing this, but up to you if you would like to keep it open, maybe a good-first-issue label or something like that.

tknickman commented 3 months ago

You can also set this via an argument if it's helpful: --no-update-notifier

anthonyshew commented 3 months ago

Going to re-open this one because I think there's some merit to a config-based approach. We're seeing that around the community with a number of our flags/environment variables.

(Sorry, Tom, I only wrote that in my mental register before. Should have commented so others would know.)