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

Add option to enable requester-fetch instead of requester-node-http for edge-environments like Cloudflare Workers #176

Conversation

vilhelmjosander
Copy link
Contributor

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR enables support for using this module in edge-environments which usually does not have access to nodes http module. Examples would be Cloudflare Workers or Vercel Edge (https://vercel.com/docs/functions/edge-functions/edge-runtime). By enabling useFetch in the configuration it will use @algolia/requester-fetch instead of @algolia/requester-node-http when process.server is true.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@nuxt-studio
Copy link

nuxt-studio bot commented Sep 27, 2023

Live Preview ready!

Name Edit Preview Latest Commit
Algolia Edit on Studio ↗︎ View Live Preview 0195a5a

@Baroshem
Copy link
Collaborator

Baroshem commented Oct 4, 2023

Hey, thanks for this PR!

I will take a look at it soon :)

Copy link
Collaborator

@Baroshem Baroshem left a comment

Choose a reason for hiding this comment

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

Everything good! Thanks for making this PR. Really nice work.

I wont be merging this PR yet As I would like to release a big new version soon 2.0.0 and this PR would fit right in there :)

@vilhelmjosander
Copy link
Contributor Author

Any updates on when 2.0.0 will be released? There is no way this can be merged as a minor version until then?

@Baroshem
Copy link
Collaborator

Baroshem commented Oct 18, 2023

Hey @vilhelmjosander

I am planning to release the 2.0.0 next week. I was just very busy with Nuxt Security 1.0.0 release for the Nuxt Nation that is happening just now.

If I wont make it to release 2.0.0 version next week, then I will release a minor version with this feature so that you could start using it :)

@Baroshem Baroshem changed the base branch from main to chore/1.10.0 October 23, 2023 09:06
@Baroshem
Copy link
Collaborator

Hey @vilhelmjosander

I have changed the base branch from main to 1.10.0 and I want to release it this week. Could you please resolve the conflicts and remove the additional package-lock.json?

Then I will merge it and release a new version with it :)

@vilhelmjosander
Copy link
Contributor Author

vilhelmjosander commented Oct 26, 2023

@Baroshem Sorry for the late reply. I have fixed the merge conflicts and removed the package-lock.json. Make sure it looks ok then it should be ready to merge and release.

@Baroshem
Copy link
Collaborator

@vilhelmjosander I will work on making the release today then.

Thanks for your work!

@Baroshem Baroshem merged commit d5a84ac into nuxt-modules:chore/1.10.0 Oct 27, 2023
@Baroshem Baroshem mentioned this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants