Skip to content

Conversation

@kinland
Copy link

@kinland kinland commented May 3, 2023

This PR does two things:

  • update dependencies with npm audit fix --force
  • conditionally polyfill Buffer, Crypto, and Constants. A Node.js project should thus be unaffected by these changes, but browser users can now use node-rsa out of the box without having to do polyfilling themselves.

This includes changes from @learntheropes 's fork for running node-rsa in the browser out of the box. The main thing their fork does is use the buffer package instead of assuming Buffer was available. Their fork did not make this a conditional change, which means someone using @learntheropes/node-rsa in node will end up using the npm package rather than the node one. My changes address this.

@kinland kinland force-pushed the feature/audit-and-add-polyfill branch from 88e2c17 to 8d2e276 Compare May 4, 2023 01:53
@rzcoder rzcoder changed the base branch from master to stage February 2, 2024 17:26
@rzcoder rzcoder changed the base branch from stage to v1.2 February 2, 2024 17:28
@rzcoder rzcoder merged commit 283b69c into rzcoder:v1.2 Feb 2, 2024
@rzcoder
Copy link
Owner

rzcoder commented Feb 2, 2024

Works in browser out of the box via conditional polyfills

sounds too strong considering that using it in the browser still requires bundling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants