Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement codemod ibm-products-update-userprofileimage #18058

Conversation

anamikaanu96
Copy link
Contributor

Closes 6308

This PR updates the @carbon/upgrade package with a new transform ibm-products-update-userprofileimage, to update the UserProfileImage to UserAvatar.

Changelog

New

  • New transform packages/upgrade/transforms/ibm-products-update-userprofileimage.js
  • Include fixtures in the packages/upgrade/transforms/testfixtures/ibm-products-update-userprofileimage.input.js and packages/upgrade/transforms/testfixtures/ibm-products-update-userprofileimage.output.js files
  • Include tests packages/upgrade/transforms/tests/ibm-products-update-userprofileimage-test.js
  • Implement a sample packages/upgrade/fixtures/ibm-products-update-userprofileimage-sample.jsx to test the Codemod locally

Changed

  • Update packages/upgrade/src/upgrades.js with a new migration entry ibm-products-update-userprofileimage

Testing / Reviewing

Try out the Codemod locally by:

  • Pulling down this PR
  • Run cd packages/upgrade
  • Run yarn build to build the CLI
  • Run ./bin/carbon-upgrade.js migrate list to verify a new entry ibm-products-update-userprofileimage (Rewrites UserProfileImage to UserAvatar) is present
  • Run npx jest transforms/__tests__/ibm-products-update-userprofileimage-test.js and verify test result
  • Run ./bin/carbon-upgrade.js migrate ibm-products-update-userprofileimage fixtures/ibm-products-update-userprofileimage-sample.jsx -w to try the Codemod. ( Select the /carbon/packages/upgrade as workspace)

@anamikaanu96 anamikaanu96 requested a review from a team as a code owner November 13, 2024 12:19
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 18838b8
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/673c6586de3dd70008ea8042
😎 Deploy Preview https://deploy-preview-18058--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 18838b8
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/673c65868be9e400089461a9
😎 Deploy Preview https://deploy-preview-18058--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 18838b8
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/673c6586d314880008afd039
😎 Deploy Preview https://deploy-preview-18058--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 82.17%. Comparing base (4fb87e7) to head (18838b8).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
packages/upgrade/src/upgrades.js 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18058      +/-   ##
==========================================
- Coverage   82.21%   82.17%   -0.04%     
==========================================
  Files         404      404              
  Lines       14200    14206       +6     
  Branches     4509     4462      -47     
==========================================
  Hits        11674    11674              
- Misses       2364     2369       +5     
- Partials      162      163       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one question

Copy link
Member

@ariellalgilmore ariellalgilmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ariellalgilmore ariellalgilmore added this pull request to the merge queue Nov 20, 2024
Merged via the queue into carbon-design-system:main with commit 2a594b7 Nov 20, 2024
40 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.71.0 was just released that references this issue/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

codemod to transform from UserProfileImage to UserAvatar
4 participants