Skip to content
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

accept an option for package name #134

Closed
alexander-fenster opened this issue Nov 13, 2019 · 1 comment · Fixed by #148
Closed

accept an option for package name #134

alexander-fenster opened this issue Nov 13, 2019 · 1 comment · Fixed by #148
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@alexander-fenster
Copy link
Contributor

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 :)

@alexander-fenster alexander-fenster added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Nov 13, 2019
@alexander-fenster
Copy link
Contributor Author

synth.py hack I was talking about: googleapis/nodejs-text-to-speech@abe65bf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants