@vitest/utils 2.0.0-beta.1 → 2.0.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.
- package/dist/chunk-display.js +1 -1
- package/dist/diff.js +1 -1
- package/dist/source-map.js +3 -3
- package/package.json +1 -1
package/dist/chunk-display.js
CHANGED
@@ -41,7 +41,7 @@ function stringify(object, maxDepth = 10, { maxLength, ...options } = {}) {
|
|
41
41
|
return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(maxDepth / 2)) : result;
|
42
42
|
}
|
43
43
|
|
44
|
-
const formatRegExp = /%[
|
44
|
+
const formatRegExp = /%[sdjifoOc%]/g;
|
45
45
|
function format(...args) {
|
46
46
|
if (typeof args[0] !== "string") {
|
47
47
|
const objects = [];
|
package/dist/diff.js
CHANGED
@@ -181,7 +181,7 @@ const diff_cleanupSemantic = function(diffs) {
|
|
181
181
|
pointer++;
|
182
182
|
}
|
183
183
|
};
|
184
|
-
const nonAlphaNumericRegex_ = /[^a-
|
184
|
+
const nonAlphaNumericRegex_ = /[^a-z0-9]/i;
|
185
185
|
const whitespaceRegex_ = /\s/;
|
186
186
|
const linebreakRegex_ = /[\r\n]/;
|
187
187
|
const blanklineEndRegex_ = /\n\r?\n$/;
|
package/dist/source-map.js
CHANGED
@@ -760,8 +760,8 @@ function generatedPosition(map, source, line, column, bias, all) {
|
|
760
760
|
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
761
761
|
}
|
762
762
|
|
763
|
-
const CHROME_IE_STACK_REGEXP = /^\s*at .*(
|
764
|
-
const SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(
|
763
|
+
const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
|
764
|
+
const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
|
765
765
|
const stackIgnorePatterns = [
|
766
766
|
"node:internal",
|
767
767
|
/\/packages\/\w+\/dist\//,
|
@@ -801,7 +801,7 @@ function parseSingleFFOrSafariStack(raw) {
|
|
801
801
|
line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
|
802
802
|
if (!line.includes("@") && !line.includes(":"))
|
803
803
|
return null;
|
804
|
-
const functionNameRegex = /((.*".+"[^@]*)?[^@]*)(
|
804
|
+
const functionNameRegex = /((.*".+"[^@]*)?[^@]*)(@)/;
|
805
805
|
const matches = line.match(functionNameRegex);
|
806
806
|
const functionName = matches && matches[1] ? matches[1] : void 0;
|
807
807
|
const [url, lineNumber, columnNumber] = extractLocation(line.replace(functionNameRegex, ""));
|