cipher-base icon indicating copy to clipboard operation
cipher-base copied to clipboard

Include polyfill for Node `stream` API to ensure compatibility with Webpack 5

Open steveluscher opened this issue 3 years ago • 3 comments

This should fix #10.

This library makes use of the stream module. This is a Node API that's no longer polyfilled by Webpack 5.

Anyone who depends upon cipher-base won't be able to upgrade their project to Webpack 5. Webpack will fail to build their project, citing that stream is missing. This also implies that anyone trying to use cipher-base with Create React App 5 won't be able to either, since CRA5 uses Webpack 5.

Here's an example of folks in the Web3 community having trouble with this: https://github.com/solana-labs/wallet-adapter/issues/241

Test plan: yarn test.

steveluscher avatar Jan 16 '22 05:01 steveluscher

@calvinmetcalf @dcousens @ahdinosaur Can one of you please take a look at this and merge in if it all looks good? This issue has been giving many people dependent on the library grief for a few months now.

TomLisankie avatar Mar 08 '22 22:03 TomLisankie

See also NPM overrides which is how the Solana wallet adapter ended up handling these.

steveluscher avatar Mar 08 '22 22:03 steveluscher

@TomLisankie I am not part of the crypto-browserify organisation at this time, but I think this organisation's repositories should be moved to the https://github.com/browserify organisation for maintenance purposes.

cc @calvinmetcalf @goto-bus-stop @ahdinosaur @ashaffer @fanatid

dcousens avatar Mar 08 '22 23:03 dcousens