Removed axios dependency#271
Conversation
🦋 Changeset detectedLatest commit: 266949d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
3be1a0a to
7fccfb6
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR removes the axios dependency from the MCP server and replaces it with Node’s native fetch, while simplifying error formatting.
- Removed Axios-specific utilities and imports
- Updated
fetchMintlifyConfigto usefetchand explicitresponse.okhandling - Adjusted the changeset to reflect dependency removal
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/mcp-server/src/mintlify/utils.ts | Removed axios types/utilities and simplified formatErr |
| packages/mcp-server/src/mintlify/search.ts | Switched from axios.get to fetch and inline status checks |
| .changeset/sharp-chicken-follow.md | Added a patch changeset entry for dependency removal |
Comments suppressed due to low confidence (2)
packages/mcp-server/src/mintlify/search.ts:12
- The new fetchMintlifyConfig function handles HTTP statuses but lacks tests covering non-200 responses (e.g., 404 vs 500). Please add unit tests for these scenarios to ensure correct error handling.
const fetchMintlifyConfig = async (subdomain: string): Promise<MintlifySearchConfig> => {
.changeset/sharp-chicken-follow.md:5
- [nitpick] The changeset summary is too generic. It would be clearer to mention the removal of axios and migration to native fetch, e.g., 'Remove axios dependency and migrate to native fetch'.
Removed unnecessary dependencies
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 73 73
Lines 855 855
Branches 139 139
=========================================
Hits 855 855 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The previous release of the MCP server used axios and causes errors on some environments. This is fixed by using the native
fetchfrom node itself.