Skip to content

Improve environment compatibility for React Native and others #42

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

besdar
Copy link

@besdar besdar commented Apr 20, 2025

Hello @s0ftik3!

This pull request addresses an incompatibility issue with React Native environments. The changes implemented here ensure the library functions correctly regardless of the user's environment.

I have verified this implementation in:

  • Node.js 22.14.0
  • React Native 0.79.1

Please review these changes. If you encounter any issues or have feedback, please leave a comment.

Thank you for considering these modifications.

- Removed cheerio dependency and its usage in the code.
- Added jsdom and @xmldom/xmldom for HTML parsing.
- Implemented a new private method #parseHTML to handle HTML string parsing.
- Updated the code to use the new parsing method for extracting data from HTML responses.

chore: update package.json and yarn.lock

- Added jsdom and @xmldom/xmldom to dependencies in package.json.
- Removed cheerio from dependencies in package.json.
- Updated yarn.lock to reflect the changes in dependencies.
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.

1 participant