azure-pipelines-task-lib 4.0.0-preview → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mock-test.js CHANGED
@@ -126,20 +126,17 @@ var MockTestRunner = /** @class */ (function () {
126
126
  var version = nodeVersion || this.getNodeVersion();
127
127
  var downloadVersion;
128
128
  switch (version) {
129
- case 5:
130
- downloadVersion = 'v5.10.1';
131
- break;
132
129
  case 6:
133
130
  downloadVersion = 'v6.17.1';
134
131
  break;
135
132
  case 10:
136
133
  downloadVersion = 'v10.21.0';
137
134
  break;
138
- case 14:
139
- downloadVersion = 'v14.11.0';
135
+ case 16:
136
+ downloadVersion = 'v16.13.0';
140
137
  break;
141
138
  default:
142
- throw new Error('Invalid node version, must be 5, 6, 10, or 14 (received ' + version + ')');
139
+ throw new Error('Invalid node version, must be 6, 10, or 16 (received ' + version + ')');
143
140
  }
144
141
  // Install node in home directory if it isn't already there.
145
142
  var downloadDestination = path.join(downloadDirectory, 'node' + version);
@@ -151,12 +148,12 @@ var MockTestRunner = /** @class */ (function () {
151
148
  return this.downloadNode(downloadVersion, downloadDestination);
152
149
  }
153
150
  };
154
- // Determines the correct version of node to use based on the contents of the task's task.json. Defaults to Node 14.
151
+ // Determines the correct version of node to use based on the contents of the task's task.json. Defaults to Node 16.
155
152
  MockTestRunner.prototype.getNodeVersion = function () {
156
153
  var taskJsonPath = this.getTaskJsonPath();
157
154
  if (!taskJsonPath) {
158
- console.warn('Unable to find task.json, defaulting to use Node 14');
159
- return 10;
155
+ console.warn('Unable to find task.json, defaulting to use Node 16');
156
+ return 16;
160
157
  }
161
158
  var taskJsonContents = fs.readFileSync(taskJsonPath, { encoding: 'utf-8' });
162
159
  var taskJson = JSON.parse(taskJsonContents);
@@ -166,9 +163,9 @@ var MockTestRunner = /** @class */ (function () {
166
163
  || taskJson['postjobexecution']);
167
164
  var keys = Object.keys(execution);
168
165
  for (var i = 0; i < keys.length; i++) {
169
- if (keys[i].toLowerCase() == 'node14') {
170
- // Prefer node 14 and return immediately.
171
- return 14;
166
+ if (keys[i].toLowerCase() == 'node16') {
167
+ // Prefer node 16 and return immediately.
168
+ return 16;
172
169
  }
173
170
  else if (keys[i].toLowerCase() == 'node10') {
174
171
  // Prefer node 10 and return immediately.
@@ -179,8 +176,8 @@ var MockTestRunner = /** @class */ (function () {
179
176
  }
180
177
  }
181
178
  if (!nodeVersionFound) {
182
- console.warn('Unable to determine execution type from task.json, defaulting to use Node 10');
183
- return 10;
179
+ console.warn('Unable to determine execution type from task.json, defaulting to use Node 16');
180
+ return 16;
184
181
  }
185
182
  return 6;
186
183
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azure-pipelines-task-lib",
3
- "version": "4.0.0-preview",
3
+ "version": "4.0.2",
4
4
  "description": "Azure Pipelines Task SDK",
5
5
  "main": "./task.js",
6
6
  "typings": "./task.d.ts",
@@ -28,7 +28,7 @@
28
28
  "homepage": "https://github.com/Microsoft/azure-pipelines-task-lib",
29
29
  "dependencies": {
30
30
  "minimatch": "3.0.5",
31
- "mockery": "^1.7.0",
31
+ "mockery": "^2.1.0",
32
32
  "q": "^1.5.1",
33
33
  "semver": "^5.1.0",
34
34
  "shelljs": "^0.8.5",
package/toolrunner.js CHANGED
@@ -509,6 +509,7 @@ var ToolRunner = /** @class */ (function (_super) {
509
509
  };
510
510
  ToolRunner.prototype._getSpawnSyncOptions = function (options) {
511
511
  var result = {};
512
+ result.maxBuffer = 1024 * 1024 * 1024;
512
513
  result.cwd = options.cwd;
513
514
  result.env = options.env;
514
515
  result.shell = options.shell;