New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stryker

Package Overview
Dependencies
Maintainers
2
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stryker - npm Package Compare versions

Comparing version 0.5.8 to 0.5.9

src/isolated-runner/ResilientTestRunnerFactory.d.ts

11

CHANGELOG.md

@@ -0,1 +1,12 @@

<a name="0.5.9"></a>
## [0.5.9](https://github.com/stryker-mutator/stryker/compare/v0.5.8...v0.5.9) (2017-03-01)
### Bug Fixes
* **fileUtilsSpec:** Fix test naming ([#240](https://github.com/stryker-mutator/stryker/issues/240)) ([f1321be](https://github.com/stryker-mutator/stryker/commit/f1321be))
* **IsolatedTestRunner:** Fix channel closed error ([#219](https://github.com/stryker-mutator/stryker/issues/219)) ([202d4b5](https://github.com/stryker-mutator/stryker/commit/202d4b5))
<a name="0.5.8"></a>

@@ -2,0 +13,0 @@ ## [0.5.8](https://github.com/stryker-mutator/stryker/compare/v0.5.7...v0.5.8) (2017-02-03)

8

package.json
{
"name": "stryker",
"version": "0.5.8",
"version": "0.5.9",
"description": "The extendable JavaScript mutation testing framework",

@@ -49,3 +49,5 @@ "main": "src/Stryker.js",

"Jeremy Nagel <jeremy.nagel@learnosity.com>",
"Michael Williamson <mike@zwobble.org>"
"MarktHart <git@markhart.nl>",
"Michael Williamson <mike@zwobble.org>",
"Willem Meints <willem@mein-design.nl>"
],

@@ -116,3 +118,3 @@ "license": "Apache-2.0",

"tslint": "^4.4.2",
"typescript": "^2.1.4"
"typescript": "~2.2.1"
},

@@ -119,0 +121,0 @@ "peerDependencies": {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var config_1 = require("stryker-api/config");

@@ -61,2 +62,3 @@ var log4js = require("log4js");

log.info('No config file specified. Running with command line arguments');
// if no config file path is passed, we create and return a dummy config module.
}

@@ -78,4 +80,3 @@ return configModule;

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ConfigReader;
//# sourceMappingURL=ConfigReader.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var log4js = require("log4js");

@@ -63,3 +64,2 @@ var stream_1 = require("stream");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = CoverageInstrumenter;

@@ -66,0 +66,0 @@ var cloneFunctionFragment = " \n function clone(source) {\n var result = source;\n if (Array.isArray(source)) {\n result = [];\n source.forEach(function (child, index) {\n result[index] = clone(child);\n });\n } else if (typeof source == \"object\") {\n // it is an object literal\n result = {};\n for (var i in source) {\n result[i] = clone(source[i]);\n }\n }\n return result;\n }";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -49,4 +50,3 @@ var stream_1 = require("stream");

}(stream_1.Transform));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = CoverageInstrumenterStream;
//# sourceMappingURL=CoverageInstrumenterStream.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=FileStatements.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -82,3 +83,2 @@ var fileUtils_1 = require("./utils/fileUtils");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = InputFileResolver;

@@ -85,0 +85,0 @@ var PatternResolver = (function () {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IsolatedRunnerOptions.js.map

@@ -7,3 +7,3 @@ /// <reference types="node" />

* Runs the given test runner in a child process and forwards reports about test results
* Also implements timeout-mechanisme (on timeout, restart the child runner and report timeout)
* Also implements timeout-mechanism (on timeout, restart the child runner and report timeout)
*/

@@ -14,18 +14,11 @@ export default class TestRunnerChildProcessAdapter extends EventEmitter implements TestRunner {

private workerProcess;
private initPromiseFulfillmentCallback;
private runPromiseFulfillmentCallback;
private disposePromiseFulfillmentCallback;
private initPromise;
private runPromise;
private disposingPromise;
private currentTimeoutTimer;
private currentRunStartedTimestamp;
private isDisposing;
private currentTask;
constructor(realTestRunnerName: string, options: IsolatedRunnerOptions);
private startWorker();
private listenToWorkerProcess();
private logReceivedUnexpectedMessageWarning(message);
private logReceivedMessageWarning(message);
init(): Promise<any>;
run(options: RunOptions): Promise<RunResult>;
dispose(): Promise<any>;
dispose(): Promise<undefined>;
private sendRunCommand(options);

@@ -36,5 +29,2 @@ private send(message);

private sendDisposeCommand();
private clearCurrentTimer();
private markNoResultTimeout(timeoutMs);
private handleTimeout();
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -7,9 +8,36 @@ var events_1 = require("events");

var child_process_1 = require("child_process");
var test_runner_1 = require("stryker-api/test_runner");
var objectUtils_1 = require("../utils/objectUtils");
var Task_1 = require("../utils/Task");
var MAX_WAIT_FOR_DISPOSE = 2000;
var log = log4js.getLogger('IsolatedTestRunnerAdapter');
var MAX_WAIT_FOR_DISPOSE = 2000;
var InitTask = (function (_super) {
tslib_1.__extends(InitTask, _super);
function InitTask() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.kind = 'init';
return _this;
}
return InitTask;
}(Task_1.default));
var DisposeTask = (function (_super) {
tslib_1.__extends(DisposeTask, _super);
function DisposeTask() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.kind = 'dispose';
return _this;
}
return DisposeTask;
}(Task_1.default));
var RunTask = (function (_super) {
tslib_1.__extends(RunTask, _super);
function RunTask() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.kind = 'run';
return _this;
}
return RunTask;
}(Task_1.default));
/**
* Runs the given test runner in a child process and forwards reports about test results
* Also implements timeout-mechanisme (on timeout, restart the child runner and report timeout)
* Also implements timeout-mechanism (on timeout, restart the child runner and report timeout)
*/

@@ -50,14 +78,26 @@ var TestRunnerChildProcessAdapter = (function (_super) {

this.workerProcess.on('message', function (message) {
_this.clearCurrentTimer();
switch (message.kind) {
case 'result':
if (!_this.isDisposing) {
_this.runPromiseFulfillmentCallback(message.result);
if (_this.currentTask.kind === 'run') {
_this.currentTask.resolve(message.result);
}
else {
_this.logReceivedUnexpectedMessageWarning(message);
}
break;
case 'initDone':
_this.initPromiseFulfillmentCallback();
if (_this.currentTask.kind === 'init') {
_this.currentTask.resolve(undefined);
}
else {
_this.logReceivedUnexpectedMessageWarning(message);
}
break;
case 'disposeDone':
_this.disposePromiseFulfillmentCallback();
if (_this.currentTask.kind === 'dispose') {
_this.currentTask.resolve(undefined);
}
else {
_this.logReceivedUnexpectedMessageWarning(message);
}
break;

@@ -70,2 +110,5 @@ default:

};
TestRunnerChildProcessAdapter.prototype.logReceivedUnexpectedMessageWarning = function (message) {
log.warn("Received unexpected message from test runner worker process: \"" + message.kind + "\" while current task is " + this.currentTask.kind + ". Ignoring this message.");
};
TestRunnerChildProcessAdapter.prototype.logReceivedMessageWarning = function (message) {

@@ -75,38 +118,17 @@ log.error("Retrieved unrecognized message from child process: " + JSON.stringify(message));

TestRunnerChildProcessAdapter.prototype.init = function () {
var _this = this;
this.initPromise = new Promise(function (resolve) { return _this.initPromiseFulfillmentCallback = resolve; });
this.currentTask = new InitTask();
this.sendInitCommand();
return this.initPromise;
return this.currentTask.promise;
};
TestRunnerChildProcessAdapter.prototype.run = function (options) {
var _this = this;
this.clearCurrentTimer();
if (options.timeout) {
this.markNoResultTimeout(options.timeout);
}
this.runPromise = new Promise(function (resolve) {
_this.runPromiseFulfillmentCallback = resolve;
_this.sendRunCommand(options);
_this.currentRunStartedTimestamp = new Date();
});
return this.runPromise;
this.currentTask = new RunTask();
this.sendRunCommand(options);
return this.currentTask.promise;
};
TestRunnerChildProcessAdapter.prototype.dispose = function () {
var _this = this;
if (this.isDisposing) {
return this.disposingPromise;
}
else {
this.isDisposing = true;
this.disposingPromise = new Promise(function (resolve) { return _this.disposePromiseFulfillmentCallback = resolve; })
.then(function () {
clearTimeout(timer_1);
_this.workerProcess.kill();
_this.isDisposing = false;
});
this.clearCurrentTimer();
this.sendDisposeCommand();
var timer_1 = setTimeout(this.disposePromiseFulfillmentCallback, MAX_WAIT_FOR_DISPOSE);
return this.disposingPromise;
}
this.currentTask = new DisposeTask(MAX_WAIT_FOR_DISPOSE);
this.sendDisposeCommand();
return this.currentTask.promise
.then(function () { return _this.workerProcess.kill('SIGKILL'); });
};

@@ -120,5 +142,10 @@ TestRunnerChildProcessAdapter.prototype.sendRunCommand = function (options) {

TestRunnerChildProcessAdapter.prototype.send = function (message) {
// Serialize message before sending to preserve all javascript, including regexes and functions
// See https://github.com/stryker-mutator/stryker/issues/143
this.workerProcess.send(objectUtils_1.serialize(message));
try {
// Serialize message before sending to preserve all javascript, including regex's and functions
// See https://github.com/stryker-mutator/stryker/issues/143
this.workerProcess.send(objectUtils_1.serialize(message));
}
catch (error) {
this.currentTask.reject(error);
}
};

@@ -138,24 +165,5 @@ TestRunnerChildProcessAdapter.prototype.sendStartCommand = function () {

};
TestRunnerChildProcessAdapter.prototype.clearCurrentTimer = function () {
if (this.currentTimeoutTimer) {
clearTimeout(this.currentTimeoutTimer);
}
};
TestRunnerChildProcessAdapter.prototype.markNoResultTimeout = function (timeoutMs) {
var _this = this;
this.currentTimeoutTimer = setTimeout(function () {
_this.handleTimeout();
}, timeoutMs);
};
TestRunnerChildProcessAdapter.prototype.handleTimeout = function () {
var _this = this;
this.dispose()
.then(function () { return _this.startWorker(); })
.then(function () { return _this.init(); })
.then(function () { return _this.runPromiseFulfillmentCallback({ status: test_runner_1.RunStatus.Timeout, tests: [] }); });
};
return TestRunnerChildProcessAdapter;
}(events_1.EventEmitter));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = TestRunnerChildProcessAdapter;
//# sourceMappingURL=IsolatedTestRunnerAdapter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var IsolatedTestRunnerAdapter_1 = require("./IsolatedTestRunnerAdapter");
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {

@@ -5,0 +5,0 @@ create: function (settings) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -125,10 +126,3 @@ var test_runner_1 = require("stryker-api/test_runner");

// https://github.com/stryker-mutator/stryker/issues/141
result.errorMessages = result.errorMessages.map(function (error) {
if (error instanceof Error && error.stack) {
return error.name + ": " + error.message + "\n" + error.stack.toString();
}
else {
return error.toString();
}
});
result.errorMessages = result.errorMessages.map(objectUtils_1.errorToString);
}

@@ -135,0 +129,0 @@ this.send({

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=MessageProtocol.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var StrykerTempFolder_1 = require("./utils/StrykerTempFolder");

@@ -99,4 +100,3 @@ /**

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Mutant;
//# sourceMappingURL=Mutant.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _ = require("lodash");

@@ -122,4 +123,3 @@ var MutantTestMatcher = (function () {

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = MutantTestMatcher;
//# sourceMappingURL=MutantTestMatcher.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var BinaryOperatorMutator_1 = require("./mutators/BinaryOperatorMutator");

@@ -128,4 +129,3 @@ var BlockStatementMutator_1 = require("./mutators/BlockStatementMutator");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = MutatorOrchestrator;
//# sourceMappingURL=MutatorOrchestrator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var esprima_1 = require("esprima");

@@ -24,4 +25,3 @@ /**

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ArrayDeclaratorMutator;
//# sourceMappingURL=ArrayDeclaratorMutator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var esprima_1 = require("esprima");

@@ -41,4 +42,3 @@ var BinaryOperatorMutator = (function () {

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = BinaryOperatorMutator;
//# sourceMappingURL=BinaryOperatorMutator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var esprima_1 = require("esprima");

@@ -20,4 +21,3 @@ /**

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = BlockStatementMutator;
//# sourceMappingURL=BlockStatementMutator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var esprima_1 = require("esprima");

@@ -23,4 +24,3 @@ var LogicalOperatorMutator = (function () {

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = LogicalOperatorMutator;
//# sourceMappingURL=LogicalOperatorMutator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var esprima_1 = require("esprima");

@@ -42,4 +43,3 @@ /**

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = RemoveConditionalsMutator;
//# sourceMappingURL=RemoveConditionalsMutator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var esprima_1 = require("esprima");

@@ -23,4 +24,3 @@ var UnaryOperatorMutator = (function () {

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = UnaryOperatorMutator;
//# sourceMappingURL=UnaryOperatorMutator.js.map

@@ -7,3 +7,3 @@ import { Mutator } from 'stryker-api/mutant';

private operators;
applyMutations(node: estree.Node, copy: <T>(obj: T, deep?: boolean) => T): estree.Node[];
applyMutations(node: estree.Node, copy: <T>(obj: T, deep?: boolean) => T): void | estree.Node | estree.Node[];
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var esprima_1 = require("esprima");

@@ -13,14 +14,11 @@ var UpdateOperatorMutator = (function () {

UpdateOperatorMutator.prototype.applyMutations = function (node, copy) {
var nodes = [];
if (node.type === this.type && this.operators[node.operator]) {
var mutatedNode = copy(node);
mutatedNode.operator = this.operators[node.operator];
nodes.push(mutatedNode);
return mutatedNode;
}
return nodes;
};
return UpdateOperatorMutator;
}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = UpdateOperatorMutator;
//# sourceMappingURL=UpdateOperatorMutator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fs = require("graceful-fs");

@@ -67,4 +68,3 @@ var path = require("path");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = PluginLoader;
//# sourceMappingURL=PluginLoader.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var report_1 = require("stryker-api/report");

@@ -62,4 +63,3 @@ var ClearTextReporter_1 = require("./reporters/ClearTextReporter");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ReporterOrchestrator;
//# sourceMappingURL=ReporterOrchestrator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var log4js = require("log4js");

@@ -55,4 +56,3 @@ var objectUtils_1 = require("../utils/objectUtils");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = BroadcastReporter;
//# sourceMappingURL=BroadcastReporter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chalk = require("chalk");

@@ -142,4 +143,3 @@ var log4js = require("log4js");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ClearTextReporter;
//# sourceMappingURL=ClearTextReporter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var report_1 = require("stryker-api/report");

@@ -34,4 +35,3 @@ var chalk = require("chalk");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = DotsReporter;
//# sourceMappingURL=DotsReporter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -81,4 +82,3 @@ var log4js = require("log4js");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = EventRecorderReporter;
//# sourceMappingURL=EventRecorderReporter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -43,4 +44,3 @@ var os = require("os");

}(ProgressKeeper_1.default));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ProgressAppendOnlyReporter;
//# sourceMappingURL=ProgressAppendOnlyReporter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ProgressBar = require("progress");
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ProgressBar;
//# sourceMappingURL=ProgressBar.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chalk = require("chalk");

@@ -48,4 +49,3 @@ var report_1 = require("stryker-api/report");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ProgressKeeper;
//# sourceMappingURL=ProgressKeeper.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -44,4 +45,3 @@ var ProgressKeeper_1 = require("./ProgressKeeper");

}(ProgressKeeper_1.default));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ProgressBarReporter;
//# sourceMappingURL=ProgressReporter.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=StrictReporter.js.map

@@ -0,3 +1,4 @@

import { Config } from 'stryker-api/config';
import { RunResult } from 'stryker-api/test_runner';
import { InputFile, StrykerOptions } from 'stryker-api/core';
import { InputFile } from 'stryker-api/core';
import { TestFramework } from 'stryker-api/test_framework';

@@ -16,3 +17,3 @@ import Mutant from './Mutant';

private testHooksFile;
constructor(options: StrykerOptions, index: number, files: InputFile[], testFramework: TestFramework | null, coverageInstrumenter: CoverageInstrumenter | null);
constructor(options: Config, index: number, files: InputFile[], testFramework: TestFramework | null, coverageInstrumenter: CoverageInstrumenter | null);
initialize(): Promise<void>;

@@ -19,0 +20,0 @@ run(timeout: number): Promise<RunResult>;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -8,3 +9,3 @@ var path = require("path");

var fileUtils_1 = require("./utils/fileUtils");
var IsolatedTestRunnerAdapterFactory_1 = require("./isolated-runner/IsolatedTestRunnerAdapterFactory");
var ResilientTestRunnerFactory_1 = require("./isolated-runner/ResilientTestRunnerFactory");
var StrykerTempFolder_1 = require("./utils/StrykerTempFolder");

@@ -39,3 +40,3 @@ var log = log4js.getLogger('Sandbox');

Sandbox.prototype.dispose = function () {
return this.testRunner.dispose();
return this.testRunner.dispose() || Promise.resolve();
};

@@ -103,3 +104,3 @@ Sandbox.prototype.runMutant = function (mutant) {

log.debug("Creating test runner %s using settings {port: %s}", this.index, settings.port);
this.testRunner = IsolatedTestRunnerAdapterFactory_1.default.create(settings);
this.testRunner = ResilientTestRunnerFactory_1.default.create(settings.strykerOptions.testRunner || '', settings);
return this.testRunner.init();

@@ -122,4 +123,3 @@ };

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Sandbox;
//# sourceMappingURL=Sandbox.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -173,4 +174,3 @@ var log4js = require("log4js");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = SandboxCoordinator;
//# sourceMappingURL=SandboxCoordinator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var program = require('commander');

@@ -3,0 +4,0 @@ var ConfigReader_1 = require("./ConfigReader");

'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -209,4 +210,3 @@ var MutatorOrchestrator_1 = require("./MutatorOrchestrator");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Stryker;
//# sourceMappingURL=Stryker.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var test_framework_1 = require("stryker-api/test_framework");

@@ -45,4 +46,3 @@ var log4js = require("log4js");

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = TestFrameworkOrchestrator;
//# sourceMappingURL=TestFrameworkOrchestrator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");

@@ -3,0 +4,0 @@ var path = require("path");

@@ -0,1 +1,2 @@

/// <reference types="node" />
export declare const serialize: (obj: any) => string;

@@ -7,3 +8,5 @@ export declare function freezeRecursively(target: {

export declare function deserialize(serializedJavascript: String): any;
export declare function isErrnoException(error: Error): error is NodeJS.ErrnoException;
export declare function errorToString(error: any): any;
export declare function copy<T>(obj: T, deep?: boolean): T;
export declare function wrapInClosure(codeFragment: string): string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _ = require("lodash");

@@ -25,2 +26,27 @@ // Don't use JSON.parse, as it does not allow for regexes or functions, etc

exports.deserialize = deserialize;
function isErrnoException(error) {
return typeof error.code === 'string';
}
exports.isErrnoException = isErrnoException;
function errorToString(error) {
if (!error) {
return '';
}
else if (isErrnoException(error)) {
return error.name + ": " + error.code + " (" + error.syscall + ") " + error.stack;
}
else if (error instanceof Error) {
var message = error.name + ": " + error.message;
if (error.stack) {
return message + "\n" + error.stack.toString();
}
else {
return message;
}
}
else {
return error.toString();
}
}
exports.errorToString = errorToString;
function copy(obj, deep) {

@@ -27,0 +53,0 @@ if (deep) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _ = require("lodash");

@@ -3,0 +4,0 @@ var esprima = require("esprima");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fs = require("graceful-fs");

@@ -97,3 +98,2 @@ var path = require("path");

}
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {

@@ -100,0 +100,0 @@ createRandomFolder: createRandomFolder,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Timer = (function () {

@@ -40,4 +41,3 @@ function Timer() {

}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Timer;
//# sourceMappingURL=Timer.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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