Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nestjs-support-non-ob…
Browse files Browse the repository at this point in the history
…serable
  • Loading branch information
alexkb committed Oct 23, 2023
2 parents 98e151f + d30ffa2 commit 5fec5c8
Show file tree
Hide file tree
Showing 348 changed files with 25,073 additions and 15,689 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -26,9 +26,9 @@ jobs:
run: yarn install
- name: Prepare Integration
run: ./integration/pbjs.sh
# This will fail if any git-tracked file has changed
- name: Codegen
run: yarn bin2ts
# This will fail if any git-tracked file has changed
- name: Diff Output
run: git status && git diff --exit-code
- name: test
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x
- name: Install
run: yarn install
- name: Build
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -21,7 +21,18 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: install dependencies
run: yarn install || echo "ignore failure"
run: yarn install
- name: Prepare Integration
run: ./integration/pbjs.sh
- name: Codegen
run: yarn bin2ts
# This will fail if any git-tracked file has changed
- name: Diff Output
run: git status && git diff --exit-code
- name: TypeScript
run: yarn tsc:check
env:
CI: true
- name: Prettier
run: yarn format:check
env:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.10.0
v20.8.0
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"printWidth": 120
}
"printWidth": 120,
"trailingComma": "all"
}
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

807 changes: 0 additions & 807 deletions .yarn/releases/yarn-3.3.0.cjs

This file was deleted.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.0.cjs

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

supportedArchitectures:
cpu:
Expand All @@ -16,4 +18,4 @@ supportedArchitectures:
- current
- linux

yarnPath: .yarn/releases/yarn-3.3.0.cjs
yarnPath: .yarn/releases/yarn-3.6.0.cjs
287 changes: 287 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,290 @@
## [1.162.1](https://github.com/stephenh/ts-proto/compare/v1.162.0...v1.162.1) (2023-10-13)


### Bug Fixes

* Simplify safe key handling. ([#950](https://github.com/stephenh/ts-proto/issues/950)) ([5e0e6ca](https://github.com/stephenh/ts-proto/commit/5e0e6ca1d76f5c9aaef5f40a9cc685538251a5f9))

# [1.162.0](https://github.com/stephenh/ts-proto/compare/v1.161.1...v1.162.0) (2023-10-13)


### Features

* support `json_name` defined in a proto file ([#943](https://github.com/stephenh/ts-proto/issues/943)) ([de989af](https://github.com/stephenh/ts-proto/commit/de989af0d9bf9910dc3c047a18d97f289bffe2ee))

## [1.161.1](https://github.com/stephenh/ts-proto/compare/v1.161.0...v1.161.1) (2023-10-10)


### Bug Fixes

* use optional chaining when both `forceLong=long` and `useOptionals=all` options are set in the generated fromTimestamp function ([#949](https://github.com/stephenh/ts-proto/issues/949)) ([b00db6f](https://github.com/stephenh/ts-proto/commit/b00db6fa42d511b9bef602a231a1f093664cd40c))

# [1.161.0](https://github.com/stephenh/ts-proto/compare/v1.160.0...v1.161.0) (2023-10-10)


### Features

* add unrecognizedEnumName and unrecognizedEnumValue options ([#946](https://github.com/stephenh/ts-proto/issues/946)) ([cd61e90](https://github.com/stephenh/ts-proto/commit/cd61e90e59844795fb5d7d86ec99bd37d2fdf21b))

# [1.160.0](https://github.com/stephenh/ts-proto/compare/v1.159.3...v1.160.0) (2023-10-05)


### Features

* add bigint input validation ([#938](https://github.com/stephenh/ts-proto/issues/938)) ([0f9b6b1](https://github.com/stephenh/ts-proto/commit/0f9b6b1c5982427f77b111466a11c18e57b070bd))

## [1.159.3](https://github.com/stephenh/ts-proto/compare/v1.159.2...v1.159.3) (2023-10-04)


### Bug Fixes

* toJSON methods don't respect useDate=false ([#935](https://github.com/stephenh/ts-proto/issues/935)) ([#937](https://github.com/stephenh/ts-proto/issues/937)) ([acdfb0a](https://github.com/stephenh/ts-proto/commit/acdfb0a100c9de1d51cb1710cc3fb40566d16706))

## [1.159.2](https://github.com/stephenh/ts-proto/compare/v1.159.1...v1.159.2) (2023-10-02)


### Bug Fixes

* Support using messages called String/Boolean/Number/Array ([#934](https://github.com/stephenh/ts-proto/issues/934)) ([f75159b](https://github.com/stephenh/ts-proto/commit/f75159bde85c8d85a2be938c6e3db78c77318890)), closes [#927](https://github.com/stephenh/ts-proto/issues/927)

## [1.159.1](https://github.com/stephenh/ts-proto/compare/v1.159.0...v1.159.1) (2023-09-30)


### Bug Fixes

* Use a Map when map keys are boolean. ([#933](https://github.com/stephenh/ts-proto/issues/933)) ([c1253a3](https://github.com/stephenh/ts-proto/commit/c1253a3761405d7a2ffe4d15f4c3ffb364697a02)), closes [#926](https://github.com/stephenh/ts-proto/issues/926)

# [1.159.0](https://github.com/stephenh/ts-proto/compare/v1.158.1...v1.159.0) (2023-09-30)


### Features

* Add globalThisPolyfill, defaults false. ([#931](https://github.com/stephenh/ts-proto/issues/931)) ([085fa21](https://github.com/stephenh/ts-proto/commit/085fa21603a74544af192f404289c2e62ecfd8f6))

## [1.158.1](https://github.com/stephenh/ts-proto/compare/v1.158.0...v1.158.1) (2023-09-30)


### Bug Fixes

* Use globalThis for Array/String/Boolean ([#930](https://github.com/stephenh/ts-proto/issues/930)) ([9a252c3](https://github.com/stephenh/ts-proto/commit/9a252c3d4cf988496f6de17cc378dbb09a1baf92))

# [1.158.0](https://github.com/stephenh/ts-proto/compare/v1.157.1...v1.158.0) (2023-09-24)


### Features

* adds support for emitting default scalar values in json ([#919](https://github.com/stephenh/ts-proto/issues/919)) ([01f529f](https://github.com/stephenh/ts-proto/commit/01f529f2b0eed486356ff6add9a43aabde3d1d0d))

## [1.157.1](https://github.com/stephenh/ts-proto/compare/v1.157.0...v1.157.1) (2023-09-18)


### Bug Fixes

* Update type imports syntax on gRPC generation ([#921](https://github.com/stephenh/ts-proto/issues/921)) ([b10ab31](https://github.com/stephenh/ts-proto/commit/b10ab31a479420413998840eab866ab51f72285d))

# [1.157.0](https://github.com/stephenh/ts-proto/compare/v1.156.8...v1.157.0) (2023-09-03)


### Features

* enum decoding ([#910](https://github.com/stephenh/ts-proto/issues/910)) ([9e0a0b5](https://github.com/stephenh/ts-proto/commit/9e0a0b5c86004313f65eae88b8dc5e63deaaf251)), closes [ts-proto-#859](https://github.com/ts-proto-/issues/859) [ts-proto#859](https://github.com/ts-proto/issues/859) [ts-proto#859](https://github.com/ts-proto/issues/859) [ts-proto-#859](https://github.com/ts-proto-/issues/859) [#909](https://github.com/stephenh/ts-proto/issues/909)

## [1.156.8](https://github.com/stephenh/ts-proto/compare/v1.156.7...v1.156.8) (2023-09-03)


### Bug Fixes

* fixing exportCommonSymbols in nestjs ([#916](https://github.com/stephenh/ts-proto/issues/916)) ([daf41f7](https://github.com/stephenh/ts-proto/commit/daf41f7c2654e801994c0791fb3f9f178b5d8ad8))

## [1.156.7](https://github.com/stephenh/ts-proto/compare/v1.156.6...v1.156.7) (2023-08-18)


### Bug Fixes

* always use Map for int64 keys ([#708](https://github.com/stephenh/ts-proto/issues/708)) ([#905](https://github.com/stephenh/ts-proto/issues/905)) ([cf2fb59](https://github.com/stephenh/ts-proto/commit/cf2fb59de20f8a60ead23294439dacbdbe6dfc14))

## [1.156.6](https://github.com/stephenh/ts-proto/compare/v1.156.5...v1.156.6) (2023-08-16)


### Bug Fixes

* use correct imports for optional fields ([#904](https://github.com/stephenh/ts-proto/issues/904)) ([fa13ec7](https://github.com/stephenh/ts-proto/commit/fa13ec752c6564af045081548f5fc5cabb687151))

## [1.156.5](https://github.com/stephenh/ts-proto/compare/v1.156.4...v1.156.5) (2023-08-15)


### Bug Fixes

* remove-enum-prefix for nested enums ([#903](https://github.com/stephenh/ts-proto/issues/903)) ([efdbf47](https://github.com/stephenh/ts-proto/commit/efdbf476b26c49c1bc56f9404f49667f2acc1f8b))

## [1.156.4](https://github.com/stephenh/ts-proto/compare/v1.156.3...v1.156.4) (2023-08-15)


### Bug Fixes

* enum default value when remove-enum-prefix and string-enum both on ([#902](https://github.com/stephenh/ts-proto/issues/902)) ([594b137](https://github.com/stephenh/ts-proto/commit/594b137cdffbf6256b9d0ee6bb82822ce22c7b94))

## [1.156.3](https://github.com/stephenh/ts-proto/compare/v1.156.2...v1.156.3) (2023-08-13)


### Bug Fixes

* Only check file dependencies once/file. ([#901](https://github.com/stephenh/ts-proto/issues/901)) ([8d61980](https://github.com/stephenh/ts-proto/commit/8d6198020a5ec775b0dbaf7e08924f4bdcc677f8)), closes [#900](https://github.com/stephenh/ts-proto/issues/900)

## [1.156.2](https://github.com/stephenh/ts-proto/compare/v1.156.1...v1.156.2) (2023-07-29)


### Bug Fixes

* Add 'as any' in create ([#895](https://github.com/stephenh/ts-proto/issues/895)) ([4214d5a](https://github.com/stephenh/ts-proto/commit/4214d5af98817f317760298b1b2e03a8e956329c)), closes [#838](https://github.com/stephenh/ts-proto/issues/838)

## [1.156.1](https://github.com/stephenh/ts-proto/compare/v1.156.0...v1.156.1) (2023-07-22)


### Bug Fixes

* Depend specifically on long 5.2.3. ([#892](https://github.com/stephenh/ts-proto/issues/892)) ([2b976f2](https://github.com/stephenh/ts-proto/commit/2b976f295fc1fbab6d0fb5ad86cfad26ed722c8a))

# [1.156.0](https://github.com/stephenh/ts-proto/compare/v1.155.1...v1.156.0) (2023-07-20)


### Features

* **ts-proto-#859:** added encode-only options to toJSON methods ([#886](https://github.com/stephenh/ts-proto/issues/886)) ([d0cf57d](https://github.com/stephenh/ts-proto/commit/d0cf57d9a1aebdec3bec67585658362b1a38d6a3)), closes [ts-proto-#859](https://github.com/ts-proto-/issues/859) [ts-proto-#859](https://github.com/ts-proto-/issues/859) [ts-proto#859](https://github.com/ts-proto/issues/859) [ts-proto#859](https://github.com/ts-proto/issues/859) [ts-proto-#859](https://github.com/ts-proto-/issues/859)

## [1.155.1](https://github.com/stephenh/ts-proto/compare/v1.155.0...v1.155.1) (2023-07-15)


### Bug Fixes

* Bump descriptors. ([#883](https://github.com/stephenh/ts-proto/issues/883)) ([e2cf184](https://github.com/stephenh/ts-proto/commit/e2cf1848c1c70a8bbe73756e1cf530c5d70f5ce2))

# [1.155.0](https://github.com/stephenh/ts-proto/compare/v1.154.0...v1.155.0) (2023-07-15)


### Features

* Upgrade to long 5.0.0. ([#882](https://github.com/stephenh/ts-proto/issues/882)) ([4c1e7a6](https://github.com/stephenh/ts-proto/commit/4c1e7a6e02f974f193063a83ce7a472b14f2d2d0))

# [1.154.0](https://github.com/stephenh/ts-proto/compare/v1.153.3...v1.154.0) (2023-07-15)


### Features

* Normalize `toJSON` output by omitting fields set to their default values ([#878](https://github.com/stephenh/ts-proto/issues/878)) ([50958d6](https://github.com/stephenh/ts-proto/commit/50958d639435a32a76d59fc57565e3677f5be39e))

## [1.153.3](https://github.com/stephenh/ts-proto/compare/v1.153.2...v1.153.3) (2023-07-13)


### Bug Fixes

* Bump ts-proto-descriptors w/long back. ([#880](https://github.com/stephenh/ts-proto/issues/880)) ([d27e19c](https://github.com/stephenh/ts-proto/commit/d27e19c84420d46dff0fc1914ce724ec15f86185))

## [1.153.2](https://github.com/stephenh/ts-proto/compare/v1.153.1...v1.153.2) (2023-07-12)


### Bug Fixes

* Move dataloader to a devDependency. ([#877](https://github.com/stephenh/ts-proto/issues/877)) ([dbe1a96](https://github.com/stephenh/ts-proto/commit/dbe1a967ced7863492f82a977d6e5d34f4f034a6))

## [1.153.1](https://github.com/stephenh/ts-proto/compare/v1.153.0...v1.153.1) (2023-07-12)


### Bug Fixes

* Bump ts-proto-descriptors. ([#876](https://github.com/stephenh/ts-proto/issues/876)) ([ad57819](https://github.com/stephenh/ts-proto/commit/ad57819a16b5f3886bde3c8f63231dc70f84d250))

# [1.153.0](https://github.com/stephenh/ts-proto/compare/v1.152.1...v1.153.0) (2023-07-12)


### Features

* Update protobufjs (and peer dependencies) to ^7 ([#874](https://github.com/stephenh/ts-proto/issues/874)) ([7f979a7](https://github.com/stephenh/ts-proto/commit/7f979a70af2e42c8c429ae5f65787e0b43ccb706))

## [1.152.1](https://github.com/stephenh/ts-proto/compare/v1.152.0...v1.152.1) (2023-07-10)


### Bug Fixes

* Fix invocation error. ([f4e26bd](https://github.com/stephenh/ts-proto/commit/f4e26bd44f6882318defab1fccd0d6a833823fc0))

# [1.152.0](https://github.com/stephenh/ts-proto/compare/v1.151.1...v1.152.0) (2023-07-10)


### Features

* Ensure strict(er) TS compliance for the generated code ([#868](https://github.com/stephenh/ts-proto/issues/868)) ([1405d4b](https://github.com/stephenh/ts-proto/commit/1405d4bcc866343605946ac4a0b30e7de9c75e71))

## [1.151.1](https://github.com/stephenh/ts-proto/compare/v1.151.0...v1.151.1) (2023-07-05)


### Bug Fixes

* generate different MessageType when using static-only ([#863](https://github.com/stephenh/ts-proto/issues/863)) ([477e5f5](https://github.com/stephenh/ts-proto/commit/477e5f5bc0aaf70a92d7231f4a9e746d13b2bbcf)), closes [#861](https://github.com/stephenh/ts-proto/issues/861)

# [1.151.0](https://github.com/stephenh/ts-proto/compare/v1.150.1...v1.151.0) (2023-07-04)


### Features

* Add static-only variant to to outputTypeAnnotations option ([#858](https://github.com/stephenh/ts-proto/issues/858)) ([d7c4af7](https://github.com/stephenh/ts-proto/commit/d7c4af7e068200b30cf773703ef906595aec6042))

## [1.150.1](https://github.com/stephenh/ts-proto/compare/v1.150.0...v1.150.1) (2023-06-23)


### Bug Fixes

* don't generate transitively imported files for mapped imports ([#854](https://github.com/stephenh/ts-proto/issues/854)) ([edd9044](https://github.com/stephenh/ts-proto/commit/edd9044568739b089f1ec66b53d0cc36d540610b))

# [1.150.0](https://github.com/stephenh/ts-proto/compare/v1.149.0...v1.150.0) (2023-06-20)


### Features

* expose service name as a separate exported constant ([#851](https://github.com/stephenh/ts-proto/issues/851)) ([84a4ed6](https://github.com/stephenh/ts-proto/commit/84a4ed610089363e3ee7a6a29581d8e0ef695f0d))

# [1.149.0](https://github.com/stephenh/ts-proto/compare/v1.148.2...v1.149.0) (2023-06-13)


### Features

* support lib: es6 ([#850](https://github.com/stephenh/ts-proto/issues/850)) ([6280677](https://github.com/stephenh/ts-proto/commit/62806776beacb1e2b0ee921e4212f1e61ce5191e))

## [1.148.2](https://github.com/stephenh/ts-proto/compare/v1.148.1...v1.148.2) (2023-06-04)


### Bug Fixes

* esModuleInterop not working for object-hash and dataloader imports ([#794](https://github.com/stephenh/ts-proto/issues/794)) ([9fc9632](https://github.com/stephenh/ts-proto/commit/9fc9632e03a18f7a2d6e95a72ff959be93199981))

## [1.148.1](https://github.com/stephenh/ts-proto/compare/v1.148.0...v1.148.1) (2023-05-25)


### Bug Fixes

* add callback close condition ([#837](https://github.com/stephenh/ts-proto/issues/837)) ([2071c67](https://github.com/stephenh/ts-proto/commit/2071c67650a3ac80ec9b5845fec3227ee47841d0))

# [1.148.0](https://github.com/stephenh/ts-proto/compare/v1.147.3...v1.148.0) (2023-05-23)


### Features

* Generate Index Files ([#821](https://github.com/stephenh/ts-proto/issues/821)) ([85bf206](https://github.com/stephenh/ts-proto/commit/85bf206ca8c1052849aea3e39522ad4918e0d736))

## [1.147.3](https://github.com/stephenh/ts-proto/compare/v1.147.2...v1.147.3) (2023-05-16)


### Bug Fixes

* ensure generated fromTimestamp works when useOptionals=all ([#832](https://github.com/stephenh/ts-proto/issues/832)) ([1f82445](https://github.com/stephenh/ts-proto/commit/1f8244569de87ad99ed3676244e51291af9b3323))

## [1.147.2](https://github.com/stephenh/ts-proto/compare/v1.147.1...v1.147.2) (2023-05-07)


### Bug Fixes

* import Observable as a type ([#826](https://github.com/stephenh/ts-proto/issues/826)) ([52e84ba](https://github.com/stephenh/ts-proto/commit/52e84ba7ee8826cf3b33455b38bacfd0c68884ea))

## [1.147.1](https://github.com/stephenh/ts-proto/compare/v1.147.0...v1.147.1) (2023-05-02)


Expand Down
2 changes: 2 additions & 0 deletions NESTJS.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ export class AppService implements OnModuleInit {
(Requires `nestJs=true`.)

- With `--ts_proto_opt=nestJs=true`, the defaults will change to generate [NestJS protobuf](https://docs.nestjs.com/microservices/grpc) friendly types & service interfaces that can be used in both the client-side and server-side of NestJS protobuf implementations.

- With `--ts_proto_opt=exportCommonSymbols=false`, the plugin will not generate the export with the specified package name.
Loading

0 comments on commit 5fec5c8

Please sign in to comment.