packages/codemods/v5-0-0/07-notification-message-to-title.md
message → titleThe Notification block renames its message property to title in antd v6. This is a context-aware rename — message is a common word that appears in many contexts, so only rename it inside Notification block properties.
Find Notification blocks and rename message: to title: within their properties: section only.
Glob: **/*.{yaml,yml}
Grep: type: Notification (to find Notification blocks, then check for message: inside their properties)
- id: success_notify
type: Notification
properties:
message: Record saved
description: Your changes have been saved successfully.
type: success
- id: success_notify
type: Notification
properties:
title: Record saved
description: Your changes have been saved successfully.
type: success
- id: error_notify
type: Notification
properties:
message:
_string.concat:
- 'Error: '
- _state: errorMessage
type: error
- id: error_notify
type: Notification
properties:
title:
_string.concat:
- 'Error: '
- _state: errorMessage
type: error
message inside Notification block properties. Do not rename message in:
message)type: Notification at block level, then look for properties: at the next indent, then look for message: as a direct child of propertiesSearch for Notification blocks and verify none still have message: under properties:
grep -rn 'type: Notification' --include='*.yaml' --include='*.yml' . -A 10 | grep 'message:'
Should return zero matches.