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

@vitest/utils

Package Overview
Dependencies
Maintainers
3
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/utils - npm Package Compare versions

Comparing version 0.34.4 to 0.34.5

dist/types-f5c02aaf.d.ts

35

dist/diff.d.ts

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

import { CompareKeys } from 'pretty-format';
import { D as DiffOptions } from './types-f5c02aaf.js';
export { a as DiffOptionsColor } from './types-f5c02aaf.js';
import 'pretty-format';

@@ -62,31 +64,2 @@ /**

type DiffOptionsColor = (arg: string) => string;
interface 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;
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
declare function diffLinesUnified(aLines: Array<string>, bLines: Array<string>, options?: DiffOptions): string;

@@ -121,2 +94,2 @@ declare function diffLinesUnified2(aLinesDisplay: Array<string>, bLinesDisplay: Array<string>, aLinesCompare: Array<string>, bLinesCompare: Array<string>, options?: DiffOptions): string;

export { DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, Diff, DiffOptions, DiffOptionsColor, diff, diffLinesRaw, diffLinesUnified, diffLinesUnified2, diffStringsRaw, diffStringsUnified };
export { DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, Diff, DiffOptions, diff, diffLinesRaw, diffLinesUnified, diffLinesUnified2, diffStringsRaw, diffStringsUnified };

@@ -0,3 +1,6 @@

import { D as DiffOptions } from './types-f5c02aaf.js';
import 'pretty-format';
declare function serializeError(val: any, seen?: WeakMap<object, any>): any;
declare function processError(err: any): any;
declare function processError(err: any, diffOptions?: DiffOptions): any;
declare function replaceAsymmetricMatcher(actual: any, expected: any, actualReplaced?: WeakSet<object>, expectedReplaced?: WeakSet<object>): {

@@ -4,0 +7,0 @@ replacedActual: any;

@@ -75,3 +75,3 @@ import { diff } from './diff.js';

}
function processError(err) {
function processError(err, diffOptions) {
if (!err || typeof err !== "object")

@@ -87,3 +87,3 @@ return { message: err };

const { replacedActual, replacedExpected } = replaceAsymmetricMatcher(clonedActual, clonedExpected);
err.diff = diff(replacedExpected, replacedActual);
err.diff = diff(replacedExpected, replacedActual, diffOptions);
}

@@ -90,0 +90,0 @@ if (typeof err.expected !== "string")

{
"name": "@vitest/utils",
"type": "module",
"version": "0.34.4",
"version": "0.34.5",
"description": "Shared Vitest utility functions",

@@ -6,0 +6,0 @@ "license": "MIT",

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