You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This raises some confusion as to which version of Node I should actually be using to build and test my extension.
For example, if I use the MockTestRunner it will currently default to Node 6, which means code I've written in the extension using Node 20 (the "latest version of Node.js" per the tutorial docs) will totally not run in the mock testing scenario.
I see I can tell the MockTestRunner to use Node 16, but if the SDK is only going to work on Node 10 (per the README) then I'm confused as to which version I should use during testing.
I also can't tell what the version of Node is that will actually end up running my task on the build agent. Can I control that somehow? Is there a default that always gets used? Is it one of the 6 / 10 / 16 versions?
The conflicts between the documentation make it challenging to know what to do here.
I expect consistency across the documentation: build, develop, and test in a specific recommended version or set of versions. I expect instructions explaining how to specify which version your given extension requires if that's an option; or an explanation that it's out of my control and I should look at [insert some link] for the version that is currently in use.
Actual behaviour
Unit tests in Mocha pass but running with the MockTestRunner causes odd Node compatibility errors at runtime like this because it's defaulting to Node 6:
"Error: Cannot find module 'fs/promises'
at Function.Module._resolveFilename (module.js:476:15)
at Module._load (module.js:424:25)
at Function.hookedLoader [as _load] (/Users/tillig/my-task/MyTask/node_modules/mockery/mockery.js:111:12)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/tillig/tillig/my-task/MyTask/SomeFolder/FileReader.js:36:25)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)"
Environment
azure-pipelines-task-lib version: 4.4.0
Issue Description
In the Node documentation in this repo it indicates the task SDK is in the process of updating from Node 6 to Node 10 as the default:
The current build for the task library is using Node 16.
The tutorial documentation on how to build a custom extension using this SDK says that you should use the latest version of Node.
This raises some confusion as to which version of Node I should actually be using to build and test my extension.
For example, if I use the
MockTestRunner
it will currently default to Node 6, which means code I've written in the extension using Node 20 (the "latest version of Node.js" per the tutorial docs) will totally not run in the mock testing scenario.I see I can tell the
MockTestRunner
to use Node 16, but if the SDK is only going to work on Node 10 (per the README) then I'm confused as to which version I should use during testing.The official Azure Pipelines Tasks look like they build with Node 10.
I also can't tell what the version of Node is that will actually end up running my task on the build agent. Can I control that somehow? Is there a default that always gets used? Is it one of the 6 / 10 / 16 versions?
The conflicts between the documentation make it challenging to know what to do here.
Possibly related:
engines
inpackage.json
#946Expected behaviour
I expect consistency across the documentation: build, develop, and test in a specific recommended version or set of versions. I expect instructions explaining how to specify which version your given extension requires if that's an option; or an explanation that it's out of my control and I should look at [insert some link] for the version that is currently in use.
Actual behaviour
Unit tests in Mocha pass but running with the
MockTestRunner
causes odd Node compatibility errors at runtime like this because it's defaulting to Node 6:Steps to reproduce
See:
MockTaskRunner
Logs
N/A
The text was updated successfully, but these errors were encountered: