sdk-typescript
sdk-typescript copied to clipboard
fix(common): preserve zero optional durations
What changed
Updated msOptionalToTs to treat only null and undefined as absent values, so a numeric 0 duration is preserved and converted to a zero protobuf timestamp.
Added a unit test covering msOptionalToTs(0).
Fixes #2233.
Validation
npx --yes [email protected] --filter @temporalio/proto buildnpx --yes [email protected] --filter @temporalio/common buildnpx --yes [email protected] --filter @temporalio/common testnpx --yes [email protected] exec eslint packages/common/src/time.ts packages/common/src/__tests__/test-time.tsnpx --yes [email protected] prettier --check packages/common/src/time.ts packages/common/src/__tests__/test-time.ts
@sidsri14 May you please sign the CLA?
I can't have a look at your contribution until the CLA is cleared.