@vitest/utils 3.2.2 → 3.2.4

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.
Files changed (2) hide show
  1. package/dist/error.js +6 -0
  2. package/package.json +4 -4
package/dist/error.js CHANGED
@@ -52,6 +52,12 @@ function serializeValue(val, seen = new WeakMap()) {
52
52
  if (typeof val !== "object") {
53
53
  return val;
54
54
  }
55
+ if (typeof Buffer !== "undefined" && val instanceof Buffer) {
56
+ return `<Buffer(${val.length}) ...>`;
57
+ }
58
+ if (typeof Uint8Array !== "undefined" && val instanceof Uint8Array) {
59
+ return `<Uint8Array(${val.length}) ...>`;
60
+ }
55
61
  // cannot serialize immutables as immutables
56
62
  if (isImmutable(val)) {
57
63
  return serializeValue(val.toJSON(), seen);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/utils",
3
3
  "type": "module",
4
- "version": "3.2.2",
4
+ "version": "3.2.4",
5
5
  "description": "Shared Vitest utility functions",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -60,13 +60,13 @@
60
60
  "dist"
61
61
  ],
62
62
  "dependencies": {
63
- "loupe": "^3.1.3",
63
+ "loupe": "^3.1.4",
64
64
  "tinyrainbow": "^2.0.0",
65
- "@vitest/pretty-format": "3.2.2"
65
+ "@vitest/pretty-format": "3.2.4"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@jridgewell/trace-mapping": "^0.3.25",
69
- "@types/estree": "^1.0.7",
69
+ "@types/estree": "^1.0.8",
70
70
  "diff-sequences": "^29.6.3",
71
71
  "tinyhighlight": "^0.3.2"
72
72
  },