Repository: Azure/azure-functions-durable-js
Pull request #193 (2020-06-05 02:44:15)

Bump jquery from 3.4.1 to 3.5.1
Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/jquery/jquery/releases">jquery's releases</a>.</em></p>
<blockquote>
<h2>jQuery 3.5.0 Released!</h2>
<p>See the blog post:
<a href="https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/">https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/</a>
and the upgrade guide:
<a href="https://jquery.com/upgrade-guide/3.5/">https://jquery.com/upgrade-guide/3.5/</a></p>
<p><strong>NOTE:</strong> Despite being a minor release, this update includes a breaking change that we had to make to fix <a href="https://github.com/advisories/GHSA-gxr4-xjj5-5px2">a security issue</a> ( <a href="https://nvd.nist.gov/vuln/detail/CVE-2020-11022"><code>CVE-2020-11022</code></a>). Please follow the blog post &amp; the upgrade guide for more details.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/jquery/jquery/commit/e1cffdef277fcf543833a20d28cbadcd000ebece"><code>e1cffde</code></a> 3.5.1</li>
<li><a href="https://github.com/jquery/jquery/commit/7d2ce691cdbd53956f5eeab2048a13efd372277c"><code>7d2ce69</code></a> Release: update AUTHORS.txt</li>
<li><a href="https://github.com/jquery/jquery/commit/ea2d0d50c06e8d77ea3fdfa32fa0bfe6f91418d2"><code>ea2d0d5</code></a> Tests: Workaround failures in recent XSS tests in iOS 8 - 12</li>
<li><a href="https://github.com/jquery/jquery/commit/ea3766c08156541617ca3d15755a9ade8fdedcc0"><code>ea3766c</code></a> Docs: Fix typos</li>
<li><a href="https://github.com/jquery/jquery/commit/58a8e87979d68f001de9e52c00601b805bab303d"><code>58a8e87</code></a> Tests: Add tests for recently fixed manipulation XSS issues</li>
<li><a href="https://github.com/jquery/jquery/commit/c1c0598d8fde1bb66a257d7e993dd940aa4f4ce7"><code>c1c0598</code></a> Tests: Cleanup <code>window</code> &amp; <code>document</code> handlers in a new event test</li>
<li><a href="https://github.com/jquery/jquery/commit/46ba70c5e82cf55965ffe8825ec9247066a01ddd"><code>46ba70c</code></a> Tests: Fix flakiness in the &quot;jQuery.ajax() - JSONP - Same Domain&quot; test</li>
<li><a href="https://github.com/jquery/jquery/commit/f7fed7eec235fe6e1f55c5ad9c7193a507bf5713"><code>f7fed7e</code></a> Docs: Update the link to the jsdom repository</li>
<li><a href="https://github.com/jquery/jquery/commit/205dd134b93c42d53e19078846a972f33fc9d8eb"><code>205dd13</code></a> Build: Test on Node.js 14, stop testing on Node.js 8 &amp; 13</li>
<li><a href="https://github.com/jquery/jquery/commit/b21d6710cf2d9e227396fe8d78b262dfeb8b3c28"><code>b21d671</code></a> Build: Enable reportUnusedDisableDirectives in ESLint</li>
<li>Additional commits viewable in <a href="https://github.com/jquery/jquery/compare/3.4.1...3.5.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jquery&package-manager=npm_and_yarn&previous-version=3.4.1&new-version=3.5.1)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Azure/azure-functions-durable-js/network/alerts).

</details>


Patch:
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..8f8c074
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,3 @@
+node_modules/**
+lib/**
+samples/node_modules/**
diff --git a/.eslintrc b/.eslintrc
index df46e0f..97d2281 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,9 +1,21 @@
-{
-    "parser": "@typescript-eslint/parser",
-    "extends": ["plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint", "plugin:prettier/recommended"],
-    "rules": {
-        "@typescript-eslint/no-use-before-define": "off",
-        "@typescript-eslint/no-explicit-any": "off",
-        "@typescript-eslint/interface-name-prefix": "off"
-    }
-}
+{
+    "parser": "@typescript-eslint/parser",
+    "extends": [
+        "plugin:@typescript-eslint/recommended",
+        "prettier/@typescript-eslint",
+        "plugin:prettier/recommended"
+    ],
+    "rules": {
+        "@typescript-eslint/no-use-before-define": "off",
+        "@typescript-eslint/no-explicit-any": "off",
+        "@typescript-eslint/interface-name-prefix": "off"
+    },
+    "overrides": [
+        {
+            "files": ["*.js"],
+            "rules": {
+                "@typescript-eslint/no-var-requires": "off"
+            }
+        }
+    ]
+}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f81ff75..5b9b1b6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -45,13 +45,13 @@ Create a folder say AzureWebJobsStorage
 `azurite -l ./AzureWebJobsStorage`
 
 ```
- _______                   _             
-(_______)                 (_)  _         
- _______ _____ _   _  ____ _ _| |_ _____ 
+ _______                   _
+(_______)                 (_)  _
+ _______ _____ _   _  ____ _ _| |_ _____
 |  ___  (___  ) | | |/ ___) (_   _) ___ |
 | |   | |/ __/| |_| | |   | | | |_| ____|
 |_|   |_(_____)____/|_|   |_| \__)_____)
-                                         
+
 Azurite, Version 2.7.1
 A lightweight server clone of Azure Storage
 
@@ -99,10 +99,17 @@ Two changes are necessary in your JavaScript sample code to make this work.
 
 - Create an `extensions.csproj` file containing the version of the DurableTask extension that you wish to use. We recommend using the latest version on [nuget.org](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/). To do this, take the sample `extensions.csproj` shown below, update the version of the `Microsoft.Azure.WebJobs.Extensions.DurableTask` dependency, and save it at the root of your sample.
 
-```xml <ItemGroup>
-    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.2.0" />
-    <PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.0" />
+```xml
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>netstandard2.0</TargetFramework>
+  <WarningsAsErrors></WarningsAsErrors>
+  <DefaultItemExcludes>**</DefaultItemExcludes>
+  </PropertyGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.3.9" />
   </ItemGroup>
+</Project>
 ```
 
 - Finally, open a terminal and run `func extensions install`. This will install the dependencies listed in your `extensions.csproj` file.
diff --git a/README.md b/README.md
index d082fc3..15f6476 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 |Branch|Status|
 |---|---|
-|master|[![Build Status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/Azure.azure-functions-durable-js?branchName=master)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=13&branchName=master)|
+|main|[![Build Status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/Azure.azure-functions-durable-js?branchName=main)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=13&branchName=main)|
 |dev|[![Build Status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/Azure.azure-functions-durable-js?branchName=dev)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=13&branchName=dev)|
 
 # Durable Functions for Node.js
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 912f8ff..94395c7 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -8,7 +8,7 @@ variables: {
 name: $(MODULE_VERSION)-$(Date:yyyyMMdd)$(Rev:.r)
 
 trigger:
-- master
+- main
 - dev
 
 jobs:
diff --git a/package-lock.json b/package-lock.json
index 41715f9..893f7e5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "durable-functions",
-  "version": "1.4.1",
+  "version": "1.4.4",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -384,12 +384,11 @@
       "dev": true
     },
     "axios": {
-      "version": "0.19.0",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
-      "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
+      "version": "0.21.1",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
+      "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
       "requires": {
-        "follow-redirects": "1.5.10",
-        "is-buffer": "^2.0.2"
+        "follow-redirects": "^1.10.0"
       }
     },
     "backbone": {
@@ -478,7 +477,7 @@
     },
     "chalk": {
       "version": "1.1.3",
-      "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
       "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
       "dev": true,
       "requires": {
@@ -596,12 +595,18 @@
     },
     "commander": {
       "version": "2.9.0",
-      "resolved": "http://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
       "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
       "requires": {
         "graceful-readlink": ">= 1.0.0"
       }
     },
+    "common-tags": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz",
+      "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==",
+      "dev": true
+    },
     "concat-map": {
       "version": "0.0.1",
       "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -670,6 +675,12 @@
       "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
       "dev": true
     },
+    "dlv": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
+      "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
+      "dev": true
+    },
     "doctrine": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -1035,22 +1046,9 @@
       "dev": true
     },
     "follow-redirects": {
-      "version": "1.5.10",
-      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
-      "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
-      "requires": {
-        "debug": "=3.1.0"
-      },
-      "dependencies": {
-        "debug": {
-          "version": "3.1.0",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
-          "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
-          "requires": {
-            "ms": "2.0.0"
-          }
-        }
-      }
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
+      "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg=="
     },
     "fs-extra": {
       "version": "8.1.0",
@@ -1212,9 +1210,9 @@
       "dev": true
     },
     "highlight.js": {
-      "version": "9.18.1",
-      "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz",
-      "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg=="
+      "version": "9.18.5",
+      "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz",
+      "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA=="
     },
     "iconv-lite": {
       "version": "0.4.24",
@@ -1247,6 +1245,12 @@
       "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
       "dev": true
     },
+    "indent-string": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+      "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+      "dev": true
+    },
     "inflight": {
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -1398,7 +1402,8 @@
     "is-buffer": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
-      "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
+      "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==",
+      "dev": true
     },
     "is-callable": {
       "version": "1.1.5",
@@ -1476,9 +1481,9 @@
       "dev": true
     },
     "jquery": {
-      "version": "3.4.1",
-      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
-      "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw=="
+      "version": "3.5.1",
+      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
+      "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
     },
     "js-yaml": {
       "version": "3.13.1",
@@ -1543,9 +1548,9 @@
       }
     },
     "lodash": {
-      "version": "4.17.15",
-      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
-      "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+      "version": "4.17.19",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
+      "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
     },
     "lodash.get": {
       "version": "4.4.2",
@@ -1553,6 +1558,12 @@
       "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
       "dev": true
     },
+    "lodash.merge": {
+      "version": "4.6.2",
+      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+      "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+      "dev": true
+    },
     "log-symbols": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
@@ -1584,6 +1595,22 @@
         }
       }
     },
+    "loglevel": {
+      "version": "1.6.8",
+      "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz",
+      "integrity": "sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA==",
+      "dev": true
+    },
+    "loglevel-colored-level-prefix": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz",
+      "integrity": "sha1-akAhj9x64V/HbD0PPmdsRlOIYD4=",
+      "dev": true,
+      "requires": {
+        "chalk": "^1.1.3",
+        "loglevel": "^1.4.1"
+      }
+    },
     "lolex": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/lolex/-/lolex-3.0.0.tgz",
@@ -1982,6 +2009,117 @@
       "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
       "dev": true
     },
+    "prettier-eslint": {
+      "version": "11.0.0",
+      "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-11.0.0.tgz",
+      "integrity": "sha512-ACjL7T8m10HCO7DwYdXwhNWuZzQv86JkZAhVpzFV9brTMWi3i6LhqoELFaXf6RetDngujz89tnbDmGyvDl+rzA==",
+      "dev": true,
+      "requires": {
+        "@typescript-eslint/parser": "^3.0.0",
+        "common-tags": "^1.4.0",
+        "dlv": "^1.1.0",
+        "eslint": "^6.8.0",
+        "indent-string": "^4.0.0",
+        "lodash.merge": "^4.6.0",
+        "loglevel-colored-level-prefix": "^1.0.0",
+        "prettier": "^2.0.0",
+        "pretty-format": "^23.0.1",
+        "require-relative": "^0.8.7",
+        "typescript": "^3.9.3",
+        "vue-eslint-parser": "~7.1.0"
+      },
+      "dependencies": {
+        "@typescript-eslint/experimental-utils": {
+          "version": "3.3.0",
+          "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.3.0.tgz",
+          "integrity": "sha512-d4pGIAbu/tYsrPrdHCQ5xfadJGvlkUxbeBB56nO/VGmEDi/sKmfa5fGty5t5veL1OyJBrUmSiRn1R1qfVDydrg==",
+          "dev": true,
+          "requires": {
+            "@types/json-schema": "^7.0.3",
+            "@typescript-eslint/typescript-estree": "3.3.0",
+            "eslint-scope": "^5.0.0",
+            "eslint-utils": "^2.0.0"
+          }
+        },
+        "@typescript-eslint/parser": {
+          "version": "3.3.0",
+          "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.3.0.tgz",
+          "integrity": "sha512-a7S0Sqn/+RpOOWTcaLw6RD4obsharzxmgMfdK24l364VxuBODXjuJM7ImCkSXEN7oz52aiZbXSbc76+2EsE91w==",
+          "dev": true,
+          "requires": {
+            "@types/eslint-visitor-keys": "^1.0.0",
+            "@typescript-eslint/experimental-utils": "3.3.0",
+            "@typescript-eslint/typescript-estree": "3.3.0",
+            "eslint-visitor-keys": "^1.1.0"
+          }
+        },
+        "@typescript-eslint/typescript-estree": {
+          "version": "3.3.0",
+          "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.3.0.tgz",
+          "integrity": "sha512-3SqxylENltEvJsjjMSDCUx/edZNSC7wAqifUU1Ywp//0OWEZwMZJfecJud9XxJ/40rAKEbJMKBOQzeOjrLJFzQ==",
+          "dev": true,
+          "requires": {
+            "debug": "^4.1.1",
+            "eslint-visitor-keys": "^1.1.0",
+            "glob": "^7.1.6",
+            "is-glob": "^4.0.1",
+            "lodash": "^4.17.15",
+            "semver": "^7.3.2",
+            "tsutils": "^3.17.1"
+          }
+        },
+        "debug": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+          "dev": true,
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "eslint-utils": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+          "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+          "dev": true,
+          "requires": {
+            "eslint-visitor-keys": "^1.1.0"
+          }
+        },
+        "glob": {
+          "version": "7.1.6",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+          "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+          "dev": true,
+          "requires": {
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^3.0.4",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+          "dev": true
+        },
+        "semver": {
+          "version": "7.3.2",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
+          "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
+          "dev": true
+        },
+        "typescript": {
+          "version": "3.9.5",
+          "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz",
+          "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==",
+          "dev": true
+        }
+      }
+    },
     "prettier-linter-helpers": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
@@ -1991,6 +2129,33 @@
         "fast-diff": "^1.1.2"
       }
     },
+    "pretty-format": {
+      "version": "23.6.0",
+      "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz",
+      "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==",
+      "dev": true,
+      "requires": {
+        "ansi-regex": "^3.0.0",
+        "ansi-styles": "^3.2.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        }
+      }
+    },
     "progress": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
@@ -2049,6 +2214,12 @@
       "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
       "dev": true
     },
+    "require-relative": {
+      "version": "0.8.7",
+      "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz",
+      "integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=",
+      "dev": true
+    },
     "resolve": {
       "version": "1.8.1",
       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
@@ -2075,7 +2246,7 @@
     },
     "rimraf": {
       "version": "2.5.4",
-      "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz",
       "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=",
       "requires": {
         "glob": "^7.0.5"
@@ -2287,7 +2458,7 @@
     },
     "strip-ansi": {
       "version": "3.0.1",
-      "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
       "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
       "dev": true,
       "requires": {
@@ -2548,6 +2719,48 @@
       "resolved": "https://registry.npmjs.org/validator/-/validator-10.8.0.tgz",
       "integrity": "sha512-mXqMxfCh5NLsVgYVKl9WvnHNDPCcbNppHSPPowu0VjtSsGWVY+z8hJF44edLR1nbLNzi3jYoYsIl8KZpioIk6g=="
     },
+    "vue-eslint-parser": {
+      "version": "7.1.0",
+      "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.0.tgz",
+      "integrity": "sha512-Kr21uPfthDc63nDl27AGQEhtt9VrZ9nkYk/NTftJ2ws9XiJwzJJCnCr3AITQ2jpRMA0XPGDECxYH8E027qMK9Q==",
+      "dev": true,
+      "requires": {
+        "debug": "^4.1.1",
+        "eslint-scope": "^5.0.0",
+        "eslint-visitor-keys": "^1.1.0",
+        "espree": "^6.2.1",
+        "esquery": "^1.0.1",
+        "lodash": "^4.17.15"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+          "dev": true,
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "espree": {
+          "version": "6.2.1",
+          "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
+          "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
+          "dev": true,
+          "requires": {
+            "acorn": "^7.1.1",
+            "acorn-jsx": "^5.2.0",
+            "eslint-visitor-keys": "^1.1.0"
+          }
+        },
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+          "dev": true
+        }
+      }
+    },
     "which": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
diff --git a/package.json b/package.json
index b0c79eb..ad4f0fc 100644
--- a/package.json
+++ b/package.json
@@ -1,85 +1,90 @@
 {
-  "name": "durable-functions",
-  "version": "1.4.1",
-  "description": "Durable Functions library for Node.js Azure Functions",
-  "license": "MIT",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/Azure/azure-functions-durable-js.git"
-  },
-  "author": "Microsoft Corporation",
-  "keywords": [
-    "azure-functions"
-  ],
-  "files": [
-    "lib/src"
-  ],
-  "main": "lib/src/index.js",
-  "typings": "lib/src/index.d.ts",
-  "scripts": {
-    "clean": "rimraf lib",
-    "lint": "eslint \"src/**/*.ts\"",
-    "lint:test": "eslint \"test/**/*.ts\"",
-    "build": "npm run clean && npm run lint && npm run lint:test && npm run stripInternalDocs && echo Done",
-    "build:nolint": "npm run clean && npm run stripInternalDocs && echo Done",
-    "stripInternalDocs": "tsc --pretty -p tsconfig.nocomments",
-    "test": "npm run build && mocha --recursive ./lib/test/**/*-spec.js",
-    "test:nolint": "npm run build:nolint && mocha --recursive ./lib/test/**/*-spec.js",
-    "watch": "npm run build -- --watch",
-    "watch:test": "npm run test -- --watch",
-    "docs": "typedoc --excludePrivate --mode file --out ./lib/docs ./src",
-    "e2etst": "npm run "
-  },
-  "dependencies": {
-    "@azure/functions": "^1.0.2-beta2",
-    "@types/lodash": "^4.14.119",
-    "@types/uuid": "~3.4.4",
-    "@types/validator": "^9.4.3",
-    "axios": "^0.19.0",
-    "commander": "~2.9.0",
-    "debug": "~2.6.9",
-    "lodash": "^4.17.15",
-    "rimraf": "~2.5.4",
-    "typedoc": "^0.17.1",
-    "uuid": "~3.3.2",
-    "validator": "~10.8.0"
-  },
-  "devDependencies": {
-    "@types/chai": "~4.1.6",
-    "@types/chai-as-promised": "~7.1.0",
-    "@types/chai-string": "~1.4.1",
-    "@types/commander": "~2.3.31",
-    "@types/debug": "0.0.29",
-    "@types/mocha": "~7.0.2",
-    "@types/nock": "^9.3.0",
-    "@types/node": "~6.14.7",
-    "@types/rimraf": "0.0.28",
-    "@types/sinon": "~5.0.5",
-    "@typescript-eslint/eslint-plugin": "^2.21.0",
-    "@typescript-eslint/parser": "^2.21.0",
-    "chai": "~4.2.0",
-    "chai-as-promised": "~7.1.1",
-    "chai-string": "~1.5.0",
-    "eslint": "^6.8.0",
-    "eslint-config-prettier": "^6.10.0",
-    "eslint-plugin-prettier": "^3.1.2",
-    "mocha": "~7.1.1",
-    "moment": "~2.22.2",
-    "nock": "^10.0.6",
-    "prettier": "^2.0.5",
-    "sinon": "~7.1.1",
-    "ts-node": "~1.0.0",
-    "typescript": "^3.8.3"
-  },
-  "engines": {
-    "node": ">=6.5.0"
-  },
-  "bugs": {
-    "url": "https://github.com/Azure/azure-functions-durable-js/issues"
-  },
-  "homepage": "https://github.com/Azure/azure-functions-durable-js#readme",
-  "directories": {
-    "lib": "lib",
-    "test": "test"
-  }
+    "name": "durable-functions",
+    "version": "1.4.4",
+    "description": "Durable Functions library for Node.js Azure Functions",
+    "license": "MIT",
+    "repository": {
+        "type": "git",
+        "url": "git+https://github.com/Azure/azure-functions-durable-js.git"
+    },
+    "author": "Microsoft Corporation",
+    "keywords": [
+        "azure-functions"
+    ],
+    "files": [
+        "lib/src"
+    ],
+    "main": "lib/src/index.js",
+    "typings": "lib/src/index.d.ts",
+    "scripts": {
+        "clean": "rimraf lib",
+        "lint": "eslint --ext .ts,.json src/",
+        "lint:test": "eslint --ext .ts,.json test/",
+        "lint:samples": "eslint --ext .ts,.js samples/",
+        "lint:srcfix": "eslint --ext .ts,.json src/ --fix",
+        "lint:testfix": "eslint --ext .ts,.json test/ --fix",
+        "lint:samplesfix": "eslint --ext .ts,.js samples/ --fix",
+        "build": "npm run clean && npm run lint && npm run lint:test && npx tsc && npm run stripInternalDocs && echo Done",
+        "build:nolint": "npm run clean && npm run stripInternalDocs && echo Done",
+        "stripInternalDocs": "tsc --pretty -p tsconfig.nocomments",
+        "test": "npm run build && mocha --recursive ./lib/test/**/*-spec.js",
+        "test:nolint": "npm run build:nolint && mocha --recursive ./lib/test/**/*-spec.js",
+        "watch": "tsc --watch",
+        "watch:test": "npm run test -- --watch",
+        "docs": "typedoc --excludePrivate --mode file --out ./lib/docs ./src",
+        "e2etst": "npm run "
+    },
+    "dependencies": {
+        "@azure/functions": "^1.0.2-beta2",
+        "@types/lodash": "^4.14.119",
+        "@types/uuid": "~3.4.4",
+        "@types/validator": "^9.4.3",
+        "axios": "^0.21.1",
+        "commander": "~2.9.0",
+        "debug": "~2.6.9",
+        "lodash": "^4.17.15",
+        "rimraf": "~2.5.4",
+        "typedoc": "^0.17.1",
+        "uuid": "~3.3.2",
+        "validator": "~10.8.0"
+    },
+    "devDependencies": {
+        "@types/chai": "~4.1.6",
+        "@types/chai-as-promised": "~7.1.0",
+        "@types/chai-string": "~1.4.1",
+        "@types/commander": "~2.3.31",
+        "@types/debug": "0.0.29",
+        "@types/mocha": "~7.0.2",
+        "@types/nock": "^9.3.0",
+        "@types/node": "~6.14.7",
+        "@types/rimraf": "0.0.28",
+        "@types/sinon": "~5.0.5",
+        "@typescript-eslint/eslint-plugin": "^2.21.0",
+        "@typescript-eslint/parser": "^2.21.0",
+        "chai": "~4.2.0",
+        "chai-as-promised": "~7.1.1",
+        "chai-string": "~1.5.0",
+        "eslint": "^6.8.0",
+        "eslint-config-prettier": "^6.10.0",
+        "eslint-plugin-prettier": "^3.1.2",
+        "mocha": "~7.1.1",
+        "moment": "~2.22.2",
+        "nock": "^10.0.6",
+        "prettier": "^2.0.5",
+        "prettier-eslint": "11.0.0",
+        "sinon": "~7.1.1",
+        "ts-node": "~1.0.0",
+        "typescript": "^3.8.3"
+    },
+    "engines": {
+        "node": ">=6.5.0"
+    },
+    "bugs": {
+        "url": "https://github.com/Azure/azure-functions-durable-js/issues"
+    },
+    "homepage": "https://github.com/Azure/azure-functions-durable-js#readme",
+    "directories": {
+        "lib": "lib",
+        "test": "test"
+    }
 }
diff --git a/samples/AsyncCounterEntity/index.js b/samples/AsyncCounterEntity/index.js
index 3066d71..e8fcab0 100644
--- a/samples/AsyncCounterEntity/index.js
+++ b/samples/AsyncCounterEntity/index.js
@@ -1,21 +1,21 @@
-const df = require("durable-functions");
-
-module.exports = df.entity(async function(context) {
-    await Promise.resolve();
-    let currentValue = context.df.getState(() => 0);
-
-    switch (context.df.operationName) {
-        case "add":
-            const amount = context.df.getInput();
-            currentValue += amount;
-            break;
-        case "reset":
-            currentValue = 0;
-            break;
-        case "get":
-            context.df.return(currentValue);
-            break;
-    }
-
-    context.df.setState(currentValue);
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.entity(async function (context) {
+    await Promise.resolve();
+    let currentValue = context.df.getState(() => 0);
+
+    switch (context.df.operationName) {
+        case "add":
+            const amount = context.df.getInput();
+            currentValue += amount;
+            break;
+        case "reset":
+            currentValue = 0;
+            break;
+        case "get":
+            context.df.return(currentValue);
+            break;
+    }
+
+    context.df.setState(currentValue);
+});
diff --git a/samples/AsyncCounterOrchestration/index.js b/samples/AsyncCounterOrchestration/index.js
index 40b6164..11fdc9b 100644
--- a/samples/AsyncCounterOrchestration/index.js
+++ b/samples/AsyncCounterOrchestration/index.js
@@ -1,10 +1,10 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const entityId = new df.EntityId("AsyncCounterEntity", "myAsyncCounter");
-
-    currentValue = yield context.df.callEntity(entityId, "get");
-    if (currentValue < 10) {
-        yield context.df.callEntity(entityId, "add", 1);
-    }
-});
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const entityId = new df.EntityId("AsyncCounterEntity", "myAsyncCounter");
+
+    currentValue = yield context.df.callEntity(entityId, "get");
+    if (currentValue < 10) {
+        yield context.df.callEntity(entityId, "add", 1);
+    }
+});
diff --git a/samples/CallActivityWithRetry/index.js b/samples/CallActivityWithRetry/index.js
index 7d71757..e75f675 100644
--- a/samples/CallActivityWithRetry/index.js
+++ b/samples/CallActivityWithRetry/index.js
@@ -1,14 +1,14 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const retryOptions = new df.RetryOptions(1000, 2);
-    let returnValue;
-
-    try {
-        returnValue = yield context.df.callActivityWithRetry("FlakyFunction", retryOptions);
-    } catch (e) {
-        context.log("Orchestrator caught exception. Flaky function is extremely flaky.");
-    }
-
-    return returnValue;
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const retryOptions = new df.RetryOptions(1000, 2);
+    let returnValue;
+
+    try {
+        returnValue = yield context.df.callActivityWithRetry("FlakyFunction", retryOptions);
+    } catch (e) {
+        context.log("Orchestrator caught exception. Flaky function is extremely flaky.");
+    }
+
+    return returnValue;
+});
diff --git a/samples/CallSubOrchestratorWithRetry/index.js b/samples/CallSubOrchestratorWithRetry/index.js
index 4d5e0eb..56dd44d 100644
--- a/samples/CallSubOrchestratorWithRetry/index.js
+++ b/samples/CallSubOrchestratorWithRetry/index.js
@@ -1,16 +1,21 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const retryOptions = new df.RetryOptions(10000, 2);
-    const childId = `${context.df.instanceId}:0`;
-
-    let returnValue;
-
-    try {
-        returnValue = yield context.df.callSubOrchestratorWithRetry("ThrowsErrorInline", retryOptions, "Matter", childId);
-    } catch (e) {
-        context.log("Orchestrator caught exception. Sub-orchestrator failed.");
-    }
-
-    return returnValue;
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const retryOptions = new df.RetryOptions(10000, 2);
+    const childId = `${context.df.instanceId}:0`;
+
+    let returnValue;
+
+    try {
+        returnValue = yield context.df.callSubOrchestratorWithRetry(
+            "ThrowsErrorInline",
+            retryOptions,
+            "Matter",
+            childId
+        );
+    } catch (e) {
+        context.log("Orchestrator caught exception. Sub-orchestrator failed.");
+    }
+
+    return returnValue;
+});
diff --git a/samples/ContinueAsNewCounter/index.js b/samples/ContinueAsNewCounter/index.js
index 0b3e8ee..874745e 100644
--- a/samples/ContinueAsNewCounter/index.js
+++ b/samples/ContinueAsNewCounter/index.js
@@ -1,18 +1,18 @@
-const df = require("durable-functions");
-const moment = require('moment');
-
-module.exports = df.orchestrator(function*(context) {
-    let currentValue = context.df.getInput() || 0;
-    context.log(`Value is ${currentValue}`);
-    currentValue++;
-
-    var wait = moment.utc(context.df.currentUtcDateTime).add(30, 's');
-    context.log("Counting up at" + wait.toString());
-    yield context.df.createTimer(wait.toDate());
-
-    if (currentValue < 10) {
-        yield context.df.continueAsNew(currentValue);
-    }
-
-    return currentValue;
-});
\ No newline at end of file
+const df = require("durable-functions");
+const moment = require("moment");
+
+module.exports = df.orchestrator(function* (context) {
+    let currentValue = context.df.getInput() || 0;
+    context.log(`Value is ${currentValue}`);
+    currentValue++;
+
+    const wait = moment.utc(context.df.currentUtcDateTime).add(30, "s");
+    context.log("Counting up at" + wait.toString());
+    yield context.df.createTimer(wait.toDate());
+
+    if (currentValue < 10) {
+        yield context.df.continueAsNew(currentValue);
+    }
+
+    return currentValue;
+});
diff --git a/samples/CounterEntity/index.js b/samples/CounterEntity/index.js
index f9bf7c8..84b8346 100644
--- a/samples/CounterEntity/index.js
+++ b/samples/CounterEntity/index.js
@@ -1,20 +1,20 @@
-const df = require("durable-functions");
-
-module.exports = df.entity(function(context) {
-    let currentValue = context.df.getState(() => 0);
-
-    switch (context.df.operationName) {
-        case "add":
-            const amount = context.df.getInput();
-            currentValue += amount;
-            break;
-        case "reset":
-            currentValue = 0;
-            break;
-        case "get":
-            context.df.return(currentValue);
-            break;
-    }
-
-    context.df.setState(currentValue);
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.entity(function (context) {
+    let currentValue = context.df.getState(() => 0);
+
+    switch (context.df.operationName) {
+        case "add":
+            const amount = context.df.getInput();
+            currentValue += amount;
+            break;
+        case "reset":
+            currentValue = 0;
+            break;
+        case "get":
+            context.df.return(currentValue);
+            break;
+    }
+
+    context.df.setState(currentValue);
+});
diff --git a/samples/CounterOrchestration/index.js b/samples/CounterOrchestration/index.js
index c106a84..6c0a4da 100644
--- a/samples/CounterOrchestration/index.js
+++ b/samples/CounterOrchestration/index.js
@@ -1,10 +1,10 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const entityId = new df.EntityId("CounterEntity", "myCounter");
-
-    currentValue = yield context.df.callEntity(entityId, "get");
-    if (currentValue < 10) {
-        yield context.df.callEntity(entityId, "add", 1);
-    }
-});
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const entityId = new df.EntityId("CounterEntity", "myCounter");
+
+    currentValue = yield context.df.callEntity(entityId, "get");
+    if (currentValue < 10) {
+        yield context.df.callEntity(entityId, "add", 1);
+    }
+});
diff --git a/samples/E1_HelloSequence/index.js b/samples/E1_HelloSequence/index.js
index 20defc4..fdb08e5 100644
--- a/samples/E1_HelloSequence/index.js
+++ b/samples/E1_HelloSequence/index.js
@@ -1,11 +1,11 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    context.log("Starting chain sample");
-    const output = [];
-    output.push(yield context.df.callActivity("E1_SayHello", "Tokyo"));
-    output.push(yield context.df.callActivity("E1_SayHello", "Seattle"));
-    output.push(yield context.df.callActivity("E1_SayHello", "London"));
-
-    return output;
-});
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    context.log("Starting chain sample");
+    const output = [];
+    output.push(yield context.df.callActivity("E1_SayHello", "Tokyo"));
+    output.push(yield context.df.callActivity("E1_SayHello", "Seattle"));
+    output.push(yield context.df.callActivity("E1_SayHello", "London"));
+
+    return output;
+});
diff --git a/samples/E1_SayHello/index.js b/samples/E1_SayHello/index.js
index 2fe8e5f..36892f9 100644
--- a/samples/E1_SayHello/index.js
+++ b/samples/E1_SayHello/index.js
@@ -1,3 +1,3 @@
-module.exports = function(context) {
-    context.done(null, `Hello ${context.bindings.name}!`);
-};
\ No newline at end of file
+module.exports = function (context) {
+    context.done(null, `Hello ${context.bindings.name}!`);
+};
diff --git a/samples/E2_BackupSiteContent/index.js b/samples/E2_BackupSiteContent/index.js
index d2a3b8f..084a479 100644
--- a/samples/E2_BackupSiteContent/index.js
+++ b/samples/E2_BackupSiteContent/index.js
@@ -1,23 +1,23 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const rootDirectory = context.df.getInput();
-    if (!rootDirectory) {
-        throw new Error("A directory path is required as an input.");
-    }
-
-    const files = yield context.df.callActivity("E2_GetFileList", rootDirectory);
-
-    // Backup Files and save Promises into array
-    const tasks = [];
-    for (const file of files) {
-        tasks.push(context.df.callActivity("E2_CopyFileToBlob", file));
-    }
-
-    // wait for all the Backup Files Activities to complete, sum total bytes
-    const results = yield context.df.Task.all(tasks);
-    const totalBytes = results.reduce((prev, curr) => prev + curr, 0);
-
-    // return results;
-    return totalBytes;
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const rootDirectory = context.df.getInput();
+    if (!rootDirectory) {
+        throw new Error("A directory path is required as an input.");
+    }
+
+    const files = yield context.df.callActivity("E2_GetFileList", rootDirectory);
+
+    // Backup Files and save Promises into array
+    const tasks = [];
+    for (const file of files) {
+        tasks.push(context.df.callActivity("E2_CopyFileToBlob", file));
+    }
+
+    // wait for all the Backup Files Activities to complete, sum total bytes
+    const results = yield context.df.Task.all(tasks);
+    const totalBytes = results.reduce((prev, curr) => prev + curr, 0);
+
+    // return results;
+    return totalBytes;
+});
diff --git a/samples/E2_CopyFileToBlob/index.js b/samples/E2_CopyFileToBlob/index.js
index 754e972..3392b70 100644
--- a/samples/E2_CopyFileToBlob/index.js
+++ b/samples/E2_CopyFileToBlob/index.js
@@ -1,36 +1,42 @@
-const fs = require("fs");
-const path = require("path");
-const storage = require("azure-storage");
-
-module.exports = function (context, filePath) {
-    const container = "backups";
-    const root = path.parse(filePath).root;
-    const blobPath = filePath
-        .substring(root.length)
-        .replace("\\", "/");
-    const outputLocation = `backups/${blobPath}`;
-    const blobService = storage.createBlobService();
-
-    blobService.createContainerIfNotExists(container, (error) => {
-        if (error) {
-            throw error;
-        }
-
-        fs.stat(filePath, function (error, stats) {
-            if (error) {
-                throw error;
-            }
-            context.log(`Copying '${filePath}' to '${outputLocation}'. Total bytes = ${stats.size}.`);
-
-            const readStream = fs.createReadStream(filePath);
-
-            blobService.createBlockBlobFromStream(container, blobPath, readStream, stats.size, function (error) {
-                if (error) {
-                    throw error;
-                }
-
-                context.done(null, stats.size);
-            });
-        });
-    });
-};
\ No newline at end of file
+const fs = require("fs");
+const path = require("path");
+const storage = require("azure-storage");
+
+module.exports = function (context, filePath) {
+    const container = "backups";
+    const root = path.parse(filePath).root;
+    const blobPath = filePath.substring(root.length).replace("\\", "/");
+    const outputLocation = `backups/${blobPath}`;
+    const blobService = storage.createBlobService();
+
+    blobService.createContainerIfNotExists(container, (error) => {
+        if (error) {
+            throw error;
+        }
+
+        fs.stat(filePath, function (error, stats) {
+            if (error) {
+                throw error;
+            }
+            context.log(
+                `Copying '${filePath}' to '${outputLocation}'. Total bytes = ${stats.size}.`
+            );
+
+            const readStream = fs.createReadStream(filePath);
+
+            blobService.createBlockBlobFromStream(
+                container,
+                blobPath,
+                readStream,
+                stats.size,
+                function (error) {
+                    if (error) {
+                        throw error;
+                    }
+
+                    context.done(null, stats.size);
+                }
+            );
+        });
+    });
+};
diff --git a/samples/E2_GetFileList/index.js b/samples/E2_GetFileList/index.js
index 147b67e..bd831f2 100644
--- a/samples/E2_GetFileList/index.js
+++ b/samples/E2_GetFileList/index.js
@@ -1,23 +1,23 @@
-const readdirp = require("readdirp");
-
-module.exports = function (context, rootDirectory) {
-    context.log(`Searching for files under '${rootDirectory}'...`);
-    const allFilePaths = [];
-
-    readdirp(
-        {root: rootDirectory, entryType: 'all'},
-        function (fileInfo) {
-            if (!fileInfo.stat.isDirectory()) {
-                allFilePaths.push(fileInfo.fullPath);
-            }
-        },
-        function (err, res) {
-            if (err) {
-                throw err;
-            }
-
-            context.log(`Found ${allFilePaths.length} under ${rootDirectory}.`);
-            context.done(null, allFilePaths);
-        }
-    );
-};
\ No newline at end of file
+const readdirp = require("readdirp");
+
+module.exports = function (context, rootDirectory) {
+    context.log(`Searching for files under '${rootDirectory}'...`);
+    const allFilePaths = [];
+
+    readdirp(
+        { root: rootDirectory, entryType: "all" },
+        function (fileInfo) {
+            if (!fileInfo.stat.isDirectory()) {
+                allFilePaths.push(fileInfo.fullPath);
+            }
+        },
+        function (err, res) {
+            if (err) {
+                throw err;
+            }
+
+            context.log(`Found ${allFilePaths.length} under ${rootDirectory}.`);
+            context.done(null, allFilePaths);
+        }
+    );
+};
diff --git a/samples/E3_GetIsClear/index.js b/samples/E3_GetIsClear/index.js
index 6bd922c..ae145e2 100644
--- a/samples/E3_GetIsClear/index.js
+++ b/samples/E3_GetIsClear/index.js
@@ -1,37 +1,43 @@
-const request = require("request");
-
-const clearWeatherConditions = ['Overcast', 'Clear', 'Partly Cloudy', 'Mostly Cloudy', 'Scattered Clouds'];
-
-module.exports = function (context, location) {
-    getCurrentConditions(location)
-        .then(function (data) {
-            const isClear = clearWeatherConditions.includes(data.weather);
-            context.done(null, isClear);
-        })
-        .catch(function (err) {
-            context.log(`E3_GetIsClear encountered an error: ${err}`);
-            context.done(err);
-        });
-};
-
-function getCurrentConditions(location) {
-    return new Promise(function (resolve, reject) {
-        const options = {
-            url: `https://api.wunderground.com/api/${process.env["WeatherUndergroundApiKey"]}/conditions/q/${location.state}/${location.city}.json`,
-            method: 'GET',
-            json: true
-        };
-        request(options, function (err, res, body) {
-            if (err) {
-                reject(err);
-            }
-            if (body.error) {
-                reject(body.error);
-            }
-            if (body.response.error) {
-                reject(body.response.error);
-            }
-            resolve(body.current_observation);
-        });
-    });
-}
\ No newline at end of file
+const request = require("request");
+
+const clearWeatherConditions = [
+    "Overcast",
+    "Clear",
+    "Partly Cloudy",
+    "Mostly Cloudy",
+    "Scattered Clouds",
+];
+
+module.exports = function (context, location) {
+    getCurrentConditions(location)
+        .then(function (data) {
+            const isClear = clearWeatherConditions.includes(data.weather);
+            context.done(null, isClear);
+        })
+        .catch(function (err) {
+            context.log(`E3_GetIsClear encountered an error: ${err}`);
+            context.done(err);
+        });
+};
+
+function getCurrentConditions(location) {
+    return new Promise(function (resolve, reject) {
+        const options = {
+            url: `https://api.wunderground.com/api/${process.env["WeatherUndergroundApiKey"]}/conditions/q/${location.state}/${location.city}.json`,
+            method: "GET",
+            json: true,
+        };
+        request(options, function (err, res, body) {
+            if (err) {
+                reject(err);
+            }
+            if (body.error) {
+                reject(body.error);
+            }
+            if (body.response.error) {
+                reject(body.response.error);
+            }
+            resolve(body.current_observation);
+        });
+    });
+}
diff --git a/samples/E3_Monitor/index.js b/samples/E3_Monitor/index.js
index f40b8d6..02093c3 100644
--- a/samples/E3_Monitor/index.js
+++ b/samples/E3_Monitor/index.js
@@ -1,51 +1,83 @@
-const df = require("durable-functions");
-const moment = require('moment');
-
-module.exports = df.orchestrator(function*(context) {
-    const input = context.df.getInput();
-    context.log("Received monitor request. location: " + (input ? input.location : undefined)
-        + ". phone: " + (input ? input.phone : undefined) + ".");
-
-    verifyRequest(input);
-
-    const endTime = moment.utc(context.df.currentUtcDateTime).add(6, 'h');
-    context.log("Instantiating monitor for " + input.location.city + ", " + input.location.state
-        + ". Expires: " + (endTime) + ".");
-
-    while (moment.utc(context.df.currentUtcDateTime).isBefore(endTime)) {
-        // Check the weather
-        context.log("Checking current weather conditions for " + input.location.city + ", "
-            + input.location.state + " at " + context.df.currentUtcDateTime + ".");
-        const isClear = yield context.df.callActivity("E3_GetIsClear", input.location);
-
-        if (isClear) {
-            // It's not raining! Or snowing. Or misting. Tell our user to take advantage of it.
-            context.log("Detected clear weather for " + input.location.city + ", "
-                + input.location.state + ". Notifying " + input.phone + ".");
-
-                yield context.df.callActivity("E3_SendGoodWeatherAlert", input.phone);
-                break;
-        } else {
-            // Wait for the next checkpoint
-            var nextCheckpoint = moment.utc(context.df.currentUtcDateTime).add(30, 's');
-            context.log("Next check for " + input.location.city + ", " + input.location.state
-                + " at " + nextCheckpoint.toString());
-
-            yield context.df.createTimer(nextCheckpoint.toDate());   // accomodate cancellation tokens
-        }
-    }
-
-    context.log("Monitor expiring.");
-});
-
-function verifyRequest(request) {
-    if (!request) {
-        throw new Error("An input object is required.");
-    }
-    if (!request.location) {
-        throw new Error("A location input is required.");
-    }
-    if (!request.phone) {
-        throw new Error("A phone number input is required.");
-    }
-}
\ No newline at end of file
+const df = require("durable-functions");
+const moment = require("moment");
+
+module.exports = df.orchestrator(function* (context) {
+    const input = context.df.getInput();
+    context.log(
+        "Received monitor request. location: " +
+            (input ? input.location : undefined) +
+            ". phone: " +
+            (input ? input.phone : undefined) +
+            "."
+    );
+
+    verifyRequest(input);
+
+    const endTime = moment.utc(context.df.currentUtcDateTime).add(6, "h");
+    context.log(
+        "Instantiating monitor for " +
+            input.location.city +
+            ", " +
+            input.location.state +
+            ". Expires: " +
+            endTime +
+            "."
+    );
+
+    while (moment.utc(context.df.currentUtcDateTime).isBefore(endTime)) {
+        // Check the weather
+        context.log(
+            "Checking current weather conditions for " +
+                input.location.city +
+                ", " +
+                input.location.state +
+                " at " +
+                context.df.currentUtcDateTime +
+                "."
+        );
+        const isClear = yield context.df.callActivity("E3_GetIsClear", input.location);
+
+        if (isClear) {
+            // It's not raining! Or snowing. Or misting. Tell our user to take advantage of it.
+            context.log(
+                "Detected clear weather for " +
+                    input.location.city +
+                    ", " +
+                    input.location.state +
+                    ". Notifying " +
+                    input.phone +
+                    "."
+            );
+
+            yield context.df.callActivity("E3_SendGoodWeatherAlert", input.phone);
+            break;
+        } else {
+            // Wait for the next checkpoint
+            const nextCheckpoint = moment.utc(context.df.currentUtcDateTime).add(30, "s");
+            context.log(
+                "Next check for " +
+                    input.location.city +
+                    ", " +
+                    input.location.state +
+                    " at " +
+                    nextCheckpoint.toString()
+            );
+
+            yield context.df.createTimer(nextCheckpoint.toDate()); // accomodate cancellation tokens
+        }
+    }
+
+    context.log("Monitor expiring.");
+});
+
+function verifyRequest(request) {
+    if (!request) {
+        throw new Error("An input object is required.");
+    }
+    if (!request.location) {
+        throw new Error("A location input is required.");
+    }
+    if (!request.phone) {
+        throw new Error("A phone number input is required.");
+    }
+}
diff --git a/samples/E3_SendGoodWeatherAlert/index.js b/samples/E3_SendGoodWeatherAlert/index.js
index 5f38ebc..972202f 100644
--- a/samples/E3_SendGoodWeatherAlert/index.js
+++ b/samples/E3_SendGoodWeatherAlert/index.js
@@ -1,8 +1,8 @@
-module.exports = function(context, phoneNumber) {
-    context.bindings.message = {
-        body: `The weather's clear outside! Go take a walk!`,
-        to: phoneNumber
-    };
-
-    context.done();
-};
\ No newline at end of file
+module.exports = function (context, phoneNumber) {
+    context.bindings.message = {
+        body: `The weather's clear outside! Go take a walk!`,
+        to: phoneNumber,
+    };
+
+    context.done();
+};
diff --git a/samples/E4_SendSmsChallenge/index.js b/samples/E4_SendSmsChallenge/index.js
index 040a403..faec2c0 100644
--- a/samples/E4_SendSmsChallenge/index.js
+++ b/samples/E4_SendSmsChallenge/index.js
@@ -1,17 +1,17 @@
-const seedrandom = require("seedrandom");
-const uuidv1 = require("uuid/v1");
-
-module.exports = function (context, phoneNumber) {
-    // Get a random number generator with a random seed (not time-based)
-    const rand = seedrandom(uuidv1());
-    const challengeCode = Math.floor(rand() * 10000);
-
-    context.log(`Sending verification code ${challengeCode} to ${phoneNumber}.`);
-
-    context.bindings.message = {
-        body: `Your verification code is ${challengeCode.toPrecision(4)}`,
-        to: phoneNumber
-    };
-
-    context.done(null, challengeCode);
-};
\ No newline at end of file
+const seedrandom = require("seedrandom");
+const uuidv1 = require("uuid/v1");
+
+module.exports = function (context, phoneNumber) {
+    // Get a random number generator with a random seed (not time-based)
+    const rand = seedrandom(uuidv1());
+    const challengeCode = Math.floor(rand() * 10000);
+
+    context.log(`Sending verification code ${challengeCode} to ${phoneNumber}.`);
+
+    context.bindings.message = {
+        body: `Your verification code is ${challengeCode.toPrecision(4)}`,
+        to: phoneNumber,
+    };
+
+    context.done(null, challengeCode);
+};
diff --git a/samples/E4_SmsPhoneVerification/index.js b/samples/E4_SmsPhoneVerification/index.js
index 0e975fa..a7fcda7 100644
--- a/samples/E4_SmsPhoneVerification/index.js
+++ b/samples/E4_SmsPhoneVerification/index.js
@@ -1,40 +1,40 @@
-const df = require("durable-functions");
-const moment = require('moment');
-
-module.exports = df.orchestrator(function*(context) {
-    const phoneNumber = context.df.getInput();
-    if (!phoneNumber) {
-        throw "A phone number input is required.";
-    }
-
-    const challengeCode = yield context.df.callActivity("E4_SendSmsChallenge", phoneNumber);
-
-    // The user has 90 seconds to respond with the code they received in the SMS message.
-    const expiration = moment.utc(context.df.currentUtcDateTime).add(90, 's');
-    const timeoutTask = context.df.createTimer(expiration.toDate());
-
-    let authorized = false;
-    for (let i = 0; i <= 3; i++) {
-        const challengeResponseTask = context.df.waitForExternalEvent("SmsChallengeResponse");
-
-        const winner = yield context.df.Task.any([challengeResponseTask, timeoutTask]);
-
-        if (winner === challengeResponseTask) {
-            // We got back a response! Compare it to the challenge code.
-            if (challengeResponseTask.result === challengeCode) {
-                authorized = true;
-                break;
-            }
-        } else {
-            // Timeout expired
-            break;
-        }
-    }
-
-    if (!timeoutTask.isCompleted) {
-        // All pending timers must be complete or canceled before the function exits.
-        timeoutTask.cancel();
-    }
-
-    return authorized;
-});
\ No newline at end of file
+const df = require("durable-functions");
+const moment = require("moment");
+
+module.exports = df.orchestrator(function* (context) {
+    const phoneNumber = context.df.getInput();
+    if (!phoneNumber) {
+        throw "A phone number input is required.";
+    }
+
+    const challengeCode = yield context.df.callActivity("E4_SendSmsChallenge", phoneNumber);
+
+    // The user has 90 seconds to respond with the code they received in the SMS message.
+    const expiration = moment.utc(context.df.currentUtcDateTime).add(90, "s");
+    const timeoutTask = context.df.createTimer(expiration.toDate());
+
+    let authorized = false;
+    for (let i = 0; i <= 3; i++) {
+        const challengeResponseTask = context.df.waitForExternalEvent("SmsChallengeResponse");
+
+        const winner = yield context.df.Task.any([challengeResponseTask, timeoutTask]);
+
+        if (winner === challengeResponseTask) {
+            // We got back a response! Compare it to the challenge code.
+            if (challengeResponseTask.result === challengeCode) {
+                authorized = true;
+                break;
+            }
+        } else {
+            // Timeout expired
+            break;
+        }
+    }
+
+    if (!timeoutTask.isCompleted) {
+        // All pending timers must be complete or canceled before the function exits.
+        timeoutTask.cancel();
+    }
+
+    return authorized;
+});
diff --git a/samples/FlakyFunction/index.js b/samples/FlakyFunction/index.js
index 388bde3..ea33a0d 100644
--- a/samples/FlakyFunction/index.js
+++ b/samples/FlakyFunction/index.js
@@ -1,4 +1,4 @@
-module.exports = function(context) {
-    context.log("Flaky Function Flaking!");
-    throw Error("FlakyFunction flaked");
-};
\ No newline at end of file
+module.exports = function (context) {
+    context.log("Flaky Function Flaking!");
+    throw Error("FlakyFunction flaked");
+};
diff --git a/samples/HttpStart/index.js b/samples/HttpStart/index.js
index 91d142e..6374f80 100644
--- a/samples/HttpStart/index.js
+++ b/samples/HttpStart/index.js
@@ -1,10 +1,10 @@
-const df = require("durable-functions");
-
-module.exports = async function (context, req) {
-    const client = df.getClient(context);
-    const instanceId = await client.startNew(req.params.functionName, undefined, req.body);
-
-    context.log(`Started orchestration with ID = '${instanceId}'.`);
-
-    return client.createCheckStatusResponse(context.bindingData.req, instanceId);
-};
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = async function (context, req) {
+    const client = df.getClient(context);
+    const instanceId = await client.startNew(req.params.functionName, undefined, req.body);
+
+    context.log(`Started orchestration with ID = '${instanceId}'.`);
+
+    return client.createCheckStatusResponse(context.bindingData.req, instanceId);
+};
diff --git a/samples/HttpSyncStart/index.js b/samples/HttpSyncStart/index.js
index c4b7068..2e99c08 100644
--- a/samples/HttpSyncStart/index.js
+++ b/samples/HttpSyncStart/index.js
@@ -1,28 +1,29 @@
-const df = require("durable-functions");
-
-const timeout = "timeout";
-const retryInterval = "retryInterval";
-
-module.exports = async function (context, req) {
-    const client = df.getClient(context);
-    const instanceId = await client.startNew(req.params.functionName, undefined, req.body);
-
-    context.log(`Started orchestration with ID = '${instanceId}'.`);
-
-    const timeoutInMilliseconds = getTimeInSeconds(req, timeout) || 30000;
-    const retryIntervalInMilliseconds = getTimeInSeconds(req, retryInterval) || 1000;
-
-    const response = client.waitForCompletionOrCreateCheckStatusResponse(
-        context.bindingData.req,
-        instanceId,
-        timeoutInMilliseconds,
-        retryIntervalInMilliseconds);
-    return response;
-};
-
-function getTimeInSeconds (req, queryParameterName) {
-    const queryValue = req.query[queryParameterName];
-    return queryValue
-        ? queryValue // expected to be in seconds
-        * 1000 : undefined;
-}
\ No newline at end of file
+const df = require("durable-functions");
+
+const timeout = "timeout";
+const retryInterval = "retryInterval";
+
+module.exports = async function (context, req) {
+    const client = df.getClient(context);
+    const instanceId = await client.startNew(req.params.functionName, undefined, req.body);
+
+    context.log(`Started orchestration with ID = '${instanceId}'.`);
+
+    const timeoutInMilliseconds = getTimeInSeconds(req, timeout) || 30000;
+    const retryIntervalInMilliseconds = getTimeInSeconds(req, retryInterval) || 1000;
+
+    const response = client.waitForCompletionOrCreateCheckStatusResponse(
+        context.bindingData.req,
+        instanceId,
+        timeoutInMilliseconds,
+        retryIntervalInMilliseconds
+    );
+    return response;
+};
+
+function getTimeInSeconds(req, queryParameterName) {
+    const queryValue = req.query[queryParameterName];
+    return queryValue
+        ? queryValue * 1000 // expected to be in seconds
+        : undefined;
+}
diff --git a/samples/ListAzureSubscriptions/index.js b/samples/ListAzureSubscriptions/index.js
index 6604cea..61a3b12 100644
--- a/samples/ListAzureSubscriptions/index.js
+++ b/samples/ListAzureSubscriptions/index.js
@@ -1,13 +1,14 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context) {
-    // More information on the use of managed identities in the callHttp API:
-    // https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-http-features#managed-identities
-    var res = yield context.df.callHttp(
-        "GET",
-        "https://management.azure.com/subscriptions?api-version=2019-06-01",
-        undefined,
-        undefined,
-        new df.ManagedIdentityTokenSource("https://management.core.windows.net"));
-    return res;
-});
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    // More information on the use of managed identities in the callHttp API:
+    // https://docs.microsoft.com/azure/azure-functions/durable/durable-functions-http-features#managed-identities
+    const res = yield context.df.callHttp(
+        "GET",
+        "https://management.azure.com/subscriptions?api-version=2019-06-01",
+        undefined,
+        undefined,
+        new df.ManagedIdentityTokenSource("https://management.core.windows.net")
+    );
+    return res;
+});
diff --git a/samples/SayHelloWithActivity/index.js b/samples/SayHelloWithActivity/index.js
index 4a2fb2e..42c5615 100644
--- a/samples/SayHelloWithActivity/index.js
+++ b/samples/SayHelloWithActivity/index.js
@@ -1,8 +1,8 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const input = context.df.getInput();
-
-    const output = yield context.df.callActivity("E1_SayHello", input);
-    return output;
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const input = context.df.getInput();
+
+    const output = yield context.df.callActivity("E1_SayHello", input);
+    return output;
+});
diff --git a/samples/SayHelloWithCustomStatus/index.js b/samples/SayHelloWithCustomStatus/index.js
index e44e82f..4db3e17 100644
--- a/samples/SayHelloWithCustomStatus/index.js
+++ b/samples/SayHelloWithCustomStatus/index.js
@@ -1,14 +1,14 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const output = [];
-
-    output.push(yield context.df.callActivity("E1_SayHello", "Tokyo"));
-    context.df.setCustomStatus("Tokyo");
-    output.push(yield context.df.callActivity("E1_SayHello", "Seattle"));
-    context.df.setCustomStatus("Seattle");
-    output.push(yield context.df.callActivity("E1_SayHello", "London"));
-    context.df.setCustomStatus("London");
-
-    return output;
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const output = [];
+
+    output.push(yield context.df.callActivity("E1_SayHello", "Tokyo"));
+    context.df.setCustomStatus("Tokyo");
+    output.push(yield context.df.callActivity("E1_SayHello", "Seattle"));
+    context.df.setCustomStatus("Seattle");
+    output.push(yield context.df.callActivity("E1_SayHello", "London"));
+    context.df.setCustomStatus("London");
+
+    return output;
+});
diff --git a/samples/SayHelloWithSubOrchestrator/index.js b/samples/SayHelloWithSubOrchestrator/index.js
index 7d9d4a9..28722f1 100644
--- a/samples/SayHelloWithSubOrchestrator/index.js
+++ b/samples/SayHelloWithSubOrchestrator/index.js
@@ -1,8 +1,8 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const input = context.df.getInput();
-
-    const output = yield context.df.callSubOrchestrator("SayHelloWithActivity", input);
-    return output;
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const input = context.df.getInput();
+
+    const output = yield context.df.callSubOrchestrator("SayHelloWithActivity", input);
+    return output;
+});
diff --git a/samples/ThrowsErrorInline/index.js b/samples/ThrowsErrorInline/index.js
index 6059a82..2c682b7 100644
--- a/samples/ThrowsErrorInline/index.js
+++ b/samples/ThrowsErrorInline/index.js
@@ -1,7 +1,7 @@
-const df = require("durable-functions");
-
-module.exports = df.orchestrator(function*(context){
-    const input = context.df.getInput();
-
-    throw Error("ThrowsErrorInline does what it says on the tin.");
-});
\ No newline at end of file
+const df = require("durable-functions");
+
+module.exports = df.orchestrator(function* (context) {
+    const input = context.df.getInput();
+
+    throw Error("ThrowsErrorInline does what it says on the tin.");
+});
diff --git a/samples/cancel-timer/index.js b/samples/cancel-timer/index.js
index cb6dc81..2f69b71 100644
--- a/samples/cancel-timer/index.js
+++ b/samples/cancel-timer/index.js
@@ -1,15 +1,15 @@
-const df = require("durable-functions");
-const moment = require('moment');
-
-module.exports = df.orchestrator(function*(context){
-    const expiration = moment.utc(context.df.currentUtcDateTime).add(2, 'm');
-    const timeoutTask = context.df.createTimer(expiration.toDate());
-
-    const hello = yield context.df.callActivity("E1_SayHello", "from the other side");
-
-    if (!timeoutTask.isCompleted) {
-        timeoutTask.cancel();
-    }
-
-    return hello;
-});
\ No newline at end of file
+const df = require("durable-functions");
+const moment = require("moment");
+
+module.exports = df.orchestrator(function* (context) {
+    const expiration = moment.utc(context.df.currentUtcDateTime).add(2, "m");
+    const timeoutTask = context.df.createTimer(expiration.toDate());
+
+    const hello = yield context.df.callActivity("E1_SayHello", "from the other side");
+
+    if (!timeoutTask.isCompleted) {
+        timeoutTask.cancel();
+    }
+
+    return hello;
+});
diff --git a/samples/package-lock.json b/samples/package-lock.json
index 1a84787..8c20a21 100644
--- a/samples/package-lock.json
+++ b/samples/package-lock.json
@@ -901,9 +901,9 @@
       "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
     },
     "lodash": {
-      "version": "4.17.15",
-      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
-      "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+      "version": "4.17.20",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+      "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
     },
     "map-cache": {
       "version": "0.2.2",
@@ -1564,7 +1564,7 @@
     },
     "validator": {
       "version": "9.4.1",
-      "resolved": "http://registry.npmjs.org/validator/-/validator-9.4.1.tgz",
+      "resolved": "https://registry.npmjs.org/validator/-/validator-9.4.1.tgz",
       "integrity": "sha512-YV5KjzvRmSyJ1ee/Dm5UED0G+1L4GZnLN3w6/T+zZm8scVua4sOhYKWTUrKa0H/tMiJyO9QLHMPN+9mB/aMunA=="
     },
     "verror": {
diff --git a/src/actions/callactivityaction.ts b/src/actions/callactivityaction.ts
index 92114a4..399a87d 100644
--- a/src/actions/callactivityaction.ts
+++ b/src/actions/callactivityaction.ts
@@ -3,8 +3,10 @@ import { ActionType, IAction, Utils } from "../classes";
 /** @hidden */
 export class CallActivityAction implements IAction {
     public readonly actionType: ActionType = ActionType.CallActivity;
+    public readonly input: unknown;
 
-    constructor(public readonly functionName: string, public readonly input?: unknown) {
+    constructor(public readonly functionName: string, input?: unknown) {
+        this.input = Utils.processInput(input);
         Utils.throwIfEmpty(functionName, "functionName");
     }
 }
diff --git a/src/actions/callactivitywithretryaction.ts b/src/actions/callactivitywithretryaction.ts
index d261097..cbd68f9 100644
--- a/src/actions/callactivitywithretryaction.ts
+++ b/src/actions/callactivitywithretryaction.ts
@@ -3,12 +3,14 @@ import { ActionType, IAction, RetryOptions, Utils } from "../classes";
 /** @hidden */
 export class CallActivityWithRetryAction implements IAction {
     public readonly actionType: ActionType = ActionType.CallActivityWithRetry;
+    public readonly input: unknown;
 
     constructor(
         public readonly functionName: string,
         public readonly retryOptions: RetryOptions,
-        public readonly input?: unknown
+        input?: unknown
     ) {
+        this.input = Utils.processInput(input);
         Utils.throwIfEmpty(functionName, "functionName");
 
         Utils.throwIfNotInstanceOf<RetryOptions>(
diff --git a/src/actions/callentityaction.ts b/src/actions/callentityaction.ts
index 2995363..91dd0af 100644
--- a/src/actions/callentityaction.ts
+++ b/src/actions/callentityaction.ts
@@ -4,15 +4,13 @@ import { ActionType, EntityId, IAction, Utils } from "../classes";
 export class CallEntityAction implements IAction {
     public readonly actionType: ActionType = ActionType.CallEntity;
     public readonly instanceId: string;
+    public readonly input: unknown;
 
-    constructor(
-        entityId: EntityId,
-        public readonly operation: string,
-        public readonly input?: unknown
-    ) {
+    constructor(entityId: EntityId, public readonly operation: string, input?: unknown) {
         if (!entityId) {
             throw new Error("Must provide EntityId to CallEntityAction constructor");
         }
+        this.input = Utils.processInput(input);
         Utils.throwIfEmpty(operation, "operation");
         this.instanceId = EntityId.getSchedulerIdFromEntityId(entityId);
     }
diff --git a/src/actions/callsuborchestratoraction.ts b/src/actions/callsuborchestratoraction.ts
index f75129f..5a25007 100644
--- a/src/actions/callsuborchestratoraction.ts
+++ b/src/actions/callsuborchestratoraction.ts
@@ -3,12 +3,14 @@ import { ActionType, IAction, Utils } from "../classes";
 /** @hidden */
 export class CallSubOrchestratorAction implements IAction {
     public readonly actionType: ActionType = ActionType.CallSubOrchestrator;
+    public readonly input: unknown;
 
     constructor(
         public readonly functionName: string,
         public readonly instanceId?: string,
-        public readonly input?: unknown
+        input?: unknown
     ) {
+        this.input = Utils.processInput(input);
         Utils.throwIfEmpty(functionName, "functionName");
 
         if (instanceId) {
diff --git a/src/actions/callsuborchestratorwithretryaction.ts b/src/actions/callsuborchestratorwithretryaction.ts
index 01c94c0..4fd0501 100644
--- a/src/actions/callsuborchestratorwithretryaction.ts
+++ b/src/actions/callsuborchestratorwithretryaction.ts
@@ -3,13 +3,15 @@ import { ActionType, IAction, RetryOptions, Utils } from "../classes";
 /** @hidden */
 export class CallSubOrchestratorWithRetryAction implements IAction {
     public readonly actionType: ActionType = ActionType.CallSubOrchestratorWithRetry;
+    public readonly input: unknown;
 
     constructor(
         public readonly functionName: string,
         public readonly retryOptions: RetryOptions,
-        public readonly input?: unknown,
+        input?: unknown,
         public readonly instanceId?: string
     ) {
+        this.input = Utils.processInput(input);
         Utils.throwIfEmpty(functionName, "functionName");
 
         Utils.throwIfNotInstanceOf<RetryOptions>(
diff --git a/src/actions/continueasnewaction.ts b/src/actions/continueasnewaction.ts
index a0f4cbc..d10c8d7 100644
--- a/src/actions/continueasnewaction.ts
+++ b/src/actions/continueasnewaction.ts
@@ -1,8 +1,11 @@
-import { ActionType, IAction } from "../classes";
+import { ActionType, IAction, Utils } from "../classes";
 
 /** @hidden */
 export class ContinueAsNewAction implements IAction {
     public readonly actionType: ActionType = ActionType.ContinueAsNew;
+    public readonly input: unknown;
 
-    constructor(public readonly input: unknown) {}
+    constructor(input: unknown) {
+        this.input = Utils.processInput(input);
+    }
 }
diff --git a/src/orchestrator.ts b/src/orchestrator.ts
index fac1133..f9d1fd0 100644
--- a/src/orchestrator.ts
+++ b/src/orchestrator.ts
@@ -292,47 +292,90 @@ export class Orchestrator {
     ): Task {
         const newAction = new CallActivityWithRetryAction(name, retryOptions, input);
 
-        for (let attempt = 1; attempt <= retryOptions.maxNumberOfAttempts; attempt++) {
-            const taskScheduled = this.findTaskScheduled(state, name);
-            const taskCompleted = this.findTaskCompleted(state, taskScheduled);
-            const taskFailed = this.findTaskFailed(state, taskScheduled);
-            const taskRetryTimer = this.findRetryTimer(state, taskFailed);
-            const taskRetryTimerFired = this.findTimerFired(state, taskRetryTimer);
-            this.setProcessed([
-                taskScheduled,
-                taskCompleted,
-                taskFailed,
-                taskRetryTimer,
-                taskRetryTimerFired,
-            ]);
+        let attempt = 1;
+        let taskScheduled: TaskScheduledEvent | undefined;
+        let taskFailed: TaskFailedEvent | undefined;
+        let taskRetryTimer: TimerCreatedEvent | undefined;
+        for (let i = 0; i < state.length; i++) {
+            const historyEvent = state[i];
+            if (historyEvent.IsProcessed) {
+                continue;
+            }
 
             if (!taskScheduled) {
-                break;
+                if (historyEvent.EventType === HistoryEventType.TaskScheduled) {
+                    if ((historyEvent as TaskScheduledEvent).Name === name) {
+                        taskScheduled = historyEvent as TaskScheduledEvent;
+                    }
+                }
+                continue;
             }
 
-            if (taskCompleted) {
-                const result = this.parseHistoryEvent(taskCompleted);
+            if (historyEvent.EventType === HistoryEventType.TaskCompleted) {
+                if (
+                    (historyEvent as TaskCompletedEvent).TaskScheduledId === taskScheduled.EventId
+                ) {
+                    const taskCompleted = historyEvent as TaskCompletedEvent;
+                    this.setProcessed([taskScheduled, taskCompleted]);
+                    const result = this.parseHistoryEvent(taskCompleted);
+                    return TaskFactory.SuccessfulTask(
+                        newAction,
+                        result,
+                        taskCompleted.Timestamp,
+                        taskCompleted.TaskScheduledId,
+                        i
+                    );
+                } else {
+                    continue;
+                }
+            }
 
-                return TaskFactory.SuccessfulTask(
-                    newAction,
-                    result,
-                    taskCompleted.Timestamp,
-                    taskCompleted.TaskScheduledId,
-                    state.indexOf(taskCompleted)
-                );
-            } else if (
-                taskFailed &&
-                taskRetryTimer &&
-                attempt >= retryOptions.maxNumberOfAttempts
-            ) {
-                return TaskFactory.FailedTask(
-                    newAction,
-                    taskFailed.Reason,
-                    taskFailed.Timestamp,
-                    taskFailed.TaskScheduledId,
-                    state.indexOf(taskFailed),
-                    new DurableError(taskFailed.Reason)
-                );
+            if (!taskFailed) {
+                if (historyEvent.EventType === HistoryEventType.TaskFailed) {
+                    if (
+                        (historyEvent as TaskFailedEvent).TaskScheduledId === taskScheduled.EventId
+                    ) {
+                        taskFailed = historyEvent as TaskFailedEvent;
+                    }
+                }
+                continue;
+            }
+
+            if (!taskRetryTimer) {
+                if (historyEvent.EventType === HistoryEventType.TimerCreated) {
+                    taskRetryTimer = historyEvent as TimerCreatedEvent;
+                } else {
+                    continue;
+                }
+            }
+
+            if (historyEvent.EventType === HistoryEventType.TimerFired) {
+                if ((historyEvent as TimerFiredEvent).TimerId === taskRetryTimer.EventId) {
+                    const taskRetryTimerFired = historyEvent as TimerFiredEvent;
+                    this.setProcessed([
+                        taskScheduled,
+                        taskFailed,
+                        taskRetryTimer,
+                        taskRetryTimerFired,
+                    ]);
+                    if (attempt >= retryOptions.maxNumberOfAttempts) {
+                        return TaskFactory.FailedTask(
+                            newAction,
+                            taskFailed.Reason,
+                            taskFailed.Timestamp,
+                            taskFailed.TaskScheduledId,
+                            i,
+                            new DurableError(taskFailed.Reason)
+                        );
+                    } else {
+                        attempt++;
+                        taskScheduled = undefined;
+                        taskFailed = undefined;
+                        taskRetryTimer = undefined;
+                    }
+                } else {
+                    continue;
+                }
             }
         }
 
@@ -455,57 +498,95 @@ export class Orchestrator {
             instanceId
         );
 
-        for (let attempt = 1; attempt <= retryOptions.maxNumberOfAttempts; attempt++) {
-            const subOrchestratorCreated = this.findSubOrchestrationInstanceCreated(
-                state,
-                name,
-                instanceId
-            );
-            const subOrchestratorCompleted = this.findSubOrchestrationInstanceCompleted(
-                state,
-                subOrchestratorCreated
-            );
-            const subOrchestratorFailed = this.findSubOrchestrationInstanceFailed(
-                state,
-                subOrchestratorCreated
-            );
-            const retryTimer = this.findRetryTimer(state, subOrchestratorFailed);
-            const retryTimerFired = this.findTimerFired(state, retryTimer);
-            this.setProcessed([
-                subOrchestratorCreated,
-                subOrchestratorCompleted,
-                subOrchestratorFailed,
-                retryTimer,
-                retryTimerFired,
-            ]);
+        let attempt = 1;
+        let subOrchestratorCreated: SubOrchestrationInstanceCreatedEvent | undefined;
+        let subOrchestratorFailed: SubOrchestrationInstanceFailedEvent | undefined;
+        let taskRetryTimer: TimerCreatedEvent | undefined;
+        for (let i = 0; i < state.length; i++) {
+            const historyEvent = state[i];
+            if (historyEvent.IsProcessed) {
+                continue;
+            }
 
             if (!subOrchestratorCreated) {
-                break;
+                if (historyEvent.EventType === HistoryEventType.SubOrchestrationInstanceCreated) {
+                    const subOrchEvent = historyEvent as SubOrchestrationInstanceCreatedEvent;
+                    if (
+                        subOrchEvent.Name === name &&
+                        (!instanceId || instanceId === subOrchEvent.InstanceId)
+                    ) {
+                        subOrchestratorCreated = subOrchEvent;
+                    }
+                }
+                continue;
             }
 
-            if (subOrchestratorCompleted) {
-                const result = this.parseHistoryEvent(subOrchestratorCompleted);
+            if (historyEvent.EventType === HistoryEventType.SubOrchestrationInstanceCompleted) {
+                if (
+                    (historyEvent as SubOrchestrationInstanceCompletedEvent).TaskScheduledId ===
+                    subOrchestratorCreated.EventId
+                ) {
+                    const subOrchCompleted = historyEvent as SubOrchestrationInstanceCompletedEvent;
+                    this.setProcessed([subOrchestratorCreated, subOrchCompleted]);
+                    const result = this.parseHistoryEvent(subOrchCompleted);
+                    return TaskFactory.SuccessfulTask(
+                        newAction,
+                        result,
+                        subOrchCompleted.Timestamp,
+                        subOrchCompleted.TaskScheduledId,
+                        i
+                    );
+                } else {
+                    continue;
+                }
+            }
 
-                return TaskFactory.SuccessfulTask(
-                    newAction,
-                    result,
-                    subOrchestratorCompleted.Timestamp,
-                    subOrchestratorCompleted.TaskScheduledId,
-                    state.indexOf(subOrchestratorCompleted)
-                );
-            } else if (
-                subOrchestratorFailed &&
-                retryTimer &&
-                attempt >= retryOptions.maxNumberOfAttempts
-            ) {
-                return TaskFactory.FailedTask(
-                    newAction,
-                    subOrchestratorFailed.Reason,
-                    subOrchestratorFailed.Timestamp,
-                    subOrchestratorFailed.TaskScheduledId,
-                    state.indexOf(subOrchestratorFailed),
-                    new DurableError(subOrchestratorFailed.Reason)
-                );
+            if (!subOrchestratorFailed) {
+                if (historyEvent.EventType === HistoryEventType.SubOrchestrationInstanceFailed) {
+                    if (
+                        (historyEvent as SubOrchestrationInstanceFailedEvent).TaskScheduledId ===
+                        subOrchestratorCreated.EventId
+                    ) {
+                        subOrchestratorFailed = historyEvent as SubOrchestrationInstanceFailedEvent;
+                    }
+                }
+                continue;
+            }
+
+            if (!taskRetryTimer) {
+                if (historyEvent.EventType === HistoryEventType.TimerCreated) {
+                    taskRetryTimer = historyEvent as TimerCreatedEvent;
+                }
+                continue;
+            }
+
+            if (historyEvent.EventType === HistoryEventType.TimerFired) {
+                if ((historyEvent as TimerFiredEvent).TimerId === taskRetryTimer.EventId) {
+                    const taskRetryTimerFired = historyEvent as TimerFiredEvent;
+                    this.setProcessed([
+                        subOrchestratorCreated,
+                        subOrchestratorFailed,
+                        taskRetryTimer,
+                        taskRetryTimerFired,
+                    ]);
+                    if (attempt >= retryOptions.maxNumberOfAttempts) {
+                        return TaskFactory.FailedTask(
+                            newAction,
+                            subOrchestratorFailed.Reason,
+                            subOrchestratorFailed.Timestamp,
+                            subOrchestratorFailed.TaskScheduledId,
+                            i,
+                            new DurableError(subOrchestratorFailed.Reason)
+                        );
+                    } else {
+                        attempt += 1;
+                        subOrchestratorCreated = undefined;
+                        subOrchestratorFailed = undefined;
+                        taskRetryTimer = undefined;
+                    }
+                } else {
+                    continue;
+                }
             }
         }
 
@@ -678,8 +759,7 @@ export class Orchestrator {
         let maxCompletionIndex: number | undefined;
         const errors: Error[] = [];
         const results: Array<unknown> = [];
-        for (let index = 0; index < tasks.length; index++) {
-            const task = tasks[index];
+        for (const task of tasks) {
             if (!TaskFilter.isCompletedTask(task)) {
                 return TaskFactory.UncompletedTaskSet(tasks);
             }
@@ -714,8 +794,7 @@ export class Orchestrator {
         }
 
         let firstCompleted: CompletedTask | undefined;
-        for (let index = 0; index < tasks.length; index++) {
-            const task = tasks[index];
+        for (const task of tasks) {
             if (TaskFilter.isCompletedTask(task)) {
                 if (!firstCompleted) {
                     firstCompleted = task;
@@ -793,23 +872,6 @@ export class Orchestrator {
         return returnValue as EventSentEvent;
     }
 
-    /* Returns undefined if not found. */
-    private findRetryTimer(
-        state: HistoryEvent[],
-        failedTask: HistoryEvent | undefined
-    ): TimerCreatedEvent | undefined {
-        const returnValue = failedTask
-            ? state.filter((val: HistoryEvent, index: number, array: HistoryEvent[]) => {
-                  const failedTaskIndex = array.indexOf(failedTask);
-                  return (
-                      val.EventType === HistoryEventType.TimerCreated &&
-                      index === failedTaskIndex + 1
-                  );
-              })[0]
-            : undefined;
-        return returnValue as TimerCreatedEvent;
-    }
-
     /* Returns undefined if not found. */
     private findSubOrchestrationInstanceCreated(
         state: HistoryEvent[],
diff --git a/src/utils.ts b/src/utils.ts
index 1c16010..9a4f7f0 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,5 +1,15 @@
 /** @hidden */
 export class Utils {
+    public static processInput<T>(input: string | T): string | T {
+        // If we fail to stringify inputs, they may get deserialized incorrectly.
+        // For instance: "13131" might get interpreted as a number.
+        // Somehow this doesn't appear to occur with other datatypes, but we should
+        // investigate that further.
+        if (typeof input === "string") {
+            input = JSON.stringify(input);
+        }
+        return input;
+    }
     public static getInstancesOf<T>(
         collection: { [index: string]: unknown },
         typeInstance: T


Test patch:
diff --git a/test/integration/orchestrator-spec.ts b/test/integration/orchestrator-spec.ts
index ad13fc6..b4625fe 100644
--- a/test/integration/orchestrator-spec.ts
+++ b/test/integration/orchestrator-spec.ts
@@ -691,6 +691,44 @@ describe("Orchestrator", () => {
                 })
             );
         });
+
+        it("works with fan-out/fan-in", async () => {
+            const orchestrator = TestOrchestrations.SayHelloWithActivityRetryFanout;
+            const retryOptions = new RetryOptions(100, 5);
+            const mockContext = new MockContext({
+                context: new DurableOrchestrationBindingInfo(
+                    TestHistories.GetSayHelloWithActivityRetryFanout(
+                        moment.utc().toDate(),
+                        retryOptions.firstRetryIntervalInMilliseconds,
+                        4
+                    ),
+                    undefined
+                ),
+            });
+
+            orchestrator(mockContext);
+
+            expect(mockContext.doneValue).to.be.deep.equal(
+                new OrchestratorState({
+                    isDone: true,
+                    actions: [
+                        [
+                            new CallActivityWithRetryAction(
+                                "Hello",
+                                new RetryOptions(100, 5),
+                                "Tokyo"
+                            ),
+                            new CallActivityWithRetryAction(
+                                "Hello",
+                                new RetryOptions(100, 5),
+                                "Seattle"
+                            ),
+                        ],
+                    ],
+                    output: ["Hello, Tokyo!", "Hello, Seattle!"],
+                })
+            );
+        });
     });
 
     describe("callHttp()", () => {
@@ -1336,6 +1374,44 @@ describe("Orchestrator", () => {
                 })
             );
         });
+
+        it("handles fan-out/fan-in", async () => {
+            const orchestrator = TestOrchestrations.SayHelloWithSubOrchestratorRetryFanout;
+            const retryOptions = new RetryOptions(100, 5);
+            const mockContext = new MockContext({
+                context: new DurableOrchestrationBindingInfo(
+                    TestHistories.GetSayHelloWithSuborchestratorRetryFanout(
+                        moment.utc().toDate(),
+                        retryOptions.firstRetryIntervalInMilliseconds,
+                        4
+                    ),
+                    undefined
+                ),
+            });
+
+            orchestrator(mockContext);
+
+            expect(mockContext.doneValue).to.be.deep.equal(
+                new OrchestratorState({
+                    isDone: true,
+                    actions: [
+                        [
+                            new CallSubOrchestratorWithRetryAction(
+                                "SayHelloInline",
+                                new RetryOptions(100, 5),
+                                "Tokyo"
+                            ),
+                            new CallSubOrchestratorWithRetryAction(
+                                "SayHelloInline",
+                                new RetryOptions(100, 5),
+                                "Seattle"
+                            ),
+                        ],
+                    ],
+                    output: ["Hello, Tokyo!", "Hello, Seattle!"],
+                })
+            );
+        });
     });
 
     describe("continueAsNew()", () => {
diff --git a/test/testobjects/TestOrchestrations.ts b/test/testobjects/TestOrchestrations.ts
index 01944da..452d086 100644
--- a/test/testobjects/TestOrchestrations.ts
+++ b/test/testobjects/TestOrchestrations.ts
@@ -181,6 +181,14 @@ export class TestOrchestrations {
         return output;
     });
 
+    public static SayHelloWithActivityRetryFanout: any = df.orchestrator(function* (context: any) {
+        const tasks = [];
+        const retryOptions = new df.RetryOptions(100, 5);
+        tasks.push(context.df.callActivityWithRetry("Hello", retryOptions, "Tokyo"));
+        tasks.push(context.df.callActivityWithRetry("Hello", retryOptions, "Seattle"));
+        return yield context.df.Task.all(tasks);
+    });
+
     public static SayHelloWithActivityRetryNoOptions: any = df.orchestrator(function* (
         context: any
     ) {
@@ -240,6 +248,20 @@ export class TestOrchestrations {
         return output;
     });
 
+    public static SayHelloWithSubOrchestratorRetryFanout: any = df.orchestrator(function* (
+        context: any
+    ) {
+        const retryOptions = new df.RetryOptions(100, 5);
+        const output = [];
+        output.push(
+            context.df.callSubOrchestratorWithRetry("SayHelloInline", retryOptions, "Tokyo")
+        );
+        output.push(
+            context.df.callSubOrchestratorWithRetry("SayHelloInline", retryOptions, "Seattle")
+        );
+        return yield context.df.Task.all(output);
+    });
+
     public static SayHelloWithSubOrchestratorRetryNoOptions: any = df.orchestrator(function* (
         context: any
     ) {
diff --git a/test/testobjects/testhistories.ts b/test/testobjects/testhistories.ts
index ba54d2d..a80bcd2 100644
--- a/test/testobjects/testhistories.ts
+++ b/test/testobjects/testhistories.ts
@@ -1410,6 +1410,171 @@ export class TestHistories {
         ];
     }
 
+    public static GetSayHelloWithActivityRetryFanout(
+        firstTimestamp: Date,
+        retryInterval: number,
+        iteration: number
+    ): HistoryEvent[] {
+        const firstMoment = moment(firstTimestamp);
+
+        const historyEvents: HistoryEvent[] = [];
+        if (iteration >= 1) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                })
+            );
+            historyEvents.push(
+                new ExecutionStartedEvent({
+                    eventId: -1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                    name: "SayHelloWithActivityRetryFanout",
+                    input: undefined,
+                })
+            );
+            historyEvents.push(
+                new TaskScheduledEvent({
+                    eventId: 0,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                    name: "Hello",
+                    input: "Tokyo",
+                })
+            );
+            historyEvents.push(
+                new TaskScheduledEvent({
+                    eventId: 1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                    name: "Hello",
+                    input: "Seattle",
+                })
+            );
+            historyEvents.push(
+                new OrchestratorCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                })
+            );
+        }
+
+        if (iteration >= 2) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(110, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                })
+            );
+            historyEvents.push(
+                new TaskFailedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                    taskScheduledId: 0,
+                    details: "Big stack trace here",
+                    reason: "Activity function 'Hello' failed: Result: Failure",
+                })
+            );
+            historyEvents.push(
+                new TimerCreatedEvent({
+                    eventId: 2,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                    fireAt: firstMoment.add(100, "ms").add(retryInterval, "ms").toDate(),
+                })
+            );
+            historyEvents.push(
+                new TaskCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment
+                        .add(100, "s")
+                        .add(retryInterval, "ms")
+                        .add(100, "ms")
+                        .toDate(),
+                    isPlayed: iteration > 2,
+                    result: JSON.stringify(`Hello, Seattle!`),
+                    taskScheduledId: 1,
+                })
+            );
+            historyEvents.push(
+                new OrchestratorCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                })
+            );
+        }
+
+        if (iteration >= 3) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(1, "s").add(retryInterval, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                })
+            );
+            historyEvents.push(
+                new TimerFiredEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").add(retryInterval, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                    fireAt: firstMoment.add(100, "s").add(retryInterval, "ms").toDate(),
+                    timerId: 2,
+                })
+            );
+            historyEvents.push(
+                new TaskScheduledEvent({
+                    eventId: 3,
+                    timestamp: firstMoment.add(100, "ms").add(retryInterval, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                    name: "Hello",
+                    input: "Tokyo",
+                })
+            );
+            historyEvents.push(
+                new OrchestratorCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                })
+            );
+        }
+
+        if (iteration >= 4) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment
+                        .add(100, "s")
+                        .add(retryInterval, "ms")
+                        .add(100, "ms")
+                        .toDate(),
+                    isPlayed: iteration > 3,
+                })
+            );
+            historyEvents.push(
+                new TaskCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment
+                        .add(100, "s")
+                        .add(retryInterval, "ms")
+                        .add(100, "ms")
+                        .toDate(),
+                    isPlayed: false,
+                    result: JSON.stringify(`Hello, Tokyo!`),
+                    taskScheduledId: 3,
+                })
+            );
+        }
+
+        return historyEvents;
+    }
+
     public static GetSendHttpRequestReplayOne(
         name: string,
         firstTimestamp: Date,
@@ -1867,6 +2032,178 @@ export class TestHistories {
         ];
     }
 
+    public static GetSayHelloWithSuborchestratorRetryFanout(
+        firstTimestamp: Date,
+        retryInterval: number,
+        iteration: number
+    ): HistoryEvent[] {
+        const firstMoment = moment(firstTimestamp);
+        const instanceIds = [uuidv1(), uuidv1(), uuidv1()];
+
+        const historyEvents: HistoryEvent[] = [];
+        if (iteration >= 1) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                })
+            );
+            historyEvents.push(
+                new ExecutionStartedEvent({
+                    eventId: -1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                    name: "SayHelloWithSubOrchestratorRetryFanout",
+                    input: undefined,
+                })
+            );
+            historyEvents.push(
+                new SubOrchestrationInstanceCreatedEvent({
+                    eventId: 0,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                    name: "SayHelloInline",
+                    input: "Tokyo",
+                    instanceId: instanceIds[0],
+                })
+            );
+            historyEvents.push(
+                new SubOrchestrationInstanceCreatedEvent({
+                    eventId: 1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                    name: "SayHelloInline",
+                    input: "Seattle",
+                    instanceId: instanceIds[1],
+                })
+            );
+            historyEvents.push(
+                new OrchestratorCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstTimestamp,
+                    isPlayed: iteration > 1,
+                })
+            );
+        }
+
+        if (iteration >= 2) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(110, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                })
+            );
+            historyEvents.push(
+                new SubOrchestrationInstanceFailedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                    taskScheduledId: 0,
+                    details: "Big stack trace here",
+                    reason: "Activity function 'Hello' failed: Result: Failure",
+                    instanceId: instanceIds[0],
+                })
+            );
+            historyEvents.push(
+                new SubOrchestrationInstanceCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment
+                        .add(100, "s")
+                        .add(retryInterval, "ms")
+                        .add(100, "ms")
+                        .toDate(),
+                    isPlayed: iteration > 2,
+                    result: JSON.stringify(`Hello, Seattle!`),
+                    taskScheduledId: 1,
+                    instanceId: instanceIds[1],
+                })
+            );
+            historyEvents.push(
+                new TimerCreatedEvent({
+                    eventId: 2,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                    fireAt: firstMoment.add(100, "ms").add(retryInterval, "ms").toDate(),
+                })
+            );
+            historyEvents.push(
+                new OrchestratorCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 2,
+                })
+            );
+        }
+
+        if (iteration >= 3) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(1, "s").add(retryInterval, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                })
+            );
+            historyEvents.push(
+                new TimerFiredEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").add(retryInterval, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                    fireAt: firstMoment.add(100, "s").add(retryInterval, "ms").toDate(),
+                    timerId: 2,
+                })
+            );
+            historyEvents.push(
+                new SubOrchestrationInstanceCreatedEvent({
+                    eventId: 3,
+                    timestamp: firstMoment.add(100, "ms").add(retryInterval, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                    name: "SayHelloInline",
+                    input: "Tokyo",
+                    instanceId: instanceIds[2],
+                })
+            );
+            historyEvents.push(
+                new OrchestratorCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment.add(100, "ms").toDate(),
+                    isPlayed: iteration > 3,
+                })
+            );
+        }
+
+        if (iteration >= 4) {
+            historyEvents.push(
+                new OrchestratorStartedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment
+                        .add(100, "s")
+                        .add(retryInterval, "ms")
+                        .add(100, "ms")
+                        .toDate(),
+                    isPlayed: iteration > 4,
+                })
+            );
+            historyEvents.push(
+                new SubOrchestrationInstanceCompletedEvent({
+                    eventId: -1,
+                    timestamp: firstMoment
+                        .add(100, "s")
+                        .add(retryInterval, "ms")
+                        .add(100, "ms")
+                        .toDate(),
+                    isPlayed: iteration > 4,
+                    result: JSON.stringify(`Hello, Tokyo!`),
+                    taskScheduledId: 3,
+                    instanceId: instanceIds[2],
+                })
+            );
+        }
+
+        return historyEvents;
+    }
+
     public static GetThrowsExceptionFromActivityReplayOne(firstTimestamp: Date): HistoryEvent[] {
         return [
             new OrchestratorStartedEvent({