@vitest/snapshot 4.1.0-beta.2 → 4.1.0-beta.3

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.
@@ -1,5 +1,5 @@
1
1
  import { promises, existsSync } from 'node:fs';
2
- import { resolve, isAbsolute, dirname, join, basename } from 'pathe';
2
+ import { isAbsolute, resolve, dirname, join, basename } from 'pathe';
3
3
 
4
4
  class NodeSnapshotEnvironment {
5
5
  constructor(options = {}) {
package/dist/index.js CHANGED
@@ -283,6 +283,7 @@ const stackIgnorePatterns = [
283
283
  /node:\w+/,
284
284
  /__vitest_test__/,
285
285
  /__vitest_browser__/,
286
+ "/@id/__x00__vitest/browser",
286
287
  /\/deps\/vitest_/
287
288
  ];
288
289
  const NOW_LENGTH = Date.now().toString().length;
@@ -400,7 +401,7 @@ function parseSingleV8Stack(raw) {
400
401
  // normalize Windows path (\ -> /)
401
402
  file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
402
403
  if (method) {
403
- method = method.replace(/__vite_ssr_import_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "");
404
+ method = method.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g, "$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "").replace(/(Object\.)?__vite_ssr_export_default__\s?/g, "");
404
405
  }
405
406
  return {
406
407
  method,
package/dist/manager.js CHANGED
@@ -1,4 +1,4 @@
1
- import { join, dirname, basename, resolve, isAbsolute } from 'pathe';
1
+ import { join, dirname, basename, isAbsolute, resolve } from 'pathe';
2
2
 
3
3
  class SnapshotManager {
4
4
  summary;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/snapshot",
3
3
  "type": "module",
4
- "version": "4.1.0-beta.2",
4
+ "version": "4.1.0-beta.3",
5
5
  "description": "Vitest snapshot manager",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -40,12 +40,12 @@
40
40
  "dependencies": {
41
41
  "magic-string": "^0.30.21",
42
42
  "pathe": "^2.0.3",
43
- "@vitest/pretty-format": "4.1.0-beta.2"
43
+ "@vitest/pretty-format": "4.1.0-beta.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/natural-compare": "^1.4.3",
47
47
  "natural-compare": "^1.4.0",
48
- "@vitest/utils": "4.1.0-beta.2"
48
+ "@vitest/utils": "4.1.0-beta.3"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "premove dist && rollup -c",