grpc / grpc/grpc-node

Please separate CLI part of types loading (that uses yargs) from actual proto loading code

Open
#3,024 2 comments 1 reaction 0 assignees View on GitHub
package: @grpc/proto-loader
Dominant language
TypeScript
Stars
4.8k
Forks
716
Avg merge
2d 3h
Merged PRs (30d)
10

Description

### Is your feature request related to a problem? Please describe.
If the packages dependency tree contains the `@grpc/proto-loader`, as it happens with `google-gax`, it pulls with that a lot of code related to command line processing, such as `yargs` package and all its 40+ packages from dependencies.

### Describe the solution you'd like
Most likely solution would be to separate the cli-specific functionality and its specific dependencies into something like `@grpc/proto-loader-cli` and use it via npx when necessary.

### Describe alternatives you've considered
There is no way for me to do an alternative as this is a deep dependency of packages I use, such as `@google-cloud/datastore` which refers the `google-gax` which refers the `@grpc/proto-loader` surely without CLI-specific processing but for API calls using paths to proto files known by calling code.

### Additional context
This will allow to get rid of dozens of dependencies which never called even indirectly in normal usage scenario of `google-gax` library (via Google Cloud client libraries and alike).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.