safe-global / safe-modules

A collection of modules that can be used with the Safe contract
GNU Lesser General Public License v3.0
151 stars 74 forks source link

Update dependencies to use `cbor-web` instead of `cbor` in `@safe-global/safe-passkey` and update imports in the example app #488

Closed mmv08 closed 2 months ago

mmv08 commented 2 months ago

When trying to solve https://github.com/safe-global/safe-modules/issues/395, I looked at the original error that triggered the discussion of adding an ESM build to the packages. I thought that the error was due to a bug in the bundler's ESM interoperability mechanism, but I realised that actually the issue was in the cbor package and compatibility with the browser environment.

When you import a js module, the code will get evaluated regardless of it use: https://www.perplexity.ai/search/does-javascript-evaluate-an-im-y4Zv1HKiQNmqxnHd1HJ1SA#0 (we may not use any of the functionality that's actually incompatible but because the code gets evaluated and it may imported a package that's unavailable in browser)

This PR:

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10597859225

Details


Totals Coverage Status
Change from base Build 10574494437: 0.0%
Covered Lines: 92
Relevant Lines: 92

💛 - Coveralls