Socket
Socket
Sign inDemoInstall

@vitest/runner

Package Overview
Dependencies
14
Maintainers
4
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-beta.6 to 2.0.0-beta.7

14

dist/index.js
import limit from 'p-limit';
import { getSafeTimers, isObject, createDefer, format, objDisplay, objectAttr, toArray, shuffle } from '@vitest/utils';
import { getSafeTimers, isObject, createDefer, isNegativeNaN, format, objDisplay, objectAttr, toArray, shuffle } from '@vitest/utils';
import { processError } from '@vitest/utils/error';

@@ -560,2 +560,14 @@ export { processError } from '@vitest/utils/error';

const count = template.split("%").length - 1;
if (template.includes("%f")) {
const placeholders = template.match(/%f/g) || [];
placeholders.forEach((_, i) => {
if (isNegativeNaN(items[i]) || Object.is(items[i], -0)) {
let occurrence = 0;
template = template.replace(/%f/g, (match) => {
occurrence++;
return occurrence === i + 1 ? "-%f" : match;
});
}
});
}
let formatted = format(template, ...items.slice(0, count));

@@ -562,0 +574,0 @@ if (isObject(items[0])) {

4

package.json
{
"name": "@vitest/runner",
"type": "module",
"version": "2.0.0-beta.6",
"version": "2.0.0-beta.7",
"description": "Vitest test runner",

@@ -43,3 +43,3 @@ "license": "MIT",

"pathe": "^1.1.2",
"@vitest/utils": "2.0.0-beta.6"
"@vitest/utils": "2.0.0-beta.7"
},

@@ -46,0 +46,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc