-
Notifications
You must be signed in to change notification settings - Fork 57
feat: accept Uint8Arrays input in place of Buffers #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've the same questions as @rvagg (thanks for bringing it up) multiformats/js-multibase#61 (comment):
Does the
require('util')
mean we need to include it in the dependencies list to make sure we have it available for webpack@5?
Could you please add a test that is using a Buffer
as input, to make sure it still works?
Am I correct that this change depends on multiformats/js-multibase#61?
I'm not sure what changes with
Ok, I'll do that
Yep, as description said 🤓 |
|
If it’s only in tests it’s probably fine, the primary concern is that bundlers are not injecting polyfills for Node.js anymore. At some point we may even want it out of the tests, and we should all be getting in the habit of working without Node.js stdlib as much as possible, but it’s not a blocker. We’ve cut Node.js v10 elsewhere but I’m not 100% sure what our dependencies have done that rely on this library. |
web-encoding should take care of providing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, but I think there is a superfluous file, see inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous inline comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, though I'd like CI to run and be green before it is merged.
Once #89 lands, I can run CI tests. |
This has landed now and the tests are all green, but for the future you could have used that branch as the merge base for this PR which would have let you run CI before it was merged. |
This pull request relaxes input type from Buffer to Uint8Array. It does however depends on multiformats/js-multibase#61