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

Replace sync-request with sync-fetch #650

Closed
ypconstante opened this issue Nov 7, 2022 · 5 comments
Closed

Replace sync-request with sync-fetch #650

ypconstante opened this issue Nov 7, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@ypconstante
Copy link

Is your feature request related to a problem? Please describe.
Today happy-dom uses sync-request to handle situations were a synchronous request is necessary, but this library isn't maintained anymore (last release was 4 years ago), and requires a lot of packages not used by happy-dom or it's dependencies.

Describe the solution you'd like
Migrate to sync-fetch, which is an actively maintained library that uses node-fetch, like happy-dom, which should help reduce happy-dom install size by 3Mb

Describe alternatives you've considered
.

Additional context
.

@ypconstante ypconstante added the enhancement New feature or request label Nov 7, 2022
@capricorn86
Copy link
Owner

Thank you for reporting @ypconstante! 🙂

Me and @Mas0nShi are working on a fix for this in a related PR:
https://github.com/capricorn86/happy-dom/pull/520/files#diff-532eacee8d4b349453e921fd5fdbd2d2f191868e1242b03a27f9f6365be7fe1fL36

We will replace sync-request with a very minimal custom solution.

@capricorn86
Copy link
Owner

Related to #463

@capricorn86
Copy link
Owner

capricorn86 commented Dec 7, 2022

We have now fixed this by replacing "sync-request" with a custom solution 🙂

You can read more about the release here:
https://github.com/capricorn86/happy-dom/releases/tag/v7.8.0

@capricorn86
Copy link
Owner

Re-opening as I just noticed that the dependency in package.json is still there.

capricorn86 added a commit that referenced this issue Dec 7, 2022
…-dependency

#650@patch: Removes the sync-request dependency as it is no longer in…
@capricorn86
Copy link
Owner

The dependency has removed now in this release:
https://github.com/capricorn86/happy-dom/releases/tag/v7.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants