Skip to content

Rename to lower case s Meilisearch#1474

Draft
flevi29 wants to merge 3 commits into
mainfrom
lower-case-s-rename
Draft

Rename to lower case s Meilisearch#1474
flevi29 wants to merge 3 commits into
mainfrom
lower-case-s-rename

Conversation

@flevi29

@flevi29 flevi29 commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Pull Request

What does this PR do?

Migration

- import { instantMeiliSearch } from "@meilisearch/instant-meilisearch";
+ import { instantMeilisearch } from "@meilisearch/instant-meilisearch";
// ... same pattern for every other export

PR checklist

Please check if your PR fulfills the following requirements:

  • Did you use any AI tool while implementing this PR (code, tests, docs, etc.)? If yes, disclose it in the PR description and describe what it was used for. AI usage is allowed when it is disclosed.
  • 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!

Summary by CodeRabbit

  • Refactor

    • Rebranded API and public types to use "Meilisearch" casing (instantMeilisearch and related identifiers) for consistent naming across the public surface.
  • Documentation

    • Updated README examples and migration guidance to reflect the new naming and option keys.
  • Chores

    • Bumped declared package manager version in workspace metadata.

@changeset-bot

changeset-bot Bot commented Apr 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 771f2ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@meilisearch/autocomplete-client Minor
@meilisearch/instant-meilisearch Minor

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

@coderabbitai

coderabbitai Bot commented Apr 18, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5c151ecd-7831-4be3-a94b-0daac1e2287b

📥 Commits

Reviewing files that changed from the base of the PR and between afe18d3 and 771f2ce.

📒 Files selected for processing (11)
  • packages/autocomplete-client/README.md
  • packages/instant-meilisearch/README.md
  • packages/instant-meilisearch/__tests__/overridden-meilisearch-parameters.test.ts
  • packages/instant-meilisearch/__tests__/search-resolver.test.ts
  • packages/instant-meilisearch/src/adapter/search-request-adapter/__tests__/search-params.test.ts
  • packages/instant-meilisearch/src/adapter/search-request-adapter/search-params-adapter.ts
  • packages/instant-meilisearch/src/adapter/search-response-adapter/__tests__/hit-adapter.test.ts
  • packages/instant-meilisearch/src/adapter/search-response-adapter/hits-adapter.ts
  • packages/instant-meilisearch/src/adapter/search-response-adapter/search-response-adapter.ts
  • packages/instant-meilisearch/src/client/instant-meilisearch-client.ts
  • packages/instant-meilisearch/src/types/types.ts
✅ Files skipped from review due to trivial changes (4)
  • packages/autocomplete-client/README.md
  • packages/instant-meilisearch/src/adapter/search-response-adapter/tests/hit-adapter.test.ts
  • packages/instant-meilisearch/src/adapter/search-request-adapter/tests/search-params.test.ts
  • packages/instant-meilisearch/tests/overridden-meilisearch-parameters.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/instant-meilisearch/src/adapter/search-response-adapter/hits-adapter.ts
  • packages/instant-meilisearch/README.md
  • packages/instant-meilisearch/src/adapter/search-response-adapter/search-response-adapter.ts
  • packages/instant-meilisearch/src/client/instant-meilisearch-client.ts

📝 Walkthrough

Walkthrough

Repository-wide identifier and type renames to standardize casing: MeiliSearchMeilisearch, instantMeiliSearchinstantMeilisearch, setMeiliSearchParamssetMeilisearchParams, and related type aliases; adds a minor changeset and bumps root pnpm to 10.33.0.

Changes

Cohort / File(s) Summary
Changeset & Package Manager
\.changeset/wild-cooks-stand.md, package.json
Adds minor release changeset for naming changes and updates root packageManager to pnpm@10.33.0.
Core Types
packages/instant-meilisearch/src/types/types.ts
Renames exported type aliases from *MeiliSearch*/InstantMeiliSearch**Meilisearch*/InstantMeilisearch* and adjusts related imports/exports.
Main Factory & Client
packages/instant-meilisearch/src/client/instant-meilisearch-client.ts, packages/instant-meilisearch/src/client/config/index.ts
Renames exported factory instantMeiliSearchinstantMeilisearch, renames config/validation types and helpers (e.g., validateInstantMeiliSearchParamsvalidateInstantMeilisearchParams) and updates option property names (meiliSearchParamsmeilisearchParams).
Adapters (request & response)
packages/instant-meilisearch/src/adapter/search-request-adapter/..., packages/instant-meilisearch/src/adapter/search-response-adapter/...
Updates type names (MeiliSearchMeilisearch, MeiliSearchMultiSearchParamsMeilisearchMultiSearchParams) and config type usage (InstantMeiliSearchConfigInstantMeilisearchConfig); adjusts parameter names (e.g., meiliSearchParamsmeilisearchParams).
Cache & Contexts
packages/instant-meilisearch/src/cache/init-facets-distribution.ts, packages/instant-meilisearch/src/contexts/search-context.ts
Updates function signatures and return types to use Meilisearch* and InstantMeilisearch* types.
Autocomplete Client (types & client)
packages/autocomplete-client/src/types/ClientConfig.ts, .../MeilisearchOptions.ts, .../SearchClient.ts, packages/autocomplete-client/src/client/createSearchClient.ts
Adjusts imports and exported type aliases to reference InstantMeilisearch* names; updates call-sites to use instantMeilisearch.
Tests (instant-meilisearch & adapters)
packages/instant-meilisearch/__tests__/*, packages/instant-meilisearch/src/adapter/.../__tests__/*, packages/instant-meilisearch/__tests__/assets/utils.ts
Replaces imports, invocations, type imports, helper names, and assertions that referenced old MeiliSearch/instantMeiliSearch identifiers to the new Meilisearch/instantMeilisearch naming.
Autocomplete Tests & Utils
packages/autocomplete-client/__tests__/test.utils.ts
Updates test utility to construct the Meilisearch client using Meilisearch constructor naming.
Docs / READMEs
packages/instant-meilisearch/README.md, packages/autocomplete-client/README.md
Updates examples and prose to use instantMeilisearch, setMeilisearchParams, and meilisearchParams casing.
Playgrounds & Examples
playgrounds/*, playgrounds/local-react/src/components/*, playgrounds/react/src/App.jsx, playgrounds/vue3/src/App.vue, playgrounds/javascript/src/app.js, playgrounds/node-env/index.js
Updates factory call sites and Meilisearch constructor casing (MeiliSearchMeilisearch) and adjusts displayed branding text where present.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 I hopped through types and names all day,
Lowercased one "S" and chased typos away,
From instantMeiliSearch to instantMeilisearch cheer,
setMeiliSearchParams now whispers near,
A tiny refactor — a tidy rabbit's cheer! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: renaming 'MeiliSearch' to 'Meilisearch' (lowercase 's') across the codebase, which is the primary objective reflected throughout all modified files.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lower-case-s-rename

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@flevi29 flevi29 added the breaking-change The related changes are breaking for the users label Apr 19, 2026
@flevi29 flevi29 marked this pull request as ready for review April 19, 2026 06:38

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/instant-meilisearch/src/client/instant-meilisearch-client.ts (1)

88-103: ⚠️ Potential issue | 🟠 Major

Complete the casing migration for public return/options fields.

meiliSearchInstance and meiliSearchParams still use old uppercase-S casing while the setter was already renamed to setMeilisearchParams. Since this PR is a breaking casing migration, leaving these public fields behind maintains mixed old/new API names.

Update across all layers:

  • Type definitions (meiliSearchInstance, meiliSearchParams in types.ts)
  • Implementation (instant-meilisearch-client.ts lines 88-103)
  • Tests (search-resolver.test.ts, overridden-meilisearch-parameters.test.ts, search-params.test.ts, hit-adapter.test.ts)
  • Documentation (README.md examples)
  • Adapters (search-params-adapter.ts, search-response-adapter.ts, hits-adapter.ts)
  • CHANGELOG references
Suggested direction
   return {
-    meiliSearchInstance: meilisearchClient,
+    meilisearchInstance: meilisearchClient,
     setMeilisearchParams: (params): void => {
-      const { meiliSearchParams } = instantMeilisearchOptions
+      const { meilisearchParams } = instantMeilisearchOptions
 
-      instantMeilisearchOptions.meiliSearchParams =
-        meiliSearchParams === undefined
+      instantMeilisearchOptions.meilisearchParams =
+        meilisearchParams === undefined
           ? params
           : {
-              ...meiliSearchParams,
+              ...meilisearchParams,
               ...params,
               indexesOverrides: {
-                ...(meiliSearchParams.indexesOverrides || {}),
+                ...(meilisearchParams.indexesOverrides || {}),
                 ...(params.indexesOverrides || {}),
               },
             }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/instant-meilisearch/src/client/instant-meilisearch-client.ts` around
lines 88 - 103, Public API fields meiliSearchInstance and meiliSearchParams
still use the old uppercase "S" while the setter was renamed to
setMeilisearchParams; rename the public fields to meilisearchInstance and
meilisearchParams (lowercase "s") everywhere to complete the casing migration,
updating their type definitions (types.ts), the implementation in
instant-meilisearch-client.ts (the object property currently named
meiliSearchInstance and instantMeilisearchOptions.meiliSearchParams), all tests
(search-resolver.test.ts, overridden-meilisearch-parameters.test.ts,
search-params.test.ts, hit-adapter.test.ts), adapter files
(search-params-adapter.ts, search-response-adapter.ts, hits-adapter.ts), README
examples, and any CHANGELOG references so all imports/uses match the new names
and the setter setMeilisearchParams continues to operate on the renamed
meilisearchParams field.
packages/instant-meilisearch/__tests__/disjunctive-facet-search.test.ts (1)

7-7: ⚠️ Potential issue | 🟡 Minor

Stray TODO comment should be removed before merge.

// TODO: re-read for review looks like a leftover author note rather than meaningful context for future maintainers.

Proposed fix
-// TODO: re-read for review
-
 describe('Keep zero facets tests', () => {

As per coding guidelines: "Prefer self-descriptive code to comments. Only use comments for complex logic."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/instant-meilisearch/__tests__/disjunctive-facet-search.test.ts` at
line 7, Remove the stray author note comment "// TODO: re-read for review" from
the test file so the test code is self-descriptive; open
packages/instant-meilisearch/__tests__/disjunctive-facet-search.test.ts, locate
the exact comment and delete it (no replacement needed) to satisfy the coding
guideline about avoiding leftover TODOs.
packages/instant-meilisearch/README.md (1)

401-460: ⚠️ Potential issue | 🟡 Minor

Update meiliSearchParams to meilisearchParams for consistency or document the legacy casing.

The function names follow lowercase convention (instantMeilisearch, setMeilisearchParams), but the option key remains meiliSearchParams with a capital 'S'. This inconsistency spans the entire codebase—options, types, tests, and docs. Either rename it to meilisearchParams throughout for uniform casing, or if preserving the old spelling is intentional for backward compatibility, add a migration note in the docs clarifying why this particular key was exempted from the rename.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/instant-meilisearch/README.md` around lines 401 - 460, The README
and codebase use the inconsistent option key meiliSearchParams (capital S) while
function names use lowercase (instantMeilisearch, setMeilisearchParams); either
rename the option key to meilisearchParams everywhere (types, tests, docs,
function signatures and any parsing/validation of options in instantMeilisearch
and related helpers) to ensure uniform camelCase, or explicitly document the
legacy casing by adding a migration note in the docs and keeping a compatibility
layer in instantMeilisearch that accepts both meiliSearchParams and
meilisearchParams (map the legacy key to the new one before further processing).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/instant-meilisearch/__tests__/assets/utils.ts`:
- Line 2: The import uses the wrong exported symbol name: update the import in
utils.ts to match the installed meilisearch version by either upgrading the
meilisearch dependency to v0.57.0+ so the lowercase-exported Meilisearch is
available, or change the import to use the existing exported symbol MeiliSearch
(capital S); locate the import line that currently references Meilisearch and
replace it accordingly so the symbol name matches the package version.

In `@packages/instant-meilisearch/src/client/config/index.ts`:
- Around line 11-17: Update the stale JSDoc for getInstantMeilisearchConfig to
use the correct parameter name: change the `@param` tag from "option" to "options"
and ensure the type {InstantMeilisearchOptions} and return
{InstantMeilisearchConfig} remain accurate so the doc matches the function
signature getInstantMeilisearchConfig(options: InstantMeilisearchOptions).

In `@packages/instant-meilisearch/src/types/types.ts`:
- Around line 75-82: The public option keys meiliSearchParams and
meiliSearchInstance were left with the old camel casing and should be renamed to
meilisearchParams and meilisearchInstance to match the rest of the API; update
the BaseInstantMeilisearchOptions type (replace meiliSearchParams with
meilisearchParams) and the other affected type/interface around the
meiliSearchInstance declaration (replace meiliSearchInstance with
meilisearchInstance), and search the repo for any remaining references to the
old meiliSearch* symbols to rename them or add aliases so the exported types and
runtime options consistently use meilisearch*.

---

Outside diff comments:
In `@packages/instant-meilisearch/__tests__/disjunctive-facet-search.test.ts`:
- Line 7: Remove the stray author note comment "// TODO: re-read for review"
from the test file so the test code is self-descriptive; open
packages/instant-meilisearch/__tests__/disjunctive-facet-search.test.ts, locate
the exact comment and delete it (no replacement needed) to satisfy the coding
guideline about avoiding leftover TODOs.

In `@packages/instant-meilisearch/README.md`:
- Around line 401-460: The README and codebase use the inconsistent option key
meiliSearchParams (capital S) while function names use lowercase
(instantMeilisearch, setMeilisearchParams); either rename the option key to
meilisearchParams everywhere (types, tests, docs, function signatures and any
parsing/validation of options in instantMeilisearch and related helpers) to
ensure uniform camelCase, or explicitly document the legacy casing by adding a
migration note in the docs and keeping a compatibility layer in
instantMeilisearch that accepts both meiliSearchParams and meilisearchParams
(map the legacy key to the new one before further processing).

In `@packages/instant-meilisearch/src/client/instant-meilisearch-client.ts`:
- Around line 88-103: Public API fields meiliSearchInstance and
meiliSearchParams still use the old uppercase "S" while the setter was renamed
to setMeilisearchParams; rename the public fields to meilisearchInstance and
meilisearchParams (lowercase "s") everywhere to complete the casing migration,
updating their type definitions (types.ts), the implementation in
instant-meilisearch-client.ts (the object property currently named
meiliSearchInstance and instantMeilisearchOptions.meiliSearchParams), all tests
(search-resolver.test.ts, overridden-meilisearch-parameters.test.ts,
search-params.test.ts, hit-adapter.test.ts), adapter files
(search-params-adapter.ts, search-response-adapter.ts, hits-adapter.ts), README
examples, and any CHANGELOG references so all imports/uses match the new names
and the setter setMeilisearchParams continues to operate on the renamed
meilisearchParams field.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 02ae1fd1-0209-44e0-9f6a-60c124da79f7

📥 Commits

Reviewing files that changed from the base of the PR and between aea695f and afe18d3.

📒 Files selected for processing (37)
  • .changeset/wild-cooks-stand.md
  • package.json
  • packages/autocomplete-client/__tests__/test.utils.ts
  • packages/autocomplete-client/src/client/createSearchClient.ts
  • packages/autocomplete-client/src/types/ClientConfig.ts
  • packages/autocomplete-client/src/types/MeilisearchOptions.ts
  • packages/autocomplete-client/src/types/SearchClient.ts
  • packages/instant-meilisearch/README.md
  • packages/instant-meilisearch/__tests__/assets/utils.ts
  • packages/instant-meilisearch/__tests__/custom-http-client.test.ts
  • packages/instant-meilisearch/__tests__/disjunctive-facet-search.test.ts
  • packages/instant-meilisearch/__tests__/first-facets-distribution.test.ts
  • packages/instant-meilisearch/__tests__/instantiation.test.ts
  • packages/instant-meilisearch/__tests__/multi-index-search.test.ts
  • packages/instant-meilisearch/__tests__/overridden-meilisearch-parameters.test.ts
  • packages/instant-meilisearch/__tests__/placeholder-search.test.ts
  • packages/instant-meilisearch/__tests__/search-metadata.test.ts
  • packages/instant-meilisearch/__tests__/search-resolver.test.ts
  • packages/instant-meilisearch/src/adapter/search-request-adapter/__tests__/search-params.test.ts
  • packages/instant-meilisearch/src/adapter/search-request-adapter/search-params-adapter.ts
  • packages/instant-meilisearch/src/adapter/search-request-adapter/search-resolver.ts
  • packages/instant-meilisearch/src/adapter/search-response-adapter/hits-adapter.ts
  • packages/instant-meilisearch/src/adapter/search-response-adapter/search-response-adapter.ts
  • packages/instant-meilisearch/src/cache/init-facets-distribution.ts
  • packages/instant-meilisearch/src/client/config/index.ts
  • packages/instant-meilisearch/src/client/instant-meilisearch-client.ts
  • packages/instant-meilisearch/src/contexts/search-context.ts
  • packages/instant-meilisearch/src/types/types.ts
  • playgrounds/autocomplete/setup.mjs
  • playgrounds/javascript/src/app.js
  • playgrounds/local-react/setup.mjs
  • playgrounds/local-react/src/components/MultiIndex.jsx
  • playgrounds/local-react/src/components/SingleIndex.jsx
  • playgrounds/local-react/src/components/SingleMovieIndex.jsx
  • playgrounds/node-env/index.js
  • playgrounds/react/src/App.jsx
  • playgrounds/vue3/src/App.vue

Comment thread packages/instant-meilisearch/__tests__/assets/utils.ts
Comment thread packages/instant-meilisearch/src/client/config/index.ts
Comment thread packages/instant-meilisearch/src/types/types.ts
@Strift Strift marked this pull request as draft June 18, 2026 04:34
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