Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove axios and change browser bundle name #573

Merged
merged 8 commits into from
Sep 10, 2020
Merged

Remove axios and change browser bundle name #573

merged 8 commits into from
Sep 10, 2020

Conversation

bidoubiwa
Copy link
Contributor

@bidoubiwa bidoubiwa commented Sep 2, 2020

This PR removes axios and replace it with fetch.

Browser bundle will use the native fetch api and cjs bundle will use the fetch pollyfill.

Other additions:

  • umd format now work on both node AND browser 🙌 fixes: Use iife for browser and cjs for node #470
  • cjs format has been removed
  • Tests are now made on both node environment and dom environment.
  • Watch mode using yarn watch to help ease the development
  • babel to make the bundeling more efficient
  • Cleaned the error handler who now has the body that MeiliSearch gives him or an informative body that explains any other fail

Structural changes:

  • Http class is not a parent class to MeiliSearch anymore. Which now means that if you console log MeiliSearch you will not see the post, get, put, ... methods inside its object.

This PR introduces some breakings:

  • index.deleteIndex() now returns undefined instead of an empty string
  • A bad URL will now raise a bad URL type instead of a meiliSearchCommunicationError

@bidoubiwa bidoubiwa added the breaking-change The related changes are breaking for the users label Sep 2, 2020
Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

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

It's not mentioned in the PR description, but has the .browser.js extension been removed? I would say yes 🙂

A bad URL will now raise a bad URL type instead of a meiliSearchCommunicationError

What is a bad URL? A wrong formatted URL?

@bidoubiwa
Copy link
Contributor Author

Yes it has been replaced with .umd.js!
A bad url is something that is not an url,
abc => bad url
http://google.com => good url

curquiza
curquiza previously approved these changes Sep 7, 2020
@bidoubiwa bidoubiwa changed the title Remove axios Remove axios and change browser bundle name Sep 10, 2020
@bidoubiwa bidoubiwa merged commit d7519e0 into master Sep 10, 2020
@bidoubiwa bidoubiwa deleted the remove-axios branch September 10, 2020 11:27
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.

Use iife for browser and cjs for node
2 participants