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

automutate

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

automutate - npm Package Compare versions

Comparing version 0.5.3 to 0.6.0

4

lib/autoMutator.js

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

@@ -89,3 +89,3 @@ import { IMutation } from "./mutation";

*/
protected getMutationsWaves(): IMutationsWave[];
protected getMutationsWaves(): ReadonlyArray<IMutationsWave>;
}

@@ -23,3 +23,3 @@ import { Logger } from "../logger";

*/
private pluralize(count, word);
private pluralize;
}
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -7,0 +10,0 @@ extendStatics(d, b);

@@ -8,7 +8,7 @@ /**

*/
begin: number;
readonly begin: number;
/**
* Exclusive character position this ends at.
*/
end?: number;
readonly end?: number;
}

@@ -22,7 +22,7 @@ /**

*/
range: IMutationRange;
readonly range: IMutationRange;
/**
* Unique type name identifying this mutation.
*/
type: string;
readonly type: string;
}

@@ -36,7 +36,7 @@ /**

*/
mutations: IMutation[];
readonly mutations: ReadonlyArray<IMutation>;
/**
* Unique type name identifying multiple mutations.
*/
type: "multiple";
readonly type: "multiple";
}

@@ -79,3 +79,3 @@ import { IFileProviderFactory } from "./fileProviderFactory";

*/
applyFileMutations(fileName: string, mutations: IMutation[]): Promise<string>;
applyFileMutations(fileName: string, mutations: ReadonlyArray<IMutation>): Promise<string>;
/**

@@ -87,3 +87,3 @@ * Orders a set of mutations last-to-first, without overlaps.

*/
private orderMutations(mutations);
private orderMutations;
}

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -7,0 +10,0 @@ extendStatics(d, b);

@@ -6,3 +6,3 @@ import { IMutation } from "./mutation";

export interface IFileMutations {
[i: string]: IMutation[];
[i: string]: ReadonlyArray<IMutation>;
}

@@ -16,3 +16,3 @@ /**

*/
fileMutations?: IFileMutations;
readonly fileMutations?: IFileMutations;
}

@@ -26,3 +26,3 @@ /**

*/
provide(): Promise<IMutationsWave>;
readonly provide: () => Promise<IMutationsWave>;
}
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -7,0 +10,0 @@ extendStatics(d, b);

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -7,0 +10,0 @@ extendStatics(d, b);

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -7,0 +10,0 @@ extendStatics(d, b);

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -7,0 +10,0 @@ extendStatics(d, b);

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {

@@ -7,0 +10,0 @@ extendStatics(d, b);

{
"name": "automutate",
"version": "0.5.3",
"version": "0.6.0",
"description": "Applies waves of mutations provided by other tools, such as linters.",

@@ -11,24 +11,16 @@ "main": "lib/index.js",

"devDependencies": {
"@types/chai": "^4.1.2",
"@types/chai": "^4.1.7",
"@types/es6-promise": "3.3.0",
"@types/glob": "^5.0.35",
"@types/glob": "^7.1.1",
"@types/glob-stream": "^6.1.0",
"@types/minimatch": "^3.0.3",
"@types/mocha": "^5.0.0",
"@types/sinon": "^4.3.0",
"@types/through2": "^2.0.33",
"chai": "^4.1.2",
"@types/mocha": "^5.2.5",
"@types/sinon": "^5.0.5",
"chai": "^4.2.0",
"del": "^3.0.0",
"glob": "^7.1.2",
"gulp": "^3.9.1",
"gulp-mocha": "^5.0.0",
"gulp-sourcemaps": "^2.6.4",
"gulp-tslint": "^8.1.3",
"gulp-typescript": "^4.0.1",
"merge2": "^1.2.1",
"mocha": "^5.0.5",
"run-sequence": "^2.2.1",
"sinon": "^4.4.8",
"tslint": "^5.9.1",
"typescript": "^2.7.2"
"glob": "^7.1.3",
"mocha": "^5.2.0",
"sinon": "^7.1.1",
"tslint": "^5.11.0",
"typescript": "^3.1.6"
},

@@ -35,0 +27,0 @@ "scripts": {

@@ -50,3 +50,3 @@ import { IMutation } from "./mutation";

*/
private readonly fileMutations: IFileMutations = {};
private readonly fileMutations: { [i: string]: IMutation[] } = {};

@@ -114,5 +114,5 @@ /**

*/
protected getMutationsWaves(): IMutationsWave[] {
protected getMutationsWaves(): ReadonlyArray<IMutationsWave> {
return this.mutationsWaves;
}
}

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

*/
begin: number;
readonly begin: number;

@@ -14,3 +14,3 @@ /**

*/
end?: number;
readonly end?: number;
}

@@ -25,3 +25,3 @@

*/
range: IMutationRange;
readonly range: IMutationRange;

@@ -31,3 +31,3 @@ /**

*/
type: string;
readonly type: string;
}

@@ -42,3 +42,3 @@

*/
mutations: IMutation[];
readonly mutations: ReadonlyArray<IMutation>;

@@ -48,3 +48,3 @@ /**

*/
type: "multiple";
readonly type: "multiple";
}

@@ -103,3 +103,3 @@ import { IFileProvider } from "./fileProvider";

*/
public async applyFileMutations(fileName: string, mutations: IMutation[]): Promise<string> {
public async applyFileMutations(fileName: string, mutations: ReadonlyArray<IMutation>): Promise<string> {
const mutationsOrdered: IMutation[] = this.orderMutations(mutations);

@@ -125,3 +125,3 @@ const fileProvider: IFileProvider = this.fileProviderFactory.generate(fileName);

*/
private orderMutations(mutations: IMutation[]): IMutation[] {
private orderMutations(mutations: ReadonlyArray<IMutation>): IMutation[] {
const ordered: IMutation[] = [];

@@ -128,0 +128,0 @@ let lastStart = Infinity;

@@ -7,3 +7,3 @@ import { IMutation } from "./mutation";

export interface IFileMutations {
[i: string]: IMutation[];
[i: string]: ReadonlyArray<IMutation>;
}

@@ -18,3 +18,3 @@

*/
fileMutations?: IFileMutations;
readonly fileMutations?: IFileMutations;
}

@@ -29,3 +29,3 @@

*/
provide(): Promise<IMutationsWave>;
readonly provide: () => Promise<IMutationsWave>;
}

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

@@ -18,4 +18,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -22,0 +22,0 @@ case 0: case 1: t = op; break;

@@ -17,4 +17,4 @@ "use strict";

while (_) try {
if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [0, t.value];
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {

@@ -21,0 +21,0 @@ case 0: case 1: t = op; break;

@@ -12,2 +12,3 @@ {

"prefer-function-over-method": false,
"prefer-method-signature": false,
"strict-boolean-expressions": false,

@@ -14,0 +15,0 @@ "typedef": false,

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