You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@vitest/snapshot

Package Overview
Dependencies
Maintainers
5
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/snapshot - npm Package Compare versions

Comparing version
4.1.0-beta.1
to
4.1.0-beta.2
+8
-0
dist/index.js

@@ -288,2 +288,4 @@ import { resolve } from 'pathe';

];
const NOW_LENGTH = Date.now().toString().length;
const REGEXP_VITEST = new RegExp(`vitest=\\d{${NOW_LENGTH}}`);
function extractLocation(urlLike) {

@@ -313,2 +315,5 @@ // Fail-fast but return locations like "(native)"

}
if (url.includes("vitest=")) {
url = url.replace(REGEXP_VITEST, "").replace(/[?&]$/, "");
}
return [

@@ -551,2 +556,5 @@ url,

const code = await environment.readSnapshotFile(file);
if (code == null) {
throw new Error(`cannot read ${file} when saving inline snapshot`);
}
const s = new MagicString(code);

@@ -553,0 +561,0 @@ for (const snap of snaps) {

+3
-3
{
"name": "@vitest/snapshot",
"type": "module",
"version": "4.1.0-beta.1",
"version": "4.1.0-beta.2",
"description": "Vitest snapshot manager",

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

"pathe": "^2.0.3",
"@vitest/pretty-format": "4.1.0-beta.1"
"@vitest/pretty-format": "4.1.0-beta.2"
},

@@ -49,3 +49,3 @@ "devDependencies": {

"natural-compare": "^1.4.0",
"@vitest/utils": "4.1.0-beta.1"
"@vitest/utils": "4.1.0-beta.2"
},

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