-
Notifications
You must be signed in to change notification settings - Fork 27
Fix compatibility with bare runtime #7
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
base: main
Are you sure you want to change the base?
Conversation
|
Thank you for such a detailed contribution! Here are my thoughts and estimation about the suggested changes:
|
|
Returning to this issue: I was able to address a few action items in the previous release v0.25.0
But the main one for you is still not addressed, unfortunately.
So the direct replacement without backwards-incompatible changes is unfortunately not possible. This, along with the upcoming release of a completely redesigned API (and SDK) v2, is planned for Q4 this year. This led me to the decision not to apply your current changes to the SDK, but to keep in mind these requirements to support other runtimes, rather than just Node.js. |
|
Hello @pavel-rakhmanov, thanks a lot for your effort testing this. I'm thinking about a less intrusive way to make this work in bare. Basically, the problem is with the regex syntax that Thanks in advance |

Description
I'm working on a swap module that uses
@ston-fi/api. My goal is to make it run in Bare runtime. I have found a few problems and managed to fix them so that@ston-fi/apicould work inbare. I tried my best to make sure my changes are not intrusive as well as not to introduce too many changes.Changes
@ston-fi/apiusescamelcase-keyspackage that uses ES2018 regex, which bare does not support. Therefore, i replaced the package with another one that works just as well (humps) with no ES2018 regex. i ran all the tests and they all passed@ston-fi/apialso usesofetchpackage with its custom exports which leads to error in module mapping in bare (node-httpnot found), i resolved this by changing the build config of@ston-fi/apiintsup.config.tsbare, seems like there's nooriginattribute onURLobject, so i added a fallback tohref. this is in the constructor ofStonApiClientThe swap protocol is now fully compatible with bare/node. We still need to wait for stonfi team to review my PR on
@ston-fi/api