mesh
mesh copied to clipboard
add Node.js fallback for file util
Summary
Check whether XMLHttpRequest is defined and if not use the Node.js built-in fetch method.
This prevents an "XMLHttpRequest is not defined" error in Node.js environemnt.
Affect components
Please indicate which part of the Mesh Repo
- [x]
@meshsdk/common - [ ]
@meshsdk/contract - [ ]
@meshsdk/core - [ ]
@meshsdk/core-csl - [ ]
@meshsdk/core-cst - [ ]
@meshsdk/hydra - [ ]
@meshsdk/provider - [ ]
@meshsdk/react - [ ]
@meshsdk/svelte - [ ]
@meshsdk/transaction - [ ]
@meshsdk/wallet - [ ] Mesh playground (i.e. https://meshjs.dev/)
- [ ] Mesh CLI
Type of Change
Please mark the relevant option(s) for your pull request:
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Code refactoring (improving code quality without changing its behavior)
- [ ] Documentation update (adding or updating documentation related to the project)
Related Issues
Please add the related issue here if any
Checklist
Please ensure that your pull request meets the following criteria:
- [ ] My code is appropriately commented and includes relevant documentation, if necessary
- [ ] I have added tests to cover my changes, if necessary
- [ ] I have updated the documentation, if necessary
- [ ] All new and existing tests pass (i.e.
npm run test) - [x] The build is pass (i.e.
npm run build)
Additional Information
If you have any additional information or context to provide, such as screenshots, relevant issues, or other details, please include them here.