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
workflowBundlewithworkflowsPathandbundlerOptions(#833)⚠️ NOTE: We now prefer taking
workflowBundleoverworkflowsPathwhen 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 with
bundleWorkflowCodeshould only be used for callingWorker.createwhen the exact same version of@temporalio/workeris used. (If you don't pin to exact versions in yourpackage.json, then you should use a lockfile, and both the machine that runsbundleWorkflowCodeandWorker.createshould runnpm ci, notnpm install.)⚠️ DEPRECATION:
sourceMapandsourceMapPathare 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-serializerto^1.0.3(#809) -
Add
@types/longto client (#735) -
[
worker] Improve worker default options heuristics (#802) -
Use
GITHUB_TOKENincreate-projectfor CI (#721)
Features
-
💥 [
worker] Add webpack configuration, closes #537 (#815)This was our most-upvoted feature request! (9 👍's.) See
WorkerOptions.bundlerOptions.webpackConfigHookfor usage.BREAKING CHANGE: If you provide both
workflowBundle&workflowsPathor bothworkflowBundle&bundlerOptionstoWorker.create, aValueErrorwill now be thrown. While this is technically breaking, TODO -
Add
@temporalio/nyc-test-coveragepackage (#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] ImproveApplicationFailurearguments; add.createand.fromError(#767)See
ApplicationFailure.createandApplicationFailure.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