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

@stryker-mutator/util

Package Overview
Dependencies
Maintainers
4
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stryker-mutator/util - npm Package Compare versions

Comparing version 3.3.1 to 4.0.0-beta.0

src/flatMap.d.ts

17

CHANGELOG.md

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

# [4.0.0-beta.0](https://github.com/stryker-mutator/stryker/compare/v3.3.1...v4.0.0-beta.0) (2020-07-10)
### Bug Fixes
* **karma-runner:** mocha filtering with `/` ([#2290](https://github.com/stryker-mutator/stryker/issues/2290)) ([3918633](https://github.com/stryker-mutator/stryker/commit/3918633b21ff37d2e950df2cc14b8557ee7eb6b3))
### Features
* **instrumenter:** add parsers ([#2222](https://github.com/stryker-mutator/stryker/issues/2222)) ([3b57ef2](https://github.com/stryker-mutator/stryker/commit/3b57ef23dd5b348dcdff205600989aea2c7fbcf0))
* **instrumenter:** add transformers ([#2234](https://github.com/stryker-mutator/stryker/issues/2234)) ([61c8fe6](https://github.com/stryker-mutator/stryker/commit/61c8fe65e35bb95b786a0e2bebbe57166ffbc480))
## [3.3.1](https://github.com/stryker-mutator/stryker/compare/v3.3.0...v3.3.1) (2020-07-04)

@@ -8,0 +25,0 @@

8

package.json
{
"name": "@stryker-mutator/util",
"version": "3.3.1",
"version": "4.0.0-beta.0",
"description": "Contains utilities for Stryker, the mutation testing framework for JavaScript and friends",

@@ -29,5 +29,9 @@ "main": "src/index.js",

"devDependencies": {
"@types/lodash.flatmap": "^4.5.6",
"@types/node": "^14.0.1"
},
"gitHead": "f7fb1e1eaa8df028f4add5f462a33f70ec4ea262"
"dependencies": {
"lodash.flatmap": "^4.5.0"
},
"gitHead": "6c7b6db975d681869b46a5c1bfb553d6bbabd841"
}
export declare type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
[P in keyof T]?: T[P] extends Record<string, any> ? DeepPartial<T[P]> : T[P];
};

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

export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
[P in keyof T]?: T[P] extends Record<string, any> ? DeepPartial<T[P]> : T[P];
};

@@ -4,0 +4,0 @@

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

declare type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
declare type ImmutablePrimitive = undefined | null | boolean | string | number | ((...args: any) => any);
export declare type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;

@@ -3,0 +3,0 @@ export declare type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;

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

type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
type ImmutablePrimitive = undefined | null | boolean | string | number | ((...args: any) => any);

@@ -3,0 +3,0 @@ export type Immutable<T> = T extends ImmutablePrimitive

@@ -9,2 +9,5 @@ export { default as childProcessAsPromised } from './childProcessAsPromised';

export * from './notEmpty';
export * from './flatMap';
export * from './I';
export * from './Task';
//# sourceMappingURL=index.d.ts.map

@@ -14,2 +14,5 @@ "use strict";

tslib_1.__exportStar(require("./notEmpty"), exports);
tslib_1.__exportStar(require("./flatMap"), exports);
tslib_1.__exportStar(require("./I"), exports);
tslib_1.__exportStar(require("./Task"), exports);
//# sourceMappingURL=index.js.map

@@ -9,1 +9,4 @@ export { default as childProcessAsPromised } from './childProcessAsPromised';

export * from './notEmpty';
export * from './flatMap';
export * from './I';
export * from './Task';

@@ -13,2 +13,10 @@ import { KnownKeys } from './KnownKeys';

export declare function propertyPath<T>(prop: keyof Pick<T, KnownKeys<T>>, prop2?: keyof Pick<T, KnownKeys<T>>[typeof prop]): string;
/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
*/
export declare function escapeRegExpLiteral(input: string): string;
/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
*/
export declare function escapeRegExp(input: string): string;
//# sourceMappingURL=stringUtils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.propertyPath = exports.normalizeWhitespaces = void 0;
exports.escapeRegExp = exports.escapeRegExpLiteral = exports.propertyPath = exports.normalizeWhitespaces = void 0;
const notEmpty_1 = require("./notEmpty");

@@ -22,2 +22,16 @@ /**

exports.propertyPath = propertyPath;
/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
*/
function escapeRegExpLiteral(input) {
return input.replace(/[.*+\-?^${}()|[\]\\/]/g, '\\$&'); // $& means the whole matched string
}
exports.escapeRegExpLiteral = escapeRegExpLiteral;
/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
*/
function escapeRegExp(input) {
return input.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}
exports.escapeRegExp = escapeRegExp;
//# sourceMappingURL=stringUtils.js.map

@@ -20,1 +20,15 @@ import { notEmpty } from './notEmpty';

}
/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
*/
export function escapeRegExpLiteral(input: string) {
return input.replace(/[.*+\-?^${}()|[\]\\/]/g, '\\$&'); // $& means the whole matched string
}
/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
*/
export function escapeRegExp(input: string) {
return input.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}

@@ -22,3 +22,24 @@ "use strict";

});
describe(src_1.escapeRegExpLiteral.name, () => {
it('should return input if no special chars are found', () => {
chai_1.expect(src_1.escapeRegExpLiteral('something normal')).eq('something normal');
});
for (const letter of '.*+-?^${}()|[]\\/') {
it(`should escape "${letter}"`, () => {
chai_1.expect(src_1.escapeRegExpLiteral(letter)).eq(`\\${letter}`);
});
}
});
describe(src_1.escapeRegExp.name, () => {
it('should return input if no special chars are found', () => {
chai_1.expect(src_1.escapeRegExp('something normal')).eq('something normal');
});
it("should not escape `/` (that's only needed for regex literals)");
for (const letter of '.*+-?^${}()|[]\\') {
it(`should escape "${letter}"`, () => {
chai_1.expect(src_1.escapeRegExp(letter)).eq(`\\${letter}`);
});
}
});
});
//# sourceMappingURL=stringUtils.spec.js.map
import { expect } from 'chai';
import { normalizeWhitespaces, propertyPath } from '../../src';
import { normalizeWhitespaces, propertyPath, escapeRegExpLiteral, escapeRegExp } from '../../src';

@@ -31,2 +31,28 @@ describe('stringUtils', () => {

});
describe(escapeRegExpLiteral.name, () => {
it('should return input if no special chars are found', () => {
expect(escapeRegExpLiteral('something normal')).eq('something normal');
});
for (const letter of '.*+-?^${}()|[]\\/') {
it(`should escape "${letter}"`, () => {
expect(escapeRegExpLiteral(letter)).eq(`\\${letter}`);
});
}
});
describe(escapeRegExp.name, () => {
it('should return input if no special chars are found', () => {
expect(escapeRegExp('something normal')).eq('something normal');
});
it("should not escape `/` (that's only needed for regex literals)");
for (const letter of '.*+-?^${}()|[]\\') {
it(`should escape "${letter}"`, () => {
expect(escapeRegExp(letter)).eq(`\\${letter}`);
});
}
});
});

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