-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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-http-errors #17960
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17960 +/- ##
==========================================
- Coverage 83.72% 83.69% -0.04%
==========================================
Files 404 404
Lines 14344 14350 +6
Branches 4646 4599 -47
==========================================
Hits 12010 12010
- Misses 2173 2178 +5
- Partials 161 162 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks amazing 🔥
just a thought -> a deprecation notice can be provided that would instruct users to run this codemod
@2nikhiltom That sounds good! Where do we typically provide this notice? Would it go on our Storybook or PAL website? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks amazing !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
22f19fc
Closes 6036
This PR updates the
@carbon/upgrade
package with a new transformibm-products-update-http-errors
, to update theHttpError403
,HttpError404
,HttpErrorOther
toFullPageError
.Changelog
New
packages/upgrade/transforms/ibm-products-update-http-errors.js
packages/upgrade/transforms/__testfixtures__/ibm-products-update-http-errors.input.js
andpackages/upgrade/transforms/__testfixtures__/ibm-products-update-http-errors.output.js
filespackages/upgrade/transforms/__tests__/ibm-products-update-http-errors-test.js
packages/upgrade/fixtures/ibm-products-update-http-errors-sample.jsx
to test the Codemod locallyChanged
packages/upgrade/src/upgrades.js
with a new migration entryibm-products-update-http-errors
Testing / Reviewing
cd packages/upgrade
yarn build
to build the CLI./bin/carbon-upgrade.js migrate list
and verify a new entryibm-products-update-http-errors (Rewrites HttpError403, HttpError404, HttpErrorOther to FullPageError)
presentnpx jest transforms/__tests__/ibm-products-update-http-errors-test.js
and verify test result./bin/carbon-upgrade.js migrate ibm-products-update-http-errors fixtures/ibm-products-update-http-errors-sample.jsx -w
to try the Codemod. (Can select the/carbon/packages/upgrade
as workspace)