@vitest/utils 3.0.9 → 3.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/diff.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DiffOptions } from './types.d-Cr0z4Cnu.js';
2
- export { a as DiffOptionsColor, S as SerializedDiffOptions } from './types.d-Cr0z4Cnu.js';
1
+ import { D as DiffOptions } from './types.d-BCElaP-c.js';
2
+ export { a as DiffOptionsColor, S as SerializedDiffOptions } from './types.d-BCElaP-c.js';
3
3
  import '@vitest/pretty-format';
4
4
 
5
5
  /**
package/dist/diff.js CHANGED
@@ -1851,6 +1851,7 @@ const PLUGINS = [
1851
1851
  plugins.Error
1852
1852
  ];
1853
1853
  const FORMAT_OPTIONS = {
1854
+ maxDepth: 20,
1854
1855
  plugins: PLUGINS
1855
1856
  };
1856
1857
  const FALLBACK_FORMAT_OPTIONS = {
@@ -1947,11 +1948,12 @@ ${difference}`;
1947
1948
  return difference;
1948
1949
  }
1949
1950
  function getFormatOptions(formatOptions, options) {
1950
- const { compareKeys, printBasicPrototype } = normalizeDiffOptions(options);
1951
+ const { compareKeys, printBasicPrototype, maxDepth } = normalizeDiffOptions(options);
1951
1952
  return {
1952
1953
  ...formatOptions,
1953
1954
  compareKeys,
1954
- printBasicPrototype
1955
+ printBasicPrototype,
1956
+ maxDepth: maxDepth ?? formatOptions.maxDepth
1955
1957
  };
1956
1958
  }
1957
1959
  function getObjectsDifference(a, b, formatOptions, options) {
package/dist/error.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { D as DiffOptions } from './types.d-Cr0z4Cnu.js';
1
+ import { D as DiffOptions } from './types.d-BCElaP-c.js';
2
2
  import '@vitest/pretty-format';
3
3
 
4
4
  declare function serializeValue(val: any, seen?: WeakMap<WeakKey, any>): any;
@@ -27,6 +27,7 @@ interface DiffOptions {
27
27
  omitAnnotationLines?: boolean;
28
28
  patchColor?: DiffOptionsColor;
29
29
  printBasicPrototype?: boolean;
30
+ maxDepth?: number;
30
31
  compareKeys?: CompareKeys;
31
32
  truncateThreshold?: number;
32
33
  truncateAnnotation?: string;
@@ -44,6 +45,7 @@ interface SerializedDiffOptions {
44
45
  includeChangeCounts?: boolean;
45
46
  omitAnnotationLines?: boolean;
46
47
  printBasicPrototype?: boolean;
48
+ maxDepth?: number;
47
49
  truncateThreshold?: number;
48
50
  truncateAnnotation?: string;
49
51
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/utils",
3
3
  "type": "module",
4
- "version": "3.0.9",
4
+ "version": "3.1.0-beta.1",
5
5
  "description": "Shared Vitest utility functions",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -62,7 +62,7 @@
62
62
  "dependencies": {
63
63
  "loupe": "^3.1.3",
64
64
  "tinyrainbow": "^2.0.0",
65
- "@vitest/pretty-format": "3.0.9"
65
+ "@vitest/pretty-format": "3.1.0-beta.1"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@jridgewell/trace-mapping": "^0.3.25",