chore: fix gapic-generator-typescript build scripts for easier local development#8103
Open
chore: fix gapic-generator-typescript build scripts for easier local development#8103
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request transitions the gapic-generator-typescript package from a Bazel-based build system to a standard TypeScript and npm workflow. Key changes include replacing Bazel commands with tsc and mocha, updating JSON import syntax to use the with keyword, and adjusting the protoc binary path validation. Review feedback identifies potential compilation errors caused by restricted type definitions in tsconfig.json, cross-platform compatibility issues with Unix-specific commands in the compile script, and potential file state inconsistencies during the prepack process.
This file contains hidden or 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
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.
Today, building the GAPIC generator depends on Bazel, which doesn't work in the packages default state.
This PR, removes the dependency on Bazel from the package.json and enables the following commands to work again:
npm run compilenow successfully builds the artifacts required to run the generator and places them in abuild/directory.npm linknow successfully creates executable scripts, puts them in yournode_modules/.binfolder, and adds them to your path so they can be run immediately.In addition to fixing the
compileandlinkfunctionality, I also fixed thenpm run testscript so we can verify our changes locally. I also deleted test scripts which point to files no longer defined in the source code.Example output from running locally: