@vitest/utils
Advanced tools
@@ -103,3 +103,3 @@ // TODO: this is all copy pasted from Vite - can they expose a module that exports only constants? | ||
| function withTrailingSlash(path) { | ||
| if (path[path.length - 1] !== "/") { | ||
| if (path.at(-1) !== "/") { | ||
| return `${path}/`; | ||
@@ -106,0 +106,0 @@ } |
+0
-11
@@ -64,9 +64,4 @@ import { D as DiffOptions } from './types.d-BCElaP-c.js'; | ||
| // Compare two arrays of strings line-by-line. Format as comparison lines. | ||
| declare function diffLinesUnified(aLines: Array<string>, bLines: Array<string>, options?: DiffOptions): string; | ||
| // Given two pairs of arrays of strings: | ||
| // Compare the pair of comparison arrays line-by-line. | ||
| // Format the corresponding lines in the pair of displayable arrays. | ||
| declare function diffLinesUnified2(aLinesDisplay: Array<string>, bLinesDisplay: Array<string>, aLinesCompare: Array<string>, bLinesCompare: Array<string>, options?: DiffOptions): string; | ||
| // Compare two arrays of strings line-by-line. | ||
| declare function diffLinesRaw(aLines: Array<string>, bLines: Array<string>, options?: DiffOptions): [Array<Diff>, boolean]; | ||
@@ -81,11 +76,5 @@ | ||
| // Compare two strings character-by-character. | ||
| // Format as comparison lines in which changed substrings have inverse colors. | ||
| declare function diffStringsUnified(a: string, b: string, options?: DiffOptions): string; | ||
| // Compare two strings character-by-character. | ||
| // Optionally clean up small common substrings, also known as chaff. | ||
| declare function diffStringsRaw(a: string, b: string, cleanup: boolean, options?: DiffOptions): [Array<Diff>, boolean]; | ||
| // Generate a string that will highlight the difference between two values | ||
| // with green and red. (similar to how github does code diffing) | ||
| /** | ||
@@ -92,0 +81,0 @@ * @param a Expected value |
+0
-1
| import { D as DiffOptions } from './types.d-BCElaP-c.js'; | ||
| import '@vitest/pretty-format'; | ||
| // https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm | ||
| declare function serializeValue(val: any, seen?: WeakMap<WeakKey, any>): any; | ||
@@ -6,0 +5,0 @@ |
@@ -34,3 +34,2 @@ import { Nullable, Arrayable } from './types.js'; | ||
| declare function isBareImport(id: string): boolean; | ||
| // convert RegExp.toString to RegExp | ||
| declare function parseRegexp(input: string): RegExp; | ||
@@ -37,0 +36,0 @@ declare function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T>; |
+0
-3
@@ -6,3 +6,2 @@ import { PrettyFormatOptions } from '@vitest/pretty-format'; | ||
| // TODO: this is all copy pasted from Vite - can they expose a module that exports only constants? | ||
| declare const KNOWN_ASSET_TYPES: string[]; | ||
@@ -66,3 +65,2 @@ declare const KNOWN_ASSET_RE: RegExp; | ||
| interface SafeTimers { | ||
| // node.js timers | ||
| nextTick?: (cb: () => void) => void; | ||
@@ -74,3 +72,2 @@ setImmediate?: { | ||
| clearImmediate?: (immediateId: any) => void; | ||
| // cross-platform timers | ||
| setTimeout: typeof setTimeout; | ||
@@ -77,0 +74,0 @@ setInterval: typeof setInterval; |
@@ -138,4 +138,2 @@ import { TestError, ParsedStack } from './types.js'; | ||
| declare function parseSingleStack(raw: string): ParsedStack | null; | ||
| // Based on https://github.com/stacktracejs/error-stack-parser | ||
| // Credit to stacktracejs | ||
| declare function parseSingleV8Stack(raw: string): ParsedStack | null; | ||
@@ -142,0 +140,0 @@ declare function createStackString(stacks: ParsedStack[]): string; |
+4
-4
| { | ||
| "name": "@vitest/utils", | ||
| "type": "module", | ||
| "version": "4.0.0-beta.9", | ||
| "version": "4.0.0-beta.10", | ||
| "description": "Shared Vitest utility functions", | ||
@@ -60,8 +60,8 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "loupe": "^3.2.0", | ||
| "loupe": "^3.2.1", | ||
| "tinyrainbow": "^2.0.0", | ||
| "@vitest/pretty-format": "4.0.0-beta.9" | ||
| "@vitest/pretty-format": "4.0.0-beta.10" | ||
| }, | ||
| "devDependencies": { | ||
| "@jridgewell/trace-mapping": "^0.3.29", | ||
| "@jridgewell/trace-mapping": "^0.3.30", | ||
| "@types/estree": "^1.0.8", | ||
@@ -68,0 +68,0 @@ "diff-sequences": "^29.6.3", |
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
176390
-0.55%4908
-0.35%+ Added
- Removed
Updated