Replace TOML table row
Apache 2.0Replace a TOML table row with new content. If a row with the same identifying property exists, replace it entirely.
org. openrewrite. toml. ReplaceTableRowRequired
The name of the TOML array table to replace rows in (e.g., 'package.contributors').
The TOML key-value pairs to replace with. Should contain the objectIdentifyingProperty.
The property name used to match existing rows. When a row with this property value exists, it will be replaced; otherwise, a new row will not be inserted (see MergeTableRow).
mod run . --recipe= org. openrewrite. toml. ReplaceTableRow \
-P tableName= package. contributors \
-P row= 'name = "Alice Smith"\nemail = "alice@example. com"' \
-P identifyingKey= nameInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.