CMSgov / design-system

Open source design and front-end development resources for creating Section 508 compliant, responsive, and consistent websites.
https://design.cms.gov
Other
312 stars 85 forks source link

[WNMGDS-2884] Add `cmsds-migrate` script for v11 CSS changes #3208

Closed pwolfert closed 3 weeks ago

pwolfert commented 3 weeks ago

Summary

In order to reduce the risk for teams upgrading, I've added a cmsds-migrate script that will flag or replace references to things we're deprecating in v11.

Through creating this, I also found that our release notes are wrong, and we didn't remove --font-weight-bold and --font-weight-normal, nor did we intend to.

How to test

  1. Run yarn cmsds-migrate
  2. Select the top deprecated css v11 script
  3. Choose yes
  4. Take a look at the changed files and then discard changes. We expect it to flag historical references to some of those and to find references in the deprecation CSS. I don't think in production it'll flag references in the cmsds-migrate script itself. That's an area for improvement though.
  5. You can try creating references to some of the removed or renamed things in the examples or elsewhere in the code and see if the script picks them up.

Checklist

pwolfert commented 3 weeks ago

There's certainly room for improvement in the script interface, but it's out of scope here

pwolfert commented 3 weeks ago

I've added an update to the blog post that calls the migration script out and includes an info alert explaining how to use it. Let me know what you think about that.