concordium-node-sdk-js icon indicating copy to clipboard operation
concordium-node-sdk-js copied to clipboard

Remove `buffer` as peer dependency

Open limemloh opened this issue 2 years ago • 1 comments

Description

When using the SDK, the user will need to install buffer as a dependency, since types from this library is exposed in the public API of our SDK. Currently, we don't list it as a peerDependency in package.json and we could fix that, but IMO it would be more appropriate to only expose ArrayBuffer and only use buffer internally.

limemloh avatar Aug 29 '23 11:08 limemloh

I agree. We can still resolve to the browser-specific implementation in the web target, but it does feel awkward to have to use "our" version of buffer even in the node SDK, when the platform has it as a native type as well (and if you use the native type with typescript, you get type errors).

soerenbf avatar Aug 29 '23 13:08 soerenbf