ts-proto 1.97.2 → 1.98.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.98.0](https://github.com/stephenh/ts-proto/compare/v1.97.2...v1.98.0) (2022-01-06)
2
+
3
+
4
+ ### Features
5
+
6
+ * watch for changed integration test files ([#464](https://github.com/stephenh/ts-proto/issues/464)) ([988cd7e](https://github.com/stephenh/ts-proto/commit/988cd7eb84bc3b8b72d6b4d59c38aa794c16c638))
7
+
1
8
  ## [1.97.2](https://github.com/stephenh/ts-proto/compare/v1.97.1...v1.97.2) (2022-01-06)
2
9
 
3
10
 
package/README.markdown CHANGED
@@ -404,11 +404,13 @@ The commands below assume you have **Docker** installed. To use a **local** copy
404
404
  **Workflow**
405
405
 
406
406
  - Modifying the plugin implementation:
407
+ - The most important logic is found in [src/main.ts](src/main.ts).
407
408
  - Run `yarn bin2ts` or `yarn bin2ts:local`.
408
409
  _Since the proto files were not changed, you only need to regenerate the typescript files._
409
410
  - Run `yarn test` to verify the typescript files are compatible with the reference implementation, and pass other tests.
410
411
  - Updating or adding `.proto` files in the integration directory:
411
- - Run `yarn build:test` to regenerate the integration test files.
412
+ - Run `yarn watch` to automatically regenerate test files when proto files change.
413
+ - Or run `yarn build:test` to regenerate all integration test files.
412
414
  - Run `yarn test` to retest.
413
415
 
414
416
  **Contributing**
package/build/main.js CHANGED
@@ -814,7 +814,6 @@ function generateEncode(ctx, fullName, messageDesc) {
814
814
  function generateFromJson(ctx, fullName, messageDesc) {
815
815
  const { options, utils, typeMap } = ctx;
816
816
  const chunks = [];
817
- const choiceFieldChunks = [];
818
817
  // create the basic function declaration
819
818
  chunks.push(ts_poet_1.code `
820
819
  fromJSON(${messageDesc.field.length > 0 ? 'object' : '_'}: any): ${fullName} {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-proto",
3
- "version": "1.97.2",
3
+ "version": "1.98.0",
4
4
  "description": "",
5
5
  "main": "build/plugin.js",
6
6
  "repository": "github:stephenh/ts-proto",
@@ -21,7 +21,8 @@
21
21
  "test": "yarn jest -c jest.config.js --maxWorkers=2",
22
22
  "prettier": "prettier --write {src,tests}/**/*.ts",
23
23
  "prettier:check": "prettier --list-different {src,tests}/**/*.ts",
24
- "setup:docker": "docker-compose build"
24
+ "setup:docker": "docker-compose build",
25
+ "watch": "ts-node integration/watch.ts"
25
26
  },
26
27
  "files": [
27
28
  "build"
@@ -45,6 +46,7 @@
45
46
  "@semantic-release/release-notes-generator": "^9.0.2",
46
47
  "@types/jest": "^26.0.22",
47
48
  "@types/node": "^14.14.37",
49
+ "chokidar": "^3.5.2",
48
50
  "jest": "^26.6.3",
49
51
  "prettier": "^2.2.1",
50
52
  "reflect-metadata": "^0.1.13",