endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
761 stars 68 forks source link

refactor: use @endo/errors when acyclic #2324

Closed erights closed 2 weeks ago

erights commented 2 weeks ago

Staged on #2323

Closes: #XXXX Refs: https://github.com/Agoric/agoric-sdk/issues/5672 https://github.com/Agoric/agoric-sdk/pull/9513

Description

Does for endo what https://github.com/Agoric/agoric-sdk/pull/9513 does for agoric-sdk --- importing assert from @endo/errors --- when it can do so without causing dependency cycles. For the remaining packages that would cause dependency cycles, just move them towards more modern assert conventions while still using the unstructured global assert

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

We should document assert only as imported from @endo/errors, since our users will not generally contribute code within endo's internal dependency cycles.

Testing Considerations

The CI run on this PR also serves to test #2323, since that one, by itself, does not cause a behavioral change. It's purpose is to enable this PR not to hit the problem described at https://github.com/Agoric/agoric-sdk/issues/9515

Compatibility Considerations

none

Upgrade Considerations

none