Provide automated migration scripts for v12 feature flags #15972
Labels
package: upgrade
@carbon/upgrade
planning: umbrella
Umbrella issues, surfaced in Projects views
role: dev 🤖
version: 12
Issues pertaining to a future major release of Carbon
Milestone
Background
For each
enable-v12-*
flag, an automated migration script (codemod) needs to be written to accompany the changes. Ideally these should be written and provided at (or shortly after) the time of the flag creation, but we already had some v12 flags in the codebase before that was defined in #15964Solution
For each flag, the codemod should be written in and provided through the
upgrade
package/cli. The contents of the codemod should assist consumers in making the necessary changes associated with the flag in their codebase. These aren't for our codebase (though we could technically run them on our codebase for testing)There are already a few codemods written that can be used as guideposts for this work. One thing we should consider is supporting typescript in addition to javascript and including both .js and .ts test fixtures. In some cases we might just need to opening up the filetypes to include .ts and .tsx. Right now most of them only run on .js and .jsx files:
carbon/packages/upgrade/src/upgrades.js
Line 159 in e0382e6
List of flags that need codemods
enable-v12-tile-default-icons
#18365enable-v12-overflowmenu
#18121enable-v12-tile-radio-icons
#18350enable-v12-structured-list-visible-icons
#18351slug
props toAILabel
and write a codemod for these changes #18366The text was updated successfully, but these errors were encountered: