@vitest/utils
Advanced tools
+1
-3
@@ -128,5 +128,3 @@ import { VALID_ID_PREFIX, NULL_BYTE_PLACEHOLDER } from './constants.js'; | ||
| function toArray(array) { | ||
| if (array === null || array === undefined) { | ||
| array = []; | ||
| } | ||
| array ??= []; | ||
| if (Array.isArray(array)) { | ||
@@ -133,0 +131,0 @@ return array; |
@@ -404,3 +404,3 @@ import { isPrimitive, notNullish } from './helpers.js'; | ||
| let file = source || stack.file; | ||
| if (file.match(/\/\w:\//)) { | ||
| if (/\/\w:\//.test(file)) { | ||
| file = file.slice(1); | ||
@@ -407,0 +407,0 @@ } |
+2
-2
| { | ||
| "name": "@vitest/utils", | ||
| "type": "module", | ||
| "version": "5.0.0-beta.5", | ||
| "version": "5.0.0-beta.6", | ||
| "description": "Shared Vitest utility functions", | ||
@@ -89,3 +89,3 @@ "license": "MIT", | ||
| "tinyrainbow": "^3.1.0", | ||
| "@vitest/pretty-format": "5.0.0-beta.5" | ||
| "@vitest/pretty-format": "5.0.0-beta.6" | ||
| }, | ||
@@ -92,0 +92,0 @@ "devDependencies": { |
148552
-0.03%4139
-0.05%+ Added
- Removed