v0.50.0 🦫
·
37 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
, andTask
classes. The types are still exported! - Date properties on
Batch
,EnqueuedTask
, andTask
are now string. They can be converted to a date using e.g.new Date(string)
- Renamed
MeiliSearchTimeOutError
toMeiliSearchRequestTimeOutError
- Renamed
TasksQuery
toTasksOrBatchesQuery
🚀 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
,BatchClient
and associated types (#1825) @flevi29
🐛 Bug Fixes
- Refactor
HttpRequests
(#1741) @flevi29 - Remove custom TypeScript ESLint rules and adapt code, fix
HttpRequests
issue where timeout errors sometimes weren't properly thrown (#1749) @Barabasbalazs - Improve
TaskClient
,BatchClient
and 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
husky
and 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
HttpRequests
issue where timeout errors sometimes weren't properly thrown (#1749) @Barabasbalazs - Improve
TaskClient
,BatchClient
and associated types (#1825) @flevi29
Thanks again to @Barabasbalazs, @Strift, @consoleLogIt, and @flevi29! 🎉