-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upd package for MeiliSeach v0.11 (#413)
* Upd version * Upd version * Updated code samples * Update .code-samples.meilisearch.yaml Co-authored-by: Clémentine Urquizar <[email protected]> * added code samples * Faceting * Test compatibility with v0.11 * Changes on client tests * Updated error message * Improved types for facetFilters * Faceting typo * Add attributesForFaceting in settings tests * Since this library is not node-only main should be UMD * build(deps-dev): bump eslint-plugin-jsdoc from 27.0.2 to 27.0.4 Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 27.0.2 to 27.0.4. - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Commits](gajus/eslint-plugin-jsdoc@v27.0.2...v27.0.4) Signed-off-by: dependabot-preview[bot] <[email protected]> * changes in error handler * getOrCreateIndex method and Error handler update * Linting and styling * Documentation * Change error names * Changed errorHandler name to httpErrorHandler * changed errorhandler name * Typo in class name * Remove comments * Change usage of createIndex * Update README.md Co-authored-by: Clémentine Urquizar <[email protected]> * Make IndexOptions more type safe and create indexRequest type * Remove unecessary comment * Updated changelog * More specific changelog * Update CHANGELOG.md Co-authored-by: Clémentine Urquizar <[email protected]> * Change version in CHANGELOG * Improve changelog * Wording in changelog * Update README.md * Improve changelog Co-authored-by: Charlotte Vermandel <[email protected]> Co-authored-by: cvermand <[email protected]> Co-authored-by: Charlotte Vermandel <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2cbbb39
commit 009fad7
Showing
29 changed files
with
649 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "meilisearch", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"description": "The MeiliSearch JS client for Node.js and the browser.", | ||
"keywords": [ | ||
"meilisearch", | ||
|
@@ -16,7 +16,7 @@ | |
"qdequele <[email protected]>" | ||
], | ||
"license": "MIT", | ||
"main": "./dist/bundles/meilisearch.cjs.js", | ||
"main": "./dist/bundles/meilisearch.umd.js", | ||
"module": "./dist/bundles/meilisearch.esm.js", | ||
"browser": "./dist/bundles/meilisearch.umd.js", | ||
"typings": "./dist/types/types.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { AxiosError } from 'axios' | ||
import MeiliSearchApiError from './meilisearch-api-error' | ||
import MeiliSearchCommunicationError from './meilisearch-communication-error' | ||
|
||
function httpErrorHandler(e: AxiosError, cachedStack?: string): void { | ||
if (e.response !== undefined) { | ||
throw new MeiliSearchApiError(e, cachedStack) | ||
} else if (e.isAxiosError) { | ||
throw new MeiliSearchCommunicationError(e.message) | ||
} else { | ||
throw e | ||
} | ||
} | ||
|
||
export { httpErrorHandler } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class MeiliSearchCommunicationError extends Error { | ||
type: string | ||
constructor(message: string) { | ||
super(message) | ||
this.name = 'MeiliSearchCommunicationError' | ||
this.type = 'MeiliSearchCommunicationError' | ||
Error.captureStackTrace(this, MeiliSearchCommunicationError) | ||
} | ||
} | ||
|
||
export default MeiliSearchCommunicationError |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.