Skip to content

v0.50.0 🦫

Latest
Compare
Choose a tag to compare
@meili-bot meili-bot released this 15 Apr 01:47
· 11 commits to refs/heads/main since this release

This release adds new features related to Meilisearch 1.14.

⚠️ Breaking changes

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",
    },
  },
});
  • Improve TaskClient, BatchClient, and associated types (#1825) @flevi29

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();

Important

  • TaskClient is no longer exported, use it through the Meilisearch class tasks property (e.g. client.tasks) or Index class (e.g. client.index('index').tasks)
  • Batch, EnqueuedTask, and Task are no longer classes (the types are still exported)
  • Date properties on Batch, EnqueuedTask, and Task are now string. They can be converted to date using i.e. new Date(string)
  • Renamed MeiliSearchTimeOutError to MeiliSearchRequestTimeOutError

🚀 Enhancements

🐛 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

Thanks again to @Barabasbalazs, @Strift, @consoleLogIt, and @flevi29! 🎉