Skip to content

docs(blog): add usage section for axios-to-fetch article#8914

Open
jdebarochez wants to merge 2 commits into
nodejs:mainfrom
jdebarochez:patch-1
Open

docs(blog): add usage section for axios-to-fetch article#8914
jdebarochez wants to merge 2 commits into
nodejs:mainfrom
jdebarochez:patch-1

Conversation

@jdebarochez
Copy link
Copy Markdown

Description

In the article to migrate from axios to fetch, I'd love to have a section for usage. It was my first reference in the search engine and there was no link, nor command usage. I got inspired by the other article apps/site/pages/en/blog/migrations/chalk-to-styletext.mdx which had all of that to make this contribution.

Validation

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

* Add link to the source code of this codemod
* Add link to the codemod registry
* Add usage command

Signed-off-by: Jean de Barochez <3436890+jdebarochez@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 24, 2026 19:40
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview May 24, 2026 7:52pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 24, 2026

PR Summary

Low Risk
Documentation-only edits to a blog MDX file with no runtime or security impact.

Overview
Adds a Usage section to the Axios → WHATWG Fetch migration post, placed after supported transformations and before examples. It links to the codemod source in userland-migrations, the Codemod Registry entry, and documents running npx codemod @nodejs/axios-to-whatwg-fetch, matching the pattern used on other migration articles.

The GET request example diff is also updated so the migrated fetch call includes .catch(() => null) on the promise chain.

Reviewed by Cursor Bugbot for commit 636c101. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds usage instructions to the “Axios to Fetch” migration post so readers can locate and run the codemod directly.

Changes:

  • Added a new “Usage” section with links to the recipe source and Codemod Registry entry
  • Included an npx codemod command example for running the codemod

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/site/pages/en/blog/migrations/axios-to-fetch.mdx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jean de Barochez <3436890+jdebarochez@users.noreply.github.com>
@avivkeller
Copy link
Copy Markdown
Member

@nodejs/userland-migrations

Copy link
Copy Markdown
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGMT !

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.24%. Comparing base (4805480) to head (636c101).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8914      +/-   ##
==========================================
+ Coverage   73.20%   73.24%   +0.04%     
==========================================
  Files         102      102              
  Lines        8628     8628              
  Branches      314      313       -1     
==========================================
+ Hits         6316     6320       +4     
+ Misses       2311     2307       -4     
  Partials        1        1              

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants