Releases: temporalio/sdk-typescript
1.4.3
Bug Fixes
- [
nyc-test-coverage
] Delay checking for coverage until helpers run because coverage is undefined when Jest
starts (#910) - [
worker
] Avoid a race in shutdown hooks (#918) - [
core
] Ignore cancels of StartFailed state in child workflows, see: temporalio/sdk-core#413
1.3.1
1.4.2
1.4.1
Bug Fixes
-
[
client
] Handle test server empty history when waiting for workflow result
(#902) -
[
common
] Export and deprecate error helpers (#901)Fixes a breaking change accidentally introduces in 1.4.0 where some rarely used utility functions were deleted.
Miscellaneous Tasks
-
Improve regex for extracting source map (#899)
Addresses reported issue by userr where regex caused
RangeError: Maximum call stack size exceeded
when parsing their
workflow bundle.
1.4.0
Features
-
💥 Make client gRPC retry more configurable (#879)
BREAKING CHANGE:
GrpcRetryOptions.retryableDecider
now gets theattempt
number as the first argument. This is an advanced/rare option, and the change should be caught at compile time.Also adds
BackoffOptions
anddefaultGrpcRetryOptions
.NOTE: This feature is experimental and its API may change.
-
[
client
] Delete search attributes with empty array values in describe() response (#878)⚠️ This fixes a bug where empty/deleted Custom Search Attributes were returned as[]
fromworkflowHandle.describe()
. Such attribute properties will no longer be present in theWorkflowExecutionDescription.searchAttributes
object. Note that this behavior is consistent with what you'll see if using a pre-1.4 version of the SDK with Server version 1.18. -
Add support for custom failure converters (#887)
Adds
DataConverter.failureConverterPath
andFailureConverter
, which converts from proto Failure instances to JS Errors and back.We recommended going with the default (i.e. not using the
failureConverterPath
option) in order to maintain cross-language Failure serialization compatibility.NOTE: This feature is experimental and its API may change.
-
[
workflow
] AddworkflowInfo().unsafe.now()
(#882)It returns the current system time in milliseconds. The safe version of time is
new Date()
andDate.now()
, which are set on the first invocation of a Workflow Task and stay constant for the duration of the Task and during replay. -
Upgrade core, add support for OTEL metric temporality (#891)
- Upgraded otel and other deps (temporalio/sdk-core#402)
- Fix incorrect string names for polling methods (temporalio/sdk-core#401)
Miscellaneous Tasks
-
Remove
internal-*
packages (#881)⚠️ Any imports from@temporalio/internal-*
need to be updated. As noted in their named and READMEs, they're not meant to be used to directly, so we don't imagine this is a common case. However, if you do find instances, they should be changed to importing from:@temporalio/internal-non-workflow-common ➡️ @temporalio/common/lib/internal-non-workflow @temporalio/internal-workflow-common ➡️ @temporalio/common
-
[
common
] Deprecate internal functions that should have never been exported (#893)Some time-related and binary conversion internal helper functions were exported from
@temporalio/common
. They are now deprecated and hidden from the API reference, as they're meant for internal use only. -
[
workflow
] ExportLoggerSinks
from@temporalio/workflow
(#889) -
[
client
] Add max retry interval for client (#883) -
Label grpc-retry API as experimental (#891)
-
Make the failure-converter code symmetric (#891)
Bug Fixes
1.3.0
Bug Fixes
-
💥 Various bug fixes (#873)
BREAKING CHANGE: Makes
WorkflowExecutionDescription.historyLength
a number. This was aLong
before, but shouldn't
have been. If you're currently calling:(await workflowHandle.describe()).historyLength.toNumber();
then remove the
.toNumber()
call.This PR also included:
- Make
protobufjs
a dev dependency of@temporalio/client
- Use simple version of Core's
cancelChildWorkflowExecution
command
- Make
-
💥 Update Core from
e261
tob437
(#865 and #873)BREAKING CHANGE: This fixes a bug where values (memo, search attributes, and retry policy) were not being passed on to
the next Run during Continue-As-New. Now they are, unless you specify different values when calling
continueAsNew
(temporalio/sdk-core#376). [We believe this is unlikely to break
users code—the code would have to be depending on the absence of these values in Continued-As-New Runs.]This update also have various fixes and features:
- Don't dispatch eager activity if task queue is not the "current" (temporalio/sdk-core#397)
- Fix cancelling of started-but-lang-doesn't-know workflows (temporalio/sdk-core#379)
- Protect worker from more network errors (temporalio/sdk-core#396)
- Use tokio-rustls for request (temporalio/sdk-core#395)
- Fix for ephemeral test server zombie (temporalio/sdk-core#392)
- Ephemeral server lazy-downloader and runner (temporalio/sdk-core#389)
- Fix health service getter (temporalio/sdk-core#387)
- Expose HealthService (temporalio/sdk-core#386)
- Add more missing workflow options and add request_id as parameter for some calls (temporalio/sdk-core#365)
- Correct API definition link (temporalio/sdk-core#381)
- Add grpc health checking service/fns to client (temporalio/sdk-core#377)
- Respect per-call gRPC headers (temporalio/sdk-core#375)
- More client refactoring & add versioning-opt-in config flag (temporalio/sdk-core#374)
- Publicly expose the new client traits (temporalio/sdk-core#371)
- Add Test Server client & update deps (temporalio/sdk-core#370)
- Added test confirming act. w/o heartbeats times out (temporalio/sdk-core#369)
- Add Operator API machinery to client (temporalio/sdk-core#366)
-
[
client
] Only requiresignalArgs
insignalWithStart
when needed (#847)
Features
-
💥 Improvements to
@temporalio/testing
(#865 and #873)BREAKING CHANGE: Breaking for the testing package in some of the more advanced and rarely used options:
- No longer accepting
runInNormalTime
when waiting for workflow result TestWorkflowEnvironmentOptions
is completely redone
[Given that these were rarely used and the testing package isn't meant for production use, we don't think this change warrants a major version bump.]
TestWorkflowEnvironment.create
is deprecated in favor of: - No longer accepting
-
Various minor features (#865)
- Add
Connection.healthService
and generate testservice and health in proto package - Updated ci to use sdk-ci namespace for testing with cloud.
- Use ephemeral server from Core (supports both time skipping and temporalite)
- Test server is now only downloaded on first use
- Removed some unused dependencies
- Refactored core bridge into multiple files
- Closes #834
- Closes #844
- Add
-
[
client
] Add a high-level metaClient
class (#870)We now recommend using this instead of our other clients:
import { Client } from '@temporalio/client'; const client = new Client(options); await client.workflow.start(); await client.activity.heartbeat(); await client.activity.complete();
client.workflow
is aWorkflowClient
.client.activity
is anAsyncCompletionClient
.- We will be adding
client.schedule.*
(see theScheduleClient
proposal).
-
Add
ActivityOptions.allowEagerDispatch
(default true) (#873) -
[
testing
] Usetemporal.download
for downloading test server (#864) -
Add Webpack rule to auto instrument Workflows for code coverage, add
augmentWorkerOptions()
(#858, thanks to@vkarpov15
🙏)
Documentation
- Improve API reference (#871)
- Publish unchanged packages (#862)
- Update
nyc-test-coverage
README (#866)
Miscellaneous Tasks
1.2.0
1.1.0
Bug Fixes
-
💥 [
worker
] Remove unnecessaryReplayWorkerOptions
(#816)BREAKING CHANGE: While this is technically breaking (if you pass options that are irrelevant to replay like
maxActivitiesPerSecond
, you'll get a compilation error), we decided it did not warrant a major version bump, as it doesn't affect production code (replay is a testing feature) and is only a type change (is caught at compile type by TS users and doesn't affect JS users). -
Warn instead of throwing when getting
workflowBundle
withworkflowsPath
andbundlerOptions
(#833)⚠️ NOTE: We now prefer takingworkflowBundle
overworkflowsPath
when both are provided, which is the correct behavior and what users should expect.We also now warn that workflow interceptors are ignored when using
workflowBundle
. -
[
workflow
] Make breakpoints work inside workflow isolate context (#819)⚠️ NOTE: Bundles created withbundleWorkflowCode
should only be used for callingWorker.create
when the exact same version of@temporalio/worker
is used. (If you don't pin to exact versions in yourpackage.json
, then you should use a lockfile, and both the machine that runsbundleWorkflowCode
andWorker.create
should runnpm ci
, notnpm install
.)⚠️ DEPRECATION:sourceMap
andsourceMapPath
are now deprecated. We've inlined source maps, so now this works:const { code } = await bundleWorkflowCode({ workflowsPath }); const worker = await Worker.create({ workflowBundle: { code }, ...otherOptions });
-
Avoid using dynamic import in
@temporalio/testing
(#805) -
[
worker
] Don't start activity poller if no activities registered (#808) -
Update
proto3-json-serializer
to^1.0.3
(#809) -
Add
@types/long
to client (#735) -
[
worker
] Improve worker default options heuristics (#802) -
Use
GITHUB_TOKEN
increate-project
for CI (#721)
Features
-
💥 [
worker
] Add webpack configuration, closes #537 (#815)This was our most-upvoted feature request! (9 👍's.) See
WorkerOptions.bundlerOptions.webpackConfigHook
for usage.BREAKING CHANGE: If you provide both
workflowBundle
&workflowsPath
or bothworkflowBundle
&bundlerOptions
toWorker.create
, aValueError
will now be thrown. While this is technically breaking, TODO -
Add
@temporalio/nyc-test-coverage
package (#798, thanks to@vkarpov15
🙏)This package adds code coverage for Istanbul. It's currently in beta: the API may be unstable as we gather feedback on it from users. To try it out, see this code snippet for current usage.
-
[
common
] ImproveApplicationFailure
arguments; add.create
and.fromError
(#767)See
ApplicationFailure.create
andApplicationFailure.fromError
-
Expose additional console methods to workflow context (#831)
console.[error|warn|info|debug]
can now be called from Workflow code, in addition toconsole.log
Documentation
1.0.1
Bug Fixes
- Allow
RetryPolicy.maximumAttempts: Number.POSITIVE_INFINITY
(#784) - [
worker
] Prevent ending a worker span twice. (#786) - Update Core SDK (#790)
- Turn down log level for this line (#362)
- Fix bug where LA resolutions could trigger activations with no associated WFT (#357)
- Don't allow activity completions with unset successful result payloads (#356)
- Make sure workers do not propagate retryable errors as fatal (#353)
- Fix null LA results becoming unparseable (#355)
Documentation
Features
- [
workflow
] List registered queries in error response when a query is not found (#791)
Miscellaneous Tasks
1.0.0
Bug Fixes
- [
worker
] Updateterser
, fixes #759 (#760) - Reference local version of
ActivityCancellationType
(#768)
Documentation
Refactor
-
💥 [
workflow
] MoveTaskInfo
toWorkflowInfo
(#761)BREAKING CHANGE: There is no longer a
taskInfo()
export from@temporalio/workflow
.taskInfo().*
fields have been moved toworkflowInfo()
. -
💥 Update
activity
andworker
exports (#764)BREAKING CHANGE: If you were importing any of the following errors from
@temporalio/activity
(unlikely), instead import from@temporalio/common
:ValueError, PayloadConverterError, IllegalStateError, WorkflowExecutionAlreadyStartedError, WorkflowNotFoundError