stellar / js-stellar-sdk

Main Stellar client library for the JavaScript language.
https://stellar.github.io/js-stellar-sdk/
Apache License 2.0
615 stars 296 forks source link

feat!: export `ContractClient` et al. in `contract`; rename `SorobanRpc` to `rpc` #962

Closed chadoh closed 1 month ago

chadoh commented 1 month ago

Breaking Changes

Deprecated

Other

socket-security[bot] commented 1 month ago

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Debug access npm/builtin-modules@3.3.0
Filesystem access npm/eslint-plugin-jsdoc@48.2.4

View full report↗︎

Next steps

What is debug access?

Uses debug, reflection and dynamic code execution features.

Removing the use of debug will reduce the risk of any reflection and dynamic code execution.

What is filesystem access?

Accesses the file system, and could potentially read sensitive data.

If a package must read the file system, clarify what it will read and ensure it reads only what it claims to. If appropriate, packages can leave file system access to consumers and operate on data passed to it instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/builtin-modules@3.3.0
  • @SocketSecurity ignore npm/eslint-plugin-jsdoc@48.2.4
chadoh commented 1 month ago

Didn't realize just how unhappy ESLint is with basically all the code in this repo 🤔

I saw that src/.eslintrc.js and src/soroban/.eslintrc.js were basically duplicates of each other. I tweaked them to match (removed the no-unused-vars setting, to make that an error case, which seems like what we actually want? One had been set to warn and the other had disabled it.), then removed src/soroban/.eslintrc.js.

I also fixed some config issues that I introduced earlier, so you can lint the whole repo again. And find that we have:

2081 problems (1063 errors, 1018 warnings)

¯\_(ツ)_/¯

Good enough for now, I guess??

chadoh commented 1 month ago

I've confirmed that the new entrypoints are usable from the TS Bindings code in the CLI:

I think we need to make sure we like the new module organization and then we're good to go. The current reorganization is explained in the changelog entry. The gist:

Happy to roll this third thing back for now, since it's sort of irrelevant to the current change. I just wanted to see if it was possible, and it's a non-breaking change that could help us think through how to do a larger module reorganization after the next release is out.

socket-security[bot] commented 1 month ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/eslint-config-airbnb-typescript@18.0.0 Transitive: filesystem +14 5.38 MB iamturns
npm/eslint-plugin-jsdoc@48.2.4 filesystem Transitive: unsafe +11 2.77 MB gajus

View full report↗︎