ts-proto 2.0.1 → 2.0.2

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/README.markdown CHANGED
@@ -5,6 +5,26 @@
5
5
 
6
6
  > `ts-proto` transforms your `.proto` files into strongly-typed, idiomatic TypeScript files!
7
7
 
8
+ ## ts-proto 2.x Release Notes
9
+
10
+ The 2.x release of ts-proto migrated the low-level Protobuf serializing that its `encode` and `decode` method use from the venerable, but aging & stagnant, `protobufjs` package to `@bufbuild/protobuf`.
11
+
12
+ If you only used the `encode` and `decode` methods, this should largely be a non-breaking change.
13
+
14
+ However, if you used any code that used the old `protobufjs` `Writer` or `Reader` classes, you'll need to update your code to use the new `@bufbuild/protobuf` classes:
15
+
16
+ ```
17
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
18
+ ```
19
+
20
+ If migrating to `@bufbuild/protobuf` is a blocker for you, you can pin your `ts-proto` version to `1.x`.
21
+
22
+ **Disclaimer & apology:** I had intended to release ts-proto 2.x as an alpha release, but didn't get the semantic-release config correct, and so ts-proto 2.x was published as a major release without a proper alpha/beta cycle.
23
+
24
+ If you could file reports (or better PRs!) for any issues you come across while the release is still fresh, that would be greatly appreciated.
25
+
26
+ Any tips or tricks for others on the migration would also be appreciated!
27
+
8
28
  ## Table of contents
9
29
 
10
30
  - [ts-proto](#ts-proto)
@@ -293,7 +293,7 @@ async function getVersions(request) {
293
293
  const { major, minor, patch } = request.compilerVersion;
294
294
  protocVersion = `v${major}.${minor}.${patch}`;
295
295
  }
296
- const path = "../package.json";
296
+ const path = "../../package.json";
297
297
  const packageJson = await Promise.resolve(`${path}`).then(s => require(s));
298
298
  const tsProtoVersion = `v${packageJson?.version ?? "unknown"}`;
299
299
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-proto",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "",
5
5
  "main": "build/src/plugin.js",
6
6
  "repository": "github:stephenh/ts-proto",