Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(internal): Miscellaneous improvements #11040

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gibson042
Copy link
Member

@gibson042 gibson042 commented Feb 22, 2025

Description

  • Add defineName utility for naming otherwise anonymous functions.
  • Improve typing.
  • Promote errors.js into an @endo/errors polyfill (removing this dependency will allow pure-JS utilities to use Fail and q).

Security Considerations

Using the Fail polyfill without SES (or importing it before SES) will produce errors with censorship-free messages. This is expected only for scenarios in which SES is not loaded at all, but if we are concerned, then it could incorporate a time-of-use check that e.g. globalThis.Fail and/or globalThis.assert?.Fail are undefined (or that globalThis.lockdown is, or whatever we deem to be the best predicate for detecting SES).

Scaling Considerations

n/a

Documentation Considerations

No new concerns, although we could definitely do a better job of documented what's in package "internal" and how to use it.

Testing Considerations

These are likewise lacking. I suppose a lot could be cribbed from Endo.

Upgrade Considerations

n/a

@gibson042 gibson042 requested a review from a team as a code owner February 22, 2025 19:37
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.

1 participant