Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jul 19, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Revamp the SDK and Worker documentation to showcase the new unified fetch() API, streamline installation and usage examples, update package names and CHANGELOG, remove deprecated migration helpers, and enhance the CLI tests with MSW mocks

New Features:

  • Introduce a unified fetch() API in the SDK and Worker builds to handle local files, GitHub repos, and web content through a single method

Enhancements:

  • Completely overhaul the SDK and Worker README files with streamlined quick start guides, core API reference, usage examples, performance tips, and limitation notes
  • Update root README to point at the new SDK@latest install, add quick start snippets, and surface the Worker-optimized build
  • Rename and update MCP server package references from @codefetch/mcp-server to @codefetch/mcp across installs and docs
  • Remove legacy migration helpers and corresponding tests from the SDK Worker module
  • Refresh CHANGELOG heading and simplify breaking change notes

Tests:

  • Add MSW-based HTTP mocks in the CLI test suite to simulate external HTTP endpoints

regenrek added 2 commits July 19, 2025 19:17
- Updated paths in the README files to reflect the new structure of the codefetch packages.
- Enhanced the documentation for the `codefetch-sdk` with a unified API overview and quick start examples.
- Corrected package references in the `cli` and `mcp` README files to point to the correct repository.
- Removed outdated migration helpers and tests to streamline the codebase.

These changes improve the clarity and accuracy of the documentation, ensuring users have the correct information for package usage.
…ality

- Added `msw` as a dependency to improve testing capabilities with mock service workers.
- Implemented a mock server in `packages/cli/test/mocks/server.ts` to handle HTTP requests during tests.
- Updated test setup to start and stop the MSW server, ensuring proper request handling.
- Removed outdated migration helpers from the SDK to streamline the codebase.

These changes enhance the testing framework and provide a more robust environment for simulating HTTP interactions.
@pull pull bot locked and limited conversation to collaborators Jul 19, 2025
@pull pull bot added the ⤵️ pull label Jul 19, 2025
@pull pull bot merged commit 3a1d1de into admariner:main Jul 19, 2025
Copy link

@giga-agent giga-agent bot left a comment

Choose a reason for hiding this comment

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

Detailed code review comments

- Project tree visualization
- Template variable support
- 🎯 **Unified `fetch()` API** - Single method for all sources (local, GitHub, web)
- 🚀 **Zero-config defaults** - Works out of the box with sensible defaults
Copy link

Choose a reason for hiding this comment

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

Consider mentioning upfront if this is a breaking change from previous API to help users prepare for migration

main = "src/index.js"
compatibility_date = "2024-01-01"
# No nodejs_compat needed!

Copy link

Choose a reason for hiding this comment

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

Add explanation of why nodejs_compat is no longer needed to help users understand the improvement

@@ -1,324 +0,0 @@
/**
Copy link

Choose a reason for hiding this comment

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

Removing migration file without replacement leaves users without upgrade path. Consider keeping with deprecation notice or document migration steps elsewhere.

http.get("https://codeload.github.com/:owner/:repo/tar.gz/:ref", () => {
// This is a placeholder for a more sophisticated mock if needed
return new HttpResponse(null, { status: 200 });
}),
Copy link

Choose a reason for hiding this comment

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

Mock returns empty response with 200 status. Consider adding minimal test data to better simulate real responses

# Changelog

## 2.0.0
## Current Version
Copy link

Choose a reason for hiding this comment

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

Replacing version number with 'Current Version' reduces version tracking clarity. Consider keeping explicit version numbers.

```bash
# Clone the repository
git clone https://github.com/codefetch-ai/codefetch
git clone https://github.com/regenrek/codefetch
Copy link

Choose a reason for hiding this comment

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

Repository URL change indicates ownership transfer. Ensure all documentation and dependencies are updated accordingly.

} from "./cache-enhanced.js";

// Migration helpers (Worker-safe)
export {
Copy link

Choose a reason for hiding this comment

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

Removing migration helpers could break backward compatibility for existing users. Consider maintaining these exports with a deprecation notice if this is a breaking change.

## Contributing

See the [main repository](https://github.com/codefetch-ai/codefetch) for contribution guidelines.
See the [main repository](https://github.com/regenrek/codefetch) for contribution guidelines.
Copy link

Choose a reason for hiding this comment

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

Repository URL change may indicate project ownership transfer. Verify this is intentional and update all related documentation consistently.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant