Skip to content

proto-loader: Update to Long 5.x#2110

Merged
murgatroid99 merged 1 commit intogrpc:masterfrom
murgatroid99:proto-loader_long_upgrade
May 2, 2022
Merged

proto-loader: Update to Long 5.x#2110
murgatroid99 merged 1 commit intogrpc:masterfrom
murgatroid99:proto-loader_long_upgrade

Conversation

@murgatroid99
Copy link
Member

This fixes #2009, as far as I can tell. The long package exports the type using export = Long; which it says is "compatible with import Long from "long"", but as far as I can tell that is only true if we set the TypeScript option "esModuleInterop": true. Unfortunately, if we were to set that, it appears to generate code that transitively requires all of our users to also set that option to compile any code that depends on @grpc/proto-loader. The alternative is to use the import = syntax, which seems to work no matter how that option is set.

@murgatroid99 murgatroid99 requested a review from nicolasnoble May 2, 2022 18:08
@murgatroid99 murgatroid99 merged commit f457a9b into grpc:master May 2, 2022
@alexander-fenster
Copy link
Contributor

Note: googleapis/google-cloud-node-core#321, googleapis/google-cloud-node-core#320. I will pin @grpc/proto-loader to 0.6.9 for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 'Long' can only be imported by using a default import.

3 participants