diff --git a/node/docs/minagent.md b/node/docs/minagent.md index c72aa5f93..2d30abfc0 100644 --- a/node/docs/minagent.md +++ b/node/docs/minagent.md @@ -26,6 +26,10 @@ Use the details below to determine when specific agent features were added: * `node` handler - Added in 1.95.1. Used node v5.10.1. - Updated in 2.117.0 to use node v6.10.3. +* `node10` handler + - Added in 2.144.0. Used node v10.x +* `node16` handler + - Added in 2.206.1. Used node v16.x * `powershell3` handler - Added in 1.95.1 - Updated in 1.97 to propagate `Data` property for endpoints diff --git a/node/docs/nodeEnvironment.md b/node/docs/nodeEnvironment.md index 3e0e2a4dc..b729283cf 100644 --- a/node/docs/nodeEnvironment.md +++ b/node/docs/nodeEnvironment.md @@ -12,6 +12,16 @@ To leverage this capability, simply add `Node10` as an execution target: }, ``` +With agent version 2.206.1 Node 16 can be used. + +``` +"execution": { + "Node16": { + "target": "path/to/entry" + } +}, +``` + Existing `Node` execution targets will still resolve to a Node 6 environment for now to maintain back-compat. ### Testing your task diff --git a/node/docs/nodeVersioning.md b/node/docs/nodeVersioning.md index 9c69015ca..91a805ce1 100644 --- a/node/docs/nodeVersioning.md +++ b/node/docs/nodeVersioning.md @@ -2,16 +2,16 @@ ## Agent Node Handler -The agent currently has 2 different node handlers that it can use to execute node tasks: Node 6 and Node 10. +The agent currently has 3 different node handlers that it can use to execute node tasks: Node 6, Node 10, Node 16. The handler used depends on the `execution` property specified in the tasks `task.json`. -If the `execution` property is specified to be `Node`, the task will run on the Node 6 handler, if it is specified to be `Node10` it will run on the Node 10 handler. +If the `execution` property is specified to be `Node`, the task will run on the Node 6 handler, for `Node10` it will run on the Node 10 handler, for `Node16` it will run on the Node 16 handler. ## Mock-test Node Handler [Unit testing](https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#step-2-unit-testing-your-task-scripts) of tasks can be done using the task-lib's built in mock-task functionality. To ensure tests are run in the same environment as the agent, this library looks for a `task.json` file in the same directory as the supplied task entry point. If no `task.json` is found it searches all ancestor directories as well. -If the `task.json` is still not found, the library defaults to Node 10, otherwise it uses the appropriate handler based on the `execution` property. +If the `task.json` is still not found, the library defaults to Node 16, otherwise it uses the appropriate handler based on the `execution` property. If this version of node is not found on the path, the library downloads the appropriate version. ### Behavior overrides