-
Notifications
You must be signed in to change notification settings - Fork 10
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(ts): implement grpc-js client services (#184) #158
Merged
Conversation
This file contains 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
ygrishajev
force-pushed
the
feat/ts-grpc-js
branch
from
April 30, 2024 13:19
2a3fc30
to
02c7e4d
Compare
troian
reviewed
Apr 30, 2024
ygrishajev
force-pushed
the
feat/ts-grpc-js
branch
from
April 30, 2024 13:44
02c7e4d
to
b54ba45
Compare
2 tasks
baktun14
previously approved these changes
Apr 30, 2024
troian
requested changes
May 1, 2024
Redm4x
previously approved these changes
May 2, 2024
ygrishajev
force-pushed
the
feat/ts-grpc-js
branch
from
May 2, 2024 09:55
b54ba45
to
5a56186
Compare
troian
reviewed
May 3, 2024
ygrishajev
force-pushed
the
feat/ts-grpc-js
branch
from
May 3, 2024 12:39
f7377eb
to
dabf310
Compare
ygrishajev
force-pushed
the
feat/ts-grpc-js
branch
from
May 3, 2024 14:49
dabf310
to
0daa8d9
Compare
ygrishajev
force-pushed
the
feat/ts-grpc-js
branch
2 times, most recently
from
May 3, 2024 16:49
f3eb061
to
fd63c6d
Compare
troian
reviewed
May 3, 2024
troian
reviewed
May 3, 2024
also improve formatting to make sure it works from the root dir
ygrishajev
force-pushed
the
feat/ts-grpc-js
branch
from
May 3, 2024 17:07
fd63c6d
to
3b69cc8
Compare
troian
approved these changes
May 3, 2024
🎉 This PR is included in version 1.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
This pull request introduces enhancements to our TypeScript codebase, focusing on improved gRPC service integration.
Key Changes
gRPC Code Generation: Added
ts-proto
specifically tailored for@grpc/grpc-js
. This ensures that our TypeScript code seamlessly integrates with gRPC services.Service Implementation Merging: Merged only the service implementations into the default generated code from
ts-proto
, optimizing the structure and utility of our generated modules.Script Refactoring: Extracted merging shell scripts into a dedicated file
Some reasoning
Node.js Dependencies in Default Exports: It is not possible to generate services for
@grpc/grpc-js
in dedicated files. This approach leads to Node.js native dependencies being imported across all default exports, which unfortunately breaks browser support.Dedicated Cache Directory for @grpc/grpc-js Code Generation: To manage the issue of dependencies, the code generation for
grpc-js
is directed into a dedicated cache directory. This setup isolates the@grpc/grpc-js
specific code, allowing us to maintain a clear separation from the default codebase. The only difference with the default generated code in this case is services we need to integrate with@grpc/grpc-js
.Relocation and Indexing of Services: Post generation, the
grpc-js
services are moved to thets/src/generated
directory within the project structure. Each service is given its own index file to facilitate clean exports from the package.