When both a preuninstall and a postuninstall script are defined in the scripts section of package.json, my preversion script appears under the "Custom" node in TRX.
Steps to recreate
Create a new ASP.NET app with a package.json file.
The following screenshot depicts the current behavior:
Since version is a reserved npm script name, the preversion script should appear under the "Defaults" node in TRX. An exception is being thrown and swallowed by the catch block in the LoadTasks method of TaskParser.cs. The exception is caused by adding the "uninstall" key to a List twice.
Expected behavior
The preversion script should appear under a read-only version node within TRX's "Defaults" node:
Installed product versions
Description
When both a
preuninstall
and apostuninstall
script are defined in thescripts
section of package.json, mypreversion
script appears under the "Custom" node in TRX.Steps to recreate
Current behavior
The following screenshot depicts the current behavior:
Since
version
is a reserved npm script name, thepreversion
script should appear under the "Defaults" node in TRX. An exception is being thrown and swallowed by the catch block in the LoadTasks method of TaskParser.cs. The exception is caused by adding the "uninstall" key to a List twice.Expected behavior
The
preversion
script should appear under a read-onlyversion
node within TRX's "Defaults" node: