-
Notifications
You must be signed in to change notification settings - Fork 11
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
Remove Buffer API usage #9
Comments
apg-js was designed to have zero dependencies and to work with Node.js (developed with version 15.11.0). So adding a dependency would break one of my primary design features. I haven't worked with JavaScript for a couple of years now and don't have the time or motivation to understand what the underlying problem is and make any significant changes anyway. But thanks for your interest in apg-js. |
Thanks for the feedback; Closing this issue. |
@ldthomas - sorry to chime in on this. so, what is the preferred solution for putting Buffer into something that's going to use
which seems kind of "hacky"... thanks! |
As I mentioned above, it's been a couple of years since I've worked with this. As far as I can reconstruct (and I haven't spent a lot of time on this) the Node.js Buffer is only exported in: However, apg-conv-api is used by all of the other libraries so it will get pulled in with apg-api-bundle.js. I've only used browserify for bundling. It gets bundled for use in a web browser in : You can see an example of how that is used in a web page at: Don't know if that helps but that is the way I did it. |
Thank you! I've gone through several permutations of requiring Regardless, let's close this issue. I have a solution, and more importantly you've already dealt with it in the package. So I think we're good! |
Good luck with your project and thanks for using APG. |
In some environments, the Node.js Buffer API as used by this project is not available. I'm not super familiar with node/js, but I noticed some projects replace it with packages like https://www.npmjs.com/package/safer-buffer .
This project is a dependency from a library I'm trying to use (https://github.com/spruceid/siwe). Would it be desired/conceivable to adapt this project to drop the native Buffer API usage?
The text was updated successfully, but these errors were encountered: