Change TOML table row value

Apache 2.0

Change a value in a TOML table row when the identifying property matches the specified matcher.

org.openrewrite.toml.ChangeTableRowValue

Required

The name of the TOML array table containing the row to update.

The key within a table row to match on.

The value to match. Can be a regular expression if useRegex is true.

The key of the property to update within the matched row.

Optional

useRegexBoolean

Whether to interpret the identifying value as a regular expression. Default is false.

The new value to set for the property. If null, the property will be removed.

mod run . --recipe=org.openrewrite.toml.ChangeTableRowValue \ -P tableName=package.contributors \ -P identifyingKey=name \ -P identifyingValue='Alice Smith' \ -P propertyKey=email

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.