Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/proto-loader/bin/proto-loader-gen-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ type GeneratorOptions = Protobuf.IParseOptions & Protobuf.IConversionOptions & {
outputTemplate: string;
inputBranded: boolean;
outputBranded: boolean;
targetFileExtension?: string;
importFileExtension?: string;
targetFileExtension: string;
importFileExtension: string;
}

class TextFormatter {
Expand Down Expand Up @@ -832,7 +832,7 @@ async function writeAllFiles(protoFiles: string[], options: GeneratorOptions) {
await fs.promises.mkdir(options.outDir, {recursive: true});
const basenameMap = new Map<string, string[]>();
for (const filename of protoFiles) {
const basename = path.basename(filename).replace(/\.proto$/, '.ts');
const basename = path.basename(filename).replace(/\.proto$/, options.targetFileExtension);
if (basenameMap.has(basename)) {
basenameMap.get(basename)!.push(filename);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/proto-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grpc/proto-loader",
"version": "0.7.14",
"version": "0.7.15",
"author": "Google Inc.",
"contributors": [
{
Expand Down