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

stryker-api

Package Overview
Dependencies
Maintainers
3
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stryker-api - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

21

CHANGELOG.md

@@ -6,2 +6,23 @@ # Change Log

<a name="0.15.0"></a>
# [0.15.0](https://github.com/stryker-mutator/stryker/compare/stryker-api@0.14.0...stryker-api@0.15.0) (2018-04-04)
### Features
* **Detect files:** create `File` class ([1a89c10](https://github.com/stryker-mutator/stryker/commit/1a89c10))
* **test runner:** add hooks file to test run api ([97be399](https://github.com/stryker-mutator/stryker/commit/97be399))
* **Transpiler api:** change return type of `transpile` to a file array ([e713416](https://github.com/stryker-mutator/stryker/commit/e713416))
### BREAKING CHANGES
* **test runner:** * Promises return types should be `Promise<void>` instead
of `Promise<any>` (typescript compiler error).
* **Detect files:** Remove the `InputFileDescriptor`
interface (breaking for typescript compiler)
<a name="0.14.0"></a>

@@ -8,0 +29,0 @@ # [0.14.0](https://github.com/stryker-mutator/stryker/compare/stryker-api@0.13.1...stryker-api@0.14.0) (2018-03-22)

0

config.d.ts
export { default as Config } from './src/config/Config';
export { default as ConfigEditor } from './src/config/ConfigEditor';
export { default as ConfigEditorFactory } from './src/config/ConfigEditorFactory';

@@ -0,0 +0,0 @@ "use strict";

3

core.d.ts
export { default as StrykerOptions } from './src/core/StrykerOptions';
export { default as Factory } from './src/core/Factory';
export { BinaryFile, WebFile, TextFile, File, FileKind, FileDescriptor } from './src/core/File';
export { default as File } from './src/core/File';
export { default as Position } from './src/core/Position';
export { default as Location } from './src/core/Location';
export { default as Range } from './src/core/Range';
export { default as InputFileDescriptor } from './src/core/InputFileDescriptor';
export { default as MutatorDescriptor } from './src/core/MutatorDescriptor';
export { default as MutationScoreThresholds } from './src/core/MutationScoreThresholds';

@@ -6,3 +6,3 @@ "use strict";

var File_1 = require("./src/core/File");
exports.FileKind = File_1.FileKind;
exports.File = File_1.default;
//# sourceMappingURL=core.js.map
export { default as Mutant } from './src/mutant/Mutant';
export { default as Mutator } from './src/mutant/Mutator';
export { default as MutatorFactory } from './src/mutant/MutatorFactory';

@@ -0,0 +0,0 @@ "use strict";

{
"name": "stryker-api",
"version": "0.14.0",
"version": "0.15.0",
"description": "The api for the extendable JavaScript mutation testing framework Stryker",

@@ -42,3 +42,6 @@ "scripts": {

"tslib": "^1.6.0"
},
"devDependencies": {
"surrial": "^0.1.1"
}
}

@@ -0,0 +0,0 @@ [![Build Status](https://travis-ci.org/stryker-mutator/stryker.svg?branch=master)](https://travis-ci.org/stryker-mutator/stryker)

@@ -0,0 +0,0 @@ export { default as Reporter } from './src/report/Reporter';

@@ -0,0 +0,0 @@ "use strict";

@@ -1,5 +0,5 @@

import { StrykerOptions, InputFileDescriptor, MutatorDescriptor, MutationScoreThresholds } from '../../core';
import { StrykerOptions, MutatorDescriptor, MutationScoreThresholds } from '../../core';
export default class Config implements StrykerOptions {
[customConfig: string]: any;
files: Array<string | InputFileDescriptor>;
files: string[];
mutate: string[];

@@ -6,0 +6,0 @@ logLevel: string;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import Config from './Config';

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

@@ -0,0 +0,0 @@ import { Factory } from '../../core';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ "use strict";

/// <reference types="node" />
export declare enum FileKind {
'Binary' = 0,
'Text' = 1,
'Web' = 2,
/**
* Represents a file within Stryker. Could be a strictly in-memory file.
*/
export default class File {
readonly name: string;
private _textContent;
private _content;
/**
* Creates a new File to be used within Stryker.
* @param name The full name of the file (inc path)
* @param content The buffered or string content of the file
*/
constructor(name: string, content: Buffer | string);
/**
* Gets the underlying content as buffer.
*/
readonly content: Buffer;
/**
* Gets the underlying content as string using utf8 encoding.
*/
readonly textContent: string;
}
export declare type File = BinaryFile | TextFile | WebFile;
export interface FileDescriptor {
name: string;
included: boolean;
mutated: boolean;
transpiled: boolean;
kind: FileKind;
}
export interface TextFile extends FileDescriptor {
content: string;
kind: FileKind.Text;
}
export interface WebFile extends FileDescriptor {
kind: FileKind.Web;
}
export interface BinaryFile extends FileDescriptor {
content: Buffer;
kind: FileKind.Binary;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FileKind;
(function (FileKind) {
FileKind[FileKind["Binary"] = 0] = "Binary";
FileKind[FileKind["Text"] = 1] = "Text";
FileKind[FileKind["Web"] = 2] = "Web";
})(FileKind = exports.FileKind || (exports.FileKind = {}));
/**
* Represents a file within Stryker. Could be a strictly in-memory file.
*/
var File = /** @class */ (function () {
/**
* Creates a new File to be used within Stryker.
* @param name The full name of the file (inc path)
* @param content The buffered or string content of the file
*/
function File(name, content) {
this.name = name;
if (typeof content === 'string') {
this._content = Buffer.from(content);
this._textContent = content;
}
else {
this._content = content;
}
}
Object.defineProperty(File.prototype, "content", {
/**
* Gets the underlying content as buffer.
*/
get: function () {
return this._content;
},
enumerable: true,
configurable: true
});
Object.defineProperty(File.prototype, "textContent", {
/**
* Gets the underlying content as string using utf8 encoding.
*/
get: function () {
if (!this._textContent) {
this._textContent = this.content.toString();
}
return this._textContent;
},
enumerable: true,
configurable: true
});
return File;
}());
exports.default = File;
//# sourceMappingURL=File.js.map

@@ -0,0 +0,0 @@ import Position from './Position';

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

@@ -0,0 +0,0 @@ interface MutatorDescriptor {

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

@@ -0,0 +0,0 @@ /**

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

@@ -0,0 +0,0 @@ /**

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

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

import InputFileDescriptor from './InputFileDescriptor';
import MutationScoreThresholds from './MutationScoreThresholds';

@@ -20,3 +19,3 @@ import MutatorDescriptor from './MutatorDescriptor';

*/
files?: Array<string | InputFileDescriptor>;
files?: string[];
/**

@@ -23,0 +22,0 @@ * A list of globbing expression used for selecting the files that should be mutated.

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

@@ -0,0 +0,0 @@ import { Range } from '../../core';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Mutant.js.map
import { File } from '../../core';
import Mutant from './Mutant';
export default interface Mutator {
mutate(inputFiles: File[]): Mutant[];
mutate(inputFiles: ReadonlyArray<File>): ReadonlyArray<Mutant>;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Mutator.js.map

@@ -0,0 +0,0 @@ import Mutator from './Mutator';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ interface MatchedMutant {

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

@@ -0,0 +0,0 @@ import MutantStatus from './MutantStatus';

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

@@ -0,0 +0,0 @@ declare enum MutantStatus {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import ScoreResult from './ScoreResult';

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

@@ -0,0 +0,0 @@ import { Factory, StrykerOptions } from '../../core';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ /**

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

@@ -0,0 +0,0 @@ interface SourceFile {

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

@@ -0,0 +0,0 @@ import TestSelection from './TestSelection';

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

@@ -0,0 +0,0 @@ import { Factory } from '../../core';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { StrykerOptions } from '../../core';

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

@@ -0,0 +0,0 @@ export default interface TestSelection {

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

@@ -0,0 +0,0 @@ import { Location } from '../../core';

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

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

import { StrykerOptions, FileDescriptor } from '../../core';
import { StrykerOptions } from '../../core';
/**

@@ -7,5 +7,5 @@ * Represents an options object to configure a TestRunner.

/**
* The collection of files to load into the test runner in that exact order.
* The names of the files loaded in the sandbox.
*/
files: FileDescriptor[];
fileNames: string[];
/**

@@ -12,0 +12,0 @@ * Represents a free port which the test runner can choose to use

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

@@ -9,3 +9,8 @@ /**

timeout: number;
/**
* The hooks JavaScript code that has to be loaded in the testing environment.
* It should be loaded right after the test framework but right before any tests can run.
*/
testHooks?: string;
}
export default RunOptions;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=RunOptions.js.map

@@ -0,0 +0,0 @@ import TestResult from './TestResult';

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

@@ -0,0 +0,0 @@ declare enum RunStatus {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import TestStatus from './TestStatus';

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

@@ -1,5 +0,3 @@

/// <reference types="node" />
import RunResult from './RunResult';
import RunOptions from './RunOptions';
import { EventEmitter } from 'events';
/**

@@ -9,4 +7,3 @@ * Represents a TestRunner which can execute tests, resulting in a RunResult.

* A test runner should:
* - Report per a `testResult` per test. See `TestResult` interface to know what is expected.
* - Emit a `'test_done'` event with a TestResult as an argument every time a test is executed (for reporting purposes).
* - Report a `testResult` per test. See `TestResult` interface to know what is expected.
* - Report on code coverage after the initial test run (maybe, see below).

@@ -38,3 +35,3 @@ *

*/
interface TestRunner extends EventEmitter {
interface TestRunner {
/**

@@ -45,3 +42,3 @@ * Optional. When implemented, will be called before runs are done on this test runner.

*/
init?(): Promise<any> | void;
init?(): Promise<void> | void;
/**

@@ -58,4 +55,4 @@ * Executes a test run.

*/
dispose?(): Promise<any> | void;
dispose?(): Promise<void> | void;
}
export default TestRunner;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=TestRunner.js.map

@@ -0,0 +0,0 @@ import { Factory } from '../../core';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

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

import TranspileResult from './TranspileResult';
import { File } from '../../core';

@@ -24,3 +23,3 @@ /**

*
* call 1: [foo.es6, bar.es6, fooSpec.es6, barSpec.es6, image.png, http://example.com]
* call 1: [foo.es6, bar.es6, fooSpec.es6, barSpec.es6, image.png]
* call 2: [foo.es6 (mutated)]

@@ -31,5 +30,5 @@ * call 3: [foo.es6 (mutated)]

*
* @returns an error message (if transpiling failed) or the output files to be used in the next transpiler
* @returns an rejection (if transpiling failed) or the output files to be used as input for the next transpiler
*/
transpile(files: File[]): Promise<TranspileResult>;
transpile(files: ReadonlyArray<File>): Promise<ReadonlyArray<File>>;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Transpiler.js.map

@@ -0,0 +0,0 @@ import { Factory } from '../../core';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { Config } from '../../config';

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

@@ -0,0 +0,0 @@ export { default as TestFramework } from './src/test_framework/TestFramework';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ export * from './src/test_runner/Coverage';

@@ -0,0 +0,0 @@ "use strict";

export { default as Transpiler } from './src/transpile/Transpiler';
export { default as TranspileResult } from './src/transpile/TranspileResult';
export { default as TranspilerFactory } from './src/transpile/TranspilerFactory';
export { default as TranspilerOptions } from './src/transpile/TranspilerOptions';

@@ -0,0 +0,0 @@ "use strict";

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