ts-proto 2.11.5 → 2.11.6

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.
package/build/src/main.js CHANGED
@@ -422,7 +422,7 @@ function makeByteUtils(options) {
422
422
  default:
423
423
  return (0, ts_poet_1.code) `
424
424
  if ((${globalThis} as any).Buffer) {
425
- ${bytesFromBase64NodeSnippet}
425
+ return Uint8Array.from((${globalThis} as any).Buffer.from(b64, 'base64'));
426
426
  } else {
427
427
  ${bytesFromBase64BrowserSnippet}
428
428
  }
@@ -453,7 +453,7 @@ function makeByteUtils(options) {
453
453
  default:
454
454
  return (0, ts_poet_1.code) `
455
455
  if ((${globalThis} as any).Buffer) {
456
- ${base64FromBytesNodeSnippet}
456
+ return (${globalThis} as any).Buffer.from(arr).toString('base64');
457
457
  } else {
458
458
  ${base64FromBytesBrowserSnippet}
459
459
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-proto",
3
- "version": "2.11.5",
3
+ "version": "2.11.6",
4
4
  "description": "",
5
5
  "main": "build/src/plugin.js",
6
6
  "repository": "github:stephenh/ts-proto",