-
Couldn't load subscription status.
- Fork 624
BREAKING: Move all internal types from snaps-types to snaps-utils
#1060
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1060 +/- ##
==========================================
- Coverage 93.52% 92.36% -1.17%
==========================================
Files 95 96 +1
Lines 9922 10044 +122
Branches 941 942 +1
==========================================
- Hits 9280 9277 -3
- Misses 642 767 +125
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
9cf588d to
636d095
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a rebase but otherwise lgtm
636d095 to
4fa1ab4
Compare
This is a prerequisite for #1014.
I've moved all types from
snaps-typestosnaps-utils, to avoid circular dependencies.snaps-typeshas also been refactored to a "regular" package, rather than a type-only package. Even though it still only contains types, this was required for it to be able to import from other monorepo packages.Breaking changes
OnRpcRequestHandler,OnTransactionResponse,OnTransactionHandler, andOnCronjobHandlerwere usingunknown[] | Record<string, unknown>. Since values need to be JSON-compatible, I've changed this toJson[] | Record<string, Json>.SnapRpcHandlerwas removed. This seemed like a legacy type, and was the same asOnRpcRequestHandler.global.d.tsinsnaps-typeswas removed, as it is no longer necessary.snaps-typescreates the globals when the package itself is imported, meaning that the following works now:SnapFunctionExportsandSnapExportsare no longer exported fromsnaps-types.Closes #1054.
Closes #815.