Scaffolds CRAN-compliant deprecation wrappers and interactively refactors old function calls across tests and vignettes to ensure a smooth transition to new API versions.
Value
Invisibly returns a named list with components: status ("done",
"cancelled", or "error"), old_function, new_function,
wrapper_file, and replacements (integer count).
Details
The function manages the deprecation lifecycle through the following steps:
Prompts the user for the name of the function to be deprecated and its replacement.
Automatically generates a deprecated wrapper function that calls `.Deprecated()` and then forwards arguments to the new function.
Appends this wrapper to `R/deprecated.R`, ensuring the package remains backward compatible while warning users.
Optionally scans the `tests/` and `vignettes/` directories for occurrences of the old function and interactively replaces them with the new one.
Warning
This function modifies files on disk or the global environment. Please ensure you have a backup or are using version control (e.g., Git) before execution.
Examples
if (interactive()) {
manage_deprecation()
}
