From 27c4916c8e102165b39663f7c64008a64cf7cc64 Mon Sep 17 00:00:00 2001 From: Egor Bryzgalov Date: Mon, 14 Dec 2020 12:30:44 +0300 Subject: [PATCH 1/5] Fixed TS error. Updated package-lock --- Tasks/MavenV3/maventask.ts | 6 +- Tasks/MavenV3/package-lock.json | 331 +++++++++++++++++--------------- 2 files changed, 176 insertions(+), 161 deletions(-) diff --git a/Tasks/MavenV3/maventask.ts b/Tasks/MavenV3/maventask.ts index 083cd1c39283..f9e631527b40 100644 --- a/Tasks/MavenV3/maventask.ts +++ b/Tasks/MavenV3/maventask.ts @@ -121,6 +121,10 @@ if (specifiedJavaHome) { tl.setVariable('JAVA_HOME', specifiedJavaHome); } +function checkExistance(obj: any): Boolean { + return !!obj; +} + async function execBuild() { // Maven task orchestration occurs as follows: // 1. Check that Maven exists by executing it to retrieve its version. @@ -249,7 +253,7 @@ async function execBuild() { userRunFailed = true; // Record the error and continue }) .then(function (code) { - if (code && code['code'] != 0) { + if (checkExistance(code) && code['code'] != 0) { userRunFailed = true; } // 4. Attempt to collate and upload static code analysis build summaries and artifacts. diff --git a/Tasks/MavenV3/package-lock.json b/Tasks/MavenV3/package-lock.json index aa27266546c5..78323abba45e 100644 --- a/Tasks/MavenV3/package-lock.json +++ b/Tasks/MavenV3/package-lock.json @@ -39,9 +39,9 @@ } }, "@types/mocha": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", - "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==" + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==" }, "@types/mockery": { "version": "1.4.29", @@ -49,9 +49,14 @@ "integrity": "sha1-m6It838H43gP/4Ux0aOOYz+UV6U=" }, "@types/node": { - "version": "10.17.48", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.48.tgz", - "integrity": "sha512-Agl6xbYP6FOMDeAsr3QVZ+g7Yzg0uhPHWx0j5g4LFdUBHVtqtU+gH660k/lCEe506jJLOGbEzsnqPDTZGJQLag==" + "version": "10.17.49", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.49.tgz", + "integrity": "sha512-PGaJNs5IZz5XgzwJvL/1zRfZB7iaJ5BydZ8/Picm+lUNYoNO9iVTQkVy5eUh0dZDrx3rBOIs3GCbCRmMuYyqwg==" + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" }, "@types/qs": { "version": "6.9.5", @@ -59,9 +64,9 @@ "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==" }, "@types/semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==" }, "@types/uuid": { "version": "3.4.9", @@ -74,14 +79,14 @@ "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, "asap": { @@ -113,9 +118,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "azure-devops-node-api": { "version": "8.0.0", @@ -155,6 +160,21 @@ "request": "^2.74.0", "strip-bom": "^3.0.0", "xml2js": "^0.4.17" + }, + "dependencies": { + "glob": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.0.tgz", + "integrity": "sha1-Nq3YVtdG0NmeTMJ5e7oa4sZycv0=", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "azure-pipelines-tasks-codecoverage-tools": { @@ -171,13 +191,6 @@ "os": "^0.1.1", "strip-bom": "^3.0.0", "xml2js": "^0.4.17" - }, - "dependencies": { - "@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", - "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" - } } }, "azure-pipelines-tasks-java-common": { @@ -191,11 +204,6 @@ "semver": "^7.3.2" }, "dependencies": { - "@types/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==" - }, "semver": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", @@ -233,42 +241,42 @@ "version": "1.5.2", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" - }, - "azure-pipelines-tool-lib": { - "version": "1.0.0-preview.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.0.0-preview.0.tgz", - "integrity": "sha512-Ao4A/r7q6qTTeDqa40U9/58kw5uC6r29cTJ7386uMSl7RgNu19ja+nN0Tnvl6dQTCjajMjqiT+UADuDi5zhucw==", - "requires": { - "@types/semver": "^5.3.0", - "@types/uuid": "^3.4.5", - "azure-pipelines-task-lib": "^3.0.6-preview.0", - "semver": "^5.7.0", - "semver-compare": "^1.0.0", - "typed-rest-client": "^1.7.3", - "uuid": "^3.3.2" - }, - "dependencies": { - "typed-rest-client": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.0.tgz", - "integrity": "sha512-Nu1MrdH6ECrRW5gHoRAdubgCs4oH6q5/J76jsEC8bVDfvVoVPkigukPalhMHPwb7ZvpsZqPptd5zpt/QdtrdBw==", - "requires": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "1.8.3" - } - } - } - }, - "qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" + } + } + }, + "azure-pipelines-tool-lib": { + "version": "1.0.0-preview.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.0.0-preview.0.tgz", + "integrity": "sha512-Ao4A/r7q6qTTeDqa40U9/58kw5uC6r29cTJ7386uMSl7RgNu19ja+nN0Tnvl6dQTCjajMjqiT+UADuDi5zhucw==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.0.6-preview.0", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.7.3", + "uuid": "^3.3.2" + }, + "dependencies": { + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.0.tgz", + "integrity": "sha512-Nu1MrdH6ECrRW5gHoRAdubgCs4oH6q5/J76jsEC8bVDfvVoVPkigukPalhMHPwb7ZvpsZqPptd5zpt/QdtrdBw==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "1.8.3" + } } } }, @@ -337,15 +345,10 @@ "lodash.some": "^4.4.0" } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "requires": { "delayed-stream": "~1.0.0" } @@ -456,14 +459,14 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "forever-agent": { "version": "0.6.1", @@ -471,23 +474,13 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", "requires": { "asynckit": "^0.4.0", - "combined-stream": "1.0.6", + "combined-stream": "^1.0.6", "mime-types": "^2.1.12" - }, - "dependencies": { - "combined-stream": { - "version": "1.0.6", - "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "~1.0.0" - } - } } }, "fs-extra": { @@ -526,22 +519,22 @@ } }, "glob": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.0.tgz", - "integrity": "sha1-Nq3YVtdG0NmeTMJ5e7oa4sZycv0=", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.2", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, "har-schema": { "version": "2.0.0", @@ -549,11 +542,11 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "requires": { - "ajv": "^5.3.0", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -629,14 +622,14 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "interpret": { "version": "1.4.0", @@ -694,9 +687,9 @@ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-stringify-safe": { "version": "5.0.1", @@ -705,7 +698,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "requires": { "graceful-fs": "^4.1.6" @@ -809,26 +802,19 @@ "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", "requires": { "inherits": "^2.0.4" - }, - "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - } } }, "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" }, "mime-types": { - "version": "2.1.20", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", - "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "requires": { - "mime-db": "~1.36.0" + "mime-db": "1.44.0" } }, "minimatch": { @@ -904,14 +890,14 @@ } }, "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "q": { "version": "1.5.1", @@ -919,9 +905,9 @@ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" }, "readable-stream": { "version": "2.3.7", @@ -946,9 +932,9 @@ } }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -957,7 +943,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -967,9 +953,26 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } } }, "resolve": { @@ -982,11 +985,11 @@ } }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { @@ -1030,9 +1033,9 @@ "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" }, "sshpk": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.1.tgz", - "integrity": "sha512-mSdgNUaidk+dRU5MhYtN9zebdzF2iG0cNPWy8HG+W8y+fT1JnSkh0fzzpjOa0L7P8i1Rscz38t0h4gPcKz43xA==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -1102,12 +1105,12 @@ } }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "tunnel": { @@ -1153,6 +1156,14 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, + "uri-js": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", + "requires": { + "punycode": "^2.1.0" + } + }, "utf8": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", @@ -1164,9 +1175,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "verror": { "version": "1.10.0", @@ -1184,18 +1195,18 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", "requires": { "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" + "xmlbuilder": "~11.0.0" } }, "xmlbuilder": { - "version": "9.0.7", - "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" }, "yallist": { "version": "4.0.0", From d0c0a34d6610396b25f7ec2733068a3ef9eb5114 Mon Sep 17 00:00:00 2001 From: Egor Bryzgalov Date: Mon, 14 Dec 2020 13:42:21 +0300 Subject: [PATCH 2/5] Added logs for testing purposes --- Tasks/MavenV3/Tests/L0.ts | 38 ++++++++++++++++++------------------- Tasks/MavenV3/task.loc.json | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Tasks/MavenV3/Tests/L0.ts b/Tasks/MavenV3/Tests/L0.ts index e59a436ac411..f69aeef67411 100644 --- a/Tasks/MavenV3/Tests/L0.ts +++ b/Tasks/MavenV3/Tests/L0.ts @@ -50,7 +50,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); const mavenHome = "/anotherHome/"; const mavenBin = path.join(mavenHome, "bin", "mvn"); assert(testRunner.ran(`${mavenBin} -version`), "it should have run mvn -version"); @@ -69,7 +69,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.invokedToolCount == 0, "should not have run maven"); assert(testRunner.failed, "task should have failed"); assert(testRunner.createdErrorIssue("Unhandled: Input required: mavenVersionSelection"), "Did not create expected error issue, issues created: " + testRunner.errorIssues); @@ -83,7 +83,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.invokedToolCount == 0, "should not have run maven"); assert(testRunner.failed, "task should have failed"); assert(testRunner.createdErrorIssue("Unhandled: Input required: mavenFeedAuthenticate"), "Did not create expected error issue, issues created: " + testRunner.errorIssues); @@ -97,7 +97,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.ran("/home/bin/maven/bin/mvn -version"), "it should have run mvn -version"); assert(testRunner.ran("/home/bin/maven/bin/mvn -f pom.xml help:effective-pom"), "it should have generated effective pom"); assert(testRunner.ran("/home/bin/maven/bin/mvn -f pom.xml package"), "it should have run mvn -f pom.xml package"); @@ -114,7 +114,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); const mavenHome = "/home/bin/maven2/"; const mavenBin = path.join(mavenHome, "bin", "mvn"); assert(testRunner.ran(`${mavenBin} -version`), "it should have run mvn -version"); @@ -133,7 +133,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.invokedToolCount == 0, "should not have run maven"); assert(testRunner.failed, "task should have failed"); assert(testRunner.createdErrorIssue("Unhandled: Input required: mavenPath"), "Did not create expected error issue, issues created: " + testRunner.errorIssues); @@ -147,7 +147,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.invokedToolCount == 0, "should not have run maven"); assert(testRunner.failed, "task should have failed"); assert(testRunner.createdErrorIssue("Unhandled: Not found /not/a/valid/maven/path/"), "Did not create expected error issue, issues created: " + testRunner.errorIssues); @@ -161,7 +161,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); const mavenHome = "/home/bin/maven2/"; const mavenBin = path.join(mavenHome, "bin", "mvn"); assert(testRunner.ran(`${mavenBin} -version`), "it should have run mvn -version"); @@ -180,7 +180,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); const mavenHome = "/home/bin/maven2"; const mavenBin = path.join(mavenHome, "bin", "mvn"); assert(testRunner.ran(`${mavenBin} -version`), "it should have run mvn -version"); @@ -200,7 +200,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); const tempDirectory = getTempDir(); const settingsPath = path.join(tempDirectory, "settings.xml"); const mavenInfoPath = path.join(tempDirectory, ".mavenInfo", "MavenInfo-"); @@ -221,7 +221,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.ran("/home/bin/maven/bin/mvn -version"), "it should have run mvn -version"); assert(testRunner.ran(`/home/bin/maven/bin/mvn -f pom.xml package`), "it should have run mvn -f pom.xml package"); assert(testRunner.invokedToolCount == 2, "should have only run maven 2 times: " + testRunner.invokedToolCount); @@ -238,7 +238,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.ran("/home/bin/maven/bin/mvn -version"), "it should have run mvn -version"); assert(testRunner.ran(`/home/bin/maven/bin/mvn -f pom.xml package`), "it should have run mvn -f pom.xml package"); assert(testRunner.invokedToolCount == 2, "should have only run maven 2 times: " + testRunner.invokedToolCount); @@ -254,7 +254,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); const settingsPath = path.join(getTempDir(), "settings.xml"); const options = `-DoptWithEscaping={\"serverUri\": \"http://elasticsearch:9200\",\"username\": \"elastic\", \"password\": \"changeme\", \"connectionTimeout\": 30000}`; @@ -275,11 +275,11 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); const settingsPath = path.join(getTempDir(), "settings.xml"); const options = "/o -s settings.xml /p /t"; const optionsWithoutSettings = "/o /p /t"; - + console.log(testRunner.stdout); assert(testRunner.ran("/home/bin/maven/bin/mvn -version"), "it should have run mvn -version"); assert(testRunner.ran(`/home/bin/maven/bin/mvn -f pom.xml help:effective-pom ${options}`), "it should have generated effective pom"); assert(testRunner.ran(`/home/bin/maven/bin/mvn -f pom.xml -s ${settingsPath} ${optionsWithoutSettings} package`), `it should have run mvn -f pom.xml -s ${settingsPath} ${optionsWithoutSettings} package`); @@ -296,7 +296,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.invokedToolCount == 0, "should not have run maven"); assert(testRunner.failed, "task should have failed"); assert(testRunner.createdErrorIssue("Unhandled: Input required: goals"), "Did not create expected error issue, issues created: " + testRunner.errorIssues); @@ -310,7 +310,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.stdOutContained("##vso[results.publish type=JUnit;mergeResults=true;publishRunAttachments=true;resultFiles=/user/build/fun/test-123.xml;]"), "it should have published test results"); assert(testRunner.stderr.length == 0, "should not have written to stderr=" + testRunner.stderr); assert(testRunner.succeeded, "task should have succeeded"); @@ -324,7 +324,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.invokedToolCount == 0, "should not have run maven"); assert(testRunner.failed, "task should have failed"); assert(testRunner.createdErrorIssue("Unhandled: Input required: testResultsFiles"), "Did not create expected error issue, issues created: " + testRunner.errorIssues); @@ -338,7 +338,7 @@ describe("Maven L0 Suite", function () { const testRunner = new MockTestRunner(testPath); testRunner.run(); - + console.log(testRunner.stdout); assert(testRunner.invokedToolCount == 0, "should not have run maven"); assert(testRunner.failed, "task should have failed"); assert(testRunner.createdErrorIssue("Unhandled: Input required: javaHomeSelection"), "Did not create expected error issue, issues created: " + testRunner.errorIssues); diff --git a/Tasks/MavenV3/task.loc.json b/Tasks/MavenV3/task.loc.json index 72caf9757c74..05cab82d6c6e 100644 --- a/Tasks/MavenV3/task.loc.json +++ b/Tasks/MavenV3/task.loc.json @@ -432,4 +432,4 @@ "UsingAuthFeed": "ms-resource:loc.messages.UsingAuthFeed", "NoTestResults": "ms-resource:loc.messages.NoTestResults" } -} +} \ No newline at end of file From 299abd89631554ba354521be7c4fa1e5596b0925 Mon Sep 17 00:00:00 2001 From: Egor Bryzgalov Date: Mon, 14 Dec 2020 16:16:34 +0300 Subject: [PATCH 3/5] Attempt to fix test --- Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts b/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts index ee60624896fa..1d354feea67d 100644 --- a/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts +++ b/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts @@ -34,12 +34,14 @@ setInputs(taskRunner, inputs); // Env vars in the mock framework must replace '.' with '_' const mavenHome = "/anotherHome/"; const mavenBin = path.join(mavenHome, "bin", "mvn"); +const junitBin = path.join(mavenHome, "bin", "junit"); process.env["M2_HOME"] = mavenHome; // Provide answers for task mock const answers: TaskLibAnswers = { which: { - mvn: mavenBin + mvn: mavenBin, + JUnit: junitBin }, checkPath: { [`${mavenBin}`]: true, @@ -59,6 +61,10 @@ const answers: TaskLibAnswers = { code: 0, stdout: "Maven package done" }, + [`${junitBin} resultfiles=/user/build/fun/test-123.xml mergeResults=true publishrunAttachments=true testRunSystem=VSTS\\ -\\ maven`]: { + code: 0, + stdout: 'published' + } }, findMatch: { "**/TEST-*.xml": [ From bd921bc3e1f3a717fd8fb5e5804a69b44d9646ba Mon Sep 17 00:00:00 2001 From: Egor Bryzgalov Date: Mon, 14 Dec 2020 16:25:46 +0300 Subject: [PATCH 4/5] Update L0DefaultsWithHomeSet.ts --- Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts b/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts index 1d354feea67d..ecb37a42b040 100644 --- a/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts +++ b/Tasks/MavenV3/Tests/L0DefaultsWithHomeSet.ts @@ -20,7 +20,7 @@ const inputs: MavenTaskInputs = { goals: "package", javaHomeSelection: "JDKVersion", jdkVersion: "default", - publishJUnitResults: true, + publishJUnitResults: false, testResultsFiles: "**/TEST-*.xml", mavenOpts: "-Xmx2048m", checkstyleAnalysisEnabled: false, From 3b860bc88a11dbd827d9270769e34d7b20b99b78 Mon Sep 17 00:00:00 2001 From: Egor Bryzgalov Date: Mon, 14 Dec 2020 16:29:49 +0300 Subject: [PATCH 5/5] Update L0DefaultsWithNoHomeSet.ts --- Tasks/MavenV3/Tests/L0DefaultsWithNoHomeSet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tasks/MavenV3/Tests/L0DefaultsWithNoHomeSet.ts b/Tasks/MavenV3/Tests/L0DefaultsWithNoHomeSet.ts index 23e3f1fbb185..3bd239d12cd5 100644 --- a/Tasks/MavenV3/Tests/L0DefaultsWithNoHomeSet.ts +++ b/Tasks/MavenV3/Tests/L0DefaultsWithNoHomeSet.ts @@ -20,7 +20,7 @@ const inputs: MavenTaskInputs = { goals: "package", javaHomeSelection: "JDKVersion", jdkVersion: "default", - publishJUnitResults: true, + publishJUnitResults: false, testResultsFiles: "**/TEST-*.xml", mavenOpts: "-Xmx2048m", checkstyleAnalysisEnabled: false,