Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

accept an option for package name #697

@alexander-fenster

Description

@alexander-fenster

We've got a weird problem when we started using pack-n-play. The generated system tests need to know the package name to require it properly, but the generator has no idea how the package is called.

E.g. for Text-to-speech, the actual name is @google-cloud/text-to-speech but we generate require('texttospeech') in system tests, and it fails.

For now, I solved this with a replace command in synth.py, but that's a hack. There are two possible options:

  1. Make a generator flag to set the package name: gapic-generator-typescript ..... --package-name @google-cloud/text-to-speech

  2. In pack-n-play, use some predefined name (e.g. library) for the library being tested, and write it to package.json manually, e.g. "library": "file.tgz" - that's what I did in my first system test (the one that is now removed).

I'm OK with both solutions (or any other possible solution you might have - let me know!), but I'd like to remove the synth.py hack as soon as possible :)

Metadata

Metadata

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions