Skip to content

Improve Settings types #1864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Conversation

flevi29
Copy link
Collaborator

@flevi29 flevi29 commented Feb 4, 2025

Pull Request

What does this PR do?

  • simplifies, improves, separates and documents Settings types
  • from now on individual setting manipulation methods are generated into the property of setting of the Index class
  • refactor tests

Migration

  • client.index(uid).updateSettings now requires the type UpdatableSettings instead of just Settings

Same for all the individual settings, including get and reset methods!

- client.index(uid).updateFaceting(...);
+ client.index(uid).setting.updateFaceting(...);

Same for all the individual settings

- import type { PaginationSettings } from "meilisearch";
+ import type { IndividualUpdatableSettings } from "meilisearch";
+ declare const pgSettings: IndividualUpdatableSettings["pagination"];

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@flevi29 flevi29 added the enhancement New feature or request label Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (463d563) to head (65fb90e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1864      +/-   ##
==========================================
- Coverage   99.02%   98.79%   -0.24%     
==========================================
  Files          18       19       +1     
  Lines        1435     1161     -274     
  Branches      303      252      -51     
==========================================
- Hits         1421     1147     -274     
  Misses         14       14              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@flevi29 flevi29 linked an issue Feb 4, 2025 that may be closed by this pull request
8 tasks
@flevi29 flevi29 mentioned this pull request Feb 4, 2025
8 tasks
@flevi29 flevi29 removed a link to an issue Feb 4, 2025
8 tasks
@flevi29 flevi29 requested a review from Copilot April 6, 2025 19:36
Copy link

@Copilot 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.

Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.

@flevi29 flevi29 requested a review from Strift April 6, 2025 19:37
@flevi29 flevi29 added breaking-change The related changes are breaking for the users and removed enhancement New feature or request labels Apr 9, 2025
@flevi29 flevi29 marked this pull request as draft April 9, 2025 09:45
@flevi29 flevi29 marked this pull request as ready for review April 11, 2025 06:58
@flevi29 flevi29 marked this pull request as draft April 17, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant