-
Notifications
You must be signed in to change notification settings - Fork 1
Core rewrite for v0.2.0 (and v1.0.0) #101
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
Draft
doseofted
wants to merge
81
commits into
main
Choose a base branch
from
core-rewrite
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…y for easier organization This will also be useful for starting work with chaining methods in RPC
…hod chaining (WIP)
…t only works with promises (to be fixed)
…ng errors in provided handler, added some tests
…then) on given chain of methods
…or method catcher, added client test
…al modules, either given as dynamic or static import)
… returning dynamic import This should allow proper type definitions in module option of client when provided a partial module
…rt partial modules This is useful when part of a module is available client-side and a call can be made synchronously. Now, type definitions can optionally reflect when that module is available and avoid wrapping the return result in a Promise. The default remains the same, and the Module type parameter goes through transformations to reflect the transport of function data from a remote location (wrapping it in a Promise and adding support for HTML forms). Currently, the client needs this type parameter passed explicitly (passing partial module to `.module` option alone isn't enough but I'm unsure how to work around that).
…adding tests for types Also added more options for PromisifiedModule type (types still need to be reorganized and thought out)
…terfaces (being utilized in rewritten client)
…ot full support but useful for supporting them) Iterator methods and properties given on the client can now be intercepted to potentially support generators. This would need support from both the server and client to return and transform into async generators from the server.
…ck old client tests, accidentally deleted)
…tests too (I won't even pretend to understand this one) Previously type tests stalled forever and typedoc generation failed, now it doesn't. I'm not sure which upgrade actually fixed the problem but I won't complain.
Build time for typedocs are incredibly slow and type tests are also slow but they do seem to work locally (unsure of what impact on types in IDE will be)
…ions, optimized MergeMethods type
These should be much easier to work with in the new client. The old client's utilities have been updated to make use of the new utilities in the meantime (and those temporary, old functions have been marked deprecated).
…enamed some functions
…s, experimenting with new "resolvers" for RPC
…during internal usage (to reflect defaults)
…cMethodGenerator to RpcMethodEncoder
…eflect functionalities
…all chain of RPCs to RpcInterpreter
…tExtractor (to be implemented)
…cts used on the same EventExtractor instance with "maintainReferences" option enabled
…ted a todo note regarding unique IDs for each RPC generated
…not sharing the original CallCatcher instance between UnknownAsync/RpcGenerator, of which both extend CallCatcher (and share a callback)
…t generating as expected yet), upgraded dependencies
…ncerning how internal IDs get generated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current
v0.1.0
version of Prim+RPC is a low-level RPC library for JavaScript/TypeScript with a lot of features, a lot of integrations, and fairly extensive documentation. There are many other features that I would like to add to Prim+RPC that the current structure of the code wouldn't allow, without a rewrite. This is that rewrite.It started as a refactor of existing functionalities but the code needs to broken down into its most basic functionalities to build out these new features. The goals of the next version
v0.2.0
(to be followed withv1.0.0
) are:Library rewrite
v0.1.0
v0.1.0
built uponv0.2.0
v0.2.0
is in development, updates should be made tov0.1.0
to support latest versions of integrationsv0.3.0
depending on complexity)Documentation changes
v0.2.0
v0.1.0
documentation, to be maintained in separate branch