fix: Ensure noUpdateNotifier from turbo.json is respected (#11925)
### Description
Fixes #11510
The `noUpdateNotifier` setting in `turbo.json` was not being reliably
respected because the full configuration pipeline could fail before
reaching the turbo.json source.
### Problem
The config builder resolves sources in priority order using `try_fold`:
1. CLI overrides (highest)
2. Environment variables (`TURBO_*`)
3. Override environment variables
4. Local config (`.turbo/config.json`)
5. Global auth (`~/.config/com.vercel.cli/auth.json`)
6. Global config (`~/.config/turborepo/config.json`)
7. **turbo.json (lowest)**
If any source earlier in the pipeline returns an error (e.g. malformed
global auth file, invalid environment variable value, missing config
directory), the `try_fold` aborts immediately. The turbo.json source —
last in the list — is never processed. The subsequent
`.unwrap_or_default()` then returns a default config with
`no_update_notifier: false`, silently discarding the setting from
turbo.json.
The `--no-update-notifier` CLI flag and `TURBO_NO_UPDATE_NOTIFIER=true`
env var work because they are processed before any potentially-failing
source.
### Fix
- Added a fallback in `TurboConfigProvider::get_config` that reads
`noUpdateNotifier` directly from turbo.json when the full config
pipeline does not yield `no_update_notifier: true`. This ensures the
setting is respected even when unrelated config sources fail.
- Replaced the silent `.unwrap_or_default()` with explicit
`tracing::debug` logging when the config pipeline fails.
- Added tests verifying that `noUpdateNotifier` is correctly:
- Parsed from turbo.json (simple and realistic full configs)
- Propagated through the full config builder
- Propagated through `resolve_configuration_for_shim`
### Testing
All existing tests pass. New tests added in:
- `turborepo-turbo-json`: parsing tests for `noUpdateNotifier`
- `turborepo-config`: full config build test
- `turborepo-lib`: `resolve_configuration_for_shim` propagation test
---------
Co-authored-by: Dmitrii Troitskii <jsleitor@gmail.com>
Co-authored-by: Anthony Shew <anthony.shew@vercel.com>
Co-authored-by: Anthony Shew <anthonyshew@gmail.com>