You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

jest-diff

Package Overview
Dependencies
Maintainers
5
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-diff - npm Package Compare versions

Comparing version
30.2.0
to
30.3.0
+27
-27
build/index.js

@@ -13,4 +13,4 @@ /*!

/***/ "./src/cleanupSemantic.ts":
/***/ ((__unused_webpack_module, exports) => {
/***/ "./src/cleanupSemantic.ts"
(__unused_webpack_module, exports) {

@@ -523,6 +523,6 @@

/***/ }),
/***/ },
/***/ "./src/constants.ts":
/***/ ((__unused_webpack_module, exports) => {
/***/ "./src/constants.ts"
(__unused_webpack_module, exports) {

@@ -545,6 +545,6 @@

/***/ }),
/***/ },
/***/ "./src/diffLines.ts":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ "./src/diffLines.ts"
(__unused_webpack_module, exports, __webpack_require__) {

@@ -704,6 +704,6 @@

/***/ }),
/***/ },
/***/ "./src/diffStrings.ts":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ "./src/diffStrings.ts"
(__unused_webpack_module, exports, __webpack_require__) {

@@ -755,6 +755,6 @@

/***/ }),
/***/ },
/***/ "./src/escapeControlCharacters.ts":
/***/ ((__unused_webpack_module, exports) => {
/***/ "./src/escapeControlCharacters.ts"
(__unused_webpack_module, exports) {

@@ -792,6 +792,6 @@

/***/ }),
/***/ },
/***/ "./src/getAlignedDiffs.ts":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ "./src/getAlignedDiffs.ts"
(__unused_webpack_module, exports, __webpack_require__) {

@@ -995,6 +995,6 @@

/***/ }),
/***/ },
/***/ "./src/joinAlignedDiffs.ts":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ "./src/joinAlignedDiffs.ts"
(__unused_webpack_module, exports, __webpack_require__) {

@@ -1209,6 +1209,6 @@

/***/ }),
/***/ },
/***/ "./src/normalizeDiffOptions.ts":
/***/ ((__unused_webpack_module, exports) => {
/***/ "./src/normalizeDiffOptions.ts"
(__unused_webpack_module, exports) {

@@ -1265,6 +1265,6 @@

/***/ }),
/***/ },
/***/ "./src/printDiffs.ts":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ "./src/printDiffs.ts"
(__unused_webpack_module, exports, __webpack_require__) {

@@ -1331,3 +1331,3 @@

/***/ })
/***/ }

@@ -1334,0 +1334,0 @@ /******/ });

{
"name": "jest-diff",
"version": "30.2.0",
"version": "30.3.0",
"repository": {

@@ -22,9 +22,9 @@ "type": "git",

"dependencies": {
"@jest/diff-sequences": "30.0.1",
"@jest/diff-sequences": "30.3.0",
"@jest/get-type": "30.1.0",
"chalk": "^4.1.2",
"pretty-format": "30.2.0"
"pretty-format": "30.3.0"
},
"devDependencies": {
"@jest/test-utils": "30.2.0"
"@jest/test-utils": "30.3.0"
},

@@ -37,3 +37,3 @@ "engines": {

},
"gitHead": "855864e3f9751366455246790be2bf912d4d0dac"
"gitHead": "efb59c2e81083f8dc941f20d6d20a3af2dc8d068"
}
import { CompareKeys } from "pretty-format";
//#region src/cleanupSemantic.d.ts
/**
* Diff Match and Patch
* Copyright 2018 The diff-match-patch Authors.
* https://github.com/google/diff-match-patch
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Computes the difference between two texts to create a patch.
* Applies the patch onto another text, allowing for errors.
* @author fraser@google.com (Neil Fraser)
*/
/**
* CHANGES by pedrottimark to diff_match_patch_uncompressed.ts file:
*
* 1. Delete anything not needed to use diff_cleanupSemantic method
* 2. Convert from prototype properties to var declarations
* 3. Convert Diff to class from constructor and prototype
* 4. Add type annotations for arguments and return values
* 5. Add exports
*/
/**
* The data structure representing a diff is an array of tuples:
* [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
* which means: delete 'Hello', add 'Goodbye' and keep ' world.'
*/
declare var DIFF_DELETE: number;
declare var DIFF_INSERT: number;
declare var DIFF_EQUAL: number;
/**
* Class representing one diff tuple.
* Attempts to look like a two-element array (which is what this used to be).
* @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL.
* @param {string} text Text to be deleted, inserted, or retained.
* @constructor
*/
declare class Diff {
0: number;
1: string;
constructor(op: number, text: string);
}
/**
* Reduce the number of edits by eliminating semantically trivial equalities.
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
*/
//#endregion
//#region src/types.d.ts
type DiffOptionsColor = (arg: string) => string;
type DiffOptions = {
aAnnotation?: string;
aColor?: DiffOptionsColor;
aIndicator?: string;
bAnnotation?: string;
bColor?: DiffOptionsColor;
bIndicator?: string;
changeColor?: DiffOptionsColor;
changeLineTrailingSpaceColor?: DiffOptionsColor;
commonColor?: DiffOptionsColor;
commonIndicator?: string;
commonLineTrailingSpaceColor?: DiffOptionsColor;
contextLines?: number;
emptyFirstOrLastLinePlaceholder?: string;
expand?: boolean;
includeChangeCounts?: boolean;
omitAnnotationLines?: boolean;
patchColor?: DiffOptionsColor;
compareKeys?: CompareKeys;
};
//#endregion
//#region src/diffLines.d.ts
declare const diffLinesUnified: (aLines: Array<string>, bLines: Array<string>, options?: DiffOptions) => string;
declare const diffLinesUnified2: (aLinesDisplay: Array<string>, bLinesDisplay: Array<string>, aLinesCompare: Array<string>, bLinesCompare: Array<string>, options?: DiffOptions) => string;
declare const diffLinesRaw: (aLines: Array<string>, bLines: Array<string>) => Array<Diff>;
//#endregion
//#region src/printDiffs.d.ts
declare const diffStringsUnified: (a: string, b: string, options?: DiffOptions) => string;
declare const diffStringsRaw: (a: string, b: string, cleanup: boolean) => Array<Diff>;
//#endregion
//#region src/index.d.ts
declare function diff(a: any, b: any, options?: DiffOptions): string | null;
//#endregion
export { DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, Diff, DiffOptions, DiffOptionsColor, diff, diffLinesRaw, diffLinesUnified, diffLinesUnified2, diffStringsRaw, diffStringsUnified };