Skip to content

google-cloud-node: remove protos/ folders from published npm packages #4820

@julieqiu

Description

@julieqiu

Each generated package in google-cloud-node includes a protos/ folder containing raw .proto source files, compiled JavaScript/TypeScript wrappers, and a JSON representation.

For example, packages/google-cloud-secretmanager/protos/ contains:

  • google/cloud/secretmanager/v1/resources.proto
  • google/cloud/secretmanager/v1/service.proto
  • google/cloud/secrets/v1beta1/resources.proto
  • google/cloud/secrets/v1beta1/service.proto
  • protos.d.ts
  • protos.js
  • protos.json

The raw .proto files under protos/google/ seem to only be used at build time by compileProtos, which reads paths from *_proto_list.json files and compiles them into protos.json, protos.js, and protos.d.ts. At runtime, the client libraries only import the compiled artifacts.

The raw .proto files are never read from disk. We should remove the protos/ folders from the published npm packages, as a prerequisite to onboarding Node.js to librarian.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions