ts-proto 2.7.6 → 2.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,13 +187,8 @@ function toReaderCall(field) {
187
187
  }
188
188
  }
189
189
  function packedField(field, isProto3Syntax) {
190
- if (isProto3Syntax && field.options?.packed === false) {
191
- return undefined;
192
- }
193
- else if (!isProto3Syntax && !!field.options?.packed) {
194
- return undefined;
195
- }
196
- return packedType(field.type);
190
+ const shouldPack = field.options?.packed ?? isProto3Syntax;
191
+ return shouldPack ? packedType(field.type) : undefined;
197
192
  }
198
193
  function packedType(type) {
199
194
  switch (type) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-proto",
3
- "version": "2.7.6",
3
+ "version": "2.7.7",
4
4
  "description": "",
5
5
  "main": "build/src/plugin.js",
6
6
  "repository": "github:stephenh/ts-proto",