Skip to content

Commit 113ca18

Browse files
authored
fix: protobuf export path in compileProtos (#1708)
1 parent 96b3c13 commit 113ca18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/src/compileProtos.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function fixJsFile(js: string): string {
170170
// depend on protobufjs, so we re-export it from google-gax
171171
js = js.replace(
172172
'import * as $protobuf from "protobufjs/minimal"',
173-
'import {protobufMinimal as $protobuf} from "google-gax/build/src/protobuf.js"',
173+
'import {protobufMinimal as $protobuf} from "google-gax/build/src/protobuf"',
174174
);
175175

176176
// 1. fix protobufjs require: we don't want the libraries to

tools/test/compileProtos.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe('compileProtos tool', () => {
160160
js
161161
.toString()
162162
.includes(
163-
'import {protobufMinimal as $protobuf} from "google-gax/build/src/protobuf.js"',
163+
'import {protobufMinimal as $protobuf} from "google-gax/build/src/protobuf"',
164164
),
165165
);
166166
assert(!js.toString().includes('require("protobufjs/minimal")'));

0 commit comments

Comments
 (0)