-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix type declaration emitting when using NodeNext module resolution #398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm that d99b803 fails the tests 👍
Seems that declarationMap
is not necessary to trigger, but I think it's a good call to leave it in.
Can you make the simplification with typeof protoN
and re-using the dist
directory and add explanatory comments suggested below?
@timostamm Thanks for the review. I force-pushed two commits on top of the test-failure demonstration commit to make it easier to re-review for you (considering all the noise with the generated files). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this fix!
@@ -10,5 +10,5 @@ server would usually do. | |||
|
|||
| code generator | bundle size | minified | compressed | | |||
|---------------------|------------------------:|-----------------------:|-------------------:| | |||
| protobuf-es | 86,785 b | 36,950 b | 9,642 b | | |||
| protobuf-es | 86,785 b | 36,950 b | 9,654 b | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for posterity: This is the usual flake we get from using Node.js zlib on different platforms. I don't see any bundle size change.
This release includes the following: ## Enhancements * Support size-delimited messages by @timostamm in #387. ## Bug Fixes * Upgrade to Protobuf v22.0 by @smaye81 in #394. * Fix type declaration emitting when using NodeNext module resolution by @fubhy in #398. * Strip rewrite_imports parameter by @smaye81 in #386. ## New Contributors * @s-hakase made their first contribution in #367. * @balzdur made their first contribution in #368.
Removes
--noEmit
when testing compilation with the various tsc versions and configuresdeclarations
anddeclarationMap
to be emitted.Adds a ProtoRuntime typehint to the
runtime
property on generated messages.Fixes #396