v0.50.0 🦫
·
130 commits
to refs/heads/main
since this release
This release adds new features related to Meilisearch 1.14.
⚠️ Breaking changes
Refactored HTTP client (#1741) @flevi29
Important
The Meilisearch class now accepts a requestInit parameter instead of requestConfig. Parameters of requestInit are the same, except it no longer accepts signal.
const client = new Meilisearch({
host: 'https://edge.meilisearch.com',
apiKey: 'your meilisearch API key',
// `requestConfig` is removed, use `requestInit` instead
requestInit: {
headers: {
"A-Http-Header": "The Value",
},
},
});Refactored tasks and batches usage (#1825) @flevi29
Important
TaskClient and BatchClient are no longer exported
Migration guide: tasks promises now have a "waitTask" method
// Replace this
const task = client.createIndex("test");
await client.waitForTask(task.taskUid);
// By this
await client.createIndex("test").waitTask();Migration guide: access TaskClient via the tasks property
// Replace this
client.getTask(1)
client.tasks.getTask(1)
// by this
client.getTasks()
client.tasks.getTasks()Note
TaskClient is also accessible through the Index class, e.g., client.index('myindex').tasks
Migration guide: access BatchClient via the batches property
// Replace this
client.getBatch(1)
client.batches.getBatch(1)
// By this
client.getBatches()
client.batches.getBatches()Note
BatchClient is also accessible through the Index class, e.g., client.index('myindex').batches
Updated exported types
Important
- Removed
Batch,EnqueuedTask, andTaskclasses. The types are still exported! - Date properties on
Batch,EnqueuedTask, andTaskare now string. They can be converted to a date using e.g.new Date(string) - Renamed
MeiliSearchTimeOutErrortoMeiliSearchRequestTimeOutError - Renamed
TasksQuerytoTasksOrBatchesQuery
🚀 Enhancements
- Adds new features related to Meilisearch 1.14 (#1914) @Strift
- Add embedding metrics (#1888) @consoleLogIt
- Add documents database metrics to indexStats type (#1889) @consoleLogIt
- Add usedDatabaseSize field to stats type (#1890) @consoleLogIt
- Implement the experimental feature for remote federated search requests. (#1891) @consoleLogIt
- Improve
TaskClient,BatchClientand associated types (#1825) @flevi29
🐛 Bug Fixes
- Refactor
HttpRequests(#1741) @flevi29 - Remove custom TypeScript ESLint rules and adapt code, fix
HttpRequestsissue where timeout errors sometimes weren't properly thrown (#1749) @Barabasbalazs - Improve
TaskClient,BatchClientand associated types (#1825) @flevi29
⚙️ Maintenance/misc
- Update Vitest, ESLint and plugins, adapt code (#1900) @flevi29
- Remove hint about bad Meilisearch version (#1848) @flevi29
- Update Vite and Vitest (#1847) @flevi29
- Improve
HttpRequests(#1741) @flevi29 - Add
huskyand configurelint-staged(#1861) @flevi29 - Fix
package.json"repository"field (#1865) @flevi29 - Remove BORS, enable merge queues in actions (#1896) @flevi29
- Remove custom TypeScript ESLint rules and adapt code, fix
HttpRequestsissue where timeout errors sometimes weren't properly thrown (#1749) @Barabasbalazs - Improve
TaskClient,BatchClientand associated types (#1825) @flevi29
Thanks again to @Barabasbalazs, @Strift, @consoleLogIt, and @flevi29! 🎉