From 23bdaedf1e8b4bf5951b5dce234a4accdbed3b31 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Sun, 24 Mar 2024 23:51:06 +0800 Subject: [PATCH] fixup! lib: cache source maps in vm sources --- test/common/assertSnapshot.js | 2 +- .../source-map/output/source_map_throw_set_immediate.snapshot | 2 +- test/fixtures/source-map/output/source_map_vm_module.snapshot | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/common/assertSnapshot.js b/test/common/assertSnapshot.js index 698bd574c6ce625..cb3b9fd332b24b6 100644 --- a/test/common/assertSnapshot.js +++ b/test/common/assertSnapshot.js @@ -22,7 +22,7 @@ function replaceStackTrace(str, replacement = '$1*$7$8\n') { } function replaceInternalStackTrace(str) { - return str.replaceAll(/(\W+).*node:internal\/modules.*/g, '$1*'); + return str.replaceAll(/(\W+).*node:internal.*/g, '$1*'); } function replaceWindowsLineEndings(str) { diff --git a/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot b/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot index 5ff79f7cc4bad96..4cf4d52a16ea935 100644 --- a/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot +++ b/test/fixtures/source-map/output/source_map_throw_set_immediate.snapshot @@ -6,6 +6,6 @@ Error: goodbye at Hello (*/test/fixtures/source-map/uglify-throw-original.js:5:9) at Immediate. (*/test/fixtures/source-map/uglify-throw-original.js:9:3) - at process.processImmediate (node:internal/timers:478:21) + * Node.js * diff --git a/test/fixtures/source-map/output/source_map_vm_module.snapshot b/test/fixtures/source-map/output/source_map_vm_module.snapshot index 2e5d8599143d943..76c8a437116fbaf 100644 --- a/test/fixtures/source-map/output/source_map_vm_module.snapshot +++ b/test/fixtures/source-map/output/source_map_vm_module.snapshot @@ -6,6 +6,6 @@ ReferenceError: alert is not defined at (*/test/fixtures/source-map/tabs.coffee:26:2) at (*/test/fixtures/source-map/tabs.coffee:1:14) - at SourceTextModule.evaluate (node:internal/vm/module:232:23) + * Node.js *