ts-proto
ts-proto copied to clipboard
Consider importing only `type` of `CallContext` and `CallOptions` with `outputServices=nice-grpc`
Thank you for the great lib!
From: https://github.com/stephenh/ts-proto/blob/d2be6f9f441bb90d5b7904a069a7306b6b041cba/src/generate-nice-grpc.ts#L9-L10
To:
const CallOptions = imp("t:CallOptions@nice-grpc-common");
const CallContext = imp("t:CallContext@nice-grpc-common");
Based on the ts-poet
import specs.
Generated output:
From:
import { CallContext, CallOptions } from 'nice-grpc-common';
To:
import type { CallContext, CallOptions } from 'nice-grpc-common';
Hey @dankeboy36 , ah yeah, that sounds like a good idea. If you could submit a PR, that'd be great!
I would love to contribute, but I have issues running the tests. Is the 3.19.1
a strict constraint for protoc
? I have libprotoc 3.21.5
. I have failed to run both the local
and Docker tests. Could you please assist? Below, you will find all my logs. Thank you for your time!
I am on d2be6f9:
username@prprpr ts-proto % git rev-parse --short HEAD
d2be6f9
I switched to the latest Node.js from nvm
and have the latest protoc
from brew
:
username@prprpr ts-proto % node --version && npm --version && yarn --version && protoc --version
v17.9.1
8.11.0
1.21.1
libprotoc 3.21.5
Dependencies installed:
username@prprpr ts-proto % yarn
yarn install v1.21.1
[1/4] 🔍 Resolving packages...
success Already up-to-date.
$ yarn build
yarn run v1.21.1
$ yarn tsc
$ /Users/username/Desktop/ts-proto/node_modules/.bin/tsc
✨ Done in 6.49s.
✨ Done in 7.73s.
Click to see full yarn build:test:local
output.
username@prprpr ts-proto % yarn build:test:local
yarn run v1.21.1
$ yarn proto2bin:local && yarn proto2pbjs:local && yarn bin2ts:local
$ integration/update-bins.sh
./vector-tile/vector_tile.proto
./options/something/something.proto
./options/options.proto
./simple-proto2/simple.proto
./simple-string-enums/simple.proto
./grpc-js/simple.proto
./grpc-js/google/protobuf/wrappers.proto
./simple-long/simple.proto
./simple-long/google/protobuf/wrappers.proto
./simple-snake/import_dir/thing.proto
./simple-snake/simple.proto
./simple-snake/google/protobuf/wrappers.proto
./simple-prototype-defaults/import_dir/thing.proto
./simple-prototype-defaults/simple.proto
./simple-prototype-defaults/google/type/date.proto
./simple-prototype-defaults/google/protobuf/wrappers.proto
./meta-typings/import_dir/thing.proto
./meta-typings/simple.proto
./meta-typings/google/type/date.proto
./meta-typings/google/protobuf/wrappers.proto
./file-suffix/child.proto
./file-suffix/parent.proto
./simple-long-string/simple.proto
./simple-long-string/google/protobuf/wrappers.proto
./nestjs-metadata-grpc-js/hero.proto
./return-observable/observable.proto
./simple-optionals/import_dir/thing.proto
./simple-optionals/thing.proto
./simple-optionals/simple.proto
./simple-optionals/google/protobuf/wrappers.proto
./use-date-false/metadata.proto
./oneof-unions-snake/simple.proto
./import-suffix/child.proto
./import-suffix/parent.proto
./barrel-imports/foo.proto
./barrel-imports/bar.proto
./generic-service-definitions-and-services/simple.proto
./use-numeric-enum-json/simple.proto
./point/point.proto
./use-exact-types-false/foo.proto
./value/value.proto
./nestjs-simple-restparameters/hero.proto
./angular/simple-message.proto
./simple-json-name/simple.proto
./no-proto-package/no-proto-package.proto
./use-date-string/use-date-string.proto
./nice-grpc/simple.proto
./nice-grpc/google/protobuf/wrappers.proto
./simple/import_dir/thing.proto
./simple/simple.proto
./simple/google/type/date.proto
./simple/google/protobuf/wrappers.proto
./async-iterable-services/simple.proto
./bytes-as-base64/message.proto
./struct/struct.proto
./use-date-true/use-date-true.proto
./nestjs-metadata-restparameters/hero.proto
./global-this/global-this.proto
./enums-as-literals-with-string-enums/enums-as-literals-with-string-enums.proto
./grpc-web-no-streaming-observable/example.proto
./unknown-fields/something/something.proto
./unknown-fields/google/protobuf/compiler/plugin.proto
./unknown-fields/google/protobuf/descriptor.proto
./unknown-fields/options.proto
./grpc-web/example.proto
./avoid-import-conflicts-types-only/simple.proto
./avoid-import-conflicts-types-only/simple2.proto
./use-json-wire-format/use-json-wire-format.proto
./fieldmask/fieldmask.proto
./nestjs-metadata/hero.proto
./only-types/reservation.proto
./grpc-web-go-server/example.proto
./batching/batching.proto
./use-objectid-true-external-import/objectid/objectid.proto
./use-objectid-true-external-import/use-objectid-true.proto
./import-mapping/some/internal/repo/very_private.proto
./import-mapping/mapping.proto
./avoid-import-conflicts/simple.proto
./avoid-import-conflicts/simple2.proto
./grpc-web-no-streaming/example.proto
./oneof-properties/oneof.proto
./oneof-unions/oneof.proto
./nestjs-metadata-observables/hero.proto
./simple-esmodule-interop/simple.proto
./batching-with-context/batching.proto
./const-enum/const-enum.proto
./types-with-underscores/file.proto
./enums-as-literals/enums-as-literals.proto
./generic-service-definitions/simple.proto
./lower-case-svc-methods/math.proto
./simple-deprecated-fields/simple.proto
./nestjs-simple/hero.proto
./type-registry/foo.proto
./type-registry/bar/bar.proto
./generic-metadata/hero.proto
./use-optionals-all/test.proto
./nestjs-restparameters/hero.proto
./only-types-grpc-metadata/only-types-grpc-metadata.proto
./reserved-words/reserved-words.proto
./bytes-node/point.proto
./simple-unrecognized-enum/import_dir/thing.proto
./simple-unrecognized-enum/simple.proto
./simple-unrecognized-enum/google/protobuf/wrappers.proto
./nestjs-simple-observables/hero.proto
./omit-optionals/simple.proto
$ integration/pbjs.sh
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/simple/pbjs.js integration/simple/simple.proto
installing jsdoc@^3.6.3
installing tmp@^0.2.0
installing espree@^7.0.0
installing escodegen@^1.13.0
installing estraverse@^5.1.0
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/simple/pbjs.d.ts integration/simple/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-long -t static-module -o integration/simple-long/pbjs.js integration/simple-long/simple.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/simple-long/pbjs.d.ts integration/simple-long/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-long -t static-module -o integration/simple-long-string/pbjs.js integration/simple-long-string/simple.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/simple-long-string/pbjs.d.ts integration/simple-long-string/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/vector-tile/pbjs.js integration/vector-tile/vector_tile.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/vector-tile/pbjs.d.ts integration/vector-tile/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/nestjs-metadata/pbjs.js integration/nestjs-metadata/hero.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/nestjs-metadata/pbjs.d.ts integration/nestjs-metadata/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/nestjs-metadata-observables/pbjs.js integration/nestjs-metadata-observables/hero.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/nestjs-metadata-observables/pbjs.d.ts integration/nestjs-metadata-observables/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/nestjs-metadata-restparameters/pbjs.js integration/nestjs-metadata-restparameters/hero.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/nestjs-metadata-restparameters/pbjs.d.ts integration/nestjs-metadata-restparameters/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/nestjs-simple/pbjs.js integration/nestjs-simple/hero.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/nestjs-simple/pbjs.d.ts integration/nestjs-simple/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/nestjs-simple-observables/pbjs.js integration/nestjs-simple-observables/hero.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/nestjs-simple-observables/pbjs.d.ts integration/nestjs-simple-observables/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/nestjs-simple-restparameters/pbjs.js integration/nestjs-simple-restparameters/hero.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/nestjs-simple-restparameters/pbjs.d.ts integration/nestjs-simple-restparameters/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/oneof-properties/pbjs.js integration/oneof-properties/oneof.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/oneof-properties/pbjs.d.ts integration/oneof-properties/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/oneof-unions/pbjs.js integration/oneof-unions/oneof.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/oneof-unions/pbjs.d.ts integration/oneof-unions/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/struct/pbjs.js integration/struct/struct.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/struct/pbjs.d.ts integration/struct/pbjs.js
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbjs --force-message --force-number -t static-module -o integration/value/pbjs.js integration/value/value.proto
$ /Users/username/Desktop/ts-proto/node_modules/.bin/pbts --no-comments -o integration/value/pbjs.d.ts integration/value/pbjs.js
$ integration/codegen.sh
Generating typescript code for integration tests using 5 cores...
./vector-tile/vector_tile.bin
./options/something/something.bin
./options/options.bin
./simple-proto2/simple.bin
./simple-string-enums/simple.bin
./grpc-js/google/protobuf/wrappers.bin
./vector-tile/vector_tile.bin: Done
./simple-string-enums/simple.bin: Done
./simple-proto2/simple.bin: Done
./options/something/something.bin: Done
./options/options.bin: Done
./grpc-js/simple.bin
./simple-long/google/protobuf/wrappers.bin
./simple-long/simple.bin
./simple-snake/import_dir/thing.bin
./simple-snake/google/protobuf/wrappers.bin
./simple-snake/import_dir/thing.bin: Done
./grpc-js/google/protobuf/wrappers.bin: Done
./simple-long/google/protobuf/wrappers.bin: Done
./grpc-js/simple.bin: Done
./simple-long/simple.bin: Done
./simple-snake/simple.bin
./simple-prototype-defaults/import_dir/thing.bin
./simple-prototype-defaults/google/type/date.bin
./simple-prototype-defaults/google/protobuf/wrappers.bin
./simple-prototype-defaults/simple.bin
./simple-prototype-defaults/google/type/date.bin: Done
./simple-prototype-defaults/google/protobuf/wrappers.bin: Done
./simple-prototype-defaults/import_dir/thing.bin: Done
./simple-snake/google/protobuf/wrappers.bin: Done
./simple-snake/simple.bin: Done
./meta-typings/import_dir/thing.bin
./meta-typings/google/type/date.bin
./meta-typings/google/protobuf/wrappers.bin
./meta-typings/simple.bin
./file-suffix/parent.bin
./meta-typings/import_dir/thing.bin: Done
./meta-typings/google/type/date.bin: Done
./meta-typings/google/protobuf/wrappers.bin: Done
./simple-prototype-defaults/simple.bin: Done
./meta-typings/simple.bin: Done
./file-suffix/child.bin
./simple-long-string/google/protobuf/wrappers.bin
./simple-long-string/simple.bin
./nestjs-metadata-grpc-js/hero.bin
./return-observable/observable.bin
./nestjs-metadata-grpc-js/hero.bin: Done
./file-suffix/child.bin: Done
./file-suffix/parent.bin: Done
./simple-long-string/google/protobuf/wrappers.bin: Done
./simple-long-string/simple.bin: Done
./simple-optionals/thing.bin
./simple-optionals/import_dir/thing.bin
./simple-optionals/google/protobuf/wrappers.bin
./simple-optionals/simple.bin
./use-date-false/metadata.bin
ts-proto: Passing useOptionals as a boolean option is deprecated and will be removed in a future version. Please pass the string 'messages' instead of true.
ts-proto: Passing useOptionals as a boolean option is deprecated and will be removed in a future version. Please pass the string 'messages' instead of true.
ts-proto: Passing useOptionals as a boolean option is deprecated and will be removed in a future version. Please pass the string 'messages' instead of true.
ts-proto: Passing useOptionals as a boolean option is deprecated and will be removed in a future version. Please pass the string 'messages' instead of true.
./return-observable/observable.bin: Done
./simple-optionals/thing.bin: Done
./simple-optionals/import_dir/thing.bin: Done
./simple-optionals/google/protobuf/wrappers.bin: Done
./simple-optionals/simple.bin: Done
./oneof-unions-snake/simple.bin
./import-suffix/parent.bin
./import-suffix/child.bin
./barrel-imports/foo.bin
./barrel-imports/bar.bin
./import-suffix/parent.bin: Done
./import-suffix/child.bin: Done
./use-date-false/metadata.bin: Done
./oneof-unions-snake/simple.bin: Done
./barrel-imports/foo.bin: Done
./generic-service-definitions-and-services/simple.bin
./use-numeric-enum-json/simple.bin
./point/point.bin
./use-exact-types-false/foo.bin
./value/value.bin
./generic-service-definitions-and-services/simple.bin: Done
./use-exact-types-false/foo.bin: Done
./barrel-imports/bar.bin: Done
./use-numeric-enum-json/simple.bin: Done
./point/point.bin: Done
./nestjs-simple-restparameters/hero.bin
./angular/simple-message.bin
./simple-json-name/simple.bin
./no-proto-package/no-proto-package.bin
./use-date-string/use-date-string.bin
./nestjs-simple-restparameters/hero.bin: Done
./angular/simple-message.bin: Done
./simple-json-name/simple.bin: Done
./no-proto-package/no-proto-package.bin: Done
./value/value.bin: Done
./nice-grpc/google/protobuf/wrappers.bin
./nice-grpc/simple.bin
./simple/import_dir/thing.bin
./simple/google/type/date.bin
./simple/google/protobuf/wrappers.bin
./simple/google/type/date.bin: Done
./nice-grpc/google/protobuf/wrappers.bin: Done
./simple/import_dir/thing.bin: Done
./use-date-string/use-date-string.bin: Done
./nice-grpc/simple.bin: Done
./simple/simple.bin
./async-iterable-services/simple.bin
./bytes-as-base64/message.bin
./struct/struct.bin
./use-date-true/use-date-true.bin
./bytes-as-base64/message.bin: Done
./async-iterable-services/simple.bin: Done
./simple/google/protobuf/wrappers.bin: Done
./struct/struct.bin: Done
./simple/simple.bin: Done
./nestjs-metadata-restparameters/hero.bin
./global-this/global-this.bin
./enums-as-literals-with-string-enums/enums-as-literals-with-string-enums.bin
./grpc-web-no-streaming-observable/example.bin
./unknown-fields/something/something.bin
./global-this/global-this.bin: Done
./grpc-web-no-streaming-observable/example.bin: Done
./nestjs-metadata-restparameters/hero.bin: Done
./enums-as-literals-with-string-enums/enums-as-literals-with-string-enums.bin: Done
./use-date-true/use-date-true.bin: Done
./unknown-fields/google/protobuf/descriptor.bin
./unknown-fields/google/protobuf/compiler/plugin.bin
./unknown-fields/options.bin
./grpc-web/example.bin
./avoid-import-conflicts-types-only/simple2.bin
./grpc-web/example.bin: Done
./unknown-fields/google/protobuf/compiler/plugin.bin: Done
./unknown-fields/something/something.bin: Done
./unknown-fields/google/protobuf/descriptor.bin: Done
./unknown-fields/options.bin: Done
./avoid-import-conflicts-types-only/simple.bin
./use-json-wire-format/use-json-wire-format.bin
./fieldmask/fieldmask.bin
./nestjs-metadata/hero.bin
./only-types/reservation.bin
./avoid-import-conflicts-types-only/simple2.bin: Done
./use-json-wire-format/use-json-wire-format.bin: Done
./nestjs-metadata/hero.bin: Done
./avoid-import-conflicts-types-only/simple.bin: Done
./fieldmask/fieldmask.bin: Done
./grpc-web-go-server/example.bin
./batching/batching.bin
./use-objectid-true-external-import/objectid/objectid.bin
./use-objectid-true-external-import/use-objectid-true.bin
./import-mapping/some/internal/repo/very_private.bin
./only-types/reservation.bin: Done
./use-objectid-true-external-import/objectid/objectid.bin: Done
./grpc-web-go-server/example.bin: Done
./batching/batching.bin: Done
./use-objectid-true-external-import/use-objectid-true.bin: Done
./import-mapping/mapping.bin
./avoid-import-conflicts/simple2.bin
./avoid-import-conflicts/simple.bin
./grpc-web-no-streaming/example.bin
./oneof-properties/oneof.bin
./import-mapping/some/internal/repo/very_private.bin: Done
./avoid-import-conflicts/simple2.bin: Done
./avoid-import-conflicts/simple.bin: Done
./grpc-web-no-streaming/example.bin: Done
./import-mapping/mapping.bin: Done
./oneof-unions/oneof.bin
./nestjs-metadata-observables/hero.bin
./simple-esmodule-interop/simple.bin
./batching-with-context/batching.bin
./const-enum/const-enum.bin
./nestjs-metadata-observables/hero.bin: Done
./oneof-properties/oneof.bin: Done
./simple-esmodule-interop/simple.bin: Done
./batching-with-context/batching.bin: Done
./oneof-unions/oneof.bin: Done
./types-with-underscores/file.bin
./enums-as-literals/enums-as-literals.bin
./generic-service-definitions/simple.bin
./lower-case-svc-methods/math.bin
./simple-deprecated-fields/simple.bin
./types-with-underscores/file.bin: Done
./lower-case-svc-methods/math.bin: Done
./const-enum/const-enum.bin: Done
./enums-as-literals/enums-as-literals.bin: Done
./generic-service-definitions/simple.bin: Done
./nestjs-simple/hero.bin
./type-registry/foo.bin
./type-registry/bar/bar.bin
./generic-metadata/hero.bin
./use-optionals-all/test.bin
./simple-deprecated-fields/simple.bin: Done
./nestjs-simple/hero.bin: Done
./generic-metadata/hero.bin: Done
./type-registry/foo.bin: Done
./type-registry/bar/bar.bin: Done
./nestjs-restparameters/hero.bin
./only-types-grpc-metadata/only-types-grpc-metadata.bin
./reserved-words/reserved-words.bin
./bytes-node/point.bin
./simple-unrecognized-enum/import_dir/thing.bin
./only-types-grpc-metadata/only-types-grpc-metadata.bin: Done
./reserved-words/reserved-words.bin: Done
./nestjs-restparameters/hero.bin: Done
./use-optionals-all/test.bin: Done
./bytes-node/point.bin: Done
./simple-unrecognized-enum/google/protobuf/wrappers.bin
./simple-unrecognized-enum/simple.bin
./nestjs-simple-observables/hero.bin
./omit-optionals/simple.bin
./nestjs-simple-observables/hero.bin: Done
./simple-unrecognized-enum/import_dir/thing.bin: Done
./omit-optionals/simple.bin: Done
./simple-unrecognized-enum/google/protobuf/wrappers.bin: Done
./simple-unrecognized-enum/simple.bin: Done
✨ Done in 107.11s.
I have a lot of outgoing changes. Probably I have a mismatching protoc
version. Click to see
git status -s
output.
username@prprpr ts-proto % git status -s
M integration/angular/simple-message.bin
M integration/async-iterable-services/simple.bin
M integration/avoid-import-conflicts-types-only/simple.bin
M integration/avoid-import-conflicts-types-only/simple2.bin
M integration/avoid-import-conflicts/simple.bin
M integration/avoid-import-conflicts/simple2.bin
M integration/barrel-imports/bar.bin
M integration/barrel-imports/foo.bin
M integration/batching-with-context/batching.bin
M integration/batching/batching.bin
M integration/bytes-as-base64/message.bin
M integration/bytes-node/point.bin
M integration/const-enum/const-enum.bin
M integration/enums-as-literals-with-string-enums/enums-as-literals-with-string-enums.bin
M integration/enums-as-literals/enums-as-literals.bin
M integration/fieldmask/fieldmask.bin
M integration/file-suffix/child.bin
M integration/file-suffix/parent.bin
M integration/generic-metadata/hero.bin
M integration/generic-service-definitions-and-services/simple.bin
M integration/generic-service-definitions/simple.bin
M integration/global-this/global-this.bin
M integration/grpc-js/google/protobuf/empty.ts
M integration/grpc-js/google/protobuf/wrappers.bin
M integration/grpc-js/simple.bin
M integration/grpc-web-go-server/example.bin
M integration/grpc-web-no-streaming-observable/example.bin
M integration/grpc-web-no-streaming/example.bin
M integration/grpc-web/example.bin
M integration/import-mapping/mapping.bin
M integration/import-mapping/some/internal/repo/very_private.bin
M integration/import-suffix/child.bin
M integration/import-suffix/parent.bin
M integration/lower-case-svc-methods/math.bin
M integration/meta-typings/google/protobuf/wrappers.bin
M integration/meta-typings/google/type/date.bin
M integration/meta-typings/import_dir/thing.bin
M integration/meta-typings/simple.bin
M integration/nestjs-metadata-grpc-js/hero.bin
M integration/nestjs-metadata-observables/hero.bin
M integration/nestjs-metadata-restparameters/hero.bin
M integration/nestjs-metadata/hero.bin
M integration/nestjs-restparameters/hero.bin
M integration/nestjs-simple-observables/hero.bin
M integration/nestjs-simple-restparameters/google/protobuf/empty.ts
M integration/nestjs-simple-restparameters/hero.bin
M integration/nestjs-simple/google/protobuf/empty.ts
M integration/nestjs-simple/hero.bin
M integration/nice-grpc/google/protobuf/empty.ts
M integration/nice-grpc/google/protobuf/wrappers.bin
M integration/nice-grpc/simple.bin
M integration/no-proto-package/no-proto-package.bin
M integration/omit-optionals/simple.bin
M integration/oneof-properties/oneof.bin
M integration/oneof-unions-snake/simple.bin
M integration/oneof-unions/oneof.bin
M integration/only-types-grpc-metadata/only-types-grpc-metadata.bin
M integration/only-types/google/protobuf/any.ts
M integration/only-types/reservation.bin
M integration/options/google/protobuf/descriptor.ts
M integration/options/options.bin
M integration/options/something/something.bin
M integration/point/point.bin
M integration/reserved-words/reserved-words.bin
M integration/return-observable/observable.bin
M integration/simple-deprecated-fields/simple.bin
M integration/simple-esmodule-interop/simple.bin
M integration/simple-json-name/simple.bin
M integration/simple-long-string/google/protobuf/wrappers.bin
M integration/simple-long-string/simple.bin
M integration/simple-long/google/protobuf/wrappers.bin
M integration/simple-long/simple.bin
M integration/simple-optionals/google/protobuf/wrappers.bin
M integration/simple-optionals/import_dir/thing.bin
M integration/simple-optionals/simple.bin
M integration/simple-optionals/thing.bin
M integration/simple-proto2/simple.bin
M integration/simple-prototype-defaults/google/protobuf/wrappers.bin
M integration/simple-prototype-defaults/google/type/date.bin
M integration/simple-prototype-defaults/import_dir/thing.bin
M integration/simple-prototype-defaults/simple.bin
M integration/simple-snake/google/protobuf/wrappers.bin
M integration/simple-snake/import_dir/thing.bin
M integration/simple-snake/simple.bin
M integration/simple-string-enums/simple.bin
M integration/simple-unrecognized-enum/google/protobuf/wrappers.bin
M integration/simple-unrecognized-enum/import_dir/thing.bin
M integration/simple-unrecognized-enum/simple.bin
M integration/simple/google/protobuf/wrappers.bin
M integration/simple/google/type/date.bin
M integration/simple/import_dir/thing.bin
M integration/simple/simple.bin
M integration/struct/struct.bin
M integration/type-registry/bar/bar.bin
M integration/type-registry/foo.bin
M integration/types-with-underscores/file.bin
M integration/unknown-fields/google/protobuf/compiler/plugin.bin
M integration/unknown-fields/google/protobuf/descriptor.bin
M integration/unknown-fields/options.bin
M integration/unknown-fields/something/something.bin
M integration/use-date-false/metadata.bin
M integration/use-date-string/use-date-string.bin
M integration/use-date-true/google/protobuf/empty.ts
M integration/use-date-true/use-date-true.bin
M integration/use-exact-types-false/foo.bin
M integration/use-json-wire-format/use-json-wire-format.bin
M integration/use-numeric-enum-json/simple.bin
M integration/use-objectid-true-external-import/objectid/objectid.bin
M integration/use-objectid-true-external-import/use-objectid-true.bin
M integration/use-optionals-all/test.bin
M integration/value/value.bin
M integration/vector-tile/vector_tile.bin
username@prprpr ts-proto %
For example these:
git diff integration/grpc-js/google/protobuf/empty.ts
diff --git a/integration/grpc-js/google/protobuf/empty.ts b/integration/grpc-js/google/protobuf/empty.ts
index 4318905..dc6ad66 100644
--- a/integration/grpc-js/google/protobuf/empty.ts
+++ b/integration/grpc-js/google/protobuf/empty.ts
@@ -11,8 +11,6 @@ export const protobufPackage = "google.protobuf";
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
- *
- * The JSON representation for `Empty` is empty JSON object `{}`.
*/
export interface Empty {
}
git diff /Users/akos.kitta/Desktop/ts-proto/integration/only-types/google/protobuf/any.ts
diff --git a/integration/only-types/google/protobuf/any.ts b/integration/only-types/google/protobuf/any.ts
index d762aac..0676e3c 100644
--- a/integration/only-types/google/protobuf/any.ts
+++ b/integration/only-types/google/protobuf/any.ts
@@ -28,7 +28,7 @@ export const protobufPackage = "google.protobuf";
* foo = any.unpack(Foo.class);
* }
*
- * Example 3: Pack and unpack a message in Python.
+ * Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
@@ -38,7 +38,7 @@ export const protobufPackage = "google.protobuf";
* any.Unpack(foo)
* ...
*
- * Example 4: Pack and unpack a message in Go
+ * Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := anypb.New(foo)
@@ -58,7 +58,7 @@ export const protobufPackage = "google.protobuf";
* name "y.z".
*
* JSON
- * ====
+ *
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
If I run yarn build:test
, it fails with this error:
If you are installing with npm, you can try not copying the "node_modules"
directory when you copy the files over, and running "npm ci" or "npm install"
on the destination platform after the copy. Or you could consider using yarn
instead which has built-in support for installing a package on multiple
platforms simultaneously.
If you are installing with yarn, you can try listing both this platform and the
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
Keep in mind that this means multiple copies of esbuild will be present.
Another alternative is to use the "esbuild-wasm" package instead, which works
the same way on all platforms. But it comes with a heavy performance cost and
can sometimes be 10x slower than the "esbuild" package, so you may also not
want to do that.
at generateBinPath (/ts-proto/node_modules/esbuild/lib/main.js:1815:17)
at esbuildCommandAndArgs (/ts-proto/node_modules/esbuild/lib/main.js:1901:31)
at ensureServiceIsRunning (/ts-proto/node_modules/esbuild/lib/main.js:2065:25)
at startSyncServiceWorker (/ts-proto/node_modules/esbuild/lib/main.js:2275:19)
at Object.<anonymous> (/ts-proto/node_modules/esbuild/lib/main.js:2316:3)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
My Docker version is 4.12.0 (85629)
.

I am on macOS 11.6.5 (20G527)
. What am I doing wrong? Thank you!
Is the
3.19.1
a strict constraint forprotoc
?
Yes. I manually installed protoc
as I could not find the correct protobuf
in brew
.
PROTOC_ZIP=protoc-3.19.1-osx-x86_64.zip
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP
:tada: This issue has been resolved in version 1.127.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: