snapfail 0.0.18 → 0.0.20
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/index.js +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -245,6 +245,13 @@ function formatIncidentDetail(group, sample) {
|
|
|
245
245
|
for (const f of sample.stackFrames.slice(0, 6)) {
|
|
246
246
|
const fn = f.fn ? `${cyan(f.fn)} ` : "";
|
|
247
247
|
lines.push(` ${fn}${dim(f.file + ":" + f.line)}`);
|
|
248
|
+
if (f.codeSnippet) {
|
|
249
|
+
for (const snippetLine of f.codeSnippet.split(`
|
|
250
|
+
`)) {
|
|
251
|
+
const isError = snippetLine.startsWith("\u25BA");
|
|
252
|
+
lines.push(isError ? ` ${bold(snippetLine)}` : ` ${dim(snippetLine)}`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
248
255
|
}
|
|
249
256
|
}
|
|
250
257
|
if (sample.consoleEntries.length > 0) {
|