Gulp CLI and Local Gulp Package: Interoperability After a Failed Upgrade
0 reputation · 19 May 2021, 18:37 UTC
Goal: ensure that a failed gulp version upgrade does not leave the project in an unusable state where the gulp CLI cannot run tasks due to mismatch between the CLI and the local gulp package.
Current behavior: the gulp CLI remains functional but relies on the locally installed gulp package; if the local package upgrade is interrupted, the CLI may encounter 'Cannot find module gulp' errors or runtime errors if the gulpfile uses new API syntax while an old version is installed.
Uncertainty: whether the gulp tooling should automatically preserve a backup of the gulpfile.js and node_modules state before attempting an upgrade, providing a built-in rollback path without requiring manual npm install commands.
Should the gulp CLI automatically create a backup of gulpfile.js and node_modules before upgrading the local gulp package?
What criteria should determine when such a backup is retained or discarded after a successful upgrade?