Choosing between nest update CLI and manual package.json edits for deterministic rollback after a failed NestJS major upgrade
0 reputation · 27 Feb 2021, 00:35 UTC
The goal is to guarantee a reversible upgrade path when a NestJS major release alters decorator signatures or DI configuration, allowing teams to restore the pre‑upgrade state without losing uncommitted work.
The nest update CLI speeds up dependency resolution to the latest compatible versions but provides no built‑in mechanism to revert transitive changes, forcing developers to rely on external version‑control or lockfile strategies. Manually editing package.json and running npm install gives explicit control over each version, enabling selective adoption and easier source‑control rollback, yet demands precise pinning and may overlook environment‑specific artifacts or peer‑dependency conflicts that only surface at runtime.
What trade‑offs determine whether to prefer the nest update CLI or manual package.json pinning for safe rollback? Can lockfile‑based strategies (e.g., npm ci) reliably complement the CLI to recover a known good state? Does manual version pinning consistently expose all transitive dependency conflicts before they affect the application?