It may be preferable for some migrations to be applied via diffs/patches instead of other mechanisms like parsing files or section markers
Motivation
The biggest reason for considering this is how I set up files like the README. The "managed by" markers are really noisy in the the raw view, and is arguably less flexible and robust to small changes. However, there are potentially some issues with using diffs, namely when a file is generated with configurable sections. Additionally, we'd need to be thoughtful about how we manage patches that fail to apply (skip? warn? git-style merge markers?)
It could also be worthwhile to review how we handle other file updates. Would CI file updates (eg for adding cypress) be better handled with patches? Are any of our configs that are currently handled as package dependencies better managed by being placed in the repo directly (to reduce the amount of "magic" and make it easier to reconfigure) and updated with patches (or split into more parts instead of being monolithic and then patched from there)? Or maybe for something like the nx json, maybe we should consider in-lining and migrating via just parsing the file?
Describe your idea
It may be preferable for some migrations to be applied via diffs/patches instead of other mechanisms like parsing files or section markers
Motivation
The biggest reason for considering this is how I set up files like the README. The "managed by" markers are really noisy in the the raw view, and is arguably less flexible and robust to small changes. However, there are potentially some issues with using diffs, namely when a file is generated with configurable sections. Additionally, we'd need to be thoughtful about how we manage patches that fail to apply (skip? warn? git-style merge markers?)
It could also be worthwhile to review how we handle other file updates. Would CI file updates (eg for adding cypress) be better handled with patches? Are any of our configs that are currently handled as package dependencies better managed by being placed in the repo directly (to reduce the amount of "magic" and make it easier to reconfigure) and updated with patches (or split into more parts instead of being monolithic and then patched from there)? Or maybe for something like the nx json, maybe we should consider in-lining and migrating via just parsing the file?
Proposed Solution
No response
Other Information
No response