Skip to content

feat: new util "chunkFind"#23

Merged
fratzinger merged 2 commits intomainfrom
feat/chunk-find
Feb 27, 2026
Merged

feat: new util "chunkFind"#23
fratzinger merged 2 commits intomainfrom
feat/chunk-find

Conversation

@fratzinger
Copy link
Member

This pull request introduces a new utility function, chunkFind, for efficiently iterating over paginated results from Feathers services, and enhances test coverage for both chunkFind and iterateFind. It also improves the flexibility and scalability of the iterateFind tests. The most important changes are grouped below:

New Utility Function

  • Added the chunkFind function in chunk-find.util.ts, enabling async iteration over paginated service results for batch processing of large datasets. This includes robust parameter handling and always paginates results, even if paginate: false is set.
  • Exported chunkFind from src/utils/index.ts to make it available throughout the codebase.
  • Added documentation metadata for chunkFind in chunk-find.util.md.

Test Coverage and Improvements

  • Added comprehensive tests for chunkFind in chunk-find.util.test.ts, covering basic usage, skipping items, custom chunk sizes, querying, and pagination behavior.
  • Enhanced iterateFind tests in iterate-find.util.test.ts by increasing the dataset size, improving chunk size flexibility, and adding tests for pagination overrides and large limits. [1] [2] [3] [4] [5]

Utility Function Improvements

  • Updated iterateFind in iterate-find.util.ts to support custom $limit values and improved pagination parameter handling.

Test Suite Integration

  • Registered chunkFind in the main test suite index for utility function coverage.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 27, 2026

Deploying feathers-utils with  Cloudflare Pages  Cloudflare Pages

Latest commit: cf1357c
Status: ✅  Deploy successful!
Preview URL: https://5bd142af.feathers-utils.pages.dev
Branch Preview URL: https://feat-chunk-find.feathers-utils.pages.dev

View logs

@fratzinger fratzinger merged commit d8e0475 into main Feb 27, 2026
11 checks passed
@fratzinger fratzinger deleted the feat/chunk-find branch February 27, 2026 13:48
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.

1 participant