Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

azure-pipelines-task-lib

Package Overview
Dependencies
Maintainers
6
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-pipelines-task-lib - npm Package Compare versions

Comparing version 4.12.0 to 4.12.1

7

mock-test.d.ts

@@ -13,3 +13,3 @@ export declare class MockTestRunner {

warningIssues: string[];
LoadAsync(testPath: string, taskJsonPath?: string): Promise<MockTestRunner>;
LoadAsync(testPath?: string, taskJsonPath?: string): Promise<MockTestRunner>;
get failed(): boolean;

@@ -22,8 +22,3 @@ ran(cmdline: string): boolean;

runAsync(nodeVersion?: number): Promise<void>;
/**
* @deprecated This method uses library which is not prefered to use on production
*/
run(nodeVersion?: number): void;
private getNodePath;
private getNodePathSync;
private getNodeVersion;

@@ -30,0 +25,0 @@ private getTaskJsonPath;

36

mock-test.js

@@ -42,3 +42,2 @@ "use strict";

var fs = require("fs");
var ncp = require("child_process");
var os = require("os");

@@ -48,3 +47,2 @@ var path = require("path");

var shelljs = require("shelljs");
var deasync = require("deasync");
var Downloader = require("nodejs-file-downloader");

@@ -70,3 +68,2 @@ var COMMAND_TAG = '[command]';

this._testPath = testPath;
this.nodePath = this.getNodePathSync();
}

@@ -86,4 +83,8 @@ MockTestRunner.prototype.LoadAsync = function (testPath, taskJsonPath) {

}
this._taskJsonPath = taskJsonPath || '';
this._testPath = testPath;
if (testPath) {
this._testPath = testPath;
}
if (taskJsonPath) {
this._taskJsonPath = taskJsonPath;
}
_a = this;

@@ -140,4 +141,11 @@ return [4 /*yield*/, this.getNodePath()];

nodePath = _a.sent();
_a.label = 2;
return [3 /*break*/, 4];
case 2:
if (!!nodePath) return [3 /*break*/, 4];
return [4 /*yield*/, this.getNodePath()];
case 3:
nodePath = _a.sent();
this.nodePath = nodePath;
_a.label = 4;
case 4:
spawn = cp.spawnSync(nodePath, [this._testPath]);

@@ -207,10 +215,2 @@ // Clean environment

};
/**
* @deprecated This method uses library which is not prefered to use on production
*/
MockTestRunner.prototype.run = function (nodeVersion) {
var completeExecution = false;
this.runAsync(nodeVersion).then(function (t) { return completeExecution = true; });
deasync.loopWhile(function () { return !completeExecution; });
};
// Returns a path to node.exe with the correct version for this task (based on if its node10 or node)

@@ -249,8 +249,2 @@ MockTestRunner.prototype.getNodePath = function (nodeVersion) {

};
MockTestRunner.prototype.getNodePathSync = function (nodeVersion) {
var nodePath = '';
this.getNodePath(nodeVersion).then(function (t) { return nodePath = t; });
deasync.loopWhile(function () { return nodePath == ''; });
return nodePath;
};
// Determines the correct version of node to use based on the contents of the task's task.json. Defaults to Node 16.

@@ -399,3 +393,3 @@ MockTestRunner.prototype.getNodeVersion = function () {

try {
ncp.execSync("tar -xzf \"" + path.join(downloadDestination, tarGzName) + "\"");
cp.execSync("tar -xzf \"" + path.join(downloadDestination, tarGzName) + "\"");
}

@@ -402,0 +396,0 @@ catch (_b) {

{
"name": "azure-pipelines-task-lib",
"version": "4.12.0",
"version": "4.12.1",
"description": "Azure Pipelines Task SDK",

@@ -31,3 +31,2 @@ "main": "./task.js",

"adm-zip": "^0.5.10",
"deasync": "^0.1.28",
"minimatch": "3.0.5",

@@ -34,0 +33,0 @@ "nodejs-file-downloader": "^4.11.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc