Skip to content

Commit e0bbbed

Browse files
committed
chore(release): v1.5.0 [skip actions]
1 parent 56d4985 commit e0bbbed

File tree

3 files changed

+90
-95
lines changed

3 files changed

+90
-95
lines changed

.changeset/brave-pagination-feature.md

Lines changed: 0 additions & 94 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,94 @@
11
# Changelog
22

3+
## 1.5.0
4+
5+
### Minor Changes
6+
7+
- [#162](https://github.com/sapientpants/deepsource-mcp-server/pull/162) [`56d4985`](https://github.com/sapientpants/deepsource-mcp-server/commit/56d4985bb76ef7753b59f34d215337d25ed46c9d) Thanks [@sapientpants](https://github.com/sapientpants)! - feat: implement true pagination for all list queries
8+
9+
Adds comprehensive cursor-based pagination support across all list endpoints to handle large datasets efficiently and provide deterministic, complete results.
10+
11+
## New Features
12+
- **Multi-page fetching**: Automatically fetch multiple pages with `max_pages` parameter
13+
- **Page size control**: Use convenient `page_size` parameter (alias for `first`)
14+
- **Enhanced metadata**: User-friendly pagination metadata in responses
15+
- **Backward compatibility**: Existing queries work without changes
16+
17+
## Supported Endpoints
18+
19+
All list endpoints now support full pagination:
20+
- `projects`
21+
- `project_issues`
22+
- `runs`
23+
- `recent_run_issues`
24+
- `dependency_vulnerabilities`
25+
- `quality_metrics`
26+
27+
## Usage
28+
29+
```javascript
30+
// Fetch up to 5 pages of 50 items each
31+
{
32+
projectKey: "my-project",
33+
page_size: 50,
34+
max_pages: 5
35+
}
36+
37+
// Traditional cursor-based pagination still works
38+
{
39+
projectKey: "my-project",
40+
first: 20,
41+
after: "cursor123"
42+
}
43+
```
44+
45+
## Response Format
46+
47+
Responses now include both standard `pageInfo` and enhanced `pagination` metadata:
48+
49+
```javascript
50+
{
51+
items: [...],
52+
pageInfo: { /* Relay-style pagination */ },
53+
pagination: {
54+
has_more_pages: true,
55+
next_cursor: "...",
56+
page_size: 50,
57+
pages_fetched: 3,
58+
total_count: 250
59+
}
60+
}
61+
```
62+
63+
## Technical Implementation
64+
- **PaginationManager**: New orchestrator class for handling complex pagination scenarios
65+
- **AsyncIterator support**: Modern async iteration patterns for paginated results
66+
- **Bounded loops**: Replaced while loops with bounded for-loops to prevent infinite iterations
67+
- **Error resilience**: Graceful handling of null/undefined data in API responses
68+
69+
## Test Coverage Improvements
70+
- Added 200+ new tests for pagination functionality
71+
- Achieved 100% line coverage for critical components (`issues-client.ts`)
72+
- Comprehensive edge case testing (null data, missing fields, network errors)
73+
- Integration tests for multi-page fetching scenarios
74+
75+
## Performance Considerations
76+
- Single-page fetches remain unchanged for backward compatibility
77+
- Multi-page fetching is opt-in via `max_pages` parameter
78+
- Efficient cursor management reduces API calls
79+
- Response merging optimized for large datasets
80+
81+
## Migration Notes
82+
83+
No breaking changes - existing code will continue to work without modifications. To leverage new pagination features:
84+
1. Add `page_size` parameter for clearer intent (replaces `first`)
85+
2. Add `max_pages` parameter to fetch multiple pages automatically
86+
3. Use the enhanced `pagination` metadata in responses for better UX
87+
88+
This implementation ensures complete data retrieval for large DeepSource accounts without silent truncation or memory issues.
89+
90+
Closes #152
91+
392
## 1.4.2
493

594
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deepsource-mcp-server",
3-
"version": "1.4.2",
3+
"version": "1.5.0",
44
"description": "Model Context Protocol server for DeepSource",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)