@impakers/debug 1.3.10 → 1.3.11
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/react.js +13 -13
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +13 -13
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -1354,6 +1354,8 @@ function parseComponentFrame(stack) {
|
|
|
1354
1354
|
/source-location/,
|
|
1355
1355
|
/\/dist\/index\./,
|
|
1356
1356
|
// Our bundled output (dist/index.mjs, dist/index.js)
|
|
1357
|
+
/\/dist\/react\./,
|
|
1358
|
+
// Our React bundled output
|
|
1357
1359
|
/node_modules\//,
|
|
1358
1360
|
// Any package in node_modules (dev mode)
|
|
1359
1361
|
/react-dom/,
|
|
@@ -1368,26 +1370,24 @@ function parseComponentFrame(stack) {
|
|
|
1368
1370
|
];
|
|
1369
1371
|
const v8Re = /^\s*at\s+(?:.*?\s+\()?(.+?):(\d+):(\d+)\)?$/;
|
|
1370
1372
|
const webkitRe = /^[^@]*@(.+?):(\d+):(\d+)$/;
|
|
1371
|
-
let
|
|
1373
|
+
let validCount = 0;
|
|
1372
1374
|
for (const line of lines) {
|
|
1373
1375
|
const trimmed = line.trim();
|
|
1374
1376
|
if (!trimmed) continue;
|
|
1375
|
-
if (skipPatterns.some((p) => p.test(trimmed)))
|
|
1376
|
-
if (/at <anonymous>:/.test(trimmed) && lastValid) {
|
|
1377
|
-
return lastValid;
|
|
1378
|
-
}
|
|
1379
|
-
continue;
|
|
1380
|
-
}
|
|
1377
|
+
if (skipPatterns.some((p) => p.test(trimmed))) continue;
|
|
1381
1378
|
const match = v8Re.exec(trimmed) || webkitRe.exec(trimmed);
|
|
1382
1379
|
if (match) {
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1380
|
+
validCount++;
|
|
1381
|
+
if (validCount >= 3) {
|
|
1382
|
+
return {
|
|
1383
|
+
fileName: match[1],
|
|
1384
|
+
line: parseInt(match[2], 10),
|
|
1385
|
+
column: parseInt(match[3], 10)
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
|
-
return
|
|
1390
|
+
return null;
|
|
1391
1391
|
}
|
|
1392
1392
|
function cleanSourcePath(rawPath) {
|
|
1393
1393
|
let path = rawPath;
|